vuetify 3.3.2 → 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 +460 -20
- package/dist/json/importMap-labs.json +32 -0
- package/dist/json/importMap.json +24 -24
- package/dist/json/tags.json +150 -0
- package/dist/json/web-types.json +1639 -40
- package/dist/vuetify-labs.css +499 -230
- package/dist/vuetify-labs.d.ts +5421 -326
- package/dist/vuetify-labs.esm.js +2124 -1098
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +2123 -1097
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +219 -210
- package/dist/vuetify.d.ts +314 -165
- package/dist/vuetify.esm.js +330 -179
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +329 -178
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +792 -784
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +34 -27
- package/lib/blueprints/md1.d.mts +34 -27
- package/lib/blueprints/md2.d.mts +34 -27
- package/lib/blueprints/md3.d.mts +34 -27
- package/lib/components/VAppBar/VAppBar.mjs +3 -10
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +24 -8
- package/lib/components/VAutocomplete/VAutocomplete.css +4 -22
- package/lib/components/VAutocomplete/VAutocomplete.mjs +17 -12
- 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.mjs +1 -1
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +1 -1
- package/lib/components/VBtn/_mixins.scss +1 -1
- package/lib/components/VBtn/index.d.mts +24 -8
- package/lib/components/VCard/VCard.mjs +1 -1
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.mts +44 -28
- package/lib/components/VCheckbox/VCheckbox.mjs +8 -1
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.mts +7 -1
- package/lib/components/VChip/VChip.css +67 -67
- package/lib/components/VChip/VChip.mjs +2 -2
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/_variables.scss +1 -1
- package/lib/components/VChip/index.d.mts +48 -32
- package/lib/components/VCombobox/VCombobox.css +4 -22
- package/lib/components/VCombobox/VCombobox.mjs +16 -8
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- 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/VExpansionPanel/VExpansionPanelTitle.mjs +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +56 -24
- package/lib/components/VField/VField.css +72 -8
- package/lib/components/VField/VField.sass +10 -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/VIcon/VIcon.mjs +2 -2
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- 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 +2 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +24 -8
- package/lib/components/VMenu/VMenu.mjs +29 -3
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +7 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +29 -35
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.css +2 -20
- package/lib/components/VSelect/VSelect.mjs +16 -11
- 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/VSlider/VSliderThumb.mjs +2 -2
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VTabs/VTab.mjs +2 -2
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.css +1 -0
- package/lib/components/VTabs/VTabs.sass +1 -0
- package/lib/components/VTabs/index.d.mts +24 -8
- package/lib/components/VTextarea/VTextarea.css +7 -7
- package/lib/components/VTextarea/VTextarea.sass +9 -9
- package/lib/components/VTimePicker/VTimePickerTitle.mjs +1 -1
- package/lib/components/index.d.mts +266 -132
- 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/composables/theme.mjs +1 -1
- package/lib/composables/theme.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 +36 -35
- 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 +48 -33
- package/lib/labs/VDataTable/VDataTable.css +4 -14
- package/lib/labs/VDataTable/VDataTable.sass +6 -15
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +2 -2
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- 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/VDataTable/composables/select.mjs +3 -2
- package/lib/labs/VDataTable/composables/select.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/bindProps.mjs +49 -0
- package/lib/util/bindProps.mjs.map +1 -0
- package/lib/util/dateTimeUtils.mjs +68 -0
- package/lib/util/dateTimeUtils.mjs.map +1 -1
- package/lib/util/helpers.mjs +3 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/index.mjs +1 -0
- package/lib/util/index.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
|
*/
|
|
@@ -298,6 +298,15 @@
|
|
|
298
298
|
}
|
|
299
299
|
return out;
|
|
300
300
|
}
|
|
301
|
+
function flattenFragments(nodes) {
|
|
302
|
+
return nodes.map(node => {
|
|
303
|
+
if (node.type === vue.Fragment) {
|
|
304
|
+
return flattenFragments(node.children);
|
|
305
|
+
} else {
|
|
306
|
+
return node;
|
|
307
|
+
}
|
|
308
|
+
}).flat();
|
|
309
|
+
}
|
|
301
310
|
function toKebabCase() {
|
|
302
311
|
let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
303
312
|
if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str);
|
|
@@ -377,6 +386,9 @@
|
|
|
377
386
|
}
|
|
378
387
|
const onRE = /^on[^a-z]/;
|
|
379
388
|
const isOn = key => onRE.test(key);
|
|
389
|
+
function eventName(propName) {
|
|
390
|
+
return propName[2].toLowerCase() + propName.slice(3);
|
|
391
|
+
}
|
|
380
392
|
const EventProp = () => [Function, Array];
|
|
381
393
|
function hasEvent(props, name) {
|
|
382
394
|
name = 'on' + vue.capitalize(name);
|
|
@@ -575,6 +587,54 @@
|
|
|
575
587
|
return animation;
|
|
576
588
|
}
|
|
577
589
|
|
|
590
|
+
// Utilities
|
|
591
|
+
const handlers = new WeakMap();
|
|
592
|
+
function bindProps(el, props) {
|
|
593
|
+
Object.keys(props).forEach(k => {
|
|
594
|
+
if (isOn(k)) {
|
|
595
|
+
const name = eventName(k);
|
|
596
|
+
const handler = handlers.get(el);
|
|
597
|
+
if (props[k] == null) {
|
|
598
|
+
handler?.forEach(v => {
|
|
599
|
+
const [n, fn] = v;
|
|
600
|
+
if (n === name) {
|
|
601
|
+
el.removeEventListener(name, fn);
|
|
602
|
+
handler.delete(v);
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
} else if (!handler || ![...handler]?.some(v => v[0] === name && v[1] === props[k])) {
|
|
606
|
+
el.addEventListener(name, props[k]);
|
|
607
|
+
const _handler = handler || new Set();
|
|
608
|
+
_handler.add([name, props[k]]);
|
|
609
|
+
if (!handlers.has(el)) handlers.set(el, _handler);
|
|
610
|
+
}
|
|
611
|
+
} else {
|
|
612
|
+
if (props[k] == null) {
|
|
613
|
+
el.removeAttribute(k);
|
|
614
|
+
} else {
|
|
615
|
+
el.setAttribute(k, props[k]);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
function unbindProps(el, props) {
|
|
621
|
+
Object.keys(props).forEach(k => {
|
|
622
|
+
if (isOn(k)) {
|
|
623
|
+
const name = eventName(k);
|
|
624
|
+
const handler = handlers.get(el);
|
|
625
|
+
handler?.forEach(v => {
|
|
626
|
+
const [n, fn] = v;
|
|
627
|
+
if (n === name) {
|
|
628
|
+
el.removeEventListener(name, fn);
|
|
629
|
+
handler.delete(v);
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
} else {
|
|
633
|
+
el.removeAttribute(k);
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
578
638
|
/* eslint-disable no-console */
|
|
579
639
|
|
|
580
640
|
function consoleWarn(message) {
|
|
@@ -1587,12 +1647,21 @@
|
|
|
1587
1647
|
lastPage: 'Last page',
|
|
1588
1648
|
pageText: '{0}-{1} of {2}'
|
|
1589
1649
|
},
|
|
1650
|
+
dateRangeInput: {
|
|
1651
|
+
divider: 'to'
|
|
1652
|
+
},
|
|
1590
1653
|
datePicker: {
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
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
|
+
}
|
|
1596
1665
|
},
|
|
1597
1666
|
noDataText: 'No data available',
|
|
1598
1667
|
carousel: {
|
|
@@ -2162,6 +2231,7 @@
|
|
|
2162
2231
|
};
|
|
2163
2232
|
}
|
|
2164
2233
|
function install(app) {
|
|
2234
|
+
if (parsedOptions.isDisabled) return;
|
|
2165
2235
|
const head = app._context.provides.usehead;
|
|
2166
2236
|
if (head) {
|
|
2167
2237
|
if (head.push) {
|
|
@@ -2183,7 +2253,6 @@
|
|
|
2183
2253
|
immediate: true
|
|
2184
2254
|
});
|
|
2185
2255
|
function updateStyles() {
|
|
2186
|
-
if (parsedOptions.isDisabled) return;
|
|
2187
2256
|
if (typeof document !== 'undefined' && !styleEl) {
|
|
2188
2257
|
const el = document.createElement('style');
|
|
2189
2258
|
el.type = 'text/css';
|
|
@@ -3575,7 +3644,7 @@
|
|
|
3575
3644
|
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
|
3576
3645
|
return height + extensionHeight;
|
|
3577
3646
|
});
|
|
3578
|
-
|
|
3647
|
+
vue.watchEffect(() => {
|
|
3579
3648
|
if (scrollBehavior.value.hide) {
|
|
3580
3649
|
if (scrollBehavior.value.inverted) {
|
|
3581
3650
|
isActive.value = currentScroll.value > scrollThreshold.value;
|
|
@@ -3585,12 +3654,6 @@
|
|
|
3585
3654
|
} else {
|
|
3586
3655
|
isActive.value = true;
|
|
3587
3656
|
}
|
|
3588
|
-
}
|
|
3589
|
-
useToggleScope(() => !!props.scrollBehavior, () => {
|
|
3590
|
-
vue.watch(currentScroll, setActive, {
|
|
3591
|
-
immediate: true
|
|
3592
|
-
});
|
|
3593
|
-
vue.watch(scrollBehavior, setActive);
|
|
3594
3657
|
});
|
|
3595
3658
|
const {
|
|
3596
3659
|
ssrBootStyles
|
|
@@ -4045,7 +4108,8 @@
|
|
|
4045
4108
|
unfold: 'mdi-unfold-more-horizontal',
|
|
4046
4109
|
file: 'mdi-paperclip',
|
|
4047
4110
|
plus: 'mdi-plus',
|
|
4048
|
-
minus: 'mdi-minus'
|
|
4111
|
+
minus: 'mdi-minus',
|
|
4112
|
+
calendar: 'mdi-calendar'
|
|
4049
4113
|
};
|
|
4050
4114
|
const mdi = {
|
|
4051
4115
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -4270,7 +4334,7 @@
|
|
|
4270
4334
|
useRender(() => {
|
|
4271
4335
|
const slotValue = slots.default?.();
|
|
4272
4336
|
if (slotValue) {
|
|
4273
|
-
slotIcon.value = slotValue.filter(node => node.type === vue.Text && node.children && typeof node.children === 'string')[0]?.children;
|
|
4337
|
+
slotIcon.value = flattenFragments(slotValue).filter(node => node.type === vue.Text && node.children && typeof node.children === 'string')[0]?.children;
|
|
4274
4338
|
}
|
|
4275
4339
|
return vue.createVNode(iconData.value.component, {
|
|
4276
4340
|
"tag": props.tag,
|
|
@@ -5107,7 +5171,7 @@
|
|
|
5107
5171
|
block: Boolean,
|
|
5108
5172
|
stacked: Boolean,
|
|
5109
5173
|
ripple: {
|
|
5110
|
-
type: Boolean,
|
|
5174
|
+
type: [Boolean, Object],
|
|
5111
5175
|
default: true
|
|
5112
5176
|
},
|
|
5113
5177
|
text: String,
|
|
@@ -6390,6 +6454,7 @@
|
|
|
6390
6454
|
inheritAttrs: false,
|
|
6391
6455
|
props: makeVCheckboxProps(),
|
|
6392
6456
|
emits: {
|
|
6457
|
+
'update:modelValue': value => true,
|
|
6393
6458
|
'update:focused': focused => true
|
|
6394
6459
|
},
|
|
6395
6460
|
setup(props, _ref) {
|
|
@@ -6397,6 +6462,7 @@
|
|
|
6397
6462
|
attrs,
|
|
6398
6463
|
slots
|
|
6399
6464
|
} = _ref;
|
|
6465
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
6400
6466
|
const {
|
|
6401
6467
|
isFocused,
|
|
6402
6468
|
focus,
|
|
@@ -6411,6 +6477,8 @@
|
|
|
6411
6477
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
6412
6478
|
"class": ['v-checkbox', props.class]
|
|
6413
6479
|
}, inputAttrs, inputProps, {
|
|
6480
|
+
"modelValue": model.value,
|
|
6481
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
6414
6482
|
"id": id.value,
|
|
6415
6483
|
"focused": isFocused.value,
|
|
6416
6484
|
"style": props.style
|
|
@@ -6429,6 +6497,8 @@
|
|
|
6429
6497
|
"disabled": isDisabled.value,
|
|
6430
6498
|
"readonly": isReadonly.value
|
|
6431
6499
|
}, controlAttrs, {
|
|
6500
|
+
"modelValue": model.value,
|
|
6501
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
6432
6502
|
"onFocus": focus,
|
|
6433
6503
|
"onBlur": blur
|
|
6434
6504
|
}), slots);
|
|
@@ -6566,6 +6636,8 @@
|
|
|
6566
6636
|
}
|
|
6567
6637
|
});
|
|
6568
6638
|
|
|
6639
|
+
// Types
|
|
6640
|
+
|
|
6569
6641
|
const makeVChipProps = propsFactory({
|
|
6570
6642
|
activeClass: String,
|
|
6571
6643
|
appendAvatar: String,
|
|
@@ -6594,7 +6666,7 @@
|
|
|
6594
6666
|
prependAvatar: String,
|
|
6595
6667
|
prependIcon: IconValue,
|
|
6596
6668
|
ripple: {
|
|
6597
|
-
type: Boolean,
|
|
6669
|
+
type: [Boolean, Object],
|
|
6598
6670
|
default: true
|
|
6599
6671
|
},
|
|
6600
6672
|
text: String,
|
|
@@ -7247,7 +7319,7 @@
|
|
|
7247
7319
|
const useNestedItem = (id, isGroup) => {
|
|
7248
7320
|
const parent = vue.inject(VNestedSymbol, emptyNested);
|
|
7249
7321
|
const uidSymbol = Symbol(getUid());
|
|
7250
|
-
const computedId = vue.computed(() => id.value
|
|
7322
|
+
const computedId = vue.computed(() => id.value !== undefined ? id.value : uidSymbol);
|
|
7251
7323
|
const item = {
|
|
7252
7324
|
...parent,
|
|
7253
7325
|
id: computedId,
|
|
@@ -7410,7 +7482,7 @@
|
|
|
7410
7482
|
prependAvatar: String,
|
|
7411
7483
|
prependIcon: IconValue,
|
|
7412
7484
|
ripple: {
|
|
7413
|
-
type: Boolean,
|
|
7485
|
+
type: [Boolean, Object],
|
|
7414
7486
|
default: true
|
|
7415
7487
|
},
|
|
7416
7488
|
subtitle: [String, Number, Boolean],
|
|
@@ -7447,7 +7519,7 @@
|
|
|
7447
7519
|
emit
|
|
7448
7520
|
} = _ref;
|
|
7449
7521
|
const link = useLink(props, attrs);
|
|
7450
|
-
const id = vue.computed(() => props.value
|
|
7522
|
+
const id = vue.computed(() => props.value === undefined ? link.href.value : props.value);
|
|
7451
7523
|
const {
|
|
7452
7524
|
select,
|
|
7453
7525
|
isSelected,
|
|
@@ -7844,10 +7916,13 @@
|
|
|
7844
7916
|
}
|
|
7845
7917
|
function useTransformItems(items, transform) {
|
|
7846
7918
|
function transformIn(value) {
|
|
7847
|
-
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 => {
|
|
7848
7923
|
const existingItem = items.value.find(item => deepEqual(v, item.value));
|
|
7849
7924
|
// Nullish existingItem means value is a custom input value from combobox
|
|
7850
|
-
// In this case, use transformItem to create an
|
|
7925
|
+
// In this case, use transformItem to create an InternalItem based on value
|
|
7851
7926
|
return existingItem ?? transform(v);
|
|
7852
7927
|
});
|
|
7853
7928
|
}
|
|
@@ -8783,29 +8858,29 @@
|
|
|
8783
8858
|
}
|
|
8784
8859
|
});
|
|
8785
8860
|
const availableEvents = {
|
|
8786
|
-
|
|
8861
|
+
onClick: e => {
|
|
8787
8862
|
e.stopPropagation();
|
|
8788
8863
|
activatorEl.value = e.currentTarget || e.target;
|
|
8789
8864
|
isActive.value = !isActive.value;
|
|
8790
8865
|
},
|
|
8791
|
-
|
|
8866
|
+
onMouseenter: e => {
|
|
8792
8867
|
if (e.sourceCapabilities?.firesTouchEvents) return;
|
|
8793
8868
|
isHovered = true;
|
|
8794
8869
|
activatorEl.value = e.currentTarget || e.target;
|
|
8795
8870
|
runOpenDelay();
|
|
8796
8871
|
},
|
|
8797
|
-
|
|
8872
|
+
onMouseleave: e => {
|
|
8798
8873
|
isHovered = false;
|
|
8799
8874
|
runCloseDelay();
|
|
8800
8875
|
},
|
|
8801
|
-
|
|
8876
|
+
onFocus: e => {
|
|
8802
8877
|
if (SUPPORTS_FOCUS_VISIBLE && !e.target.matches(':focus-visible')) return;
|
|
8803
8878
|
isFocused = true;
|
|
8804
8879
|
e.stopPropagation();
|
|
8805
8880
|
activatorEl.value = e.currentTarget || e.target;
|
|
8806
8881
|
runOpenDelay();
|
|
8807
8882
|
},
|
|
8808
|
-
|
|
8883
|
+
onBlur: e => {
|
|
8809
8884
|
isFocused = false;
|
|
8810
8885
|
e.stopPropagation();
|
|
8811
8886
|
runCloseDelay();
|
|
@@ -8814,33 +8889,43 @@
|
|
|
8814
8889
|
const activatorEvents = vue.computed(() => {
|
|
8815
8890
|
const events = {};
|
|
8816
8891
|
if (openOnClick.value) {
|
|
8817
|
-
events.
|
|
8892
|
+
events.onClick = availableEvents.onClick;
|
|
8818
8893
|
}
|
|
8819
8894
|
if (props.openOnHover) {
|
|
8820
|
-
events.
|
|
8821
|
-
events.
|
|
8895
|
+
events.onMouseenter = availableEvents.onMouseenter;
|
|
8896
|
+
events.onMouseleave = availableEvents.onMouseleave;
|
|
8822
8897
|
}
|
|
8823
8898
|
if (openOnFocus.value) {
|
|
8824
|
-
events.
|
|
8825
|
-
events.
|
|
8899
|
+
events.onFocus = availableEvents.onFocus;
|
|
8900
|
+
events.onBlur = availableEvents.onBlur;
|
|
8826
8901
|
}
|
|
8827
8902
|
return events;
|
|
8828
8903
|
});
|
|
8829
8904
|
const contentEvents = vue.computed(() => {
|
|
8830
8905
|
const events = {};
|
|
8831
8906
|
if (props.openOnHover) {
|
|
8832
|
-
events.
|
|
8907
|
+
events.onMouseenter = () => {
|
|
8833
8908
|
isHovered = true;
|
|
8834
8909
|
runOpenDelay();
|
|
8835
8910
|
};
|
|
8836
|
-
events.
|
|
8911
|
+
events.onMouseleave = () => {
|
|
8837
8912
|
isHovered = false;
|
|
8838
8913
|
runCloseDelay();
|
|
8839
8914
|
};
|
|
8840
8915
|
}
|
|
8916
|
+
if (openOnFocus.value) {
|
|
8917
|
+
events.onFocusin = () => {
|
|
8918
|
+
isFocused = true;
|
|
8919
|
+
runOpenDelay();
|
|
8920
|
+
};
|
|
8921
|
+
events.onFocusout = () => {
|
|
8922
|
+
isFocused = false;
|
|
8923
|
+
runCloseDelay();
|
|
8924
|
+
};
|
|
8925
|
+
}
|
|
8841
8926
|
if (props.closeOnContentClick) {
|
|
8842
8927
|
const menu = vue.inject(VMenuSymbol, null);
|
|
8843
|
-
events.
|
|
8928
|
+
events.onClick = () => {
|
|
8844
8929
|
isActive.value = false;
|
|
8845
8930
|
menu?.closeParents();
|
|
8846
8931
|
};
|
|
@@ -8850,14 +8935,14 @@
|
|
|
8850
8935
|
const scrimEvents = vue.computed(() => {
|
|
8851
8936
|
const events = {};
|
|
8852
8937
|
if (props.openOnHover) {
|
|
8853
|
-
events.
|
|
8938
|
+
events.onMouseenter = () => {
|
|
8854
8939
|
if (firstEnter) {
|
|
8855
8940
|
isHovered = true;
|
|
8856
8941
|
firstEnter = false;
|
|
8857
8942
|
runOpenDelay();
|
|
8858
8943
|
}
|
|
8859
8944
|
};
|
|
8860
|
-
events.
|
|
8945
|
+
events.onMouseleave = () => {
|
|
8861
8946
|
isHovered = false;
|
|
8862
8947
|
runCloseDelay();
|
|
8863
8948
|
};
|
|
@@ -8931,29 +9016,13 @@
|
|
|
8931
9016
|
let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();
|
|
8932
9017
|
let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;
|
|
8933
9018
|
if (!el) return;
|
|
8934
|
-
|
|
8935
|
-
let [name, cb] = _ref3;
|
|
8936
|
-
el.addEventListener(name, cb);
|
|
8937
|
-
});
|
|
8938
|
-
Object.keys(_props).forEach(k => {
|
|
8939
|
-
if (_props[k] == null) {
|
|
8940
|
-
el.removeAttribute(k);
|
|
8941
|
-
} else {
|
|
8942
|
-
el.setAttribute(k, _props[k]);
|
|
8943
|
-
}
|
|
8944
|
-
});
|
|
9019
|
+
bindProps(el, vue.mergeProps(activatorEvents.value, _props));
|
|
8945
9020
|
}
|
|
8946
9021
|
function unbindActivatorProps() {
|
|
8947
9022
|
let el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getActivator();
|
|
8948
9023
|
let _props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.activatorProps;
|
|
8949
9024
|
if (!el) return;
|
|
8950
|
-
|
|
8951
|
-
let [name, cb] = _ref4;
|
|
8952
|
-
el.removeEventListener(name, cb);
|
|
8953
|
-
});
|
|
8954
|
-
Object.keys(_props).forEach(k => {
|
|
8955
|
-
el.removeAttribute(k);
|
|
8956
|
-
});
|
|
9025
|
+
unbindProps(el, vue.mergeProps(activatorEvents.value, _props));
|
|
8957
9026
|
}
|
|
8958
9027
|
function getActivator() {
|
|
8959
9028
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
@@ -9480,6 +9549,9 @@
|
|
|
9480
9549
|
if (e.key === 'Escape' && globalTop.value) {
|
|
9481
9550
|
if (!props.persistent) {
|
|
9482
9551
|
isActive.value = false;
|
|
9552
|
+
if (contentEl.value?.contains(document.activeElement)) {
|
|
9553
|
+
activatorEl.value?.focus();
|
|
9554
|
+
}
|
|
9483
9555
|
} else animateClick();
|
|
9484
9556
|
}
|
|
9485
9557
|
}
|
|
@@ -9522,7 +9594,7 @@
|
|
|
9522
9594
|
isActive: isActive.value,
|
|
9523
9595
|
props: vue.mergeProps({
|
|
9524
9596
|
ref: activatorRef
|
|
9525
|
-
},
|
|
9597
|
+
}, activatorEvents.value, props.activatorProps)
|
|
9526
9598
|
}), isMounted.value && vue.createVNode(vue.Teleport, {
|
|
9527
9599
|
"disabled": !teleportTarget.value,
|
|
9528
9600
|
"to": teleportTarget.value
|
|
@@ -9540,7 +9612,7 @@
|
|
|
9540
9612
|
}, scopeId, attrs), [vue.createVNode(Scrim, vue.mergeProps({
|
|
9541
9613
|
"color": scrimColor,
|
|
9542
9614
|
"modelValue": isActive.value && !!props.scrim
|
|
9543
|
-
},
|
|
9615
|
+
}, scrimEvents.value), null), vue.createVNode(MaybeTransition, {
|
|
9544
9616
|
"appear": true,
|
|
9545
9617
|
"persisted": true,
|
|
9546
9618
|
"transition": props.transition,
|
|
@@ -9554,7 +9626,7 @@
|
|
|
9554
9626
|
"ref": contentEl,
|
|
9555
9627
|
"class": ['v-overlay__content', props.contentClass],
|
|
9556
9628
|
"style": [dimensionStyles.value, contentStyles.value]
|
|
9557
|
-
},
|
|
9629
|
+
}, contentEvents.value, props.contentProps), [slots.default?.({
|
|
9558
9630
|
isActive
|
|
9559
9631
|
})]), [[vue.vShow, isActive.value], [vue.resolveDirective("click-outside"), {
|
|
9560
9632
|
handler: onClickOutside,
|
|
@@ -9714,10 +9786,35 @@
|
|
|
9714
9786
|
function onClickOutside() {
|
|
9715
9787
|
parent?.closeParents();
|
|
9716
9788
|
}
|
|
9789
|
+
function onKeydown(e) {
|
|
9790
|
+
if (props.disabled) return;
|
|
9791
|
+
if (e.key === 'Tab') {
|
|
9792
|
+
isActive.value = false;
|
|
9793
|
+
overlay.value?.activatorEl?.focus();
|
|
9794
|
+
}
|
|
9795
|
+
}
|
|
9796
|
+
function onActivatorKeydown(e) {
|
|
9797
|
+
if (props.disabled) return;
|
|
9798
|
+
const el = overlay.value?.contentEl;
|
|
9799
|
+
if (el && isActive.value) {
|
|
9800
|
+
if (e.key === 'ArrowDown') {
|
|
9801
|
+
e.preventDefault();
|
|
9802
|
+
focusChild(el, 'next');
|
|
9803
|
+
} else if (e.key === 'ArrowUp') {
|
|
9804
|
+
e.preventDefault();
|
|
9805
|
+
focusChild(el, 'prev');
|
|
9806
|
+
}
|
|
9807
|
+
} else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
9808
|
+
isActive.value = true;
|
|
9809
|
+
e.preventDefault();
|
|
9810
|
+
setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
|
|
9811
|
+
}
|
|
9812
|
+
}
|
|
9717
9813
|
const activatorProps = vue.computed(() => vue.mergeProps({
|
|
9718
9814
|
'aria-haspopup': 'menu',
|
|
9719
9815
|
'aria-expanded': String(isActive.value),
|
|
9720
|
-
'aria-owns': id.value
|
|
9816
|
+
'aria-owns': id.value,
|
|
9817
|
+
onKeydown: onActivatorKeydown
|
|
9721
9818
|
}, props.activatorProps));
|
|
9722
9819
|
useRender(() => {
|
|
9723
9820
|
const [overlayProps] = VOverlay.filterProps(props);
|
|
@@ -9730,7 +9827,8 @@
|
|
|
9730
9827
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
9731
9828
|
"absolute": true,
|
|
9732
9829
|
"activatorProps": activatorProps.value,
|
|
9733
|
-
"onClick:outside": onClickOutside
|
|
9830
|
+
"onClick:outside": onClickOutside,
|
|
9831
|
+
"onKeydown": onKeydown
|
|
9734
9832
|
}, scopeId), {
|
|
9735
9833
|
activator: slots.activator,
|
|
9736
9834
|
default: function () {
|
|
@@ -10354,7 +10452,7 @@
|
|
|
10354
10452
|
transformIn,
|
|
10355
10453
|
transformOut
|
|
10356
10454
|
} = useItems(props);
|
|
10357
|
-
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
|
10455
|
+
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
|
|
10358
10456
|
const transformed = transformOut(v);
|
|
10359
10457
|
return props.multiple ? transformed : transformed[0] ?? null;
|
|
10360
10458
|
});
|
|
@@ -10374,6 +10472,7 @@
|
|
|
10374
10472
|
}
|
|
10375
10473
|
return items.value;
|
|
10376
10474
|
});
|
|
10475
|
+
const menuDisabled = vue.computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
|
|
10377
10476
|
const listRef = vue.ref();
|
|
10378
10477
|
function onClear(e) {
|
|
10379
10478
|
if (props.openOnClear) {
|
|
@@ -10381,7 +10480,7 @@
|
|
|
10381
10480
|
}
|
|
10382
10481
|
}
|
|
10383
10482
|
function onMousedownControl() {
|
|
10384
|
-
if (
|
|
10483
|
+
if (menuDisabled.value) return;
|
|
10385
10484
|
menu.value = !menu.value;
|
|
10386
10485
|
}
|
|
10387
10486
|
function onKeydown(e) {
|
|
@@ -10395,11 +10494,7 @@
|
|
|
10395
10494
|
if (['Escape', 'Tab'].includes(e.key)) {
|
|
10396
10495
|
menu.value = false;
|
|
10397
10496
|
}
|
|
10398
|
-
if (e.key === '
|
|
10399
|
-
listRef.value?.focus('next');
|
|
10400
|
-
} else if (e.key === 'ArrowUp') {
|
|
10401
|
-
listRef.value?.focus('prev');
|
|
10402
|
-
} else if (e.key === 'Home') {
|
|
10497
|
+
if (e.key === 'Home') {
|
|
10403
10498
|
listRef.value?.focus('first');
|
|
10404
10499
|
} else if (e.key === 'End') {
|
|
10405
10500
|
listRef.value?.focus('last');
|
|
@@ -10425,6 +10520,11 @@
|
|
|
10425
10520
|
model.value = [item];
|
|
10426
10521
|
}
|
|
10427
10522
|
}
|
|
10523
|
+
function onListKeydown(e) {
|
|
10524
|
+
if (e.key === 'Tab') {
|
|
10525
|
+
vTextFieldRef.value?.focus();
|
|
10526
|
+
}
|
|
10527
|
+
}
|
|
10428
10528
|
function select(item) {
|
|
10429
10529
|
if (props.multiple) {
|
|
10430
10530
|
const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));
|
|
@@ -10455,7 +10555,7 @@
|
|
|
10455
10555
|
}
|
|
10456
10556
|
useRender(() => {
|
|
10457
10557
|
const hasChips = !!(props.chips || slots.chip);
|
|
10458
|
-
const hasList = !!(!props.hideNoData || displayItems.value.length || slots
|
|
10558
|
+
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
10459
10559
|
const isDirty = model.value.length > 0;
|
|
10460
10560
|
const [textFieldProps] = VTextField.filterProps(props);
|
|
10461
10561
|
const placeholder = isDirty || !isFocused.value && props.label && !props.persistentPlaceholder ? undefined : props.placeholder;
|
|
@@ -10492,6 +10592,7 @@
|
|
|
10492
10592
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
10493
10593
|
"activator": "parent",
|
|
10494
10594
|
"contentClass": "v-select__content",
|
|
10595
|
+
"disabled": menuDisabled.value,
|
|
10495
10596
|
"eager": props.eager,
|
|
10496
10597
|
"maxHeight": 310,
|
|
10497
10598
|
"openOnClick": false,
|
|
@@ -10504,11 +10605,13 @@
|
|
|
10504
10605
|
"selected": selected.value,
|
|
10505
10606
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
|
10506
10607
|
"onMousedown": e => e.preventDefault(),
|
|
10507
|
-
"
|
|
10608
|
+
"onKeydown": onListKeydown,
|
|
10609
|
+
"onFocusin": onFocusin,
|
|
10610
|
+
"tabindex": "-1"
|
|
10508
10611
|
}, {
|
|
10509
|
-
default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
10612
|
+
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
10510
10613
|
"title": t(props.noDataText)
|
|
10511
|
-
}, null)),
|
|
10614
|
+
}, null)), displayItems.value.map((item, index) => {
|
|
10512
10615
|
const itemProps = vue.mergeProps(item.props, {
|
|
10513
10616
|
key: index,
|
|
10514
10617
|
onClick: () => select(item)
|
|
@@ -10774,7 +10877,7 @@
|
|
|
10774
10877
|
textColorStyles
|
|
10775
10878
|
} = useTextColor(color);
|
|
10776
10879
|
const search = useProxiedModel(props, 'search', '');
|
|
10777
|
-
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
|
10880
|
+
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
|
|
10778
10881
|
const transformed = transformOut(v);
|
|
10779
10882
|
return props.multiple ? transformed : transformed[0] ?? null;
|
|
10780
10883
|
});
|
|
@@ -10800,6 +10903,7 @@
|
|
|
10800
10903
|
const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
|
|
10801
10904
|
return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
|
|
10802
10905
|
});
|
|
10906
|
+
const menuDisabled = vue.computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
|
|
10803
10907
|
const listRef = vue.ref();
|
|
10804
10908
|
function onClear(e) {
|
|
10805
10909
|
if (props.openOnClear) {
|
|
@@ -10808,10 +10912,11 @@
|
|
|
10808
10912
|
search.value = '';
|
|
10809
10913
|
}
|
|
10810
10914
|
function onMousedownControl() {
|
|
10811
|
-
if (
|
|
10915
|
+
if (menuDisabled.value) return;
|
|
10812
10916
|
menu.value = true;
|
|
10813
10917
|
}
|
|
10814
10918
|
function onMousedownMenuIcon(e) {
|
|
10919
|
+
if (menuDisabled.value) return;
|
|
10815
10920
|
if (isFocused.value) {
|
|
10816
10921
|
e.preventDefault();
|
|
10817
10922
|
e.stopPropagation();
|
|
@@ -10837,13 +10942,8 @@
|
|
|
10837
10942
|
}
|
|
10838
10943
|
isPristine.value = true;
|
|
10839
10944
|
}
|
|
10840
|
-
if (e.key === 'ArrowDown') {
|
|
10945
|
+
if (e.key === 'ArrowDown' && highlightFirst.value) {
|
|
10841
10946
|
listRef.value?.focus('next');
|
|
10842
|
-
if (highlightFirst.value) {
|
|
10843
|
-
listRef.value?.focus('next');
|
|
10844
|
-
}
|
|
10845
|
-
} else if (e.key === 'ArrowUp') {
|
|
10846
|
-
listRef.value?.focus('prev');
|
|
10847
10947
|
}
|
|
10848
10948
|
if (!props.multiple) return;
|
|
10849
10949
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
@@ -10878,6 +10978,11 @@
|
|
|
10878
10978
|
}
|
|
10879
10979
|
}
|
|
10880
10980
|
}
|
|
10981
|
+
function onListKeydown(e) {
|
|
10982
|
+
if (e.key === 'Tab') {
|
|
10983
|
+
vTextFieldRef.value?.focus();
|
|
10984
|
+
}
|
|
10985
|
+
}
|
|
10881
10986
|
function onInput(e) {
|
|
10882
10987
|
search.value = e.target.value;
|
|
10883
10988
|
}
|
|
@@ -10947,7 +11052,7 @@
|
|
|
10947
11052
|
});
|
|
10948
11053
|
useRender(() => {
|
|
10949
11054
|
const hasChips = !!(props.chips || slots.chip);
|
|
10950
|
-
const hasList = !!(!props.hideNoData || displayItems.value.length || slots
|
|
11055
|
+
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
10951
11056
|
const isDirty = model.value.length > 0;
|
|
10952
11057
|
const [textFieldProps] = VTextField.filterProps(props);
|
|
10953
11058
|
return vue.createVNode(VTextField, vue.mergeProps({
|
|
@@ -10980,6 +11085,7 @@
|
|
|
10980
11085
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
10981
11086
|
"activator": "parent",
|
|
10982
11087
|
"contentClass": "v-autocomplete__content",
|
|
11088
|
+
"disabled": menuDisabled.value,
|
|
10983
11089
|
"eager": props.eager,
|
|
10984
11090
|
"maxHeight": 310,
|
|
10985
11091
|
"openOnClick": false,
|
|
@@ -10992,12 +11098,14 @@
|
|
|
10992
11098
|
"selected": selected.value,
|
|
10993
11099
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
|
10994
11100
|
"onMousedown": e => e.preventDefault(),
|
|
11101
|
+
"onKeydown": onListKeydown,
|
|
10995
11102
|
"onFocusin": onFocusin,
|
|
10996
|
-
"onFocusout": onFocusout
|
|
11103
|
+
"onFocusout": onFocusout,
|
|
11104
|
+
"tabindex": "-1"
|
|
10997
11105
|
}, {
|
|
10998
|
-
default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
11106
|
+
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
10999
11107
|
"title": t(props.noDataText)
|
|
11000
|
-
}, null)),
|
|
11108
|
+
}, null)), displayItems.value.map((item, index) => {
|
|
11001
11109
|
const itemProps = vue.mergeProps(item.props, {
|
|
11002
11110
|
key: index,
|
|
11003
11111
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
@@ -11747,7 +11855,7 @@
|
|
|
11747
11855
|
prependAvatar: String,
|
|
11748
11856
|
prependIcon: IconValue,
|
|
11749
11857
|
ripple: {
|
|
11750
|
-
type: Boolean,
|
|
11858
|
+
type: [Boolean, Object],
|
|
11751
11859
|
default: true
|
|
11752
11860
|
},
|
|
11753
11861
|
subtitle: String,
|
|
@@ -13152,6 +13260,8 @@
|
|
|
13152
13260
|
return data;
|
|
13153
13261
|
};
|
|
13154
13262
|
|
|
13263
|
+
// Types
|
|
13264
|
+
|
|
13155
13265
|
const makeVSliderThumbProps = propsFactory({
|
|
13156
13266
|
focused: Boolean,
|
|
13157
13267
|
max: {
|
|
@@ -13171,7 +13281,7 @@
|
|
|
13171
13281
|
required: true
|
|
13172
13282
|
},
|
|
13173
13283
|
ripple: {
|
|
13174
|
-
type: Boolean,
|
|
13284
|
+
type: [Boolean, Object],
|
|
13175
13285
|
default: true
|
|
13176
13286
|
},
|
|
13177
13287
|
...makeComponentProps()
|
|
@@ -14330,6 +14440,7 @@
|
|
|
14330
14440
|
const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
|
|
14331
14441
|
return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
|
|
14332
14442
|
});
|
|
14443
|
+
const menuDisabled = vue.computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
|
|
14333
14444
|
const listRef = vue.ref();
|
|
14334
14445
|
function onClear(e) {
|
|
14335
14446
|
cleared = true;
|
|
@@ -14338,10 +14449,11 @@
|
|
|
14338
14449
|
}
|
|
14339
14450
|
}
|
|
14340
14451
|
function onMousedownControl() {
|
|
14341
|
-
if (
|
|
14452
|
+
if (menuDisabled.value) return;
|
|
14342
14453
|
menu.value = true;
|
|
14343
14454
|
}
|
|
14344
14455
|
function onMousedownMenuIcon(e) {
|
|
14456
|
+
if (menuDisabled.value) return;
|
|
14345
14457
|
if (isFocused.value) {
|
|
14346
14458
|
e.preventDefault();
|
|
14347
14459
|
e.stopPropagation();
|
|
@@ -14367,10 +14479,8 @@
|
|
|
14367
14479
|
}
|
|
14368
14480
|
isPristine.value = true;
|
|
14369
14481
|
}
|
|
14370
|
-
if (e.key === 'ArrowDown') {
|
|
14482
|
+
if (e.key === 'ArrowDown' && highlightFirst.value) {
|
|
14371
14483
|
listRef.value?.focus('next');
|
|
14372
|
-
} else if (e.key === 'ArrowUp') {
|
|
14373
|
-
listRef.value?.focus('prev');
|
|
14374
14484
|
}
|
|
14375
14485
|
if (!props.multiple) return;
|
|
14376
14486
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
@@ -14409,6 +14519,11 @@
|
|
|
14409
14519
|
search.value = '';
|
|
14410
14520
|
}
|
|
14411
14521
|
}
|
|
14522
|
+
function onListKeydown(e) {
|
|
14523
|
+
if (e.key === 'Tab') {
|
|
14524
|
+
vTextFieldRef.value?.focus();
|
|
14525
|
+
}
|
|
14526
|
+
}
|
|
14412
14527
|
function onAfterLeave() {
|
|
14413
14528
|
if (isFocused.value) {
|
|
14414
14529
|
isPristine.value = true;
|
|
@@ -14470,7 +14585,7 @@
|
|
|
14470
14585
|
});
|
|
14471
14586
|
useRender(() => {
|
|
14472
14587
|
const hasChips = !!(props.chips || slots.chip);
|
|
14473
|
-
const hasList = !!(!props.hideNoData || displayItems.value.length || slots
|
|
14588
|
+
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
14474
14589
|
const isDirty = model.value.length > 0;
|
|
14475
14590
|
const [textFieldProps] = VTextField.filterProps(props);
|
|
14476
14591
|
return vue.createVNode(VTextField, vue.mergeProps({
|
|
@@ -14503,6 +14618,7 @@
|
|
|
14503
14618
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
14504
14619
|
"activator": "parent",
|
|
14505
14620
|
"contentClass": "v-combobox__content",
|
|
14621
|
+
"disabled": menuDisabled.value,
|
|
14506
14622
|
"eager": props.eager,
|
|
14507
14623
|
"maxHeight": 310,
|
|
14508
14624
|
"openOnClick": false,
|
|
@@ -14515,12 +14631,14 @@
|
|
|
14515
14631
|
"selected": selected.value,
|
|
14516
14632
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
|
14517
14633
|
"onMousedown": e => e.preventDefault(),
|
|
14634
|
+
"onKeydown": onListKeydown,
|
|
14518
14635
|
"onFocusin": onFocusin,
|
|
14519
|
-
"onFocusout": onFocusout
|
|
14636
|
+
"onFocusout": onFocusout,
|
|
14637
|
+
"tabindex": "-1"
|
|
14520
14638
|
}, {
|
|
14521
|
-
default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
14639
|
+
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
14522
14640
|
"title": t(props.noDataText)
|
|
14523
|
-
}, null)),
|
|
14641
|
+
}, null)), displayItems.value.map((item, index) => {
|
|
14524
14642
|
const itemProps = vue.mergeProps(item.props, {
|
|
14525
14643
|
key: index,
|
|
14526
14644
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
@@ -14812,6 +14930,8 @@
|
|
|
14812
14930
|
}
|
|
14813
14931
|
});
|
|
14814
14932
|
|
|
14933
|
+
// Types
|
|
14934
|
+
|
|
14815
14935
|
const makeVExpansionPanelTitleProps = propsFactory({
|
|
14816
14936
|
color: String,
|
|
14817
14937
|
expandIcon: {
|
|
@@ -15084,8 +15204,6 @@
|
|
|
15084
15204
|
"modelValue": model.value,
|
|
15085
15205
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
15086
15206
|
"class": ['v-file-input', {
|
|
15087
|
-
'v-file-input--chips': !!props.chips,
|
|
15088
|
-
'v-file-input--selection-slot': !!slots.selection,
|
|
15089
15207
|
'v-text-field--plain-underlined': isPlainOrUnderlined.value
|
|
15090
15208
|
}, props.class],
|
|
15091
15209
|
"style": props.style,
|
|
@@ -18082,8 +18200,8 @@
|
|
|
18082
18200
|
const initialScale = prevBox[widthHeight] / nextBox[widthHeight];
|
|
18083
18201
|
const sigma = 1.5;
|
|
18084
18202
|
animate(nextEl, {
|
|
18085
|
-
backgroundColor: [color, ''],
|
|
18086
|
-
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'],
|
|
18087
18205
|
transformOrigin: Array(3).fill(origin)
|
|
18088
18206
|
}, {
|
|
18089
18207
|
duration: 225,
|
|
@@ -19507,9 +19625,10 @@
|
|
|
19507
19625
|
allSelected: () => [],
|
|
19508
19626
|
select: _ref => {
|
|
19509
19627
|
let {
|
|
19510
|
-
items
|
|
19628
|
+
items,
|
|
19629
|
+
value
|
|
19511
19630
|
} = _ref;
|
|
19512
|
-
return new Set([items[0]?.value]);
|
|
19631
|
+
return new Set(value ? [items[0]?.value] : []);
|
|
19513
19632
|
},
|
|
19514
19633
|
selectAll: _ref2 => {
|
|
19515
19634
|
let {
|
|
@@ -20121,7 +20240,7 @@
|
|
|
20121
20240
|
function createHeaders(props, options) {
|
|
20122
20241
|
const headers = vue.ref([]);
|
|
20123
20242
|
const columns = vue.ref([]);
|
|
20124
|
-
vue.
|
|
20243
|
+
vue.watchEffect(() => {
|
|
20125
20244
|
const wrapped = !props.headers.length ? [] : Array.isArray(props.headers[0]) ? props.headers : [props.headers];
|
|
20126
20245
|
const flat = wrapped.flatMap((row, index) => row.map(column => ({
|
|
20127
20246
|
column,
|
|
@@ -20241,9 +20360,6 @@
|
|
|
20241
20360
|
return filtered;
|
|
20242
20361
|
});
|
|
20243
20362
|
columns.value = fixedRows.at(-1) ?? [];
|
|
20244
|
-
}, {
|
|
20245
|
-
deep: true,
|
|
20246
|
-
immediate: true
|
|
20247
20363
|
});
|
|
20248
20364
|
const data = {
|
|
20249
20365
|
headers,
|
|
@@ -20397,11 +20513,11 @@
|
|
|
20397
20513
|
"x": x,
|
|
20398
20514
|
"y": y
|
|
20399
20515
|
}, null))])), props.loading && vue.createVNode("tr", {
|
|
20400
|
-
"class": "v-data-
|
|
20516
|
+
"class": "v-data-table-progress"
|
|
20401
20517
|
}, [vue.createVNode("th", {
|
|
20402
20518
|
"colspan": columns.value.length
|
|
20403
20519
|
}, [vue.createVNode(LoaderSlot, {
|
|
20404
|
-
"name": "v-data-table-
|
|
20520
|
+
"name": "v-data-table-progress",
|
|
20405
20521
|
"active": true,
|
|
20406
20522
|
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
20407
20523
|
"indeterminate": true
|
|
@@ -21076,18 +21192,22 @@
|
|
|
21076
21192
|
"items": displayItems.value
|
|
21077
21193
|
}), {
|
|
21078
21194
|
...slots,
|
|
21079
|
-
item: itemSlotProps => {
|
|
21080
|
-
|
|
21081
|
-
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
|
|
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
|
+
})
|
|
21091
21211
|
}), vue.createVNode("tr", {
|
|
21092
21212
|
"style": {
|
|
21093
21213
|
height: convertToUnit(paddingBottom.value),
|
|
@@ -21275,1038 +21395,1944 @@
|
|
|
21275
21395
|
}
|
|
21276
21396
|
});
|
|
21277
21397
|
|
|
21398
|
+
// Utilities
|
|
21399
|
+
|
|
21278
21400
|
// Types
|
|
21279
21401
|
|
|
21280
|
-
const
|
|
21281
|
-
|
|
21282
|
-
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
21287
|
-
|
|
21288
|
-
|
|
21289
|
-
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
|
|
21362
|
-
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21379
|
-
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21386
|
-
|
|
21387
|
-
|
|
21388
|
-
|
|
21389
|
-
|
|
21390
|
-
|
|
21391
|
-
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21398
|
-
|
|
21399
|
-
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
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
|
|
21554
|
+
};
|
|
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);
|
|
21569
|
+
|
|
21570
|
+
// Add the day to the current week
|
|
21571
|
+
currentWeek.push(day);
|
|
21572
|
+
|
|
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 = [];
|
|
21449
21577
|
}
|
|
21450
|
-
const {
|
|
21451
|
-
dimensionStyles
|
|
21452
|
-
} = useDimension(props);
|
|
21453
|
-
useRender(() => {
|
|
21454
|
-
const Tag = props.tag;
|
|
21455
|
-
const hasStartIntersect = props.side === 'start' || props.side === 'both';
|
|
21456
|
-
const hasEndIntersect = props.side === 'end' || props.side === 'both';
|
|
21457
|
-
const intersectMode = props.mode === 'intersect';
|
|
21458
|
-
return vue.createVNode(Tag, {
|
|
21459
|
-
"ref": rootEl,
|
|
21460
|
-
"class": ['v-infinite-scroll', `v-infinite-scroll--${props.direction}`, {
|
|
21461
|
-
'v-infinite-scroll--start': hasStartIntersect,
|
|
21462
|
-
'v-infinite-scroll--end': hasEndIntersect
|
|
21463
|
-
}],
|
|
21464
|
-
"style": dimensionStyles.value
|
|
21465
|
-
}, {
|
|
21466
|
-
default: () => [vue.createVNode("div", {
|
|
21467
|
-
"class": "v-infinite-scroll__side"
|
|
21468
|
-
}, [renderSide('start', startStatus.value)]), rootEl.value && hasStartIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
21469
|
-
"key": "start",
|
|
21470
|
-
"side": "start",
|
|
21471
|
-
"onIntersect": handleIntersect,
|
|
21472
|
-
"rootRef": rootEl.value,
|
|
21473
|
-
"rootMargin": margin.value
|
|
21474
|
-
}, null), slots.default?.(), rootEl.value && hasEndIntersect && intersectMode && vue.createVNode(VInfiniteScrollIntersect, {
|
|
21475
|
-
"key": "end",
|
|
21476
|
-
"side": "end",
|
|
21477
|
-
"onIntersect": handleIntersect,
|
|
21478
|
-
"rootRef": rootEl.value,
|
|
21479
|
-
"rootMargin": margin.value
|
|
21480
|
-
}, null), vue.createVNode("div", {
|
|
21481
|
-
"class": "v-infinite-scroll__side"
|
|
21482
|
-
}, [renderSide('end', endStatus.value)])]
|
|
21483
|
-
});
|
|
21484
|
-
});
|
|
21485
21578
|
}
|
|
21486
|
-
|
|
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;
|
|
21586
|
+
}
|
|
21587
|
+
function startOfMonth(date) {
|
|
21588
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
21589
|
+
}
|
|
21590
|
+
function endOfMonth(date) {
|
|
21591
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
21592
|
+
}
|
|
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);
|
|
21599
|
+
}
|
|
21600
|
+
return null;
|
|
21601
|
+
}
|
|
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
|
+
});
|
|
21612
|
+
}
|
|
21613
|
+
function format(value, formatString, locale) {
|
|
21614
|
+
const date = new Date(value);
|
|
21615
|
+
let options = {};
|
|
21616
|
+
switch (formatString) {
|
|
21617
|
+
case 'fullDateWithWeekday':
|
|
21618
|
+
options = {
|
|
21619
|
+
weekday: 'long',
|
|
21620
|
+
day: 'numeric',
|
|
21621
|
+
month: 'long',
|
|
21622
|
+
year: 'numeric'
|
|
21623
|
+
};
|
|
21624
|
+
break;
|
|
21625
|
+
case 'normalDateWithWeekday':
|
|
21626
|
+
options = {
|
|
21627
|
+
weekday: 'short',
|
|
21628
|
+
day: 'numeric',
|
|
21629
|
+
month: 'short'
|
|
21630
|
+
};
|
|
21631
|
+
break;
|
|
21632
|
+
case 'keyboardDate':
|
|
21633
|
+
options = {};
|
|
21634
|
+
break;
|
|
21635
|
+
case 'monthAndDate':
|
|
21636
|
+
options = {
|
|
21637
|
+
month: 'long',
|
|
21638
|
+
day: 'numeric'
|
|
21639
|
+
};
|
|
21640
|
+
break;
|
|
21641
|
+
case 'monthAndYear':
|
|
21642
|
+
options = {
|
|
21643
|
+
month: 'long',
|
|
21644
|
+
year: 'numeric'
|
|
21645
|
+
};
|
|
21646
|
+
break;
|
|
21647
|
+
case 'dayOfMonth':
|
|
21648
|
+
options = {
|
|
21649
|
+
day: 'numeric'
|
|
21650
|
+
};
|
|
21651
|
+
break;
|
|
21652
|
+
default:
|
|
21653
|
+
options = {
|
|
21654
|
+
timeZone: 'UTC',
|
|
21655
|
+
timeZoneName: 'short'
|
|
21656
|
+
};
|
|
21657
|
+
}
|
|
21658
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
21659
|
+
}
|
|
21660
|
+
function addDays(date, amount) {
|
|
21661
|
+
const d = new Date(date);
|
|
21662
|
+
d.setDate(d.getDate() + amount);
|
|
21663
|
+
return d;
|
|
21664
|
+
}
|
|
21665
|
+
function addMonths(date, amount) {
|
|
21666
|
+
const d = new Date(date);
|
|
21667
|
+
d.setMonth(d.getMonth() + amount);
|
|
21668
|
+
return d;
|
|
21669
|
+
}
|
|
21670
|
+
function getYear(date) {
|
|
21671
|
+
return date.getFullYear();
|
|
21672
|
+
}
|
|
21673
|
+
function getMonth(date) {
|
|
21674
|
+
return date.getMonth();
|
|
21675
|
+
}
|
|
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
|
|
21487
21790
|
|
|
21488
21791
|
// Types
|
|
21489
21792
|
|
|
21490
|
-
const
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
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);
|
|
21527
21863
|
}
|
|
21528
|
-
function genBones(bone) {
|
|
21529
|
-
// e.g. 'text@3'
|
|
21530
|
-
const [type, length] = bone.split('@');
|
|
21531
21864
|
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
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;
|
|
21537
21883
|
}
|
|
21538
|
-
function genStructure(type) {
|
|
21539
|
-
let children = [];
|
|
21540
|
-
if (!type) return children;
|
|
21541
21884
|
|
|
21542
|
-
|
|
21543
|
-
|
|
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
|
|
21544
21986
|
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
|
|
21551
|
-
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
|
|
21555
|
-
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
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
|
+
};
|
|
21559
22010
|
}
|
|
21560
|
-
function
|
|
21561
|
-
|
|
21562
|
-
|
|
22011
|
+
function useDatePicker() {
|
|
22012
|
+
const datePicker = vue.inject(DatePickerSymbol);
|
|
22013
|
+
if (!datePicker) throw new Error('foo');
|
|
22014
|
+
return datePicker;
|
|
21563
22015
|
}
|
|
21564
|
-
|
|
21565
|
-
|
|
22016
|
+
|
|
22017
|
+
const makeVDatePickerMonthProps = propsFactory({
|
|
21566
22018
|
color: String,
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
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)
|
|
21571
22026
|
},
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
|
|
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
|
|
21575
22042
|
},
|
|
21576
|
-
...makeDimensionProps(),
|
|
21577
|
-
...makeElevationProps(),
|
|
21578
|
-
...makeThemeProps()
|
|
21579
|
-
}, 'VSkeletonLoader');
|
|
21580
|
-
const VSkeletonLoader = genericComponent()({
|
|
21581
|
-
name: 'VSkeletonLoader',
|
|
21582
|
-
props: makeVSkeletonLoaderProps(),
|
|
21583
22043
|
setup(props, _ref) {
|
|
21584
22044
|
let {
|
|
22045
|
+
emit,
|
|
21585
22046
|
slots
|
|
21586
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
|
+
});
|
|
21587
22139
|
const {
|
|
21588
22140
|
backgroundColorClasses,
|
|
21589
22141
|
backgroundColorStyles
|
|
21590
|
-
} = useBackgroundColor(
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
|
|
21600
|
-
|
|
21601
|
-
|
|
21602
|
-
|
|
21603
|
-
|
|
21604
|
-
|
|
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
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
|
|
21642
|
-
|
|
21643
|
-
|
|
21644
|
-
|
|
21645
|
-
|
|
21646
|
-
|
|
21647
|
-
|
|
21648
|
-
|
|
21649
|
-
|
|
21650
|
-
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
|
|
21657
|
-
|
|
21658
|
-
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21672
|
-
|
|
21673
|
-
|
|
21674
|
-
|
|
21675
|
-
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21693
|
-
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21707
|
-
|
|
21708
|
-
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
-
|
|
21726
|
-
|
|
21727
|
-
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21734
|
-
|
|
21735
|
-
|
|
21736
|
-
|
|
21737
|
-
|
|
21738
|
-
|
|
21739
|
-
|
|
21740
|
-
|
|
21741
|
-
|
|
21742
|
-
|
|
21743
|
-
|
|
21744
|
-
|
|
21745
|
-
|
|
21746
|
-
|
|
21747
|
-
|
|
21748
|
-
|
|
21749
|
-
|
|
21750
|
-
|
|
21751
|
-
|
|
21752
|
-
|
|
21753
|
-
|
|
21754
|
-
|
|
21755
|
-
|
|
21756
|
-
|
|
21757
|
-
|
|
21758
|
-
|
|
21759
|
-
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21764
|
-
|
|
21765
|
-
|
|
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
|
+
}
|
|
21766
22343
|
});
|
|
21767
22344
|
|
|
21768
22345
|
// Types
|
|
21769
22346
|
|
|
21770
|
-
|
|
21771
|
-
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
}
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
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
|
|
21789
22368
|
}
|
|
21790
|
-
}
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
|
|
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
|
+
});
|
|
21813
22442
|
|
|
21814
22443
|
// Types
|
|
21815
22444
|
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
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 {};
|
|
21829
22507
|
}
|
|
21830
|
-
}
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
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
|
+
});
|
|
21844
22707
|
|
|
21845
22708
|
// Types
|
|
21846
22709
|
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21871
|
-
|
|
21872
|
-
|
|
21873
|
-
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21894
|
-
|
|
21895
|
-
|
|
21896
|
-
|
|
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
|
+
}
|
|
21897
22916
|
});
|
|
21898
22917
|
|
|
21899
|
-
// Utilities
|
|
21900
|
-
|
|
21901
22918
|
// Types
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21916
|
-
|
|
21917
|
-
|
|
21918
|
-
|
|
21919
|
-
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
|
|
21926
|
-
|
|
21927
|
-
|
|
21928
|
-
|
|
21929
|
-
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
|
|
21934
|
-
}
|
|
21935
|
-
function
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
if (!isNaN(parsed)) return new Date(parsed);
|
|
21941
|
-
}
|
|
21942
|
-
return null;
|
|
21943
|
-
}
|
|
21944
|
-
const firstDay = {
|
|
21945
|
-
'001': 1,
|
|
21946
|
-
AD: 1,
|
|
21947
|
-
AE: 6,
|
|
21948
|
-
AF: 6,
|
|
21949
|
-
AG: 0,
|
|
21950
|
-
AI: 1,
|
|
21951
|
-
AL: 1,
|
|
21952
|
-
AM: 1,
|
|
21953
|
-
AN: 1,
|
|
21954
|
-
AR: 1,
|
|
21955
|
-
AS: 0,
|
|
21956
|
-
AT: 1,
|
|
21957
|
-
AU: 0,
|
|
21958
|
-
AX: 1,
|
|
21959
|
-
AZ: 1,
|
|
21960
|
-
BA: 1,
|
|
21961
|
-
BD: 0,
|
|
21962
|
-
BE: 1,
|
|
21963
|
-
BG: 1,
|
|
21964
|
-
BH: 6,
|
|
21965
|
-
BM: 1,
|
|
21966
|
-
BN: 1,
|
|
21967
|
-
BR: 0,
|
|
21968
|
-
BS: 0,
|
|
21969
|
-
BT: 0,
|
|
21970
|
-
BW: 0,
|
|
21971
|
-
BY: 1,
|
|
21972
|
-
BZ: 0,
|
|
21973
|
-
CA: 0,
|
|
21974
|
-
CH: 1,
|
|
21975
|
-
CL: 1,
|
|
21976
|
-
CM: 1,
|
|
21977
|
-
CN: 0,
|
|
21978
|
-
CO: 0,
|
|
21979
|
-
CR: 1,
|
|
21980
|
-
CY: 1,
|
|
21981
|
-
CZ: 1,
|
|
21982
|
-
DE: 1,
|
|
21983
|
-
DJ: 6,
|
|
21984
|
-
DK: 1,
|
|
21985
|
-
DM: 0,
|
|
21986
|
-
DO: 0,
|
|
21987
|
-
DZ: 6,
|
|
21988
|
-
EC: 1,
|
|
21989
|
-
EE: 1,
|
|
21990
|
-
EG: 6,
|
|
21991
|
-
ES: 1,
|
|
21992
|
-
ET: 0,
|
|
21993
|
-
FI: 1,
|
|
21994
|
-
FJ: 1,
|
|
21995
|
-
FO: 1,
|
|
21996
|
-
FR: 1,
|
|
21997
|
-
GB: 1,
|
|
21998
|
-
'GB-alt-variant': 0,
|
|
21999
|
-
GE: 1,
|
|
22000
|
-
GF: 1,
|
|
22001
|
-
GP: 1,
|
|
22002
|
-
GR: 1,
|
|
22003
|
-
GT: 0,
|
|
22004
|
-
GU: 0,
|
|
22005
|
-
HK: 0,
|
|
22006
|
-
HN: 0,
|
|
22007
|
-
HR: 1,
|
|
22008
|
-
HU: 1,
|
|
22009
|
-
ID: 0,
|
|
22010
|
-
IE: 1,
|
|
22011
|
-
IL: 0,
|
|
22012
|
-
IN: 0,
|
|
22013
|
-
IQ: 6,
|
|
22014
|
-
IR: 6,
|
|
22015
|
-
IS: 1,
|
|
22016
|
-
IT: 1,
|
|
22017
|
-
JM: 0,
|
|
22018
|
-
JO: 6,
|
|
22019
|
-
JP: 0,
|
|
22020
|
-
KE: 0,
|
|
22021
|
-
KG: 1,
|
|
22022
|
-
KH: 0,
|
|
22023
|
-
KR: 0,
|
|
22024
|
-
KW: 6,
|
|
22025
|
-
KZ: 1,
|
|
22026
|
-
LA: 0,
|
|
22027
|
-
LB: 1,
|
|
22028
|
-
LI: 1,
|
|
22029
|
-
LK: 1,
|
|
22030
|
-
LT: 1,
|
|
22031
|
-
LU: 1,
|
|
22032
|
-
LV: 1,
|
|
22033
|
-
LY: 6,
|
|
22034
|
-
MC: 1,
|
|
22035
|
-
MD: 1,
|
|
22036
|
-
ME: 1,
|
|
22037
|
-
MH: 0,
|
|
22038
|
-
MK: 1,
|
|
22039
|
-
MM: 0,
|
|
22040
|
-
MN: 1,
|
|
22041
|
-
MO: 0,
|
|
22042
|
-
MQ: 1,
|
|
22043
|
-
MT: 0,
|
|
22044
|
-
MV: 5,
|
|
22045
|
-
MX: 0,
|
|
22046
|
-
MY: 1,
|
|
22047
|
-
MZ: 0,
|
|
22048
|
-
NI: 0,
|
|
22049
|
-
NL: 1,
|
|
22050
|
-
NO: 1,
|
|
22051
|
-
NP: 0,
|
|
22052
|
-
NZ: 1,
|
|
22053
|
-
OM: 6,
|
|
22054
|
-
PA: 0,
|
|
22055
|
-
PE: 0,
|
|
22056
|
-
PH: 0,
|
|
22057
|
-
PK: 0,
|
|
22058
|
-
PL: 1,
|
|
22059
|
-
PR: 0,
|
|
22060
|
-
PT: 0,
|
|
22061
|
-
PY: 0,
|
|
22062
|
-
QA: 6,
|
|
22063
|
-
RE: 1,
|
|
22064
|
-
RO: 1,
|
|
22065
|
-
RS: 1,
|
|
22066
|
-
RU: 1,
|
|
22067
|
-
SA: 0,
|
|
22068
|
-
SD: 6,
|
|
22069
|
-
SE: 1,
|
|
22070
|
-
SG: 0,
|
|
22071
|
-
SI: 1,
|
|
22072
|
-
SK: 1,
|
|
22073
|
-
SM: 1,
|
|
22074
|
-
SV: 0,
|
|
22075
|
-
SY: 6,
|
|
22076
|
-
TH: 0,
|
|
22077
|
-
TJ: 1,
|
|
22078
|
-
TM: 1,
|
|
22079
|
-
TR: 1,
|
|
22080
|
-
TT: 0,
|
|
22081
|
-
TW: 0,
|
|
22082
|
-
UA: 1,
|
|
22083
|
-
UM: 0,
|
|
22084
|
-
US: 0,
|
|
22085
|
-
UY: 1,
|
|
22086
|
-
UZ: 1,
|
|
22087
|
-
VA: 1,
|
|
22088
|
-
VE: 0,
|
|
22089
|
-
VI: 0,
|
|
22090
|
-
VN: 1,
|
|
22091
|
-
WS: 0,
|
|
22092
|
-
XK: 1,
|
|
22093
|
-
YE: 0,
|
|
22094
|
-
ZA: 0,
|
|
22095
|
-
ZW: 0
|
|
22096
|
-
};
|
|
22097
|
-
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
|
22098
|
-
function getWeekdays(locale) {
|
|
22099
|
-
const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
|
|
22100
|
-
return createRange(7).map(i => {
|
|
22101
|
-
const weekday = new Date(sundayJanuarySecond2000);
|
|
22102
|
-
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
|
22103
|
-
return new Intl.DateTimeFormat(locale, {
|
|
22104
|
-
weekday: 'long'
|
|
22105
|
-
}).format(weekday);
|
|
22106
|
-
});
|
|
22107
|
-
}
|
|
22108
|
-
function format(value, formatString, locale) {
|
|
22109
|
-
const date = new Date(value);
|
|
22110
|
-
let options = {};
|
|
22111
|
-
switch (formatString) {
|
|
22112
|
-
case 'fullDateWithWeekday':
|
|
22113
|
-
options = {
|
|
22114
|
-
weekday: 'long',
|
|
22115
|
-
day: 'numeric',
|
|
22116
|
-
month: 'long',
|
|
22117
|
-
year: 'numeric'
|
|
22118
|
-
};
|
|
22119
|
-
break;
|
|
22120
|
-
case 'normalDateWithWeekday':
|
|
22121
|
-
options = {
|
|
22122
|
-
weekday: 'short',
|
|
22123
|
-
day: 'numeric',
|
|
22124
|
-
month: 'short',
|
|
22125
|
-
year: 'numeric'
|
|
22126
|
-
};
|
|
22127
|
-
break;
|
|
22128
|
-
case 'keyboardDate':
|
|
22129
|
-
options = {};
|
|
22130
|
-
break;
|
|
22131
|
-
case 'monthAndDate':
|
|
22132
|
-
options = {
|
|
22133
|
-
month: 'long',
|
|
22134
|
-
day: 'numeric'
|
|
22135
|
-
};
|
|
22136
|
-
break;
|
|
22137
|
-
case 'monthAndYear':
|
|
22138
|
-
options = {
|
|
22139
|
-
month: 'long',
|
|
22140
|
-
year: 'numeric'
|
|
22141
|
-
};
|
|
22142
|
-
break;
|
|
22143
|
-
default:
|
|
22144
|
-
options = {
|
|
22145
|
-
timeZone: 'UTC',
|
|
22146
|
-
timeZoneName: 'short'
|
|
22147
|
-
};
|
|
22148
|
-
}
|
|
22149
|
-
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
22150
|
-
}
|
|
22151
|
-
function addDays(date, amount) {
|
|
22152
|
-
const d = new Date(date);
|
|
22153
|
-
d.setDate(d.getDate() + amount);
|
|
22154
|
-
return d;
|
|
22155
|
-
}
|
|
22156
|
-
function addMonths(date, amount) {
|
|
22157
|
-
const d = new Date(date);
|
|
22158
|
-
d.setMonth(d.getMonth() + amount);
|
|
22159
|
-
return d;
|
|
22160
|
-
}
|
|
22161
|
-
function getYear(date) {
|
|
22162
|
-
return date.getFullYear();
|
|
22163
|
-
}
|
|
22164
|
-
function getMonth(date) {
|
|
22165
|
-
return date.getMonth();
|
|
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]);
|
|
22166
22957
|
}
|
|
22167
|
-
function
|
|
22168
|
-
|
|
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));
|
|
22169
22967
|
}
|
|
22170
|
-
function
|
|
22171
|
-
|
|
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)];
|
|
22172
22989
|
}
|
|
22173
|
-
function
|
|
22174
|
-
return
|
|
22990
|
+
function mapBones(bones) {
|
|
22991
|
+
// Remove spaces and return array of structures
|
|
22992
|
+
return bones.replace(/\s/g, '').split(',').map(genStructure);
|
|
22175
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
|
+
});
|
|
22176
23205
|
|
|
22177
|
-
//
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
|
|
22183
|
-
|
|
22184
|
-
|
|
22185
|
-
|
|
22186
|
-
|
|
22187
|
-
|
|
22188
|
-
|
|
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
|
|
22189
23227
|
}
|
|
22190
|
-
}
|
|
22191
|
-
const
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22195
|
-
|
|
22196
|
-
|
|
22197
|
-
|
|
22198
|
-
|
|
22199
|
-
|
|
22200
|
-
|
|
22201
|
-
|
|
22202
|
-
|
|
22203
|
-
return date.getTime() > comparing.getTime();
|
|
22204
|
-
}
|
|
22205
|
-
function isBefore(date, comparing) {
|
|
22206
|
-
return date.getTime() < comparing.getTime();
|
|
22207
|
-
}
|
|
22208
|
-
function isEqual(date, comparing) {
|
|
22209
|
-
return date.getTime() === comparing.getTime();
|
|
22210
|
-
}
|
|
22211
|
-
function isSameDay(date, comparing) {
|
|
22212
|
-
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);
|
|
22213
23241
|
}
|
|
22214
|
-
function
|
|
22215
|
-
|
|
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];
|
|
22216
23246
|
}
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
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();
|
|
22222
23267
|
}
|
|
22223
|
-
return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
|
|
22224
|
-
}
|
|
22225
|
-
function setYear(date, year) {
|
|
22226
|
-
const d = new Date(date);
|
|
22227
|
-
d.setFullYear(year);
|
|
22228
|
-
return d;
|
|
22229
23268
|
}
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22237
|
-
|
|
22238
|
-
addDays(date, amount) {
|
|
22239
|
-
return addDays(date, amount);
|
|
22240
|
-
}
|
|
22241
|
-
addMonths(date, amount) {
|
|
22242
|
-
return addMonths(date, amount);
|
|
22243
|
-
}
|
|
22244
|
-
getWeekArray(date) {
|
|
22245
|
-
return getWeekArray(date);
|
|
22246
|
-
}
|
|
22247
|
-
startOfMonth(date) {
|
|
22248
|
-
return startOfMonth(date);
|
|
22249
|
-
}
|
|
22250
|
-
endOfMonth(date) {
|
|
22251
|
-
return endOfMonth(date);
|
|
22252
|
-
}
|
|
22253
|
-
format(date, formatString) {
|
|
22254
|
-
return format(date, formatString, this.locale);
|
|
22255
|
-
}
|
|
22256
|
-
isEqual(date, comparing) {
|
|
22257
|
-
return isEqual(date, comparing);
|
|
22258
|
-
}
|
|
22259
|
-
isValid(date) {
|
|
22260
|
-
return isValid(date);
|
|
22261
|
-
}
|
|
22262
|
-
isWithinRange(date, range) {
|
|
22263
|
-
return isWithinRange(date, range);
|
|
22264
|
-
}
|
|
22265
|
-
isAfter(date, comparing) {
|
|
22266
|
-
return isAfter(date, comparing);
|
|
22267
|
-
}
|
|
22268
|
-
isSameDay(date, comparing) {
|
|
22269
|
-
return isSameDay(date, comparing);
|
|
22270
|
-
}
|
|
22271
|
-
isSameMonth(date, comparing) {
|
|
22272
|
-
return isSameMonth(date, comparing);
|
|
22273
|
-
}
|
|
22274
|
-
setYear(date, year) {
|
|
22275
|
-
return setYear(date, year);
|
|
22276
|
-
}
|
|
22277
|
-
getDiff(date, comparing, unit) {
|
|
22278
|
-
return getDiff(date, comparing, unit);
|
|
22279
|
-
}
|
|
22280
|
-
getWeek(date) {
|
|
22281
|
-
return getWeek(date);
|
|
22282
|
-
}
|
|
22283
|
-
getWeekdays() {
|
|
22284
|
-
return getWeekdays(this.locale);
|
|
22285
|
-
}
|
|
22286
|
-
getYear(date) {
|
|
22287
|
-
return getYear(date);
|
|
22288
|
-
}
|
|
22289
|
-
getMonth(date) {
|
|
22290
|
-
return getMonth(date);
|
|
22291
|
-
}
|
|
22292
|
-
startOfYear(date) {
|
|
22293
|
-
return startOfYear(date);
|
|
22294
|
-
}
|
|
22295
|
-
endOfYear(date) {
|
|
22296
|
-
return endOfYear(date);
|
|
22297
|
-
}
|
|
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];
|
|
22298
23277
|
}
|
|
22299
|
-
|
|
22300
|
-
|
|
23278
|
+
const Resize = {
|
|
23279
|
+
mounted: mounted$1,
|
|
23280
|
+
unmounted: unmounted$1
|
|
23281
|
+
};
|
|
22301
23282
|
|
|
22302
23283
|
// Types
|
|
22303
23284
|
|
|
22304
|
-
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
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
|
|
22308
23303
|
};
|
|
22309
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
|
+
});
|
|
22310
23336
|
|
|
22311
23337
|
// Composables
|
|
22312
23338
|
function createVuetify$1() {
|
|
@@ -22393,7 +23419,7 @@
|
|
|
22393
23419
|
date
|
|
22394
23420
|
};
|
|
22395
23421
|
}
|
|
22396
|
-
const version$1 = "3.3.
|
|
23422
|
+
const version$1 = "3.3.4";
|
|
22397
23423
|
createVuetify$1.version = version$1;
|
|
22398
23424
|
|
|
22399
23425
|
// Vue's inject() can only be used in setup
|
|
@@ -22407,7 +23433,7 @@
|
|
|
22407
23433
|
|
|
22408
23434
|
/* eslint-disable local-rules/sort-imports */
|
|
22409
23435
|
|
|
22410
|
-
const version = "3.3.
|
|
23436
|
+
const version = "3.3.4";
|
|
22411
23437
|
|
|
22412
23438
|
/* eslint-disable local-rules/sort-imports */
|
|
22413
23439
|
|