vuetify 3.9.0-beta.1 → 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 +3362 -3274
- package/dist/json/importMap-labs.json +20 -16
- package/dist/json/importMap.json +158 -158
- package/dist/json/tags.json +31 -4
- package/dist/json/web-types.json +6150 -5916
- package/dist/vuetify-labs.cjs +1035 -151
- package/dist/vuetify-labs.css +5736 -5417
- package/dist/vuetify-labs.d.ts +708 -377
- package/dist/vuetify-labs.esm.js +1035 -152
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1035 -151
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +616 -126
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3902 -3825
- package/dist/vuetify.d.ts +338 -233
- package/dist/vuetify.esm.js +616 -127
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +616 -126
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1176 -1120
- 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/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/VDatePickerMonth.js +1 -2
- package/lib/components/VDatePicker/VDatePickerMonth.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 +0 -4
- 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/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/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 +81 -10
- package/lib/components/VTreeview/VTreeviewChildren.js +50 -11
- 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 +137 -103
- package/lib/components/VTreeview/VTreeviewItem.js +14 -4
- 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 +0 -1
- package/lib/composables/calendar.js +6 -10
- 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 +16 -6
- 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 +79 -54
- 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/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.esm.js
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
|
*/
|
|
@@ -469,6 +469,10 @@ function ensureValidVNode(vnodes) {
|
|
|
469
469
|
return child.type !== Fragment || ensureValidVNode(child.children);
|
|
470
470
|
}) ? vnodes : null;
|
|
471
471
|
}
|
|
472
|
+
function renderSlot(slot, props, fallback) {
|
|
473
|
+
// TODO: check if slot returns elements: #18308
|
|
474
|
+
return slot?.(props) ?? fallback?.(props);
|
|
475
|
+
}
|
|
472
476
|
function defer(timeout, cb) {
|
|
473
477
|
if (!IN_BROWSER || timeout === 0) {
|
|
474
478
|
cb();
|
|
@@ -1614,6 +1618,40 @@ function isPotentiallyScrollable(el) {
|
|
|
1614
1618
|
return ['scroll', 'auto'].includes(style.overflowY);
|
|
1615
1619
|
}
|
|
1616
1620
|
|
|
1621
|
+
// Types
|
|
1622
|
+
|
|
1623
|
+
function getIndentLines(_ref) {
|
|
1624
|
+
let {
|
|
1625
|
+
depth,
|
|
1626
|
+
isLast,
|
|
1627
|
+
isLastGroup,
|
|
1628
|
+
leafLinks,
|
|
1629
|
+
separateRoots,
|
|
1630
|
+
parentIndentLines,
|
|
1631
|
+
variant
|
|
1632
|
+
} = _ref;
|
|
1633
|
+
if (!parentIndentLines || !depth) {
|
|
1634
|
+
return {
|
|
1635
|
+
leaf: undefined,
|
|
1636
|
+
node: undefined,
|
|
1637
|
+
children: parentIndentLines
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
if (variant === 'simple') {
|
|
1641
|
+
return {
|
|
1642
|
+
leaf: [...parentIndentLines, 'line'],
|
|
1643
|
+
node: [...parentIndentLines, 'line'],
|
|
1644
|
+
children: [...parentIndentLines, 'line']
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
const isLastLeaf = isLast && (!isLastGroup || separateRoots || depth > 1);
|
|
1648
|
+
return {
|
|
1649
|
+
leaf: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf', ...(leafLinks ? ['leaf-link'] : [])],
|
|
1650
|
+
node: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf'],
|
|
1651
|
+
children: [...parentIndentLines, isLastLeaf ? 'none' : 'line']
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1617
1655
|
function isFixedPosition(el) {
|
|
1618
1656
|
while (el) {
|
|
1619
1657
|
if (window.getComputedStyle(el).position === 'fixed') {
|
|
@@ -1832,7 +1870,18 @@ const aliases = {
|
|
|
1832
1870
|
treeviewExpand: 'mdi-menu-right',
|
|
1833
1871
|
eyeDropper: 'mdi-eyedropper',
|
|
1834
1872
|
upload: 'mdi-cloud-upload',
|
|
1835
|
-
color: 'mdi-palette'
|
|
1873
|
+
color: 'mdi-palette',
|
|
1874
|
+
command: 'mdi-apple-keyboard-command',
|
|
1875
|
+
ctrl: 'mdi-apple-keyboard-control',
|
|
1876
|
+
space: 'mdi-keyboard-space',
|
|
1877
|
+
shift: 'mdi-apple-keyboard-shift',
|
|
1878
|
+
alt: 'mdi-apple-keyboard-option',
|
|
1879
|
+
enter: 'mdi-keyboard-return',
|
|
1880
|
+
arrowup: 'mdi-arrow-up',
|
|
1881
|
+
arrowdown: 'mdi-arrow-down',
|
|
1882
|
+
arrowleft: 'mdi-arrow-left',
|
|
1883
|
+
arrowright: 'mdi-arrow-right',
|
|
1884
|
+
backspace: 'mdi-backspace'
|
|
1836
1885
|
};
|
|
1837
1886
|
const mdi = {
|
|
1838
1887
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -2628,6 +2677,24 @@ var en = {
|
|
|
2628
2677
|
exclude: 'The {0} character is not allowed',
|
|
2629
2678
|
notEmpty: 'Please choose at least one value',
|
|
2630
2679
|
pattern: 'Invalid format'
|
|
2680
|
+
},
|
|
2681
|
+
hotkey: {
|
|
2682
|
+
then: 'then',
|
|
2683
|
+
ctrl: 'Ctrl',
|
|
2684
|
+
command: 'Command',
|
|
2685
|
+
space: 'Space',
|
|
2686
|
+
shift: 'Shift',
|
|
2687
|
+
alt: 'Alt',
|
|
2688
|
+
enter: 'Enter',
|
|
2689
|
+
escape: 'Escape',
|
|
2690
|
+
upArrow: 'Up Arrow',
|
|
2691
|
+
downArrow: 'Down Arrow',
|
|
2692
|
+
leftArrow: 'Left Arrow',
|
|
2693
|
+
rightArrow: 'Right Arrow',
|
|
2694
|
+
backspace: 'Backspace',
|
|
2695
|
+
option: 'Option',
|
|
2696
|
+
plus: 'plus',
|
|
2697
|
+
shortcut: 'Keyboard shortcut: {0}'
|
|
2631
2698
|
}
|
|
2632
2699
|
};
|
|
2633
2700
|
|
|
@@ -9071,7 +9138,7 @@ const independentSelectStrategy = mandatory => {
|
|
|
9071
9138
|
selected.set(id, value ? 'on' : 'off');
|
|
9072
9139
|
return selected;
|
|
9073
9140
|
},
|
|
9074
|
-
in: (v, children, parents) => {
|
|
9141
|
+
in: (v, children, parents, disabled) => {
|
|
9075
9142
|
const map = new Map();
|
|
9076
9143
|
for (const id of v || []) {
|
|
9077
9144
|
strategy.select({
|
|
@@ -9079,7 +9146,8 @@ const independentSelectStrategy = mandatory => {
|
|
|
9079
9146
|
value: true,
|
|
9080
9147
|
selected: map,
|
|
9081
9148
|
children,
|
|
9082
|
-
parents
|
|
9149
|
+
parents,
|
|
9150
|
+
disabled
|
|
9083
9151
|
});
|
|
9084
9152
|
}
|
|
9085
9153
|
return map;
|
|
@@ -9111,9 +9179,9 @@ const independentSingleSelectStrategy = mandatory => {
|
|
|
9111
9179
|
selected: singleSelected
|
|
9112
9180
|
});
|
|
9113
9181
|
},
|
|
9114
|
-
in: (v, children, parents) => {
|
|
9182
|
+
in: (v, children, parents, disabled) => {
|
|
9115
9183
|
if (v?.length) {
|
|
9116
|
-
return parentStrategy.in(v.slice(0, 1), children, parents);
|
|
9184
|
+
return parentStrategy.in(v.slice(0, 1), children, parents, disabled);
|
|
9117
9185
|
}
|
|
9118
9186
|
return new Map();
|
|
9119
9187
|
},
|
|
@@ -9179,23 +9247,32 @@ const classicSelectStrategy = mandatory => {
|
|
|
9179
9247
|
value,
|
|
9180
9248
|
selected,
|
|
9181
9249
|
children,
|
|
9182
|
-
parents
|
|
9250
|
+
parents,
|
|
9251
|
+
disabled
|
|
9183
9252
|
} = _ref6;
|
|
9184
9253
|
id = toRaw(id);
|
|
9185
9254
|
const original = new Map(selected);
|
|
9186
9255
|
const items = [id];
|
|
9187
9256
|
while (items.length) {
|
|
9188
9257
|
const item = items.shift();
|
|
9189
|
-
|
|
9258
|
+
if (!disabled.has(item)) {
|
|
9259
|
+
selected.set(toRaw(item), value ? 'on' : 'off');
|
|
9260
|
+
}
|
|
9190
9261
|
if (children.has(item)) {
|
|
9191
9262
|
items.push(...children.get(item));
|
|
9192
9263
|
}
|
|
9193
9264
|
}
|
|
9194
9265
|
let parent = toRaw(parents.get(id));
|
|
9195
9266
|
while (parent) {
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9267
|
+
let everySelected = true;
|
|
9268
|
+
let noneSelected = true;
|
|
9269
|
+
for (const child of children.get(parent)) {
|
|
9270
|
+
const cid = toRaw(child);
|
|
9271
|
+
if (disabled.has(cid)) continue;
|
|
9272
|
+
if (selected.get(cid) !== 'on') everySelected = false;
|
|
9273
|
+
if (selected.has(cid) && selected.get(cid) !== 'off') noneSelected = false;
|
|
9274
|
+
if (!everySelected && !noneSelected) break;
|
|
9275
|
+
}
|
|
9199
9276
|
selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate');
|
|
9200
9277
|
parent = toRaw(parents.get(parent));
|
|
9201
9278
|
}
|
|
@@ -9212,7 +9289,7 @@ const classicSelectStrategy = mandatory => {
|
|
|
9212
9289
|
}
|
|
9213
9290
|
return selected;
|
|
9214
9291
|
},
|
|
9215
|
-
in: (v, children, parents) => {
|
|
9292
|
+
in: (v, children, parents, disabled) => {
|
|
9216
9293
|
let map = new Map();
|
|
9217
9294
|
for (const id of v || []) {
|
|
9218
9295
|
map = strategy.select({
|
|
@@ -9220,7 +9297,8 @@ const classicSelectStrategy = mandatory => {
|
|
|
9220
9297
|
value: true,
|
|
9221
9298
|
selected: map,
|
|
9222
9299
|
children,
|
|
9223
|
-
parents
|
|
9300
|
+
parents,
|
|
9301
|
+
disabled
|
|
9224
9302
|
});
|
|
9225
9303
|
}
|
|
9226
9304
|
return map;
|
|
@@ -9267,8 +9345,9 @@ const emptyNested = {
|
|
|
9267
9345
|
root: {
|
|
9268
9346
|
register: () => null,
|
|
9269
9347
|
unregister: () => null,
|
|
9270
|
-
parents: ref(new Map()),
|
|
9271
9348
|
children: ref(new Map()),
|
|
9349
|
+
parents: ref(new Map()),
|
|
9350
|
+
disabled: ref(new Set()),
|
|
9272
9351
|
open: () => null,
|
|
9273
9352
|
openOnSelect: () => null,
|
|
9274
9353
|
activate: () => null,
|
|
@@ -9297,6 +9376,7 @@ const useNested = props => {
|
|
|
9297
9376
|
let isUnmounted = false;
|
|
9298
9377
|
const children = shallowRef(new Map());
|
|
9299
9378
|
const parents = shallowRef(new Map());
|
|
9379
|
+
const disabled = shallowRef(new Set());
|
|
9300
9380
|
const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(Array.isArray(v) ? v.map(i => toRaw(i)) : v), v => [...v.values()]);
|
|
9301
9381
|
const activeStrategy = computed(() => {
|
|
9302
9382
|
if (typeof props.activeStrategy === 'object') return props.activeStrategy;
|
|
@@ -9345,7 +9425,7 @@ const useNested = props => {
|
|
|
9345
9425
|
}
|
|
9346
9426
|
});
|
|
9347
9427
|
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));
|
|
9348
|
-
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));
|
|
9428
|
+
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));
|
|
9349
9429
|
onBeforeUnmount(() => {
|
|
9350
9430
|
isUnmounted = true;
|
|
9351
9431
|
});
|
|
@@ -9375,7 +9455,7 @@ const useNested = props => {
|
|
|
9375
9455
|
}
|
|
9376
9456
|
return arr;
|
|
9377
9457
|
}),
|
|
9378
|
-
register: (id, parentId, isGroup) => {
|
|
9458
|
+
register: (id, parentId, isDisabled, isGroup) => {
|
|
9379
9459
|
if (nodeIds.has(id)) {
|
|
9380
9460
|
const path = getPath(id).map(String).join(' -> ');
|
|
9381
9461
|
const newPath = getPath(parentId).concat(id).map(String).join(' -> ');
|
|
@@ -9385,6 +9465,7 @@ const useNested = props => {
|
|
|
9385
9465
|
nodeIds.add(id);
|
|
9386
9466
|
}
|
|
9387
9467
|
parentId && id !== parentId && parents.value.set(id, parentId);
|
|
9468
|
+
isDisabled && disabled.value.add(id);
|
|
9388
9469
|
isGroup && children.value.set(id, []);
|
|
9389
9470
|
if (parentId != null) {
|
|
9390
9471
|
children.value.set(parentId, [...(children.value.get(parentId) || []), id]);
|
|
@@ -9394,6 +9475,7 @@ const useNested = props => {
|
|
|
9394
9475
|
if (isUnmounted) return;
|
|
9395
9476
|
nodeIds.delete(id);
|
|
9396
9477
|
children.value.delete(id);
|
|
9478
|
+
disabled.value.delete(id);
|
|
9397
9479
|
const parent = parents.value.get(id);
|
|
9398
9480
|
if (parent) {
|
|
9399
9481
|
const list = children.value.get(parent) ?? [];
|
|
@@ -9443,6 +9525,7 @@ const useNested = props => {
|
|
|
9443
9525
|
selected: new Map(selected.value),
|
|
9444
9526
|
children: children.value,
|
|
9445
9527
|
parents: parents.value,
|
|
9528
|
+
disabled: disabled.value,
|
|
9446
9529
|
event
|
|
9447
9530
|
});
|
|
9448
9531
|
newSelected && (selected.value = newSelected);
|
|
@@ -9485,13 +9568,14 @@ const useNested = props => {
|
|
|
9485
9568
|
},
|
|
9486
9569
|
children,
|
|
9487
9570
|
parents,
|
|
9571
|
+
disabled,
|
|
9488
9572
|
getPath
|
|
9489
9573
|
}
|
|
9490
9574
|
};
|
|
9491
9575
|
provide(VNestedSymbol, nested);
|
|
9492
9576
|
return nested.root;
|
|
9493
9577
|
};
|
|
9494
|
-
const useNestedItem = (id, isGroup) => {
|
|
9578
|
+
const useNestedItem = (id, isDisabled, isGroup) => {
|
|
9495
9579
|
const parent = inject$1(VNestedSymbol, emptyNested);
|
|
9496
9580
|
const uidSymbol = Symbol('nested item');
|
|
9497
9581
|
const computedId = computed(() => toRaw(toValue(id)) ?? uidSymbol);
|
|
@@ -9511,10 +9595,14 @@ const useNestedItem = (id, isGroup) => {
|
|
|
9511
9595
|
isGroupActivator: parent.isGroupActivator
|
|
9512
9596
|
};
|
|
9513
9597
|
onBeforeMount(() => {
|
|
9514
|
-
!parent.isGroupActivator
|
|
9598
|
+
if (!parent.isGroupActivator) {
|
|
9599
|
+
parent.root.register(computedId.value, parent.id.value, toValue(isDisabled), isGroup);
|
|
9600
|
+
}
|
|
9515
9601
|
});
|
|
9516
9602
|
onBeforeUnmount(() => {
|
|
9517
|
-
!parent.isGroupActivator
|
|
9603
|
+
if (!parent.isGroupActivator) {
|
|
9604
|
+
parent.root.unregister(computedId.value);
|
|
9605
|
+
}
|
|
9518
9606
|
});
|
|
9519
9607
|
isGroup && provide(VNestedSymbol, item);
|
|
9520
9608
|
return item;
|
|
@@ -9546,6 +9634,7 @@ const makeVListGroupProps = propsFactory({
|
|
|
9546
9634
|
type: IconValue,
|
|
9547
9635
|
default: '$collapse'
|
|
9548
9636
|
},
|
|
9637
|
+
disabled: Boolean,
|
|
9549
9638
|
expandIcon: {
|
|
9550
9639
|
type: IconValue,
|
|
9551
9640
|
default: '$expand'
|
|
@@ -9571,7 +9660,7 @@ const VListGroup = genericComponent()({
|
|
|
9571
9660
|
isOpen,
|
|
9572
9661
|
open,
|
|
9573
9662
|
id: _id
|
|
9574
|
-
} = useNestedItem(() => props.value, true);
|
|
9663
|
+
} = useNestedItem(() => props.value, () => props.disabled, true);
|
|
9575
9664
|
const id = computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
|
|
9576
9665
|
const list = useList();
|
|
9577
9666
|
const {
|
|
@@ -9741,7 +9830,7 @@ const VListItem = genericComponent()({
|
|
|
9741
9830
|
parent,
|
|
9742
9831
|
openOnSelect,
|
|
9743
9832
|
id: uid
|
|
9744
|
-
} = useNestedItem(id, false);
|
|
9833
|
+
} = useNestedItem(id, () => props.disabled, false);
|
|
9745
9834
|
const list = useList();
|
|
9746
9835
|
const isActive = computed(() => props.active !== false && (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value)));
|
|
9747
9836
|
const isLink = toRef(() => props.link !== false && link.isLink.value);
|
|
@@ -10093,6 +10182,10 @@ const makeItemsProps = propsFactory({
|
|
|
10093
10182
|
type: [Boolean, String, Array, Function],
|
|
10094
10183
|
default: 'props'
|
|
10095
10184
|
},
|
|
10185
|
+
itemType: {
|
|
10186
|
+
type: [Boolean, String, Array, Function],
|
|
10187
|
+
default: 'type'
|
|
10188
|
+
},
|
|
10096
10189
|
returnObject: Boolean,
|
|
10097
10190
|
valueComparator: Function
|
|
10098
10191
|
}, 'list-items');
|
|
@@ -10100,6 +10193,7 @@ function transformItem$3(props, item) {
|
|
|
10100
10193
|
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
10101
10194
|
const value = getPropertyFromItem(item, props.itemValue, title);
|
|
10102
10195
|
const children = getPropertyFromItem(item, props.itemChildren);
|
|
10196
|
+
const type = getPropertyFromItem(item, props.itemType, 'item');
|
|
10103
10197
|
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);
|
|
10104
10198
|
const _props = {
|
|
10105
10199
|
title,
|
|
@@ -10107,15 +10201,16 @@ function transformItem$3(props, item) {
|
|
|
10107
10201
|
...itemProps
|
|
10108
10202
|
};
|
|
10109
10203
|
return {
|
|
10204
|
+
type,
|
|
10110
10205
|
title: String(_props.title ?? ''),
|
|
10111
10206
|
value: _props.value,
|
|
10112
10207
|
props: _props,
|
|
10113
|
-
children: Array.isArray(children) ? transformItems$3(props, children) : undefined,
|
|
10208
|
+
children: type === 'item' && Array.isArray(children) ? transformItems$3(props, children) : undefined,
|
|
10114
10209
|
raw: item
|
|
10115
10210
|
};
|
|
10116
10211
|
}
|
|
10117
10212
|
function transformItems$3(props, items) {
|
|
10118
|
-
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
|
|
10213
|
+
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'itemType', 'returnObject', 'valueComparator']);
|
|
10119
10214
|
const array = [];
|
|
10120
10215
|
for (const item of items) {
|
|
10121
10216
|
array.push(transformItem$3(_props, item));
|
|
@@ -10157,7 +10252,7 @@ function useItems(props) {
|
|
|
10157
10252
|
const _returnObject = props.returnObject;
|
|
10158
10253
|
const hasValueComparator = !!props.valueComparator;
|
|
10159
10254
|
const valueComparator = props.valueComparator || deepEqual;
|
|
10160
|
-
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
|
|
10255
|
+
const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'itemType', 'returnObject', 'valueComparator']);
|
|
10161
10256
|
const returnValue = [];
|
|
10162
10257
|
main: for (const v of value) {
|
|
10163
10258
|
// When the model value is null, return an InternalItem
|
|
@@ -10277,10 +10372,6 @@ const makeVListProps = propsFactory({
|
|
|
10277
10372
|
...makeDensityProps(),
|
|
10278
10373
|
...makeDimensionProps(),
|
|
10279
10374
|
...makeElevationProps(),
|
|
10280
|
-
itemType: {
|
|
10281
|
-
type: String,
|
|
10282
|
-
default: 'type'
|
|
10283
|
-
},
|
|
10284
10375
|
...makeItemsProps(),
|
|
10285
10376
|
...makeRoundedProps(),
|
|
10286
10377
|
...makeTagProps(),
|
|
@@ -10701,7 +10792,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
10701
10792
|
});
|
|
10702
10793
|
if (flipped.isFull) {
|
|
10703
10794
|
const values = flipped.values();
|
|
10704
|
-
if (deepEqual(values.at(-1), values.at(-3))) {
|
|
10795
|
+
if (deepEqual(values.at(-1), values.at(-3)) && !deepEqual(values.at(-1), values.at(-2))) {
|
|
10705
10796
|
// Flipping is causing a container resize loop
|
|
10706
10797
|
return;
|
|
10707
10798
|
}
|
|
@@ -12551,7 +12642,7 @@ const VTextField = genericComponent()({
|
|
|
12551
12642
|
if (!isFocused.value) focus();
|
|
12552
12643
|
nextTick(() => {
|
|
12553
12644
|
if (inputRef.value !== document.activeElement) {
|
|
12554
|
-
inputRef.value?.focus();
|
|
12645
|
+
nextTick(() => inputRef.value?.focus());
|
|
12555
12646
|
}
|
|
12556
12647
|
});
|
|
12557
12648
|
}
|
|
@@ -12890,7 +12981,7 @@ function useVirtual(props, items) {
|
|
|
12890
12981
|
raf = requestAnimationFrame(_calculateVisibleItems);
|
|
12891
12982
|
}
|
|
12892
12983
|
function _calculateVisibleItems() {
|
|
12893
|
-
if (!containerRef.value || !viewportHeight.value) return;
|
|
12984
|
+
if (!containerRef.value || !viewportHeight.value || !itemHeight.value) return;
|
|
12894
12985
|
const scrollTop = lastScrollTop - markerOffset;
|
|
12895
12986
|
const direction = Math.sign(scrollVelocity);
|
|
12896
12987
|
const startPx = Math.max(0, scrollTop - BUFFER_PX);
|
|
@@ -13499,7 +13590,7 @@ const VSelect = genericComponent()({
|
|
|
13499
13590
|
key: item.value,
|
|
13500
13591
|
onClick: () => select(item, null)
|
|
13501
13592
|
});
|
|
13502
|
-
if (item.
|
|
13593
|
+
if (item.type === 'divider') {
|
|
13503
13594
|
return slots.divider?.({
|
|
13504
13595
|
props: item.raw,
|
|
13505
13596
|
index
|
|
@@ -13507,7 +13598,7 @@ const VSelect = genericComponent()({
|
|
|
13507
13598
|
"key": `divider-${index}`
|
|
13508
13599
|
}), null);
|
|
13509
13600
|
}
|
|
13510
|
-
if (item.
|
|
13601
|
+
if (item.type === 'subheader') {
|
|
13511
13602
|
return slots.subheader?.({
|
|
13512
13603
|
props: item.raw,
|
|
13513
13604
|
index
|
|
@@ -13675,7 +13766,7 @@ function filterItems(items, query, options) {
|
|
|
13675
13766
|
let match = -1;
|
|
13676
13767
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
|
13677
13768
|
if (typeof item === 'object') {
|
|
13678
|
-
if (
|
|
13769
|
+
if (item.type === 'divider' || item.type === 'subheader') {
|
|
13679
13770
|
continue;
|
|
13680
13771
|
}
|
|
13681
13772
|
const filterKeys = keys || Object.keys(transformed);
|
|
@@ -14117,7 +14208,7 @@ const VAutocomplete = genericComponent()({
|
|
|
14117
14208
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
14118
14209
|
onClick: () => select(item, null)
|
|
14119
14210
|
});
|
|
14120
|
-
if (item.
|
|
14211
|
+
if (item.type === 'divider') {
|
|
14121
14212
|
return slots.divider?.({
|
|
14122
14213
|
props: item.raw,
|
|
14123
14214
|
index
|
|
@@ -14125,7 +14216,7 @@ const VAutocomplete = genericComponent()({
|
|
|
14125
14216
|
"key": `divider-${index}`
|
|
14126
14217
|
}), null);
|
|
14127
14218
|
}
|
|
14128
|
-
if (item.
|
|
14219
|
+
if (item.type === 'subheader') {
|
|
14129
14220
|
return slots.subheader?.({
|
|
14130
14221
|
props: item.raw,
|
|
14131
14222
|
index
|
|
@@ -17773,7 +17864,7 @@ function format(value, formatString, locale, formats) {
|
|
|
17773
17864
|
case 'fullDate':
|
|
17774
17865
|
options = {
|
|
17775
17866
|
year: 'numeric',
|
|
17776
|
-
month: '
|
|
17867
|
+
month: 'short',
|
|
17777
17868
|
day: 'numeric'
|
|
17778
17869
|
};
|
|
17779
17870
|
break;
|
|
@@ -18351,6 +18442,317 @@ function useDate() {
|
|
|
18351
18442
|
return createInstance(options, locale);
|
|
18352
18443
|
}
|
|
18353
18444
|
|
|
18445
|
+
/**
|
|
18446
|
+
* Centralized key alias mapping for consistent key normalization across the hotkey system.
|
|
18447
|
+
*
|
|
18448
|
+
* This maps various user-friendly aliases to canonical key names that match
|
|
18449
|
+
* KeyboardEvent.key values (in lowercase) where possible.
|
|
18450
|
+
*/
|
|
18451
|
+
const keyAliasMap = {
|
|
18452
|
+
// Modifier aliases (from vue-use, other libraries, and current implementation)
|
|
18453
|
+
control: 'ctrl',
|
|
18454
|
+
command: 'cmd',
|
|
18455
|
+
option: 'alt',
|
|
18456
|
+
// Arrow key aliases (common abbreviations)
|
|
18457
|
+
up: 'arrowup',
|
|
18458
|
+
down: 'arrowdown',
|
|
18459
|
+
left: 'arrowleft',
|
|
18460
|
+
right: 'arrowright',
|
|
18461
|
+
// Other common key aliases
|
|
18462
|
+
esc: 'escape',
|
|
18463
|
+
spacebar: ' ',
|
|
18464
|
+
space: ' ',
|
|
18465
|
+
return: 'enter',
|
|
18466
|
+
del: 'delete',
|
|
18467
|
+
// Symbol aliases (existing from hotkey-parsing.ts)
|
|
18468
|
+
minus: '-',
|
|
18469
|
+
hyphen: '-'
|
|
18470
|
+
};
|
|
18471
|
+
|
|
18472
|
+
/**
|
|
18473
|
+
* Normalizes a key string to its canonical form using the alias map.
|
|
18474
|
+
*
|
|
18475
|
+
* @param key - The key string to normalize
|
|
18476
|
+
* @returns The canonical key name in lowercase
|
|
18477
|
+
*/
|
|
18478
|
+
function normalizeKey(key) {
|
|
18479
|
+
const lowerKey = key.toLowerCase();
|
|
18480
|
+
return keyAliasMap[lowerKey] || lowerKey;
|
|
18481
|
+
}
|
|
18482
|
+
|
|
18483
|
+
// Utilities
|
|
18484
|
+
|
|
18485
|
+
/**
|
|
18486
|
+
* Splits a single combination string into individual key parts.
|
|
18487
|
+
*
|
|
18488
|
+
* A combination is a set of keys that must be pressed simultaneously.
|
|
18489
|
+
* e.g. `ctrl+k`, `shift--`
|
|
18490
|
+
*/
|
|
18491
|
+
function splitKeyCombination(combination) {
|
|
18492
|
+
let isInternal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
18493
|
+
if (!combination) {
|
|
18494
|
+
if (!isInternal) consoleWarn('Invalid hotkey combination: empty string provided');
|
|
18495
|
+
return [];
|
|
18496
|
+
}
|
|
18497
|
+
|
|
18498
|
+
// --- VALIDATION ---
|
|
18499
|
+
const startsWithPlusOrUnderscore = combination.startsWith('+') || combination.startsWith('_');
|
|
18500
|
+
const hasInvalidLeadingSeparator =
|
|
18501
|
+
// Starts with a single '+' or '_' followed by a non-separator character (e.g. '+a', '_a')
|
|
18502
|
+
startsWithPlusOrUnderscore && !(combination.startsWith('++') || combination.startsWith('__'));
|
|
18503
|
+
const hasInvalidStructure =
|
|
18504
|
+
// Invalid leading separator patterns
|
|
18505
|
+
combination.length > 1 && hasInvalidLeadingSeparator ||
|
|
18506
|
+
// Disallow literal + or _ keys (they require shift)
|
|
18507
|
+
combination.includes('++') || combination.includes('__') || combination === '+' || combination === '_' ||
|
|
18508
|
+
// Ends with a separator that is not part of a doubled literal
|
|
18509
|
+
combination.length > 1 && (combination.endsWith('+') || combination.endsWith('_')) && combination.at(-2) !== combination.at(-1) ||
|
|
18510
|
+
// Stand-alone doubled separators (dangling)
|
|
18511
|
+
combination === '++' || combination === '--' || combination === '__';
|
|
18512
|
+
if (hasInvalidStructure) {
|
|
18513
|
+
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
18514
|
+
return [];
|
|
18515
|
+
}
|
|
18516
|
+
const keys = [];
|
|
18517
|
+
let buffer = '';
|
|
18518
|
+
const flushBuffer = () => {
|
|
18519
|
+
if (buffer) {
|
|
18520
|
+
keys.push(normalizeKey(buffer));
|
|
18521
|
+
buffer = '';
|
|
18522
|
+
}
|
|
18523
|
+
};
|
|
18524
|
+
for (let i = 0; i < combination.length; i++) {
|
|
18525
|
+
const char = combination[i];
|
|
18526
|
+
const nextChar = combination[i + 1];
|
|
18527
|
+
if (char === '+' || char === '_' || char === '-') {
|
|
18528
|
+
if (char === nextChar) {
|
|
18529
|
+
flushBuffer();
|
|
18530
|
+
keys.push(char);
|
|
18531
|
+
i++;
|
|
18532
|
+
} else if (char === '+' || char === '_') {
|
|
18533
|
+
flushBuffer();
|
|
18534
|
+
} else {
|
|
18535
|
+
buffer += char;
|
|
18536
|
+
}
|
|
18537
|
+
} else {
|
|
18538
|
+
buffer += char;
|
|
18539
|
+
}
|
|
18540
|
+
}
|
|
18541
|
+
flushBuffer();
|
|
18542
|
+
|
|
18543
|
+
// Within a combination, `-` is only valid as a literal key (e.g., `ctrl+-`).
|
|
18544
|
+
// `-` cannot be part of a longer key name within a combination.
|
|
18545
|
+
const hasInvalidMinus = keys.some(key => key.length > 1 && key.includes('-') && key !== '--');
|
|
18546
|
+
if (hasInvalidMinus) {
|
|
18547
|
+
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
18548
|
+
return [];
|
|
18549
|
+
}
|
|
18550
|
+
if (keys.length === 0 && combination) {
|
|
18551
|
+
return [normalizeKey(combination)];
|
|
18552
|
+
}
|
|
18553
|
+
return keys;
|
|
18554
|
+
}
|
|
18555
|
+
|
|
18556
|
+
/**
|
|
18557
|
+
* Splits a hotkey string into its constituent combination groups.
|
|
18558
|
+
*
|
|
18559
|
+
* A sequence is a series of combinations that must be pressed in order.
|
|
18560
|
+
* e.g. `a-b`, `ctrl+k-p`
|
|
18561
|
+
*/
|
|
18562
|
+
function splitKeySequence(str) {
|
|
18563
|
+
if (!str) {
|
|
18564
|
+
consoleWarn('Invalid hotkey sequence: empty string provided');
|
|
18565
|
+
return [];
|
|
18566
|
+
}
|
|
18567
|
+
|
|
18568
|
+
// A sequence is invalid if it starts or ends with a separator,
|
|
18569
|
+
// unless it is part of a combination (e.g., `shift+-`).
|
|
18570
|
+
const hasInvalidStart = str.startsWith('-') && !['---', '--+'].includes(str);
|
|
18571
|
+
const hasInvalidEnd = str.endsWith('-') && !str.endsWith('+-') && !str.endsWith('_-') && str !== '-' && str !== '---';
|
|
18572
|
+
if (hasInvalidStart || hasInvalidEnd) {
|
|
18573
|
+
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
18574
|
+
return [];
|
|
18575
|
+
}
|
|
18576
|
+
const result = [];
|
|
18577
|
+
let buffer = '';
|
|
18578
|
+
let i = 0;
|
|
18579
|
+
while (i < str.length) {
|
|
18580
|
+
const char = str[i];
|
|
18581
|
+
if (char === '-') {
|
|
18582
|
+
// Determine if this hyphen is part of the current combination
|
|
18583
|
+
const prevChar = str[i - 1];
|
|
18584
|
+
const prevPrevChar = i > 1 ? str[i - 2] : undefined;
|
|
18585
|
+
const precededBySinglePlusOrUnderscore = (prevChar === '+' || prevChar === '_') && prevPrevChar !== '+';
|
|
18586
|
+
if (precededBySinglePlusOrUnderscore) {
|
|
18587
|
+
// Treat as part of the combination (e.g., 'ctrl+-')
|
|
18588
|
+
buffer += char;
|
|
18589
|
+
i++;
|
|
18590
|
+
} else {
|
|
18591
|
+
// Treat as sequence separator
|
|
18592
|
+
if (buffer) {
|
|
18593
|
+
result.push(buffer);
|
|
18594
|
+
buffer = '';
|
|
18595
|
+
} else {
|
|
18596
|
+
// Empty buffer means we have a literal '-' key
|
|
18597
|
+
result.push('-');
|
|
18598
|
+
}
|
|
18599
|
+
i++;
|
|
18600
|
+
}
|
|
18601
|
+
} else {
|
|
18602
|
+
buffer += char;
|
|
18603
|
+
i++;
|
|
18604
|
+
}
|
|
18605
|
+
}
|
|
18606
|
+
|
|
18607
|
+
// Add final buffer if it exists
|
|
18608
|
+
if (buffer) {
|
|
18609
|
+
result.push(buffer);
|
|
18610
|
+
}
|
|
18611
|
+
|
|
18612
|
+
// Collapse runs of '-' so that every second '-' is removed
|
|
18613
|
+
const collapsed = [];
|
|
18614
|
+
let minusCount = 0;
|
|
18615
|
+
for (const part of result) {
|
|
18616
|
+
if (part === '-') {
|
|
18617
|
+
if (minusCount % 2 === 0) collapsed.push('-');
|
|
18618
|
+
minusCount++;
|
|
18619
|
+
} else {
|
|
18620
|
+
minusCount = 0;
|
|
18621
|
+
collapsed.push(part);
|
|
18622
|
+
}
|
|
18623
|
+
}
|
|
18624
|
+
|
|
18625
|
+
// Validate that each part of the sequence is a valid combination
|
|
18626
|
+
const areAllValid = collapsed.every(s => splitKeyCombination(s, true).length > 0);
|
|
18627
|
+
if (!areAllValid) {
|
|
18628
|
+
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
18629
|
+
return [];
|
|
18630
|
+
}
|
|
18631
|
+
return collapsed;
|
|
18632
|
+
}
|
|
18633
|
+
|
|
18634
|
+
// Composables
|
|
18635
|
+
|
|
18636
|
+
// Types
|
|
18637
|
+
|
|
18638
|
+
function useHotkey(keys, callback) {
|
|
18639
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
18640
|
+
if (!IN_BROWSER) return function () {};
|
|
18641
|
+
const {
|
|
18642
|
+
event = 'keydown',
|
|
18643
|
+
inputs = false,
|
|
18644
|
+
preventDefault = true,
|
|
18645
|
+
sequenceTimeout = 1000
|
|
18646
|
+
} = options;
|
|
18647
|
+
const isMac = navigator?.userAgent?.includes('Macintosh') ?? false;
|
|
18648
|
+
let timeout = 0;
|
|
18649
|
+
let keyGroups;
|
|
18650
|
+
let isSequence = false;
|
|
18651
|
+
let groupIndex = 0;
|
|
18652
|
+
function clearTimer() {
|
|
18653
|
+
if (!timeout) return;
|
|
18654
|
+
clearTimeout(timeout);
|
|
18655
|
+
timeout = 0;
|
|
18656
|
+
}
|
|
18657
|
+
function isInputFocused() {
|
|
18658
|
+
if (toValue(inputs)) return false;
|
|
18659
|
+
const activeElement = document.activeElement;
|
|
18660
|
+
return activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA' || activeElement.isContentEditable || activeElement.contentEditable === 'true');
|
|
18661
|
+
}
|
|
18662
|
+
function resetSequence() {
|
|
18663
|
+
groupIndex = 0;
|
|
18664
|
+
clearTimer();
|
|
18665
|
+
}
|
|
18666
|
+
function handler(e) {
|
|
18667
|
+
const group = keyGroups[groupIndex];
|
|
18668
|
+
if (!group || isInputFocused()) return;
|
|
18669
|
+
if (!matchesKeyGroup(e, group)) {
|
|
18670
|
+
if (isSequence) resetSequence();
|
|
18671
|
+
return;
|
|
18672
|
+
}
|
|
18673
|
+
if (toValue(preventDefault)) e.preventDefault();
|
|
18674
|
+
if (!isSequence) {
|
|
18675
|
+
callback(e);
|
|
18676
|
+
return;
|
|
18677
|
+
}
|
|
18678
|
+
clearTimer();
|
|
18679
|
+
groupIndex++;
|
|
18680
|
+
if (groupIndex === keyGroups.length) {
|
|
18681
|
+
callback(e);
|
|
18682
|
+
resetSequence();
|
|
18683
|
+
return;
|
|
18684
|
+
}
|
|
18685
|
+
timeout = window.setTimeout(resetSequence, toValue(sequenceTimeout));
|
|
18686
|
+
}
|
|
18687
|
+
function cleanup() {
|
|
18688
|
+
window.removeEventListener(toValue(event), handler);
|
|
18689
|
+
clearTimer();
|
|
18690
|
+
}
|
|
18691
|
+
watch(() => toValue(keys), function (unrefKeys) {
|
|
18692
|
+
cleanup();
|
|
18693
|
+
if (unrefKeys) {
|
|
18694
|
+
const groups = splitKeySequence(unrefKeys.toLowerCase());
|
|
18695
|
+
isSequence = groups.length > 1;
|
|
18696
|
+
keyGroups = groups;
|
|
18697
|
+
resetSequence();
|
|
18698
|
+
window.addEventListener(toValue(event), handler);
|
|
18699
|
+
}
|
|
18700
|
+
}, {
|
|
18701
|
+
immediate: true
|
|
18702
|
+
});
|
|
18703
|
+
|
|
18704
|
+
// Watch for changes in the event type to re-register the listener
|
|
18705
|
+
watch(() => toValue(event), function (newEvent, oldEvent) {
|
|
18706
|
+
if (oldEvent && keyGroups && keyGroups.length > 0) {
|
|
18707
|
+
window.removeEventListener(oldEvent, handler);
|
|
18708
|
+
window.addEventListener(newEvent, handler);
|
|
18709
|
+
}
|
|
18710
|
+
});
|
|
18711
|
+
try {
|
|
18712
|
+
getCurrentInstance('useHotkey');
|
|
18713
|
+
onBeforeUnmount(cleanup);
|
|
18714
|
+
} catch {
|
|
18715
|
+
// Not in Vue setup context
|
|
18716
|
+
}
|
|
18717
|
+
function parseKeyGroup(group) {
|
|
18718
|
+
const MODIFIERS = ['ctrl', 'shift', 'alt', 'meta', 'cmd'];
|
|
18719
|
+
|
|
18720
|
+
// Use the shared combination splitting logic
|
|
18721
|
+
const parts = splitKeyCombination(group.toLowerCase());
|
|
18722
|
+
|
|
18723
|
+
// If the combination is invalid, return empty result
|
|
18724
|
+
if (parts.length === 0) {
|
|
18725
|
+
return {
|
|
18726
|
+
modifiers: Object.fromEntries(MODIFIERS.map(m => [m, false])),
|
|
18727
|
+
actualKey: undefined
|
|
18728
|
+
};
|
|
18729
|
+
}
|
|
18730
|
+
const modifiers = Object.fromEntries(MODIFIERS.map(m => [m, false]));
|
|
18731
|
+
let actualKey;
|
|
18732
|
+
for (const part of parts) {
|
|
18733
|
+
if (MODIFIERS.includes(part)) {
|
|
18734
|
+
modifiers[part] = true;
|
|
18735
|
+
} else {
|
|
18736
|
+
actualKey = part;
|
|
18737
|
+
}
|
|
18738
|
+
}
|
|
18739
|
+
return {
|
|
18740
|
+
modifiers,
|
|
18741
|
+
actualKey
|
|
18742
|
+
};
|
|
18743
|
+
}
|
|
18744
|
+
function matchesKeyGroup(e, group) {
|
|
18745
|
+
const {
|
|
18746
|
+
modifiers,
|
|
18747
|
+
actualKey
|
|
18748
|
+
} = parseKeyGroup(group);
|
|
18749
|
+
const expectCtrl = modifiers.ctrl || !isMac && (modifiers.cmd || modifiers.meta);
|
|
18750
|
+
const expectMeta = isMac && (modifiers.cmd || modifiers.meta);
|
|
18751
|
+
return e.ctrlKey === expectCtrl && e.metaKey === expectMeta && e.shiftKey === modifiers.shift && e.altKey === modifiers.alt && e.key.toLowerCase() === actualKey?.toLowerCase();
|
|
18752
|
+
}
|
|
18753
|
+
return cleanup;
|
|
18754
|
+
}
|
|
18755
|
+
|
|
18354
18756
|
// Types
|
|
18355
18757
|
|
|
18356
18758
|
const makeVColorPickerProps = propsFactory({
|
|
@@ -18897,7 +19299,7 @@ const VCombobox = genericComponent()({
|
|
|
18897
19299
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
18898
19300
|
onClick: () => select(item, null)
|
|
18899
19301
|
});
|
|
18900
|
-
if (item.
|
|
19302
|
+
if (item.type === 'divider') {
|
|
18901
19303
|
return slots.divider?.({
|
|
18902
19304
|
props: item.raw,
|
|
18903
19305
|
index
|
|
@@ -18905,7 +19307,7 @@ const VCombobox = genericComponent()({
|
|
|
18905
19307
|
"key": `divider-${index}`
|
|
18906
19308
|
}), null);
|
|
18907
19309
|
}
|
|
18908
|
-
if (item.
|
|
19310
|
+
if (item.type === 'subheader') {
|
|
18909
19311
|
return slots.subheader?.({
|
|
18910
19312
|
props: item.raw,
|
|
18911
19313
|
index
|
|
@@ -19779,7 +20181,8 @@ function sortItems(items, sortByItems, locale, options) {
|
|
|
19779
20181
|
|
|
19780
20182
|
// Dates should be compared numerically
|
|
19781
20183
|
if (sortA instanceof Date && sortB instanceof Date) {
|
|
19782
|
-
|
|
20184
|
+
sortA = sortA.getTime();
|
|
20185
|
+
sortB = sortB.getTime();
|
|
19783
20186
|
}
|
|
19784
20187
|
[sortA, sortB] = [sortA, sortB].map(s => s != null ? s.toString().toLocaleLowerCase() : s);
|
|
19785
20188
|
if (sortA !== sortB) {
|
|
@@ -20488,10 +20891,15 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
20488
20891
|
type: String,
|
|
20489
20892
|
default: 'start'
|
|
20490
20893
|
},
|
|
20491
|
-
fixed:
|
|
20894
|
+
fixed: {
|
|
20895
|
+
type: [Boolean, String],
|
|
20896
|
+
default: false
|
|
20897
|
+
},
|
|
20492
20898
|
fixedOffset: [Number, String],
|
|
20899
|
+
fixedEndOffset: [Number, String],
|
|
20493
20900
|
height: [Number, String],
|
|
20494
20901
|
lastFixed: Boolean,
|
|
20902
|
+
firstFixedEnd: Boolean,
|
|
20495
20903
|
noPadding: Boolean,
|
|
20496
20904
|
tag: String,
|
|
20497
20905
|
width: [Number, String],
|
|
@@ -20502,11 +20910,13 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
20502
20910
|
slots
|
|
20503
20911
|
} = _ref;
|
|
20504
20912
|
const Tag = props.tag ?? 'td';
|
|
20913
|
+
const fixedSide = typeof props.fixed === 'string' ? props.fixed : props.fixed ? 'start' : 'none';
|
|
20505
20914
|
return createVNode(Tag, {
|
|
20506
|
-
"tabindex": "0",
|
|
20507
20915
|
"class": normalizeClass(['v-data-table__td', {
|
|
20508
|
-
'v-data-table-column--fixed':
|
|
20916
|
+
'v-data-table-column--fixed': fixedSide === 'start',
|
|
20917
|
+
'v-data-table-column--fixed-end': fixedSide === 'end',
|
|
20509
20918
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
20919
|
+
'v-data-table-column--first-fixed-end': props.firstFixedEnd,
|
|
20510
20920
|
'v-data-table-column--no-padding': props.noPadding,
|
|
20511
20921
|
'v-data-table-column--nowrap': props.nowrap
|
|
20512
20922
|
}, `v-data-table-column--align-${props.align}`]),
|
|
@@ -20514,7 +20924,8 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
20514
20924
|
height: convertToUnit(props.height),
|
|
20515
20925
|
width: convertToUnit(props.width),
|
|
20516
20926
|
maxWidth: convertToUnit(props.maxWidth),
|
|
20517
|
-
left: convertToUnit(props.fixedOffset || null)
|
|
20927
|
+
left: fixedSide === 'start' ? convertToUnit(props.fixedOffset || null) : undefined,
|
|
20928
|
+
right: fixedSide === 'end' ? convertToUnit(props.fixedEndOffset || null) : undefined
|
|
20518
20929
|
}
|
|
20519
20930
|
}, {
|
|
20520
20931
|
default: () => [slots.default?.()]
|
|
@@ -20611,20 +21022,28 @@ function getDepth(item) {
|
|
|
20611
21022
|
}
|
|
20612
21023
|
function parseFixedColumns(items) {
|
|
20613
21024
|
let seenFixed = false;
|
|
20614
|
-
function setFixed(item) {
|
|
20615
|
-
let
|
|
21025
|
+
function setFixed(item, side) {
|
|
21026
|
+
let parentFixedSide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'none';
|
|
20616
21027
|
if (!item) return;
|
|
20617
|
-
if (
|
|
20618
|
-
item.fixed =
|
|
21028
|
+
if (parentFixedSide !== 'none') {
|
|
21029
|
+
item.fixed = parentFixedSide;
|
|
20619
21030
|
}
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
21031
|
+
|
|
21032
|
+
// normalize to simplify logic below
|
|
21033
|
+
if (item.fixed === true) {
|
|
21034
|
+
item.fixed = 'start';
|
|
21035
|
+
}
|
|
21036
|
+
const orderedChildren = side === 'start' ? item.children?.toReversed() : item.children;
|
|
21037
|
+
if (item.fixed === side) {
|
|
21038
|
+
if (orderedChildren) {
|
|
21039
|
+
for (const child of orderedChildren) {
|
|
21040
|
+
setFixed(child, side, side);
|
|
20624
21041
|
}
|
|
20625
21042
|
} else {
|
|
20626
|
-
if (!seenFixed) {
|
|
21043
|
+
if (!seenFixed && side === 'start') {
|
|
20627
21044
|
item.lastFixed = true;
|
|
21045
|
+
} else if (!seenFixed && side === 'end') {
|
|
21046
|
+
item.firstFixedEnd = true;
|
|
20628
21047
|
} else if (isNaN(Number(item.width))) {
|
|
20629
21048
|
consoleError(`Multiple fixed columns should have a static width (key: ${item.key})`);
|
|
20630
21049
|
} else {
|
|
@@ -20633,36 +21052,57 @@ function parseFixedColumns(items) {
|
|
|
20633
21052
|
seenFixed = true;
|
|
20634
21053
|
}
|
|
20635
21054
|
} else {
|
|
20636
|
-
if (
|
|
20637
|
-
for (
|
|
20638
|
-
setFixed(
|
|
21055
|
+
if (orderedChildren) {
|
|
21056
|
+
for (const child of orderedChildren) {
|
|
21057
|
+
setFixed(child, side);
|
|
20639
21058
|
}
|
|
20640
21059
|
} else {
|
|
20641
21060
|
seenFixed = false;
|
|
20642
21061
|
}
|
|
20643
21062
|
}
|
|
20644
21063
|
}
|
|
20645
|
-
for (
|
|
20646
|
-
setFixed(
|
|
21064
|
+
for (const item of items.toReversed()) {
|
|
21065
|
+
setFixed(item, 'start');
|
|
21066
|
+
}
|
|
21067
|
+
for (const item of items) {
|
|
21068
|
+
setFixed(item, 'end');
|
|
20647
21069
|
}
|
|
20648
21070
|
function setFixedOffset(item) {
|
|
20649
|
-
let
|
|
20650
|
-
if (!item) return
|
|
21071
|
+
let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21072
|
+
if (!item) return offset;
|
|
20651
21073
|
if (item.children) {
|
|
20652
|
-
item.fixedOffset =
|
|
21074
|
+
item.fixedOffset = offset;
|
|
20653
21075
|
for (const child of item.children) {
|
|
20654
|
-
|
|
21076
|
+
offset = setFixedOffset(child, offset);
|
|
20655
21077
|
}
|
|
20656
|
-
} else if (item.fixed) {
|
|
20657
|
-
item.fixedOffset =
|
|
20658
|
-
|
|
21078
|
+
} else if (item.fixed && item.fixed !== 'end') {
|
|
21079
|
+
item.fixedOffset = offset;
|
|
21080
|
+
offset += parseFloat(item.width || '0') || 0;
|
|
20659
21081
|
}
|
|
20660
|
-
return
|
|
21082
|
+
return offset;
|
|
20661
21083
|
}
|
|
20662
21084
|
let fixedOffset = 0;
|
|
20663
21085
|
for (const item of items) {
|
|
20664
21086
|
fixedOffset = setFixedOffset(item, fixedOffset);
|
|
20665
21087
|
}
|
|
21088
|
+
function setFixedEndOffset(item) {
|
|
21089
|
+
let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21090
|
+
if (!item) return offset;
|
|
21091
|
+
if (item.children) {
|
|
21092
|
+
item.fixedEndOffset = offset;
|
|
21093
|
+
for (const child of item.children) {
|
|
21094
|
+
offset = setFixedEndOffset(child, offset);
|
|
21095
|
+
}
|
|
21096
|
+
} else if (item.fixed === 'end') {
|
|
21097
|
+
item.fixedEndOffset = offset;
|
|
21098
|
+
offset += parseFloat(item.width || '0') || 0;
|
|
21099
|
+
}
|
|
21100
|
+
return offset;
|
|
21101
|
+
}
|
|
21102
|
+
let fixedEndOffset = 0;
|
|
21103
|
+
for (const item of items.toReversed()) {
|
|
21104
|
+
fixedEndOffset = setFixedEndOffset(item, fixedEndOffset);
|
|
21105
|
+
}
|
|
20666
21106
|
}
|
|
20667
21107
|
function parse(items, maxDepth) {
|
|
20668
21108
|
const headers = [];
|
|
@@ -20795,7 +21235,6 @@ const makeVDataTableHeadersProps = propsFactory({
|
|
|
20795
21235
|
color: String,
|
|
20796
21236
|
disableSort: Boolean,
|
|
20797
21237
|
fixedHeader: Boolean,
|
|
20798
|
-
lastFixed: Boolean,
|
|
20799
21238
|
multiSort: Boolean,
|
|
20800
21239
|
sortAscIcon: {
|
|
20801
21240
|
type: IconValue,
|
|
@@ -20842,11 +21281,12 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20842
21281
|
loaderClasses
|
|
20843
21282
|
} = useLoader(props);
|
|
20844
21283
|
function getFixedStyles(column, y) {
|
|
20845
|
-
if (!(props.sticky || props.fixedHeader) && !
|
|
21284
|
+
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
|
21285
|
+
const fixedSide = typeof column.fixed === 'string' ? column.fixed : column.fixed ? 'start' : 'none';
|
|
20846
21286
|
return {
|
|
20847
21287
|
position: 'sticky',
|
|
20848
|
-
left:
|
|
20849
|
-
right:
|
|
21288
|
+
left: fixedSide === 'start' ? convertToUnit(column.fixedOffset) : undefined,
|
|
21289
|
+
right: fixedSide === 'end' ? convertToUnit(column.fixedEndOffset) : undefined,
|
|
20850
21290
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20851
21291
|
};
|
|
20852
21292
|
}
|
|
@@ -20906,14 +21346,15 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20906
21346
|
},
|
|
20907
21347
|
"colspan": column.colspan,
|
|
20908
21348
|
"rowspan": column.rowspan,
|
|
20909
|
-
"onClick": column.sortable ? () => toggleSort(column) : undefined,
|
|
20910
21349
|
"fixed": column.fixed,
|
|
20911
21350
|
"nowrap": column.nowrap,
|
|
20912
21351
|
"lastFixed": column.lastFixed,
|
|
20913
|
-
"
|
|
20914
|
-
|
|
20915
|
-
"
|
|
20916
|
-
|
|
21352
|
+
"firstFixedEnd": column.firstFixedEnd,
|
|
21353
|
+
"noPadding": noPadding,
|
|
21354
|
+
"tabindex": column.sortable ? 0 : undefined,
|
|
21355
|
+
"onClick": column.sortable ? () => toggleSort(column) : undefined,
|
|
21356
|
+
"onKeydown": column.sortable ? event => handleEnterKeyPress(event, column) : undefined
|
|
21357
|
+
}, headerProps), {
|
|
20917
21358
|
default: () => {
|
|
20918
21359
|
const columnSlotName = `header.${column.key}`;
|
|
20919
21360
|
const columnSlotProps = {
|
|
@@ -21189,7 +21630,9 @@ const VDataTableRow = genericComponent()({
|
|
|
21189
21630
|
},
|
|
21190
21631
|
"fixed": column.fixed,
|
|
21191
21632
|
"fixedOffset": column.fixedOffset,
|
|
21633
|
+
"fixedEndOffset": column.fixedEndOffset,
|
|
21192
21634
|
"lastFixed": column.lastFixed,
|
|
21635
|
+
"firstFixedEnd": column.firstFixedEnd,
|
|
21193
21636
|
"maxWidth": !mobile.value ? column.maxWidth : undefined,
|
|
21194
21637
|
"noPadding": column.key === 'data-table-select' || column.key === 'data-table-expand',
|
|
21195
21638
|
"nowrap": column.nowrap,
|
|
@@ -22599,13 +23042,9 @@ function useCalendar(props) {
|
|
|
22599
23042
|
const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
|
|
22600
23043
|
return adapter.setMonth(date, value);
|
|
22601
23044
|
}, v => adapter.getMonth(v));
|
|
22602
|
-
const weekDays = computed(() => {
|
|
22603
|
-
const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
|
22604
|
-
return props.weekdays.map(day => (day + firstDayOfWeek) % 7);
|
|
22605
|
-
});
|
|
22606
23045
|
const weekdayLabels = computed(() => {
|
|
22607
|
-
const
|
|
22608
|
-
return
|
|
23046
|
+
const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
|
23047
|
+
return adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).filter((_, i) => props.weekdays.includes((i + firstDayOfWeek) % 7));
|
|
22609
23048
|
});
|
|
22610
23049
|
const weeksInMonth = computed(() => {
|
|
22611
23050
|
const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek);
|
|
@@ -22629,13 +23068,14 @@ function useCalendar(props) {
|
|
|
22629
23068
|
});
|
|
22630
23069
|
function genDays(days, today) {
|
|
22631
23070
|
return days.filter(date => {
|
|
22632
|
-
return
|
|
23071
|
+
return props.weekdays.includes(adapter.toJsDate(date).getDay());
|
|
22633
23072
|
}).map((date, index) => {
|
|
22634
23073
|
const isoDate = adapter.toISO(date);
|
|
22635
23074
|
const isAdjacent = !adapter.isSameMonth(date, month.value);
|
|
22636
23075
|
const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));
|
|
22637
23076
|
const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));
|
|
22638
23077
|
const isSame = adapter.isSameDay(date, month.value);
|
|
23078
|
+
const weekdaysCount = props.weekdays.length;
|
|
22639
23079
|
return {
|
|
22640
23080
|
date,
|
|
22641
23081
|
formatted: adapter.format(date, 'keyboardDate'),
|
|
@@ -22647,8 +23087,8 @@ function useCalendar(props) {
|
|
|
22647
23087
|
isSelected: model.value.some(value => adapter.isSameDay(date, value)),
|
|
22648
23088
|
isStart,
|
|
22649
23089
|
isToday: adapter.isSameDay(date, today),
|
|
22650
|
-
isWeekEnd: index %
|
|
22651
|
-
isWeekStart: index %
|
|
23090
|
+
isWeekEnd: index % weekdaysCount === weekdaysCount - 1,
|
|
23091
|
+
isWeekStart: index % weekdaysCount === 0,
|
|
22652
23092
|
isoDate,
|
|
22653
23093
|
localized: adapter.format(date, 'dayOfMonth'),
|
|
22654
23094
|
month: adapter.getMonth(date),
|
|
@@ -22695,7 +23135,6 @@ function useCalendar(props) {
|
|
|
22695
23135
|
genDays,
|
|
22696
23136
|
model,
|
|
22697
23137
|
weeksInMonth,
|
|
22698
|
-
weekDays,
|
|
22699
23138
|
weekdayLabels,
|
|
22700
23139
|
weekNumbers
|
|
22701
23140
|
};
|
|
@@ -22736,7 +23175,6 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22736
23175
|
daysInMonth,
|
|
22737
23176
|
model,
|
|
22738
23177
|
weekNumbers,
|
|
22739
|
-
weekDays,
|
|
22740
23178
|
weekdayLabels
|
|
22741
23179
|
} = useCalendar(props);
|
|
22742
23180
|
const adapter = useDate();
|
|
@@ -22811,7 +23249,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22811
23249
|
useRender(() => createElementVNode("div", {
|
|
22812
23250
|
"class": "v-date-picker-month",
|
|
22813
23251
|
"style": {
|
|
22814
|
-
'--v-date-picker-days-in-week':
|
|
23252
|
+
'--v-date-picker-days-in-week': props.weekdays.length
|
|
22815
23253
|
}
|
|
22816
23254
|
}, [props.showWeek && createElementVNode("div", {
|
|
22817
23255
|
"key": "weeks",
|
|
@@ -23211,7 +23649,8 @@ const VDatePicker = genericComponent()({
|
|
|
23211
23649
|
}
|
|
23212
23650
|
function allowedMonths(month) {
|
|
23213
23651
|
if (typeof props.allowedDates === 'function') {
|
|
23214
|
-
const
|
|
23652
|
+
const monthTwoDigits = String(month + 1).padStart(2, '0');
|
|
23653
|
+
const startOfMonth = adapter.parseISO(`${year.value}-${monthTwoDigits}-01`);
|
|
23215
23654
|
return isAllowedInRange(startOfMonth, adapter.endOfMonth(startOfMonth));
|
|
23216
23655
|
}
|
|
23217
23656
|
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
@@ -25982,19 +26421,21 @@ const VOtpInput = genericComponent()({
|
|
|
25982
26421
|
const contentRef = ref();
|
|
25983
26422
|
const inputRef = ref([]);
|
|
25984
26423
|
const current = computed(() => inputRef.value[focusIndex.value]);
|
|
25985
|
-
|
|
25986
|
-
|
|
25987
|
-
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
|
|
25997
|
-
|
|
26424
|
+
useToggleScope(() => props.autofocus, () => {
|
|
26425
|
+
const intersectScope = effectScope();
|
|
26426
|
+
intersectScope.run(() => {
|
|
26427
|
+
const {
|
|
26428
|
+
intersectionRef,
|
|
26429
|
+
isIntersecting
|
|
26430
|
+
} = useIntersectionObserver();
|
|
26431
|
+
watchEffect(() => {
|
|
26432
|
+
intersectionRef.value = inputRef.value[0];
|
|
26433
|
+
});
|
|
26434
|
+
watch(isIntersecting, v => {
|
|
26435
|
+
if (!v) return;
|
|
26436
|
+
intersectionRef.value?.focus();
|
|
26437
|
+
intersectScope.stop();
|
|
26438
|
+
});
|
|
25998
26439
|
});
|
|
25999
26440
|
});
|
|
26000
26441
|
function onInput() {
|
|
@@ -30005,6 +30446,8 @@ const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');
|
|
|
30005
30446
|
|
|
30006
30447
|
const makeVTreeviewItemProps = propsFactory({
|
|
30007
30448
|
loading: Boolean,
|
|
30449
|
+
hideActions: Boolean,
|
|
30450
|
+
indentLines: Array,
|
|
30008
30451
|
toggleIcon: IconValue,
|
|
30009
30452
|
...makeVListItemProps({
|
|
30010
30453
|
slim: true
|
|
@@ -30041,11 +30484,11 @@ const VTreeviewItem = genericComponent()({
|
|
|
30041
30484
|
}
|
|
30042
30485
|
useRender(() => {
|
|
30043
30486
|
const listItemProps = VListItem.filterProps(props);
|
|
30044
|
-
const hasPrepend = slots.prepend || props.toggleIcon;
|
|
30487
|
+
const hasPrepend = slots.prepend || props.toggleIcon || props.indentLines;
|
|
30045
30488
|
return createVNode(VListItem, mergeProps({
|
|
30046
30489
|
"ref": vListItemRef
|
|
30047
30490
|
}, listItemProps, {
|
|
30048
|
-
"active": vListItemRef.value?.isActivated,
|
|
30491
|
+
"active": vListItemRef.value?.isActivated || undefined,
|
|
30049
30492
|
"class": ['v-treeview-item', {
|
|
30050
30493
|
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
|
30051
30494
|
'v-treeview-item--filtered': isFiltered.value
|
|
@@ -30055,7 +30498,15 @@ const VTreeviewItem = genericComponent()({
|
|
|
30055
30498
|
}), {
|
|
30056
30499
|
...slots,
|
|
30057
30500
|
prepend: hasPrepend ? slotProps => {
|
|
30058
|
-
return createElementVNode(Fragment, null, [
|
|
30501
|
+
return createElementVNode(Fragment, null, [props.indentLines && props.indentLines.length > 0 ? createElementVNode("div", {
|
|
30502
|
+
"key": "indent-lines",
|
|
30503
|
+
"class": "v-treeview-indent-lines",
|
|
30504
|
+
"style": {
|
|
30505
|
+
'--v-indent-parts': props.indentLines.length
|
|
30506
|
+
}
|
|
30507
|
+
}, [props.indentLines.map(type => createElementVNode("div", {
|
|
30508
|
+
"class": normalizeClass(`v-treeview-indent-line v-treeview-indent-line--${type}`)
|
|
30509
|
+
}, null))]) : '', !props.hideActions && createVNode(VListItemAction, {
|
|
30059
30510
|
"start": true
|
|
30060
30511
|
}, {
|
|
30061
30512
|
default: () => [props.toggleIcon ? createVNode(VBtn, {
|
|
@@ -30107,10 +30558,15 @@ const makeVTreeviewChildrenProps = propsFactory({
|
|
|
30107
30558
|
selectedColor: String,
|
|
30108
30559
|
selectStrategy: [String, Function, Object],
|
|
30109
30560
|
index: Number,
|
|
30561
|
+
isLastGroup: Boolean,
|
|
30562
|
+
separateRoots: Boolean,
|
|
30563
|
+
parentIndentLines: Array,
|
|
30564
|
+
indentLinesVariant: String,
|
|
30110
30565
|
path: {
|
|
30111
30566
|
type: Array,
|
|
30112
30567
|
default: () => []
|
|
30113
30568
|
},
|
|
30569
|
+
...pick(makeVTreeviewItemProps(), ['hideActions']),
|
|
30114
30570
|
...makeDensityProps()
|
|
30115
30571
|
}, 'VTreeviewChildren');
|
|
30116
30572
|
const VTreeviewChildren = genericComponent()({
|
|
@@ -30139,19 +30595,32 @@ const VTreeviewChildren = genericComponent()({
|
|
|
30139
30595
|
select(isSelected);
|
|
30140
30596
|
}
|
|
30141
30597
|
}
|
|
30142
|
-
return () => slots.default?.() ?? props.items?.map((item, index) => {
|
|
30598
|
+
return () => slots.default?.() ?? props.items?.map((item, index, items) => {
|
|
30143
30599
|
const {
|
|
30144
30600
|
children,
|
|
30145
30601
|
props: itemProps
|
|
30146
30602
|
} = item;
|
|
30147
30603
|
const loading = isLoading.has(item.value);
|
|
30604
|
+
const nextItemHasChildren = !!items.at(index + 1)?.children;
|
|
30605
|
+
const depth = props.path?.length ?? 0;
|
|
30606
|
+
const isLast = items.length - 1 === index;
|
|
30148
30607
|
const treeItemProps = {
|
|
30149
30608
|
index,
|
|
30150
|
-
depth
|
|
30609
|
+
depth,
|
|
30151
30610
|
isFirst: index === 0,
|
|
30152
|
-
isLast
|
|
30153
|
-
path: [...props.path, index]
|
|
30611
|
+
isLast,
|
|
30612
|
+
path: [...props.path, index],
|
|
30613
|
+
hideAction: props.hideActions
|
|
30154
30614
|
};
|
|
30615
|
+
const indentLines = getIndentLines({
|
|
30616
|
+
depth,
|
|
30617
|
+
isLast,
|
|
30618
|
+
isLastGroup: props.isLastGroup,
|
|
30619
|
+
leafLinks: !props.hideActions,
|
|
30620
|
+
separateRoots: props.separateRoots,
|
|
30621
|
+
parentIndentLines: props.parentIndentLines,
|
|
30622
|
+
variant: props.indentLinesVariant
|
|
30623
|
+
});
|
|
30155
30624
|
const slotsWithItem = {
|
|
30156
30625
|
prepend: slotProps => createElementVNode(Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && createElementVNode("div", null, [createVNode(VCheckboxBtn, {
|
|
30157
30626
|
"key": item.value,
|
|
@@ -30217,21 +30686,40 @@ const VTreeviewChildren = genericComponent()({
|
|
|
30217
30686
|
return createVNode(VTreeviewItem, mergeProps({
|
|
30218
30687
|
"ref": el => activatorItems.value[index] = el
|
|
30219
30688
|
}, listItemProps, {
|
|
30689
|
+
"hideActions": props.hideActions,
|
|
30690
|
+
"indentLines": indentLines.node,
|
|
30220
30691
|
"value": props.returnObject ? item.raw : itemProps.value,
|
|
30221
30692
|
"loading": loading
|
|
30222
30693
|
}), slotsWithItem);
|
|
30223
30694
|
},
|
|
30224
30695
|
default: () => createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
|
30225
30696
|
"items": children,
|
|
30697
|
+
"indentLinesVariant": props.indentLinesVariant,
|
|
30698
|
+
"parentIndentLines": indentLines.children,
|
|
30699
|
+
"isLastGroup": nextItemHasChildren,
|
|
30226
30700
|
"returnObject": props.returnObject
|
|
30227
30701
|
}), slots)
|
|
30228
|
-
}) : slots.item
|
|
30702
|
+
}) : renderSlot(slots.item, {
|
|
30229
30703
|
props: itemProps,
|
|
30230
30704
|
item: item.raw,
|
|
30231
30705
|
internalItem: item
|
|
30232
|
-
}
|
|
30233
|
-
|
|
30234
|
-
|
|
30706
|
+
}, () => {
|
|
30707
|
+
if (item.type === 'divider') {
|
|
30708
|
+
return renderSlot(slots.divider, {
|
|
30709
|
+
props: item.raw
|
|
30710
|
+
}, () => createVNode(VDivider, item.props, null));
|
|
30711
|
+
}
|
|
30712
|
+
if (item.type === 'subheader') {
|
|
30713
|
+
return renderSlot(slots.subheader, {
|
|
30714
|
+
props: item.raw
|
|
30715
|
+
}, () => createVNode(VListSubheader, item.props, null));
|
|
30716
|
+
}
|
|
30717
|
+
return createVNode(VTreeviewItem, mergeProps(itemProps, {
|
|
30718
|
+
"hideActions": props.hideActions,
|
|
30719
|
+
"indentLines": indentLines.leaf,
|
|
30720
|
+
"value": props.returnObject ? toRaw(item.raw) : itemProps.value
|
|
30721
|
+
}), slotsWithItem);
|
|
30722
|
+
});
|
|
30235
30723
|
});
|
|
30236
30724
|
}
|
|
30237
30725
|
});
|
|
@@ -30247,20 +30735,18 @@ function flatten(items) {
|
|
|
30247
30735
|
const makeVTreeviewProps = propsFactory({
|
|
30248
30736
|
fluid: Boolean,
|
|
30249
30737
|
openAll: Boolean,
|
|
30738
|
+
indentLines: [Boolean, String],
|
|
30250
30739
|
search: String,
|
|
30251
30740
|
...makeFilterProps({
|
|
30252
30741
|
filterKeys: ['title']
|
|
30253
30742
|
}),
|
|
30254
|
-
...omit(makeVTreeviewChildrenProps(), ['index', 'path']),
|
|
30743
|
+
...omit(makeVTreeviewChildrenProps(), ['index', 'path', 'indentLinesVariant', 'parentIndentLines', 'isLastGroup']),
|
|
30255
30744
|
...omit(makeVListProps({
|
|
30256
30745
|
collapseIcon: '$treeviewCollapse',
|
|
30257
30746
|
expandIcon: '$treeviewExpand',
|
|
30258
30747
|
slim: true
|
|
30259
|
-
}), ['
|
|
30260
|
-
modelValue:
|
|
30261
|
-
type: Array,
|
|
30262
|
-
default: () => []
|
|
30263
|
-
}
|
|
30748
|
+
}), ['nav', 'openStrategy']),
|
|
30749
|
+
modelValue: Array
|
|
30264
30750
|
}, 'VTreeview');
|
|
30265
30751
|
const VTreeview = genericComponent()({
|
|
30266
30752
|
name: 'VTreeview',
|
|
@@ -30275,7 +30761,8 @@ const VTreeview = genericComponent()({
|
|
|
30275
30761
|
},
|
|
30276
30762
|
setup(props, _ref) {
|
|
30277
30763
|
let {
|
|
30278
|
-
slots
|
|
30764
|
+
slots,
|
|
30765
|
+
emit
|
|
30279
30766
|
} = _ref;
|
|
30280
30767
|
const {
|
|
30281
30768
|
items
|
|
@@ -30284,13 +30771,12 @@ const VTreeview = genericComponent()({
|
|
|
30284
30771
|
const baseColor = toRef(() => props.baseColor);
|
|
30285
30772
|
const color = toRef(() => props.color);
|
|
30286
30773
|
const activated = useProxiedModel(props, 'activated');
|
|
30287
|
-
const
|
|
30288
|
-
const _selected = useProxiedModel(props, 'selected', props.modelValue);
|
|
30774
|
+
const _selected = useProxiedModel(props, 'selected');
|
|
30289
30775
|
const selected = computed({
|
|
30290
|
-
get: () => _selected.value,
|
|
30776
|
+
get: () => props.modelValue ?? _selected.value,
|
|
30291
30777
|
set(val) {
|
|
30292
30778
|
_selected.value = val;
|
|
30293
|
-
|
|
30779
|
+
emit('update:modelValue', val);
|
|
30294
30780
|
}
|
|
30295
30781
|
});
|
|
30296
30782
|
const vListRef = ref();
|
|
@@ -30356,6 +30842,7 @@ const VTreeview = genericComponent()({
|
|
|
30356
30842
|
useRender(() => {
|
|
30357
30843
|
const listProps = VList.filterProps(props);
|
|
30358
30844
|
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
|
30845
|
+
const indentLinesVariant = typeof props.indentLines === 'boolean' ? 'default' : props.indentLines;
|
|
30359
30846
|
return createVNode(VList, mergeProps({
|
|
30360
30847
|
"ref": vListRef
|
|
30361
30848
|
}, listProps, {
|
|
@@ -30373,7 +30860,9 @@ const VTreeview = genericComponent()({
|
|
|
30373
30860
|
default: () => [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
|
30374
30861
|
"density": props.density,
|
|
30375
30862
|
"returnObject": props.returnObject,
|
|
30376
|
-
"items": items.value
|
|
30863
|
+
"items": items.value,
|
|
30864
|
+
"parentIndentLines": props.indentLines ? [] : undefined,
|
|
30865
|
+
"indentLinesVariant": indentLinesVariant
|
|
30377
30866
|
}), slots)]
|
|
30378
30867
|
});
|
|
30379
30868
|
});
|
|
@@ -30893,7 +31382,7 @@ function createVuetify$1() {
|
|
|
30893
31382
|
};
|
|
30894
31383
|
});
|
|
30895
31384
|
}
|
|
30896
|
-
const version$1 = "3.9.0
|
|
31385
|
+
const version$1 = "3.9.0";
|
|
30897
31386
|
createVuetify$1.version = version$1;
|
|
30898
31387
|
|
|
30899
31388
|
// Vue's inject() can only be used in setup
|
|
@@ -30918,8 +31407,8 @@ const createVuetify = function () {
|
|
|
30918
31407
|
...options
|
|
30919
31408
|
});
|
|
30920
31409
|
};
|
|
30921
|
-
const version = "3.9.0
|
|
31410
|
+
const version = "3.9.0";
|
|
30922
31411
|
createVuetify.version = version;
|
|
30923
31412
|
|
|
30924
|
-
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|
|
31413
|
+
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useHotkey, useLayout, useLocale, useRtl, useTheme, version };
|
|
30925
31414
|
//# sourceMappingURL=vuetify.esm.js.map
|