quasar 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +4 -0
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +4 -0
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +3 -1
- package/dist/quasar.umd.js +153 -76
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/utils/date.d.ts +25 -13
- package/dist/web-types/web-types.json +1 -1
- package/package.json +1 -1
- package/src/components/field/QField.sass +2 -0
- package/src/components/form/QForm.js +26 -24
- package/src/composables/private/use-validate.js +14 -18
- package/src/utils/date.js +110 -31
package/dist/quasar.sass
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quasar Framework v2.5.
|
|
2
|
+
* Quasar Framework v2.5.1
|
|
3
3
|
* (c) 2015-present Razvan Stoenescu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2234,6 +2234,7 @@ $field-transition-label-right-up: .324s cubic-bezier(.4,0,.2,1)
|
|
|
2234
2234
|
line-height: 1
|
|
2235
2235
|
color: rgba(0,0,0,.54)
|
|
2236
2236
|
padding: 8px 12px 0
|
|
2237
|
+
backface-visibility: hidden
|
|
2237
2238
|
&--animated
|
|
2238
2239
|
transform: translateY(100%)
|
|
2239
2240
|
position: absolute
|
|
@@ -2354,6 +2355,7 @@ $field-transition-label-right-up: .324s cubic-bezier(.4,0,.2,1)
|
|
|
2354
2355
|
text-transform: inherit
|
|
2355
2356
|
transform-origin: left top
|
|
2356
2357
|
transition: transform $field-transition, max-width $field-transition-label-right-up
|
|
2358
|
+
backface-visibility: hidden
|
|
2357
2359
|
&--float .q-field__label
|
|
2358
2360
|
max-width: 133%
|
|
2359
2361
|
transform: translateY(-40%) scale(.75)
|
package/dist/quasar.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quasar Framework v2.5.
|
|
2
|
+
* Quasar Framework v2.5.1
|
|
3
3
|
* (c) 2015-present Razvan Stoenescu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
}
|
|
1460
1460
|
|
|
1461
1461
|
var installQuasar = function (parentApp, opts = {}) {
|
|
1462
|
-
const $q = { version: '2.5.
|
|
1462
|
+
const $q = { version: '2.5.1' };
|
|
1463
1463
|
|
|
1464
1464
|
if (globalConfigIsFrozen === false) {
|
|
1465
1465
|
if (opts.config !== void 0) {
|
|
@@ -11779,15 +11779,18 @@
|
|
|
11779
11779
|
function applyYearMonthDayChange (date, mod, sign) {
|
|
11780
11780
|
let
|
|
11781
11781
|
year = date.getFullYear(),
|
|
11782
|
-
month = date.getMonth()
|
|
11783
|
-
day = date.getDate();
|
|
11782
|
+
month = date.getMonth();
|
|
11784
11783
|
|
|
11785
|
-
|
|
11786
|
-
|
|
11784
|
+
const day = date.getDate();
|
|
11785
|
+
|
|
11786
|
+
if (mod.year !== void 0) {
|
|
11787
|
+
year += sign * mod.year;
|
|
11788
|
+
delete mod.year;
|
|
11787
11789
|
}
|
|
11788
11790
|
|
|
11789
|
-
if (mod.
|
|
11790
|
-
month += sign * mod.
|
|
11791
|
+
if (mod.month !== void 0) {
|
|
11792
|
+
month += sign * mod.month;
|
|
11793
|
+
delete mod.month;
|
|
11791
11794
|
}
|
|
11792
11795
|
|
|
11793
11796
|
date.setDate(1);
|
|
@@ -11797,30 +11800,14 @@
|
|
|
11797
11800
|
date.setMonth(month);
|
|
11798
11801
|
date.setDate(Math.min(day, daysInMonth(date)));
|
|
11799
11802
|
|
|
11800
|
-
if (mod.
|
|
11801
|
-
date.setDate(date.getDate() + sign * mod.
|
|
11803
|
+
if (mod.date !== void 0) {
|
|
11804
|
+
date.setDate(date.getDate() + sign * mod.date);
|
|
11805
|
+
delete mod.date;
|
|
11802
11806
|
}
|
|
11803
11807
|
|
|
11804
11808
|
return date
|
|
11805
11809
|
}
|
|
11806
11810
|
|
|
11807
|
-
function getChange (date, mod, sign) {
|
|
11808
|
-
const
|
|
11809
|
-
d = new Date(date),
|
|
11810
|
-
t = mod.years !== void 0 || mod.months !== void 0 || mod.days !== void 0
|
|
11811
|
-
? applyYearMonthDayChange(d, mod, sign)
|
|
11812
|
-
: d;
|
|
11813
|
-
|
|
11814
|
-
for (const key in mod) {
|
|
11815
|
-
if (key !== 'years' && key !== 'months' && key !== 'days') {
|
|
11816
|
-
const op = capitalize(key);
|
|
11817
|
-
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
|
|
11818
|
-
}
|
|
11819
|
-
}
|
|
11820
|
-
|
|
11821
|
-
return t
|
|
11822
|
-
}
|
|
11823
|
-
|
|
11824
11811
|
function applyYearMonthDay (date, mod, middle) {
|
|
11825
11812
|
const
|
|
11826
11813
|
year = mod.year !== void 0 ? mod.year : date[ `get${ middle }FullYear` ](),
|
|
@@ -11835,22 +11822,86 @@
|
|
|
11835
11822
|
date[ `set${ middle }Month` ](month);
|
|
11836
11823
|
date[ `set${ middle }Date` ](day);
|
|
11837
11824
|
|
|
11825
|
+
delete mod.year;
|
|
11826
|
+
delete mod.month;
|
|
11827
|
+
delete mod.date;
|
|
11828
|
+
|
|
11838
11829
|
return date
|
|
11839
11830
|
}
|
|
11840
11831
|
|
|
11841
|
-
function
|
|
11832
|
+
function getChange (date, rawMod, sign) {
|
|
11833
|
+
const
|
|
11834
|
+
mod = normalizeMod(rawMod),
|
|
11835
|
+
d = new Date(date),
|
|
11836
|
+
t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
|
|
11837
|
+
? applyYearMonthDayChange(d, mod, sign) // removes year/month/day
|
|
11838
|
+
: d;
|
|
11839
|
+
|
|
11840
|
+
for (const key in mod) {
|
|
11841
|
+
const op = capitalize(key);
|
|
11842
|
+
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
|
|
11843
|
+
}
|
|
11844
|
+
|
|
11845
|
+
return t
|
|
11846
|
+
}
|
|
11847
|
+
|
|
11848
|
+
function normalizeMod (mod) {
|
|
11849
|
+
const acc = { ...mod };
|
|
11850
|
+
|
|
11851
|
+
if (mod.years !== void 0) {
|
|
11852
|
+
acc.year = mod.years;
|
|
11853
|
+
delete acc.years;
|
|
11854
|
+
}
|
|
11855
|
+
|
|
11856
|
+
if (mod.months !== void 0) {
|
|
11857
|
+
acc.month = mod.months;
|
|
11858
|
+
delete acc.months;
|
|
11859
|
+
}
|
|
11860
|
+
|
|
11861
|
+
if (mod.days !== void 0) {
|
|
11862
|
+
acc.date = mod.days;
|
|
11863
|
+
delete acc.days;
|
|
11864
|
+
}
|
|
11865
|
+
if (mod.day !== void 0) {
|
|
11866
|
+
acc.date = mod.day;
|
|
11867
|
+
delete acc.day;
|
|
11868
|
+
}
|
|
11869
|
+
|
|
11870
|
+
if (mod.hour !== void 0) {
|
|
11871
|
+
acc.hours = mod.hour;
|
|
11872
|
+
delete acc.hour;
|
|
11873
|
+
}
|
|
11874
|
+
|
|
11875
|
+
if (mod.minute !== void 0) {
|
|
11876
|
+
acc.minutes = mod.minute;
|
|
11877
|
+
delete acc.minute;
|
|
11878
|
+
}
|
|
11879
|
+
|
|
11880
|
+
if (mod.second !== void 0) {
|
|
11881
|
+
acc.seconds = mod.second;
|
|
11882
|
+
delete acc.second;
|
|
11883
|
+
}
|
|
11884
|
+
|
|
11885
|
+
if (mod.millisecond !== void 0) {
|
|
11886
|
+
acc.milliseconds = mod.millisecond;
|
|
11887
|
+
delete acc.millisecond;
|
|
11888
|
+
}
|
|
11889
|
+
|
|
11890
|
+
return acc
|
|
11891
|
+
}
|
|
11892
|
+
|
|
11893
|
+
function adjustDate (date, rawMod, utc) {
|
|
11842
11894
|
const
|
|
11895
|
+
mod = normalizeMod(rawMod),
|
|
11843
11896
|
middle = utc === true ? 'UTC' : '',
|
|
11844
11897
|
d = new Date(date),
|
|
11845
11898
|
t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
|
|
11846
|
-
? applyYearMonthDay(d, mod, middle)
|
|
11899
|
+
? applyYearMonthDay(d, mod, middle) // removes year/month/day
|
|
11847
11900
|
: d;
|
|
11848
11901
|
|
|
11849
11902
|
for (const key in mod) {
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
t[ `set${ middle }${ op }` ](mod[ key ]);
|
|
11853
|
-
}
|
|
11903
|
+
const op = key.charAt(0).toUpperCase() + key.slice(1);
|
|
11904
|
+
t[ `set${ middle }${ op }` ](mod[ key ]);
|
|
11854
11905
|
}
|
|
11855
11906
|
|
|
11856
11907
|
return t
|
|
@@ -12084,16 +12135,23 @@
|
|
|
12084
12135
|
|
|
12085
12136
|
switch (unit) {
|
|
12086
12137
|
case 'year':
|
|
12138
|
+
case 'years':
|
|
12087
12139
|
t[ `${ prefix }Month` ](0);
|
|
12088
12140
|
case 'month':
|
|
12141
|
+
case 'months':
|
|
12089
12142
|
t[ `${ prefix }Date` ](1);
|
|
12090
12143
|
case 'day':
|
|
12144
|
+
case 'days':
|
|
12145
|
+
case 'date':
|
|
12091
12146
|
t[ `${ prefix }Hours` ](0);
|
|
12092
12147
|
case 'hour':
|
|
12148
|
+
case 'hours':
|
|
12093
12149
|
t[ `${ prefix }Minutes` ](0);
|
|
12094
12150
|
case 'minute':
|
|
12151
|
+
case 'minutes':
|
|
12095
12152
|
t[ `${ prefix }Seconds` ](0);
|
|
12096
12153
|
case 'second':
|
|
12154
|
+
case 'seconds':
|
|
12097
12155
|
t[ `${ prefix }Milliseconds` ](0);
|
|
12098
12156
|
}
|
|
12099
12157
|
return t
|
|
@@ -12106,16 +12164,23 @@
|
|
|
12106
12164
|
|
|
12107
12165
|
switch (unit) {
|
|
12108
12166
|
case 'year':
|
|
12167
|
+
case 'years':
|
|
12109
12168
|
t[ `${ prefix }Month` ](11);
|
|
12110
12169
|
case 'month':
|
|
12170
|
+
case 'months':
|
|
12111
12171
|
t[ `${ prefix }Date` ](daysInMonth(t));
|
|
12112
12172
|
case 'day':
|
|
12173
|
+
case 'days':
|
|
12174
|
+
case 'date':
|
|
12113
12175
|
t[ `${ prefix }Hours` ](23);
|
|
12114
12176
|
case 'hour':
|
|
12177
|
+
case 'hours':
|
|
12115
12178
|
t[ `${ prefix }Minutes` ](59);
|
|
12116
12179
|
case 'minute':
|
|
12180
|
+
case 'minutes':
|
|
12117
12181
|
t[ `${ prefix }Seconds` ](59);
|
|
12118
12182
|
case 'second':
|
|
12183
|
+
case 'seconds':
|
|
12119
12184
|
t[ `${ prefix }Milliseconds` ](999);
|
|
12120
12185
|
}
|
|
12121
12186
|
return t
|
|
@@ -12151,21 +12216,28 @@
|
|
|
12151
12216
|
|
|
12152
12217
|
switch (unit) {
|
|
12153
12218
|
case 'years':
|
|
12219
|
+
case 'year':
|
|
12154
12220
|
return (t.getFullYear() - sub.getFullYear())
|
|
12155
12221
|
|
|
12156
12222
|
case 'months':
|
|
12223
|
+
case 'month':
|
|
12157
12224
|
return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth()
|
|
12158
12225
|
|
|
12159
12226
|
case 'days':
|
|
12227
|
+
case 'day':
|
|
12228
|
+
case 'date':
|
|
12160
12229
|
return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY)
|
|
12161
12230
|
|
|
12162
12231
|
case 'hours':
|
|
12232
|
+
case 'hour':
|
|
12163
12233
|
return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR)
|
|
12164
12234
|
|
|
12165
12235
|
case 'minutes':
|
|
12236
|
+
case 'minute':
|
|
12166
12237
|
return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE)
|
|
12167
12238
|
|
|
12168
12239
|
case 'seconds':
|
|
12240
|
+
case 'second':
|
|
12169
12241
|
return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000)
|
|
12170
12242
|
}
|
|
12171
12243
|
}
|
|
@@ -12211,26 +12283,33 @@
|
|
|
12211
12283
|
|
|
12212
12284
|
switch (unit) {
|
|
12213
12285
|
case 'second':
|
|
12286
|
+
case 'seconds':
|
|
12214
12287
|
if (t.getSeconds() !== d.getSeconds()) {
|
|
12215
12288
|
return false
|
|
12216
12289
|
}
|
|
12217
12290
|
case 'minute': // intentional fall-through
|
|
12291
|
+
case 'minutes':
|
|
12218
12292
|
if (t.getMinutes() !== d.getMinutes()) {
|
|
12219
12293
|
return false
|
|
12220
12294
|
}
|
|
12221
12295
|
case 'hour': // intentional fall-through
|
|
12296
|
+
case 'hours':
|
|
12222
12297
|
if (t.getHours() !== d.getHours()) {
|
|
12223
12298
|
return false
|
|
12224
12299
|
}
|
|
12225
12300
|
case 'day': // intentional fall-through
|
|
12301
|
+
case 'days':
|
|
12302
|
+
case 'date':
|
|
12226
12303
|
if (t.getDate() !== d.getDate()) {
|
|
12227
12304
|
return false
|
|
12228
12305
|
}
|
|
12229
12306
|
case 'month': // intentional fall-through
|
|
12307
|
+
case 'months':
|
|
12230
12308
|
if (t.getMonth() !== d.getMonth()) {
|
|
12231
12309
|
return false
|
|
12232
12310
|
}
|
|
12233
12311
|
case 'year': // intentional fall-through
|
|
12312
|
+
case 'years':
|
|
12234
12313
|
if (t.getFullYear() !== d.getFullYear()) {
|
|
12235
12314
|
return false
|
|
12236
12315
|
}
|
|
@@ -20307,7 +20386,14 @@
|
|
|
20307
20386
|
else if (isDirtyModel.value === false) {
|
|
20308
20387
|
isDirtyModel.value = true;
|
|
20309
20388
|
|
|
20310
|
-
if (
|
|
20389
|
+
if (
|
|
20390
|
+
hasActiveRules.value === true
|
|
20391
|
+
&& props.lazyRules !== 'ondemand'
|
|
20392
|
+
// Don't re-trigger if it's already in progress;
|
|
20393
|
+
// It might mean that focus switched to submit btn and
|
|
20394
|
+
// QForm's submit() has been called already (ENTER key)
|
|
20395
|
+
&& innerLoading.value === false
|
|
20396
|
+
) {
|
|
20311
20397
|
debouncedValidate();
|
|
20312
20398
|
}
|
|
20313
20399
|
}
|
|
@@ -20333,7 +20419,7 @@
|
|
|
20333
20419
|
return true
|
|
20334
20420
|
}
|
|
20335
20421
|
|
|
20336
|
-
validateIndex
|
|
20422
|
+
const index = ++validateIndex;
|
|
20337
20423
|
|
|
20338
20424
|
if (innerLoading.value !== true && props.lazyRules !== true) {
|
|
20339
20425
|
isDirtyModel.value = true;
|
|
@@ -20350,9 +20436,7 @@
|
|
|
20350
20436
|
innerErrorMessage.value = m;
|
|
20351
20437
|
}
|
|
20352
20438
|
|
|
20353
|
-
|
|
20354
|
-
innerLoading.value = false;
|
|
20355
|
-
}
|
|
20439
|
+
innerLoading.value = false;
|
|
20356
20440
|
};
|
|
20357
20441
|
|
|
20358
20442
|
const promises = [];
|
|
@@ -20382,35 +20466,26 @@
|
|
|
20382
20466
|
return true
|
|
20383
20467
|
}
|
|
20384
20468
|
|
|
20385
|
-
|
|
20386
|
-
innerLoading.value = true;
|
|
20387
|
-
}
|
|
20388
|
-
|
|
20389
|
-
const index = validateIndex;
|
|
20469
|
+
innerLoading.value = true;
|
|
20390
20470
|
|
|
20391
20471
|
return Promise.all(promises).then(
|
|
20392
20472
|
res => {
|
|
20393
|
-
if (index !== validateIndex) {
|
|
20394
|
-
return true
|
|
20395
|
-
}
|
|
20396
|
-
|
|
20397
20473
|
if (res === void 0 || Array.isArray(res) === false || res.length === 0) {
|
|
20398
|
-
update(false);
|
|
20474
|
+
index === validateIndex && update(false);
|
|
20399
20475
|
return true
|
|
20400
20476
|
}
|
|
20401
20477
|
|
|
20402
20478
|
const msg = res.find(r => r === false || typeof r === 'string');
|
|
20403
|
-
update(msg !== void 0, msg);
|
|
20479
|
+
index === validateIndex && update(msg !== void 0, msg);
|
|
20404
20480
|
return msg === void 0
|
|
20405
20481
|
},
|
|
20406
20482
|
e => {
|
|
20407
20483
|
if (index === validateIndex) {
|
|
20408
20484
|
console.error(e);
|
|
20409
20485
|
update(true);
|
|
20410
|
-
return false
|
|
20411
20486
|
}
|
|
20412
20487
|
|
|
20413
|
-
return
|
|
20488
|
+
return false
|
|
20414
20489
|
}
|
|
20415
20490
|
)
|
|
20416
20491
|
}
|
|
@@ -21570,7 +21645,7 @@
|
|
|
21570
21645
|
? shouldFocus
|
|
21571
21646
|
: props.noErrorFocus !== true;
|
|
21572
21647
|
|
|
21573
|
-
validateIndex
|
|
21648
|
+
const index = ++validateIndex;
|
|
21574
21649
|
|
|
21575
21650
|
const emitEvent = (res, ref) => {
|
|
21576
21651
|
emit('validation-' + (res === true ? 'success' : 'error'), ref);
|
|
@@ -21584,7 +21659,7 @@
|
|
|
21584
21659
|
promises.push(
|
|
21585
21660
|
valid.then(
|
|
21586
21661
|
valid => ({ valid, comp }),
|
|
21587
|
-
|
|
21662
|
+
err => ({ valid: false, comp, err })
|
|
21588
21663
|
)
|
|
21589
21664
|
);
|
|
21590
21665
|
}
|
|
@@ -21608,34 +21683,33 @@
|
|
|
21608
21683
|
return Promise.resolve(true)
|
|
21609
21684
|
}
|
|
21610
21685
|
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
return Promise.all(promises).then(
|
|
21614
|
-
res => {
|
|
21615
|
-
if (index === validateIndex) {
|
|
21616
|
-
const errors = res.filter(r => r.valid !== true);
|
|
21686
|
+
return Promise.all(promises).then(res => {
|
|
21687
|
+
const errors = res.filter(r => r.valid !== true);
|
|
21617
21688
|
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21689
|
+
if (errors.length === 0) {
|
|
21690
|
+
index === validateIndex && emitEvent(true);
|
|
21691
|
+
return true
|
|
21692
|
+
}
|
|
21622
21693
|
|
|
21623
|
-
|
|
21694
|
+
const { valid, comp, err } = errors[ 0 ];
|
|
21624
21695
|
|
|
21625
|
-
|
|
21696
|
+
// if not outdated already
|
|
21697
|
+
if (index === validateIndex) {
|
|
21698
|
+
err !== void 0 && console.error(err);
|
|
21626
21699
|
|
|
21627
|
-
|
|
21628
|
-
focus === true
|
|
21629
|
-
&& valid !== true
|
|
21630
|
-
&& typeof comp.focus === 'function'
|
|
21631
|
-
) {
|
|
21632
|
-
comp.focus();
|
|
21633
|
-
}
|
|
21700
|
+
emitEvent(false, comp);
|
|
21634
21701
|
|
|
21635
|
-
|
|
21702
|
+
if (
|
|
21703
|
+
focus === true
|
|
21704
|
+
&& valid !== true
|
|
21705
|
+
&& typeof comp.focus === 'function'
|
|
21706
|
+
) {
|
|
21707
|
+
comp.focus();
|
|
21636
21708
|
}
|
|
21637
21709
|
}
|
|
21638
|
-
|
|
21710
|
+
|
|
21711
|
+
return false
|
|
21712
|
+
})
|
|
21639
21713
|
}
|
|
21640
21714
|
|
|
21641
21715
|
function resetValidation () {
|
|
@@ -21649,8 +21723,11 @@
|
|
|
21649
21723
|
function submit (evt) {
|
|
21650
21724
|
evt !== void 0 && stopAndPrevent(evt);
|
|
21651
21725
|
|
|
21726
|
+
const index = validateIndex + 1;
|
|
21727
|
+
|
|
21652
21728
|
validate().then(val => {
|
|
21653
|
-
if
|
|
21729
|
+
// if not outdated && validation succeeded
|
|
21730
|
+
if (index === validateIndex && val === true) {
|
|
21654
21731
|
if (props.onSubmit !== void 0) {
|
|
21655
21732
|
emit('submit', evt);
|
|
21656
21733
|
}
|
|
@@ -39439,7 +39516,7 @@
|
|
|
39439
39516
|
});
|
|
39440
39517
|
|
|
39441
39518
|
var index_umd = {
|
|
39442
|
-
version: '2.5.
|
|
39519
|
+
version: '2.5.1',
|
|
39443
39520
|
install (app, opts) {
|
|
39444
39521
|
installQuasar(app, {
|
|
39445
39522
|
components,
|