quasar 2.14.1 → 2.14.3
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/api/Notify.json +2 -2
- 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/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.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/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.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/mdi-v7.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +2 -2
- 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-fontawesome-v6.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-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v7.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-TN.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-CH.umd.prod.js +1 -1
- package/dist/lang/de-DE.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/eu.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/hi.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/kk.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/mk.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/mm.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/sm.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/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.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.esm.js +153 -146
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +153 -146
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/web-types/web-types.json +1 -1
- package/package.json +2 -2
- package/src/components/ajax-bar/QAjaxBar.js +12 -2
- package/src/components/btn-dropdown/QBtnDropdown.js +4 -4
- package/src/components/color/QColor.js +5 -9
- package/src/components/date/QDate.js +1 -1
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/expansion-item/QExpansionItem.js +4 -3
- package/src/components/fab/QFab.js +4 -4
- package/src/components/icon/QIcon.js +3 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +1 -1
- package/src/components/menu/__tests__/QMenu.cy.js +24 -0
- package/src/components/range/QRange.js +8 -8
- package/src/components/resize-observer/QResizeObserver.js +3 -3
- package/src/components/slider/QSlider.js +2 -2
- package/src/components/slider/use-slider.js +14 -8
- package/src/components/tabs/use-tab.js +1 -1
- package/src/composables/private/use-field.js +13 -33
- package/src/composables/private/use-id.js +34 -0
- package/src/composables/private/use-validate.js +41 -35
- package/src/plugins/Dark.js +3 -27
- package/src/plugins/Notify.js +4 -3
- package/src/plugins/Notify.json +2 -2
- package/src/utils/copy-to-clipboard.js +0 -1
- package/src/utils/get-css-var.js +0 -1
- package/src/utils/is.js +0 -1
- package/src/utils/private/define-reactive-plugin.js +0 -1
- package/src/utils/private/global-config.js +0 -1
- package/src/utils/private/touch.js +0 -1
- package/src/utils/private/vm.js +0 -1
- package/src/utils/run-sequential-promises.js +0 -1
package/dist/quasar.sass
CHANGED
package/dist/quasar.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quasar Framework v2.14.
|
|
2
|
+
* Quasar Framework v2.14.3
|
|
3
3
|
* (c) 2015-present Razvan Stoenescu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -798,36 +798,13 @@
|
|
|
798
798
|
}
|
|
799
799
|
},
|
|
800
800
|
|
|
801
|
-
install ({ $q,
|
|
801
|
+
install ({ $q, ssrContext }) {
|
|
802
802
|
const { dark } = $q.config;
|
|
803
803
|
|
|
804
804
|
$q.dark = this;
|
|
805
805
|
|
|
806
|
-
if (this.__installed
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
this.isActive = dark === true;
|
|
811
|
-
|
|
812
|
-
const initialVal = dark !== void 0 ? dark : false;
|
|
813
|
-
|
|
814
|
-
if (isRuntimeSsrPreHydration.value === true) {
|
|
815
|
-
const ssrSet = val => {
|
|
816
|
-
this.__fromSSR = val;
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
const originalSet = this.set;
|
|
820
|
-
|
|
821
|
-
this.set = ssrSet;
|
|
822
|
-
ssrSet(initialVal);
|
|
823
|
-
|
|
824
|
-
onSSRHydrated.push(() => {
|
|
825
|
-
this.set = originalSet;
|
|
826
|
-
this.set(this.__fromSSR);
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
830
|
-
this.set(initialVal);
|
|
806
|
+
if (this.__installed !== true) {
|
|
807
|
+
this.set(dark !== void 0 ? dark : false);
|
|
831
808
|
}
|
|
832
809
|
}
|
|
833
810
|
});
|
|
@@ -1653,7 +1630,7 @@
|
|
|
1653
1630
|
}
|
|
1654
1631
|
|
|
1655
1632
|
var installQuasar = function (parentApp, opts = {}) {
|
|
1656
|
-
const $q = { version: '2.14.
|
|
1633
|
+
const $q = { version: '2.14.3' };
|
|
1657
1634
|
|
|
1658
1635
|
if (globalConfigIsFrozen === false) {
|
|
1659
1636
|
if (opts.config !== void 0) {
|
|
@@ -1917,13 +1894,23 @@
|
|
|
1917
1894
|
|
|
1918
1895
|
progress.value = 0;
|
|
1919
1896
|
|
|
1897
|
+
/**
|
|
1898
|
+
* We're trying to avoid side effects if start() is called inside a watchEffect()
|
|
1899
|
+
* so we're accessing the _value property directly (under the covers implementation detail of ref())
|
|
1900
|
+
*
|
|
1901
|
+
* Otherwise, any refs() accessed here would be marked as deps for the watchEffect()
|
|
1902
|
+
* -- and we are changing them below, which would cause an infinite loop
|
|
1903
|
+
*/
|
|
1904
|
+
|
|
1920
1905
|
timer = setTimeout(() => {
|
|
1921
1906
|
timer = null;
|
|
1922
1907
|
animate.value = true;
|
|
1923
1908
|
newSpeed > 0 && planNextStep();
|
|
1924
|
-
|
|
1909
|
+
// eslint-disable-next-line vue/no-ref-as-operand
|
|
1910
|
+
}, onScreen._value === true ? 500 : 1);
|
|
1925
1911
|
|
|
1926
|
-
|
|
1912
|
+
// eslint-disable-next-line vue/no-ref-as-operand
|
|
1913
|
+
if (onScreen._value !== true) {
|
|
1927
1914
|
onScreen.value = true;
|
|
1928
1915
|
animate.value = false;
|
|
1929
1916
|
}
|
|
@@ -2282,13 +2269,13 @@
|
|
|
2282
2269
|
}
|
|
2283
2270
|
|
|
2284
2271
|
if (type.value.img === true) {
|
|
2285
|
-
return vue.h(
|
|
2272
|
+
return vue.h(props.tag, data, hMergeSlot(slots.default, [
|
|
2286
2273
|
vue.h('img', { src: type.value.src })
|
|
2287
2274
|
]))
|
|
2288
2275
|
}
|
|
2289
2276
|
|
|
2290
2277
|
if (type.value.svg === true) {
|
|
2291
|
-
return vue.h(
|
|
2278
|
+
return vue.h(props.tag, data, hMergeSlot(slots.default, [
|
|
2292
2279
|
vue.h('svg', {
|
|
2293
2280
|
viewBox: type.value.viewBox || '0 0 24 24'
|
|
2294
2281
|
}, type.value.nodes)
|
|
@@ -2296,7 +2283,7 @@
|
|
|
2296
2283
|
}
|
|
2297
2284
|
|
|
2298
2285
|
if (type.value.svguse === true) {
|
|
2299
|
-
return vue.h(
|
|
2286
|
+
return vue.h(props.tag, data, hMergeSlot(slots.default, [
|
|
2300
2287
|
vue.h('svg', {
|
|
2301
2288
|
viewBox: type.value.viewBox
|
|
2302
2289
|
}, [
|
|
@@ -5864,6 +5851,35 @@
|
|
|
5864
5851
|
+ hexBytes[ b[ 14 ] ] + hexBytes[ b[ 15 ] ]
|
|
5865
5852
|
}
|
|
5866
5853
|
|
|
5854
|
+
function getId (val, requiredId) {
|
|
5855
|
+
return val === void 0
|
|
5856
|
+
? (requiredId === true ? `f_${ uid$3() }` : void 0)
|
|
5857
|
+
: val
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5860
|
+
/**
|
|
5861
|
+
* Returns an "id" which is a ref() that can be used as a unique identifier.
|
|
5862
|
+
* On SSR, it takes care of generating the id on the client side (only) to
|
|
5863
|
+
* avoid hydration errors.
|
|
5864
|
+
*/
|
|
5865
|
+
function useId (initialId, requiredId = true) {
|
|
5866
|
+
if (isRuntimeSsrPreHydration.value === true) {
|
|
5867
|
+
const id = vue.ref(initialId);
|
|
5868
|
+
|
|
5869
|
+
if (requiredId === true && initialId === void 0) {
|
|
5870
|
+
vue.onMounted(() => {
|
|
5871
|
+
id.value = `f_${ uid$3() }`; // getId(void 0, true)
|
|
5872
|
+
});
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
return id
|
|
5876
|
+
}
|
|
5877
|
+
|
|
5878
|
+
return vue.ref(
|
|
5879
|
+
getId(initialId, requiredId)
|
|
5880
|
+
)
|
|
5881
|
+
}
|
|
5882
|
+
|
|
5867
5883
|
const btnPropsList = Object.keys(useBtnProps);
|
|
5868
5884
|
|
|
5869
5885
|
const passBtnProps = props => btnPropsList.reduce(
|
|
@@ -5921,13 +5937,13 @@
|
|
|
5921
5937
|
|
|
5922
5938
|
const showing = vue.ref(props.modelValue);
|
|
5923
5939
|
const menuRef = vue.ref(null);
|
|
5924
|
-
const targetUid =
|
|
5940
|
+
const targetUid = useId();
|
|
5925
5941
|
|
|
5926
5942
|
const ariaAttrs = vue.computed(() => {
|
|
5927
5943
|
const acc = {
|
|
5928
5944
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
5929
5945
|
'aria-haspopup': 'true',
|
|
5930
|
-
'aria-controls': targetUid,
|
|
5946
|
+
'aria-controls': targetUid.value,
|
|
5931
5947
|
'aria-label': props.toggleAriaLabel || proxy.$q.lang.label[ showing.value === true ? 'collapse' : 'expand' ](props.label)
|
|
5932
5948
|
};
|
|
5933
5949
|
|
|
@@ -6021,7 +6037,7 @@
|
|
|
6021
6037
|
props.disableDropdown !== true && Arrow.push(
|
|
6022
6038
|
vue.h(QMenu, {
|
|
6023
6039
|
ref: menuRef,
|
|
6024
|
-
id: targetUid,
|
|
6040
|
+
id: targetUid.value,
|
|
6025
6041
|
class: props.contentClass,
|
|
6026
6042
|
style: props.contentStyle,
|
|
6027
6043
|
cover: props.cover,
|
|
@@ -8837,8 +8853,16 @@
|
|
|
8837
8853
|
&& innerMin.value < innerMax.value
|
|
8838
8854
|
));
|
|
8839
8855
|
|
|
8840
|
-
const
|
|
8841
|
-
|
|
8856
|
+
const roundValueFn = vue.computed(() => {
|
|
8857
|
+
if (props.step === 0) {
|
|
8858
|
+
return v => v
|
|
8859
|
+
}
|
|
8860
|
+
|
|
8861
|
+
const decimals = (String(props.step).trim().split('.')[ 1 ] || '').length;
|
|
8862
|
+
return v => parseFloat(v.toFixed(decimals))
|
|
8863
|
+
});
|
|
8864
|
+
|
|
8865
|
+
const keyStep = vue.computed(() => (props.step === 0 ? 1 : props.step));
|
|
8842
8866
|
const tabindex = vue.computed(() => (editable.value === true ? props.tabindex || 0 : -1));
|
|
8843
8867
|
|
|
8844
8868
|
const trackLen = vue.computed(() => props.max - props.min);
|
|
@@ -8950,9 +8974,7 @@
|
|
|
8950
8974
|
model += (Math.abs(modulo) >= step / 2 ? (modulo < 0 ? -1 : 1) * step : 0) - modulo;
|
|
8951
8975
|
}
|
|
8952
8976
|
|
|
8953
|
-
|
|
8954
|
-
model = parseFloat(model.toFixed(decimals.value));
|
|
8955
|
-
}
|
|
8977
|
+
model = roundValueFn.value(model);
|
|
8956
8978
|
|
|
8957
8979
|
return between(model, innerMin.value, innerMax.value)
|
|
8958
8980
|
}
|
|
@@ -8978,7 +9000,7 @@
|
|
|
8978
9000
|
}
|
|
8979
9001
|
|
|
8980
9002
|
const markerStep = vue.computed(() => (
|
|
8981
|
-
isNumber(props.markers) === true ? props.markers :
|
|
9003
|
+
isNumber(props.markers) === true ? props.markers : keyStep.value)
|
|
8982
9004
|
);
|
|
8983
9005
|
|
|
8984
9006
|
const markerTicks = vue.computed(() => {
|
|
@@ -9338,8 +9360,8 @@
|
|
|
9338
9360
|
tabindex,
|
|
9339
9361
|
attributes,
|
|
9340
9362
|
|
|
9341
|
-
|
|
9342
|
-
|
|
9363
|
+
roundValueFn,
|
|
9364
|
+
keyStep,
|
|
9343
9365
|
trackLen,
|
|
9344
9366
|
innerMin,
|
|
9345
9367
|
innerMinRatio,
|
|
@@ -9485,7 +9507,7 @@
|
|
|
9485
9507
|
stopAndPrevent(evt);
|
|
9486
9508
|
|
|
9487
9509
|
const
|
|
9488
|
-
stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.
|
|
9510
|
+
stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.keyStep.value,
|
|
9489
9511
|
offset = (
|
|
9490
9512
|
([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1)
|
|
9491
9513
|
* (state.isReversed.value === true ? -1 : 1)
|
|
@@ -9493,7 +9515,7 @@
|
|
|
9493
9515
|
);
|
|
9494
9516
|
|
|
9495
9517
|
model.value = between(
|
|
9496
|
-
|
|
9518
|
+
state.roundValueFn.value(model.value + offset),
|
|
9497
9519
|
state.innerMin.value,
|
|
9498
9520
|
state.innerMax.value
|
|
9499
9521
|
);
|
|
@@ -9582,6 +9604,9 @@
|
|
|
9582
9604
|
|
|
9583
9605
|
const { proxy } = vue.getCurrentInstance();
|
|
9584
9606
|
|
|
9607
|
+
// expose public method
|
|
9608
|
+
proxy.trigger = trigger;
|
|
9609
|
+
|
|
9585
9610
|
if (hasObserver === true) {
|
|
9586
9611
|
let observer;
|
|
9587
9612
|
|
|
@@ -9655,9 +9680,6 @@
|
|
|
9655
9680
|
|
|
9656
9681
|
vue.onBeforeUnmount(cleanup);
|
|
9657
9682
|
|
|
9658
|
-
// expose public method
|
|
9659
|
-
proxy.trigger = trigger;
|
|
9660
|
-
|
|
9661
9683
|
return () => {
|
|
9662
9684
|
if (canRender.value === true) {
|
|
9663
9685
|
return vue.h('object', {
|
|
@@ -10502,7 +10524,7 @@
|
|
|
10502
10524
|
if (
|
|
10503
10525
|
hardError === void 0 && (
|
|
10504
10526
|
softError === void 0
|
|
10505
|
-
|| softError.message.startsWith('Avoided redundant navigation') === true
|
|
10527
|
+
|| (softError.message !== void 0 && softError.message.startsWith('Avoided redundant navigation') === true)
|
|
10506
10528
|
)
|
|
10507
10529
|
) {
|
|
10508
10530
|
$tabs.updateModel({ name: props.name });
|
|
@@ -11179,15 +11201,11 @@
|
|
|
11179
11201
|
+ (isDark.value === true ? ' q-color-picker--dark q-dark' : '')
|
|
11180
11202
|
);
|
|
11181
11203
|
|
|
11182
|
-
const attributes = vue.computed(() =>
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
return { 'aria-readonly': 'true' }
|
|
11188
|
-
}
|
|
11189
|
-
return {}
|
|
11190
|
-
});
|
|
11204
|
+
const attributes = vue.computed(() => (
|
|
11205
|
+
props.disable === true
|
|
11206
|
+
? { 'aria-disabled': 'true' }
|
|
11207
|
+
: {}
|
|
11208
|
+
));
|
|
11191
11209
|
|
|
11192
11210
|
const spectrumDirective = vue.computed(() => {
|
|
11193
11211
|
// if editable.value === true
|
|
@@ -13897,7 +13915,7 @@
|
|
|
13897
13915
|
const attributes = vue.computed(() => (
|
|
13898
13916
|
props.disable === true
|
|
13899
13917
|
? { 'aria-disabled': 'true' }
|
|
13900
|
-
:
|
|
13918
|
+
: {}
|
|
13901
13919
|
));
|
|
13902
13920
|
|
|
13903
13921
|
vue.watch(() => props.modelValue, v => {
|
|
@@ -17545,7 +17563,7 @@
|
|
|
17545
17563
|
const attributes = vue.computed(() => (
|
|
17546
17564
|
props.disable === true
|
|
17547
17565
|
? { 'aria-disabled': 'true' }
|
|
17548
|
-
:
|
|
17566
|
+
: {}
|
|
17549
17567
|
));
|
|
17550
17568
|
|
|
17551
17569
|
function onInput () {
|
|
@@ -18072,7 +18090,7 @@
|
|
|
18072
18090
|
);
|
|
18073
18091
|
|
|
18074
18092
|
const blurTargetRef = vue.ref(null);
|
|
18075
|
-
const targetUid =
|
|
18093
|
+
const targetUid = useId();
|
|
18076
18094
|
|
|
18077
18095
|
const { show, hide, toggle } = useModelToggle({ showing });
|
|
18078
18096
|
|
|
@@ -18140,7 +18158,7 @@
|
|
|
18140
18158
|
return {
|
|
18141
18159
|
role: 'button',
|
|
18142
18160
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
18143
|
-
'aria-controls': targetUid,
|
|
18161
|
+
'aria-controls': targetUid.value,
|
|
18144
18162
|
'aria-label': toggleAriaLabel
|
|
18145
18163
|
}
|
|
18146
18164
|
});
|
|
@@ -18317,7 +18335,7 @@
|
|
|
18317
18335
|
key: 'e-content',
|
|
18318
18336
|
class: 'q-expansion-item__content relative-position',
|
|
18319
18337
|
style: contentStyle.value,
|
|
18320
|
-
id: targetUid
|
|
18338
|
+
id: targetUid.value
|
|
18321
18339
|
}, hSlot(slots.default)),
|
|
18322
18340
|
[ [
|
|
18323
18341
|
vue.vShow,
|
|
@@ -18492,7 +18510,7 @@
|
|
|
18492
18510
|
setup (props, { slots }) {
|
|
18493
18511
|
const triggerRef = vue.ref(null);
|
|
18494
18512
|
const showing = vue.ref(props.modelValue === true);
|
|
18495
|
-
const targetUid =
|
|
18513
|
+
const targetUid = useId();
|
|
18496
18514
|
|
|
18497
18515
|
const { proxy: { $q } } = vue.getCurrentInstance();
|
|
18498
18516
|
const { formClass, labelProps } = useFab(props, showing);
|
|
@@ -18520,7 +18538,7 @@
|
|
|
18520
18538
|
|
|
18521
18539
|
const actionAttrs = vue.computed(() => {
|
|
18522
18540
|
const attrs = {
|
|
18523
|
-
id: targetUid,
|
|
18541
|
+
id: targetUid.value,
|
|
18524
18542
|
role: 'menu'
|
|
18525
18543
|
};
|
|
18526
18544
|
|
|
@@ -18592,7 +18610,7 @@
|
|
|
18592
18610
|
fab: true,
|
|
18593
18611
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
18594
18612
|
'aria-haspopup': 'true',
|
|
18595
|
-
'aria-controls': targetUid,
|
|
18613
|
+
'aria-controls': targetUid.value,
|
|
18596
18614
|
onClick: toggle
|
|
18597
18615
|
}, getTriggerContent),
|
|
18598
18616
|
|
|
@@ -18744,6 +18762,7 @@
|
|
|
18744
18762
|
reactiveRules: Boolean,
|
|
18745
18763
|
lazyRules: {
|
|
18746
18764
|
type: [ Boolean, String ],
|
|
18765
|
+
default: false, // statement unneeded but avoids future vue implementation changes
|
|
18747
18766
|
validator: v => lazyRulesValues.includes(v)
|
|
18748
18767
|
}
|
|
18749
18768
|
};
|
|
@@ -18753,7 +18772,7 @@
|
|
|
18753
18772
|
|
|
18754
18773
|
const innerError = vue.ref(false);
|
|
18755
18774
|
const innerErrorMessage = vue.ref(null);
|
|
18756
|
-
const isDirtyModel = vue.ref(
|
|
18775
|
+
const isDirtyModel = vue.ref(false);
|
|
18757
18776
|
|
|
18758
18777
|
useFormChild({ validate, resetValidation });
|
|
18759
18778
|
|
|
@@ -18765,10 +18784,14 @@
|
|
|
18765
18784
|
&& props.rules.length !== 0
|
|
18766
18785
|
);
|
|
18767
18786
|
|
|
18768
|
-
const
|
|
18787
|
+
const canDebounceValidate = vue.computed(() => (
|
|
18769
18788
|
props.disable !== true
|
|
18770
18789
|
&& hasRules.value === true
|
|
18771
|
-
|
|
18790
|
+
// Should not have a validation in progress already;
|
|
18791
|
+
// It might mean that focus switched to submit btn and
|
|
18792
|
+
// QForm's submit() has been called already (ENTER key)
|
|
18793
|
+
&& innerLoading.value === false
|
|
18794
|
+
));
|
|
18772
18795
|
|
|
18773
18796
|
const hasError = vue.computed(() =>
|
|
18774
18797
|
props.error === true || innerError.value === true
|
|
@@ -18781,15 +18804,31 @@
|
|
|
18781
18804
|
));
|
|
18782
18805
|
|
|
18783
18806
|
vue.watch(() => props.modelValue, () => {
|
|
18784
|
-
|
|
18807
|
+
isDirtyModel.value = true;
|
|
18808
|
+
|
|
18809
|
+
if (
|
|
18810
|
+
canDebounceValidate.value === true
|
|
18811
|
+
// trigger validation if not using any kind of lazy-rules
|
|
18812
|
+
&& props.lazyRules === false
|
|
18813
|
+
) {
|
|
18814
|
+
debouncedValidate();
|
|
18815
|
+
}
|
|
18785
18816
|
});
|
|
18786
18817
|
|
|
18818
|
+
function onRulesChange () {
|
|
18819
|
+
if (
|
|
18820
|
+
props.lazyRules !== 'ondemand'
|
|
18821
|
+
&& canDebounceValidate.value === true
|
|
18822
|
+
&& isDirtyModel.value === true
|
|
18823
|
+
) {
|
|
18824
|
+
debouncedValidate();
|
|
18825
|
+
}
|
|
18826
|
+
}
|
|
18827
|
+
|
|
18787
18828
|
vue.watch(() => props.reactiveRules, val => {
|
|
18788
18829
|
if (val === true) {
|
|
18789
18830
|
if (unwatchRules === void 0) {
|
|
18790
|
-
unwatchRules = vue.watch(() => props.rules,
|
|
18791
|
-
validateIfNeeded(true);
|
|
18792
|
-
});
|
|
18831
|
+
unwatchRules = vue.watch(() => props.rules, onRulesChange, { immediate: true, deep: true });
|
|
18793
18832
|
}
|
|
18794
18833
|
}
|
|
18795
18834
|
else if (unwatchRules !== void 0) {
|
|
@@ -18798,32 +18837,24 @@
|
|
|
18798
18837
|
}
|
|
18799
18838
|
}, { immediate: true });
|
|
18800
18839
|
|
|
18840
|
+
vue.watch(() => props.lazyRules, onRulesChange);
|
|
18841
|
+
|
|
18801
18842
|
vue.watch(focused, val => {
|
|
18802
18843
|
if (val === true) {
|
|
18803
|
-
if (isDirtyModel.value === null) {
|
|
18804
|
-
isDirtyModel.value = false;
|
|
18805
|
-
}
|
|
18806
|
-
}
|
|
18807
|
-
else if (isDirtyModel.value === false) {
|
|
18808
18844
|
isDirtyModel.value = true;
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
// QForm's submit() has been called already (ENTER key)
|
|
18816
|
-
&& innerLoading.value === false
|
|
18817
|
-
) {
|
|
18818
|
-
debouncedValidate();
|
|
18819
|
-
}
|
|
18845
|
+
}
|
|
18846
|
+
else if (
|
|
18847
|
+
canDebounceValidate.value === true
|
|
18848
|
+
&& props.lazyRules !== 'ondemand'
|
|
18849
|
+
) {
|
|
18850
|
+
debouncedValidate();
|
|
18820
18851
|
}
|
|
18821
18852
|
});
|
|
18822
18853
|
|
|
18823
18854
|
function resetValidation () {
|
|
18824
18855
|
validateIndex++;
|
|
18825
18856
|
innerLoading.value = false;
|
|
18826
|
-
isDirtyModel.value =
|
|
18857
|
+
isDirtyModel.value = false;
|
|
18827
18858
|
innerError.value = false;
|
|
18828
18859
|
innerErrorMessage.value = null;
|
|
18829
18860
|
debouncedValidate.cancel();
|
|
@@ -18836,7 +18867,10 @@
|
|
|
18836
18867
|
* - Promise (pending async validation)
|
|
18837
18868
|
*/
|
|
18838
18869
|
function validate (val = props.modelValue) {
|
|
18839
|
-
if (
|
|
18870
|
+
if (
|
|
18871
|
+
props.disable === true
|
|
18872
|
+
|| hasRules.value === false
|
|
18873
|
+
) {
|
|
18840
18874
|
return true
|
|
18841
18875
|
}
|
|
18842
18876
|
|
|
@@ -18905,16 +18939,6 @@
|
|
|
18905
18939
|
)
|
|
18906
18940
|
}
|
|
18907
18941
|
|
|
18908
|
-
function validateIfNeeded (changedRules) {
|
|
18909
|
-
if (
|
|
18910
|
-
hasActiveRules.value === true
|
|
18911
|
-
&& props.lazyRules !== 'ondemand'
|
|
18912
|
-
&& (isDirtyModel.value === true || (props.lazyRules !== true && changedRules !== true))
|
|
18913
|
-
) {
|
|
18914
|
-
debouncedValidate();
|
|
18915
|
-
}
|
|
18916
|
-
}
|
|
18917
|
-
|
|
18918
18942
|
const debouncedValidate = debounce(validate, 0);
|
|
18919
18943
|
|
|
18920
18944
|
vue.onBeforeUnmount(() => {
|
|
@@ -18937,12 +18961,6 @@
|
|
|
18937
18961
|
}
|
|
18938
18962
|
}
|
|
18939
18963
|
|
|
18940
|
-
function getTargetUid (val, requiredForAttr) {
|
|
18941
|
-
return val === void 0
|
|
18942
|
-
? (requiredForAttr === true ? `f_${ uid$3() }` : void 0)
|
|
18943
|
-
: val
|
|
18944
|
-
}
|
|
18945
|
-
|
|
18946
18964
|
function fieldValueIsFilled (val) {
|
|
18947
18965
|
return val !== void 0
|
|
18948
18966
|
&& val !== null
|
|
@@ -19003,6 +19021,7 @@
|
|
|
19003
19021
|
const { props, attrs, proxy, vnode } = vue.getCurrentInstance();
|
|
19004
19022
|
|
|
19005
19023
|
const isDark = useDark(props, proxy.$q);
|
|
19024
|
+
const targetUid = useId(props.for, requiredForAttr);
|
|
19006
19025
|
|
|
19007
19026
|
return {
|
|
19008
19027
|
requiredForAttr,
|
|
@@ -19021,9 +19040,7 @@
|
|
|
19021
19040
|
hasPopupOpen: false,
|
|
19022
19041
|
|
|
19023
19042
|
splitAttrs: useSplitAttrs(attrs, vnode),
|
|
19024
|
-
targetUid
|
|
19025
|
-
getTargetUid(props.for, requiredForAttr)
|
|
19026
|
-
),
|
|
19043
|
+
targetUid,
|
|
19027
19044
|
|
|
19028
19045
|
rootRef: vue.ref(null),
|
|
19029
19046
|
targetRef: vue.ref(null),
|
|
@@ -19175,16 +19192,15 @@
|
|
|
19175
19192
|
}));
|
|
19176
19193
|
|
|
19177
19194
|
const attributes = vue.computed(() => {
|
|
19178
|
-
const acc = {
|
|
19179
|
-
|
|
19180
|
-
|
|
19195
|
+
const acc = {};
|
|
19196
|
+
|
|
19197
|
+
if (state.targetUid.value) {
|
|
19198
|
+
acc.for = state.targetUid.value;
|
|
19199
|
+
}
|
|
19181
19200
|
|
|
19182
19201
|
if (props.disable === true) {
|
|
19183
19202
|
acc[ 'aria-disabled' ] = 'true';
|
|
19184
19203
|
}
|
|
19185
|
-
else if (props.readonly === true) {
|
|
19186
|
-
acc[ 'aria-readonly' ] = 'true';
|
|
19187
|
-
}
|
|
19188
19204
|
|
|
19189
19205
|
return acc
|
|
19190
19206
|
});
|
|
@@ -19192,7 +19208,7 @@
|
|
|
19192
19208
|
vue.watch(() => props.for, val => {
|
|
19193
19209
|
// don't transform targetUid into a computed
|
|
19194
19210
|
// prop as it will break SSR
|
|
19195
|
-
state.targetUid.value =
|
|
19211
|
+
state.targetUid.value = getId(val, state.requiredForAttr);
|
|
19196
19212
|
});
|
|
19197
19213
|
|
|
19198
19214
|
function focusHandler () {
|
|
@@ -19268,7 +19284,7 @@
|
|
|
19268
19284
|
document.activeElement.blur();
|
|
19269
19285
|
}
|
|
19270
19286
|
|
|
19271
|
-
if (props.type === 'file') {
|
|
19287
|
+
if (props.type === 'file') {
|
|
19272
19288
|
// do not let focus be triggered
|
|
19273
19289
|
// as it will make the native file dialog
|
|
19274
19290
|
// appear for another selection
|
|
@@ -19279,11 +19295,9 @@
|
|
|
19279
19295
|
emit('clear', props.modelValue);
|
|
19280
19296
|
|
|
19281
19297
|
vue.nextTick(() => {
|
|
19298
|
+
const isDirty = isDirtyModel.value;
|
|
19282
19299
|
resetValidation();
|
|
19283
|
-
|
|
19284
|
-
if ($q.platform.is.mobile !== true) {
|
|
19285
|
-
isDirtyModel.value = false;
|
|
19286
|
-
}
|
|
19300
|
+
isDirtyModel.value = isDirty;
|
|
19287
19301
|
});
|
|
19288
19302
|
}
|
|
19289
19303
|
|
|
@@ -19476,16 +19490,8 @@
|
|
|
19476
19490
|
shouldActivate === true && props.autofocus === true && proxy.focus();
|
|
19477
19491
|
});
|
|
19478
19492
|
|
|
19479
|
-
vue.onMounted(() => {
|
|
19480
|
-
|
|
19481
|
-
isRuntimeSsrPreHydration.value === true
|
|
19482
|
-
&& state.requiredForAttr === true
|
|
19483
|
-
&& props.for === void 0
|
|
19484
|
-
) {
|
|
19485
|
-
state.targetUid.value = `f_${ uid$3() }`; // getTargetUid(void 0, true)
|
|
19486
|
-
}
|
|
19487
|
-
|
|
19488
|
-
props.autofocus === true && proxy.focus();
|
|
19493
|
+
props.autofocus === true && vue.onMounted(() => {
|
|
19494
|
+
proxy.focus();
|
|
19489
19495
|
});
|
|
19490
19496
|
|
|
19491
19497
|
vue.onBeforeUnmount(() => {
|
|
@@ -21264,7 +21270,7 @@
|
|
|
21264
21270
|
const vm = vue.getCurrentInstance();
|
|
21265
21271
|
Object.assign(vm.proxy, {
|
|
21266
21272
|
poll: () => { poll !== void 0 && poll(); },
|
|
21267
|
-
trigger, stop, reset, resume, setIndex
|
|
21273
|
+
trigger, stop, reset, resume, setIndex, updateScrollTarget
|
|
21268
21274
|
});
|
|
21269
21275
|
|
|
21270
21276
|
return () => {
|
|
@@ -25613,15 +25619,15 @@
|
|
|
25613
25619
|
case dragType.RANGE:
|
|
25614
25620
|
const
|
|
25615
25621
|
ratioDelta = ratio - dragging.offsetRatio,
|
|
25616
|
-
minR = between(dragging.ratioMin + ratioDelta,
|
|
25622
|
+
minR = between(dragging.ratioMin + ratioDelta, state.innerMinRatio.value, state.innerMaxRatio.value - dragging.rangeRatio),
|
|
25617
25623
|
modelDelta = localModel - dragging.offsetModel,
|
|
25618
|
-
min = between(dragging.valueMin + modelDelta,
|
|
25624
|
+
min = between(dragging.valueMin + modelDelta, state.innerMin.value, state.innerMax.value - dragging.rangeValue);
|
|
25619
25625
|
|
|
25620
25626
|
pos = {
|
|
25621
25627
|
minR,
|
|
25622
25628
|
maxR: minR + dragging.rangeRatio,
|
|
25623
|
-
min:
|
|
25624
|
-
max:
|
|
25629
|
+
min: state.roundValueFn.value(min),
|
|
25630
|
+
max: state.roundValueFn.value(min + dragging.rangeValue)
|
|
25625
25631
|
};
|
|
25626
25632
|
|
|
25627
25633
|
state.focus.value = 'both';
|
|
@@ -25651,7 +25657,7 @@
|
|
|
25651
25657
|
stopAndPrevent(evt);
|
|
25652
25658
|
|
|
25653
25659
|
const
|
|
25654
|
-
stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.
|
|
25660
|
+
stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.keyStep.value,
|
|
25655
25661
|
offset = (
|
|
25656
25662
|
([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1)
|
|
25657
25663
|
* (state.isReversed.value === true ? -1 : 1)
|
|
@@ -25661,14 +25667,14 @@
|
|
|
25661
25667
|
if (state.focus.value === 'both') {
|
|
25662
25668
|
const interval = model.value.max - model.value.min;
|
|
25663
25669
|
const min = between(
|
|
25664
|
-
|
|
25670
|
+
state.roundValueFn.value(model.value.min + offset),
|
|
25665
25671
|
state.innerMin.value,
|
|
25666
25672
|
state.innerMax.value - interval
|
|
25667
25673
|
);
|
|
25668
25674
|
|
|
25669
25675
|
model.value = {
|
|
25670
25676
|
min,
|
|
25671
|
-
max:
|
|
25677
|
+
max: state.roundValueFn.value(min + interval)
|
|
25672
25678
|
};
|
|
25673
25679
|
}
|
|
25674
25680
|
else if (state.focus.value === false) {
|
|
@@ -25680,7 +25686,7 @@
|
|
|
25680
25686
|
model.value = {
|
|
25681
25687
|
...model.value,
|
|
25682
25688
|
[ which ]: between(
|
|
25683
|
-
|
|
25689
|
+
state.roundValueFn.value(model.value[ which ] + offset),
|
|
25684
25690
|
which === 'min' ? state.innerMin.value : model.value.min,
|
|
25685
25691
|
which === 'max' ? state.innerMax.value : model.value.max
|
|
25686
25692
|
)
|
|
@@ -39816,6 +39822,7 @@
|
|
|
39816
39822
|
const positionClass = {};
|
|
39817
39823
|
const emptyRE = /^\s*$/;
|
|
39818
39824
|
const notifRefs = [];
|
|
39825
|
+
const invalidTimeoutValues = [ void 0, null, true, false, '' ];
|
|
39819
39826
|
|
|
39820
39827
|
const positionList = [
|
|
39821
39828
|
'top-left', 'top-right',
|
|
@@ -39909,15 +39916,15 @@
|
|
|
39909
39916
|
notif.position = 'bottom';
|
|
39910
39917
|
}
|
|
39911
39918
|
|
|
39912
|
-
if (notif.timeout ===
|
|
39919
|
+
if (invalidTimeoutValues.includes(notif.timeout) === true) {
|
|
39913
39920
|
notif.timeout = 5000;
|
|
39914
39921
|
}
|
|
39915
39922
|
else {
|
|
39916
|
-
const t =
|
|
39923
|
+
const t = Number(notif.timeout); // we catch exponential notation too with Number() casting
|
|
39917
39924
|
if (isNaN(t) || t < 0) {
|
|
39918
39925
|
return logError('wrong timeout', config)
|
|
39919
39926
|
}
|
|
39920
|
-
notif.timeout = t;
|
|
39927
|
+
notif.timeout = Number.isFinite(t) ? t : 0;
|
|
39921
39928
|
}
|
|
39922
39929
|
|
|
39923
39930
|
if (notif.timeout === 0) {
|
|
@@ -41041,7 +41048,7 @@
|
|
|
41041
41048
|
*/
|
|
41042
41049
|
|
|
41043
41050
|
var index_umd = {
|
|
41044
|
-
version: '2.14.
|
|
41051
|
+
version: '2.14.3',
|
|
41045
41052
|
install (app, opts) {
|
|
41046
41053
|
installQuasar(app, {
|
|
41047
41054
|
components,
|