vuetify 3.3.3 → 3.3.4
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/_component-variables-labs.sass +2 -0
- package/dist/json/attributes.json +452 -12
- package/dist/json/importMap-labs.json +32 -0
- package/dist/json/importMap.json +20 -20
- package/dist/json/tags.json +150 -0
- package/dist/json/web-types.json +1609 -21
- package/dist/vuetify-labs.css +469 -192
- package/dist/vuetify-labs.d.ts +5178 -217
- package/dist/vuetify-labs.esm.js +1902 -990
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1902 -990
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +210 -203
- package/dist/vuetify.d.ts +60 -45
- package/dist/vuetify.esm.js +142 -104
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +142 -104
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +159 -160
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +32 -25
- package/lib/blueprints/md1.d.mts +32 -25
- package/lib/blueprints/md2.d.mts +32 -25
- package/lib/blueprints/md3.d.mts +32 -25
- package/lib/components/VAppBar/VAppBar.mjs +3 -10
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +4 -22
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +6 -17
- package/lib/components/VBreadcrumbs/index.d.mts +7 -7
- package/lib/components/VBtn/VBtn.css +11 -11
- package/lib/components/VBtn/VBtn.sass +1 -1
- package/lib/components/VBtn/_mixins.scss +1 -1
- package/lib/components/VChip/VChip.css +67 -67
- package/lib/components/VChip/_variables.scss +1 -1
- package/lib/components/VCombobox/VCombobox.css +4 -22
- package/lib/components/VCombobox/VCombobox.sass +6 -17
- package/lib/components/VCombobox/_variables.scss +3 -3
- package/lib/components/VCounter/index.d.mts +8 -8
- package/lib/components/VField/VField.css +71 -8
- package/lib/components/VField/VField.sass +9 -5
- package/lib/components/VField/_mixins.sass +7 -0
- package/lib/components/VFileInput/VFileInput.css +2 -17
- package/lib/components/VFileInput/VFileInput.mjs +0 -2
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +2 -11
- package/lib/components/VFileInput/_variables.scss +3 -3
- package/lib/components/VInput/VInput.css +14 -1
- package/lib/components/VInput/VInput.sass +6 -0
- package/lib/components/VInput/_variables.scss +5 -1
- package/lib/components/VList/VListItem.mjs +1 -1
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.css +2 -20
- package/lib/components/VSelect/VSelect.mjs +1 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +2 -12
- package/lib/components/VSelect/_variables.scss +3 -3
- package/lib/components/VTabs/VTab.mjs +2 -2
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.mjs +1 -1
- package/lib/components/index.d.mts +15 -15
- package/lib/components/index.mjs +1 -2
- package/lib/components/index.mjs.map +1 -1
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/list-items.mjs +5 -2
- package/lib/composables/list-items.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +1 -1
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.d.mts +1 -0
- package/lib/iconsets/fa.d.mts +1 -0
- package/lib/iconsets/fa.mjs +2 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.d.mts +1 -0
- package/lib/iconsets/fa4.mjs +2 -1
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.d.mts +1 -0
- package/lib/iconsets/md.mjs +2 -1
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.d.mts +1 -0
- package/lib/iconsets/mdi-svg.mjs +2 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.d.mts +1 -0
- package/lib/iconsets/mdi.mjs +2 -1
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.mts +45 -30
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +16 -12
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/headers.mjs +2 -5
- package/lib/labs/VDataTable/composables/headers.mjs.map +1 -1
- package/lib/labs/VDateInput/VDateInput.mjs +127 -0
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -0
- package/lib/labs/VDateInput/VDateInput.sass +11 -0
- package/lib/labs/VDateInput/VDateRangeInput.mjs +223 -0
- package/lib/labs/VDateInput/VDateRangeInput.mjs.map +1 -0
- package/lib/labs/VDateInput/VDateRangeInput.sass +10 -0
- package/lib/labs/VDateInput/composables.mjs +59 -0
- package/lib/labs/VDateInput/composables.mjs.map +1 -0
- package/lib/labs/VDateInput/index.d.mts +1352 -0
- package/lib/labs/VDateInput/index.mjs +3 -0
- package/lib/labs/VDateInput/index.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDateCard.css +33 -0
- package/lib/labs/VDatePicker/VDateCard.mjs +112 -0
- package/lib/labs/VDatePicker/VDateCard.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDateCard.sass +32 -0
- package/lib/labs/VDatePicker/VDatePicker.css +23 -0
- package/lib/labs/VDatePicker/VDatePicker.mjs +172 -0
- package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePicker.sass +23 -0
- package/lib/labs/VDatePicker/VDatePickerControls.css +15 -0
- package/lib/labs/VDatePicker/VDatePickerControls.mjs +80 -0
- package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePickerControls.sass +15 -0
- package/lib/labs/VDatePicker/VDatePickerHeader.css +54 -0
- package/lib/labs/VDatePicker/VDatePickerHeader.mjs +75 -0
- package/lib/labs/VDatePicker/VDatePickerHeader.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePickerHeader.sass +51 -0
- package/lib/labs/VDatePicker/VDatePickerInput.sass +17 -0
- package/lib/labs/VDatePicker/VDatePickerMonth.css +77 -0
- package/lib/labs/VDatePicker/VDatePickerMonth.mjs +286 -0
- package/lib/labs/VDatePicker/VDatePickerMonth.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePickerMonth.sass +69 -0
- package/lib/{components → labs}/VDatePicker/VDatePickerTitle.mjs +1 -1
- package/lib/labs/VDatePicker/VDatePickerTitle.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePickerYears.css +18 -0
- package/lib/labs/VDatePicker/VDatePickerYears.mjs +64 -0
- package/lib/labs/VDatePicker/VDatePickerYears.mjs.map +1 -0
- package/lib/labs/VDatePicker/VDatePickerYears.sass +16 -0
- package/lib/labs/VDatePicker/composables.mjs +33 -0
- package/lib/labs/VDatePicker/composables.mjs.map +1 -0
- package/lib/labs/VDatePicker/index.d.mts +4430 -0
- package/lib/labs/VDatePicker/index.mjs +7 -0
- package/lib/labs/VDatePicker/index.mjs.map +1 -0
- package/lib/labs/VDatePicker/mixins/date-picker-table.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/eventHelpers.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/index.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/isDateAllowed.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/monthChange.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/pad.mjs.map +1 -0
- package/lib/labs/VDatePicker/util/sanitizeDateString.mjs.map +1 -0
- package/lib/labs/VDatePicker/utils.mjs +69 -0
- package/lib/labs/VDatePicker/utils.mjs.map +1 -0
- package/lib/labs/VDateRangePicker/VDateRangeCard.mjs +87 -0
- package/lib/labs/VDateRangePicker/VDateRangeCard.mjs.map +1 -0
- package/lib/labs/VDateRangePicker/VDateRangeCard.sass +33 -0
- package/lib/labs/VDateRangePicker/VDateRangePicker.mjs +131 -0
- package/lib/labs/VDateRangePicker/VDateRangePicker.mjs.map +1 -0
- package/lib/labs/VDateRangePicker/VDateRangePicker.sass +21 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs +103 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs.map +1 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.sass +39 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs +61 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs.map +1 -0
- package/lib/labs/VDateRangePicker/VDateRangePickerMonth.sass +12 -0
- package/lib/labs/VDateRangePicker/index.d.mts +1065 -0
- package/lib/labs/VDateRangePicker/index.mjs +3 -0
- package/lib/labs/VDateRangePicker/index.mjs.map +1 -0
- package/lib/labs/VPicker/VPicker.css +57 -0
- package/lib/labs/VPicker/VPicker.mjs +47 -0
- package/lib/labs/VPicker/VPicker.mjs.map +1 -0
- package/lib/labs/VPicker/VPicker.sass +53 -0
- package/lib/labs/VPicker/VPickerTitle.mjs +4 -0
- package/lib/labs/VPicker/VPickerTitle.mjs.map +1 -0
- package/lib/labs/VPicker/index.d.mts +541 -0
- package/lib/labs/VPicker/index.mjs +3 -0
- package/lib/labs/VPicker/index.mjs.map +1 -0
- package/lib/labs/components.d.mts +5136 -198
- package/lib/labs/components.mjs +2 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/labs/date/DateAdapter.mjs.map +1 -1
- package/lib/labs/date/adapters/vuetify.d.mts +28 -25
- package/lib/labs/date/adapters/vuetify.mjs +65 -75
- package/lib/labs/date/adapters/vuetify.mjs.map +1 -1
- package/lib/labs/date/date.mjs +82 -11
- package/lib/labs/date/date.mjs.map +1 -1
- package/lib/labs/date/index.d.mts +31 -30
- package/lib/locale/af.mjs +14 -5
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +14 -5
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +14 -5
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +14 -5
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +14 -5
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +14 -5
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +14 -5
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +14 -5
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +14 -5
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +14 -5
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +14 -5
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +14 -5
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +14 -5
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +14 -5
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +14 -5
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +14 -5
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +14 -5
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +14 -5
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +14 -5
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +14 -5
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +588 -210
- package/lib/locale/it.mjs +14 -5
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +14 -5
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs +14 -5
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +14 -5
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +14 -5
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +14 -5
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +14 -5
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +14 -5
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +14 -5
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +14 -5
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +14 -5
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +14 -5
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +14 -5
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +14 -5
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +14 -5
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +14 -5
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +14 -5
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +14 -5
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +14 -5
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +14 -5
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +14 -5
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +14 -5
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/util/dateTimeUtils.mjs +68 -0
- package/lib/util/dateTimeUtils.mjs.map +1 -1
- package/package.json +5 -2
- package/lib/components/VDatePicker/VDatePicker.mjs +0 -475
- package/lib/components/VDatePicker/VDatePicker.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs +0 -120
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerHeader.mjs +0 -136
- package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerHeader.sass +0 -46
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +0 -48
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs +0 -84
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerYears.sass +0 -30
- package/lib/components/VDatePicker/index.mjs +0 -18
- package/lib/components/VDatePicker/index.mjs.map +0 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +0 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +0 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +0 -1
- package/lib/components/VDatePicker/util/index.mjs.map +0 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +0 -1
- package/lib/components/VDatePicker/util/monthChange.mjs.map +0 -1
- package/lib/components/VDatePicker/util/pad.mjs.map +0 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +0 -1
- package/lib/components/VPicker/VPicker.mjs +0 -86
- package/lib/components/VPicker/VPicker.mjs.map +0 -1
- package/lib/components/VPicker/VPicker.sass +0 -94
- package/lib/components/VPicker/index.mjs +0 -4
- package/lib/components/VPicker/index.mjs.map +0 -1
- /package/lib/{components → labs}/VDatePicker/VDatePickerTable.sass +0 -0
- /package/lib/{components → labs}/VDatePicker/VDatePickerTitle.sass +0 -0
- /package/lib/{components → labs}/VDatePicker/_variables.scss +0 -0
- /package/lib/{components → labs}/VDatePicker/mixins/date-picker-table.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/eventHelpers.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/index.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/isDateAllowed.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/monthChange.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/pad.mjs +0 -0
- /package/lib/{components → labs}/VDatePicker/util/sanitizeDateString.mjs +0 -0
- /package/lib/{components → labs}/VPicker/_variables.scss +0 -0
package/dist/vuetify-labs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.3.
|
|
2
|
+
* Vuetify v3.3.4
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1647,12 +1647,21 @@
|
|
|
1647
1647
|
lastPage: 'Last page',
|
|
1648
1648
|
pageText: '{0}-{1} of {2}'
|
|
1649
1649
|
},
|
|
1650
|
+
dateRangeInput: {
|
|
1651
|
+
divider: 'to'
|
|
1652
|
+
},
|
|
1650
1653
|
datePicker: {
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1654
|
+
ok: 'OK',
|
|
1655
|
+
cancel: 'Cancel',
|
|
1656
|
+
range: {
|
|
1657
|
+
title: 'Select dates',
|
|
1658
|
+
header: 'Enter dates'
|
|
1659
|
+
},
|
|
1660
|
+
title: 'Select date',
|
|
1661
|
+
header: 'Enter date',
|
|
1662
|
+
input: {
|
|
1663
|
+
placeholder: 'Enter date'
|
|
1664
|
+
}
|
|
1656
1665
|
},
|
|
1657
1666
|
noDataText: 'No data available',
|
|
1658
1667
|
carousel: {
|
|
@@ -3635,7 +3644,7 @@
|
|
|
3635
3644
|
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
|
3636
3645
|
return height + extensionHeight;
|
|
3637
3646
|
});
|
|
3638
|
-
|
|
3647
|
+
vue.watchEffect(() => {
|
|
3639
3648
|
if (scrollBehavior.value.hide) {
|
|
3640
3649
|
if (scrollBehavior.value.inverted) {
|
|
3641
3650
|
isActive.value = currentScroll.value > scrollThreshold.value;
|
|
@@ -3645,12 +3654,6 @@
|
|
|
3645
3654
|
} else {
|
|
3646
3655
|
isActive.value = true;
|
|
3647
3656
|
}
|
|
3648
|
-
}
|
|
3649
|
-
useToggleScope(() => !!props.scrollBehavior, () => {
|
|
3650
|
-
vue.watch(currentScroll, setActive, {
|
|
3651
|
-
immediate: true
|
|
3652
|
-
});
|
|
3653
|
-
vue.watch(scrollBehavior, setActive);
|
|
3654
3657
|
});
|
|
3655
3658
|
const {
|
|
3656
3659
|
ssrBootStyles
|
|
@@ -4105,7 +4108,8 @@
|
|
|
4105
4108
|
unfold: 'mdi-unfold-more-horizontal',
|
|
4106
4109
|
file: 'mdi-paperclip',
|
|
4107
4110
|
plus: 'mdi-plus',
|
|
4108
|
-
minus: 'mdi-minus'
|
|
4111
|
+
minus: 'mdi-minus',
|
|
4112
|
+
calendar: 'mdi-calendar'
|
|
4109
4113
|
};
|
|
4110
4114
|
const mdi = {
|
|
4111
4115
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -7315,7 +7319,7 @@
|
|
|
7315
7319
|
const useNestedItem = (id, isGroup) => {
|
|
7316
7320
|
const parent = vue.inject(VNestedSymbol, emptyNested);
|
|
7317
7321
|
const uidSymbol = Symbol(getUid());
|
|
7318
|
-
const computedId = vue.computed(() => id.value
|
|
7322
|
+
const computedId = vue.computed(() => id.value !== undefined ? id.value : uidSymbol);
|
|
7319
7323
|
const item = {
|
|
7320
7324
|
...parent,
|
|
7321
7325
|
id: computedId,
|
|
@@ -7515,7 +7519,7 @@
|
|
|
7515
7519
|
emit
|
|
7516
7520
|
} = _ref;
|
|
7517
7521
|
const link = useLink(props, attrs);
|
|
7518
|
-
const id = vue.computed(() => props.value
|
|
7522
|
+
const id = vue.computed(() => props.value === undefined ? link.href.value : props.value);
|
|
7519
7523
|
const {
|
|
7520
7524
|
select,
|
|
7521
7525
|
isSelected,
|
|
@@ -7912,10 +7916,13 @@
|
|
|
7912
7916
|
}
|
|
7913
7917
|
function useTransformItems(items, transform) {
|
|
7914
7918
|
function transformIn(value) {
|
|
7915
|
-
return value
|
|
7919
|
+
return value
|
|
7920
|
+
// When the model value is null, returns an InternalItem based on null
|
|
7921
|
+
// only if null is one of the items
|
|
7922
|
+
.filter(v => v !== null || items.value.some(item => item.value === null)).map(v => {
|
|
7916
7923
|
const existingItem = items.value.find(item => deepEqual(v, item.value));
|
|
7917
7924
|
// Nullish existingItem means value is a custom input value from combobox
|
|
7918
|
-
// In this case, use transformItem to create an
|
|
7925
|
+
// In this case, use transformItem to create an InternalItem based on value
|
|
7919
7926
|
return existingItem ?? transform(v);
|
|
7920
7927
|
});
|
|
7921
7928
|
}
|
|
@@ -10445,7 +10452,7 @@
|
|
|
10445
10452
|
transformIn,
|
|
10446
10453
|
transformOut
|
|
10447
10454
|
} = useItems(props);
|
|
10448
|
-
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
|
10455
|
+
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
|
|
10449
10456
|
const transformed = transformOut(v);
|
|
10450
10457
|
return props.multiple ? transformed : transformed[0] ?? null;
|
|
10451
10458
|
});
|
|
@@ -10870,7 +10877,7 @@
|
|
|
10870
10877
|
textColorStyles
|
|
10871
10878
|
} = useTextColor(color);
|
|
10872
10879
|
const search = useProxiedModel(props, 'search', '');
|
|
10873
|
-
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
|
10880
|
+
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
|
|
10874
10881
|
const transformed = transformOut(v);
|
|
10875
10882
|
return props.multiple ? transformed : transformed[0] ?? null;
|
|
10876
10883
|
});
|
|
@@ -15197,8 +15204,6 @@
|
|
|
15197
15204
|
"modelValue": model.value,
|
|
15198
15205
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
15199
15206
|
"class": ['v-file-input', {
|
|
15200
|
-
'v-file-input--chips': !!props.chips,
|
|
15201
|
-
'v-file-input--selection-slot': !!slots.selection,
|
|
15202
15207
|
'v-text-field--plain-underlined': isPlainOrUnderlined.value
|
|
15203
15208
|
}, props.class],
|
|
15204
15209
|
"style": props.style,
|
|
@@ -18195,8 +18200,8 @@
|
|
|
18195
18200
|
const initialScale = prevBox[widthHeight] / nextBox[widthHeight];
|
|
18196
18201
|
const sigma = 1.5;
|
|
18197
18202
|
animate(nextEl, {
|
|
18198
|
-
backgroundColor: [color, ''],
|
|
18199
|
-
transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, ''],
|
|
18203
|
+
backgroundColor: [color, 'currentcolor'],
|
|
18204
|
+
transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, 'none'],
|
|
18200
18205
|
transformOrigin: Array(3).fill(origin)
|
|
18201
18206
|
}, {
|
|
18202
18207
|
duration: 225,
|
|
@@ -20235,7 +20240,7 @@
|
|
|
20235
20240
|
function createHeaders(props, options) {
|
|
20236
20241
|
const headers = vue.ref([]);
|
|
20237
20242
|
const columns = vue.ref([]);
|
|
20238
|
-
vue.
|
|
20243
|
+
vue.watchEffect(() => {
|
|
20239
20244
|
const wrapped = !props.headers.length ? [] : Array.isArray(props.headers[0]) ? props.headers : [props.headers];
|
|
20240
20245
|
const flat = wrapped.flatMap((row, index) => row.map(column => ({
|
|
20241
20246
|
column,
|
|
@@ -20355,9 +20360,6 @@
|
|
|
20355
20360
|
return filtered;
|
|
20356
20361
|
});
|
|
20357
20362
|
columns.value = fixedRows.at(-1) ?? [];
|
|
20358
|
-
}, {
|
|
20359
|
-
deep: true,
|
|
20360
|
-
immediate: true
|
|
20361
20363
|
});
|
|
20362
20364
|
const data = {
|
|
20363
20365
|
headers,
|
|
@@ -21190,18 +21192,22 @@
|
|
|
21190
21192
|
"items": displayItems.value
|
|
21191
21193
|
}), {
|
|
21192
21194
|
...slots,
|
|
21193
|
-
item: itemSlotProps => {
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21195
|
+
item: itemSlotProps => vue.createVNode(VVirtualScrollItem, {
|
|
21196
|
+
"key": itemSlotProps.item.index,
|
|
21197
|
+
"dynamicHeight": true,
|
|
21198
|
+
"renderless": true,
|
|
21199
|
+
"onUpdate:height": height => handleItemResize(itemSlotProps.item.index, height)
|
|
21200
|
+
}, {
|
|
21201
|
+
default: slotProps => slots.item?.({
|
|
21202
|
+
...itemSlotProps,
|
|
21203
|
+
props: {
|
|
21204
|
+
...itemSlotProps.props,
|
|
21205
|
+
...slotProps?.props
|
|
21206
|
+
}
|
|
21207
|
+
}) ?? vue.createVNode(VDataTableRow, vue.mergeProps(itemSlotProps.props, slotProps?.props, {
|
|
21208
|
+
"key": itemSlotProps.item.index
|
|
21209
|
+
}), slots)
|
|
21210
|
+
})
|
|
21205
21211
|
}), vue.createVNode("tr", {
|
|
21206
21212
|
"style": {
|
|
21207
21213
|
height: convertToUnit(paddingBottom.value),
|
|
@@ -21389,835 +21395,220 @@
|
|
|
21389
21395
|
}
|
|
21390
21396
|
});
|
|
21391
21397
|
|
|
21392
|
-
//
|
|
21393
|
-
|
|
21394
|
-
const makeVInfiniteScrollProps = propsFactory({
|
|
21395
|
-
color: String,
|
|
21396
|
-
direction: {
|
|
21397
|
-
type: String,
|
|
21398
|
-
default: 'vertical',
|
|
21399
|
-
validator: v => ['vertical', 'horizontal'].includes(v)
|
|
21400
|
-
},
|
|
21401
|
-
side: {
|
|
21402
|
-
type: String,
|
|
21403
|
-
default: 'end',
|
|
21404
|
-
validator: v => ['start', 'end', 'both'].includes(v)
|
|
21405
|
-
},
|
|
21406
|
-
mode: {
|
|
21407
|
-
type: String,
|
|
21408
|
-
default: 'intersect',
|
|
21409
|
-
validator: v => ['intersect', 'manual'].includes(v)
|
|
21410
|
-
},
|
|
21411
|
-
margin: [Number, String],
|
|
21412
|
-
loadMoreText: {
|
|
21413
|
-
type: String,
|
|
21414
|
-
default: '$vuetify.infiniteScroll.loadMore'
|
|
21415
|
-
},
|
|
21416
|
-
emptyText: {
|
|
21417
|
-
type: String,
|
|
21418
|
-
default: '$vuetify.infiniteScroll.empty'
|
|
21419
|
-
},
|
|
21420
|
-
...makeDimensionProps(),
|
|
21421
|
-
...makeTagProps()
|
|
21422
|
-
}, 'VInfiniteScroll');
|
|
21423
|
-
const VInfiniteScrollIntersect = defineComponent({
|
|
21424
|
-
name: 'VInfiniteScrollIntersect',
|
|
21425
|
-
props: {
|
|
21426
|
-
side: {
|
|
21427
|
-
type: String,
|
|
21428
|
-
required: true
|
|
21429
|
-
},
|
|
21430
|
-
rootRef: null,
|
|
21431
|
-
rootMargin: String
|
|
21432
|
-
},
|
|
21433
|
-
emits: {
|
|
21434
|
-
intersect: side => true
|
|
21435
|
-
},
|
|
21436
|
-
setup(props, _ref) {
|
|
21437
|
-
let {
|
|
21438
|
-
emit
|
|
21439
|
-
} = _ref;
|
|
21440
|
-
const {
|
|
21441
|
-
intersectionRef,
|
|
21442
|
-
isIntersecting
|
|
21443
|
-
} = useIntersectionObserver(entries => {}, props.rootMargin ? {
|
|
21444
|
-
root: props.rootRef,
|
|
21445
|
-
rootMargin: props.rootMargin
|
|
21446
|
-
} : undefined);
|
|
21447
|
-
vue.watch(isIntersecting, async val => {
|
|
21448
|
-
if (val) emit('intersect', props.side);
|
|
21449
|
-
});
|
|
21450
|
-
useRender(() => vue.createVNode("div", {
|
|
21451
|
-
"class": "v-infinite-scroll-intersect",
|
|
21452
|
-
"ref": intersectionRef
|
|
21453
|
-
}, [vue.createTextVNode("\xA0")]));
|
|
21454
|
-
return {};
|
|
21455
|
-
}
|
|
21456
|
-
});
|
|
21457
|
-
const VInfiniteScroll = genericComponent()({
|
|
21458
|
-
name: 'VInfiniteScroll',
|
|
21459
|
-
props: makeVInfiniteScrollProps(),
|
|
21460
|
-
emits: {
|
|
21461
|
-
load: options => true
|
|
21462
|
-
},
|
|
21463
|
-
setup(props, _ref2) {
|
|
21464
|
-
let {
|
|
21465
|
-
slots,
|
|
21466
|
-
emit
|
|
21467
|
-
} = _ref2;
|
|
21468
|
-
const rootEl = vue.ref();
|
|
21469
|
-
const startStatus = vue.ref('ok');
|
|
21470
|
-
const endStatus = vue.ref('ok');
|
|
21471
|
-
const margin = vue.computed(() => convertToUnit(props.margin));
|
|
21472
|
-
function setScrollAmount(amount) {
|
|
21473
|
-
if (!rootEl.value) return;
|
|
21474
|
-
const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
21475
|
-
rootEl.value[property] = amount;
|
|
21476
|
-
}
|
|
21477
|
-
function getScrollAmount() {
|
|
21478
|
-
if (!rootEl.value) return 0;
|
|
21479
|
-
const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
21480
|
-
return rootEl.value[property];
|
|
21481
|
-
}
|
|
21482
|
-
function getScrollSize() {
|
|
21483
|
-
if (!rootEl.value) return 0;
|
|
21484
|
-
const property = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';
|
|
21485
|
-
return rootEl.value[property];
|
|
21486
|
-
}
|
|
21487
|
-
function getContainerSize() {
|
|
21488
|
-
if (!rootEl.value) return 0;
|
|
21489
|
-
const property = props.direction === 'vertical' ? 'clientHeight' : 'clientWidth';
|
|
21490
|
-
return rootEl.value[property];
|
|
21491
|
-
}
|
|
21492
|
-
vue.onMounted(() => {
|
|
21493
|
-
if (!rootEl.value) return;
|
|
21494
|
-
if (props.side === 'start') {
|
|
21495
|
-
setScrollAmount(getScrollSize());
|
|
21496
|
-
} else if (props.side === 'both') {
|
|
21497
|
-
setScrollAmount(getScrollSize() / 2 - getContainerSize() / 2);
|
|
21498
|
-
}
|
|
21499
|
-
});
|
|
21500
|
-
function setStatus(side, status) {
|
|
21501
|
-
if (side === 'start') {
|
|
21502
|
-
startStatus.value = status;
|
|
21503
|
-
} else if (side === 'end') {
|
|
21504
|
-
endStatus.value = status;
|
|
21505
|
-
}
|
|
21506
|
-
}
|
|
21507
|
-
function getStatus(side) {
|
|
21508
|
-
return side === 'start' ? startStatus.value : endStatus.value;
|
|
21509
|
-
}
|
|
21510
|
-
let previousScrollSize = 0;
|
|
21511
|
-
function handleIntersect(side) {
|
|
21512
|
-
const status = getStatus(side);
|
|
21513
|
-
if (!rootEl.value || status === 'loading') return;
|
|
21514
|
-
previousScrollSize = getScrollSize();
|
|
21515
|
-
setStatus(side, 'loading');
|
|
21516
|
-
function done(status) {
|
|
21517
|
-
setStatus(side, status);
|
|
21518
|
-
vue.nextTick(() => {
|
|
21519
|
-
if (status === 'ok' && side === 'start') {
|
|
21520
|
-
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
|
21521
|
-
}
|
|
21522
|
-
});
|
|
21523
|
-
}
|
|
21524
|
-
emit('load', {
|
|
21525
|
-
side,
|
|
21526
|
-
done
|
|
21527
|
-
});
|
|
21528
|
-
}
|
|
21529
|
-
const {
|
|
21530
|
-
t
|
|
21531
|
-
} = useLocale();
|
|
21532
|
-
function renderSide(side, status) {
|
|
21533
|
-
if (props.side !== side && props.side !== 'both') return;
|
|
21534
|
-
const onClick = () => handleIntersect(side);
|
|
21535
|
-
const slotProps = {
|
|
21536
|
-
side,
|
|
21537
|
-
props: {
|
|
21538
|
-
onClick,
|
|
21539
|
-
color: props.color
|
|
21540
|
-
}
|
|
21541
|
-
};
|
|
21542
|
-
if (status === 'error') return slots.error?.(slotProps);
|
|
21543
|
-
if (status === 'empty') return slots.empty?.(slotProps) ?? vue.createVNode("div", null, [t(props.emptyText)]);
|
|
21544
|
-
if (props.mode === 'manual') {
|
|
21545
|
-
if (status === 'loading') {
|
|
21546
|
-
return slots.loading?.(slotProps) ?? vue.createVNode(VProgressCircular, {
|
|
21547
|
-
"indeterminate": true,
|
|
21548
|
-
"color": props.color
|
|
21549
|
-
}, null);
|
|
21550
|
-
}
|
|
21551
|
-
return slots['load-more']?.(slotProps) ?? vue.createVNode(VBtn, {
|
|
21552
|
-
"variant": "outlined",
|
|
21553
|
-
"color": props.color,
|
|
21554
|
-
"onClick": onClick
|
|
21555
|
-
}, {
|
|
21556
|
-
default: () => [t(props.loadMoreText)]
|
|
21557
|
-
});
|
|
21558
|
-
}
|
|
21559
|
-
return slots.loading?.(slotProps) ?? vue.createVNode(VProgressCircular, {
|
|
21560
|
-
"indeterminate": true,
|
|
21561
|
-
"color": props.color
|
|
21562
|
-
}, null);
|
|
21563
|
-
}
|
|
21564
|
-
const {
|
|
21565
|
-
dimensionStyles
|
|
21566
|
-
} = useDimension(props);
|
|
21567
|
-
useRender(() => {
|
|
21568
|
-
const Tag = props.tag;
|
|
21569
|
-
const hasStartIntersect = props.side === 'start' || props.side === 'both';
|
|
21570
|
-
const hasEndIntersect = props.side === 'end' || props.side === 'both';
|
|
21571
|
-
const intersectMode = props.mode === 'intersect';
|
|
21572
|
-
return vue.createVNode(Tag, {
|
|
21573
|
-
"ref": rootEl,
|
|
21574
|
-
"class": ['v-infinite-scroll', `v-infinite-scroll--${props.direction}`, {
|
|
21575
|
-
'v-infinite-scroll--start': hasStartIntersect,
|
|
21576
|
-
'v-infinite-scroll--end': hasEndIntersect
|
|
21577
|
-
}],
|
|
21578
|
-
"style": dimensionStyles.value
|
|
21579
|
-
}, {
|
|
21580
|
-
default: () => [vue.createVNode("div", {
|
|
21581
|
-
"class": "v-infinite-scroll__side"
|
|
21582
|
-
}, [renderSide('start', startStatus.value)]), rootEl.value && hasStartIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
21583
|
-
"key": "start",
|
|
21584
|
-
"side": "start",
|
|
21585
|
-
"onIntersect": handleIntersect,
|
|
21586
|
-
"rootRef": rootEl.value,
|
|
21587
|
-
"rootMargin": margin.value
|
|
21588
|
-
}, null), slots.default?.(), rootEl.value && hasEndIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
21589
|
-
"key": "end",
|
|
21590
|
-
"side": "end",
|
|
21591
|
-
"onIntersect": handleIntersect,
|
|
21592
|
-
"rootRef": rootEl.value,
|
|
21593
|
-
"rootMargin": margin.value
|
|
21594
|
-
}, null), vue.createVNode("div", {
|
|
21595
|
-
"class": "v-infinite-scroll__side"
|
|
21596
|
-
}, [renderSide('end', endStatus.value)])]
|
|
21597
|
-
});
|
|
21598
|
-
});
|
|
21599
|
-
}
|
|
21600
|
-
});
|
|
21398
|
+
// Utilities
|
|
21601
21399
|
|
|
21602
21400
|
// Types
|
|
21603
21401
|
|
|
21604
|
-
const
|
|
21605
|
-
|
|
21606
|
-
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21402
|
+
const firstDay = {
|
|
21403
|
+
'001': 1,
|
|
21404
|
+
AD: 1,
|
|
21405
|
+
AE: 6,
|
|
21406
|
+
AF: 6,
|
|
21407
|
+
AG: 0,
|
|
21408
|
+
AI: 1,
|
|
21409
|
+
AL: 1,
|
|
21410
|
+
AM: 1,
|
|
21411
|
+
AN: 1,
|
|
21412
|
+
AR: 1,
|
|
21413
|
+
AS: 0,
|
|
21414
|
+
AT: 1,
|
|
21415
|
+
AU: 1,
|
|
21416
|
+
AX: 1,
|
|
21417
|
+
AZ: 1,
|
|
21418
|
+
BA: 1,
|
|
21419
|
+
BD: 0,
|
|
21420
|
+
BE: 1,
|
|
21421
|
+
BG: 1,
|
|
21422
|
+
BH: 6,
|
|
21423
|
+
BM: 1,
|
|
21424
|
+
BN: 1,
|
|
21425
|
+
BR: 0,
|
|
21426
|
+
BS: 0,
|
|
21427
|
+
BT: 0,
|
|
21428
|
+
BW: 0,
|
|
21429
|
+
BY: 1,
|
|
21430
|
+
BZ: 0,
|
|
21431
|
+
CA: 0,
|
|
21432
|
+
CH: 1,
|
|
21433
|
+
CL: 1,
|
|
21434
|
+
CM: 1,
|
|
21435
|
+
CN: 1,
|
|
21436
|
+
CO: 0,
|
|
21437
|
+
CR: 1,
|
|
21438
|
+
CY: 1,
|
|
21439
|
+
CZ: 1,
|
|
21440
|
+
DE: 1,
|
|
21441
|
+
DJ: 6,
|
|
21442
|
+
DK: 1,
|
|
21443
|
+
DM: 0,
|
|
21444
|
+
DO: 0,
|
|
21445
|
+
DZ: 6,
|
|
21446
|
+
EC: 1,
|
|
21447
|
+
EE: 1,
|
|
21448
|
+
EG: 6,
|
|
21449
|
+
ES: 1,
|
|
21450
|
+
ET: 0,
|
|
21451
|
+
FI: 1,
|
|
21452
|
+
FJ: 1,
|
|
21453
|
+
FO: 1,
|
|
21454
|
+
FR: 1,
|
|
21455
|
+
GB: 1,
|
|
21456
|
+
'GB-alt-variant': 0,
|
|
21457
|
+
GE: 1,
|
|
21458
|
+
GF: 1,
|
|
21459
|
+
GP: 1,
|
|
21460
|
+
GR: 1,
|
|
21461
|
+
GT: 0,
|
|
21462
|
+
GU: 0,
|
|
21463
|
+
HK: 0,
|
|
21464
|
+
HN: 0,
|
|
21465
|
+
HR: 1,
|
|
21466
|
+
HU: 1,
|
|
21467
|
+
ID: 0,
|
|
21468
|
+
IE: 1,
|
|
21469
|
+
IL: 0,
|
|
21470
|
+
IN: 0,
|
|
21471
|
+
IQ: 6,
|
|
21472
|
+
IR: 6,
|
|
21473
|
+
IS: 1,
|
|
21474
|
+
IT: 1,
|
|
21475
|
+
JM: 0,
|
|
21476
|
+
JO: 6,
|
|
21477
|
+
JP: 0,
|
|
21478
|
+
KE: 0,
|
|
21479
|
+
KG: 1,
|
|
21480
|
+
KH: 0,
|
|
21481
|
+
KR: 0,
|
|
21482
|
+
KW: 6,
|
|
21483
|
+
KZ: 1,
|
|
21484
|
+
LA: 0,
|
|
21485
|
+
LB: 1,
|
|
21486
|
+
LI: 1,
|
|
21487
|
+
LK: 1,
|
|
21488
|
+
LT: 1,
|
|
21489
|
+
LU: 1,
|
|
21490
|
+
LV: 1,
|
|
21491
|
+
LY: 6,
|
|
21492
|
+
MC: 1,
|
|
21493
|
+
MD: 1,
|
|
21494
|
+
ME: 1,
|
|
21495
|
+
MH: 0,
|
|
21496
|
+
MK: 1,
|
|
21497
|
+
MM: 0,
|
|
21498
|
+
MN: 1,
|
|
21499
|
+
MO: 0,
|
|
21500
|
+
MQ: 1,
|
|
21501
|
+
MT: 0,
|
|
21502
|
+
MV: 5,
|
|
21503
|
+
MX: 0,
|
|
21504
|
+
MY: 1,
|
|
21505
|
+
MZ: 0,
|
|
21506
|
+
NI: 0,
|
|
21507
|
+
NL: 1,
|
|
21508
|
+
NO: 1,
|
|
21509
|
+
NP: 0,
|
|
21510
|
+
NZ: 1,
|
|
21511
|
+
OM: 6,
|
|
21512
|
+
PA: 0,
|
|
21513
|
+
PE: 0,
|
|
21514
|
+
PH: 0,
|
|
21515
|
+
PK: 0,
|
|
21516
|
+
PL: 1,
|
|
21517
|
+
PR: 0,
|
|
21518
|
+
PT: 0,
|
|
21519
|
+
PY: 0,
|
|
21520
|
+
QA: 6,
|
|
21521
|
+
RE: 1,
|
|
21522
|
+
RO: 1,
|
|
21523
|
+
RS: 1,
|
|
21524
|
+
RU: 1,
|
|
21525
|
+
SA: 0,
|
|
21526
|
+
SD: 6,
|
|
21527
|
+
SE: 1,
|
|
21528
|
+
SG: 0,
|
|
21529
|
+
SI: 1,
|
|
21530
|
+
SK: 1,
|
|
21531
|
+
SM: 1,
|
|
21532
|
+
SV: 0,
|
|
21533
|
+
SY: 6,
|
|
21534
|
+
TH: 0,
|
|
21535
|
+
TJ: 1,
|
|
21536
|
+
TM: 1,
|
|
21537
|
+
TR: 1,
|
|
21538
|
+
TT: 0,
|
|
21539
|
+
TW: 0,
|
|
21540
|
+
UA: 1,
|
|
21541
|
+
UM: 0,
|
|
21542
|
+
US: 0,
|
|
21543
|
+
UY: 1,
|
|
21544
|
+
UZ: 1,
|
|
21545
|
+
VA: 1,
|
|
21546
|
+
VE: 0,
|
|
21547
|
+
VI: 0,
|
|
21548
|
+
VN: 1,
|
|
21549
|
+
WS: 0,
|
|
21550
|
+
XK: 1,
|
|
21551
|
+
YE: 0,
|
|
21552
|
+
ZA: 0,
|
|
21553
|
+
ZW: 0
|
|
21635
21554
|
};
|
|
21636
|
-
function
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
|
|
21642
|
-
|
|
21643
|
-
|
|
21644
|
-
|
|
21645
|
-
|
|
21646
|
-
|
|
21647
|
-
|
|
21648
|
-
|
|
21649
|
-
|
|
21650
|
-
}).map(() => genStructure(type));
|
|
21651
|
-
}
|
|
21652
|
-
function genStructure(type) {
|
|
21653
|
-
let children = [];
|
|
21654
|
-
if (!type) return children;
|
|
21555
|
+
function getWeekArray(date, locale) {
|
|
21556
|
+
const weeks = [];
|
|
21557
|
+
let currentWeek = [];
|
|
21558
|
+
const firstDayOfMonth = startOfMonth(date);
|
|
21559
|
+
const lastDayOfMonth = endOfMonth(date);
|
|
21560
|
+
const firstDayWeekIndex = firstDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
|
|
21561
|
+
const lastDayWeekIndex = lastDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
|
|
21562
|
+
for (let i = 0; i < firstDayWeekIndex; i++) {
|
|
21563
|
+
const adjacentDay = new Date(firstDayOfMonth);
|
|
21564
|
+
adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));
|
|
21565
|
+
currentWeek.push(adjacentDay);
|
|
21566
|
+
}
|
|
21567
|
+
for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
|
|
21568
|
+
const day = new Date(date.getFullYear(), date.getMonth(), i);
|
|
21655
21569
|
|
|
21656
|
-
|
|
21657
|
-
|
|
21570
|
+
// Add the day to the current week
|
|
21571
|
+
currentWeek.push(day);
|
|
21658
21572
|
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21672
|
-
return [genBone(type, children)];
|
|
21573
|
+
// If the current week has 7 days, add it to the weeks array and start a new week
|
|
21574
|
+
if (currentWeek.length === 7) {
|
|
21575
|
+
weeks.push(currentWeek);
|
|
21576
|
+
currentWeek = [];
|
|
21577
|
+
}
|
|
21578
|
+
}
|
|
21579
|
+
for (let i = 1; i < 7 - lastDayWeekIndex; i++) {
|
|
21580
|
+
const adjacentDay = new Date(lastDayOfMonth);
|
|
21581
|
+
adjacentDay.setDate(adjacentDay.getDate() + i);
|
|
21582
|
+
currentWeek.push(adjacentDay);
|
|
21583
|
+
}
|
|
21584
|
+
weeks.push(currentWeek);
|
|
21585
|
+
return weeks;
|
|
21673
21586
|
}
|
|
21674
|
-
function
|
|
21675
|
-
|
|
21676
|
-
return bones.replace(/\s/g, '').split(',').map(genStructure);
|
|
21587
|
+
function startOfMonth(date) {
|
|
21588
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
21677
21589
|
}
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
color: String,
|
|
21681
|
-
loading: Boolean,
|
|
21682
|
-
loadingText: {
|
|
21683
|
-
type: String,
|
|
21684
|
-
default: '$vuetify.loading'
|
|
21685
|
-
},
|
|
21686
|
-
type: {
|
|
21687
|
-
type: [String, Array],
|
|
21688
|
-
default: 'image'
|
|
21689
|
-
},
|
|
21690
|
-
...makeDimensionProps(),
|
|
21691
|
-
...makeElevationProps(),
|
|
21692
|
-
...makeThemeProps()
|
|
21693
|
-
}, 'VSkeletonLoader');
|
|
21694
|
-
const VSkeletonLoader = genericComponent()({
|
|
21695
|
-
name: 'VSkeletonLoader',
|
|
21696
|
-
props: makeVSkeletonLoaderProps(),
|
|
21697
|
-
setup(props, _ref) {
|
|
21698
|
-
let {
|
|
21699
|
-
slots
|
|
21700
|
-
} = _ref;
|
|
21701
|
-
const {
|
|
21702
|
-
backgroundColorClasses,
|
|
21703
|
-
backgroundColorStyles
|
|
21704
|
-
} = useBackgroundColor(vue.toRef(props, 'color'));
|
|
21705
|
-
const {
|
|
21706
|
-
dimensionStyles
|
|
21707
|
-
} = useDimension(props);
|
|
21708
|
-
const {
|
|
21709
|
-
elevationClasses
|
|
21710
|
-
} = useElevation(props);
|
|
21711
|
-
const {
|
|
21712
|
-
themeClasses
|
|
21713
|
-
} = provideTheme(props);
|
|
21714
|
-
const {
|
|
21715
|
-
t
|
|
21716
|
-
} = useLocale();
|
|
21717
|
-
const items = vue.computed(() => genStructure(wrapInArray(props.type).join(',')));
|
|
21718
|
-
useRender(() => {
|
|
21719
|
-
const isLoading = !slots.default || props.loading;
|
|
21720
|
-
return vue.createVNode("div", {
|
|
21721
|
-
"class": ['v-skeleton-loader', {
|
|
21722
|
-
'v-skeleton-loader--boilerplate': props.boilerplate
|
|
21723
|
-
}, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
|
|
21724
|
-
"style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
|
|
21725
|
-
"aria-busy": !props.boilerplate ? isLoading : undefined,
|
|
21726
|
-
"aria-live": !props.boilerplate ? 'polite' : undefined,
|
|
21727
|
-
"aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
|
|
21728
|
-
"role": !props.boilerplate ? 'alert' : undefined
|
|
21729
|
-
}, [isLoading ? items.value : slots.default?.()]);
|
|
21730
|
-
});
|
|
21731
|
-
return {};
|
|
21732
|
-
}
|
|
21733
|
-
});
|
|
21734
|
-
|
|
21735
|
-
var components = /*#__PURE__*/Object.freeze({
|
|
21736
|
-
__proto__: null,
|
|
21737
|
-
VAlert: VAlert,
|
|
21738
|
-
VAlertTitle: VAlertTitle,
|
|
21739
|
-
VApp: VApp,
|
|
21740
|
-
VAppBar: VAppBar,
|
|
21741
|
-
VAppBarNavIcon: VAppBarNavIcon,
|
|
21742
|
-
VAppBarTitle: VAppBarTitle,
|
|
21743
|
-
VAutocomplete: VAutocomplete,
|
|
21744
|
-
VAvatar: VAvatar,
|
|
21745
|
-
VBadge: VBadge,
|
|
21746
|
-
VBanner: VBanner,
|
|
21747
|
-
VBannerActions: VBannerActions,
|
|
21748
|
-
VBannerText: VBannerText,
|
|
21749
|
-
VBottomNavigation: VBottomNavigation,
|
|
21750
|
-
VBottomSheet: VBottomSheet,
|
|
21751
|
-
VBreadcrumbs: VBreadcrumbs,
|
|
21752
|
-
VBreadcrumbsDivider: VBreadcrumbsDivider,
|
|
21753
|
-
VBreadcrumbsItem: VBreadcrumbsItem,
|
|
21754
|
-
VBtn: VBtn,
|
|
21755
|
-
VBtnGroup: VBtnGroup,
|
|
21756
|
-
VBtnToggle: VBtnToggle,
|
|
21757
|
-
VCard: VCard,
|
|
21758
|
-
VCardActions: VCardActions,
|
|
21759
|
-
VCardItem: VCardItem,
|
|
21760
|
-
VCardSubtitle: VCardSubtitle,
|
|
21761
|
-
VCardText: VCardText,
|
|
21762
|
-
VCardTitle: VCardTitle,
|
|
21763
|
-
VCarousel: VCarousel,
|
|
21764
|
-
VCarouselItem: VCarouselItem,
|
|
21765
|
-
VCheckbox: VCheckbox,
|
|
21766
|
-
VCheckboxBtn: VCheckboxBtn,
|
|
21767
|
-
VChip: VChip,
|
|
21768
|
-
VChipGroup: VChipGroup,
|
|
21769
|
-
VClassIcon: VClassIcon,
|
|
21770
|
-
VCode: VCode,
|
|
21771
|
-
VCol: VCol,
|
|
21772
|
-
VColorPicker: VColorPicker,
|
|
21773
|
-
VCombobox: VCombobox,
|
|
21774
|
-
VComponentIcon: VComponentIcon,
|
|
21775
|
-
VContainer: VContainer,
|
|
21776
|
-
VCounter: VCounter,
|
|
21777
|
-
VDataIterator: VDataIterator,
|
|
21778
|
-
VDataTable: VDataTable,
|
|
21779
|
-
VDataTableFooter: VDataTableFooter,
|
|
21780
|
-
VDataTableRow: VDataTableRow,
|
|
21781
|
-
VDataTableRows: VDataTableRows,
|
|
21782
|
-
VDataTableServer: VDataTableServer,
|
|
21783
|
-
VDataTableVirtual: VDataTableVirtual,
|
|
21784
|
-
VDefaultsProvider: VDefaultsProvider,
|
|
21785
|
-
VDialog: VDialog,
|
|
21786
|
-
VDialogBottomTransition: VDialogBottomTransition,
|
|
21787
|
-
VDialogTopTransition: VDialogTopTransition,
|
|
21788
|
-
VDialogTransition: VDialogTransition,
|
|
21789
|
-
VDivider: VDivider,
|
|
21790
|
-
VExpandTransition: VExpandTransition,
|
|
21791
|
-
VExpandXTransition: VExpandXTransition,
|
|
21792
|
-
VExpansionPanel: VExpansionPanel,
|
|
21793
|
-
VExpansionPanelText: VExpansionPanelText,
|
|
21794
|
-
VExpansionPanelTitle: VExpansionPanelTitle,
|
|
21795
|
-
VExpansionPanels: VExpansionPanels,
|
|
21796
|
-
VFabTransition: VFabTransition,
|
|
21797
|
-
VFadeTransition: VFadeTransition,
|
|
21798
|
-
VField: VField,
|
|
21799
|
-
VFieldLabel: VFieldLabel,
|
|
21800
|
-
VFileInput: VFileInput,
|
|
21801
|
-
VFooter: VFooter,
|
|
21802
|
-
VForm: VForm,
|
|
21803
|
-
VHover: VHover,
|
|
21804
|
-
VIcon: VIcon,
|
|
21805
|
-
VImg: VImg,
|
|
21806
|
-
VInfiniteScroll: VInfiniteScroll,
|
|
21807
|
-
VInput: VInput,
|
|
21808
|
-
VItem: VItem,
|
|
21809
|
-
VItemGroup: VItemGroup,
|
|
21810
|
-
VKbd: VKbd,
|
|
21811
|
-
VLabel: VLabel,
|
|
21812
|
-
VLayout: VLayout,
|
|
21813
|
-
VLayoutItem: VLayoutItem,
|
|
21814
|
-
VLazy: VLazy,
|
|
21815
|
-
VLigatureIcon: VLigatureIcon,
|
|
21816
|
-
VList: VList,
|
|
21817
|
-
VListGroup: VListGroup,
|
|
21818
|
-
VListImg: VListImg,
|
|
21819
|
-
VListItem: VListItem,
|
|
21820
|
-
VListItemAction: VListItemAction,
|
|
21821
|
-
VListItemMedia: VListItemMedia,
|
|
21822
|
-
VListItemSubtitle: VListItemSubtitle,
|
|
21823
|
-
VListItemTitle: VListItemTitle,
|
|
21824
|
-
VListSubheader: VListSubheader,
|
|
21825
|
-
VLocaleProvider: VLocaleProvider,
|
|
21826
|
-
VMain: VMain,
|
|
21827
|
-
VMenu: VMenu,
|
|
21828
|
-
VMessages: VMessages,
|
|
21829
|
-
VNavigationDrawer: VNavigationDrawer,
|
|
21830
|
-
VNoSsr: VNoSsr,
|
|
21831
|
-
VOverlay: VOverlay,
|
|
21832
|
-
VPagination: VPagination,
|
|
21833
|
-
VParallax: VParallax,
|
|
21834
|
-
VProgressCircular: VProgressCircular,
|
|
21835
|
-
VProgressLinear: VProgressLinear,
|
|
21836
|
-
VRadio: VRadio,
|
|
21837
|
-
VRadioGroup: VRadioGroup,
|
|
21838
|
-
VRangeSlider: VRangeSlider,
|
|
21839
|
-
VRating: VRating,
|
|
21840
|
-
VResponsive: VResponsive,
|
|
21841
|
-
VRow: VRow,
|
|
21842
|
-
VScaleTransition: VScaleTransition,
|
|
21843
|
-
VScrollXReverseTransition: VScrollXReverseTransition,
|
|
21844
|
-
VScrollXTransition: VScrollXTransition,
|
|
21845
|
-
VScrollYReverseTransition: VScrollYReverseTransition,
|
|
21846
|
-
VScrollYTransition: VScrollYTransition,
|
|
21847
|
-
VSelect: VSelect,
|
|
21848
|
-
VSelectionControl: VSelectionControl,
|
|
21849
|
-
VSelectionControlGroup: VSelectionControlGroup,
|
|
21850
|
-
VSheet: VSheet,
|
|
21851
|
-
VSkeletonLoader: VSkeletonLoader,
|
|
21852
|
-
VSlideGroup: VSlideGroup,
|
|
21853
|
-
VSlideGroupItem: VSlideGroupItem,
|
|
21854
|
-
VSlideXReverseTransition: VSlideXReverseTransition,
|
|
21855
|
-
VSlideXTransition: VSlideXTransition,
|
|
21856
|
-
VSlideYReverseTransition: VSlideYReverseTransition,
|
|
21857
|
-
VSlideYTransition: VSlideYTransition,
|
|
21858
|
-
VSlider: VSlider,
|
|
21859
|
-
VSnackbar: VSnackbar,
|
|
21860
|
-
VSpacer: VSpacer,
|
|
21861
|
-
VSvgIcon: VSvgIcon,
|
|
21862
|
-
VSwitch: VSwitch,
|
|
21863
|
-
VSystemBar: VSystemBar,
|
|
21864
|
-
VTab: VTab,
|
|
21865
|
-
VTable: VTable,
|
|
21866
|
-
VTabs: VTabs,
|
|
21867
|
-
VTextField: VTextField,
|
|
21868
|
-
VTextarea: VTextarea,
|
|
21869
|
-
VThemeProvider: VThemeProvider,
|
|
21870
|
-
VTimeline: VTimeline,
|
|
21871
|
-
VTimelineItem: VTimelineItem,
|
|
21872
|
-
VToolbar: VToolbar,
|
|
21873
|
-
VToolbarItems: VToolbarItems,
|
|
21874
|
-
VToolbarTitle: VToolbarTitle,
|
|
21875
|
-
VTooltip: VTooltip,
|
|
21876
|
-
VValidation: VValidation,
|
|
21877
|
-
VVirtualScroll: VVirtualScroll,
|
|
21878
|
-
VWindow: VWindow,
|
|
21879
|
-
VWindowItem: VWindowItem
|
|
21880
|
-
});
|
|
21881
|
-
|
|
21882
|
-
// Types
|
|
21883
|
-
|
|
21884
|
-
function mounted$2(el, binding) {
|
|
21885
|
-
const modifiers = binding.modifiers || {};
|
|
21886
|
-
const value = binding.value;
|
|
21887
|
-
const {
|
|
21888
|
-
once,
|
|
21889
|
-
immediate,
|
|
21890
|
-
...modifierKeys
|
|
21891
|
-
} = modifiers;
|
|
21892
|
-
const defaultValue = !Object.keys(modifierKeys).length;
|
|
21893
|
-
const {
|
|
21894
|
-
handler,
|
|
21895
|
-
options
|
|
21896
|
-
} = typeof value === 'object' ? value : {
|
|
21897
|
-
handler: value,
|
|
21898
|
-
options: {
|
|
21899
|
-
attributes: modifierKeys?.attr ?? defaultValue,
|
|
21900
|
-
characterData: modifierKeys?.char ?? defaultValue,
|
|
21901
|
-
childList: modifierKeys?.child ?? defaultValue,
|
|
21902
|
-
subtree: modifierKeys?.sub ?? defaultValue
|
|
21903
|
-
}
|
|
21904
|
-
};
|
|
21905
|
-
const observer = new MutationObserver(function () {
|
|
21906
|
-
let mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
21907
|
-
let observer = arguments.length > 1 ? arguments[1] : undefined;
|
|
21908
|
-
handler?.(mutations, observer);
|
|
21909
|
-
if (once) unmounted$2(el, binding);
|
|
21910
|
-
});
|
|
21911
|
-
if (immediate) handler?.([], observer);
|
|
21912
|
-
el._mutate = Object(el._mutate);
|
|
21913
|
-
el._mutate[binding.instance.$.uid] = {
|
|
21914
|
-
observer
|
|
21915
|
-
};
|
|
21916
|
-
observer.observe(el, options);
|
|
21917
|
-
}
|
|
21918
|
-
function unmounted$2(el, binding) {
|
|
21919
|
-
if (!el._mutate?.[binding.instance.$.uid]) return;
|
|
21920
|
-
el._mutate[binding.instance.$.uid].observer.disconnect();
|
|
21921
|
-
delete el._mutate[binding.instance.$.uid];
|
|
21590
|
+
function endOfMonth(date) {
|
|
21591
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
21922
21592
|
}
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
|
|
21926
|
-
|
|
21927
|
-
|
|
21928
|
-
|
|
21929
|
-
|
|
21930
|
-
function mounted$1(el, binding) {
|
|
21931
|
-
const handler = binding.value;
|
|
21932
|
-
const options = {
|
|
21933
|
-
passive: !binding.modifiers?.active
|
|
21934
|
-
};
|
|
21935
|
-
window.addEventListener('resize', handler, options);
|
|
21936
|
-
el._onResize = Object(el._onResize);
|
|
21937
|
-
el._onResize[binding.instance.$.uid] = {
|
|
21938
|
-
handler,
|
|
21939
|
-
options
|
|
21940
|
-
};
|
|
21941
|
-
if (!binding.modifiers?.quiet) {
|
|
21942
|
-
handler();
|
|
21593
|
+
function date(value) {
|
|
21594
|
+
if (value == null) return new Date();
|
|
21595
|
+
if (value instanceof Date) return value;
|
|
21596
|
+
if (typeof value === 'string') {
|
|
21597
|
+
const parsed = Date.parse(value);
|
|
21598
|
+
if (!isNaN(parsed)) return new Date(parsed);
|
|
21943
21599
|
}
|
|
21600
|
+
return null;
|
|
21944
21601
|
}
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
const
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
mounted: mounted$1,
|
|
21956
|
-
unmounted: unmounted$1
|
|
21957
|
-
};
|
|
21958
|
-
|
|
21959
|
-
// Types
|
|
21960
|
-
|
|
21961
|
-
function mounted(el, binding) {
|
|
21962
|
-
const {
|
|
21963
|
-
self = false
|
|
21964
|
-
} = binding.modifiers ?? {};
|
|
21965
|
-
const value = binding.value;
|
|
21966
|
-
const options = typeof value === 'object' && value.options || {
|
|
21967
|
-
passive: true
|
|
21968
|
-
};
|
|
21969
|
-
const handler = typeof value === 'function' || 'handleEvent' in value ? value : value.handler;
|
|
21970
|
-
const target = self ? el : binding.arg ? document.querySelector(binding.arg) : window;
|
|
21971
|
-
if (!target) return;
|
|
21972
|
-
target.addEventListener('scroll', handler, options);
|
|
21973
|
-
el._onScroll = Object(el._onScroll);
|
|
21974
|
-
el._onScroll[binding.instance.$.uid] = {
|
|
21975
|
-
handler,
|
|
21976
|
-
options,
|
|
21977
|
-
// Don't reference self
|
|
21978
|
-
target: self ? undefined : target
|
|
21979
|
-
};
|
|
21980
|
-
}
|
|
21981
|
-
function unmounted(el, binding) {
|
|
21982
|
-
if (!el._onScroll?.[binding.instance.$.uid]) return;
|
|
21983
|
-
const {
|
|
21984
|
-
handler,
|
|
21985
|
-
options,
|
|
21986
|
-
target = el
|
|
21987
|
-
} = el._onScroll[binding.instance.$.uid];
|
|
21988
|
-
target.removeEventListener('scroll', handler, options);
|
|
21989
|
-
delete el._onScroll[binding.instance.$.uid];
|
|
21990
|
-
}
|
|
21991
|
-
function updated(el, binding) {
|
|
21992
|
-
if (binding.value === binding.oldValue) return;
|
|
21993
|
-
unmounted(el, binding);
|
|
21994
|
-
mounted(el, binding);
|
|
21995
|
-
}
|
|
21996
|
-
const Scroll = {
|
|
21997
|
-
mounted,
|
|
21998
|
-
unmounted,
|
|
21999
|
-
updated
|
|
22000
|
-
};
|
|
22001
|
-
|
|
22002
|
-
var directives = /*#__PURE__*/Object.freeze({
|
|
22003
|
-
__proto__: null,
|
|
22004
|
-
ClickOutside: ClickOutside,
|
|
22005
|
-
Intersect: Intersect,
|
|
22006
|
-
Mutate: Mutate,
|
|
22007
|
-
Resize: Resize,
|
|
22008
|
-
Ripple: Ripple,
|
|
22009
|
-
Scroll: Scroll,
|
|
22010
|
-
Touch: Touch
|
|
22011
|
-
});
|
|
22012
|
-
|
|
22013
|
-
// Utilities
|
|
22014
|
-
|
|
22015
|
-
// Types
|
|
22016
|
-
|
|
22017
|
-
function getWeekArray(date) {
|
|
22018
|
-
let currentWeek = [];
|
|
22019
|
-
const weeks = [];
|
|
22020
|
-
const firstDayOfMonth = startOfMonth(date);
|
|
22021
|
-
const lastDayOfMonth = endOfMonth(date);
|
|
22022
|
-
for (let i = 0; i < firstDayOfMonth.getDay(); i++) {
|
|
22023
|
-
currentWeek.push(null);
|
|
22024
|
-
}
|
|
22025
|
-
for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
|
|
22026
|
-
const day = new Date(date.getFullYear(), date.getMonth(), i);
|
|
22027
|
-
|
|
22028
|
-
// Add the day to the current week
|
|
22029
|
-
currentWeek.push(day);
|
|
22030
|
-
|
|
22031
|
-
// If the current week has 7 days, add it to the weeks array and start a new week
|
|
22032
|
-
if (currentWeek.length === 7) {
|
|
22033
|
-
weeks.push(currentWeek);
|
|
22034
|
-
currentWeek = [];
|
|
22035
|
-
}
|
|
22036
|
-
}
|
|
22037
|
-
for (let i = currentWeek.length; i < 7; i++) {
|
|
22038
|
-
currentWeek.push(null);
|
|
22039
|
-
}
|
|
22040
|
-
weeks.push(currentWeek);
|
|
22041
|
-
return weeks;
|
|
22042
|
-
}
|
|
22043
|
-
function startOfMonth(date) {
|
|
22044
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
22045
|
-
}
|
|
22046
|
-
function endOfMonth(date) {
|
|
22047
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
22048
|
-
}
|
|
22049
|
-
function date(value) {
|
|
22050
|
-
if (value == null) return null;
|
|
22051
|
-
if (value instanceof Date) return value;
|
|
22052
|
-
if (typeof value === 'string') {
|
|
22053
|
-
const parsed = Date.parse(value);
|
|
22054
|
-
if (!isNaN(parsed)) return new Date(parsed);
|
|
22055
|
-
}
|
|
22056
|
-
return null;
|
|
22057
|
-
}
|
|
22058
|
-
const firstDay = {
|
|
22059
|
-
'001': 1,
|
|
22060
|
-
AD: 1,
|
|
22061
|
-
AE: 6,
|
|
22062
|
-
AF: 6,
|
|
22063
|
-
AG: 0,
|
|
22064
|
-
AI: 1,
|
|
22065
|
-
AL: 1,
|
|
22066
|
-
AM: 1,
|
|
22067
|
-
AN: 1,
|
|
22068
|
-
AR: 1,
|
|
22069
|
-
AS: 0,
|
|
22070
|
-
AT: 1,
|
|
22071
|
-
AU: 0,
|
|
22072
|
-
AX: 1,
|
|
22073
|
-
AZ: 1,
|
|
22074
|
-
BA: 1,
|
|
22075
|
-
BD: 0,
|
|
22076
|
-
BE: 1,
|
|
22077
|
-
BG: 1,
|
|
22078
|
-
BH: 6,
|
|
22079
|
-
BM: 1,
|
|
22080
|
-
BN: 1,
|
|
22081
|
-
BR: 0,
|
|
22082
|
-
BS: 0,
|
|
22083
|
-
BT: 0,
|
|
22084
|
-
BW: 0,
|
|
22085
|
-
BY: 1,
|
|
22086
|
-
BZ: 0,
|
|
22087
|
-
CA: 0,
|
|
22088
|
-
CH: 1,
|
|
22089
|
-
CL: 1,
|
|
22090
|
-
CM: 1,
|
|
22091
|
-
CN: 0,
|
|
22092
|
-
CO: 0,
|
|
22093
|
-
CR: 1,
|
|
22094
|
-
CY: 1,
|
|
22095
|
-
CZ: 1,
|
|
22096
|
-
DE: 1,
|
|
22097
|
-
DJ: 6,
|
|
22098
|
-
DK: 1,
|
|
22099
|
-
DM: 0,
|
|
22100
|
-
DO: 0,
|
|
22101
|
-
DZ: 6,
|
|
22102
|
-
EC: 1,
|
|
22103
|
-
EE: 1,
|
|
22104
|
-
EG: 6,
|
|
22105
|
-
ES: 1,
|
|
22106
|
-
ET: 0,
|
|
22107
|
-
FI: 1,
|
|
22108
|
-
FJ: 1,
|
|
22109
|
-
FO: 1,
|
|
22110
|
-
FR: 1,
|
|
22111
|
-
GB: 1,
|
|
22112
|
-
'GB-alt-variant': 0,
|
|
22113
|
-
GE: 1,
|
|
22114
|
-
GF: 1,
|
|
22115
|
-
GP: 1,
|
|
22116
|
-
GR: 1,
|
|
22117
|
-
GT: 0,
|
|
22118
|
-
GU: 0,
|
|
22119
|
-
HK: 0,
|
|
22120
|
-
HN: 0,
|
|
22121
|
-
HR: 1,
|
|
22122
|
-
HU: 1,
|
|
22123
|
-
ID: 0,
|
|
22124
|
-
IE: 1,
|
|
22125
|
-
IL: 0,
|
|
22126
|
-
IN: 0,
|
|
22127
|
-
IQ: 6,
|
|
22128
|
-
IR: 6,
|
|
22129
|
-
IS: 1,
|
|
22130
|
-
IT: 1,
|
|
22131
|
-
JM: 0,
|
|
22132
|
-
JO: 6,
|
|
22133
|
-
JP: 0,
|
|
22134
|
-
KE: 0,
|
|
22135
|
-
KG: 1,
|
|
22136
|
-
KH: 0,
|
|
22137
|
-
KR: 0,
|
|
22138
|
-
KW: 6,
|
|
22139
|
-
KZ: 1,
|
|
22140
|
-
LA: 0,
|
|
22141
|
-
LB: 1,
|
|
22142
|
-
LI: 1,
|
|
22143
|
-
LK: 1,
|
|
22144
|
-
LT: 1,
|
|
22145
|
-
LU: 1,
|
|
22146
|
-
LV: 1,
|
|
22147
|
-
LY: 6,
|
|
22148
|
-
MC: 1,
|
|
22149
|
-
MD: 1,
|
|
22150
|
-
ME: 1,
|
|
22151
|
-
MH: 0,
|
|
22152
|
-
MK: 1,
|
|
22153
|
-
MM: 0,
|
|
22154
|
-
MN: 1,
|
|
22155
|
-
MO: 0,
|
|
22156
|
-
MQ: 1,
|
|
22157
|
-
MT: 0,
|
|
22158
|
-
MV: 5,
|
|
22159
|
-
MX: 0,
|
|
22160
|
-
MY: 1,
|
|
22161
|
-
MZ: 0,
|
|
22162
|
-
NI: 0,
|
|
22163
|
-
NL: 1,
|
|
22164
|
-
NO: 1,
|
|
22165
|
-
NP: 0,
|
|
22166
|
-
NZ: 1,
|
|
22167
|
-
OM: 6,
|
|
22168
|
-
PA: 0,
|
|
22169
|
-
PE: 0,
|
|
22170
|
-
PH: 0,
|
|
22171
|
-
PK: 0,
|
|
22172
|
-
PL: 1,
|
|
22173
|
-
PR: 0,
|
|
22174
|
-
PT: 0,
|
|
22175
|
-
PY: 0,
|
|
22176
|
-
QA: 6,
|
|
22177
|
-
RE: 1,
|
|
22178
|
-
RO: 1,
|
|
22179
|
-
RS: 1,
|
|
22180
|
-
RU: 1,
|
|
22181
|
-
SA: 0,
|
|
22182
|
-
SD: 6,
|
|
22183
|
-
SE: 1,
|
|
22184
|
-
SG: 0,
|
|
22185
|
-
SI: 1,
|
|
22186
|
-
SK: 1,
|
|
22187
|
-
SM: 1,
|
|
22188
|
-
SV: 0,
|
|
22189
|
-
SY: 6,
|
|
22190
|
-
TH: 0,
|
|
22191
|
-
TJ: 1,
|
|
22192
|
-
TM: 1,
|
|
22193
|
-
TR: 1,
|
|
22194
|
-
TT: 0,
|
|
22195
|
-
TW: 0,
|
|
22196
|
-
UA: 1,
|
|
22197
|
-
UM: 0,
|
|
22198
|
-
US: 0,
|
|
22199
|
-
UY: 1,
|
|
22200
|
-
UZ: 1,
|
|
22201
|
-
VA: 1,
|
|
22202
|
-
VE: 0,
|
|
22203
|
-
VI: 0,
|
|
22204
|
-
VN: 1,
|
|
22205
|
-
WS: 0,
|
|
22206
|
-
XK: 1,
|
|
22207
|
-
YE: 0,
|
|
22208
|
-
ZA: 0,
|
|
22209
|
-
ZW: 0
|
|
22210
|
-
};
|
|
22211
|
-
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
|
22212
|
-
function getWeekdays(locale) {
|
|
22213
|
-
const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
|
|
22214
|
-
return createRange(7).map(i => {
|
|
22215
|
-
const weekday = new Date(sundayJanuarySecond2000);
|
|
22216
|
-
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
|
22217
|
-
return new Intl.DateTimeFormat(locale, {
|
|
22218
|
-
weekday: 'long'
|
|
22219
|
-
}).format(weekday);
|
|
22220
|
-
});
|
|
21602
|
+
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
|
21603
|
+
function getWeekdays(locale) {
|
|
21604
|
+
const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
|
|
21605
|
+
return createRange(7).map(i => {
|
|
21606
|
+
const weekday = new Date(sundayJanuarySecond2000);
|
|
21607
|
+
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
|
21608
|
+
return new Intl.DateTimeFormat(locale, {
|
|
21609
|
+
weekday: 'short'
|
|
21610
|
+
}).format(weekday);
|
|
21611
|
+
});
|
|
22221
21612
|
}
|
|
22222
21613
|
function format(value, formatString, locale) {
|
|
22223
21614
|
const date = new Date(value);
|
|
@@ -22235,8 +21626,7 @@
|
|
|
22235
21626
|
options = {
|
|
22236
21627
|
weekday: 'short',
|
|
22237
21628
|
day: 'numeric',
|
|
22238
|
-
month: 'short'
|
|
22239
|
-
year: 'numeric'
|
|
21629
|
+
month: 'short'
|
|
22240
21630
|
};
|
|
22241
21631
|
break;
|
|
22242
21632
|
case 'keyboardDate':
|
|
@@ -22254,6 +21644,11 @@
|
|
|
22254
21644
|
year: 'numeric'
|
|
22255
21645
|
};
|
|
22256
21646
|
break;
|
|
21647
|
+
case 'dayOfMonth':
|
|
21648
|
+
options = {
|
|
21649
|
+
day: 'numeric'
|
|
21650
|
+
};
|
|
21651
|
+
break;
|
|
22257
21652
|
default:
|
|
22258
21653
|
options = {
|
|
22259
21654
|
timeZone: 'UTC',
|
|
@@ -22278,149 +21673,1666 @@
|
|
|
22278
21673
|
function getMonth(date) {
|
|
22279
21674
|
return date.getMonth();
|
|
22280
21675
|
}
|
|
22281
|
-
function startOfYear(date) {
|
|
22282
|
-
return new Date(date.getFullYear(), 0, 1);
|
|
21676
|
+
function startOfYear(date) {
|
|
21677
|
+
return new Date(date.getFullYear(), 0, 1);
|
|
21678
|
+
}
|
|
21679
|
+
function endOfYear(date) {
|
|
21680
|
+
return new Date(date.getFullYear(), 11, 31);
|
|
21681
|
+
}
|
|
21682
|
+
function isWithinRange(date, range) {
|
|
21683
|
+
return isAfter(date, range[0]) && isBefore(date, range[1]);
|
|
21684
|
+
}
|
|
21685
|
+
function isValid(date) {
|
|
21686
|
+
const d = new Date(date);
|
|
21687
|
+
return d instanceof Date && !isNaN(d.getTime());
|
|
21688
|
+
}
|
|
21689
|
+
function isAfter(date, comparing) {
|
|
21690
|
+
return date.getTime() > comparing.getTime();
|
|
21691
|
+
}
|
|
21692
|
+
function isBefore(date, comparing) {
|
|
21693
|
+
return date.getTime() < comparing.getTime();
|
|
21694
|
+
}
|
|
21695
|
+
function isEqual(date, comparing) {
|
|
21696
|
+
return date.getTime() === comparing.getTime();
|
|
21697
|
+
}
|
|
21698
|
+
function isSameDay(date, comparing) {
|
|
21699
|
+
return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
21700
|
+
}
|
|
21701
|
+
function isSameMonth(date, comparing) {
|
|
21702
|
+
return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
21703
|
+
}
|
|
21704
|
+
function getDiff(date, comparing, unit) {
|
|
21705
|
+
const d = new Date(date);
|
|
21706
|
+
const c = new Date(comparing);
|
|
21707
|
+
if (unit === 'month') {
|
|
21708
|
+
return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
|
|
21709
|
+
}
|
|
21710
|
+
return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
|
|
21711
|
+
}
|
|
21712
|
+
function setYear(date, year) {
|
|
21713
|
+
const d = new Date(date);
|
|
21714
|
+
d.setFullYear(year);
|
|
21715
|
+
return d;
|
|
21716
|
+
}
|
|
21717
|
+
class VuetifyDateAdapter {
|
|
21718
|
+
constructor(options) {
|
|
21719
|
+
this.locale = options.locale;
|
|
21720
|
+
}
|
|
21721
|
+
date(value) {
|
|
21722
|
+
return date(value);
|
|
21723
|
+
}
|
|
21724
|
+
toJsDate(date) {
|
|
21725
|
+
return date;
|
|
21726
|
+
}
|
|
21727
|
+
addDays(date, amount) {
|
|
21728
|
+
return addDays(date, amount);
|
|
21729
|
+
}
|
|
21730
|
+
addMonths(date, amount) {
|
|
21731
|
+
return addMonths(date, amount);
|
|
21732
|
+
}
|
|
21733
|
+
getWeekArray(date) {
|
|
21734
|
+
return getWeekArray(date, this.locale);
|
|
21735
|
+
}
|
|
21736
|
+
startOfMonth(date) {
|
|
21737
|
+
return startOfMonth(date);
|
|
21738
|
+
}
|
|
21739
|
+
endOfMonth(date) {
|
|
21740
|
+
return endOfMonth(date);
|
|
21741
|
+
}
|
|
21742
|
+
format(date, formatString) {
|
|
21743
|
+
return format(date, formatString, this.locale);
|
|
21744
|
+
}
|
|
21745
|
+
isEqual(date, comparing) {
|
|
21746
|
+
return isEqual(date, comparing);
|
|
21747
|
+
}
|
|
21748
|
+
isValid(date) {
|
|
21749
|
+
return isValid(date);
|
|
21750
|
+
}
|
|
21751
|
+
isWithinRange(date, range) {
|
|
21752
|
+
return isWithinRange(date, range);
|
|
21753
|
+
}
|
|
21754
|
+
isAfter(date, comparing) {
|
|
21755
|
+
return isAfter(date, comparing);
|
|
21756
|
+
}
|
|
21757
|
+
isBefore(date, comparing) {
|
|
21758
|
+
return !isAfter(date, comparing) && !isEqual(date, comparing);
|
|
21759
|
+
}
|
|
21760
|
+
isSameDay(date, comparing) {
|
|
21761
|
+
return isSameDay(date, comparing);
|
|
21762
|
+
}
|
|
21763
|
+
isSameMonth(date, comparing) {
|
|
21764
|
+
return isSameMonth(date, comparing);
|
|
21765
|
+
}
|
|
21766
|
+
setYear(date, year) {
|
|
21767
|
+
return setYear(date, year);
|
|
21768
|
+
}
|
|
21769
|
+
getDiff(date, comparing, unit) {
|
|
21770
|
+
return getDiff(date, comparing, unit);
|
|
21771
|
+
}
|
|
21772
|
+
getWeekdays() {
|
|
21773
|
+
return getWeekdays(this.locale);
|
|
21774
|
+
}
|
|
21775
|
+
getYear(date) {
|
|
21776
|
+
return getYear(date);
|
|
21777
|
+
}
|
|
21778
|
+
getMonth(date) {
|
|
21779
|
+
return getMonth(date);
|
|
21780
|
+
}
|
|
21781
|
+
startOfYear(date) {
|
|
21782
|
+
return startOfYear(date);
|
|
21783
|
+
}
|
|
21784
|
+
endOfYear(date) {
|
|
21785
|
+
return endOfYear(date);
|
|
21786
|
+
}
|
|
21787
|
+
}
|
|
21788
|
+
|
|
21789
|
+
// Composables
|
|
21790
|
+
|
|
21791
|
+
// Types
|
|
21792
|
+
|
|
21793
|
+
const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
|
|
21794
|
+
function createDate(options) {
|
|
21795
|
+
return mergeDeep({
|
|
21796
|
+
adapter: VuetifyDateAdapter,
|
|
21797
|
+
locale: {
|
|
21798
|
+
af: 'af-ZA',
|
|
21799
|
+
// ar: '', # not the same value for all variants
|
|
21800
|
+
bg: 'bg-BG',
|
|
21801
|
+
ca: 'ca-ES',
|
|
21802
|
+
ckb: '',
|
|
21803
|
+
cs: '',
|
|
21804
|
+
de: 'de-DE',
|
|
21805
|
+
el: 'el-GR',
|
|
21806
|
+
en: 'en-US',
|
|
21807
|
+
// es: '', # not the same value for all variants
|
|
21808
|
+
et: 'et-EE',
|
|
21809
|
+
fa: 'fa-IR',
|
|
21810
|
+
fi: 'fi-FI',
|
|
21811
|
+
// fr: '', #not the same value for all variants
|
|
21812
|
+
hr: 'hr-HR',
|
|
21813
|
+
hu: 'hu-HU',
|
|
21814
|
+
he: 'he-IL',
|
|
21815
|
+
id: 'id-ID',
|
|
21816
|
+
it: 'it-IT',
|
|
21817
|
+
ja: 'ja-JP',
|
|
21818
|
+
ko: 'ko-KR',
|
|
21819
|
+
lv: 'lv-LV',
|
|
21820
|
+
lt: 'lt-LT',
|
|
21821
|
+
nl: 'nl-NL',
|
|
21822
|
+
no: 'nn-NO',
|
|
21823
|
+
pl: 'pl-PL',
|
|
21824
|
+
pt: 'pt-PT',
|
|
21825
|
+
ro: 'ro-RO',
|
|
21826
|
+
ru: 'ru-RU',
|
|
21827
|
+
sk: 'sk-SK',
|
|
21828
|
+
sl: 'sl-SI',
|
|
21829
|
+
srCyrl: 'sr-SP',
|
|
21830
|
+
srLatn: 'sr-SP',
|
|
21831
|
+
sv: 'sv-SE',
|
|
21832
|
+
th: 'th-TH',
|
|
21833
|
+
tr: 'tr-TR',
|
|
21834
|
+
az: 'az-AZ',
|
|
21835
|
+
uk: 'uk-UA',
|
|
21836
|
+
vi: 'vi-VN',
|
|
21837
|
+
zhHans: 'zh-CN',
|
|
21838
|
+
zhHant: 'zh-TW'
|
|
21839
|
+
}
|
|
21840
|
+
}, options);
|
|
21841
|
+
}
|
|
21842
|
+
function useDate() {
|
|
21843
|
+
const date = vue.inject(DateAdapterSymbol);
|
|
21844
|
+
const locale = useLocale();
|
|
21845
|
+
if (!date) throw new Error('[Vuetify] Could not find injected date');
|
|
21846
|
+
const instance = typeof date.adapter === 'function'
|
|
21847
|
+
// eslint-disable-next-line new-cap
|
|
21848
|
+
? new date.adapter({
|
|
21849
|
+
locale: date.locale?.[locale.current.value] ?? locale.current.value
|
|
21850
|
+
}) : date.adapter;
|
|
21851
|
+
vue.watch(locale.current, value => {
|
|
21852
|
+
const newLocale = date.locale ? date.locale[value] : value;
|
|
21853
|
+
instance.locale = newLocale ?? instance.locale;
|
|
21854
|
+
});
|
|
21855
|
+
return instance;
|
|
21856
|
+
}
|
|
21857
|
+
function toIso(adapter, value) {
|
|
21858
|
+
const date = adapter.toJsDate(value);
|
|
21859
|
+
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
21860
|
+
}
|
|
21861
|
+
function getMondayOfFirstWeekOfYear(year) {
|
|
21862
|
+
return new Date(year, 0, 1);
|
|
21863
|
+
}
|
|
21864
|
+
|
|
21865
|
+
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
|
21866
|
+
function getWeek(adapter, value) {
|
|
21867
|
+
const date = adapter.toJsDate(value);
|
|
21868
|
+
let year = date.getFullYear();
|
|
21869
|
+
let d1w1 = getMondayOfFirstWeekOfYear(year);
|
|
21870
|
+
if (date < d1w1) {
|
|
21871
|
+
year = year - 1;
|
|
21872
|
+
d1w1 = getMondayOfFirstWeekOfYear(year);
|
|
21873
|
+
} else {
|
|
21874
|
+
const tv = getMondayOfFirstWeekOfYear(year + 1);
|
|
21875
|
+
if (date >= tv) {
|
|
21876
|
+
year = year + 1;
|
|
21877
|
+
d1w1 = tv;
|
|
21878
|
+
}
|
|
21879
|
+
}
|
|
21880
|
+
const diffTime = Math.abs(date.getTime() - d1w1.getTime());
|
|
21881
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
21882
|
+
return Math.floor(diffDays / 7) + 1;
|
|
21883
|
+
}
|
|
21884
|
+
|
|
21885
|
+
// Composables
|
|
21886
|
+
|
|
21887
|
+
// Types
|
|
21888
|
+
|
|
21889
|
+
const makeDateProps = propsFactory({
|
|
21890
|
+
modelValue: {
|
|
21891
|
+
type: null,
|
|
21892
|
+
default: () => []
|
|
21893
|
+
},
|
|
21894
|
+
displayDate: {
|
|
21895
|
+
type: null,
|
|
21896
|
+
default: new Date()
|
|
21897
|
+
},
|
|
21898
|
+
inputMode: {
|
|
21899
|
+
type: String,
|
|
21900
|
+
default: 'calendar'
|
|
21901
|
+
},
|
|
21902
|
+
viewMode: {
|
|
21903
|
+
type: String,
|
|
21904
|
+
default: 'month'
|
|
21905
|
+
},
|
|
21906
|
+
format: String
|
|
21907
|
+
}, 'date');
|
|
21908
|
+
const dateEmits = {
|
|
21909
|
+
'update:modelValue': date => true,
|
|
21910
|
+
'update:displayDate': date => true,
|
|
21911
|
+
'update:focused': focused => true,
|
|
21912
|
+
'update:inputMode': inputMode => true,
|
|
21913
|
+
'update:viewMode': viewMode => true
|
|
21914
|
+
};
|
|
21915
|
+
|
|
21916
|
+
const makeVDatePickerControlsProps = propsFactory({
|
|
21917
|
+
nextIcon: {
|
|
21918
|
+
type: [String],
|
|
21919
|
+
default: '$next'
|
|
21920
|
+
},
|
|
21921
|
+
prevIcon: {
|
|
21922
|
+
type: [String],
|
|
21923
|
+
default: '$prev'
|
|
21924
|
+
},
|
|
21925
|
+
expandIcon: {
|
|
21926
|
+
type: [String],
|
|
21927
|
+
default: '$expand'
|
|
21928
|
+
},
|
|
21929
|
+
collapseIcon: {
|
|
21930
|
+
type: [String],
|
|
21931
|
+
default: '$collapse'
|
|
21932
|
+
},
|
|
21933
|
+
range: {
|
|
21934
|
+
default: false,
|
|
21935
|
+
type: [String, Boolean],
|
|
21936
|
+
validator: v => v === false || ['start', 'end'].includes(v)
|
|
21937
|
+
},
|
|
21938
|
+
...omit(makeDateProps(), ['modelValue', 'inputMode'])
|
|
21939
|
+
}, 'VDatePickerControls');
|
|
21940
|
+
const VDatePickerControls = genericComponent()({
|
|
21941
|
+
name: 'VDatePickerControls',
|
|
21942
|
+
props: makeVDatePickerControlsProps(),
|
|
21943
|
+
emits: {
|
|
21944
|
+
...omit(dateEmits, ['update:modelValue', 'update:inputMode'])
|
|
21945
|
+
},
|
|
21946
|
+
setup(props, _ref) {
|
|
21947
|
+
let {
|
|
21948
|
+
emit
|
|
21949
|
+
} = _ref;
|
|
21950
|
+
const adapter = useDate();
|
|
21951
|
+
const monthAndYear = vue.computed(() => {
|
|
21952
|
+
const month = props.range === 'end' ? adapter.addMonths(props.displayDate, 1) : props.displayDate;
|
|
21953
|
+
return adapter.format(month, 'monthAndYear');
|
|
21954
|
+
});
|
|
21955
|
+
useRender(() => {
|
|
21956
|
+
const prevBtn = vue.createVNode(VBtn, {
|
|
21957
|
+
"variant": "text",
|
|
21958
|
+
"icon": props.prevIcon,
|
|
21959
|
+
"onClick": () => emit('update:displayDate', adapter.addMonths(props.displayDate, -1))
|
|
21960
|
+
}, null);
|
|
21961
|
+
const nextBtn = vue.createVNode(VBtn, {
|
|
21962
|
+
"variant": "text",
|
|
21963
|
+
"icon": props.nextIcon,
|
|
21964
|
+
"onClick": () => emit('update:displayDate', adapter.addMonths(props.displayDate, 1))
|
|
21965
|
+
}, null);
|
|
21966
|
+
return vue.createVNode("div", {
|
|
21967
|
+
"class": "v-date-picker-controls"
|
|
21968
|
+
}, [props.viewMode === 'month' && props.range === 'start' && prevBtn, !!props.range && vue.createVNode(VSpacer, {
|
|
21969
|
+
"key": "range-spacer"
|
|
21970
|
+
}, null), vue.createVNode("div", {
|
|
21971
|
+
"class": "v-date-picker-controls__date"
|
|
21972
|
+
}, [monthAndYear.value]), vue.createVNode(VBtn, {
|
|
21973
|
+
"key": "expand-btn",
|
|
21974
|
+
"variant": "text",
|
|
21975
|
+
"icon": props.viewMode === 'month' ? props.expandIcon : props.collapseIcon,
|
|
21976
|
+
"onClick": () => emit('update:viewMode', props.viewMode === 'month' ? 'year' : 'month')
|
|
21977
|
+
}, null), vue.createVNode(VSpacer, null, null), props.viewMode === 'month' && !props.range && vue.createVNode("div", {
|
|
21978
|
+
"key": "month-buttons"
|
|
21979
|
+
}, [prevBtn, nextBtn]), props.viewMode === 'month' && props.range === 'end' && nextBtn]);
|
|
21980
|
+
});
|
|
21981
|
+
return {};
|
|
21982
|
+
}
|
|
21983
|
+
});
|
|
21984
|
+
|
|
21985
|
+
// Utilities
|
|
21986
|
+
|
|
21987
|
+
// Types
|
|
21988
|
+
|
|
21989
|
+
const DatePickerSymbol = Symbol.for('vuetify:date-picker');
|
|
21990
|
+
function createDatePicker(props) {
|
|
21991
|
+
const hoverDate = vue.ref();
|
|
21992
|
+
const hoverMonth = vue.ref();
|
|
21993
|
+
const isDragging = vue.ref(false);
|
|
21994
|
+
const dragHandle = vue.ref(null);
|
|
21995
|
+
const hasScrolled = vue.ref(false);
|
|
21996
|
+
vue.provide(DatePickerSymbol, {
|
|
21997
|
+
hoverDate,
|
|
21998
|
+
hoverMonth,
|
|
21999
|
+
isDragging,
|
|
22000
|
+
dragHandle,
|
|
22001
|
+
hasScrolled
|
|
22002
|
+
});
|
|
22003
|
+
return {
|
|
22004
|
+
hoverDate,
|
|
22005
|
+
hoverMonth,
|
|
22006
|
+
isDragging,
|
|
22007
|
+
dragHandle,
|
|
22008
|
+
hasScrolled
|
|
22009
|
+
};
|
|
22010
|
+
}
|
|
22011
|
+
function useDatePicker() {
|
|
22012
|
+
const datePicker = vue.inject(DatePickerSymbol);
|
|
22013
|
+
if (!datePicker) throw new Error('foo');
|
|
22014
|
+
return datePicker;
|
|
22015
|
+
}
|
|
22016
|
+
|
|
22017
|
+
const makeVDatePickerMonthProps = propsFactory({
|
|
22018
|
+
color: String,
|
|
22019
|
+
showAdjacentMonths: Boolean,
|
|
22020
|
+
hideWeekdays: Boolean,
|
|
22021
|
+
showWeek: Boolean,
|
|
22022
|
+
range: {
|
|
22023
|
+
default: false,
|
|
22024
|
+
type: [String, Boolean],
|
|
22025
|
+
validator: v => typeof v === 'boolean' || ['start', 'end'].includes(v)
|
|
22026
|
+
},
|
|
22027
|
+
hoverDate: null,
|
|
22028
|
+
multiple: Boolean,
|
|
22029
|
+
side: {
|
|
22030
|
+
type: String
|
|
22031
|
+
},
|
|
22032
|
+
...omit(makeDateProps(), ['inputMode', 'viewMode'])
|
|
22033
|
+
}, 'VDatePickerMonth');
|
|
22034
|
+
const VDatePickerMonth = genericComponent()({
|
|
22035
|
+
name: 'VDatePickerMonth',
|
|
22036
|
+
props: makeVDatePickerMonthProps({
|
|
22037
|
+
color: 'surface-variant'
|
|
22038
|
+
}),
|
|
22039
|
+
emits: {
|
|
22040
|
+
...omit(dateEmits, ['update:inputMode', 'update:viewMode']),
|
|
22041
|
+
'update:hoverDate': date => true
|
|
22042
|
+
},
|
|
22043
|
+
setup(props, _ref) {
|
|
22044
|
+
let {
|
|
22045
|
+
emit,
|
|
22046
|
+
slots
|
|
22047
|
+
} = _ref;
|
|
22048
|
+
const adapter = useDate();
|
|
22049
|
+
const {
|
|
22050
|
+
isDragging,
|
|
22051
|
+
dragHandle,
|
|
22052
|
+
hasScrolled
|
|
22053
|
+
} = useDatePicker();
|
|
22054
|
+
const month = vue.computed(() => props.displayDate);
|
|
22055
|
+
const findClosestDate = (date, dates) => {
|
|
22056
|
+
const {
|
|
22057
|
+
isSameDay,
|
|
22058
|
+
getDiff
|
|
22059
|
+
} = adapter;
|
|
22060
|
+
const [startDate, endDate] = dates;
|
|
22061
|
+
if (isSameDay(startDate, endDate)) {
|
|
22062
|
+
return getDiff(date, startDate, 'days') > 0 ? endDate : startDate;
|
|
22063
|
+
}
|
|
22064
|
+
const distStart = Math.abs(getDiff(date, startDate));
|
|
22065
|
+
const distEnd = Math.abs(getDiff(date, endDate));
|
|
22066
|
+
return distStart < distEnd ? startDate : endDate;
|
|
22067
|
+
};
|
|
22068
|
+
|
|
22069
|
+
// const hoverRange = computed<[any, any] | null>(() => {
|
|
22070
|
+
// if (!props.hoverDate) return null
|
|
22071
|
+
|
|
22072
|
+
// const closestDate = findClosestDate(props.hoverDate, props.modelValue)
|
|
22073
|
+
|
|
22074
|
+
// if (!closestDate) return null
|
|
22075
|
+
|
|
22076
|
+
// return adapter.isAfter(props.hoverDate, closestDate) ? [closestDate, props.hoverDate] : [props.hoverDate, closestDate]
|
|
22077
|
+
// })
|
|
22078
|
+
|
|
22079
|
+
const weeksInMonth = vue.computed(() => {
|
|
22080
|
+
const weeks = adapter.getWeekArray(month.value);
|
|
22081
|
+
const days = weeks.flat();
|
|
22082
|
+
|
|
22083
|
+
// Make sure there's always 6 weeks in month (6 * 7 days)
|
|
22084
|
+
// But only do it if we're not hiding adjacent months?
|
|
22085
|
+
const daysInMonth = 6 * 7;
|
|
22086
|
+
if (days.length < daysInMonth && props.showAdjacentMonths) {
|
|
22087
|
+
const lastDay = days[days.length - 1];
|
|
22088
|
+
let week = [];
|
|
22089
|
+
for (let day = 1; day <= daysInMonth - days.length; day++) {
|
|
22090
|
+
week.push(adapter.addDays(lastDay, day));
|
|
22091
|
+
if (day % 7 === 0) {
|
|
22092
|
+
weeks.push(week);
|
|
22093
|
+
week = [];
|
|
22094
|
+
}
|
|
22095
|
+
}
|
|
22096
|
+
}
|
|
22097
|
+
return weeks;
|
|
22098
|
+
});
|
|
22099
|
+
const daysInMonth = vue.computed(() => {
|
|
22100
|
+
const validDates = props.modelValue.filter(v => !!v);
|
|
22101
|
+
const isRange = validDates.length > 1;
|
|
22102
|
+
const days = weeksInMonth.value.flat();
|
|
22103
|
+
const today = adapter.date();
|
|
22104
|
+
const startDate = validDates[0];
|
|
22105
|
+
const endDate = validDates[1];
|
|
22106
|
+
return days.map((date, index) => {
|
|
22107
|
+
const isStart = startDate && adapter.isSameDay(date, startDate);
|
|
22108
|
+
const isEnd = endDate && adapter.isSameDay(date, endDate);
|
|
22109
|
+
const isAdjacent = !adapter.isSameMonth(date, month.value);
|
|
22110
|
+
const isSame = validDates.length === 2 && adapter.isSameDay(startDate, endDate);
|
|
22111
|
+
return {
|
|
22112
|
+
date,
|
|
22113
|
+
isoDate: toIso(adapter, date),
|
|
22114
|
+
formatted: adapter.format(date, 'keyboardDate'),
|
|
22115
|
+
year: adapter.getYear(date),
|
|
22116
|
+
month: adapter.getMonth(date),
|
|
22117
|
+
isWeekStart: index % 7 === 0,
|
|
22118
|
+
isWeekEnd: index % 7 === 6,
|
|
22119
|
+
isSelected: isStart || isEnd,
|
|
22120
|
+
isStart,
|
|
22121
|
+
isEnd,
|
|
22122
|
+
isToday: adapter.isSameDay(date, today),
|
|
22123
|
+
isAdjacent,
|
|
22124
|
+
isHidden: isAdjacent && !props.showAdjacentMonths,
|
|
22125
|
+
inRange: isRange && !isSame && (isStart || isEnd || validDates.length === 2 && adapter.isWithinRange(date, validDates)),
|
|
22126
|
+
// isHovered: props.hoverDate === date,
|
|
22127
|
+
// inHover: hoverRange.value && isWithinRange(date, hoverRange.value),
|
|
22128
|
+
isHovered: false,
|
|
22129
|
+
inHover: false,
|
|
22130
|
+
localized: adapter.format(date, 'dayOfMonth')
|
|
22131
|
+
};
|
|
22132
|
+
});
|
|
22133
|
+
});
|
|
22134
|
+
const weeks = vue.computed(() => {
|
|
22135
|
+
return weeksInMonth.value.map(week => {
|
|
22136
|
+
return getWeek(adapter, week[0]);
|
|
22137
|
+
});
|
|
22138
|
+
});
|
|
22139
|
+
const {
|
|
22140
|
+
backgroundColorClasses,
|
|
22141
|
+
backgroundColorStyles
|
|
22142
|
+
} = useBackgroundColor(props, 'color');
|
|
22143
|
+
function selectDate(date) {
|
|
22144
|
+
let newModel = props.modelValue.slice();
|
|
22145
|
+
if (props.multiple) {
|
|
22146
|
+
if (isDragging.value && dragHandle.value != null) {
|
|
22147
|
+
const otherIndex = (dragHandle.value + 1) % 2;
|
|
22148
|
+
const fn = otherIndex === 0 ? 'isBefore' : 'isAfter';
|
|
22149
|
+
if (adapter[fn](date, newModel[otherIndex])) {
|
|
22150
|
+
newModel[dragHandle.value] = newModel[otherIndex];
|
|
22151
|
+
newModel[otherIndex] = date;
|
|
22152
|
+
dragHandle.value = otherIndex;
|
|
22153
|
+
} else {
|
|
22154
|
+
newModel[dragHandle.value] = date;
|
|
22155
|
+
}
|
|
22156
|
+
} else {
|
|
22157
|
+
if (newModel.find(d => adapter.isSameDay(d, date))) {
|
|
22158
|
+
newModel = newModel.filter(v => !adapter.isSameDay(v, date));
|
|
22159
|
+
} else if (newModel.length === 2) {
|
|
22160
|
+
let index;
|
|
22161
|
+
if (!props.side || adapter.isSameMonth(newModel[0], newModel[1])) {
|
|
22162
|
+
const closest = findClosestDate(date, newModel);
|
|
22163
|
+
index = newModel.indexOf(closest);
|
|
22164
|
+
} else {
|
|
22165
|
+
index = props.side === 'start' ? 0 : props.side === 'end' ? 1 : undefined;
|
|
22166
|
+
}
|
|
22167
|
+
newModel = newModel.map((v, i) => i === index ? date : v);
|
|
22168
|
+
} else {
|
|
22169
|
+
if (newModel[0] && adapter.isBefore(newModel[0], date)) {
|
|
22170
|
+
newModel = [newModel[0], date];
|
|
22171
|
+
} else {
|
|
22172
|
+
newModel = [date, newModel[0]];
|
|
22173
|
+
}
|
|
22174
|
+
}
|
|
22175
|
+
}
|
|
22176
|
+
} else {
|
|
22177
|
+
newModel = [date];
|
|
22178
|
+
}
|
|
22179
|
+
emit('update:modelValue', newModel.filter(v => !!v));
|
|
22180
|
+
}
|
|
22181
|
+
const daysRef = vue.ref();
|
|
22182
|
+
function findElement(el) {
|
|
22183
|
+
if (!el || el === daysRef.value) return null;
|
|
22184
|
+
if ('vDate' in el.dataset) {
|
|
22185
|
+
return adapter.date(el.dataset.vDate);
|
|
22186
|
+
}
|
|
22187
|
+
return findElement(el.parentElement);
|
|
22188
|
+
}
|
|
22189
|
+
function findDate(e) {
|
|
22190
|
+
const x = 'changedTouches' in e ? e.changedTouches[0]?.clientX : e.clientX;
|
|
22191
|
+
const y = 'changedTouches' in e ? e.changedTouches[0]?.clientY : e.clientY;
|
|
22192
|
+
const el = document.elementFromPoint(x, y);
|
|
22193
|
+
return findElement(el);
|
|
22194
|
+
}
|
|
22195
|
+
let canDrag = false;
|
|
22196
|
+
function handleMousedown(e) {
|
|
22197
|
+
hasScrolled.value = false;
|
|
22198
|
+
const selected = findDate(e);
|
|
22199
|
+
if (!selected) return;
|
|
22200
|
+
const modelIndex = props.modelValue.findIndex(d => adapter.isEqual(d, selected));
|
|
22201
|
+
if (modelIndex >= 0) {
|
|
22202
|
+
canDrag = true;
|
|
22203
|
+
dragHandle.value = modelIndex;
|
|
22204
|
+
window.addEventListener('touchmove', handleTouchmove, {
|
|
22205
|
+
passive: false
|
|
22206
|
+
});
|
|
22207
|
+
window.addEventListener('mousemove', handleTouchmove, {
|
|
22208
|
+
passive: false
|
|
22209
|
+
});
|
|
22210
|
+
e.preventDefault();
|
|
22211
|
+
}
|
|
22212
|
+
window.addEventListener('touchend', handleTouchend, {
|
|
22213
|
+
passive: false
|
|
22214
|
+
});
|
|
22215
|
+
window.addEventListener('mouseup', handleTouchend, {
|
|
22216
|
+
passive: false
|
|
22217
|
+
});
|
|
22218
|
+
}
|
|
22219
|
+
function handleTouchmove(e) {
|
|
22220
|
+
if (!canDrag) return;
|
|
22221
|
+
e.preventDefault();
|
|
22222
|
+
isDragging.value = true;
|
|
22223
|
+
const over = findDate(e);
|
|
22224
|
+
if (!over) return;
|
|
22225
|
+
selectDate(over);
|
|
22226
|
+
}
|
|
22227
|
+
function handleTouchend(e) {
|
|
22228
|
+
if (e.cancelable) e.preventDefault();
|
|
22229
|
+
window.removeEventListener('touchmove', handleTouchmove);
|
|
22230
|
+
window.removeEventListener('mousemove', handleTouchmove);
|
|
22231
|
+
window.removeEventListener('touchend', handleTouchend);
|
|
22232
|
+
window.removeEventListener('mouseup', handleTouchend);
|
|
22233
|
+
const end = findDate(e);
|
|
22234
|
+
if (!end) return;
|
|
22235
|
+
if (!hasScrolled.value) {
|
|
22236
|
+
selectDate(end);
|
|
22237
|
+
}
|
|
22238
|
+
isDragging.value = false;
|
|
22239
|
+
dragHandle.value = null;
|
|
22240
|
+
canDrag = false;
|
|
22241
|
+
}
|
|
22242
|
+
return () => vue.createVNode("div", {
|
|
22243
|
+
"class": "v-date-picker-month"
|
|
22244
|
+
}, [props.showWeek && vue.createVNode("div", {
|
|
22245
|
+
"key": "weeks",
|
|
22246
|
+
"class": "v-date-picker-month__weeks"
|
|
22247
|
+
}, [!props.hideWeekdays && vue.createVNode("div", {
|
|
22248
|
+
"key": "hide-week-days",
|
|
22249
|
+
"class": "v-date-picker-month__day"
|
|
22250
|
+
}, [vue.createTextVNode("\xA0")]), weeks.value.map(week => vue.createVNode("div", {
|
|
22251
|
+
"class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
|
|
22252
|
+
}, [week]))]), vue.createVNode("div", {
|
|
22253
|
+
"ref": daysRef,
|
|
22254
|
+
"class": "v-date-picker-month__days",
|
|
22255
|
+
"onMousedown": handleMousedown,
|
|
22256
|
+
"onTouchstart": handleMousedown
|
|
22257
|
+
}, [!props.hideWeekdays && adapter.getWeekdays().map(weekDay => vue.createVNode("div", {
|
|
22258
|
+
"class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
|
|
22259
|
+
}, [weekDay.charAt(0)])), daysInMonth.value.map((item, index) => vue.createVNode("div", {
|
|
22260
|
+
"class": ['v-date-picker-month__day', {
|
|
22261
|
+
'v-date-picker-month__day--selected': item.isSelected,
|
|
22262
|
+
'v-date-picker-month__day--start': item.isStart,
|
|
22263
|
+
'v-date-picker-month__day--end': item.isEnd,
|
|
22264
|
+
'v-date-picker-month__day--adjacent': item.isAdjacent,
|
|
22265
|
+
'v-date-picker-month__day--hide-adjacent': item.isHidden,
|
|
22266
|
+
'v-date-picker-month__day--week-start': item.isWeekStart,
|
|
22267
|
+
'v-date-picker-month__day--week-end': item.isWeekEnd,
|
|
22268
|
+
'v-date-picker-month__day--hovered': item.isHovered
|
|
22269
|
+
}],
|
|
22270
|
+
"data-v-date": !item.isHidden ? item.isoDate : undefined
|
|
22271
|
+
}, [item.inRange && vue.createVNode("div", {
|
|
22272
|
+
"key": "in-range",
|
|
22273
|
+
"class": ['v-date-picker-month__day--range', backgroundColorClasses.value],
|
|
22274
|
+
"style": backgroundColorStyles.value
|
|
22275
|
+
}, null), item.inHover && !item.isStart && !item.isEnd && !item.isHovered && !item.inRange && vue.createVNode("div", {
|
|
22276
|
+
"key": "in-hover",
|
|
22277
|
+
"class": "v-date-picker-month__day--hover"
|
|
22278
|
+
}, null), (props.showAdjacentMonths || !item.isAdjacent) && vue.createVNode(VBtn, {
|
|
22279
|
+
"icon": true,
|
|
22280
|
+
"ripple": false,
|
|
22281
|
+
"variant": (item.isToday || item.isHovered) && !item.isSelected ? 'outlined' : 'flat',
|
|
22282
|
+
"active": item.isSelected,
|
|
22283
|
+
"color": item.isSelected || item.isToday ? props.color : item.isHovered ? undefined : 'transparent'
|
|
22284
|
+
}, {
|
|
22285
|
+
default: () => [item.localized]
|
|
22286
|
+
})]))])]);
|
|
22287
|
+
}
|
|
22288
|
+
});
|
|
22289
|
+
|
|
22290
|
+
const makeVDatePickerYearsProps = propsFactory({
|
|
22291
|
+
color: String,
|
|
22292
|
+
min: Number,
|
|
22293
|
+
max: Number,
|
|
22294
|
+
height: [String, Number],
|
|
22295
|
+
displayDate: null
|
|
22296
|
+
}, 'VDatePickerYears');
|
|
22297
|
+
const VDatePickerYears = genericComponent()({
|
|
22298
|
+
name: 'VDatePickerYears',
|
|
22299
|
+
props: makeVDatePickerYearsProps(),
|
|
22300
|
+
emits: {
|
|
22301
|
+
'update:displayDate': date => true,
|
|
22302
|
+
'update:viewMode': date => true
|
|
22303
|
+
},
|
|
22304
|
+
setup(props, _ref) {
|
|
22305
|
+
let {
|
|
22306
|
+
emit
|
|
22307
|
+
} = _ref;
|
|
22308
|
+
const adapter = useDate();
|
|
22309
|
+
const displayYear = vue.computed(() => adapter.getYear(props.displayDate ?? new Date()));
|
|
22310
|
+
const years = vue.computed(() => {
|
|
22311
|
+
const min = props.min ?? displayYear.value - 50 - 2;
|
|
22312
|
+
const max = props.max ?? displayYear.value + 50;
|
|
22313
|
+
return createRange(max - min, min);
|
|
22314
|
+
});
|
|
22315
|
+
const yearRef = vue.ref();
|
|
22316
|
+
vue.onMounted(() => {
|
|
22317
|
+
yearRef.value?.$el.scrollIntoView({
|
|
22318
|
+
block: 'center'
|
|
22319
|
+
});
|
|
22320
|
+
});
|
|
22321
|
+
useRender(() => vue.createVNode("div", {
|
|
22322
|
+
"class": "v-date-picker-years",
|
|
22323
|
+
"style": {
|
|
22324
|
+
height: convertToUnit(props.height)
|
|
22325
|
+
}
|
|
22326
|
+
}, [vue.createVNode("div", {
|
|
22327
|
+
"class": "v-date-picker-years__content"
|
|
22328
|
+
}, [years.value.map(year => vue.createVNode(VBtn, {
|
|
22329
|
+
"ref": year === displayYear.value ? yearRef : undefined,
|
|
22330
|
+
"variant": year === displayYear.value ? 'flat' : 'text',
|
|
22331
|
+
"rounded": "xl",
|
|
22332
|
+
"active": year === displayYear.value,
|
|
22333
|
+
"color": year === displayYear.value ? props.color : undefined,
|
|
22334
|
+
"onClick": () => {
|
|
22335
|
+
emit('update:displayDate', adapter.setYear(props.displayDate, year));
|
|
22336
|
+
emit('update:viewMode', 'month');
|
|
22337
|
+
}
|
|
22338
|
+
}, {
|
|
22339
|
+
default: () => [year]
|
|
22340
|
+
}))])]));
|
|
22341
|
+
return {};
|
|
22342
|
+
}
|
|
22343
|
+
});
|
|
22344
|
+
|
|
22345
|
+
// Types
|
|
22346
|
+
|
|
22347
|
+
const makeVDateCardProps = propsFactory({
|
|
22348
|
+
cancelText: {
|
|
22349
|
+
type: String,
|
|
22350
|
+
default: '$vuetify.datePicker.cancel'
|
|
22351
|
+
},
|
|
22352
|
+
okText: {
|
|
22353
|
+
type: String,
|
|
22354
|
+
default: '$vuetify.datePicker.ok'
|
|
22355
|
+
},
|
|
22356
|
+
inputMode: {
|
|
22357
|
+
type: String,
|
|
22358
|
+
default: 'calendar'
|
|
22359
|
+
},
|
|
22360
|
+
hideActions: Boolean,
|
|
22361
|
+
...makeVDatePickerControlsProps(),
|
|
22362
|
+
...makeVDatePickerMonthProps(),
|
|
22363
|
+
...makeVDatePickerYearsProps(),
|
|
22364
|
+
...makeTransitionProps({
|
|
22365
|
+
transition: {
|
|
22366
|
+
component: VFadeTransition,
|
|
22367
|
+
leaveAbsolute: true
|
|
22368
|
+
}
|
|
22369
|
+
})
|
|
22370
|
+
}, 'VDateCard');
|
|
22371
|
+
const VDateCard = genericComponent()({
|
|
22372
|
+
name: 'VDateCard',
|
|
22373
|
+
props: makeVDateCardProps(),
|
|
22374
|
+
emits: {
|
|
22375
|
+
save: () => true,
|
|
22376
|
+
cancel: () => true,
|
|
22377
|
+
'update:displayDate': value => true,
|
|
22378
|
+
'update:inputMode': value => true,
|
|
22379
|
+
'update:modelValue': value => true,
|
|
22380
|
+
'update:viewMode': mode => true
|
|
22381
|
+
},
|
|
22382
|
+
setup(props, _ref) {
|
|
22383
|
+
let {
|
|
22384
|
+
emit,
|
|
22385
|
+
slots
|
|
22386
|
+
} = _ref;
|
|
22387
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
22388
|
+
const {
|
|
22389
|
+
t
|
|
22390
|
+
} = useLocale();
|
|
22391
|
+
createDatePicker();
|
|
22392
|
+
function onDisplayUpdate(val) {
|
|
22393
|
+
emit('update:displayDate', val);
|
|
22394
|
+
}
|
|
22395
|
+
function onViewModeUpdate(val) {
|
|
22396
|
+
emit('update:viewMode', val);
|
|
22397
|
+
}
|
|
22398
|
+
function onSave() {
|
|
22399
|
+
emit('update:modelValue', model.value);
|
|
22400
|
+
emit('save');
|
|
22401
|
+
}
|
|
22402
|
+
function onCancel() {
|
|
22403
|
+
emit('cancel');
|
|
22404
|
+
}
|
|
22405
|
+
useRender(() => {
|
|
22406
|
+
const [cardProps] = VCard.filterProps(props);
|
|
22407
|
+
const [datePickerControlsProps] = VDatePickerControls.filterProps(props);
|
|
22408
|
+
const [datePickerMonthProps] = VDatePickerMonth.filterProps(props);
|
|
22409
|
+
const [datePickerYearsProps] = VDatePickerYears.filterProps(props);
|
|
22410
|
+
const hasActions = !props.hideActions || !!slots.actions;
|
|
22411
|
+
return vue.createVNode(VCard, vue.mergeProps(cardProps, {
|
|
22412
|
+
"class": "v-date-card"
|
|
22413
|
+
}), {
|
|
22414
|
+
...slots,
|
|
22415
|
+
default: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(VDatePickerControls, vue.mergeProps(datePickerControlsProps, {
|
|
22416
|
+
"onUpdate:displayDate": onDisplayUpdate,
|
|
22417
|
+
"onUpdate:viewMode": onViewModeUpdate
|
|
22418
|
+
}), null), vue.createVNode(MaybeTransition, {
|
|
22419
|
+
"transition": props.transition
|
|
22420
|
+
}, {
|
|
22421
|
+
default: () => [props.viewMode === 'month' ? vue.createVNode(VDatePickerMonth, vue.mergeProps(datePickerMonthProps, {
|
|
22422
|
+
"modelValue": model.value,
|
|
22423
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
22424
|
+
"onUpdate:displayDate": onDisplayUpdate
|
|
22425
|
+
}), null) : vue.createVNode(VDatePickerYears, vue.mergeProps(datePickerYearsProps, {
|
|
22426
|
+
"onUpdate:displayDate": onDisplayUpdate,
|
|
22427
|
+
"onUpdate:viewMode": onViewModeUpdate
|
|
22428
|
+
}), null)]
|
|
22429
|
+
})]),
|
|
22430
|
+
actions: !hasActions ? undefined : () => vue.createVNode(vue.Fragment, null, [slots.actions?.() ?? vue.createVNode(vue.Fragment, null, [vue.createVNode(VBtn, {
|
|
22431
|
+
"onClick": onCancel,
|
|
22432
|
+
"text": t(props.cancelText)
|
|
22433
|
+
}, null), vue.createVNode(VBtn, {
|
|
22434
|
+
"onClick": onSave,
|
|
22435
|
+
"text": t(props.okText)
|
|
22436
|
+
}, null)])])
|
|
22437
|
+
});
|
|
22438
|
+
});
|
|
22439
|
+
return {};
|
|
22440
|
+
}
|
|
22441
|
+
});
|
|
22442
|
+
|
|
22443
|
+
// Types
|
|
22444
|
+
|
|
22445
|
+
const makeVDatePickerHeaderProps = propsFactory({
|
|
22446
|
+
appendIcon: String,
|
|
22447
|
+
color: String,
|
|
22448
|
+
header: String,
|
|
22449
|
+
transition: String
|
|
22450
|
+
}, 'VDatePickerHeader');
|
|
22451
|
+
const VDatePickerHeader = genericComponent()({
|
|
22452
|
+
name: 'VDatePickerHeader',
|
|
22453
|
+
props: makeVDatePickerHeaderProps(),
|
|
22454
|
+
emits: {
|
|
22455
|
+
'click:append': () => true
|
|
22456
|
+
},
|
|
22457
|
+
setup(props, _ref) {
|
|
22458
|
+
let {
|
|
22459
|
+
emit,
|
|
22460
|
+
slots
|
|
22461
|
+
} = _ref;
|
|
22462
|
+
const {
|
|
22463
|
+
backgroundColorClasses,
|
|
22464
|
+
backgroundColorStyles
|
|
22465
|
+
} = useBackgroundColor(props, 'color');
|
|
22466
|
+
function onClickAppend() {
|
|
22467
|
+
emit('click:append');
|
|
22468
|
+
}
|
|
22469
|
+
useRender(() => {
|
|
22470
|
+
const hasContent = !!(slots.default || props.header);
|
|
22471
|
+
const hasAppend = !!(slots.append || props.appendIcon);
|
|
22472
|
+
return vue.createVNode("div", {
|
|
22473
|
+
"class": ['v-date-picker-header', backgroundColorClasses.value],
|
|
22474
|
+
"style": backgroundColorStyles.value
|
|
22475
|
+
}, [slots.prepend && vue.createVNode("div", {
|
|
22476
|
+
"key": "prepend",
|
|
22477
|
+
"class": "v-date-picker-header__prepend"
|
|
22478
|
+
}, [slots.prepend()]), hasContent && vue.createVNode(MaybeTransition, {
|
|
22479
|
+
"key": "content",
|
|
22480
|
+
"name": props.transition
|
|
22481
|
+
}, {
|
|
22482
|
+
default: () => [vue.createVNode("div", {
|
|
22483
|
+
"key": props.header,
|
|
22484
|
+
"class": "v-date-picker-header__content"
|
|
22485
|
+
}, [slots.default?.() ?? props.header])]
|
|
22486
|
+
}), hasAppend && vue.createVNode("div", {
|
|
22487
|
+
"class": "v-date-picker-header__append"
|
|
22488
|
+
}, [!slots.append ? vue.createVNode(VBtn, {
|
|
22489
|
+
"key": "append-btn",
|
|
22490
|
+
"icon": props.appendIcon,
|
|
22491
|
+
"variant": "text",
|
|
22492
|
+
"onClick": onClickAppend
|
|
22493
|
+
}, null) : vue.createVNode(VDefaultsProvider, {
|
|
22494
|
+
"key": "append-defaults",
|
|
22495
|
+
"disabled": !props.appendIcon,
|
|
22496
|
+
"defaults": {
|
|
22497
|
+
VBtn: {
|
|
22498
|
+
icon: props.appendIcon,
|
|
22499
|
+
variant: 'text'
|
|
22500
|
+
}
|
|
22501
|
+
}
|
|
22502
|
+
}, {
|
|
22503
|
+
default: () => [slots.append?.()]
|
|
22504
|
+
})])]);
|
|
22505
|
+
});
|
|
22506
|
+
return {};
|
|
22507
|
+
}
|
|
22508
|
+
});
|
|
22509
|
+
|
|
22510
|
+
// Utilities
|
|
22511
|
+
const VPickerTitle = createSimpleFunctional('v-picker-title');
|
|
22512
|
+
|
|
22513
|
+
// Types
|
|
22514
|
+
|
|
22515
|
+
const makeVPickerProps = propsFactory({
|
|
22516
|
+
landscape: Boolean,
|
|
22517
|
+
title: String,
|
|
22518
|
+
...omit(makeVSheetProps(), ['color'])
|
|
22519
|
+
}, 'VPicker');
|
|
22520
|
+
const VPicker = genericComponent()({
|
|
22521
|
+
name: 'VPicker',
|
|
22522
|
+
props: makeVPickerProps(),
|
|
22523
|
+
setup(props, _ref) {
|
|
22524
|
+
let {
|
|
22525
|
+
slots
|
|
22526
|
+
} = _ref;
|
|
22527
|
+
useRender(() => {
|
|
22528
|
+
const [sheetProps] = VSheet.filterProps(props);
|
|
22529
|
+
const hasTitle = !!(props.title || slots.title);
|
|
22530
|
+
return vue.createVNode(VSheet, vue.mergeProps(sheetProps, {
|
|
22531
|
+
"class": ['v-picker', {
|
|
22532
|
+
'v-picker--landscape': props.landscape,
|
|
22533
|
+
'v-picker--with-actions': !!slots.actions
|
|
22534
|
+
}, props.class],
|
|
22535
|
+
"style": props.style
|
|
22536
|
+
}), {
|
|
22537
|
+
default: () => [hasTitle && vue.createVNode(VPickerTitle, {
|
|
22538
|
+
"key": "picker-title"
|
|
22539
|
+
}, {
|
|
22540
|
+
default: () => [slots.title?.() ?? props.title]
|
|
22541
|
+
}), slots.header && vue.createVNode("div", {
|
|
22542
|
+
"class": "v-picker__header"
|
|
22543
|
+
}, [slots.header()]), vue.createVNode("div", {
|
|
22544
|
+
"class": "v-picker__body"
|
|
22545
|
+
}, [slots.default?.()]), slots.actions && vue.createVNode("div", {
|
|
22546
|
+
"class": "v-picker__actions"
|
|
22547
|
+
}, [slots.actions()])]
|
|
22548
|
+
});
|
|
22549
|
+
});
|
|
22550
|
+
return {};
|
|
22551
|
+
}
|
|
22552
|
+
});
|
|
22553
|
+
|
|
22554
|
+
// Types
|
|
22555
|
+
|
|
22556
|
+
const makeVDatePickerProps = propsFactory({
|
|
22557
|
+
calendarIcon: {
|
|
22558
|
+
type: String,
|
|
22559
|
+
default: '$calendar'
|
|
22560
|
+
},
|
|
22561
|
+
keyboardIcon: {
|
|
22562
|
+
type: String,
|
|
22563
|
+
default: '$edit'
|
|
22564
|
+
},
|
|
22565
|
+
cancelText: {
|
|
22566
|
+
type: String,
|
|
22567
|
+
default: '$vuetify.datePicker.cancel'
|
|
22568
|
+
},
|
|
22569
|
+
okText: {
|
|
22570
|
+
type: String,
|
|
22571
|
+
default: '$vuetify.datePicker.ok'
|
|
22572
|
+
},
|
|
22573
|
+
inputText: {
|
|
22574
|
+
type: String,
|
|
22575
|
+
default: '$vuetify.datePicker.input.placeholder'
|
|
22576
|
+
},
|
|
22577
|
+
header: {
|
|
22578
|
+
type: String,
|
|
22579
|
+
default: '$vuetify.datePicker.header'
|
|
22580
|
+
},
|
|
22581
|
+
hideActions: Boolean,
|
|
22582
|
+
...makeDateProps(),
|
|
22583
|
+
...makeTransitionProps({
|
|
22584
|
+
transition: 'fade'
|
|
22585
|
+
}),
|
|
22586
|
+
...makeVDatePickerControlsProps(),
|
|
22587
|
+
...makeVDatePickerMonthProps(),
|
|
22588
|
+
...makeVDatePickerYearsProps(),
|
|
22589
|
+
...makeVPickerProps({
|
|
22590
|
+
title: '$vuetify.datePicker.title'
|
|
22591
|
+
})
|
|
22592
|
+
}, 'VDatePicker');
|
|
22593
|
+
const VDatePicker = genericComponent()({
|
|
22594
|
+
name: 'VDatePicker',
|
|
22595
|
+
props: makeVDatePickerProps(),
|
|
22596
|
+
emits: {
|
|
22597
|
+
'click:cancel': () => true,
|
|
22598
|
+
'click:save': () => true,
|
|
22599
|
+
...dateEmits
|
|
22600
|
+
},
|
|
22601
|
+
setup(props, _ref) {
|
|
22602
|
+
let {
|
|
22603
|
+
emit,
|
|
22604
|
+
slots
|
|
22605
|
+
} = _ref;
|
|
22606
|
+
const adapter = useDate();
|
|
22607
|
+
const {
|
|
22608
|
+
t
|
|
22609
|
+
} = useLocale();
|
|
22610
|
+
createDatePicker();
|
|
22611
|
+
const model = vue.ref(props.modelValue ?? []);
|
|
22612
|
+
const isReversing = vue.ref(false);
|
|
22613
|
+
const displayDate = useProxiedModel(props, 'displayDate', props.displayDate);
|
|
22614
|
+
const inputMode = useProxiedModel(props, 'inputMode', props.inputMode);
|
|
22615
|
+
const viewMode = useProxiedModel(props, 'viewMode', props.viewMode);
|
|
22616
|
+
const inputModel = vue.computed(() => model.value.length ? adapter.format(model.value[0], 'keyboardDate') : '');
|
|
22617
|
+
const title = vue.computed(() => t(props.title));
|
|
22618
|
+
const header = vue.computed(() => model.value.length ? adapter.format(model.value[0], 'normalDateWithWeekday') : t(props.header));
|
|
22619
|
+
const headerIcon = vue.computed(() => inputMode.value === 'calendar' ? props.keyboardIcon : props.calendarIcon);
|
|
22620
|
+
const headerTransition = vue.computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`);
|
|
22621
|
+
vue.watch(inputModel, () => {
|
|
22622
|
+
const {
|
|
22623
|
+
isValid,
|
|
22624
|
+
date
|
|
22625
|
+
} = adapter;
|
|
22626
|
+
model.value = isValid(inputModel.value) ? [date(inputModel.value)] : [];
|
|
22627
|
+
});
|
|
22628
|
+
vue.watch(model, (val, oldVal) => {
|
|
22629
|
+
if (props.hideActions) {
|
|
22630
|
+
emit('update:modelValue', val);
|
|
22631
|
+
}
|
|
22632
|
+
isReversing.value = adapter.isBefore(val[0], oldVal[0]);
|
|
22633
|
+
});
|
|
22634
|
+
function onClickCancel() {
|
|
22635
|
+
emit('click:cancel');
|
|
22636
|
+
}
|
|
22637
|
+
function onClickSave() {
|
|
22638
|
+
emit('click:save');
|
|
22639
|
+
emit('update:modelValue', model.value);
|
|
22640
|
+
}
|
|
22641
|
+
function onClickAppend() {
|
|
22642
|
+
inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar';
|
|
22643
|
+
}
|
|
22644
|
+
const headerSlotProps = vue.computed(() => ({
|
|
22645
|
+
header: header.value,
|
|
22646
|
+
appendIcon: headerIcon.value,
|
|
22647
|
+
transition: headerTransition.value,
|
|
22648
|
+
'onClick:append': onClickAppend
|
|
22649
|
+
}));
|
|
22650
|
+
useRender(() => {
|
|
22651
|
+
const [pickerProps] = VPicker.filterProps(props);
|
|
22652
|
+
const [datePickerControlsProps] = VDatePickerControls.filterProps(props);
|
|
22653
|
+
const [datePickerMonthProps] = VDatePickerMonth.filterProps(props);
|
|
22654
|
+
const [datePickerYearsProps] = VDatePickerYears.filterProps(props);
|
|
22655
|
+
return vue.createVNode(VPicker, vue.mergeProps(pickerProps, {
|
|
22656
|
+
"class": ['v-date-picker', props.class],
|
|
22657
|
+
"style": props.style,
|
|
22658
|
+
"title": title.value
|
|
22659
|
+
}), {
|
|
22660
|
+
header: () => slots.header?.(headerSlotProps.value) ?? vue.createVNode(VDatePickerHeader, vue.mergeProps({
|
|
22661
|
+
"key": "header"
|
|
22662
|
+
}, headerSlotProps.value), null),
|
|
22663
|
+
default: () => inputMode.value === 'calendar' ? vue.createVNode(vue.Fragment, null, [vue.createVNode(VDatePickerControls, vue.mergeProps(datePickerControlsProps, {
|
|
22664
|
+
"displayDate": displayDate.value,
|
|
22665
|
+
"onUpdate:displayDate": $event => displayDate.value = $event,
|
|
22666
|
+
"viewMode": viewMode.value,
|
|
22667
|
+
"onUpdate:viewMode": $event => viewMode.value = $event
|
|
22668
|
+
}), null), vue.createVNode(MaybeTransition, {
|
|
22669
|
+
"transition": props.transition,
|
|
22670
|
+
"mode": "out-in"
|
|
22671
|
+
}, {
|
|
22672
|
+
default: () => [viewMode.value === 'month' ? vue.createVNode(VDatePickerMonth, vue.mergeProps(datePickerMonthProps, {
|
|
22673
|
+
"modelValue": model.value,
|
|
22674
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
22675
|
+
"displayDate": displayDate.value,
|
|
22676
|
+
"onUpdate:displayDate": $event => displayDate.value = $event
|
|
22677
|
+
}), null) : vue.createVNode(VDatePickerYears, vue.mergeProps(datePickerYearsProps, {
|
|
22678
|
+
"displayDate": displayDate.value,
|
|
22679
|
+
"onUpdate:displayDate": $event => displayDate.value = $event,
|
|
22680
|
+
"viewMode": viewMode.value,
|
|
22681
|
+
"onUpdate:viewMode": $event => viewMode.value = $event
|
|
22682
|
+
}), null)]
|
|
22683
|
+
})]) : vue.createVNode("div", {
|
|
22684
|
+
"class": "v-date-picker__input"
|
|
22685
|
+
}, [vue.createVNode(VTextField, {
|
|
22686
|
+
"modelValue": inputModel.value,
|
|
22687
|
+
"onUpdate:modelValue": $event => inputModel.value = $event,
|
|
22688
|
+
"label": t(props.inputText),
|
|
22689
|
+
"placeholder": "dd/mm/yyyy"
|
|
22690
|
+
}, null)]),
|
|
22691
|
+
actions: !props.hideActions ? () => vue.createVNode("div", null, [vue.createVNode(VBtn, {
|
|
22692
|
+
"variant": "text",
|
|
22693
|
+
"color": props.color,
|
|
22694
|
+
"onClick": onClickCancel,
|
|
22695
|
+
"text": t(props.cancelText)
|
|
22696
|
+
}, null), vue.createVNode(VBtn, {
|
|
22697
|
+
"variant": "text",
|
|
22698
|
+
"color": props.color,
|
|
22699
|
+
"onClick": onClickSave,
|
|
22700
|
+
"text": t(props.okText)
|
|
22701
|
+
}, null)]) : undefined
|
|
22702
|
+
});
|
|
22703
|
+
});
|
|
22704
|
+
return {};
|
|
22705
|
+
}
|
|
22706
|
+
});
|
|
22707
|
+
|
|
22708
|
+
// Types
|
|
22709
|
+
|
|
22710
|
+
const makeVInfiniteScrollProps = propsFactory({
|
|
22711
|
+
color: String,
|
|
22712
|
+
direction: {
|
|
22713
|
+
type: String,
|
|
22714
|
+
default: 'vertical',
|
|
22715
|
+
validator: v => ['vertical', 'horizontal'].includes(v)
|
|
22716
|
+
},
|
|
22717
|
+
side: {
|
|
22718
|
+
type: String,
|
|
22719
|
+
default: 'end',
|
|
22720
|
+
validator: v => ['start', 'end', 'both'].includes(v)
|
|
22721
|
+
},
|
|
22722
|
+
mode: {
|
|
22723
|
+
type: String,
|
|
22724
|
+
default: 'intersect',
|
|
22725
|
+
validator: v => ['intersect', 'manual'].includes(v)
|
|
22726
|
+
},
|
|
22727
|
+
margin: [Number, String],
|
|
22728
|
+
loadMoreText: {
|
|
22729
|
+
type: String,
|
|
22730
|
+
default: '$vuetify.infiniteScroll.loadMore'
|
|
22731
|
+
},
|
|
22732
|
+
emptyText: {
|
|
22733
|
+
type: String,
|
|
22734
|
+
default: '$vuetify.infiniteScroll.empty'
|
|
22735
|
+
},
|
|
22736
|
+
...makeDimensionProps(),
|
|
22737
|
+
...makeTagProps()
|
|
22738
|
+
}, 'VInfiniteScroll');
|
|
22739
|
+
const VInfiniteScrollIntersect = defineComponent({
|
|
22740
|
+
name: 'VInfiniteScrollIntersect',
|
|
22741
|
+
props: {
|
|
22742
|
+
side: {
|
|
22743
|
+
type: String,
|
|
22744
|
+
required: true
|
|
22745
|
+
},
|
|
22746
|
+
rootRef: null,
|
|
22747
|
+
rootMargin: String
|
|
22748
|
+
},
|
|
22749
|
+
emits: {
|
|
22750
|
+
intersect: side => true
|
|
22751
|
+
},
|
|
22752
|
+
setup(props, _ref) {
|
|
22753
|
+
let {
|
|
22754
|
+
emit
|
|
22755
|
+
} = _ref;
|
|
22756
|
+
const {
|
|
22757
|
+
intersectionRef,
|
|
22758
|
+
isIntersecting
|
|
22759
|
+
} = useIntersectionObserver(entries => {}, props.rootMargin ? {
|
|
22760
|
+
root: props.rootRef,
|
|
22761
|
+
rootMargin: props.rootMargin
|
|
22762
|
+
} : undefined);
|
|
22763
|
+
vue.watch(isIntersecting, async val => {
|
|
22764
|
+
if (val) emit('intersect', props.side);
|
|
22765
|
+
});
|
|
22766
|
+
useRender(() => vue.createVNode("div", {
|
|
22767
|
+
"class": "v-infinite-scroll-intersect",
|
|
22768
|
+
"ref": intersectionRef
|
|
22769
|
+
}, [vue.createTextVNode("\xA0")]));
|
|
22770
|
+
return {};
|
|
22771
|
+
}
|
|
22772
|
+
});
|
|
22773
|
+
const VInfiniteScroll = genericComponent()({
|
|
22774
|
+
name: 'VInfiniteScroll',
|
|
22775
|
+
props: makeVInfiniteScrollProps(),
|
|
22776
|
+
emits: {
|
|
22777
|
+
load: options => true
|
|
22778
|
+
},
|
|
22779
|
+
setup(props, _ref2) {
|
|
22780
|
+
let {
|
|
22781
|
+
slots,
|
|
22782
|
+
emit
|
|
22783
|
+
} = _ref2;
|
|
22784
|
+
const rootEl = vue.ref();
|
|
22785
|
+
const startStatus = vue.ref('ok');
|
|
22786
|
+
const endStatus = vue.ref('ok');
|
|
22787
|
+
const margin = vue.computed(() => convertToUnit(props.margin));
|
|
22788
|
+
function setScrollAmount(amount) {
|
|
22789
|
+
if (!rootEl.value) return;
|
|
22790
|
+
const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
22791
|
+
rootEl.value[property] = amount;
|
|
22792
|
+
}
|
|
22793
|
+
function getScrollAmount() {
|
|
22794
|
+
if (!rootEl.value) return 0;
|
|
22795
|
+
const property = props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
22796
|
+
return rootEl.value[property];
|
|
22797
|
+
}
|
|
22798
|
+
function getScrollSize() {
|
|
22799
|
+
if (!rootEl.value) return 0;
|
|
22800
|
+
const property = props.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth';
|
|
22801
|
+
return rootEl.value[property];
|
|
22802
|
+
}
|
|
22803
|
+
function getContainerSize() {
|
|
22804
|
+
if (!rootEl.value) return 0;
|
|
22805
|
+
const property = props.direction === 'vertical' ? 'clientHeight' : 'clientWidth';
|
|
22806
|
+
return rootEl.value[property];
|
|
22807
|
+
}
|
|
22808
|
+
vue.onMounted(() => {
|
|
22809
|
+
if (!rootEl.value) return;
|
|
22810
|
+
if (props.side === 'start') {
|
|
22811
|
+
setScrollAmount(getScrollSize());
|
|
22812
|
+
} else if (props.side === 'both') {
|
|
22813
|
+
setScrollAmount(getScrollSize() / 2 - getContainerSize() / 2);
|
|
22814
|
+
}
|
|
22815
|
+
});
|
|
22816
|
+
function setStatus(side, status) {
|
|
22817
|
+
if (side === 'start') {
|
|
22818
|
+
startStatus.value = status;
|
|
22819
|
+
} else if (side === 'end') {
|
|
22820
|
+
endStatus.value = status;
|
|
22821
|
+
}
|
|
22822
|
+
}
|
|
22823
|
+
function getStatus(side) {
|
|
22824
|
+
return side === 'start' ? startStatus.value : endStatus.value;
|
|
22825
|
+
}
|
|
22826
|
+
let previousScrollSize = 0;
|
|
22827
|
+
function handleIntersect(side) {
|
|
22828
|
+
const status = getStatus(side);
|
|
22829
|
+
if (!rootEl.value || status === 'loading') return;
|
|
22830
|
+
previousScrollSize = getScrollSize();
|
|
22831
|
+
setStatus(side, 'loading');
|
|
22832
|
+
function done(status) {
|
|
22833
|
+
setStatus(side, status);
|
|
22834
|
+
vue.nextTick(() => {
|
|
22835
|
+
if (status === 'ok' && side === 'start') {
|
|
22836
|
+
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
|
22837
|
+
}
|
|
22838
|
+
});
|
|
22839
|
+
}
|
|
22840
|
+
emit('load', {
|
|
22841
|
+
side,
|
|
22842
|
+
done
|
|
22843
|
+
});
|
|
22844
|
+
}
|
|
22845
|
+
const {
|
|
22846
|
+
t
|
|
22847
|
+
} = useLocale();
|
|
22848
|
+
function renderSide(side, status) {
|
|
22849
|
+
if (props.side !== side && props.side !== 'both') return;
|
|
22850
|
+
const onClick = () => handleIntersect(side);
|
|
22851
|
+
const slotProps = {
|
|
22852
|
+
side,
|
|
22853
|
+
props: {
|
|
22854
|
+
onClick,
|
|
22855
|
+
color: props.color
|
|
22856
|
+
}
|
|
22857
|
+
};
|
|
22858
|
+
if (status === 'error') return slots.error?.(slotProps);
|
|
22859
|
+
if (status === 'empty') return slots.empty?.(slotProps) ?? vue.createVNode("div", null, [t(props.emptyText)]);
|
|
22860
|
+
if (props.mode === 'manual') {
|
|
22861
|
+
if (status === 'loading') {
|
|
22862
|
+
return slots.loading?.(slotProps) ?? vue.createVNode(VProgressCircular, {
|
|
22863
|
+
"indeterminate": true,
|
|
22864
|
+
"color": props.color
|
|
22865
|
+
}, null);
|
|
22866
|
+
}
|
|
22867
|
+
return slots['load-more']?.(slotProps) ?? vue.createVNode(VBtn, {
|
|
22868
|
+
"variant": "outlined",
|
|
22869
|
+
"color": props.color,
|
|
22870
|
+
"onClick": onClick
|
|
22871
|
+
}, {
|
|
22872
|
+
default: () => [t(props.loadMoreText)]
|
|
22873
|
+
});
|
|
22874
|
+
}
|
|
22875
|
+
return slots.loading?.(slotProps) ?? vue.createVNode(VProgressCircular, {
|
|
22876
|
+
"indeterminate": true,
|
|
22877
|
+
"color": props.color
|
|
22878
|
+
}, null);
|
|
22879
|
+
}
|
|
22880
|
+
const {
|
|
22881
|
+
dimensionStyles
|
|
22882
|
+
} = useDimension(props);
|
|
22883
|
+
useRender(() => {
|
|
22884
|
+
const Tag = props.tag;
|
|
22885
|
+
const hasStartIntersect = props.side === 'start' || props.side === 'both';
|
|
22886
|
+
const hasEndIntersect = props.side === 'end' || props.side === 'both';
|
|
22887
|
+
const intersectMode = props.mode === 'intersect';
|
|
22888
|
+
return vue.createVNode(Tag, {
|
|
22889
|
+
"ref": rootEl,
|
|
22890
|
+
"class": ['v-infinite-scroll', `v-infinite-scroll--${props.direction}`, {
|
|
22891
|
+
'v-infinite-scroll--start': hasStartIntersect,
|
|
22892
|
+
'v-infinite-scroll--end': hasEndIntersect
|
|
22893
|
+
}],
|
|
22894
|
+
"style": dimensionStyles.value
|
|
22895
|
+
}, {
|
|
22896
|
+
default: () => [vue.createVNode("div", {
|
|
22897
|
+
"class": "v-infinite-scroll__side"
|
|
22898
|
+
}, [renderSide('start', startStatus.value)]), rootEl.value && hasStartIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
22899
|
+
"key": "start",
|
|
22900
|
+
"side": "start",
|
|
22901
|
+
"onIntersect": handleIntersect,
|
|
22902
|
+
"rootRef": rootEl.value,
|
|
22903
|
+
"rootMargin": margin.value
|
|
22904
|
+
}, null), slots.default?.(), rootEl.value && hasEndIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
22905
|
+
"key": "end",
|
|
22906
|
+
"side": "end",
|
|
22907
|
+
"onIntersect": handleIntersect,
|
|
22908
|
+
"rootRef": rootEl.value,
|
|
22909
|
+
"rootMargin": margin.value
|
|
22910
|
+
}, null), vue.createVNode("div", {
|
|
22911
|
+
"class": "v-infinite-scroll__side"
|
|
22912
|
+
}, [renderSide('end', endStatus.value)])]
|
|
22913
|
+
});
|
|
22914
|
+
});
|
|
22915
|
+
}
|
|
22916
|
+
});
|
|
22917
|
+
|
|
22918
|
+
// Types
|
|
22919
|
+
|
|
22920
|
+
const rootTypes = {
|
|
22921
|
+
actions: 'button@2',
|
|
22922
|
+
article: 'heading, paragraph',
|
|
22923
|
+
avatar: 'avatar',
|
|
22924
|
+
button: 'button',
|
|
22925
|
+
card: 'image, heading',
|
|
22926
|
+
'card-avatar': 'image, list-item-avatar',
|
|
22927
|
+
chip: 'chip',
|
|
22928
|
+
'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
|
|
22929
|
+
'date-picker-options': 'text, avatar@2',
|
|
22930
|
+
'date-picker-days': 'avatar@28',
|
|
22931
|
+
divider: 'divider',
|
|
22932
|
+
heading: 'heading',
|
|
22933
|
+
image: 'image',
|
|
22934
|
+
'list-item': 'text',
|
|
22935
|
+
'list-item-avatar': 'avatar, text',
|
|
22936
|
+
'list-item-two-line': 'sentences',
|
|
22937
|
+
'list-item-avatar-two-line': 'avatar, sentences',
|
|
22938
|
+
'list-item-three-line': 'paragraph',
|
|
22939
|
+
'list-item-avatar-three-line': 'avatar, paragraph',
|
|
22940
|
+
paragraph: 'text@3',
|
|
22941
|
+
sentences: 'text@2',
|
|
22942
|
+
subtitle: 'text',
|
|
22943
|
+
table: 'table-heading, table-thead, table-tbody, table-tfoot',
|
|
22944
|
+
'table-heading': 'chip, text',
|
|
22945
|
+
'table-thead': 'heading@6',
|
|
22946
|
+
'table-tbody': 'table-row-divider@6',
|
|
22947
|
+
'table-row-divider': 'table-row, divider',
|
|
22948
|
+
'table-row': 'text@6',
|
|
22949
|
+
'table-tfoot': 'text@2, avatar@2',
|
|
22950
|
+
text: 'text'
|
|
22951
|
+
};
|
|
22952
|
+
function genBone(type) {
|
|
22953
|
+
let children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
22954
|
+
return vue.createVNode("div", {
|
|
22955
|
+
"class": ['v-skeleton-loader__bone', `v-skeleton-loader__${type}`]
|
|
22956
|
+
}, [children]);
|
|
22957
|
+
}
|
|
22958
|
+
function genBones(bone) {
|
|
22959
|
+
// e.g. 'text@3'
|
|
22960
|
+
const [type, length] = bone.split('@');
|
|
22961
|
+
|
|
22962
|
+
// Generate a length array based upon
|
|
22963
|
+
// value after @ in the bone string
|
|
22964
|
+
return Array.from({
|
|
22965
|
+
length
|
|
22966
|
+
}).map(() => genStructure(type));
|
|
22283
22967
|
}
|
|
22284
|
-
function
|
|
22285
|
-
|
|
22968
|
+
function genStructure(type) {
|
|
22969
|
+
let children = [];
|
|
22970
|
+
if (!type) return children;
|
|
22971
|
+
|
|
22972
|
+
// TODO: figure out a better way to type this
|
|
22973
|
+
const bone = rootTypes[type];
|
|
22974
|
+
|
|
22975
|
+
// End of recursion, do nothing
|
|
22976
|
+
/* eslint-disable-next-line no-empty, brace-style */
|
|
22977
|
+
if (type === bone) ;
|
|
22978
|
+
// Array of values - e.g. 'heading, paragraph, text@2'
|
|
22979
|
+
else if (type.includes(',')) return mapBones(type);
|
|
22980
|
+
// Array of values - e.g. 'paragraph@4'
|
|
22981
|
+
else if (type.includes('@')) return genBones(type);
|
|
22982
|
+
// Array of values - e.g. 'card@2'
|
|
22983
|
+
else if (bone.includes(',')) children = mapBones(bone);
|
|
22984
|
+
// Array of values - e.g. 'list-item@2'
|
|
22985
|
+
else if (bone.includes('@')) children = genBones(bone);
|
|
22986
|
+
// Single value - e.g. 'card-heading'
|
|
22987
|
+
else if (bone) children.push(genStructure(bone));
|
|
22988
|
+
return [genBone(type, children)];
|
|
22286
22989
|
}
|
|
22287
|
-
function
|
|
22288
|
-
return
|
|
22990
|
+
function mapBones(bones) {
|
|
22991
|
+
// Remove spaces and return array of structures
|
|
22992
|
+
return bones.replace(/\s/g, '').split(',').map(genStructure);
|
|
22289
22993
|
}
|
|
22994
|
+
const makeVSkeletonLoaderProps = propsFactory({
|
|
22995
|
+
boilerplate: Boolean,
|
|
22996
|
+
color: String,
|
|
22997
|
+
loading: Boolean,
|
|
22998
|
+
loadingText: {
|
|
22999
|
+
type: String,
|
|
23000
|
+
default: '$vuetify.loading'
|
|
23001
|
+
},
|
|
23002
|
+
type: {
|
|
23003
|
+
type: [String, Array],
|
|
23004
|
+
default: 'image'
|
|
23005
|
+
},
|
|
23006
|
+
...makeDimensionProps(),
|
|
23007
|
+
...makeElevationProps(),
|
|
23008
|
+
...makeThemeProps()
|
|
23009
|
+
}, 'VSkeletonLoader');
|
|
23010
|
+
const VSkeletonLoader = genericComponent()({
|
|
23011
|
+
name: 'VSkeletonLoader',
|
|
23012
|
+
props: makeVSkeletonLoaderProps(),
|
|
23013
|
+
setup(props, _ref) {
|
|
23014
|
+
let {
|
|
23015
|
+
slots
|
|
23016
|
+
} = _ref;
|
|
23017
|
+
const {
|
|
23018
|
+
backgroundColorClasses,
|
|
23019
|
+
backgroundColorStyles
|
|
23020
|
+
} = useBackgroundColor(vue.toRef(props, 'color'));
|
|
23021
|
+
const {
|
|
23022
|
+
dimensionStyles
|
|
23023
|
+
} = useDimension(props);
|
|
23024
|
+
const {
|
|
23025
|
+
elevationClasses
|
|
23026
|
+
} = useElevation(props);
|
|
23027
|
+
const {
|
|
23028
|
+
themeClasses
|
|
23029
|
+
} = provideTheme(props);
|
|
23030
|
+
const {
|
|
23031
|
+
t
|
|
23032
|
+
} = useLocale();
|
|
23033
|
+
const items = vue.computed(() => genStructure(wrapInArray(props.type).join(',')));
|
|
23034
|
+
useRender(() => {
|
|
23035
|
+
const isLoading = !slots.default || props.loading;
|
|
23036
|
+
return vue.createVNode("div", {
|
|
23037
|
+
"class": ['v-skeleton-loader', {
|
|
23038
|
+
'v-skeleton-loader--boilerplate': props.boilerplate
|
|
23039
|
+
}, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
|
|
23040
|
+
"style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
|
|
23041
|
+
"aria-busy": !props.boilerplate ? isLoading : undefined,
|
|
23042
|
+
"aria-live": !props.boilerplate ? 'polite' : undefined,
|
|
23043
|
+
"aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
|
|
23044
|
+
"role": !props.boilerplate ? 'alert' : undefined
|
|
23045
|
+
}, [isLoading ? items.value : slots.default?.()]);
|
|
23046
|
+
});
|
|
23047
|
+
return {};
|
|
23048
|
+
}
|
|
23049
|
+
});
|
|
23050
|
+
|
|
23051
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
23052
|
+
__proto__: null,
|
|
23053
|
+
VAlert: VAlert,
|
|
23054
|
+
VAlertTitle: VAlertTitle,
|
|
23055
|
+
VApp: VApp,
|
|
23056
|
+
VAppBar: VAppBar,
|
|
23057
|
+
VAppBarNavIcon: VAppBarNavIcon,
|
|
23058
|
+
VAppBarTitle: VAppBarTitle,
|
|
23059
|
+
VAutocomplete: VAutocomplete,
|
|
23060
|
+
VAvatar: VAvatar,
|
|
23061
|
+
VBadge: VBadge,
|
|
23062
|
+
VBanner: VBanner,
|
|
23063
|
+
VBannerActions: VBannerActions,
|
|
23064
|
+
VBannerText: VBannerText,
|
|
23065
|
+
VBottomNavigation: VBottomNavigation,
|
|
23066
|
+
VBottomSheet: VBottomSheet,
|
|
23067
|
+
VBreadcrumbs: VBreadcrumbs,
|
|
23068
|
+
VBreadcrumbsDivider: VBreadcrumbsDivider,
|
|
23069
|
+
VBreadcrumbsItem: VBreadcrumbsItem,
|
|
23070
|
+
VBtn: VBtn,
|
|
23071
|
+
VBtnGroup: VBtnGroup,
|
|
23072
|
+
VBtnToggle: VBtnToggle,
|
|
23073
|
+
VCard: VCard,
|
|
23074
|
+
VCardActions: VCardActions,
|
|
23075
|
+
VCardItem: VCardItem,
|
|
23076
|
+
VCardSubtitle: VCardSubtitle,
|
|
23077
|
+
VCardText: VCardText,
|
|
23078
|
+
VCardTitle: VCardTitle,
|
|
23079
|
+
VCarousel: VCarousel,
|
|
23080
|
+
VCarouselItem: VCarouselItem,
|
|
23081
|
+
VCheckbox: VCheckbox,
|
|
23082
|
+
VCheckboxBtn: VCheckboxBtn,
|
|
23083
|
+
VChip: VChip,
|
|
23084
|
+
VChipGroup: VChipGroup,
|
|
23085
|
+
VClassIcon: VClassIcon,
|
|
23086
|
+
VCode: VCode,
|
|
23087
|
+
VCol: VCol,
|
|
23088
|
+
VColorPicker: VColorPicker,
|
|
23089
|
+
VCombobox: VCombobox,
|
|
23090
|
+
VComponentIcon: VComponentIcon,
|
|
23091
|
+
VContainer: VContainer,
|
|
23092
|
+
VCounter: VCounter,
|
|
23093
|
+
VDataIterator: VDataIterator,
|
|
23094
|
+
VDataTable: VDataTable,
|
|
23095
|
+
VDataTableFooter: VDataTableFooter,
|
|
23096
|
+
VDataTableRow: VDataTableRow,
|
|
23097
|
+
VDataTableRows: VDataTableRows,
|
|
23098
|
+
VDataTableServer: VDataTableServer,
|
|
23099
|
+
VDataTableVirtual: VDataTableVirtual,
|
|
23100
|
+
VDateCard: VDateCard,
|
|
23101
|
+
VDatePicker: VDatePicker,
|
|
23102
|
+
VDatePickerControls: VDatePickerControls,
|
|
23103
|
+
VDatePickerHeader: VDatePickerHeader,
|
|
23104
|
+
VDatePickerMonth: VDatePickerMonth,
|
|
23105
|
+
VDatePickerYears: VDatePickerYears,
|
|
23106
|
+
VDefaultsProvider: VDefaultsProvider,
|
|
23107
|
+
VDialog: VDialog,
|
|
23108
|
+
VDialogBottomTransition: VDialogBottomTransition,
|
|
23109
|
+
VDialogTopTransition: VDialogTopTransition,
|
|
23110
|
+
VDialogTransition: VDialogTransition,
|
|
23111
|
+
VDivider: VDivider,
|
|
23112
|
+
VExpandTransition: VExpandTransition,
|
|
23113
|
+
VExpandXTransition: VExpandXTransition,
|
|
23114
|
+
VExpansionPanel: VExpansionPanel,
|
|
23115
|
+
VExpansionPanelText: VExpansionPanelText,
|
|
23116
|
+
VExpansionPanelTitle: VExpansionPanelTitle,
|
|
23117
|
+
VExpansionPanels: VExpansionPanels,
|
|
23118
|
+
VFabTransition: VFabTransition,
|
|
23119
|
+
VFadeTransition: VFadeTransition,
|
|
23120
|
+
VField: VField,
|
|
23121
|
+
VFieldLabel: VFieldLabel,
|
|
23122
|
+
VFileInput: VFileInput,
|
|
23123
|
+
VFooter: VFooter,
|
|
23124
|
+
VForm: VForm,
|
|
23125
|
+
VHover: VHover,
|
|
23126
|
+
VIcon: VIcon,
|
|
23127
|
+
VImg: VImg,
|
|
23128
|
+
VInfiniteScroll: VInfiniteScroll,
|
|
23129
|
+
VInput: VInput,
|
|
23130
|
+
VItem: VItem,
|
|
23131
|
+
VItemGroup: VItemGroup,
|
|
23132
|
+
VKbd: VKbd,
|
|
23133
|
+
VLabel: VLabel,
|
|
23134
|
+
VLayout: VLayout,
|
|
23135
|
+
VLayoutItem: VLayoutItem,
|
|
23136
|
+
VLazy: VLazy,
|
|
23137
|
+
VLigatureIcon: VLigatureIcon,
|
|
23138
|
+
VList: VList,
|
|
23139
|
+
VListGroup: VListGroup,
|
|
23140
|
+
VListImg: VListImg,
|
|
23141
|
+
VListItem: VListItem,
|
|
23142
|
+
VListItemAction: VListItemAction,
|
|
23143
|
+
VListItemMedia: VListItemMedia,
|
|
23144
|
+
VListItemSubtitle: VListItemSubtitle,
|
|
23145
|
+
VListItemTitle: VListItemTitle,
|
|
23146
|
+
VListSubheader: VListSubheader,
|
|
23147
|
+
VLocaleProvider: VLocaleProvider,
|
|
23148
|
+
VMain: VMain,
|
|
23149
|
+
VMenu: VMenu,
|
|
23150
|
+
VMessages: VMessages,
|
|
23151
|
+
VNavigationDrawer: VNavigationDrawer,
|
|
23152
|
+
VNoSsr: VNoSsr,
|
|
23153
|
+
VOverlay: VOverlay,
|
|
23154
|
+
VPagination: VPagination,
|
|
23155
|
+
VParallax: VParallax,
|
|
23156
|
+
VPicker: VPicker,
|
|
23157
|
+
VPickerTitle: VPickerTitle,
|
|
23158
|
+
VProgressCircular: VProgressCircular,
|
|
23159
|
+
VProgressLinear: VProgressLinear,
|
|
23160
|
+
VRadio: VRadio,
|
|
23161
|
+
VRadioGroup: VRadioGroup,
|
|
23162
|
+
VRangeSlider: VRangeSlider,
|
|
23163
|
+
VRating: VRating,
|
|
23164
|
+
VResponsive: VResponsive,
|
|
23165
|
+
VRow: VRow,
|
|
23166
|
+
VScaleTransition: VScaleTransition,
|
|
23167
|
+
VScrollXReverseTransition: VScrollXReverseTransition,
|
|
23168
|
+
VScrollXTransition: VScrollXTransition,
|
|
23169
|
+
VScrollYReverseTransition: VScrollYReverseTransition,
|
|
23170
|
+
VScrollYTransition: VScrollYTransition,
|
|
23171
|
+
VSelect: VSelect,
|
|
23172
|
+
VSelectionControl: VSelectionControl,
|
|
23173
|
+
VSelectionControlGroup: VSelectionControlGroup,
|
|
23174
|
+
VSheet: VSheet,
|
|
23175
|
+
VSkeletonLoader: VSkeletonLoader,
|
|
23176
|
+
VSlideGroup: VSlideGroup,
|
|
23177
|
+
VSlideGroupItem: VSlideGroupItem,
|
|
23178
|
+
VSlideXReverseTransition: VSlideXReverseTransition,
|
|
23179
|
+
VSlideXTransition: VSlideXTransition,
|
|
23180
|
+
VSlideYReverseTransition: VSlideYReverseTransition,
|
|
23181
|
+
VSlideYTransition: VSlideYTransition,
|
|
23182
|
+
VSlider: VSlider,
|
|
23183
|
+
VSnackbar: VSnackbar,
|
|
23184
|
+
VSpacer: VSpacer,
|
|
23185
|
+
VSvgIcon: VSvgIcon,
|
|
23186
|
+
VSwitch: VSwitch,
|
|
23187
|
+
VSystemBar: VSystemBar,
|
|
23188
|
+
VTab: VTab,
|
|
23189
|
+
VTable: VTable,
|
|
23190
|
+
VTabs: VTabs,
|
|
23191
|
+
VTextField: VTextField,
|
|
23192
|
+
VTextarea: VTextarea,
|
|
23193
|
+
VThemeProvider: VThemeProvider,
|
|
23194
|
+
VTimeline: VTimeline,
|
|
23195
|
+
VTimelineItem: VTimelineItem,
|
|
23196
|
+
VToolbar: VToolbar,
|
|
23197
|
+
VToolbarItems: VToolbarItems,
|
|
23198
|
+
VToolbarTitle: VToolbarTitle,
|
|
23199
|
+
VTooltip: VTooltip,
|
|
23200
|
+
VValidation: VValidation,
|
|
23201
|
+
VVirtualScroll: VVirtualScroll,
|
|
23202
|
+
VWindow: VWindow,
|
|
23203
|
+
VWindowItem: VWindowItem
|
|
23204
|
+
});
|
|
22290
23205
|
|
|
22291
|
-
//
|
|
22292
|
-
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
23206
|
+
// Types
|
|
23207
|
+
|
|
23208
|
+
function mounted$2(el, binding) {
|
|
23209
|
+
const modifiers = binding.modifiers || {};
|
|
23210
|
+
const value = binding.value;
|
|
23211
|
+
const {
|
|
23212
|
+
once,
|
|
23213
|
+
immediate,
|
|
23214
|
+
...modifierKeys
|
|
23215
|
+
} = modifiers;
|
|
23216
|
+
const defaultValue = !Object.keys(modifierKeys).length;
|
|
23217
|
+
const {
|
|
23218
|
+
handler,
|
|
23219
|
+
options
|
|
23220
|
+
} = typeof value === 'object' ? value : {
|
|
23221
|
+
handler: value,
|
|
23222
|
+
options: {
|
|
23223
|
+
attributes: modifierKeys?.attr ?? defaultValue,
|
|
23224
|
+
characterData: modifierKeys?.char ?? defaultValue,
|
|
23225
|
+
childList: modifierKeys?.child ?? defaultValue,
|
|
23226
|
+
subtree: modifierKeys?.sub ?? defaultValue
|
|
22303
23227
|
}
|
|
22304
|
-
}
|
|
22305
|
-
const
|
|
22306
|
-
|
|
22307
|
-
|
|
22308
|
-
|
|
22309
|
-
|
|
22310
|
-
|
|
22311
|
-
|
|
22312
|
-
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22316
|
-
|
|
22317
|
-
return date.getTime() > comparing.getTime();
|
|
22318
|
-
}
|
|
22319
|
-
function isBefore(date, comparing) {
|
|
22320
|
-
return date.getTime() < comparing.getTime();
|
|
22321
|
-
}
|
|
22322
|
-
function isEqual(date, comparing) {
|
|
22323
|
-
return date.getTime() === comparing.getTime();
|
|
22324
|
-
}
|
|
22325
|
-
function isSameDay(date, comparing) {
|
|
22326
|
-
return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
23228
|
+
};
|
|
23229
|
+
const observer = new MutationObserver(function () {
|
|
23230
|
+
let mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
23231
|
+
let observer = arguments.length > 1 ? arguments[1] : undefined;
|
|
23232
|
+
handler?.(mutations, observer);
|
|
23233
|
+
if (once) unmounted$2(el, binding);
|
|
23234
|
+
});
|
|
23235
|
+
if (immediate) handler?.([], observer);
|
|
23236
|
+
el._mutate = Object(el._mutate);
|
|
23237
|
+
el._mutate[binding.instance.$.uid] = {
|
|
23238
|
+
observer
|
|
23239
|
+
};
|
|
23240
|
+
observer.observe(el, options);
|
|
22327
23241
|
}
|
|
22328
|
-
function
|
|
22329
|
-
|
|
23242
|
+
function unmounted$2(el, binding) {
|
|
23243
|
+
if (!el._mutate?.[binding.instance.$.uid]) return;
|
|
23244
|
+
el._mutate[binding.instance.$.uid].observer.disconnect();
|
|
23245
|
+
delete el._mutate[binding.instance.$.uid];
|
|
22330
23246
|
}
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
|
|
22335
|
-
|
|
23247
|
+
const Mutate = {
|
|
23248
|
+
mounted: mounted$2,
|
|
23249
|
+
unmounted: unmounted$2
|
|
23250
|
+
};
|
|
23251
|
+
|
|
23252
|
+
// Types
|
|
23253
|
+
|
|
23254
|
+
function mounted$1(el, binding) {
|
|
23255
|
+
const handler = binding.value;
|
|
23256
|
+
const options = {
|
|
23257
|
+
passive: !binding.modifiers?.active
|
|
23258
|
+
};
|
|
23259
|
+
window.addEventListener('resize', handler, options);
|
|
23260
|
+
el._onResize = Object(el._onResize);
|
|
23261
|
+
el._onResize[binding.instance.$.uid] = {
|
|
23262
|
+
handler,
|
|
23263
|
+
options
|
|
23264
|
+
};
|
|
23265
|
+
if (!binding.modifiers?.quiet) {
|
|
23266
|
+
handler();
|
|
22336
23267
|
}
|
|
22337
|
-
return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
|
|
22338
|
-
}
|
|
22339
|
-
function setYear(date, year) {
|
|
22340
|
-
const d = new Date(date);
|
|
22341
|
-
d.setFullYear(year);
|
|
22342
|
-
return d;
|
|
22343
23268
|
}
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
addDays(date, amount) {
|
|
22353
|
-
return addDays(date, amount);
|
|
22354
|
-
}
|
|
22355
|
-
addMonths(date, amount) {
|
|
22356
|
-
return addMonths(date, amount);
|
|
22357
|
-
}
|
|
22358
|
-
getWeekArray(date) {
|
|
22359
|
-
return getWeekArray(date);
|
|
22360
|
-
}
|
|
22361
|
-
startOfMonth(date) {
|
|
22362
|
-
return startOfMonth(date);
|
|
22363
|
-
}
|
|
22364
|
-
endOfMonth(date) {
|
|
22365
|
-
return endOfMonth(date);
|
|
22366
|
-
}
|
|
22367
|
-
format(date, formatString) {
|
|
22368
|
-
return format(date, formatString, this.locale);
|
|
22369
|
-
}
|
|
22370
|
-
isEqual(date, comparing) {
|
|
22371
|
-
return isEqual(date, comparing);
|
|
22372
|
-
}
|
|
22373
|
-
isValid(date) {
|
|
22374
|
-
return isValid(date);
|
|
22375
|
-
}
|
|
22376
|
-
isWithinRange(date, range) {
|
|
22377
|
-
return isWithinRange(date, range);
|
|
22378
|
-
}
|
|
22379
|
-
isAfter(date, comparing) {
|
|
22380
|
-
return isAfter(date, comparing);
|
|
22381
|
-
}
|
|
22382
|
-
isSameDay(date, comparing) {
|
|
22383
|
-
return isSameDay(date, comparing);
|
|
22384
|
-
}
|
|
22385
|
-
isSameMonth(date, comparing) {
|
|
22386
|
-
return isSameMonth(date, comparing);
|
|
22387
|
-
}
|
|
22388
|
-
setYear(date, year) {
|
|
22389
|
-
return setYear(date, year);
|
|
22390
|
-
}
|
|
22391
|
-
getDiff(date, comparing, unit) {
|
|
22392
|
-
return getDiff(date, comparing, unit);
|
|
22393
|
-
}
|
|
22394
|
-
getWeek(date) {
|
|
22395
|
-
return getWeek(date);
|
|
22396
|
-
}
|
|
22397
|
-
getWeekdays() {
|
|
22398
|
-
return getWeekdays(this.locale);
|
|
22399
|
-
}
|
|
22400
|
-
getYear(date) {
|
|
22401
|
-
return getYear(date);
|
|
22402
|
-
}
|
|
22403
|
-
getMonth(date) {
|
|
22404
|
-
return getMonth(date);
|
|
22405
|
-
}
|
|
22406
|
-
startOfYear(date) {
|
|
22407
|
-
return startOfYear(date);
|
|
22408
|
-
}
|
|
22409
|
-
endOfYear(date) {
|
|
22410
|
-
return endOfYear(date);
|
|
22411
|
-
}
|
|
23269
|
+
function unmounted$1(el, binding) {
|
|
23270
|
+
if (!el._onResize?.[binding.instance.$.uid]) return;
|
|
23271
|
+
const {
|
|
23272
|
+
handler,
|
|
23273
|
+
options
|
|
23274
|
+
} = el._onResize[binding.instance.$.uid];
|
|
23275
|
+
window.removeEventListener('resize', handler, options);
|
|
23276
|
+
delete el._onResize[binding.instance.$.uid];
|
|
22412
23277
|
}
|
|
22413
|
-
|
|
22414
|
-
|
|
23278
|
+
const Resize = {
|
|
23279
|
+
mounted: mounted$1,
|
|
23280
|
+
unmounted: unmounted$1
|
|
23281
|
+
};
|
|
22415
23282
|
|
|
22416
23283
|
// Types
|
|
22417
23284
|
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
23285
|
+
function mounted(el, binding) {
|
|
23286
|
+
const {
|
|
23287
|
+
self = false
|
|
23288
|
+
} = binding.modifiers ?? {};
|
|
23289
|
+
const value = binding.value;
|
|
23290
|
+
const options = typeof value === 'object' && value.options || {
|
|
23291
|
+
passive: true
|
|
23292
|
+
};
|
|
23293
|
+
const handler = typeof value === 'function' || 'handleEvent' in value ? value : value.handler;
|
|
23294
|
+
const target = self ? el : binding.arg ? document.querySelector(binding.arg) : window;
|
|
23295
|
+
if (!target) return;
|
|
23296
|
+
target.addEventListener('scroll', handler, options);
|
|
23297
|
+
el._onScroll = Object(el._onScroll);
|
|
23298
|
+
el._onScroll[binding.instance.$.uid] = {
|
|
23299
|
+
handler,
|
|
23300
|
+
options,
|
|
23301
|
+
// Don't reference self
|
|
23302
|
+
target: self ? undefined : target
|
|
22422
23303
|
};
|
|
22423
23304
|
}
|
|
23305
|
+
function unmounted(el, binding) {
|
|
23306
|
+
if (!el._onScroll?.[binding.instance.$.uid]) return;
|
|
23307
|
+
const {
|
|
23308
|
+
handler,
|
|
23309
|
+
options,
|
|
23310
|
+
target = el
|
|
23311
|
+
} = el._onScroll[binding.instance.$.uid];
|
|
23312
|
+
target.removeEventListener('scroll', handler, options);
|
|
23313
|
+
delete el._onScroll[binding.instance.$.uid];
|
|
23314
|
+
}
|
|
23315
|
+
function updated(el, binding) {
|
|
23316
|
+
if (binding.value === binding.oldValue) return;
|
|
23317
|
+
unmounted(el, binding);
|
|
23318
|
+
mounted(el, binding);
|
|
23319
|
+
}
|
|
23320
|
+
const Scroll = {
|
|
23321
|
+
mounted,
|
|
23322
|
+
unmounted,
|
|
23323
|
+
updated
|
|
23324
|
+
};
|
|
23325
|
+
|
|
23326
|
+
var directives = /*#__PURE__*/Object.freeze({
|
|
23327
|
+
__proto__: null,
|
|
23328
|
+
ClickOutside: ClickOutside,
|
|
23329
|
+
Intersect: Intersect,
|
|
23330
|
+
Mutate: Mutate,
|
|
23331
|
+
Resize: Resize,
|
|
23332
|
+
Ripple: Ripple,
|
|
23333
|
+
Scroll: Scroll,
|
|
23334
|
+
Touch: Touch
|
|
23335
|
+
});
|
|
22424
23336
|
|
|
22425
23337
|
// Composables
|
|
22426
23338
|
function createVuetify$1() {
|
|
@@ -22507,7 +23419,7 @@
|
|
|
22507
23419
|
date
|
|
22508
23420
|
};
|
|
22509
23421
|
}
|
|
22510
|
-
const version$1 = "3.3.
|
|
23422
|
+
const version$1 = "3.3.4";
|
|
22511
23423
|
createVuetify$1.version = version$1;
|
|
22512
23424
|
|
|
22513
23425
|
// Vue's inject() can only be used in setup
|
|
@@ -22521,7 +23433,7 @@
|
|
|
22521
23433
|
|
|
22522
23434
|
/* eslint-disable local-rules/sort-imports */
|
|
22523
23435
|
|
|
22524
|
-
const version = "3.3.
|
|
23436
|
+
const version = "3.3.4";
|
|
22525
23437
|
|
|
22526
23438
|
/* eslint-disable local-rules/sort-imports */
|
|
22527
23439
|
|