vuetify 3.9.0-beta.0 → 3.9.0
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 +1 -0
- package/dist/json/attributes.json +3590 -3502
- package/dist/json/importMap-labs.json +16 -12
- package/dist/json/importMap.json +186 -186
- package/dist/json/tags.json +31 -4
- package/dist/json/web-types.json +6626 -6392
- package/dist/vuetify-labs.cjs +1082 -195
- package/dist/vuetify-labs.css +4654 -4339
- package/dist/vuetify-labs.d.ts +2027 -493
- package/dist/vuetify-labs.esm.js +1082 -196
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1082 -195
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +663 -170
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +4744 -4671
- package/dist/vuetify.d.ts +1575 -267
- package/dist/vuetify.esm.js +663 -171
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +663 -170
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1182 -1126
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +39 -14
- package/lib/components/VAutocomplete/VAutocomplete.js +2 -2
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBtn/VBtn.sass +3 -1
- package/lib/components/VCarousel/VCarousel.css +0 -1
- package/lib/components/VCarousel/VCarousel.js +1 -0
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +0 -1
- package/lib/components/VCombobox/VCombobox.d.ts +39 -14
- package/lib/components/VCombobox/VCombobox.js +2 -2
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataIterator/composables/items.d.ts +2 -1
- package/lib/components/VDataIterator/composables/items.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.css +12 -1
- package/lib/components/VDataTable/VDataTable.d.ts +20 -38
- package/lib/components/VDataTable/VDataTable.sass +12 -2
- package/lib/components/VDataTable/VDataTableColumn.d.ts +9 -3
- package/lib/components/VDataTable/VDataTableColumn.js +12 -4
- package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.d.ts +0 -13
- package/lib/components/VDataTable/VDataTableHeaders.js +10 -9
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRow.js +2 -0
- package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.d.ts +10 -23
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +10 -23
- package/lib/components/VDataTable/composables/headers.d.ts +22 -14
- package/lib/components/VDataTable/composables/headers.js +51 -22
- package/lib/components/VDataTable/composables/headers.js.map +1 -1
- package/lib/components/VDataTable/composables/sort.js +2 -1
- package/lib/components/VDataTable/composables/sort.js.map +1 -1
- package/lib/components/VDataTable/types.d.ts +4 -2
- package/lib/components/VDataTable/types.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +2 -1
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.css +1 -0
- package/lib/components/VDatePicker/VDatePickerControls.sass +1 -0
- package/lib/components/VDatePicker/VDatePickerMonth.css +3 -8
- package/lib/components/VDatePicker/VDatePickerMonth.js +7 -3
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.sass +3 -8
- package/lib/components/VField/VField.js +2 -10
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VKbd/VKbd.css +14 -5
- package/lib/components/VKbd/VKbd.js.map +1 -1
- package/lib/components/VKbd/VKbd.scss +26 -0
- package/lib/components/VKbd/_variables.scss +12 -6
- package/lib/components/VKbd/index.js.map +1 -1
- package/lib/components/VList/VList.d.ts +24 -27
- package/lib/components/VList/VList.js +1 -5
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListGroup.d.ts +13 -0
- package/lib/components/VList/VListGroup.js +2 -1
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.d.ts +6 -3
- package/lib/components/VList/VListItem.js +1 -1
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.js +4 -10
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VNumberInput/hold.js +4 -0
- package/lib/components/VNumberInput/hold.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +17 -14
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverlay/locationStrategies.js +1 -1
- package/lib/components/VOverlay/locationStrategies.js.map +1 -1
- package/lib/components/VSelect/VSelect.d.ts +58 -22
- package/lib/components/VSelect/VSelect.js +2 -2
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +1 -1
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.css +1 -6
- package/lib/components/VTimePicker/VTimePicker.sass +1 -6
- package/lib/components/VTimePicker/VTimePickerClock.css +5 -4
- package/lib/components/VTimePicker/VTimePickerClock.sass +5 -4
- package/lib/components/VTimePicker/VTimePickerControls.css +2 -1
- package/lib/components/VTimePicker/VTimePickerControls.sass +2 -3
- package/lib/components/VTreeview/VTreeview.d.ts +235 -188
- package/lib/components/VTreeview/VTreeview.js +13 -12
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewChildren.d.ts +94 -10
- package/lib/components/VTreeview/VTreeviewChildren.js +61 -17
- package/lib/components/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewGroup.d.ts +13 -0
- package/lib/components/VTreeview/VTreeviewItem.css +57 -0
- package/lib/components/VTreeview/VTreeviewItem.d.ts +1334 -97
- package/lib/components/VTreeview/VTreeviewItem.js +25 -16
- package/lib/components/VTreeview/VTreeviewItem.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewItem.sass +60 -0
- package/lib/components/VTreeview/_variables.scss +15 -0
- package/lib/composables/calendar.d.ts +2 -1
- package/lib/composables/calendar.js +8 -8
- package/lib/composables/calendar.js.map +1 -1
- package/lib/composables/date/adapters/vuetify.js +1 -1
- package/lib/composables/date/adapters/vuetify.js.map +1 -1
- package/lib/composables/filter.d.ts +1 -0
- package/lib/composables/filter.js +1 -1
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/hotkey/hotkey-parsing.d.ts +15 -0
- package/lib/composables/hotkey/hotkey-parsing.js +154 -0
- package/lib/composables/hotkey/hotkey-parsing.js.map +1 -0
- package/lib/composables/hotkey/hotkey.d.ts +9 -0
- package/lib/composables/{hotkey.js → hotkey/hotkey.js} +31 -39
- package/lib/composables/hotkey/hotkey.js.map +1 -0
- package/lib/composables/hotkey/index.d.ts +1 -0
- package/lib/composables/hotkey/index.js +2 -0
- package/lib/composables/hotkey/index.js.map +1 -0
- package/lib/composables/hotkey/key-aliases.d.ts +14 -0
- package/lib/composables/hotkey/key-aliases.js +38 -0
- package/lib/composables/hotkey/key-aliases.js.map +1 -0
- package/lib/composables/icons.d.ts +11 -0
- package/lib/composables/icons.js.map +1 -1
- package/lib/composables/index.d.ts +1 -0
- package/lib/composables/index.js +1 -0
- package/lib/composables/index.js.map +1 -1
- package/lib/composables/list-items.d.ts +14 -1
- package/lib/composables/list-items.js +9 -3
- package/lib/composables/list-items.js.map +1 -1
- package/lib/composables/nested/nested.d.ts +7 -4
- package/lib/composables/nested/nested.js +24 -14
- package/lib/composables/nested/nested.js.map +1 -1
- package/lib/composables/nested/selectStrategies.d.ts +2 -1
- package/lib/composables/nested/selectStrategies.js +22 -11
- package/lib/composables/nested/selectStrategies.js.map +1 -1
- package/lib/composables/virtual.js +1 -1
- package/lib/composables/virtual.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +91 -66
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/iconsets/fa.js +12 -1
- package/lib/iconsets/fa.js.map +1 -1
- package/lib/iconsets/fa4.js +12 -1
- package/lib/iconsets/fa4.js.map +1 -1
- package/lib/iconsets/md.js +12 -1
- package/lib/iconsets/md.js.map +1 -1
- package/lib/iconsets/mdi-svg.js +12 -1
- package/lib/iconsets/mdi-svg.js.map +1 -1
- package/lib/iconsets/mdi.js +12 -1
- package/lib/iconsets/mdi.js.map +1 -1
- package/lib/labs/VCalendar/VCalendar.d.ts +33 -33
- package/lib/labs/VCalendar/VCalendar.js +10 -10
- package/lib/labs/VCalendar/VCalendar.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarDay.d.ts +33 -33
- package/lib/labs/VCalendar/VCalendarDay.js +1 -1
- package/lib/labs/VCalendar/VCalendarDay.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarInterval.d.ts +36 -36
- package/lib/labs/VCalendar/VCalendarInterval.js +9 -9
- package/lib/labs/VCalendar/VCalendarInterval.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarIntervalEvent.d.ts +12 -12
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js +1 -1
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarMonthDay.d.ts +36 -36
- package/lib/labs/VCalendar/VCalendarMonthDay.js +4 -4
- package/lib/labs/VCalendar/VCalendarMonthDay.js.map +1 -1
- package/lib/labs/VHotkey/VHotkey.css +242 -0
- package/lib/labs/VHotkey/VHotkey.d.ts +387 -0
- package/lib/labs/VHotkey/VHotkey.js +432 -0
- package/lib/labs/VHotkey/VHotkey.js.map +1 -0
- package/lib/labs/VHotkey/VHotkey.scss +253 -0
- package/lib/labs/VHotkey/_variables.scss +43 -0
- package/lib/labs/VHotkey/index.d.ts +1 -0
- package/lib/labs/VHotkey/index.js +2 -0
- package/lib/labs/VHotkey/index.js.map +1 -0
- package/lib/labs/VIconBtn/VIconBtn.js +1 -0
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
- package/lib/labs/VPicker/VPicker.css +4 -0
- package/lib/labs/VPicker/VPicker.sass +4 -0
- package/lib/labs/components.d.ts +1 -0
- package/lib/labs/components.js +1 -0
- package/lib/labs/components.js.map +1 -1
- package/lib/locale/af.d.ts +18 -0
- package/lib/locale/af.js +18 -0
- package/lib/locale/af.js.map +1 -1
- package/lib/locale/ar.d.ts +18 -0
- package/lib/locale/ar.js +18 -0
- package/lib/locale/ar.js.map +1 -1
- package/lib/locale/az.d.ts +18 -0
- package/lib/locale/az.js +18 -0
- package/lib/locale/az.js.map +1 -1
- package/lib/locale/bg.d.ts +18 -0
- package/lib/locale/bg.js +18 -0
- package/lib/locale/bg.js.map +1 -1
- package/lib/locale/ca.d.ts +18 -0
- package/lib/locale/ca.js +18 -0
- package/lib/locale/ca.js.map +1 -1
- package/lib/locale/ckb.d.ts +18 -0
- package/lib/locale/ckb.js +18 -0
- package/lib/locale/ckb.js.map +1 -1
- package/lib/locale/cs.d.ts +18 -0
- package/lib/locale/cs.js +18 -0
- package/lib/locale/cs.js.map +1 -1
- package/lib/locale/da.d.ts +18 -0
- package/lib/locale/da.js +18 -0
- package/lib/locale/da.js.map +1 -1
- package/lib/locale/de.d.ts +18 -0
- package/lib/locale/de.js +18 -0
- package/lib/locale/de.js.map +1 -1
- package/lib/locale/el.d.ts +18 -0
- package/lib/locale/el.js +18 -0
- package/lib/locale/el.js.map +1 -1
- package/lib/locale/en.d.ts +18 -0
- package/lib/locale/en.js +18 -0
- package/lib/locale/en.js.map +1 -1
- package/lib/locale/es.d.ts +18 -0
- package/lib/locale/es.js +18 -0
- package/lib/locale/es.js.map +1 -1
- package/lib/locale/et.d.ts +18 -0
- package/lib/locale/et.js +18 -0
- package/lib/locale/et.js.map +1 -1
- package/lib/locale/fa.d.ts +18 -0
- package/lib/locale/fa.js +18 -0
- package/lib/locale/fa.js.map +1 -1
- package/lib/locale/fi.d.ts +18 -0
- package/lib/locale/fi.js +18 -0
- package/lib/locale/fi.js.map +1 -1
- package/lib/locale/fr.d.ts +18 -0
- package/lib/locale/fr.js +18 -0
- package/lib/locale/fr.js.map +1 -1
- package/lib/locale/he.d.ts +18 -0
- package/lib/locale/he.js +18 -0
- package/lib/locale/he.js.map +1 -1
- package/lib/locale/hr.d.ts +18 -0
- package/lib/locale/hr.js +18 -0
- package/lib/locale/hr.js.map +1 -1
- package/lib/locale/hu.d.ts +18 -0
- package/lib/locale/hu.js +18 -0
- package/lib/locale/hu.js.map +1 -1
- package/lib/locale/id.d.ts +18 -0
- package/lib/locale/id.js +18 -0
- package/lib/locale/id.js.map +1 -1
- package/lib/locale/it.d.ts +18 -0
- package/lib/locale/it.js +18 -0
- package/lib/locale/it.js.map +1 -1
- package/lib/locale/ja.d.ts +18 -0
- package/lib/locale/ja.js +18 -0
- package/lib/locale/ja.js.map +1 -1
- package/lib/locale/km.d.ts +18 -0
- package/lib/locale/km.js +18 -0
- package/lib/locale/km.js.map +1 -1
- package/lib/locale/ko.d.ts +18 -0
- package/lib/locale/ko.js +18 -0
- package/lib/locale/ko.js.map +1 -1
- package/lib/locale/lt.d.ts +18 -0
- package/lib/locale/lt.js +18 -0
- package/lib/locale/lt.js.map +1 -1
- package/lib/locale/lv.d.ts +18 -0
- package/lib/locale/lv.js +18 -0
- package/lib/locale/lv.js.map +1 -1
- package/lib/locale/nl.d.ts +18 -0
- package/lib/locale/nl.js +18 -0
- package/lib/locale/nl.js.map +1 -1
- package/lib/locale/no.d.ts +18 -0
- package/lib/locale/no.js +18 -0
- package/lib/locale/no.js.map +1 -1
- package/lib/locale/pl.d.ts +18 -0
- package/lib/locale/pl.js +18 -0
- package/lib/locale/pl.js.map +1 -1
- package/lib/locale/pt.d.ts +18 -0
- package/lib/locale/pt.js +18 -0
- package/lib/locale/pt.js.map +1 -1
- package/lib/locale/ro.d.ts +18 -0
- package/lib/locale/ro.js +18 -0
- package/lib/locale/ro.js.map +1 -1
- package/lib/locale/ru.d.ts +18 -0
- package/lib/locale/ru.js +18 -0
- package/lib/locale/ru.js.map +1 -1
- package/lib/locale/sk.d.ts +18 -0
- package/lib/locale/sk.js +18 -0
- package/lib/locale/sk.js.map +1 -1
- package/lib/locale/sl.d.ts +18 -0
- package/lib/locale/sl.js +18 -0
- package/lib/locale/sl.js.map +1 -1
- package/lib/locale/sr-Cyrl.d.ts +18 -0
- package/lib/locale/sr-Cyrl.js +18 -0
- package/lib/locale/sr-Cyrl.js.map +1 -1
- package/lib/locale/sr-Latn.d.ts +18 -0
- package/lib/locale/sr-Latn.js +18 -0
- package/lib/locale/sr-Latn.js.map +1 -1
- package/lib/locale/sv.d.ts +18 -0
- package/lib/locale/sv.js +18 -0
- package/lib/locale/sv.js.map +1 -1
- package/lib/locale/th.d.ts +18 -0
- package/lib/locale/th.js +18 -0
- package/lib/locale/th.js.map +1 -1
- package/lib/locale/tr.d.ts +18 -0
- package/lib/locale/tr.js +18 -0
- package/lib/locale/tr.js.map +1 -1
- package/lib/locale/uk.d.ts +18 -0
- package/lib/locale/uk.js +18 -0
- package/lib/locale/uk.js.map +1 -1
- package/lib/locale/vi.d.ts +18 -0
- package/lib/locale/vi.js +18 -0
- package/lib/locale/vi.js.map +1 -1
- package/lib/locale/zh-Hans.d.ts +18 -0
- package/lib/locale/zh-Hans.js +18 -0
- package/lib/locale/zh-Hans.js.map +1 -1
- package/lib/locale/zh-Hant.d.ts +18 -0
- package/lib/locale/zh-Hant.js +18 -0
- package/lib/locale/zh-Hant.js.map +1 -1
- package/lib/util/helpers.d.ts +3 -0
- package/lib/util/helpers.js +4 -0
- package/lib/util/helpers.js.map +1 -1
- package/lib/util/indentLines.d.ts +17 -0
- package/lib/util/indentLines.js +34 -0
- package/lib/util/indentLines.js.map +1 -0
- package/lib/util/index.d.ts +1 -0
- package/lib/util/index.js +1 -0
- package/lib/util/index.js.map +1 -1
- package/package.json +2 -2
- package/lib/components/VKbd/VKbd.sass +0 -15
- package/lib/composables/hotkey.d.ts +0 -9
- package/lib/composables/hotkey.js.map +0 -1
package/dist/vuetify.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.9.0
|
|
2
|
+
* Vuetify v3.9.0
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -473,6 +473,10 @@
|
|
|
473
473
|
return child.type !== vue.Fragment || ensureValidVNode(child.children);
|
|
474
474
|
}) ? vnodes : null;
|
|
475
475
|
}
|
|
476
|
+
function renderSlot(slot, props, fallback) {
|
|
477
|
+
// TODO: check if slot returns elements: #18308
|
|
478
|
+
return slot?.(props) ?? fallback?.(props);
|
|
479
|
+
}
|
|
476
480
|
function defer(timeout, cb) {
|
|
477
481
|
if (!IN_BROWSER || timeout === 0) {
|
|
478
482
|
cb();
|
|
@@ -1618,6 +1622,40 @@
|
|
|
1618
1622
|
return ['scroll', 'auto'].includes(style.overflowY);
|
|
1619
1623
|
}
|
|
1620
1624
|
|
|
1625
|
+
// Types
|
|
1626
|
+
|
|
1627
|
+
function getIndentLines(_ref) {
|
|
1628
|
+
let {
|
|
1629
|
+
depth,
|
|
1630
|
+
isLast,
|
|
1631
|
+
isLastGroup,
|
|
1632
|
+
leafLinks,
|
|
1633
|
+
separateRoots,
|
|
1634
|
+
parentIndentLines,
|
|
1635
|
+
variant
|
|
1636
|
+
} = _ref;
|
|
1637
|
+
if (!parentIndentLines || !depth) {
|
|
1638
|
+
return {
|
|
1639
|
+
leaf: undefined,
|
|
1640
|
+
node: undefined,
|
|
1641
|
+
children: parentIndentLines
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
if (variant === 'simple') {
|
|
1645
|
+
return {
|
|
1646
|
+
leaf: [...parentIndentLines, 'line'],
|
|
1647
|
+
node: [...parentIndentLines, 'line'],
|
|
1648
|
+
children: [...parentIndentLines, 'line']
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
const isLastLeaf = isLast && (!isLastGroup || separateRoots || depth > 1);
|
|
1652
|
+
return {
|
|
1653
|
+
leaf: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf', ...(leafLinks ? ['leaf-link'] : [])],
|
|
1654
|
+
node: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf'],
|
|
1655
|
+
children: [...parentIndentLines, isLastLeaf ? 'none' : 'line']
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1621
1659
|
function isFixedPosition(el) {
|
|
1622
1660
|
while (el) {
|
|
1623
1661
|
if (window.getComputedStyle(el).position === 'fixed') {
|
|
@@ -1836,7 +1874,18 @@
|
|
|
1836
1874
|
treeviewExpand: 'mdi-menu-right',
|
|
1837
1875
|
eyeDropper: 'mdi-eyedropper',
|
|
1838
1876
|
upload: 'mdi-cloud-upload',
|
|
1839
|
-
color: 'mdi-palette'
|
|
1877
|
+
color: 'mdi-palette',
|
|
1878
|
+
command: 'mdi-apple-keyboard-command',
|
|
1879
|
+
ctrl: 'mdi-apple-keyboard-control',
|
|
1880
|
+
space: 'mdi-keyboard-space',
|
|
1881
|
+
shift: 'mdi-apple-keyboard-shift',
|
|
1882
|
+
alt: 'mdi-apple-keyboard-option',
|
|
1883
|
+
enter: 'mdi-keyboard-return',
|
|
1884
|
+
arrowup: 'mdi-arrow-up',
|
|
1885
|
+
arrowdown: 'mdi-arrow-down',
|
|
1886
|
+
arrowleft: 'mdi-arrow-left',
|
|
1887
|
+
arrowright: 'mdi-arrow-right',
|
|
1888
|
+
backspace: 'mdi-backspace'
|
|
1840
1889
|
};
|
|
1841
1890
|
const mdi = {
|
|
1842
1891
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -2632,6 +2681,24 @@
|
|
|
2632
2681
|
exclude: 'The {0} character is not allowed',
|
|
2633
2682
|
notEmpty: 'Please choose at least one value',
|
|
2634
2683
|
pattern: 'Invalid format'
|
|
2684
|
+
},
|
|
2685
|
+
hotkey: {
|
|
2686
|
+
then: 'then',
|
|
2687
|
+
ctrl: 'Ctrl',
|
|
2688
|
+
command: 'Command',
|
|
2689
|
+
space: 'Space',
|
|
2690
|
+
shift: 'Shift',
|
|
2691
|
+
alt: 'Alt',
|
|
2692
|
+
enter: 'Enter',
|
|
2693
|
+
escape: 'Escape',
|
|
2694
|
+
upArrow: 'Up Arrow',
|
|
2695
|
+
downArrow: 'Down Arrow',
|
|
2696
|
+
leftArrow: 'Left Arrow',
|
|
2697
|
+
rightArrow: 'Right Arrow',
|
|
2698
|
+
backspace: 'Backspace',
|
|
2699
|
+
option: 'Option',
|
|
2700
|
+
plus: 'plus',
|
|
2701
|
+
shortcut: 'Keyboard shortcut: {0}'
|
|
2635
2702
|
}
|
|
2636
2703
|
};
|
|
2637
2704
|
|
|
@@ -9075,7 +9142,7 @@
|
|
|
9075
9142
|
selected.set(id, value ? 'on' : 'off');
|
|
9076
9143
|
return selected;
|
|
9077
9144
|
},
|
|
9078
|
-
in: (v, children, parents) => {
|
|
9145
|
+
in: (v, children, parents, disabled) => {
|
|
9079
9146
|
const map = new Map();
|
|
9080
9147
|
for (const id of v || []) {
|
|
9081
9148
|
strategy.select({
|
|
@@ -9083,7 +9150,8 @@
|
|
|
9083
9150
|
value: true,
|
|
9084
9151
|
selected: map,
|
|
9085
9152
|
children,
|
|
9086
|
-
parents
|
|
9153
|
+
parents,
|
|
9154
|
+
disabled
|
|
9087
9155
|
});
|
|
9088
9156
|
}
|
|
9089
9157
|
return map;
|
|
@@ -9115,9 +9183,9 @@
|
|
|
9115
9183
|
selected: singleSelected
|
|
9116
9184
|
});
|
|
9117
9185
|
},
|
|
9118
|
-
in: (v, children, parents) => {
|
|
9186
|
+
in: (v, children, parents, disabled) => {
|
|
9119
9187
|
if (v?.length) {
|
|
9120
|
-
return parentStrategy.in(v.slice(0, 1), children, parents);
|
|
9188
|
+
return parentStrategy.in(v.slice(0, 1), children, parents, disabled);
|
|
9121
9189
|
}
|
|
9122
9190
|
return new Map();
|
|
9123
9191
|
},
|
|
@@ -9183,23 +9251,32 @@
|
|
|
9183
9251
|
value,
|
|
9184
9252
|
selected,
|
|
9185
9253
|
children,
|
|
9186
|
-
parents
|
|
9254
|
+
parents,
|
|
9255
|
+
disabled
|
|
9187
9256
|
} = _ref6;
|
|
9188
9257
|
id = vue.toRaw(id);
|
|
9189
9258
|
const original = new Map(selected);
|
|
9190
9259
|
const items = [id];
|
|
9191
9260
|
while (items.length) {
|
|
9192
9261
|
const item = items.shift();
|
|
9193
|
-
|
|
9262
|
+
if (!disabled.has(item)) {
|
|
9263
|
+
selected.set(vue.toRaw(item), value ? 'on' : 'off');
|
|
9264
|
+
}
|
|
9194
9265
|
if (children.has(item)) {
|
|
9195
9266
|
items.push(...children.get(item));
|
|
9196
9267
|
}
|
|
9197
9268
|
}
|
|
9198
9269
|
let parent = vue.toRaw(parents.get(id));
|
|
9199
9270
|
while (parent) {
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9271
|
+
let everySelected = true;
|
|
9272
|
+
let noneSelected = true;
|
|
9273
|
+
for (const child of children.get(parent)) {
|
|
9274
|
+
const cid = vue.toRaw(child);
|
|
9275
|
+
if (disabled.has(cid)) continue;
|
|
9276
|
+
if (selected.get(cid) !== 'on') everySelected = false;
|
|
9277
|
+
if (selected.has(cid) && selected.get(cid) !== 'off') noneSelected = false;
|
|
9278
|
+
if (!everySelected && !noneSelected) break;
|
|
9279
|
+
}
|
|
9203
9280
|
selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate');
|
|
9204
9281
|
parent = vue.toRaw(parents.get(parent));
|
|
9205
9282
|
}
|
|
@@ -9216,7 +9293,7 @@
|
|
|
9216
9293
|
}
|
|
9217
9294
|
return selected;
|
|
9218
9295
|
},
|
|
9219
|
-
in: (v, children, parents) => {
|
|
9296
|
+
in: (v, children, parents, disabled) => {
|
|
9220
9297
|
let map = new Map();
|
|
9221
9298
|
for (const id of v || []) {
|
|
9222
9299
|
map = strategy.select({
|
|
@@ -9224,7 +9301,8 @@
|
|
|
9224
9301
|
value: true,
|
|
9225
9302
|
selected: map,
|
|
9226
9303
|
children,
|
|
9227
|
-
parents
|
|
9304
|
+
parents,
|
|
9305
|
+
disabled
|
|
9228
9306
|
});
|
|
9229
9307
|
}
|
|
9230
9308
|
return map;
|
|
@@ -9271,8 +9349,9 @@
|
|
|
9271
9349
|
root: {
|
|
9272
9350
|
register: () => null,
|
|
9273
9351
|
unregister: () => null,
|
|
9274
|
-
parents: vue.ref(new Map()),
|
|
9275
9352
|
children: vue.ref(new Map()),
|
|
9353
|
+
parents: vue.ref(new Map()),
|
|
9354
|
+
disabled: vue.ref(new Set()),
|
|
9276
9355
|
open: () => null,
|
|
9277
9356
|
openOnSelect: () => null,
|
|
9278
9357
|
activate: () => null,
|
|
@@ -9299,9 +9378,10 @@
|
|
|
9299
9378
|
}, 'nested');
|
|
9300
9379
|
const useNested = props => {
|
|
9301
9380
|
let isUnmounted = false;
|
|
9302
|
-
const children = vue.
|
|
9303
|
-
const parents = vue.
|
|
9304
|
-
const
|
|
9381
|
+
const children = vue.shallowRef(new Map());
|
|
9382
|
+
const parents = vue.shallowRef(new Map());
|
|
9383
|
+
const disabled = vue.shallowRef(new Set());
|
|
9384
|
+
const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(Array.isArray(v) ? v.map(i => vue.toRaw(i)) : v), v => [...v.values()]);
|
|
9305
9385
|
const activeStrategy = vue.computed(() => {
|
|
9306
9386
|
if (typeof props.activeStrategy === 'object') return props.activeStrategy;
|
|
9307
9387
|
if (typeof props.activeStrategy === 'function') return props.activeStrategy(props.mandatory);
|
|
@@ -9349,13 +9429,13 @@
|
|
|
9349
9429
|
}
|
|
9350
9430
|
});
|
|
9351
9431
|
const activated = useProxiedModel(props, 'activated', props.activated, v => activeStrategy.value.in(v, children.value, parents.value), v => activeStrategy.value.out(v, children.value, parents.value));
|
|
9352
|
-
const selected = useProxiedModel(props, 'selected', props.selected, v => selectStrategy.value.in(v, children.value, parents.value), v => selectStrategy.value.out(v, children.value, parents.value));
|
|
9432
|
+
const selected = useProxiedModel(props, 'selected', props.selected, v => selectStrategy.value.in(v, children.value, parents.value, disabled.value), v => selectStrategy.value.out(v, children.value, parents.value));
|
|
9353
9433
|
vue.onBeforeUnmount(() => {
|
|
9354
9434
|
isUnmounted = true;
|
|
9355
9435
|
});
|
|
9356
9436
|
function getPath(id) {
|
|
9357
9437
|
const path = [];
|
|
9358
|
-
let parent = id;
|
|
9438
|
+
let parent = vue.toRaw(id);
|
|
9359
9439
|
while (parent != null) {
|
|
9360
9440
|
path.unshift(parent);
|
|
9361
9441
|
parent = parents.value.get(parent);
|
|
@@ -9379,7 +9459,7 @@
|
|
|
9379
9459
|
}
|
|
9380
9460
|
return arr;
|
|
9381
9461
|
}),
|
|
9382
|
-
register: (id, parentId, isGroup) => {
|
|
9462
|
+
register: (id, parentId, isDisabled, isGroup) => {
|
|
9383
9463
|
if (nodeIds.has(id)) {
|
|
9384
9464
|
const path = getPath(id).map(String).join(' -> ');
|
|
9385
9465
|
const newPath = getPath(parentId).concat(id).map(String).join(' -> ');
|
|
@@ -9389,6 +9469,7 @@
|
|
|
9389
9469
|
nodeIds.add(id);
|
|
9390
9470
|
}
|
|
9391
9471
|
parentId && id !== parentId && parents.value.set(id, parentId);
|
|
9472
|
+
isDisabled && disabled.value.add(id);
|
|
9392
9473
|
isGroup && children.value.set(id, []);
|
|
9393
9474
|
if (parentId != null) {
|
|
9394
9475
|
children.value.set(parentId, [...(children.value.get(parentId) || []), id]);
|
|
@@ -9398,6 +9479,7 @@
|
|
|
9398
9479
|
if (isUnmounted) return;
|
|
9399
9480
|
nodeIds.delete(id);
|
|
9400
9481
|
children.value.delete(id);
|
|
9482
|
+
disabled.value.delete(id);
|
|
9401
9483
|
const parent = parents.value.get(id);
|
|
9402
9484
|
if (parent) {
|
|
9403
9485
|
const list = children.value.get(parent) ?? [];
|
|
@@ -9447,6 +9529,7 @@
|
|
|
9447
9529
|
selected: new Map(selected.value),
|
|
9448
9530
|
children: children.value,
|
|
9449
9531
|
parents: parents.value,
|
|
9532
|
+
disabled: disabled.value,
|
|
9450
9533
|
event
|
|
9451
9534
|
});
|
|
9452
9535
|
newSelected && (selected.value = newSelected);
|
|
@@ -9489,16 +9572,17 @@
|
|
|
9489
9572
|
},
|
|
9490
9573
|
children,
|
|
9491
9574
|
parents,
|
|
9575
|
+
disabled,
|
|
9492
9576
|
getPath
|
|
9493
9577
|
}
|
|
9494
9578
|
};
|
|
9495
9579
|
vue.provide(VNestedSymbol, nested);
|
|
9496
9580
|
return nested.root;
|
|
9497
9581
|
};
|
|
9498
|
-
const useNestedItem = (id, isGroup) => {
|
|
9582
|
+
const useNestedItem = (id, isDisabled, isGroup) => {
|
|
9499
9583
|
const parent = vue.inject(VNestedSymbol, emptyNested);
|
|
9500
9584
|
const uidSymbol = Symbol('nested item');
|
|
9501
|
-
const computedId = vue.computed(() => vue.toValue(id) ?? uidSymbol);
|
|
9585
|
+
const computedId = vue.computed(() => vue.toRaw(vue.toValue(id)) ?? uidSymbol);
|
|
9502
9586
|
const item = {
|
|
9503
9587
|
...parent,
|
|
9504
9588
|
id: computedId,
|
|
@@ -9507,18 +9591,22 @@
|
|
|
9507
9591
|
isOpen: vue.computed(() => parent.root.opened.value.has(computedId.value)),
|
|
9508
9592
|
parent: vue.computed(() => parent.root.parents.value.get(computedId.value)),
|
|
9509
9593
|
activate: (activated, e) => parent.root.activate(computedId.value, activated, e),
|
|
9510
|
-
isActivated: vue.computed(() => parent.root.activated.value.has(
|
|
9594
|
+
isActivated: vue.computed(() => parent.root.activated.value.has(computedId.value)),
|
|
9511
9595
|
select: (selected, e) => parent.root.select(computedId.value, selected, e),
|
|
9512
|
-
isSelected: vue.computed(() => parent.root.selected.value.get(
|
|
9513
|
-
isIndeterminate: vue.computed(() => parent.root.selected.value.get(
|
|
9596
|
+
isSelected: vue.computed(() => parent.root.selected.value.get(computedId.value) === 'on'),
|
|
9597
|
+
isIndeterminate: vue.computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),
|
|
9514
9598
|
isLeaf: vue.computed(() => !parent.root.children.value.get(computedId.value)),
|
|
9515
9599
|
isGroupActivator: parent.isGroupActivator
|
|
9516
9600
|
};
|
|
9517
9601
|
vue.onBeforeMount(() => {
|
|
9518
|
-
!parent.isGroupActivator
|
|
9602
|
+
if (!parent.isGroupActivator) {
|
|
9603
|
+
parent.root.register(computedId.value, parent.id.value, vue.toValue(isDisabled), isGroup);
|
|
9604
|
+
}
|
|
9519
9605
|
});
|
|
9520
9606
|
vue.onBeforeUnmount(() => {
|
|
9521
|
-
!parent.isGroupActivator
|
|
9607
|
+
if (!parent.isGroupActivator) {
|
|
9608
|
+
parent.root.unregister(computedId.value);
|
|
9609
|
+
}
|
|
9522
9610
|
});
|
|
9523
9611
|
isGroup && vue.provide(VNestedSymbol, item);
|
|
9524
9612
|
return item;
|
|
@@ -9550,6 +9638,7 @@
|
|
|
9550
9638
|
type: IconValue,
|
|
9551
9639
|
default: '$collapse'
|
|
9552
9640
|
},
|
|
9641
|
+
disabled: Boolean,
|
|
9553
9642
|
expandIcon: {
|
|
9554
9643
|
type: IconValue,
|
|
9555
9644
|
default: '$expand'
|
|
@@ -9575,7 +9664,7 @@
|
|
|
9575
9664
|
isOpen,
|
|
9576
9665
|
open,
|
|
9577
9666
|
id: _id
|
|
9578
|
-
} = useNestedItem(() => props.value, true);
|
|
9667
|
+
} = useNestedItem(() => props.value, () => props.disabled, true);
|
|
9579
9668
|
const id = vue.computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
|
|
9580
9669
|
const list = useList();
|
|
9581
9670
|
const {
|
|
@@ -9745,7 +9834,7 @@
|
|
|
9745
9834
|
parent,
|
|
9746
9835
|
openOnSelect,
|
|
9747
9836
|
id: uid
|
|
9748
|
-
} = useNestedItem(id, false);
|
|
9837
|
+
} = useNestedItem(id, () => props.disabled, false);
|
|
9749
9838
|
const list = useList();
|
|
9750
9839
|
const isActive = vue.computed(() => props.active !== false && (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value)));
|
|
9751
9840
|
const isLink = vue.toRef(() => props.link !== false && link.isLink.value);
|
|
@@ -10097,6 +10186,10 @@
|
|
|
10097
10186
|
type: [Boolean, String, Array, Function],
|
|
10098
10187
|
default: 'props'
|
|
10099
10188
|
},
|
|
10189
|
+
itemType: {
|
|
10190
|
+
type: [Boolean, String, Array, Function],
|
|
10191
|
+
default: 'type'
|
|
10192
|
+
},
|
|
10100
10193
|
returnObject: Boolean,
|
|
10101
10194
|
valueComparator: Function
|
|
10102
10195
|
}, 'list-items');
|
|
@@ -10104,6 +10197,7 @@
|
|
|
10104
10197
|
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
10105
10198
|
const value = getPropertyFromItem(item, props.itemValue, title);
|
|
10106
10199
|
const children = getPropertyFromItem(item, props.itemChildren);
|
|
10200
|
+
const type = getPropertyFromItem(item, props.itemType, 'item');
|
|
10107
10201
|
const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ? omit(item, ['children']) : item : undefined : getPropertyFromItem(item, props.itemProps);
|
|
10108
10202
|
const _props = {
|
|
10109
10203
|
title,
|
|
@@ -10111,15 +10205,16 @@
|
|
|
10111
10205
|
...itemProps
|
|
10112
10206
|
};
|
|
10113
10207
|
return {
|
|
10208
|
+
type,
|
|
10114
10209
|
title: String(_props.title ?? ''),
|
|
10115
10210
|
value: _props.value,
|
|
10116
10211
|
props: _props,
|
|
10117
|
-
children: Array.isArray(children) ? transformItems$3(props, children) : undefined,
|
|
10212
|
+
children: type === 'item' && Array.isArray(children) ? transformItems$3(props, children) : undefined,
|
|
10118
10213
|
raw: item
|
|
10119
10214
|
};
|
|
10120
10215
|
}
|
|
10121
10216
|
function transformItems$3(props, items) {
|
|
10122
|
-
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
|
|
10217
|
+
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'itemType', 'returnObject', 'valueComparator']);
|
|
10123
10218
|
const array = [];
|
|
10124
10219
|
for (const item of items) {
|
|
10125
10220
|
array.push(transformItem$3(_props, item));
|
|
@@ -10161,7 +10256,7 @@
|
|
|
10161
10256
|
const _returnObject = props.returnObject;
|
|
10162
10257
|
const hasValueComparator = !!props.valueComparator;
|
|
10163
10258
|
const valueComparator = props.valueComparator || deepEqual;
|
|
10164
|
-
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
|
|
10259
|
+
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'itemType', 'returnObject', 'valueComparator']);
|
|
10165
10260
|
const returnValue = [];
|
|
10166
10261
|
main: for (const v of value) {
|
|
10167
10262
|
// When the model value is null, return an InternalItem
|
|
@@ -10223,7 +10318,7 @@
|
|
|
10223
10318
|
function transformItem$2(props, item) {
|
|
10224
10319
|
const type = getPropertyFromItem(item, props.itemType, 'item');
|
|
10225
10320
|
const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
|
|
10226
|
-
const value = getPropertyFromItem(item, props.itemValue, undefined);
|
|
10321
|
+
const value = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemValue, undefined);
|
|
10227
10322
|
const children = getPropertyFromItem(item, props.itemChildren);
|
|
10228
10323
|
const itemProps = props.itemProps === true ? omit(item, ['children']) : getPropertyFromItem(item, props.itemProps);
|
|
10229
10324
|
const _props = {
|
|
@@ -10281,10 +10376,6 @@
|
|
|
10281
10376
|
...makeDensityProps(),
|
|
10282
10377
|
...makeDimensionProps(),
|
|
10283
10378
|
...makeElevationProps(),
|
|
10284
|
-
itemType: {
|
|
10285
|
-
type: String,
|
|
10286
|
-
default: 'type'
|
|
10287
|
-
},
|
|
10288
10379
|
...makeItemsProps(),
|
|
10289
10380
|
...makeRoundedProps(),
|
|
10290
10381
|
...makeTagProps(),
|
|
@@ -10705,7 +10796,7 @@
|
|
|
10705
10796
|
});
|
|
10706
10797
|
if (flipped.isFull) {
|
|
10707
10798
|
const values = flipped.values();
|
|
10708
|
-
if (deepEqual(values.at(-1), values.at(-3))) {
|
|
10799
|
+
if (deepEqual(values.at(-1), values.at(-3)) && !deepEqual(values.at(-1), values.at(-2))) {
|
|
10709
10800
|
// Flipping is causing a container resize loop
|
|
10710
10801
|
return;
|
|
10711
10802
|
}
|
|
@@ -12375,11 +12466,7 @@
|
|
|
12375
12466
|
default: slots.loader
|
|
12376
12467
|
}), hasPrepend && vue.createElementVNode("div", {
|
|
12377
12468
|
"key": "prepend",
|
|
12378
|
-
"class": "v-field__prepend-inner"
|
|
12379
|
-
"onMousedown": e => {
|
|
12380
|
-
e.preventDefault();
|
|
12381
|
-
e.stopPropagation();
|
|
12382
|
-
}
|
|
12469
|
+
"class": "v-field__prepend-inner"
|
|
12383
12470
|
}, [props.prependInnerIcon && vue.createVNode(InputIcon, {
|
|
12384
12471
|
"key": "prepend-icon",
|
|
12385
12472
|
"name": "prependInner",
|
|
@@ -12448,11 +12535,7 @@
|
|
|
12448
12535
|
})]), [[vue.vShow, props.dirty]])]
|
|
12449
12536
|
}), hasAppend && vue.createElementVNode("div", {
|
|
12450
12537
|
"key": "append",
|
|
12451
|
-
"class": "v-field__append-inner"
|
|
12452
|
-
"onMousedown": e => {
|
|
12453
|
-
e.preventDefault();
|
|
12454
|
-
e.stopPropagation();
|
|
12455
|
-
}
|
|
12538
|
+
"class": "v-field__append-inner"
|
|
12456
12539
|
}, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && vue.createVNode(InputIcon, {
|
|
12457
12540
|
"key": "append-icon",
|
|
12458
12541
|
"name": "appendInner",
|
|
@@ -12563,7 +12646,7 @@
|
|
|
12563
12646
|
if (!isFocused.value) focus();
|
|
12564
12647
|
vue.nextTick(() => {
|
|
12565
12648
|
if (inputRef.value !== document.activeElement) {
|
|
12566
|
-
inputRef.value?.focus();
|
|
12649
|
+
vue.nextTick(() => inputRef.value?.focus());
|
|
12567
12650
|
}
|
|
12568
12651
|
});
|
|
12569
12652
|
}
|
|
@@ -12902,7 +12985,7 @@
|
|
|
12902
12985
|
raf = requestAnimationFrame(_calculateVisibleItems);
|
|
12903
12986
|
}
|
|
12904
12987
|
function _calculateVisibleItems() {
|
|
12905
|
-
if (!containerRef.value || !viewportHeight.value) return;
|
|
12988
|
+
if (!containerRef.value || !viewportHeight.value || !itemHeight.value) return;
|
|
12906
12989
|
const scrollTop = lastScrollTop - markerOffset;
|
|
12907
12990
|
const direction = Math.sign(scrollVelocity);
|
|
12908
12991
|
const startPx = Math.max(0, scrollTop - BUFFER_PX);
|
|
@@ -13511,7 +13594,7 @@
|
|
|
13511
13594
|
key: item.value,
|
|
13512
13595
|
onClick: () => select(item, null)
|
|
13513
13596
|
});
|
|
13514
|
-
if (item.
|
|
13597
|
+
if (item.type === 'divider') {
|
|
13515
13598
|
return slots.divider?.({
|
|
13516
13599
|
props: item.raw,
|
|
13517
13600
|
index
|
|
@@ -13519,7 +13602,7 @@
|
|
|
13519
13602
|
"key": `divider-${index}`
|
|
13520
13603
|
}), null);
|
|
13521
13604
|
}
|
|
13522
|
-
if (item.
|
|
13605
|
+
if (item.type === 'subheader') {
|
|
13523
13606
|
return slots.subheader?.({
|
|
13524
13607
|
props: item.raw,
|
|
13525
13608
|
index
|
|
@@ -13687,7 +13770,7 @@
|
|
|
13687
13770
|
let match = -1;
|
|
13688
13771
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
|
13689
13772
|
if (typeof item === 'object') {
|
|
13690
|
-
if (
|
|
13773
|
+
if (item.type === 'divider' || item.type === 'subheader') {
|
|
13691
13774
|
continue;
|
|
13692
13775
|
}
|
|
13693
13776
|
const filterKeys = keys || Object.keys(transformed);
|
|
@@ -14129,7 +14212,7 @@
|
|
|
14129
14212
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
14130
14213
|
onClick: () => select(item, null)
|
|
14131
14214
|
});
|
|
14132
|
-
if (item.
|
|
14215
|
+
if (item.type === 'divider') {
|
|
14133
14216
|
return slots.divider?.({
|
|
14134
14217
|
props: item.raw,
|
|
14135
14218
|
index
|
|
@@ -14137,7 +14220,7 @@
|
|
|
14137
14220
|
"key": `divider-${index}`
|
|
14138
14221
|
}), null);
|
|
14139
14222
|
}
|
|
14140
|
-
if (item.
|
|
14223
|
+
if (item.type === 'subheader') {
|
|
14141
14224
|
return slots.subheader?.({
|
|
14142
14225
|
props: item.raw,
|
|
14143
14226
|
index
|
|
@@ -15698,6 +15781,7 @@
|
|
|
15698
15781
|
}) : vue.createVNode(VBtn, vue.mergeProps(item, props), null);
|
|
15699
15782
|
})]
|
|
15700
15783
|
})]), props.progress && vue.createVNode(VProgressLinear, {
|
|
15784
|
+
"absolute": true,
|
|
15701
15785
|
"class": "v-carousel__progress",
|
|
15702
15786
|
"color": typeof props.progress === 'string' ? props.progress : undefined,
|
|
15703
15787
|
"modelValue": (group.getItemIndex(model.value) + 1) / group.items.value.length * 100
|
|
@@ -17784,7 +17868,7 @@
|
|
|
17784
17868
|
case 'fullDate':
|
|
17785
17869
|
options = {
|
|
17786
17870
|
year: 'numeric',
|
|
17787
|
-
month: '
|
|
17871
|
+
month: 'short',
|
|
17788
17872
|
day: 'numeric'
|
|
17789
17873
|
};
|
|
17790
17874
|
break;
|
|
@@ -18362,6 +18446,317 @@
|
|
|
18362
18446
|
return createInstance(options, locale);
|
|
18363
18447
|
}
|
|
18364
18448
|
|
|
18449
|
+
/**
|
|
18450
|
+
* Centralized key alias mapping for consistent key normalization across the hotkey system.
|
|
18451
|
+
*
|
|
18452
|
+
* This maps various user-friendly aliases to canonical key names that match
|
|
18453
|
+
* KeyboardEvent.key values (in lowercase) where possible.
|
|
18454
|
+
*/
|
|
18455
|
+
const keyAliasMap = {
|
|
18456
|
+
// Modifier aliases (from vue-use, other libraries, and current implementation)
|
|
18457
|
+
control: 'ctrl',
|
|
18458
|
+
command: 'cmd',
|
|
18459
|
+
option: 'alt',
|
|
18460
|
+
// Arrow key aliases (common abbreviations)
|
|
18461
|
+
up: 'arrowup',
|
|
18462
|
+
down: 'arrowdown',
|
|
18463
|
+
left: 'arrowleft',
|
|
18464
|
+
right: 'arrowright',
|
|
18465
|
+
// Other common key aliases
|
|
18466
|
+
esc: 'escape',
|
|
18467
|
+
spacebar: ' ',
|
|
18468
|
+
space: ' ',
|
|
18469
|
+
return: 'enter',
|
|
18470
|
+
del: 'delete',
|
|
18471
|
+
// Symbol aliases (existing from hotkey-parsing.ts)
|
|
18472
|
+
minus: '-',
|
|
18473
|
+
hyphen: '-'
|
|
18474
|
+
};
|
|
18475
|
+
|
|
18476
|
+
/**
|
|
18477
|
+
* Normalizes a key string to its canonical form using the alias map.
|
|
18478
|
+
*
|
|
18479
|
+
* @param key - The key string to normalize
|
|
18480
|
+
* @returns The canonical key name in lowercase
|
|
18481
|
+
*/
|
|
18482
|
+
function normalizeKey(key) {
|
|
18483
|
+
const lowerKey = key.toLowerCase();
|
|
18484
|
+
return keyAliasMap[lowerKey] || lowerKey;
|
|
18485
|
+
}
|
|
18486
|
+
|
|
18487
|
+
// Utilities
|
|
18488
|
+
|
|
18489
|
+
/**
|
|
18490
|
+
* Splits a single combination string into individual key parts.
|
|
18491
|
+
*
|
|
18492
|
+
* A combination is a set of keys that must be pressed simultaneously.
|
|
18493
|
+
* e.g. `ctrl+k`, `shift--`
|
|
18494
|
+
*/
|
|
18495
|
+
function splitKeyCombination(combination) {
|
|
18496
|
+
let isInternal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
18497
|
+
if (!combination) {
|
|
18498
|
+
if (!isInternal) consoleWarn('Invalid hotkey combination: empty string provided');
|
|
18499
|
+
return [];
|
|
18500
|
+
}
|
|
18501
|
+
|
|
18502
|
+
// --- VALIDATION ---
|
|
18503
|
+
const startsWithPlusOrUnderscore = combination.startsWith('+') || combination.startsWith('_');
|
|
18504
|
+
const hasInvalidLeadingSeparator =
|
|
18505
|
+
// Starts with a single '+' or '_' followed by a non-separator character (e.g. '+a', '_a')
|
|
18506
|
+
startsWithPlusOrUnderscore && !(combination.startsWith('++') || combination.startsWith('__'));
|
|
18507
|
+
const hasInvalidStructure =
|
|
18508
|
+
// Invalid leading separator patterns
|
|
18509
|
+
combination.length > 1 && hasInvalidLeadingSeparator ||
|
|
18510
|
+
// Disallow literal + or _ keys (they require shift)
|
|
18511
|
+
combination.includes('++') || combination.includes('__') || combination === '+' || combination === '_' ||
|
|
18512
|
+
// Ends with a separator that is not part of a doubled literal
|
|
18513
|
+
combination.length > 1 && (combination.endsWith('+') || combination.endsWith('_')) && combination.at(-2) !== combination.at(-1) ||
|
|
18514
|
+
// Stand-alone doubled separators (dangling)
|
|
18515
|
+
combination === '++' || combination === '--' || combination === '__';
|
|
18516
|
+
if (hasInvalidStructure) {
|
|
18517
|
+
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
18518
|
+
return [];
|
|
18519
|
+
}
|
|
18520
|
+
const keys = [];
|
|
18521
|
+
let buffer = '';
|
|
18522
|
+
const flushBuffer = () => {
|
|
18523
|
+
if (buffer) {
|
|
18524
|
+
keys.push(normalizeKey(buffer));
|
|
18525
|
+
buffer = '';
|
|
18526
|
+
}
|
|
18527
|
+
};
|
|
18528
|
+
for (let i = 0; i < combination.length; i++) {
|
|
18529
|
+
const char = combination[i];
|
|
18530
|
+
const nextChar = combination[i + 1];
|
|
18531
|
+
if (char === '+' || char === '_' || char === '-') {
|
|
18532
|
+
if (char === nextChar) {
|
|
18533
|
+
flushBuffer();
|
|
18534
|
+
keys.push(char);
|
|
18535
|
+
i++;
|
|
18536
|
+
} else if (char === '+' || char === '_') {
|
|
18537
|
+
flushBuffer();
|
|
18538
|
+
} else {
|
|
18539
|
+
buffer += char;
|
|
18540
|
+
}
|
|
18541
|
+
} else {
|
|
18542
|
+
buffer += char;
|
|
18543
|
+
}
|
|
18544
|
+
}
|
|
18545
|
+
flushBuffer();
|
|
18546
|
+
|
|
18547
|
+
// Within a combination, `-` is only valid as a literal key (e.g., `ctrl+-`).
|
|
18548
|
+
// `-` cannot be part of a longer key name within a combination.
|
|
18549
|
+
const hasInvalidMinus = keys.some(key => key.length > 1 && key.includes('-') && key !== '--');
|
|
18550
|
+
if (hasInvalidMinus) {
|
|
18551
|
+
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
18552
|
+
return [];
|
|
18553
|
+
}
|
|
18554
|
+
if (keys.length === 0 && combination) {
|
|
18555
|
+
return [normalizeKey(combination)];
|
|
18556
|
+
}
|
|
18557
|
+
return keys;
|
|
18558
|
+
}
|
|
18559
|
+
|
|
18560
|
+
/**
|
|
18561
|
+
* Splits a hotkey string into its constituent combination groups.
|
|
18562
|
+
*
|
|
18563
|
+
* A sequence is a series of combinations that must be pressed in order.
|
|
18564
|
+
* e.g. `a-b`, `ctrl+k-p`
|
|
18565
|
+
*/
|
|
18566
|
+
function splitKeySequence(str) {
|
|
18567
|
+
if (!str) {
|
|
18568
|
+
consoleWarn('Invalid hotkey sequence: empty string provided');
|
|
18569
|
+
return [];
|
|
18570
|
+
}
|
|
18571
|
+
|
|
18572
|
+
// A sequence is invalid if it starts or ends with a separator,
|
|
18573
|
+
// unless it is part of a combination (e.g., `shift+-`).
|
|
18574
|
+
const hasInvalidStart = str.startsWith('-') && !['---', '--+'].includes(str);
|
|
18575
|
+
const hasInvalidEnd = str.endsWith('-') && !str.endsWith('+-') && !str.endsWith('_-') && str !== '-' && str !== '---';
|
|
18576
|
+
if (hasInvalidStart || hasInvalidEnd) {
|
|
18577
|
+
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
18578
|
+
return [];
|
|
18579
|
+
}
|
|
18580
|
+
const result = [];
|
|
18581
|
+
let buffer = '';
|
|
18582
|
+
let i = 0;
|
|
18583
|
+
while (i < str.length) {
|
|
18584
|
+
const char = str[i];
|
|
18585
|
+
if (char === '-') {
|
|
18586
|
+
// Determine if this hyphen is part of the current combination
|
|
18587
|
+
const prevChar = str[i - 1];
|
|
18588
|
+
const prevPrevChar = i > 1 ? str[i - 2] : undefined;
|
|
18589
|
+
const precededBySinglePlusOrUnderscore = (prevChar === '+' || prevChar === '_') && prevPrevChar !== '+';
|
|
18590
|
+
if (precededBySinglePlusOrUnderscore) {
|
|
18591
|
+
// Treat as part of the combination (e.g., 'ctrl+-')
|
|
18592
|
+
buffer += char;
|
|
18593
|
+
i++;
|
|
18594
|
+
} else {
|
|
18595
|
+
// Treat as sequence separator
|
|
18596
|
+
if (buffer) {
|
|
18597
|
+
result.push(buffer);
|
|
18598
|
+
buffer = '';
|
|
18599
|
+
} else {
|
|
18600
|
+
// Empty buffer means we have a literal '-' key
|
|
18601
|
+
result.push('-');
|
|
18602
|
+
}
|
|
18603
|
+
i++;
|
|
18604
|
+
}
|
|
18605
|
+
} else {
|
|
18606
|
+
buffer += char;
|
|
18607
|
+
i++;
|
|
18608
|
+
}
|
|
18609
|
+
}
|
|
18610
|
+
|
|
18611
|
+
// Add final buffer if it exists
|
|
18612
|
+
if (buffer) {
|
|
18613
|
+
result.push(buffer);
|
|
18614
|
+
}
|
|
18615
|
+
|
|
18616
|
+
// Collapse runs of '-' so that every second '-' is removed
|
|
18617
|
+
const collapsed = [];
|
|
18618
|
+
let minusCount = 0;
|
|
18619
|
+
for (const part of result) {
|
|
18620
|
+
if (part === '-') {
|
|
18621
|
+
if (minusCount % 2 === 0) collapsed.push('-');
|
|
18622
|
+
minusCount++;
|
|
18623
|
+
} else {
|
|
18624
|
+
minusCount = 0;
|
|
18625
|
+
collapsed.push(part);
|
|
18626
|
+
}
|
|
18627
|
+
}
|
|
18628
|
+
|
|
18629
|
+
// Validate that each part of the sequence is a valid combination
|
|
18630
|
+
const areAllValid = collapsed.every(s => splitKeyCombination(s, true).length > 0);
|
|
18631
|
+
if (!areAllValid) {
|
|
18632
|
+
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
18633
|
+
return [];
|
|
18634
|
+
}
|
|
18635
|
+
return collapsed;
|
|
18636
|
+
}
|
|
18637
|
+
|
|
18638
|
+
// Composables
|
|
18639
|
+
|
|
18640
|
+
// Types
|
|
18641
|
+
|
|
18642
|
+
function useHotkey(keys, callback) {
|
|
18643
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
18644
|
+
if (!IN_BROWSER) return function () {};
|
|
18645
|
+
const {
|
|
18646
|
+
event = 'keydown',
|
|
18647
|
+
inputs = false,
|
|
18648
|
+
preventDefault = true,
|
|
18649
|
+
sequenceTimeout = 1000
|
|
18650
|
+
} = options;
|
|
18651
|
+
const isMac = navigator?.userAgent?.includes('Macintosh') ?? false;
|
|
18652
|
+
let timeout = 0;
|
|
18653
|
+
let keyGroups;
|
|
18654
|
+
let isSequence = false;
|
|
18655
|
+
let groupIndex = 0;
|
|
18656
|
+
function clearTimer() {
|
|
18657
|
+
if (!timeout) return;
|
|
18658
|
+
clearTimeout(timeout);
|
|
18659
|
+
timeout = 0;
|
|
18660
|
+
}
|
|
18661
|
+
function isInputFocused() {
|
|
18662
|
+
if (vue.toValue(inputs)) return false;
|
|
18663
|
+
const activeElement = document.activeElement;
|
|
18664
|
+
return activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA' || activeElement.isContentEditable || activeElement.contentEditable === 'true');
|
|
18665
|
+
}
|
|
18666
|
+
function resetSequence() {
|
|
18667
|
+
groupIndex = 0;
|
|
18668
|
+
clearTimer();
|
|
18669
|
+
}
|
|
18670
|
+
function handler(e) {
|
|
18671
|
+
const group = keyGroups[groupIndex];
|
|
18672
|
+
if (!group || isInputFocused()) return;
|
|
18673
|
+
if (!matchesKeyGroup(e, group)) {
|
|
18674
|
+
if (isSequence) resetSequence();
|
|
18675
|
+
return;
|
|
18676
|
+
}
|
|
18677
|
+
if (vue.toValue(preventDefault)) e.preventDefault();
|
|
18678
|
+
if (!isSequence) {
|
|
18679
|
+
callback(e);
|
|
18680
|
+
return;
|
|
18681
|
+
}
|
|
18682
|
+
clearTimer();
|
|
18683
|
+
groupIndex++;
|
|
18684
|
+
if (groupIndex === keyGroups.length) {
|
|
18685
|
+
callback(e);
|
|
18686
|
+
resetSequence();
|
|
18687
|
+
return;
|
|
18688
|
+
}
|
|
18689
|
+
timeout = window.setTimeout(resetSequence, vue.toValue(sequenceTimeout));
|
|
18690
|
+
}
|
|
18691
|
+
function cleanup() {
|
|
18692
|
+
window.removeEventListener(vue.toValue(event), handler);
|
|
18693
|
+
clearTimer();
|
|
18694
|
+
}
|
|
18695
|
+
vue.watch(() => vue.toValue(keys), function (unrefKeys) {
|
|
18696
|
+
cleanup();
|
|
18697
|
+
if (unrefKeys) {
|
|
18698
|
+
const groups = splitKeySequence(unrefKeys.toLowerCase());
|
|
18699
|
+
isSequence = groups.length > 1;
|
|
18700
|
+
keyGroups = groups;
|
|
18701
|
+
resetSequence();
|
|
18702
|
+
window.addEventListener(vue.toValue(event), handler);
|
|
18703
|
+
}
|
|
18704
|
+
}, {
|
|
18705
|
+
immediate: true
|
|
18706
|
+
});
|
|
18707
|
+
|
|
18708
|
+
// Watch for changes in the event type to re-register the listener
|
|
18709
|
+
vue.watch(() => vue.toValue(event), function (newEvent, oldEvent) {
|
|
18710
|
+
if (oldEvent && keyGroups && keyGroups.length > 0) {
|
|
18711
|
+
window.removeEventListener(oldEvent, handler);
|
|
18712
|
+
window.addEventListener(newEvent, handler);
|
|
18713
|
+
}
|
|
18714
|
+
});
|
|
18715
|
+
try {
|
|
18716
|
+
getCurrentInstance('useHotkey');
|
|
18717
|
+
vue.onBeforeUnmount(cleanup);
|
|
18718
|
+
} catch {
|
|
18719
|
+
// Not in Vue setup context
|
|
18720
|
+
}
|
|
18721
|
+
function parseKeyGroup(group) {
|
|
18722
|
+
const MODIFIERS = ['ctrl', 'shift', 'alt', 'meta', 'cmd'];
|
|
18723
|
+
|
|
18724
|
+
// Use the shared combination splitting logic
|
|
18725
|
+
const parts = splitKeyCombination(group.toLowerCase());
|
|
18726
|
+
|
|
18727
|
+
// If the combination is invalid, return empty result
|
|
18728
|
+
if (parts.length === 0) {
|
|
18729
|
+
return {
|
|
18730
|
+
modifiers: Object.fromEntries(MODIFIERS.map(m => [m, false])),
|
|
18731
|
+
actualKey: undefined
|
|
18732
|
+
};
|
|
18733
|
+
}
|
|
18734
|
+
const modifiers = Object.fromEntries(MODIFIERS.map(m => [m, false]));
|
|
18735
|
+
let actualKey;
|
|
18736
|
+
for (const part of parts) {
|
|
18737
|
+
if (MODIFIERS.includes(part)) {
|
|
18738
|
+
modifiers[part] = true;
|
|
18739
|
+
} else {
|
|
18740
|
+
actualKey = part;
|
|
18741
|
+
}
|
|
18742
|
+
}
|
|
18743
|
+
return {
|
|
18744
|
+
modifiers,
|
|
18745
|
+
actualKey
|
|
18746
|
+
};
|
|
18747
|
+
}
|
|
18748
|
+
function matchesKeyGroup(e, group) {
|
|
18749
|
+
const {
|
|
18750
|
+
modifiers,
|
|
18751
|
+
actualKey
|
|
18752
|
+
} = parseKeyGroup(group);
|
|
18753
|
+
const expectCtrl = modifiers.ctrl || !isMac && (modifiers.cmd || modifiers.meta);
|
|
18754
|
+
const expectMeta = isMac && (modifiers.cmd || modifiers.meta);
|
|
18755
|
+
return e.ctrlKey === expectCtrl && e.metaKey === expectMeta && e.shiftKey === modifiers.shift && e.altKey === modifiers.alt && e.key.toLowerCase() === actualKey?.toLowerCase();
|
|
18756
|
+
}
|
|
18757
|
+
return cleanup;
|
|
18758
|
+
}
|
|
18759
|
+
|
|
18365
18760
|
// Types
|
|
18366
18761
|
|
|
18367
18762
|
const makeVColorPickerProps = propsFactory({
|
|
@@ -18908,7 +19303,7 @@
|
|
|
18908
19303
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
18909
19304
|
onClick: () => select(item, null)
|
|
18910
19305
|
});
|
|
18911
|
-
if (item.
|
|
19306
|
+
if (item.type === 'divider') {
|
|
18912
19307
|
return slots.divider?.({
|
|
18913
19308
|
props: item.raw,
|
|
18914
19309
|
index
|
|
@@ -18916,7 +19311,7 @@
|
|
|
18916
19311
|
"key": `divider-${index}`
|
|
18917
19312
|
}), null);
|
|
18918
19313
|
}
|
|
18919
|
-
if (item.
|
|
19314
|
+
if (item.type === 'subheader') {
|
|
18920
19315
|
return slots.subheader?.({
|
|
18921
19316
|
props: item.raw,
|
|
18922
19317
|
index
|
|
@@ -19790,7 +20185,8 @@
|
|
|
19790
20185
|
|
|
19791
20186
|
// Dates should be compared numerically
|
|
19792
20187
|
if (sortA instanceof Date && sortB instanceof Date) {
|
|
19793
|
-
|
|
20188
|
+
sortA = sortA.getTime();
|
|
20189
|
+
sortB = sortB.getTime();
|
|
19794
20190
|
}
|
|
19795
20191
|
[sortA, sortB] = [sortA, sortB].map(s => s != null ? s.toString().toLocaleLowerCase() : s);
|
|
19796
20192
|
if (sortA !== sortB) {
|
|
@@ -20499,10 +20895,15 @@
|
|
|
20499
20895
|
type: String,
|
|
20500
20896
|
default: 'start'
|
|
20501
20897
|
},
|
|
20502
|
-
fixed:
|
|
20898
|
+
fixed: {
|
|
20899
|
+
type: [Boolean, String],
|
|
20900
|
+
default: false
|
|
20901
|
+
},
|
|
20503
20902
|
fixedOffset: [Number, String],
|
|
20903
|
+
fixedEndOffset: [Number, String],
|
|
20504
20904
|
height: [Number, String],
|
|
20505
20905
|
lastFixed: Boolean,
|
|
20906
|
+
firstFixedEnd: Boolean,
|
|
20506
20907
|
noPadding: Boolean,
|
|
20507
20908
|
tag: String,
|
|
20508
20909
|
width: [Number, String],
|
|
@@ -20513,11 +20914,13 @@
|
|
|
20513
20914
|
slots
|
|
20514
20915
|
} = _ref;
|
|
20515
20916
|
const Tag = props.tag ?? 'td';
|
|
20917
|
+
const fixedSide = typeof props.fixed === 'string' ? props.fixed : props.fixed ? 'start' : 'none';
|
|
20516
20918
|
return vue.createVNode(Tag, {
|
|
20517
|
-
"tabindex": "0",
|
|
20518
20919
|
"class": vue.normalizeClass(['v-data-table__td', {
|
|
20519
|
-
'v-data-table-column--fixed':
|
|
20920
|
+
'v-data-table-column--fixed': fixedSide === 'start',
|
|
20921
|
+
'v-data-table-column--fixed-end': fixedSide === 'end',
|
|
20520
20922
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
20923
|
+
'v-data-table-column--first-fixed-end': props.firstFixedEnd,
|
|
20521
20924
|
'v-data-table-column--no-padding': props.noPadding,
|
|
20522
20925
|
'v-data-table-column--nowrap': props.nowrap
|
|
20523
20926
|
}, `v-data-table-column--align-${props.align}`]),
|
|
@@ -20525,7 +20928,8 @@
|
|
|
20525
20928
|
height: convertToUnit(props.height),
|
|
20526
20929
|
width: convertToUnit(props.width),
|
|
20527
20930
|
maxWidth: convertToUnit(props.maxWidth),
|
|
20528
|
-
left: convertToUnit(props.fixedOffset || null)
|
|
20931
|
+
left: fixedSide === 'start' ? convertToUnit(props.fixedOffset || null) : undefined,
|
|
20932
|
+
right: fixedSide === 'end' ? convertToUnit(props.fixedEndOffset || null) : undefined
|
|
20529
20933
|
}
|
|
20530
20934
|
}, {
|
|
20531
20935
|
default: () => [slots.default?.()]
|
|
@@ -20622,20 +21026,28 @@
|
|
|
20622
21026
|
}
|
|
20623
21027
|
function parseFixedColumns(items) {
|
|
20624
21028
|
let seenFixed = false;
|
|
20625
|
-
function setFixed(item) {
|
|
20626
|
-
let
|
|
21029
|
+
function setFixed(item, side) {
|
|
21030
|
+
let parentFixedSide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'none';
|
|
20627
21031
|
if (!item) return;
|
|
20628
|
-
if (
|
|
20629
|
-
item.fixed =
|
|
21032
|
+
if (parentFixedSide !== 'none') {
|
|
21033
|
+
item.fixed = parentFixedSide;
|
|
20630
21034
|
}
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
21035
|
+
|
|
21036
|
+
// normalize to simplify logic below
|
|
21037
|
+
if (item.fixed === true) {
|
|
21038
|
+
item.fixed = 'start';
|
|
21039
|
+
}
|
|
21040
|
+
const orderedChildren = side === 'start' ? item.children?.toReversed() : item.children;
|
|
21041
|
+
if (item.fixed === side) {
|
|
21042
|
+
if (orderedChildren) {
|
|
21043
|
+
for (const child of orderedChildren) {
|
|
21044
|
+
setFixed(child, side, side);
|
|
20635
21045
|
}
|
|
20636
21046
|
} else {
|
|
20637
|
-
if (!seenFixed) {
|
|
21047
|
+
if (!seenFixed && side === 'start') {
|
|
20638
21048
|
item.lastFixed = true;
|
|
21049
|
+
} else if (!seenFixed && side === 'end') {
|
|
21050
|
+
item.firstFixedEnd = true;
|
|
20639
21051
|
} else if (isNaN(Number(item.width))) {
|
|
20640
21052
|
consoleError(`Multiple fixed columns should have a static width (key: ${item.key})`);
|
|
20641
21053
|
} else {
|
|
@@ -20644,36 +21056,57 @@
|
|
|
20644
21056
|
seenFixed = true;
|
|
20645
21057
|
}
|
|
20646
21058
|
} else {
|
|
20647
|
-
if (
|
|
20648
|
-
for (
|
|
20649
|
-
setFixed(
|
|
21059
|
+
if (orderedChildren) {
|
|
21060
|
+
for (const child of orderedChildren) {
|
|
21061
|
+
setFixed(child, side);
|
|
20650
21062
|
}
|
|
20651
21063
|
} else {
|
|
20652
21064
|
seenFixed = false;
|
|
20653
21065
|
}
|
|
20654
21066
|
}
|
|
20655
21067
|
}
|
|
20656
|
-
for (
|
|
20657
|
-
setFixed(
|
|
21068
|
+
for (const item of items.toReversed()) {
|
|
21069
|
+
setFixed(item, 'start');
|
|
21070
|
+
}
|
|
21071
|
+
for (const item of items) {
|
|
21072
|
+
setFixed(item, 'end');
|
|
20658
21073
|
}
|
|
20659
21074
|
function setFixedOffset(item) {
|
|
20660
|
-
let
|
|
20661
|
-
if (!item) return
|
|
21075
|
+
let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21076
|
+
if (!item) return offset;
|
|
20662
21077
|
if (item.children) {
|
|
20663
|
-
item.fixedOffset =
|
|
21078
|
+
item.fixedOffset = offset;
|
|
20664
21079
|
for (const child of item.children) {
|
|
20665
|
-
|
|
21080
|
+
offset = setFixedOffset(child, offset);
|
|
20666
21081
|
}
|
|
20667
|
-
} else if (item.fixed) {
|
|
20668
|
-
item.fixedOffset =
|
|
20669
|
-
|
|
21082
|
+
} else if (item.fixed && item.fixed !== 'end') {
|
|
21083
|
+
item.fixedOffset = offset;
|
|
21084
|
+
offset += parseFloat(item.width || '0') || 0;
|
|
20670
21085
|
}
|
|
20671
|
-
return
|
|
21086
|
+
return offset;
|
|
20672
21087
|
}
|
|
20673
21088
|
let fixedOffset = 0;
|
|
20674
21089
|
for (const item of items) {
|
|
20675
21090
|
fixedOffset = setFixedOffset(item, fixedOffset);
|
|
20676
21091
|
}
|
|
21092
|
+
function setFixedEndOffset(item) {
|
|
21093
|
+
let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21094
|
+
if (!item) return offset;
|
|
21095
|
+
if (item.children) {
|
|
21096
|
+
item.fixedEndOffset = offset;
|
|
21097
|
+
for (const child of item.children) {
|
|
21098
|
+
offset = setFixedEndOffset(child, offset);
|
|
21099
|
+
}
|
|
21100
|
+
} else if (item.fixed === 'end') {
|
|
21101
|
+
item.fixedEndOffset = offset;
|
|
21102
|
+
offset += parseFloat(item.width || '0') || 0;
|
|
21103
|
+
}
|
|
21104
|
+
return offset;
|
|
21105
|
+
}
|
|
21106
|
+
let fixedEndOffset = 0;
|
|
21107
|
+
for (const item of items.toReversed()) {
|
|
21108
|
+
fixedEndOffset = setFixedEndOffset(item, fixedEndOffset);
|
|
21109
|
+
}
|
|
20677
21110
|
}
|
|
20678
21111
|
function parse(items, maxDepth) {
|
|
20679
21112
|
const headers = [];
|
|
@@ -20806,7 +21239,6 @@
|
|
|
20806
21239
|
color: String,
|
|
20807
21240
|
disableSort: Boolean,
|
|
20808
21241
|
fixedHeader: Boolean,
|
|
20809
|
-
lastFixed: Boolean,
|
|
20810
21242
|
multiSort: Boolean,
|
|
20811
21243
|
sortAscIcon: {
|
|
20812
21244
|
type: IconValue,
|
|
@@ -20853,11 +21285,12 @@
|
|
|
20853
21285
|
loaderClasses
|
|
20854
21286
|
} = useLoader(props);
|
|
20855
21287
|
function getFixedStyles(column, y) {
|
|
20856
|
-
if (!(props.sticky || props.fixedHeader) && !
|
|
21288
|
+
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
|
21289
|
+
const fixedSide = typeof column.fixed === 'string' ? column.fixed : column.fixed ? 'start' : 'none';
|
|
20857
21290
|
return {
|
|
20858
21291
|
position: 'sticky',
|
|
20859
|
-
left:
|
|
20860
|
-
right:
|
|
21292
|
+
left: fixedSide === 'start' ? convertToUnit(column.fixedOffset) : undefined,
|
|
21293
|
+
right: fixedSide === 'end' ? convertToUnit(column.fixedEndOffset) : undefined,
|
|
20861
21294
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20862
21295
|
};
|
|
20863
21296
|
}
|
|
@@ -20917,14 +21350,15 @@
|
|
|
20917
21350
|
},
|
|
20918
21351
|
"colspan": column.colspan,
|
|
20919
21352
|
"rowspan": column.rowspan,
|
|
20920
|
-
"onClick": column.sortable ? () => toggleSort(column) : undefined,
|
|
20921
21353
|
"fixed": column.fixed,
|
|
20922
21354
|
"nowrap": column.nowrap,
|
|
20923
21355
|
"lastFixed": column.lastFixed,
|
|
20924
|
-
"
|
|
20925
|
-
|
|
20926
|
-
"
|
|
20927
|
-
|
|
21356
|
+
"firstFixedEnd": column.firstFixedEnd,
|
|
21357
|
+
"noPadding": noPadding,
|
|
21358
|
+
"tabindex": column.sortable ? 0 : undefined,
|
|
21359
|
+
"onClick": column.sortable ? () => toggleSort(column) : undefined,
|
|
21360
|
+
"onKeydown": column.sortable ? event => handleEnterKeyPress(event, column) : undefined
|
|
21361
|
+
}, headerProps), {
|
|
20928
21362
|
default: () => {
|
|
20929
21363
|
const columnSlotName = `header.${column.key}`;
|
|
20930
21364
|
const columnSlotProps = {
|
|
@@ -21200,7 +21634,9 @@
|
|
|
21200
21634
|
},
|
|
21201
21635
|
"fixed": column.fixed,
|
|
21202
21636
|
"fixedOffset": column.fixedOffset,
|
|
21637
|
+
"fixedEndOffset": column.fixedEndOffset,
|
|
21203
21638
|
"lastFixed": column.lastFixed,
|
|
21639
|
+
"firstFixedEnd": column.firstFixedEnd,
|
|
21204
21640
|
"maxWidth": !mobile.value ? column.maxWidth : undefined,
|
|
21205
21641
|
"noPadding": column.key === 'data-table-select' || column.key === 'data-table-expand',
|
|
21206
21642
|
"nowrap": column.nowrap,
|
|
@@ -22610,10 +23046,9 @@
|
|
|
22610
23046
|
const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
|
|
22611
23047
|
return adapter.setMonth(date, value);
|
|
22612
23048
|
}, v => adapter.getMonth(v));
|
|
22613
|
-
const
|
|
23049
|
+
const weekdayLabels = vue.computed(() => {
|
|
22614
23050
|
const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
|
22615
|
-
|
|
22616
|
-
return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
|
|
23051
|
+
return adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).filter((_, i) => props.weekdays.includes((i + firstDayOfWeek) % 7));
|
|
22617
23052
|
});
|
|
22618
23053
|
const weeksInMonth = vue.computed(() => {
|
|
22619
23054
|
const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek);
|
|
@@ -22637,13 +23072,14 @@
|
|
|
22637
23072
|
});
|
|
22638
23073
|
function genDays(days, today) {
|
|
22639
23074
|
return days.filter(date => {
|
|
22640
|
-
return
|
|
23075
|
+
return props.weekdays.includes(adapter.toJsDate(date).getDay());
|
|
22641
23076
|
}).map((date, index) => {
|
|
22642
23077
|
const isoDate = adapter.toISO(date);
|
|
22643
23078
|
const isAdjacent = !adapter.isSameMonth(date, month.value);
|
|
22644
23079
|
const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));
|
|
22645
23080
|
const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));
|
|
22646
23081
|
const isSame = adapter.isSameDay(date, month.value);
|
|
23082
|
+
const weekdaysCount = props.weekdays.length;
|
|
22647
23083
|
return {
|
|
22648
23084
|
date,
|
|
22649
23085
|
formatted: adapter.format(date, 'keyboardDate'),
|
|
@@ -22655,8 +23091,8 @@
|
|
|
22655
23091
|
isSelected: model.value.some(value => adapter.isSameDay(date, value)),
|
|
22656
23092
|
isStart,
|
|
22657
23093
|
isToday: adapter.isSameDay(date, today),
|
|
22658
|
-
isWeekEnd: index %
|
|
22659
|
-
isWeekStart: index %
|
|
23094
|
+
isWeekEnd: index % weekdaysCount === weekdaysCount - 1,
|
|
23095
|
+
isWeekStart: index % weekdaysCount === 0,
|
|
22660
23096
|
isoDate,
|
|
22661
23097
|
localized: adapter.format(date, 'dayOfMonth'),
|
|
22662
23098
|
month: adapter.getMonth(date),
|
|
@@ -22694,7 +23130,7 @@
|
|
|
22694
23130
|
if (typeof props.allowedDates === 'function') {
|
|
22695
23131
|
return !props.allowedDates(date);
|
|
22696
23132
|
}
|
|
22697
|
-
return
|
|
23133
|
+
return false;
|
|
22698
23134
|
}
|
|
22699
23135
|
return {
|
|
22700
23136
|
displayValue,
|
|
@@ -22703,7 +23139,7 @@
|
|
|
22703
23139
|
genDays,
|
|
22704
23140
|
model,
|
|
22705
23141
|
weeksInMonth,
|
|
22706
|
-
|
|
23142
|
+
weekdayLabels,
|
|
22707
23143
|
weekNumbers
|
|
22708
23144
|
};
|
|
22709
23145
|
}
|
|
@@ -22742,7 +23178,8 @@
|
|
|
22742
23178
|
const {
|
|
22743
23179
|
daysInMonth,
|
|
22744
23180
|
model,
|
|
22745
|
-
weekNumbers
|
|
23181
|
+
weekNumbers,
|
|
23182
|
+
weekdayLabels
|
|
22746
23183
|
} = useCalendar(props);
|
|
22747
23184
|
const adapter = useDate();
|
|
22748
23185
|
const rangeStart = vue.shallowRef();
|
|
@@ -22814,7 +23251,10 @@
|
|
|
22814
23251
|
}
|
|
22815
23252
|
}
|
|
22816
23253
|
useRender(() => vue.createElementVNode("div", {
|
|
22817
|
-
"class": "v-date-picker-month"
|
|
23254
|
+
"class": "v-date-picker-month",
|
|
23255
|
+
"style": {
|
|
23256
|
+
'--v-date-picker-days-in-week': props.weekdays.length
|
|
23257
|
+
}
|
|
22818
23258
|
}, [props.showWeek && vue.createElementVNode("div", {
|
|
22819
23259
|
"key": "weeks",
|
|
22820
23260
|
"class": "v-date-picker-month__weeks"
|
|
@@ -22830,7 +23270,7 @@
|
|
|
22830
23270
|
"ref": daysRef,
|
|
22831
23271
|
"key": daysInMonth.value[0].date?.toString(),
|
|
22832
23272
|
"class": "v-date-picker-month__days"
|
|
22833
|
-
}, [!props.hideWeekdays &&
|
|
23273
|
+
}, [!props.hideWeekdays && weekdayLabels.value.map(weekDay => vue.createElementVNode("div", {
|
|
22834
23274
|
"class": vue.normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
|
22835
23275
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
|
22836
23276
|
const slotProps = {
|
|
@@ -23213,7 +23653,8 @@
|
|
|
23213
23653
|
}
|
|
23214
23654
|
function allowedMonths(month) {
|
|
23215
23655
|
if (typeof props.allowedDates === 'function') {
|
|
23216
|
-
const
|
|
23656
|
+
const monthTwoDigits = String(month + 1).padStart(2, '0');
|
|
23657
|
+
const startOfMonth = adapter.parseISO(`${year.value}-${monthTwoDigits}-01`);
|
|
23217
23658
|
return isAllowedInRange(startOfMonth, adapter.endOfMonth(startOfMonth));
|
|
23218
23659
|
}
|
|
23219
23660
|
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
@@ -25510,6 +25951,8 @@
|
|
|
25510
25951
|
function holdStart(value) {
|
|
25511
25952
|
holdStop();
|
|
25512
25953
|
tick(value);
|
|
25954
|
+
window.addEventListener('pointerup', holdStop);
|
|
25955
|
+
document.addEventListener('blur', holdStop);
|
|
25513
25956
|
timeout = window.setTimeout(() => {
|
|
25514
25957
|
interval = window.setInterval(() => tick(value), HOLD_REPEAT);
|
|
25515
25958
|
}, HOLD_DELAY);
|
|
@@ -25517,6 +25960,8 @@
|
|
|
25517
25960
|
function holdStop() {
|
|
25518
25961
|
window.clearTimeout(timeout);
|
|
25519
25962
|
window.clearInterval(interval);
|
|
25963
|
+
window.removeEventListener('pointerup', holdStop);
|
|
25964
|
+
document.removeEventListener('blur', holdStop);
|
|
25520
25965
|
}
|
|
25521
25966
|
function tick(value) {
|
|
25522
25967
|
toggleUpDown(value === 'up');
|
|
@@ -25652,7 +26097,7 @@
|
|
|
25652
26097
|
onClick: onControlClick,
|
|
25653
26098
|
onPointerup: onControlMouseup,
|
|
25654
26099
|
onPointerdown: onUpControlMousedown,
|
|
25655
|
-
onPointercancel:
|
|
26100
|
+
onPointercancel: onControlMouseup
|
|
25656
26101
|
}
|
|
25657
26102
|
};
|
|
25658
26103
|
const decrementSlotProps = {
|
|
@@ -25660,7 +26105,7 @@
|
|
|
25660
26105
|
onClick: onControlClick,
|
|
25661
26106
|
onPointerup: onControlMouseup,
|
|
25662
26107
|
onPointerdown: onDownControlMousedown,
|
|
25663
|
-
onPointercancel:
|
|
26108
|
+
onPointercancel: onControlMouseup
|
|
25664
26109
|
}
|
|
25665
26110
|
};
|
|
25666
26111
|
vue.watch(() => props.precision, () => formatInputValue());
|
|
@@ -25741,7 +26186,6 @@
|
|
|
25741
26186
|
const el = e.currentTarget;
|
|
25742
26187
|
el?.releasePointerCapture(e.pointerId);
|
|
25743
26188
|
e.preventDefault();
|
|
25744
|
-
e.stopPropagation();
|
|
25745
26189
|
holdStop();
|
|
25746
26190
|
}
|
|
25747
26191
|
function onUpControlMousedown(e) {
|
|
@@ -25758,11 +26202,6 @@
|
|
|
25758
26202
|
e.stopPropagation();
|
|
25759
26203
|
holdStart('down');
|
|
25760
26204
|
}
|
|
25761
|
-
function onControlPointerCancel(e) {
|
|
25762
|
-
const el = e.currentTarget;
|
|
25763
|
-
el?.releasePointerCapture(e.pointerId);
|
|
25764
|
-
holdStop();
|
|
25765
|
-
}
|
|
25766
26205
|
function clampModel() {
|
|
25767
26206
|
if (controlsDisabled.value) return;
|
|
25768
26207
|
if (!vTextFieldRef.value) return;
|
|
@@ -25809,7 +26248,7 @@
|
|
|
25809
26248
|
"onClick": onControlClick,
|
|
25810
26249
|
"onPointerdown": onUpControlMousedown,
|
|
25811
26250
|
"onPointerup": onControlMouseup,
|
|
25812
|
-
"onPointercancel":
|
|
26251
|
+
"onPointercancel": onControlMouseup,
|
|
25813
26252
|
"size": controlNodeSize.value,
|
|
25814
26253
|
"tabindex": "-1"
|
|
25815
26254
|
}, null) : vue.createVNode(VDefaultsProvider, {
|
|
@@ -25839,7 +26278,7 @@
|
|
|
25839
26278
|
"onClick": onControlClick,
|
|
25840
26279
|
"onPointerdown": onDownControlMousedown,
|
|
25841
26280
|
"onPointerup": onControlMouseup,
|
|
25842
|
-
"onPointercancel":
|
|
26281
|
+
"onPointercancel": onControlMouseup,
|
|
25843
26282
|
"size": controlNodeSize.value,
|
|
25844
26283
|
"tabindex": "-1"
|
|
25845
26284
|
}, null) : vue.createVNode(VDefaultsProvider, {
|
|
@@ -25986,19 +26425,21 @@
|
|
|
25986
26425
|
const contentRef = vue.ref();
|
|
25987
26426
|
const inputRef = vue.ref([]);
|
|
25988
26427
|
const current = vue.computed(() => inputRef.value[focusIndex.value]);
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
|
|
25997
|
-
|
|
25998
|
-
|
|
25999
|
-
|
|
26000
|
-
|
|
26001
|
-
|
|
26428
|
+
useToggleScope(() => props.autofocus, () => {
|
|
26429
|
+
const intersectScope = vue.effectScope();
|
|
26430
|
+
intersectScope.run(() => {
|
|
26431
|
+
const {
|
|
26432
|
+
intersectionRef,
|
|
26433
|
+
isIntersecting
|
|
26434
|
+
} = useIntersectionObserver();
|
|
26435
|
+
vue.watchEffect(() => {
|
|
26436
|
+
intersectionRef.value = inputRef.value[0];
|
|
26437
|
+
});
|
|
26438
|
+
vue.watch(isIntersecting, v => {
|
|
26439
|
+
if (!v) return;
|
|
26440
|
+
intersectionRef.value?.focus();
|
|
26441
|
+
intersectScope.stop();
|
|
26442
|
+
});
|
|
26002
26443
|
});
|
|
26003
26444
|
});
|
|
26004
26445
|
function onInput() {
|
|
@@ -30009,6 +30450,8 @@
|
|
|
30009
30450
|
|
|
30010
30451
|
const makeVTreeviewItemProps = propsFactory({
|
|
30011
30452
|
loading: Boolean,
|
|
30453
|
+
hideActions: Boolean,
|
|
30454
|
+
indentLines: Array,
|
|
30012
30455
|
toggleIcon: IconValue,
|
|
30013
30456
|
...makeVListItemProps({
|
|
30014
30457
|
slim: true
|
|
@@ -30044,23 +30487,31 @@
|
|
|
30044
30487
|
emit('toggleExpand', e);
|
|
30045
30488
|
}
|
|
30046
30489
|
useRender(() => {
|
|
30047
|
-
const listItemProps =
|
|
30048
|
-
const hasPrepend = slots.prepend || props.toggleIcon;
|
|
30490
|
+
const listItemProps = VListItem.filterProps(props);
|
|
30491
|
+
const hasPrepend = slots.prepend || props.toggleIcon || props.indentLines;
|
|
30049
30492
|
return vue.createVNode(VListItem, vue.mergeProps({
|
|
30050
30493
|
"ref": vListItemRef
|
|
30051
30494
|
}, listItemProps, {
|
|
30052
|
-
"active": vListItemRef.value?.isActivated,
|
|
30495
|
+
"active": vListItemRef.value?.isActivated || undefined,
|
|
30053
30496
|
"class": ['v-treeview-item', {
|
|
30054
30497
|
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
|
30055
30498
|
'v-treeview-item--filtered': isFiltered.value
|
|
30056
30499
|
}, props.class],
|
|
30057
30500
|
"ripple": false,
|
|
30058
|
-
"onClick":
|
|
30501
|
+
"onClick": activateGroupActivator
|
|
30059
30502
|
}), {
|
|
30060
30503
|
...slots,
|
|
30061
30504
|
prepend: hasPrepend ? slotProps => {
|
|
30062
|
-
return vue.createElementVNode(vue.Fragment, null, [vue.
|
|
30063
|
-
"
|
|
30505
|
+
return vue.createElementVNode(vue.Fragment, null, [props.indentLines && props.indentLines.length > 0 ? vue.createElementVNode("div", {
|
|
30506
|
+
"key": "indent-lines",
|
|
30507
|
+
"class": "v-treeview-indent-lines",
|
|
30508
|
+
"style": {
|
|
30509
|
+
'--v-indent-parts': props.indentLines.length
|
|
30510
|
+
}
|
|
30511
|
+
}, [props.indentLines.map(type => vue.createElementVNode("div", {
|
|
30512
|
+
"class": vue.normalizeClass(`v-treeview-indent-line v-treeview-indent-line--${type}`)
|
|
30513
|
+
}, null))]) : '', !props.hideActions && vue.createVNode(VListItemAction, {
|
|
30514
|
+
"start": true
|
|
30064
30515
|
}, {
|
|
30065
30516
|
default: () => [props.toggleIcon ? vue.createVNode(VBtn, {
|
|
30066
30517
|
"density": "compact",
|
|
@@ -30069,13 +30520,11 @@
|
|
|
30069
30520
|
"variant": "text",
|
|
30070
30521
|
"onClick": onClickAction
|
|
30071
30522
|
}, {
|
|
30072
|
-
loader() {
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
}, null);
|
|
30078
|
-
}
|
|
30523
|
+
loader: () => vue.createVNode(VProgressCircular, {
|
|
30524
|
+
"indeterminate": "disable-shrink",
|
|
30525
|
+
"size": "20",
|
|
30526
|
+
"width": "2"
|
|
30527
|
+
}, null)
|
|
30079
30528
|
}) : vue.createElementVNode("div", {
|
|
30080
30529
|
"class": "v-treeview-item__level"
|
|
30081
30530
|
}, null)]
|
|
@@ -30083,7 +30532,7 @@
|
|
|
30083
30532
|
} : undefined
|
|
30084
30533
|
});
|
|
30085
30534
|
});
|
|
30086
|
-
return {};
|
|
30535
|
+
return forwardRefs({}, vListItemRef);
|
|
30087
30536
|
}
|
|
30088
30537
|
});
|
|
30089
30538
|
|
|
@@ -30108,14 +30557,20 @@
|
|
|
30108
30557
|
falseIcon: IconValue,
|
|
30109
30558
|
trueIcon: IconValue,
|
|
30110
30559
|
returnObject: Boolean,
|
|
30560
|
+
activatable: Boolean,
|
|
30111
30561
|
selectable: Boolean,
|
|
30112
30562
|
selectedColor: String,
|
|
30113
30563
|
selectStrategy: [String, Function, Object],
|
|
30114
30564
|
index: Number,
|
|
30565
|
+
isLastGroup: Boolean,
|
|
30566
|
+
separateRoots: Boolean,
|
|
30567
|
+
parentIndentLines: Array,
|
|
30568
|
+
indentLinesVariant: String,
|
|
30115
30569
|
path: {
|
|
30116
30570
|
type: Array,
|
|
30117
30571
|
default: () => []
|
|
30118
30572
|
},
|
|
30573
|
+
...pick(makeVTreeviewItemProps(), ['hideActions']),
|
|
30119
30574
|
...makeDensityProps()
|
|
30120
30575
|
}, 'VTreeviewChildren');
|
|
30121
30576
|
const VTreeviewChildren = genericComponent()({
|
|
@@ -30126,7 +30581,8 @@
|
|
|
30126
30581
|
slots
|
|
30127
30582
|
} = _ref;
|
|
30128
30583
|
const isLoading = vue.reactive(new Set());
|
|
30129
|
-
const
|
|
30584
|
+
const activatorItems = vue.ref([]);
|
|
30585
|
+
const isClickOnOpen = vue.computed(() => !props.disabled && (props.openOnClick != null ? props.openOnClick : props.selectable && !props.activatable));
|
|
30130
30586
|
async function checkChildren(item) {
|
|
30131
30587
|
try {
|
|
30132
30588
|
if (!props.items?.length || !props.loadChildren) return;
|
|
@@ -30140,22 +30596,35 @@
|
|
|
30140
30596
|
}
|
|
30141
30597
|
function selectItem(select, isSelected) {
|
|
30142
30598
|
if (props.selectable) {
|
|
30143
|
-
select(
|
|
30599
|
+
select(isSelected);
|
|
30144
30600
|
}
|
|
30145
30601
|
}
|
|
30146
|
-
return () => slots.default?.() ?? props.items?.map((item, index) => {
|
|
30602
|
+
return () => slots.default?.() ?? props.items?.map((item, index, items) => {
|
|
30147
30603
|
const {
|
|
30148
30604
|
children,
|
|
30149
30605
|
props: itemProps
|
|
30150
30606
|
} = item;
|
|
30151
30607
|
const loading = isLoading.has(item.value);
|
|
30608
|
+
const nextItemHasChildren = !!items.at(index + 1)?.children;
|
|
30609
|
+
const depth = props.path?.length ?? 0;
|
|
30610
|
+
const isLast = items.length - 1 === index;
|
|
30152
30611
|
const treeItemProps = {
|
|
30153
30612
|
index,
|
|
30154
|
-
depth
|
|
30613
|
+
depth,
|
|
30155
30614
|
isFirst: index === 0,
|
|
30156
|
-
isLast
|
|
30157
|
-
path: [...props.path, index]
|
|
30615
|
+
isLast,
|
|
30616
|
+
path: [...props.path, index],
|
|
30617
|
+
hideAction: props.hideActions
|
|
30158
30618
|
};
|
|
30619
|
+
const indentLines = getIndentLines({
|
|
30620
|
+
depth,
|
|
30621
|
+
isLast,
|
|
30622
|
+
isLastGroup: props.isLastGroup,
|
|
30623
|
+
leafLinks: !props.hideActions,
|
|
30624
|
+
separateRoots: props.separateRoots,
|
|
30625
|
+
parentIndentLines: props.parentIndentLines,
|
|
30626
|
+
variant: props.indentLinesVariant
|
|
30627
|
+
});
|
|
30159
30628
|
const slotsWithItem = {
|
|
30160
30629
|
prepend: slotProps => vue.createElementVNode(vue.Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && vue.createElementVNode("div", null, [vue.createVNode(VCheckboxBtn, {
|
|
30161
30630
|
"key": item.value,
|
|
@@ -30168,7 +30637,8 @@
|
|
|
30168
30637
|
"indeterminateIcon": props.indeterminateIcon,
|
|
30169
30638
|
"falseIcon": props.falseIcon,
|
|
30170
30639
|
"trueIcon": props.trueIcon,
|
|
30171
|
-
"
|
|
30640
|
+
"onUpdate:modelValue": v => selectItem(slotProps.select, v),
|
|
30641
|
+
"onClick": e => e.stopPropagation(),
|
|
30172
30642
|
"onKeydown": e => {
|
|
30173
30643
|
if (!['Enter', 'Space'].includes(e.key)) return;
|
|
30174
30644
|
e.stopPropagation();
|
|
@@ -30215,24 +30685,45 @@
|
|
|
30215
30685
|
...activatorProps,
|
|
30216
30686
|
value: itemProps?.value,
|
|
30217
30687
|
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
|
30218
|
-
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] :
|
|
30688
|
+
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected)
|
|
30219
30689
|
};
|
|
30220
|
-
return vue.createVNode(VTreeviewItem, vue.mergeProps(
|
|
30690
|
+
return vue.createVNode(VTreeviewItem, vue.mergeProps({
|
|
30691
|
+
"ref": el => activatorItems.value[index] = el
|
|
30692
|
+
}, listItemProps, {
|
|
30693
|
+
"hideActions": props.hideActions,
|
|
30694
|
+
"indentLines": indentLines.node,
|
|
30221
30695
|
"value": props.returnObject ? item.raw : itemProps.value,
|
|
30222
30696
|
"loading": loading
|
|
30223
30697
|
}), slotsWithItem);
|
|
30224
30698
|
},
|
|
30225
30699
|
default: () => vue.createVNode(VTreeviewChildren, vue.mergeProps(treeviewChildrenProps, {
|
|
30226
30700
|
"items": children,
|
|
30701
|
+
"indentLinesVariant": props.indentLinesVariant,
|
|
30702
|
+
"parentIndentLines": indentLines.children,
|
|
30703
|
+
"isLastGroup": nextItemHasChildren,
|
|
30227
30704
|
"returnObject": props.returnObject
|
|
30228
30705
|
}), slots)
|
|
30229
|
-
}) : slots.item
|
|
30706
|
+
}) : renderSlot(slots.item, {
|
|
30230
30707
|
props: itemProps,
|
|
30231
30708
|
item: item.raw,
|
|
30232
30709
|
internalItem: item
|
|
30233
|
-
}
|
|
30234
|
-
|
|
30235
|
-
|
|
30710
|
+
}, () => {
|
|
30711
|
+
if (item.type === 'divider') {
|
|
30712
|
+
return renderSlot(slots.divider, {
|
|
30713
|
+
props: item.raw
|
|
30714
|
+
}, () => vue.createVNode(VDivider, item.props, null));
|
|
30715
|
+
}
|
|
30716
|
+
if (item.type === 'subheader') {
|
|
30717
|
+
return renderSlot(slots.subheader, {
|
|
30718
|
+
props: item.raw
|
|
30719
|
+
}, () => vue.createVNode(VListSubheader, item.props, null));
|
|
30720
|
+
}
|
|
30721
|
+
return vue.createVNode(VTreeviewItem, vue.mergeProps(itemProps, {
|
|
30722
|
+
"hideActions": props.hideActions,
|
|
30723
|
+
"indentLines": indentLines.leaf,
|
|
30724
|
+
"value": props.returnObject ? vue.toRaw(item.raw) : itemProps.value
|
|
30725
|
+
}), slotsWithItem);
|
|
30726
|
+
});
|
|
30236
30727
|
});
|
|
30237
30728
|
}
|
|
30238
30729
|
});
|
|
@@ -30248,20 +30739,18 @@
|
|
|
30248
30739
|
const makeVTreeviewProps = propsFactory({
|
|
30249
30740
|
fluid: Boolean,
|
|
30250
30741
|
openAll: Boolean,
|
|
30742
|
+
indentLines: [Boolean, String],
|
|
30251
30743
|
search: String,
|
|
30252
30744
|
...makeFilterProps({
|
|
30253
30745
|
filterKeys: ['title']
|
|
30254
30746
|
}),
|
|
30255
|
-
...omit(makeVTreeviewChildrenProps(), ['index', 'path']),
|
|
30747
|
+
...omit(makeVTreeviewChildrenProps(), ['index', 'path', 'indentLinesVariant', 'parentIndentLines', 'isLastGroup']),
|
|
30256
30748
|
...omit(makeVListProps({
|
|
30257
30749
|
collapseIcon: '$treeviewCollapse',
|
|
30258
30750
|
expandIcon: '$treeviewExpand',
|
|
30259
30751
|
slim: true
|
|
30260
|
-
}), ['
|
|
30261
|
-
modelValue:
|
|
30262
|
-
type: Array,
|
|
30263
|
-
default: () => []
|
|
30264
|
-
}
|
|
30752
|
+
}), ['nav', 'openStrategy']),
|
|
30753
|
+
modelValue: Array
|
|
30265
30754
|
}, 'VTreeview');
|
|
30266
30755
|
const VTreeview = genericComponent()({
|
|
30267
30756
|
name: 'VTreeview',
|
|
@@ -30276,7 +30765,8 @@
|
|
|
30276
30765
|
},
|
|
30277
30766
|
setup(props, _ref) {
|
|
30278
30767
|
let {
|
|
30279
|
-
slots
|
|
30768
|
+
slots,
|
|
30769
|
+
emit
|
|
30280
30770
|
} = _ref;
|
|
30281
30771
|
const {
|
|
30282
30772
|
items
|
|
@@ -30285,13 +30775,12 @@
|
|
|
30285
30775
|
const baseColor = vue.toRef(() => props.baseColor);
|
|
30286
30776
|
const color = vue.toRef(() => props.color);
|
|
30287
30777
|
const activated = useProxiedModel(props, 'activated');
|
|
30288
|
-
const
|
|
30289
|
-
const _selected = useProxiedModel(props, 'selected', props.modelValue);
|
|
30778
|
+
const _selected = useProxiedModel(props, 'selected');
|
|
30290
30779
|
const selected = vue.computed({
|
|
30291
|
-
get: () => _selected.value,
|
|
30780
|
+
get: () => props.modelValue ?? _selected.value,
|
|
30292
30781
|
set(val) {
|
|
30293
30782
|
_selected.value = val;
|
|
30294
|
-
|
|
30783
|
+
emit('update:modelValue', val);
|
|
30295
30784
|
}
|
|
30296
30785
|
});
|
|
30297
30786
|
const vListRef = vue.ref();
|
|
@@ -30357,6 +30846,7 @@
|
|
|
30357
30846
|
useRender(() => {
|
|
30358
30847
|
const listProps = VList.filterProps(props);
|
|
30359
30848
|
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
|
30849
|
+
const indentLinesVariant = typeof props.indentLines === 'boolean' ? 'default' : props.indentLines;
|
|
30360
30850
|
return vue.createVNode(VList, vue.mergeProps({
|
|
30361
30851
|
"ref": vListRef
|
|
30362
30852
|
}, listProps, {
|
|
@@ -30374,7 +30864,9 @@
|
|
|
30374
30864
|
default: () => [vue.createVNode(VTreeviewChildren, vue.mergeProps(treeviewChildrenProps, {
|
|
30375
30865
|
"density": props.density,
|
|
30376
30866
|
"returnObject": props.returnObject,
|
|
30377
|
-
"items": items.value
|
|
30867
|
+
"items": items.value,
|
|
30868
|
+
"parentIndentLines": props.indentLines ? [] : undefined,
|
|
30869
|
+
"indentLinesVariant": indentLinesVariant
|
|
30378
30870
|
}), slots)]
|
|
30379
30871
|
});
|
|
30380
30872
|
});
|
|
@@ -30894,7 +31386,7 @@
|
|
|
30894
31386
|
};
|
|
30895
31387
|
});
|
|
30896
31388
|
}
|
|
30897
|
-
const version$1 = "3.9.0
|
|
31389
|
+
const version$1 = "3.9.0";
|
|
30898
31390
|
createVuetify$1.version = version$1;
|
|
30899
31391
|
|
|
30900
31392
|
// Vue's inject() can only be used in setup
|
|
@@ -30919,7 +31411,7 @@
|
|
|
30919
31411
|
...options
|
|
30920
31412
|
});
|
|
30921
31413
|
};
|
|
30922
|
-
const version = "3.9.0
|
|
31414
|
+
const version = "3.9.0";
|
|
30923
31415
|
createVuetify.version = version;
|
|
30924
31416
|
|
|
30925
31417
|
exports.blueprints = index;
|
|
@@ -30930,6 +31422,7 @@
|
|
|
30930
31422
|
exports.useDefaults = useDefaults;
|
|
30931
31423
|
exports.useDisplay = useDisplay;
|
|
30932
31424
|
exports.useGoTo = useGoTo;
|
|
31425
|
+
exports.useHotkey = useHotkey;
|
|
30933
31426
|
exports.useLayout = useLayout;
|
|
30934
31427
|
exports.useLocale = useLocale;
|
|
30935
31428
|
exports.useRtl = useRtl;
|