Commit 5509845a authored by mattwire's avatar mattwire
Browse files

Merge branch 'release10' into 'master'

Update from Sweetalert 9.x to 10.x, release 1.5

See merge request !4
parents 051a5c5b 0eb0cba1
Package: sweetalert
Copyright (C) 2020, Mathieu Lutfy <mathieu@symbiotic.coop>
Copyright (C) 2021, Mathieu Lutfy <mathieu@symbiotic.coop>
Licensed under the GNU Affero Public License 3.0 (below).
-------------------------------------------------------------------------------
......
......@@ -26,6 +26,11 @@ This extension does not do anything out of the box. It is available for other ex
## Changelog
#### 1.5
*SweetAlert introduces a number of breaking changes from release 11. Release 10 provides both legacy methods and new methods so allows existing integrations to transition.*
*
* Update SweetAlert from 9.17.1 to 10.16.7. [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md).
#### 1.4.1
* Regenerate autogenerated code for PHP7.4 support.
......
.swal2-popup.swal2-toast {
flex-direction: row;
align-items: center;
flex-direction: column;
align-items: stretch;
width: auto;
padding: 0.625em;
padding: 1.25em;
overflow-y: hidden;
background: #fff;
box-shadow: 0 0 0.625em #d9d9d9;
......@@ -14,7 +14,18 @@
.swal2-popup.swal2-toast .swal2-title {
flex-grow: 1;
justify-content: flex-start;
margin: 0 0.6em;
margin: 0 0.625em;
font-size: 1em;
}
.swal2-popup.swal2-toast .swal2-loading {
justify-content: center;
}
.swal2-popup.swal2-toast .swal2-input {
height: 2em;
margin: 0.3125em auto;
font-size: 1em;
}
.swal2-popup.swal2-toast .swal2-validation-message {
font-size: 1em;
}
.swal2-popup.swal2-toast .swal2-footer {
......@@ -30,14 +41,22 @@
}
.swal2-popup.swal2-toast .swal2-content {
justify-content: flex-start;
margin: 0 0.625em;
padding: 0;
font-size: 1em;
text-align: initial;
}
.swal2-popup.swal2-toast .swal2-html-container {
padding: 0.625em 0 0;
}
.swal2-popup.swal2-toast .swal2-html-container:empty {
padding: 0;
}
.swal2-popup.swal2-toast .swal2-icon {
width: 2em;
min-width: 2em;
height: 2em;
margin: 0;
margin: 0 0.5em 0 0;
}
.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
display: flex;
......@@ -65,18 +84,23 @@
right: 0.3125em;
}
.swal2-popup.swal2-toast .swal2-actions {
flex: 1;
flex-basis: auto !important;
align-self: stretch;
width: auto;
height: 2.2em;
height: auto;
margin: 0 0.3125em;
margin-top: 0.3125em;
padding: 0;
}
.swal2-popup.swal2-toast .swal2-styled {
margin: 0 0.3125em;
margin: 0.125em 0.3125em;
padding: 0.3125em 0.625em;
font-size: 1em;
}
.swal2-popup.swal2-toast .swal2-styled:focus {
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5);
}
.swal2-popup.swal2-toast .swal2-success {
border-color: #a5dc86;
......@@ -252,7 +276,7 @@
max-width: 100%;
padding: 1.25em;
border: none;
border-radius: 0.3125em;
border-radius: 5px;
background: #fff;
font-family: inherit;
font-size: 1rem;
......@@ -287,11 +311,13 @@
.swal2-actions {
display: flex;
z-index: 1;
box-sizing: border-box;
flex-wrap: wrap;
align-items: center;
justify-content: center;
width: 100%;
margin: 1.25em auto 0;
padding: 0;
}
.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {
opacity: 0.4;
......@@ -302,46 +328,25 @@
.swal2-actions:not(.swal2-loading) .swal2-styled:active {
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
}
.swal2-actions.swal2-loading .swal2-styled.swal2-confirm {
box-sizing: border-box;
width: 2.5em;
height: 2.5em;
margin: 0.46875em;
padding: 0;
.swal2-loader {
display: none;
align-items: center;
justify-content: center;
width: 2.2em;
height: 2.2em;
margin: 0 1.875em;
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
border: 0.25em solid transparent;
border-width: 0.25em;
border-style: solid;
border-radius: 100%;
border-color: transparent;
background-color: transparent !important;
color: transparent !important;
cursor: default;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.swal2-actions.swal2-loading .swal2-styled.swal2-cancel {
margin-right: 30px;
margin-left: 30px;
}
.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {
content: "";
display: inline-block;
width: 15px;
height: 15px;
margin-left: 5px;
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
border: 3px solid #999999;
border-radius: 50%;
border-right-color: transparent;
box-shadow: 1px 1px 1px #fff;
border-color: #2778c4 transparent #2778c4 transparent;
}
.swal2-styled {
margin: 0.3125em;
padding: 0.625em 2em;
padding: 0.625em 1.1em;
box-shadow: none;
font-weight: 500;
}
......@@ -352,21 +357,29 @@
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #3085d6;
background-color: #2778c4;
color: #fff;
font-size: 1em;
}
.swal2-styled.swal2-deny {
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #d14529;
color: #fff;
font-size: 1.0625em;
font-size: 1em;
}
.swal2-styled.swal2-cancel {
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #aaa;
background-color: #757575;
color: #fff;
font-size: 1.0625em;
font-size: 1em;
}
.swal2-styled:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5);
}
.swal2-styled::-moz-focus-inner {
border: 0;
......@@ -388,8 +401,8 @@
left: 0;
height: 0.25em;
overflow: hidden;
border-bottom-right-radius: 0.3125em;
border-bottom-left-radius: 0.3125em;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
.swal2-timer-progress-bar {
......@@ -416,7 +429,7 @@
overflow: hidden;
transition: color 0.1s ease-out;
border: none;
border-radius: 0;
border-radius: 5px;
background: transparent;
color: #cccccc;
font-family: serif;
......@@ -429,6 +442,10 @@
background: transparent;
color: #f27474;
}
.swal2-close:focus {
outline: none;
box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5);
}
.swal2-close::-moz-focus-inner {
border: 0;
}
......@@ -479,7 +496,7 @@
.swal2-textarea:focus {
border: 1px solid #b4dbed;
outline: none;
box-shadow: 0 0 3px #c4e6f5;
box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5);
}
.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder {
color: #cccccc;
......@@ -487,9 +504,6 @@
.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder {
color: #cccccc;
}
.swal2-input::-ms-input-placeholder, .swal2-file::-ms-input-placeholder, .swal2-textarea::-ms-input-placeholder {
color: #cccccc;
}
.swal2-input::placeholder,
.swal2-file::placeholder,
.swal2-textarea::placeholder {
......@@ -558,13 +572,20 @@
}
.swal2-radio input,
.swal2-checkbox input {
flex-shrink: 0;
margin: 0 0.4em;
}
.swal2-input-label {
display: flex;
justify-content: center;
margin: 1em auto;
}
.swal2-validation-message {
display: none;
align-items: center;
justify-content: center;
margin: 0 -2.7em;
padding: 0.625em;
overflow: hidden;
background: #f0f0f0;
......@@ -596,6 +617,7 @@
margin: 1.25em auto 1.875em;
border: 0.25em solid transparent;
border-radius: 50%;
border-color: #000;
font-family: inherit;
line-height: 5em;
cursor: default;
......@@ -733,7 +755,9 @@
}
.swal2-progress-steps {
flex-wrap: wrap;
align-items: center;
max-width: 100%;
margin: 0 0 1.25em;
padding: 0;
background: inherit;
......@@ -745,16 +769,17 @@
}
.swal2-progress-steps .swal2-progress-step {
z-index: 20;
flex-shrink: 0;
width: 2em;
height: 2em;
border-radius: 2em;
background: #3085d6;
background: #2778c4;
color: #fff;
line-height: 2em;
text-align: center;
}
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
background: #3085d6;
background: #2778c4;
}
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
background: #add8e6;
......@@ -765,10 +790,11 @@
}
.swal2-progress-steps .swal2-progress-step-line {
z-index: 10;
flex-shrink: 0;
width: 2.5em;
height: 0.4em;
margin: 0 -1px;
background: #3085d6;
background: #2778c4;
}
[class^=swal2] {
......@@ -822,11 +848,6 @@
display: none;
}
}
@-moz-document url-prefix() {
.swal2-close:focus {
outline: 2px solid rgba(50, 100, 150, 0.4);
}
}
@-webkit-keyframes swal2-toast-show {
0% {
transform: translateY(-0.625em) rotateZ(2deg);
......@@ -1347,25 +1368,4 @@ body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown
right: 0;
bottom: 0;
left: auto;
}
body.swal2-toast-column .swal2-toast {
flex-direction: column;
align-items: stretch;
}
body.swal2-toast-column .swal2-toast .swal2-actions {
flex: 1;
align-self: stretch;
height: 2.2em;
margin-top: 0.3125em;
}
body.swal2-toast-column .swal2-toast .swal2-loading {
justify-content: center;
}
body.swal2-toast-column .swal2-toast .swal2-input {
height: 2em;
margin: 0.3125em auto;
font-size: 1em;
}
body.swal2-toast-column .swal2-toast .swal2-validation-message {
font-size: 1em;
}
\ No newline at end of file
This diff is collapsed.
......@@ -14,8 +14,8 @@
<url desc="Support">https://lab.civicrm.org/extensions/sweetalert/issues</url>
<url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2021-04-12</releaseDate>
<version>1.4.1</version>
<releaseDate>2021-08-23</releaseDate>
<version>1.5</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.35</ver>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,6 +9,6 @@
"author": "Mathieu Lutfy",
"license": "AGPL-3.0",
"dependencies": {
"sweetalert2": "^9.17.1"
"sweetalert2": "^10.16.7"
}
}
......@@ -221,7 +221,8 @@ function _sweetalert_civix_upgrader() {
* Search directory tree for files which match a glob pattern.
*
* Note: Dot-directories (like "..", ".git", or ".svn") will be ignored.
* Note: In Civi 4.3+, delegate to CRM_Utils_File::findFiles()
* Note: Delegate to CRM_Utils_File::findFiles(), this function kept only
* for backward compatibility of extension code that uses it.
*
* @param string $dir base dir
* @param string $pattern , glob pattern, eg "*.txt"
......@@ -229,32 +230,7 @@ function _sweetalert_civix_upgrader() {
* @return array
*/
function _sweetalert_civix_find_files($dir, $pattern) {
if (is_callable(['CRM_Utils_File', 'findFiles'])) {
return CRM_Utils_File::findFiles($dir, $pattern);
}
$todos = [$dir];
$result = [];
while (!empty($todos)) {
$subdir = array_shift($todos);
foreach (_sweetalert_civix_glob("$subdir/$pattern") as $match) {
if (!is_dir($match)) {
$result[] = $match;
}
}
if ($dh = opendir($subdir)) {
while (FALSE !== ($entry = readdir($dh))) {
$path = $subdir . DIRECTORY_SEPARATOR . $entry;
if ($entry[0] == '.') {
}
elseif (is_dir($path)) {
$todos[] = $path;
}
}
closedir($dh);
}
}
return $result;
return CRM_Utils_File::findFiles($dir, $pattern);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment