quasar 2.4.12 → 2.5.2
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/BottomSheet.json +4 -0
- package/dist/api/Dialog.json +5 -1
- package/dist/api/Notify.json +20 -10
- package/dist/api/QBtnDropdown.json +4 -2
- package/dist/api/QCheckbox.json +27 -0
- package/dist/api/QEditor.json +4 -2
- package/dist/api/QExpansionItem.json +6 -3
- package/dist/api/QFab.json +4 -2
- package/dist/api/QFabAction.json +4 -2
- package/dist/api/QFile.json +4 -2
- package/dist/api/QImg.json +1 -2
- package/dist/api/QInnerLoading.json +2 -1
- package/dist/api/QInput.json +4 -2
- package/dist/api/QPagination.json +4 -2
- package/dist/api/QRadio.json +18 -0
- package/dist/api/QRange.json +9 -0
- package/dist/api/QScrollArea.json +13 -5
- package/dist/api/QSelect.json +6 -3
- package/dist/api/QSlider.json +9 -0
- package/dist/api/QSplitter.json +8 -4
- package/dist/api/QTable.json +9 -0
- package/dist/api/QTime.json +8 -2
- package/dist/api/QToggle.json +24 -24
- 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 +38 -10
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +55 -23
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +31 -11
- package/dist/quasar.umd.js +313 -163
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/transforms/auto-import.json +39 -3
- package/dist/transforms/import-map.json +18 -0
- package/dist/types/api/slider.d.ts +6 -7
- package/dist/types/api/vue-prop-types.ts +15 -0
- package/dist/types/api.d.ts +1 -0
- package/dist/types/index.d.ts +110 -184
- package/dist/types/utils/date.d.ts +25 -13
- package/dist/types/utils/dom.d.ts +4 -2
- package/dist/types/utils.d.ts +3 -1
- package/dist/vetur/quasar-attributes.json +62 -42
- package/dist/vetur/quasar-tags.json +8 -3
- package/dist/web-types/web-types.json +103 -58
- package/package.json +13 -3
- package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
- package/src/components/badge/__tests__/QBadge.spec.js +74 -0
- package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
- package/src/components/btn/__tests__/QBtn.spec.js +55 -0
- package/src/components/btn/__tests__/use-btn.spec.js +189 -0
- package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
- package/src/components/checkbox/QCheckbox.js +34 -3
- package/src/components/checkbox/QCheckbox.json +17 -0
- package/src/components/checkbox/QCheckbox.sass +17 -5
- package/src/components/checkbox/use-checkbox.js +4 -0
- package/src/components/checkbox/use-checkbox.json +18 -0
- package/src/components/chip/__tests__/QChip.spec.js +155 -0
- package/src/components/date/__tests__/QDate.spec.js +189 -0
- package/src/components/date/__tests__/use-datetime.spec.js +83 -0
- package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
- package/src/components/editor/QEditor.json +3 -1
- package/src/components/editor/__tests__/QEditor.spec.js +195 -0
- package/src/components/expansion-item/QExpansionItem.json +6 -3
- package/src/components/fab/use-fab.json +4 -2
- package/src/components/field/QField.sass +2 -0
- package/src/components/file/QFile.json +4 -2
- package/src/components/form/QForm.js +26 -24
- package/src/components/img/QImg.json +2 -3
- package/src/components/inner-loading/QInnerLoading.json +2 -1
- package/src/components/input/QInput.js +9 -0
- package/src/components/input/QInput.json +4 -2
- package/src/components/input/__tests__/QInput.spec.js +105 -0
- package/src/components/input/__tests__/use-mask.spec.js +29 -0
- package/src/components/menu/__tests__/QMenu.spec.js +610 -0
- package/src/components/menu/__tests__/WrapperOne.vue +51 -0
- package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
- package/src/components/pagination/QPagination.json +4 -2
- package/src/components/radio/QRadio.js +26 -1
- package/src/components/radio/QRadio.json +16 -0
- package/src/components/radio/QRadio.sass +17 -6
- package/src/components/scroll-area/QScrollArea.json +13 -5
- package/src/components/select/QSelect.js +1 -1
- package/src/components/select/QSelect.json +6 -3
- package/src/components/select/__tests__/QSelect.spec.js +2003 -0
- package/src/components/select/__tests__/WrapperOne.vue +28 -0
- package/src/components/slider/use-slider.json +9 -0
- package/src/components/splitter/QSplitter.json +8 -4
- package/src/components/stepper/QStep.js +1 -1
- package/src/components/table/QTable.json +9 -0
- package/src/components/table/__tests__/QTable.spec.js +635 -0
- package/src/components/table/__tests__/QTd.spec.js +35 -0
- package/src/components/table/__tests__/QTh.spec.js +27 -0
- package/src/components/table/__tests__/QTr.spec.js +27 -0
- package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
- package/src/components/tabs/__tests__/QTab.spec.js +79 -0
- package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
- package/src/components/time/QTime.json +2 -2
- package/src/components/toggle/QToggle.js +5 -13
- package/src/components/toggle/QToggle.json +3 -12
- package/src/components/tree/QTree.js +39 -41
- package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
- package/src/components/virtual-scroll/use-virtual-scroll.js +6 -4
- package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
- package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
- package/src/composables/private/__tests__/use-field.spec.js +351 -0
- package/src/composables/private/__tests__/use-file.spec.js +69 -0
- package/src/composables/private/__tests__/use-form.spec.js +11 -0
- package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
- package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
- package/src/composables/private/__tests__/use-portal.spec.js +4 -0
- package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
- package/src/composables/private/__tests__/use-size.spec.js +37 -0
- package/src/composables/private/__tests__/use-transition.spec.js +108 -0
- package/src/composables/private/__tests__/use-validate.spec.js +111 -0
- package/src/composables/private/use-fullscreen.js +1 -1
- package/src/composables/private/use-model-toggle.js +1 -1
- package/src/composables/private/use-validate.js +22 -22
- package/src/plugins/BottomSheet.json +1 -0
- package/src/plugins/Dialog.json +1 -0
- package/src/plugins/Meta.js +1 -1
- package/src/plugins/Notify.json +20 -10
- package/src/plugins/Screen.js +15 -9
- package/src/utils/date.js +111 -32
- package/src/utils/private/global-dialog.json +3 -0
- package/src/utils/private/vm.js +14 -8
package/dist/quasar.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quasar Framework v2.
|
|
2
|
+
* Quasar Framework v2.5.2
|
|
3
3
|
* (c) 2015-present Razvan Stoenescu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -633,12 +633,22 @@
|
|
|
633
633
|
return
|
|
634
634
|
}
|
|
635
635
|
|
|
636
|
+
const { visualViewport } = window;
|
|
637
|
+
const target = visualViewport || window;
|
|
638
|
+
const getSize = visualViewport === void 0 || client.is.mobile === true
|
|
639
|
+
? () => [
|
|
640
|
+
Math.max(window.innerWidth, document.scrollingElement.clientWidth),
|
|
641
|
+
Math.max(window.innerHeight, document.scrollingElement.clientHeight)
|
|
642
|
+
]
|
|
643
|
+
: () => [
|
|
644
|
+
visualViewport.width * visualViewport.scale + window.innerWidth - document.scrollingElement.clientWidth,
|
|
645
|
+
visualViewport.height * visualViewport.scale + window.innerHeight - document.scrollingElement.clientHeight
|
|
646
|
+
];
|
|
647
|
+
|
|
636
648
|
const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true;
|
|
637
649
|
|
|
638
650
|
this.__update = force => {
|
|
639
|
-
const
|
|
640
|
-
w = window.innerWidth,
|
|
641
|
-
h = window.innerHeight;
|
|
651
|
+
const [ w, h ] = getSize();
|
|
642
652
|
|
|
643
653
|
if (h !== this.height) {
|
|
644
654
|
this.height = h;
|
|
@@ -696,11 +706,7 @@
|
|
|
696
706
|
};
|
|
697
707
|
|
|
698
708
|
const start = () => {
|
|
699
|
-
const
|
|
700
|
-
style = getComputedStyle(document.body),
|
|
701
|
-
target = window.visualViewport !== void 0
|
|
702
|
-
? window.visualViewport
|
|
703
|
-
: window;
|
|
709
|
+
const style = getComputedStyle(document.body);
|
|
704
710
|
|
|
705
711
|
// if css props available
|
|
706
712
|
if (style.getPropertyValue('--q-size-sm')) {
|
|
@@ -1456,7 +1462,7 @@
|
|
|
1456
1462
|
}
|
|
1457
1463
|
|
|
1458
1464
|
var installQuasar = function (parentApp, opts = {}) {
|
|
1459
|
-
const $q = { version: '2.
|
|
1465
|
+
const $q = { version: '2.5.2' };
|
|
1460
1466
|
|
|
1461
1467
|
if (globalConfigIsFrozen === false) {
|
|
1462
1468
|
if (opts.config !== void 0) {
|
|
@@ -2335,19 +2341,25 @@
|
|
|
2335
2341
|
}
|
|
2336
2342
|
}
|
|
2337
2343
|
|
|
2344
|
+
function fillNormalizedVNodes (children, vnode) {
|
|
2345
|
+
if (typeof vnode.type === 'symbol') {
|
|
2346
|
+
if (Array.isArray(vnode.children) === true) {
|
|
2347
|
+
vnode.children.forEach(child => {
|
|
2348
|
+
fillNormalizedVNodes(children, child);
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
else {
|
|
2353
|
+
children.add(vnode);
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2338
2357
|
// vnodes from rendered in advanced slots
|
|
2339
2358
|
function getNormalizedVNodes (vnodes) {
|
|
2340
2359
|
const children = new Set();
|
|
2341
2360
|
|
|
2342
2361
|
vnodes.forEach(vnode => {
|
|
2343
|
-
|
|
2344
|
-
vnode.children.forEach(child => {
|
|
2345
|
-
children.add(child);
|
|
2346
|
-
});
|
|
2347
|
-
}
|
|
2348
|
-
else {
|
|
2349
|
-
children.add(vnode);
|
|
2350
|
-
}
|
|
2362
|
+
fillNormalizedVNodes(children, vnode);
|
|
2351
2363
|
});
|
|
2352
2364
|
|
|
2353
2365
|
return Array.from(children)
|
|
@@ -2398,7 +2410,7 @@
|
|
|
2398
2410
|
hSlot(slots.default)
|
|
2399
2411
|
);
|
|
2400
2412
|
|
|
2401
|
-
if (vnodes ===
|
|
2413
|
+
if (vnodes.length === 0) { return }
|
|
2402
2414
|
|
|
2403
2415
|
let els = 1;
|
|
2404
2416
|
|
|
@@ -4059,7 +4071,7 @@
|
|
|
4059
4071
|
vue.watch(() => props.modelValue, processModelChange);
|
|
4060
4072
|
|
|
4061
4073
|
if (hideOnRouteChange !== void 0 && vmHasRouter(vm) === true) {
|
|
4062
|
-
vue.watch(() => proxy.$route, () => {
|
|
4074
|
+
vue.watch(() => proxy.$route.fullPath, () => {
|
|
4063
4075
|
if (hideOnRouteChange.value === true && showing.value === true) {
|
|
4064
4076
|
hide();
|
|
4065
4077
|
}
|
|
@@ -6414,7 +6426,7 @@
|
|
|
6414
6426
|
let historyEntry, fullscreenFillerNode, container;
|
|
6415
6427
|
const inFullscreen = vue.ref(false);
|
|
6416
6428
|
|
|
6417
|
-
vmHasRouter(vm) === true && vue.watch(() => proxy.$route, () => {
|
|
6429
|
+
vmHasRouter(vm) === true && vue.watch(() => proxy.$route.fullPath, () => {
|
|
6418
6430
|
props.noRouteFullscreenExit !== true && exitFullscreen();
|
|
6419
6431
|
});
|
|
6420
6432
|
|
|
@@ -7171,6 +7183,10 @@
|
|
|
7171
7183
|
falseValue: { default: false },
|
|
7172
7184
|
indeterminateValue: { default: null },
|
|
7173
7185
|
|
|
7186
|
+
checkedIcon: String,
|
|
7187
|
+
uncheckedIcon: String,
|
|
7188
|
+
indeterminateIcon: String,
|
|
7189
|
+
|
|
7174
7190
|
toggleOrder: {
|
|
7175
7191
|
type: String,
|
|
7176
7192
|
validator: v => v === 'tf' || v === 'ft'
|
|
@@ -7383,6 +7399,7 @@
|
|
|
7383
7399
|
}
|
|
7384
7400
|
|
|
7385
7401
|
const bgNode = vue.h('div', {
|
|
7402
|
+
key: 'svg',
|
|
7386
7403
|
class: 'q-checkbox__bg absolute'
|
|
7387
7404
|
}, [
|
|
7388
7405
|
vue.h('svg', {
|
|
@@ -7409,8 +7426,36 @@
|
|
|
7409
7426
|
props: useCheckboxProps,
|
|
7410
7427
|
emits: useCheckboxEmits,
|
|
7411
7428
|
|
|
7412
|
-
setup () {
|
|
7413
|
-
|
|
7429
|
+
setup (props) {
|
|
7430
|
+
function getInner (isTrue, isIndeterminate) {
|
|
7431
|
+
const icon = vue.computed(() =>
|
|
7432
|
+
(isTrue.value === true
|
|
7433
|
+
? props.checkedIcon
|
|
7434
|
+
: (isIndeterminate.value === true
|
|
7435
|
+
? props.indeterminateIcon
|
|
7436
|
+
: props.uncheckedIcon
|
|
7437
|
+
)
|
|
7438
|
+
) || null
|
|
7439
|
+
);
|
|
7440
|
+
|
|
7441
|
+
return () => (
|
|
7442
|
+
icon.value !== null
|
|
7443
|
+
? [
|
|
7444
|
+
vue.h('div', {
|
|
7445
|
+
key: 'icon',
|
|
7446
|
+
class: 'q-checkbox__icon-container absolute flex flex-center no-wrap'
|
|
7447
|
+
}, [
|
|
7448
|
+
vue.h(QIcon, {
|
|
7449
|
+
class: 'q-checkbox__icon',
|
|
7450
|
+
name: icon.value
|
|
7451
|
+
})
|
|
7452
|
+
])
|
|
7453
|
+
]
|
|
7454
|
+
: [ bgNode ]
|
|
7455
|
+
)
|
|
7456
|
+
}
|
|
7457
|
+
|
|
7458
|
+
return useCheckbox('checkbox', getInner)
|
|
7414
7459
|
}
|
|
7415
7460
|
});
|
|
7416
7461
|
|
|
@@ -11737,19 +11782,18 @@
|
|
|
11737
11782
|
function applyYearMonthDayChange (date, mod, sign) {
|
|
11738
11783
|
let
|
|
11739
11784
|
year = date.getFullYear(),
|
|
11740
|
-
month = date.getMonth()
|
|
11741
|
-
day = date.getDate();
|
|
11785
|
+
month = date.getMonth();
|
|
11742
11786
|
|
|
11743
|
-
|
|
11744
|
-
year += sign * mod.years;
|
|
11745
|
-
}
|
|
11787
|
+
const day = date.getDate();
|
|
11746
11788
|
|
|
11747
|
-
if (mod.
|
|
11748
|
-
|
|
11789
|
+
if (mod.year !== void 0) {
|
|
11790
|
+
year += sign * mod.year;
|
|
11791
|
+
delete mod.year;
|
|
11749
11792
|
}
|
|
11750
11793
|
|
|
11751
|
-
if (mod.
|
|
11752
|
-
|
|
11794
|
+
if (mod.month !== void 0) {
|
|
11795
|
+
month += sign * mod.month;
|
|
11796
|
+
delete mod.month;
|
|
11753
11797
|
}
|
|
11754
11798
|
|
|
11755
11799
|
date.setDate(1);
|
|
@@ -11757,26 +11801,14 @@
|
|
|
11757
11801
|
|
|
11758
11802
|
date.setFullYear(year);
|
|
11759
11803
|
date.setMonth(month);
|
|
11760
|
-
date.setDate(day);
|
|
11761
|
-
|
|
11762
|
-
return date
|
|
11763
|
-
}
|
|
11764
|
-
|
|
11765
|
-
function getChange (date, mod, sign) {
|
|
11766
|
-
const
|
|
11767
|
-
d = new Date(date),
|
|
11768
|
-
t = mod.years !== void 0 || mod.months !== void 0 || mod.days !== void 0
|
|
11769
|
-
? applyYearMonthDayChange(d, mod, sign)
|
|
11770
|
-
: d;
|
|
11804
|
+
date.setDate(Math.min(day, daysInMonth(date)));
|
|
11771
11805
|
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
|
|
11776
|
-
}
|
|
11806
|
+
if (mod.date !== void 0) {
|
|
11807
|
+
date.setDate(date.getDate() + sign * mod.date);
|
|
11808
|
+
delete mod.date;
|
|
11777
11809
|
}
|
|
11778
11810
|
|
|
11779
|
-
return
|
|
11811
|
+
return date
|
|
11780
11812
|
}
|
|
11781
11813
|
|
|
11782
11814
|
function applyYearMonthDay (date, mod, middle) {
|
|
@@ -11793,22 +11825,86 @@
|
|
|
11793
11825
|
date[ `set${ middle }Month` ](month);
|
|
11794
11826
|
date[ `set${ middle }Date` ](day);
|
|
11795
11827
|
|
|
11828
|
+
delete mod.year;
|
|
11829
|
+
delete mod.month;
|
|
11830
|
+
delete mod.date;
|
|
11831
|
+
|
|
11796
11832
|
return date
|
|
11797
11833
|
}
|
|
11798
11834
|
|
|
11799
|
-
function
|
|
11835
|
+
function getChange (date, rawMod, sign) {
|
|
11800
11836
|
const
|
|
11837
|
+
mod = normalizeMod(rawMod),
|
|
11838
|
+
d = new Date(date),
|
|
11839
|
+
t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
|
|
11840
|
+
? applyYearMonthDayChange(d, mod, sign) // removes year/month/day
|
|
11841
|
+
: d;
|
|
11842
|
+
|
|
11843
|
+
for (const key in mod) {
|
|
11844
|
+
const op = capitalize(key);
|
|
11845
|
+
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
|
|
11846
|
+
}
|
|
11847
|
+
|
|
11848
|
+
return t
|
|
11849
|
+
}
|
|
11850
|
+
|
|
11851
|
+
function normalizeMod (mod) {
|
|
11852
|
+
const acc = { ...mod };
|
|
11853
|
+
|
|
11854
|
+
if (mod.years !== void 0) {
|
|
11855
|
+
acc.year = mod.years;
|
|
11856
|
+
delete acc.years;
|
|
11857
|
+
}
|
|
11858
|
+
|
|
11859
|
+
if (mod.months !== void 0) {
|
|
11860
|
+
acc.month = mod.months;
|
|
11861
|
+
delete acc.months;
|
|
11862
|
+
}
|
|
11863
|
+
|
|
11864
|
+
if (mod.days !== void 0) {
|
|
11865
|
+
acc.date = mod.days;
|
|
11866
|
+
delete acc.days;
|
|
11867
|
+
}
|
|
11868
|
+
if (mod.day !== void 0) {
|
|
11869
|
+
acc.date = mod.day;
|
|
11870
|
+
delete acc.day;
|
|
11871
|
+
}
|
|
11872
|
+
|
|
11873
|
+
if (mod.hour !== void 0) {
|
|
11874
|
+
acc.hours = mod.hour;
|
|
11875
|
+
delete acc.hour;
|
|
11876
|
+
}
|
|
11877
|
+
|
|
11878
|
+
if (mod.minute !== void 0) {
|
|
11879
|
+
acc.minutes = mod.minute;
|
|
11880
|
+
delete acc.minute;
|
|
11881
|
+
}
|
|
11882
|
+
|
|
11883
|
+
if (mod.second !== void 0) {
|
|
11884
|
+
acc.seconds = mod.second;
|
|
11885
|
+
delete acc.second;
|
|
11886
|
+
}
|
|
11887
|
+
|
|
11888
|
+
if (mod.millisecond !== void 0) {
|
|
11889
|
+
acc.milliseconds = mod.millisecond;
|
|
11890
|
+
delete acc.millisecond;
|
|
11891
|
+
}
|
|
11892
|
+
|
|
11893
|
+
return acc
|
|
11894
|
+
}
|
|
11895
|
+
|
|
11896
|
+
function adjustDate (date, rawMod, utc) {
|
|
11897
|
+
const
|
|
11898
|
+
mod = normalizeMod(rawMod),
|
|
11801
11899
|
middle = utc === true ? 'UTC' : '',
|
|
11802
11900
|
d = new Date(date),
|
|
11803
11901
|
t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
|
|
11804
|
-
? applyYearMonthDay(d, mod, middle)
|
|
11902
|
+
? applyYearMonthDay(d, mod, middle) // removes year/month/day
|
|
11805
11903
|
: d;
|
|
11806
11904
|
|
|
11807
11905
|
for (const key in mod) {
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
t[ `set${ middle }${ op }` ](mod[ key ]);
|
|
11811
|
-
}
|
|
11906
|
+
const op = key.charAt(0).toUpperCase() + key.slice(1);
|
|
11907
|
+
t[ `set${ middle }${ op }` ](mod[ key ]);
|
|
11812
11908
|
}
|
|
11813
11909
|
|
|
11814
11910
|
return t
|
|
@@ -12042,16 +12138,23 @@
|
|
|
12042
12138
|
|
|
12043
12139
|
switch (unit) {
|
|
12044
12140
|
case 'year':
|
|
12141
|
+
case 'years':
|
|
12045
12142
|
t[ `${ prefix }Month` ](0);
|
|
12046
12143
|
case 'month':
|
|
12144
|
+
case 'months':
|
|
12047
12145
|
t[ `${ prefix }Date` ](1);
|
|
12048
12146
|
case 'day':
|
|
12147
|
+
case 'days':
|
|
12148
|
+
case 'date':
|
|
12049
12149
|
t[ `${ prefix }Hours` ](0);
|
|
12050
12150
|
case 'hour':
|
|
12151
|
+
case 'hours':
|
|
12051
12152
|
t[ `${ prefix }Minutes` ](0);
|
|
12052
12153
|
case 'minute':
|
|
12154
|
+
case 'minutes':
|
|
12053
12155
|
t[ `${ prefix }Seconds` ](0);
|
|
12054
12156
|
case 'second':
|
|
12157
|
+
case 'seconds':
|
|
12055
12158
|
t[ `${ prefix }Milliseconds` ](0);
|
|
12056
12159
|
}
|
|
12057
12160
|
return t
|
|
@@ -12064,16 +12167,23 @@
|
|
|
12064
12167
|
|
|
12065
12168
|
switch (unit) {
|
|
12066
12169
|
case 'year':
|
|
12170
|
+
case 'years':
|
|
12067
12171
|
t[ `${ prefix }Month` ](11);
|
|
12068
12172
|
case 'month':
|
|
12173
|
+
case 'months':
|
|
12069
12174
|
t[ `${ prefix }Date` ](daysInMonth(t));
|
|
12070
12175
|
case 'day':
|
|
12176
|
+
case 'days':
|
|
12177
|
+
case 'date':
|
|
12071
12178
|
t[ `${ prefix }Hours` ](23);
|
|
12072
12179
|
case 'hour':
|
|
12180
|
+
case 'hours':
|
|
12073
12181
|
t[ `${ prefix }Minutes` ](59);
|
|
12074
12182
|
case 'minute':
|
|
12183
|
+
case 'minutes':
|
|
12075
12184
|
t[ `${ prefix }Seconds` ](59);
|
|
12076
12185
|
case 'second':
|
|
12186
|
+
case 'seconds':
|
|
12077
12187
|
t[ `${ prefix }Milliseconds` ](999);
|
|
12078
12188
|
}
|
|
12079
12189
|
return t
|
|
@@ -12109,21 +12219,28 @@
|
|
|
12109
12219
|
|
|
12110
12220
|
switch (unit) {
|
|
12111
12221
|
case 'years':
|
|
12222
|
+
case 'year':
|
|
12112
12223
|
return (t.getFullYear() - sub.getFullYear())
|
|
12113
12224
|
|
|
12114
12225
|
case 'months':
|
|
12226
|
+
case 'month':
|
|
12115
12227
|
return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth()
|
|
12116
12228
|
|
|
12117
12229
|
case 'days':
|
|
12230
|
+
case 'day':
|
|
12231
|
+
case 'date':
|
|
12118
12232
|
return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY)
|
|
12119
12233
|
|
|
12120
12234
|
case 'hours':
|
|
12235
|
+
case 'hour':
|
|
12121
12236
|
return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR)
|
|
12122
12237
|
|
|
12123
12238
|
case 'minutes':
|
|
12239
|
+
case 'minute':
|
|
12124
12240
|
return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE)
|
|
12125
12241
|
|
|
12126
12242
|
case 'seconds':
|
|
12243
|
+
case 'second':
|
|
12127
12244
|
return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000)
|
|
12128
12245
|
}
|
|
12129
12246
|
}
|
|
@@ -12169,26 +12286,33 @@
|
|
|
12169
12286
|
|
|
12170
12287
|
switch (unit) {
|
|
12171
12288
|
case 'second':
|
|
12289
|
+
case 'seconds':
|
|
12172
12290
|
if (t.getSeconds() !== d.getSeconds()) {
|
|
12173
12291
|
return false
|
|
12174
12292
|
}
|
|
12175
12293
|
case 'minute': // intentional fall-through
|
|
12294
|
+
case 'minutes':
|
|
12176
12295
|
if (t.getMinutes() !== d.getMinutes()) {
|
|
12177
12296
|
return false
|
|
12178
12297
|
}
|
|
12179
12298
|
case 'hour': // intentional fall-through
|
|
12299
|
+
case 'hours':
|
|
12180
12300
|
if (t.getHours() !== d.getHours()) {
|
|
12181
12301
|
return false
|
|
12182
12302
|
}
|
|
12183
12303
|
case 'day': // intentional fall-through
|
|
12304
|
+
case 'days':
|
|
12305
|
+
case 'date':
|
|
12184
12306
|
if (t.getDate() !== d.getDate()) {
|
|
12185
12307
|
return false
|
|
12186
12308
|
}
|
|
12187
12309
|
case 'month': // intentional fall-through
|
|
12310
|
+
case 'months':
|
|
12188
12311
|
if (t.getMonth() !== d.getMonth()) {
|
|
12189
12312
|
return false
|
|
12190
12313
|
}
|
|
12191
12314
|
case 'year': // intentional fall-through
|
|
12315
|
+
case 'years':
|
|
12192
12316
|
if (t.getFullYear() !== d.getFullYear()) {
|
|
12193
12317
|
return false
|
|
12194
12318
|
}
|
|
@@ -20218,12 +20342,16 @@
|
|
|
20218
20342
|
let validateIndex = 0, unwatchRules;
|
|
20219
20343
|
|
|
20220
20344
|
const hasRules = vue.computed(() =>
|
|
20221
|
-
props.
|
|
20222
|
-
&& props.rules !== void 0
|
|
20345
|
+
props.rules !== void 0
|
|
20223
20346
|
&& props.rules !== null
|
|
20224
20347
|
&& props.rules.length > 0
|
|
20225
20348
|
);
|
|
20226
20349
|
|
|
20350
|
+
const hasActiveRules = vue.computed(() =>
|
|
20351
|
+
props.disable !== true
|
|
20352
|
+
&& hasRules.value === true
|
|
20353
|
+
);
|
|
20354
|
+
|
|
20227
20355
|
const hasError = vue.computed(() =>
|
|
20228
20356
|
props.error === true || innerError.value === true
|
|
20229
20357
|
);
|
|
@@ -20261,7 +20389,14 @@
|
|
|
20261
20389
|
else if (isDirtyModel.value === false) {
|
|
20262
20390
|
isDirtyModel.value = true;
|
|
20263
20391
|
|
|
20264
|
-
if (
|
|
20392
|
+
if (
|
|
20393
|
+
hasActiveRules.value === true
|
|
20394
|
+
&& props.lazyRules !== 'ondemand'
|
|
20395
|
+
// Don't re-trigger if it's already in progress;
|
|
20396
|
+
// It might mean that focus switched to submit btn and
|
|
20397
|
+
// QForm's submit() has been called already (ENTER key)
|
|
20398
|
+
&& innerLoading.value === false
|
|
20399
|
+
) {
|
|
20265
20400
|
debouncedValidate();
|
|
20266
20401
|
}
|
|
20267
20402
|
}
|
|
@@ -20283,11 +20418,11 @@
|
|
|
20283
20418
|
* - Promise (pending async validation)
|
|
20284
20419
|
*/
|
|
20285
20420
|
function validate (val = props.modelValue) {
|
|
20286
|
-
if (
|
|
20421
|
+
if (hasActiveRules.value !== true) {
|
|
20287
20422
|
return true
|
|
20288
20423
|
}
|
|
20289
20424
|
|
|
20290
|
-
validateIndex
|
|
20425
|
+
const index = ++validateIndex;
|
|
20291
20426
|
|
|
20292
20427
|
if (innerLoading.value !== true && props.lazyRules !== true) {
|
|
20293
20428
|
isDirtyModel.value = true;
|
|
@@ -20304,9 +20439,7 @@
|
|
|
20304
20439
|
innerErrorMessage.value = m;
|
|
20305
20440
|
}
|
|
20306
20441
|
|
|
20307
|
-
|
|
20308
|
-
innerLoading.value = false;
|
|
20309
|
-
}
|
|
20442
|
+
innerLoading.value = false;
|
|
20310
20443
|
};
|
|
20311
20444
|
|
|
20312
20445
|
const promises = [];
|
|
@@ -20336,42 +20469,33 @@
|
|
|
20336
20469
|
return true
|
|
20337
20470
|
}
|
|
20338
20471
|
|
|
20339
|
-
|
|
20340
|
-
innerLoading.value = true;
|
|
20341
|
-
}
|
|
20342
|
-
|
|
20343
|
-
const index = validateIndex;
|
|
20472
|
+
innerLoading.value = true;
|
|
20344
20473
|
|
|
20345
20474
|
return Promise.all(promises).then(
|
|
20346
20475
|
res => {
|
|
20347
|
-
if (index !== validateIndex) {
|
|
20348
|
-
return true
|
|
20349
|
-
}
|
|
20350
|
-
|
|
20351
20476
|
if (res === void 0 || Array.isArray(res) === false || res.length === 0) {
|
|
20352
|
-
update(false);
|
|
20477
|
+
index === validateIndex && update(false);
|
|
20353
20478
|
return true
|
|
20354
20479
|
}
|
|
20355
20480
|
|
|
20356
20481
|
const msg = res.find(r => r === false || typeof r === 'string');
|
|
20357
|
-
update(msg !== void 0, msg);
|
|
20482
|
+
index === validateIndex && update(msg !== void 0, msg);
|
|
20358
20483
|
return msg === void 0
|
|
20359
20484
|
},
|
|
20360
20485
|
e => {
|
|
20361
20486
|
if (index === validateIndex) {
|
|
20362
20487
|
console.error(e);
|
|
20363
20488
|
update(true);
|
|
20364
|
-
return false
|
|
20365
20489
|
}
|
|
20366
20490
|
|
|
20367
|
-
return
|
|
20491
|
+
return false
|
|
20368
20492
|
}
|
|
20369
20493
|
)
|
|
20370
20494
|
}
|
|
20371
20495
|
|
|
20372
20496
|
function validateIfNeeded (changedRules) {
|
|
20373
20497
|
if (
|
|
20374
|
-
|
|
20498
|
+
hasActiveRules.value === true
|
|
20375
20499
|
&& props.lazyRules !== 'ondemand'
|
|
20376
20500
|
&& (isDirtyModel.value === true || (props.lazyRules !== true && changedRules !== true))
|
|
20377
20501
|
) {
|
|
@@ -21524,7 +21648,7 @@
|
|
|
21524
21648
|
? shouldFocus
|
|
21525
21649
|
: props.noErrorFocus !== true;
|
|
21526
21650
|
|
|
21527
|
-
validateIndex
|
|
21651
|
+
const index = ++validateIndex;
|
|
21528
21652
|
|
|
21529
21653
|
const emitEvent = (res, ref) => {
|
|
21530
21654
|
emit('validation-' + (res === true ? 'success' : 'error'), ref);
|
|
@@ -21538,7 +21662,7 @@
|
|
|
21538
21662
|
promises.push(
|
|
21539
21663
|
valid.then(
|
|
21540
21664
|
valid => ({ valid, comp }),
|
|
21541
|
-
|
|
21665
|
+
err => ({ valid: false, comp, err })
|
|
21542
21666
|
)
|
|
21543
21667
|
);
|
|
21544
21668
|
}
|
|
@@ -21562,34 +21686,33 @@
|
|
|
21562
21686
|
return Promise.resolve(true)
|
|
21563
21687
|
}
|
|
21564
21688
|
|
|
21565
|
-
|
|
21689
|
+
return Promise.all(promises).then(res => {
|
|
21690
|
+
const errors = res.filter(r => r.valid !== true);
|
|
21566
21691
|
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21572
|
-
if (errors.length === 0) {
|
|
21573
|
-
emitEvent(true);
|
|
21574
|
-
return true
|
|
21575
|
-
}
|
|
21692
|
+
if (errors.length === 0) {
|
|
21693
|
+
index === validateIndex && emitEvent(true);
|
|
21694
|
+
return true
|
|
21695
|
+
}
|
|
21576
21696
|
|
|
21577
|
-
|
|
21697
|
+
const { valid, comp, err } = errors[ 0 ];
|
|
21578
21698
|
|
|
21579
|
-
|
|
21699
|
+
// if not outdated already
|
|
21700
|
+
if (index === validateIndex) {
|
|
21701
|
+
err !== void 0 && console.error(err);
|
|
21580
21702
|
|
|
21581
|
-
|
|
21582
|
-
focus === true
|
|
21583
|
-
&& valid !== true
|
|
21584
|
-
&& typeof comp.focus === 'function'
|
|
21585
|
-
) {
|
|
21586
|
-
comp.focus();
|
|
21587
|
-
}
|
|
21703
|
+
emitEvent(false, comp);
|
|
21588
21704
|
|
|
21589
|
-
|
|
21705
|
+
if (
|
|
21706
|
+
focus === true
|
|
21707
|
+
&& valid !== true
|
|
21708
|
+
&& typeof comp.focus === 'function'
|
|
21709
|
+
) {
|
|
21710
|
+
comp.focus();
|
|
21590
21711
|
}
|
|
21591
21712
|
}
|
|
21592
|
-
|
|
21713
|
+
|
|
21714
|
+
return false
|
|
21715
|
+
})
|
|
21593
21716
|
}
|
|
21594
21717
|
|
|
21595
21718
|
function resetValidation () {
|
|
@@ -21603,8 +21726,11 @@
|
|
|
21603
21726
|
function submit (evt) {
|
|
21604
21727
|
evt !== void 0 && stopAndPrevent(evt);
|
|
21605
21728
|
|
|
21729
|
+
const index = validateIndex + 1;
|
|
21730
|
+
|
|
21606
21731
|
validate().then(val => {
|
|
21607
|
-
if
|
|
21732
|
+
// if not outdated && validation succeeded
|
|
21733
|
+
if (index === validateIndex && val === true) {
|
|
21608
21734
|
if (props.onSubmit !== void 0) {
|
|
21609
21735
|
emit('submit', evt);
|
|
21610
21736
|
}
|
|
@@ -23167,6 +23293,15 @@
|
|
|
23167
23293
|
return attrs
|
|
23168
23294
|
});
|
|
23169
23295
|
|
|
23296
|
+
// some browsers lose the native input value
|
|
23297
|
+
// so we need to reattach it dynamically
|
|
23298
|
+
// (like type="password" <-> type="text"; see #12078)
|
|
23299
|
+
vue.watch(() => props.type, () => {
|
|
23300
|
+
if (inputRef.value) {
|
|
23301
|
+
inputRef.value.value = props.modelValue;
|
|
23302
|
+
}
|
|
23303
|
+
});
|
|
23304
|
+
|
|
23170
23305
|
vue.watch(() => props.modelValue, v => {
|
|
23171
23306
|
if (hasMask.value === true) {
|
|
23172
23307
|
if (stopValueWatcher === true) {
|
|
@@ -24386,6 +24521,7 @@
|
|
|
24386
24521
|
});
|
|
24387
24522
|
|
|
24388
24523
|
const svg$m = vue.h('svg', {
|
|
24524
|
+
key: 'svg',
|
|
24389
24525
|
class: 'q-radio__bg absolute non-selectable',
|
|
24390
24526
|
viewBox: '0 0 24 24',
|
|
24391
24527
|
'aria-hidden': 'true'
|
|
@@ -24414,6 +24550,9 @@
|
|
|
24414
24550
|
label: String,
|
|
24415
24551
|
leftLabel: Boolean,
|
|
24416
24552
|
|
|
24553
|
+
checkedIcon: String,
|
|
24554
|
+
uncheckedIcon: String,
|
|
24555
|
+
|
|
24417
24556
|
color: String,
|
|
24418
24557
|
keepColor: Boolean,
|
|
24419
24558
|
dense: Boolean,
|
|
@@ -24455,6 +24594,13 @@
|
|
|
24455
24594
|
+ `q-radio__inner--${ isTrue.value === true ? 'truthy' : 'falsy' }${ color }`
|
|
24456
24595
|
});
|
|
24457
24596
|
|
|
24597
|
+
const icon = vue.computed(() =>
|
|
24598
|
+
(isTrue.value === true
|
|
24599
|
+
? props.checkedIcon
|
|
24600
|
+
: props.uncheckedIcon
|
|
24601
|
+
) || null
|
|
24602
|
+
);
|
|
24603
|
+
|
|
24458
24604
|
const tabindex = vue.computed(() => (
|
|
24459
24605
|
props.disable === true ? -1 : props.tabindex || 0
|
|
24460
24606
|
));
|
|
@@ -24500,7 +24646,19 @@
|
|
|
24500
24646
|
Object.assign(proxy, { set: onClick });
|
|
24501
24647
|
|
|
24502
24648
|
return () => {
|
|
24503
|
-
const content =
|
|
24649
|
+
const content = icon.value !== null
|
|
24650
|
+
? [
|
|
24651
|
+
vue.h('div', {
|
|
24652
|
+
key: 'icon',
|
|
24653
|
+
class: 'q-radio__icon-container absolute flex flex-center no-wrap'
|
|
24654
|
+
}, [
|
|
24655
|
+
vue.h(QIcon, {
|
|
24656
|
+
class: 'q-radio__icon',
|
|
24657
|
+
name: icon.value
|
|
24658
|
+
})
|
|
24659
|
+
])
|
|
24660
|
+
]
|
|
24661
|
+
: [ svg$m ];
|
|
24504
24662
|
|
|
24505
24663
|
props.disable !== true && injectFormInput(
|
|
24506
24664
|
content,
|
|
@@ -24552,10 +24710,6 @@
|
|
|
24552
24710
|
...useCheckboxProps,
|
|
24553
24711
|
|
|
24554
24712
|
icon: String,
|
|
24555
|
-
checkedIcon: String,
|
|
24556
|
-
uncheckedIcon: String,
|
|
24557
|
-
indeterminateIcon: String,
|
|
24558
|
-
|
|
24559
24713
|
iconColor: String
|
|
24560
24714
|
},
|
|
24561
24715
|
|
|
@@ -24563,29 +24717,25 @@
|
|
|
24563
24717
|
|
|
24564
24718
|
setup (props) {
|
|
24565
24719
|
function getInner (isTrue, isIndeterminate) {
|
|
24566
|
-
const
|
|
24720
|
+
const icon = vue.computed(() =>
|
|
24567
24721
|
(isTrue.value === true
|
|
24568
24722
|
? props.checkedIcon
|
|
24569
24723
|
: (isIndeterminate.value === true ? props.indeterminateIcon : props.uncheckedIcon)
|
|
24570
24724
|
) || props.icon
|
|
24571
24725
|
);
|
|
24572
24726
|
|
|
24573
|
-
const
|
|
24574
|
-
if (isTrue.value === true) {
|
|
24575
|
-
return props.iconColor
|
|
24576
|
-
}
|
|
24577
|
-
});
|
|
24727
|
+
const color = vue.computed(() => (isTrue.value === true ? props.iconColor : null));
|
|
24578
24728
|
|
|
24579
24729
|
return () => [
|
|
24580
24730
|
vue.h('div', { class: 'q-toggle__track' }),
|
|
24581
24731
|
|
|
24582
24732
|
vue.h('div', {
|
|
24583
24733
|
class: 'q-toggle__thumb absolute flex flex-center no-wrap'
|
|
24584
|
-
},
|
|
24734
|
+
}, icon.value !== void 0
|
|
24585
24735
|
? [
|
|
24586
24736
|
vue.h(QIcon, {
|
|
24587
|
-
name:
|
|
24588
|
-
color:
|
|
24737
|
+
name: icon.value,
|
|
24738
|
+
color: color.value
|
|
24589
24739
|
})
|
|
24590
24740
|
]
|
|
24591
24741
|
: void 0
|
|
@@ -27835,7 +27985,9 @@
|
|
|
27835
27985
|
|
|
27836
27986
|
localScrollViewSize = scrollViewSize;
|
|
27837
27987
|
|
|
27838
|
-
const
|
|
27988
|
+
const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0;
|
|
27989
|
+
const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0;
|
|
27990
|
+
const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter;
|
|
27839
27991
|
const view = scrollViewSize === void 0 || scrollViewSize <= 0
|
|
27840
27992
|
? 1
|
|
27841
27993
|
: Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);
|
|
@@ -27848,9 +28000,9 @@
|
|
|
27848
28000
|
|
|
27849
28001
|
virtualScrollSliceSizeComputed.value = {
|
|
27850
28002
|
total: Math.ceil(baseSize * multiplier),
|
|
27851
|
-
start: Math.ceil(baseSize *
|
|
27852
|
-
center: Math.ceil(baseSize * (0.5 +
|
|
27853
|
-
end: Math.ceil(baseSize * (1 +
|
|
28003
|
+
start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
|
|
28004
|
+
center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
|
|
28005
|
+
end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
|
|
27854
28006
|
view
|
|
27855
28007
|
};
|
|
27856
28008
|
}
|
|
@@ -29350,7 +29502,7 @@
|
|
|
29350
29502
|
filter, updateMenuPosition, updateInputValue,
|
|
29351
29503
|
isOptionSelected,
|
|
29352
29504
|
getEmittingOptionValue,
|
|
29353
|
-
isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args),
|
|
29505
|
+
isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args) === true,
|
|
29354
29506
|
getOptionValue: (...args) => getOptionValue.value.apply(null, args),
|
|
29355
29507
|
getOptionLabel: (...args) => getOptionLabel.value.apply(null, args)
|
|
29356
29508
|
});
|
|
@@ -32160,7 +32312,7 @@
|
|
|
32160
32312
|
const isActive = vue.computed(() => $stepper.value.modelValue === props.name);
|
|
32161
32313
|
|
|
32162
32314
|
const scrollEvent = vue.computed(() => (
|
|
32163
|
-
($q.platform.is.ios !== true && $q.platform.is.
|
|
32315
|
+
($q.platform.is.ios !== true && $q.platform.is.chrome === true)
|
|
32164
32316
|
|| isActive.value !== true
|
|
32165
32317
|
|| $stepper.value.vertical !== true
|
|
32166
32318
|
? {}
|
|
@@ -35904,34 +36056,34 @@
|
|
|
35904
36056
|
|
|
35905
36057
|
m.lazy === 'loading'
|
|
35906
36058
|
? vue.h(QSpinner, {
|
|
35907
|
-
|
|
35908
|
-
|
|
35909
|
-
|
|
36059
|
+
class: 'q-tree__spinner',
|
|
36060
|
+
color: computedControlColor.value
|
|
36061
|
+
})
|
|
35910
36062
|
: (
|
|
35911
36063
|
isParent === true
|
|
35912
36064
|
? vue.h(QIcon, {
|
|
35913
|
-
|
|
36065
|
+
class: 'q-tree__arrow'
|
|
35914
36066
|
+ (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
|
|
35915
|
-
|
|
35916
|
-
|
|
35917
|
-
|
|
36067
|
+
name: computedIcon.value,
|
|
36068
|
+
onClick (e) { onExpandClick(node, m, e); }
|
|
36069
|
+
})
|
|
35918
36070
|
: null
|
|
35919
36071
|
),
|
|
35920
36072
|
|
|
35921
36073
|
m.hasTicking === true && m.noTick !== true
|
|
35922
36074
|
? vue.h(QCheckbox, {
|
|
35923
|
-
|
|
35924
|
-
|
|
35925
|
-
|
|
35926
|
-
|
|
35927
|
-
|
|
35928
|
-
|
|
35929
|
-
|
|
35930
|
-
|
|
35931
|
-
|
|
35932
|
-
|
|
35933
|
-
|
|
35934
|
-
|
|
36075
|
+
class: 'q-tree__tickbox',
|
|
36076
|
+
modelValue: m.indeterminate === true ? null : m.ticked,
|
|
36077
|
+
color: computedControlColor.value,
|
|
36078
|
+
dark: isDark.value,
|
|
36079
|
+
dense: true,
|
|
36080
|
+
keepColor: true,
|
|
36081
|
+
disable: m.tickable !== true,
|
|
36082
|
+
onKeydown: stopAndPrevent,
|
|
36083
|
+
'onUpdate:modelValue': v => {
|
|
36084
|
+
onTickedClick(m, v);
|
|
36085
|
+
}
|
|
36086
|
+
})
|
|
35935
36087
|
: null,
|
|
35936
36088
|
|
|
35937
36089
|
vue.h('div', {
|
|
@@ -35949,22 +36101,22 @@
|
|
|
35949
36101
|
|
|
35950
36102
|
isParent === true
|
|
35951
36103
|
? vue.h(QSlideTransition, {
|
|
35952
|
-
|
|
35953
|
-
|
|
35954
|
-
|
|
35955
|
-
|
|
36104
|
+
duration: props.duration,
|
|
36105
|
+
onShow,
|
|
36106
|
+
onHide
|
|
36107
|
+
}, () => vue.withDirectives(
|
|
36108
|
+
vue.h('div', {
|
|
36109
|
+
class: 'q-tree__node-collapsible' + textColorClass.value,
|
|
36110
|
+
key: `${ key }__q`
|
|
36111
|
+
}, [
|
|
36112
|
+
body,
|
|
35956
36113
|
vue.h('div', {
|
|
35957
|
-
class: 'q-
|
|
35958
|
-
key: `${ key }__q`
|
|
35959
|
-
}, [
|
|
35960
|
-
body,
|
|
35961
|
-
vue.h('div', {
|
|
35962
|
-
class: 'q-tree__children'
|
|
36114
|
+
class: 'q-tree__children'
|
|
35963
36115
|
+ (m.disabled === true ? ' q-tree__node--disabled' : '')
|
|
35964
|
-
|
|
35965
|
-
|
|
35966
|
-
|
|
35967
|
-
|
|
36116
|
+
}, children)
|
|
36117
|
+
]),
|
|
36118
|
+
[ [ vue.vShow, m.expanded ] ]
|
|
36119
|
+
))
|
|
35968
36120
|
: body
|
|
35969
36121
|
])
|
|
35970
36122
|
}
|
|
@@ -35977,14 +36129,12 @@
|
|
|
35977
36129
|
function onClick (node, meta, e, keyboard) {
|
|
35978
36130
|
keyboard !== true && blur(meta.key);
|
|
35979
36131
|
|
|
35980
|
-
if (hasSelection.value) {
|
|
35981
|
-
if (
|
|
35982
|
-
|
|
35983
|
-
|
|
35984
|
-
|
|
35985
|
-
|
|
35986
|
-
emit('update:selected', meta.key || null);
|
|
35987
|
-
}
|
|
36132
|
+
if (hasSelection.value && meta.selectable) {
|
|
36133
|
+
if (props.noSelectionUnset === false) {
|
|
36134
|
+
emit('update:selected', meta.key !== props.selected ? meta.key : null);
|
|
36135
|
+
}
|
|
36136
|
+
else if (meta.key !== props.selected) {
|
|
36137
|
+
emit('update:selected', meta.key || null);
|
|
35988
36138
|
}
|
|
35989
36139
|
}
|
|
35990
36140
|
else {
|
|
@@ -39367,7 +39517,7 @@
|
|
|
39367
39517
|
});
|
|
39368
39518
|
|
|
39369
39519
|
var index_umd = {
|
|
39370
|
-
version: '2.
|
|
39520
|
+
version: '2.5.2',
|
|
39371
39521
|
install (app, opts) {
|
|
39372
39522
|
installQuasar(app, {
|
|
39373
39523
|
components,
|