vuetify 3.7.2 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +5843 -5795
- package/dist/json/importMap-labs.json +16 -16
- package/dist/json/importMap.json +150 -150
- package/dist/json/tags.json +14 -1
- package/dist/json/web-types.json +10397 -10309
- package/dist/vuetify-labs.css +2362 -2362
- package/dist/vuetify-labs.d.ts +196 -195
- package/dist/vuetify-labs.esm.js +68 -45
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +68 -45
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +2822 -2822
- package/dist/vuetify.d.ts +212 -211
- package/dist/vuetify.esm.js +38 -17
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +38 -17
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +28 -28
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +22 -22
- package/lib/components/VBottomSheet/VBottomSheet.sass +2 -1
- package/lib/components/VBottomSheet/index.d.mts +4 -4
- package/lib/components/VBtn/VBtn.css +2 -2
- package/lib/components/VBtn/VBtn.sass +7 -8
- package/lib/components/VBtnToggle/VBtnToggle.css +3 -0
- package/lib/components/VBtnToggle/VBtnToggle.sass +3 -0
- package/lib/components/VCarousel/index.d.mts +2 -2
- package/lib/components/VCheckbox/index.d.mts +2 -2
- package/lib/components/VChip/VChip.mjs +2 -1
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VCode/index.mjs +1 -1
- package/lib/components/VCode/index.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +2 -2
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +22 -22
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +87 -0
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -0
- package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/components/VDataTable/composables/paginate.mjs +4 -2
- package/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +7 -6
- package/lib/components/VDatePicker/index.d.mts +2 -2
- package/lib/components/VDialog/VDialog.css +3 -7
- package/lib/components/VDialog/VDialog.mjs +8 -1
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +6 -7
- package/lib/components/VDialog/index.d.mts +22 -22
- package/lib/components/VField/_variables.scss +2 -1
- package/lib/components/VFileInput/__tests__/text.txt +1 -0
- package/lib/components/VFileInput/index.d.mts +3 -3
- package/lib/components/VInput/index.d.mts +2 -2
- package/lib/components/VKbd/index.mjs +1 -1
- package/lib/components/VKbd/index.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +8 -7
- package/lib/components/VList/VListItem.mjs +1 -0
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +16 -10
- package/lib/components/VList/_variables.scss +0 -11
- package/lib/components/VMenu/VMenu.mjs +15 -6
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +20 -20
- package/lib/components/VMessages/index.d.mts +8 -8
- package/lib/components/VNavigationDrawer/index.d.mts +7 -7
- package/lib/components/VOverflowBtn/VOverflowBtn.sass +6 -5
- package/lib/components/VOverlay/index.d.mts +4 -4
- package/lib/components/VProgressLinear/_variables.scss +2 -1
- package/lib/components/VRadioGroup/index.d.mts +2 -2
- package/lib/components/VSelect/index.d.mts +22 -22
- package/lib/components/VSnackbar/index.d.mts +31 -31
- package/lib/components/VSpeedDial/index.d.mts +2 -2
- package/lib/components/VSwitch/index.d.mts +2 -2
- package/lib/components/VTable/_mixins.scss +2 -2
- package/lib/components/VTabs/VTabs.sass +1 -1
- package/lib/components/VTextField/index.d.mts +3 -3
- package/lib/components/VTextarea/index.d.mts +3 -3
- package/lib/components/VTooltip/index.d.mts +24 -24
- package/lib/components/VWindow/index.d.mts +2 -2
- package/lib/components/index.d.mts +158 -157
- package/lib/composables/directiveComponent.mjs +4 -3
- package/lib/composables/directiveComponent.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +2 -2
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +53 -53
- package/lib/labs/VNumberInput/index.d.mts +9 -9
- package/lib/labs/VSnackbarQueue/index.d.mts +52 -52
- package/lib/labs/VTreeview/VTreeview.mjs +2 -1
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +29 -28
- package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +7 -7
- package/lib/labs/components.d.mts +68 -68
- package/lib/locale/el.mjs +0 -0
- package/lib/locale/index.mjs +0 -0
- package/lib/styles/settings/_colors.scss +257 -256
- package/lib/styles/utilities/_display.sass +2 -1
- package/lib/styles/utilities/_elevation.scss +2 -1
- package/lib/styles/utilities/_screenreaders.sass +2 -1
- package/package.json +23 -16
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.cy.mjs +0 -74
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.cy.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTreeview.mjs","names":["makeVTreeviewChildrenProps","VTreeviewChildren","makeVListProps","useListItems","VList","provideDefaults","makeFilterProps","useFilter","useProxiedModel","computed","provide","ref","toRaw","toRef","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","flatten","items","flat","arguments","length","undefined","item","push","children","makeVTreeviewProps","openAll","Boolean","search","String","filterKeys","collapseIcon","expandIcon","slim","modelValue","type","Array","default","VTreeview","name","props","emits","val","value","setup","_ref","slots","activeColor","baseColor","color","activated","model","_selected","selected","get","set","vListRef","opened","flatItems","filteredItems","visibleIds","getPath","Set","flatMap","getChildren","id","arr","queue","slice","child","shift","ids","i","returnObject","raw","concat","VTreeviewGroup","VTreeviewItem","activeClass","density","disabled","lines","variant","listProps","filterProps","treeviewChildrenProps","_createVNode","_mergeProps","class","style","$event"],"sources":["../../../src/labs/VTreeview/VTreeview.tsx"],"sourcesContent":["// Components\nimport { makeVTreeviewChildrenProps, VTreeviewChildren } from './VTreeviewChildren'\nimport { makeVListProps, useListItems, VList } from '@/components/VList/VList'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, provide, ref, toRaw, toRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListChildrenSlots } from '@/components/VList/VListChildren'\nimport type { ListItem } from '@/composables/list-items'\nimport type { GenericProps } from '@/util'\n\nfunction flatten (items: ListItem[], flat: ListItem[] = []) {\n for (const item of items) {\n flat.push(item)\n if (item.children) flatten(item.children, flat)\n }\n return flat\n}\n\nexport const makeVTreeviewProps = propsFactory({\n openAll: Boolean,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...makeVTreeviewChildrenProps(),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['itemType', 'nav', 'openStrategy']),\n modelValue: {\n type: Array,\n default: () => ([]),\n },\n}, 'VTreeview')\n\nexport const VTreeview = genericComponent<new <T>(\n props: {\n items?: T[]\n },\n slots: VListChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeview',\n\n props: makeVTreeviewProps(),\n\n emits: {\n 'update:opened': (val: unknown) => true,\n 'update:activated': (val: unknown) => true,\n 'update:selected': (val: unknown) => true,\n 'update:modelValue': (val: unknown) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n const activated = useProxiedModel(props, 'activated')\n const model = useProxiedModel(props, 'modelValue')\n const _selected = useProxiedModel(props, 'selected', props.modelValue)\n\n const selected = computed({\n get: () => _selected.value,\n set (val) {\n _selected.value = val\n model.value = val\n },\n })\n\n const vListRef = ref<VList>()\n\n const opened = computed(() => props.openAll ? openAll(items.value) : props.opened)\n const flatItems = computed(() => flatten(items.value))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, flatItems, search)\n const visibleIds = computed(() => {\n if (!search.value) return null\n const getPath = vListRef.value?.getPath\n if (!getPath) return null\n return new Set(filteredItems.value.flatMap(item => {\n return [...getPath(item.props.value), ...getChildren(item.props.value)]\n }))\n })\n\n function getChildren (id: unknown) {\n const arr: unknown[] = []\n const queue = ((vListRef.value?.children.get(id) ?? []).slice())\n while (queue.length) {\n const child = queue.shift()\n if (!child) continue\n arr.push(child)\n queue.push(...((vListRef.value?.children.get(child) ?? []).slice()))\n }\n return arr\n }\n\n function openAll (items: InternalListItem<any>[]) {\n let ids: any[] = []\n\n for (const i of items) {\n if (!i.children) continue\n\n ids.push(props.returnObject ? toRaw(i.raw) : i.value)\n\n if (i.children) {\n ids = ids.concat(openAll(i.children))\n }\n }\n\n return ids\n }\n\n provide(VTreeviewSymbol, { visibleIds })\n\n provideDefaults({\n VTreeviewGroup: {\n activeColor,\n baseColor,\n color,\n collapseIcon: toRef(props, 'collapseIcon'),\n expandIcon: toRef(props, 'expandIcon'),\n },\n VTreeviewItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n variant: toRef(props, 'variant'),\n },\n })\n\n useRender(() => {\n const listProps = VList.filterProps(props)\n\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n props.class,\n ]}\n open-strategy=\"multiple\"\n style={ props.style }\n opened={ opened.value }\n v-model:activated={ activated.value }\n v-model:selected={ selected.value }\n >\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n returnObject={ props.returnObject }\n items={ items.value }\n v-slots={ slots }\n ></VTreeviewChildren>\n </VList>\n )\n })\n\n return { }\n },\n})\n\nexport type VTreeview = InstanceType<typeof VTreeview>\n"],"mappings":";AAAA;AAAA,SACSA,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,cAAc,EAAEC,YAAY,EAAEC,KAAK,4CAE5C;AAAA,SACSC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjDC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAExD;AAAA,SACSC,eAAe;AAMxB,SAASC,OAAOA,CAAEC,KAAiB,EAAyB;EAAA,IAAvBC,IAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EACxD,KAAK,MAAMG,IAAI,IAAIL,KAAK,EAAE;IACxBC,IAAI,CAACK,IAAI,CAACD,IAAI,CAAC;IACf,IAAIA,IAAI,CAACE,QAAQ,EAAER,OAAO,CAACM,IAAI,CAACE,QAAQ,EAAEN,IAAI,CAAC;EACjD;EACA,OAAOA,IAAI;AACb;AAEA,OAAO,MAAMO,kBAAkB,GAAGZ,YAAY,CAAC;EAC7Ca,OAAO,EAAEC,OAAO;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AAK,CAACiC,YAAY;UAAA,SACzBxD,KAAK,CAAC0B;QAAK,IACTG,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VTreeview.mjs","names":["makeVTreeviewChildrenProps","VTreeviewChildren","makeVListProps","useListItems","VList","provideDefaults","makeFilterProps","useFilter","useProxiedModel","computed","provide","ref","toRaw","toRef","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","flatten","items","flat","arguments","length","undefined","item","push","children","makeVTreeviewProps","openAll","Boolean","search","String","filterKeys","collapseIcon","expandIcon","slim","modelValue","type","Array","default","VTreeview","name","props","emits","val","value","setup","_ref","slots","activeColor","baseColor","color","activated","model","_selected","selected","get","set","vListRef","opened","flatItems","filteredItems","visibleIds","getPath","Set","flatMap","itemVal","returnObject","raw","getChildren","map","id","arr","queue","slice","child","shift","ids","i","concat","VTreeviewGroup","VTreeviewItem","activeClass","density","disabled","lines","variant","listProps","filterProps","treeviewChildrenProps","_createVNode","_mergeProps","class","style","$event"],"sources":["../../../src/labs/VTreeview/VTreeview.tsx"],"sourcesContent":["// Components\nimport { makeVTreeviewChildrenProps, VTreeviewChildren } from './VTreeviewChildren'\nimport { makeVListProps, useListItems, VList } from '@/components/VList/VList'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, provide, ref, toRaw, toRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListChildrenSlots } from '@/components/VList/VListChildren'\nimport type { ListItem } from '@/composables/list-items'\nimport type { GenericProps } from '@/util'\n\nfunction flatten (items: ListItem[], flat: ListItem[] = []) {\n for (const item of items) {\n flat.push(item)\n if (item.children) flatten(item.children, flat)\n }\n return flat\n}\n\nexport const makeVTreeviewProps = propsFactory({\n openAll: Boolean,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...makeVTreeviewChildrenProps(),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['itemType', 'nav', 'openStrategy']),\n modelValue: {\n type: Array,\n default: () => ([]),\n },\n}, 'VTreeview')\n\nexport const VTreeview = genericComponent<new <T>(\n props: {\n items?: T[]\n },\n slots: VListChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeview',\n\n props: makeVTreeviewProps(),\n\n emits: {\n 'update:opened': (val: unknown) => true,\n 'update:activated': (val: unknown) => true,\n 'update:selected': (val: unknown) => true,\n 'update:modelValue': (val: unknown) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n const activated = useProxiedModel(props, 'activated')\n const model = useProxiedModel(props, 'modelValue')\n const _selected = useProxiedModel(props, 'selected', props.modelValue)\n\n const selected = computed({\n get: () => _selected.value,\n set (val) {\n _selected.value = val\n model.value = val\n },\n })\n\n const vListRef = ref<VList>()\n\n const opened = computed(() => props.openAll ? openAll(items.value) : props.opened)\n const flatItems = computed(() => flatten(items.value))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, flatItems, search)\n const visibleIds = computed(() => {\n if (!search.value) return null\n const getPath = vListRef.value?.getPath\n if (!getPath) return null\n return new Set(filteredItems.value.flatMap(item => {\n const itemVal = props.returnObject ? item.raw : item.props.value\n return [\n ...getPath(itemVal),\n ...getChildren(itemVal),\n ].map(toRaw)\n }))\n })\n\n function getChildren (id: unknown) {\n const arr: unknown[] = []\n const queue = ((vListRef.value?.children.get(id) ?? []).slice())\n while (queue.length) {\n const child = queue.shift()\n if (!child) continue\n arr.push(child)\n queue.push(...((vListRef.value?.children.get(child) ?? []).slice()))\n }\n return arr\n }\n\n function openAll (items: InternalListItem<any>[]) {\n let ids: any[] = []\n\n for (const i of items) {\n if (!i.children) continue\n\n ids.push(props.returnObject ? toRaw(i.raw) : i.value)\n\n if (i.children) {\n ids = ids.concat(openAll(i.children))\n }\n }\n\n return ids\n }\n\n provide(VTreeviewSymbol, { visibleIds })\n\n provideDefaults({\n VTreeviewGroup: {\n activeColor,\n baseColor,\n color,\n collapseIcon: toRef(props, 'collapseIcon'),\n expandIcon: toRef(props, 'expandIcon'),\n },\n VTreeviewItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n variant: toRef(props, 'variant'),\n },\n })\n\n useRender(() => {\n const listProps = VList.filterProps(props)\n\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n props.class,\n ]}\n open-strategy=\"multiple\"\n style={ props.style }\n opened={ opened.value }\n v-model:activated={ activated.value }\n v-model:selected={ selected.value }\n >\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n returnObject={ props.returnObject }\n items={ items.value }\n v-slots={ slots }\n ></VTreeviewChildren>\n </VList>\n )\n })\n\n return { }\n },\n})\n\nexport type VTreeview = InstanceType<typeof VTreeview>\n"],"mappings":";AAAA;AAAA,SACSA,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,cAAc,EAAEC,YAAY,EAAEC,KAAK,4CAE5C;AAAA,SACSC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC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,KAAK,CAAC;MAE1C,MAAM+C,qBAAqB,GAAGzF,iBAAiB,CAACwF,WAAW,CAAC9C,KAAK,CAAC;MAElE,OAAAgD,YAAA,CAAAvF,KAAA,EAAAwF,WAAA;QAAA,OAEUjC;MAAQ,GACT6B,SAAS;QAAA,SACP,CACL,YAAY,EACZ7C,KAAK,CAACkD,KAAK,CACZ;QAAA;QAAA,SAEOlD,KAAK,CAACmD,KAAK;QAAA,UACVlC,MAAM,CAACd,KAAK;QAAA,aACDO,SAAS,CAACP,KAAK;QAAA,sBAAAiD,MAAA,IAAf1C,SAAS,CAACP,KAAK,GAAAiD,MAAA;QAAA,YAChBvC,QAAQ,CAACV,KAAK;QAAA,qBAAAiD,MAAA,IAAdvC,QAAQ,CAACV,KAAK,GAAAiD;MAAA;QAAAvD,OAAA,EAAAA,CAAA,MAAAmD,YAAA,CAAA1F,iBAAA,EAAA2F,WAAA,CAG1BF,qBAAqB;UAAA,gBACX/C,KAAK,CAACyB,YAAY;UAAA,SACzBhD,KAAK,CAAC0B;QAAK,IACTG,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { VTreeviewGroup } from "./VTreeviewGroup.mjs";
|
|
|
4
4
|
import { VTreeviewItem } from "./VTreeviewItem.mjs";
|
|
5
5
|
import { VCheckboxBtn } from "../../components/VCheckbox/index.mjs"; // Composables
|
|
6
6
|
import { IconValue } from "../../composables/icons.mjs"; // Utilities
|
|
7
|
-
import { computed,
|
|
7
|
+
import { computed, reactive, toRaw, withModifiers } from 'vue';
|
|
8
8
|
import { genericComponent, propsFactory } from "../../util/index.mjs"; // Types
|
|
9
9
|
export const makeVTreeviewChildrenProps = propsFactory({
|
|
10
10
|
loadChildren: Function,
|
|
@@ -33,36 +33,32 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
33
33
|
props: makeVTreeviewChildrenProps(),
|
|
34
34
|
setup(props, _ref) {
|
|
35
35
|
let {
|
|
36
|
-
emit,
|
|
37
36
|
slots
|
|
38
37
|
} = _ref;
|
|
39
|
-
const isLoading =
|
|
38
|
+
const isLoading = reactive(new Set());
|
|
40
39
|
const isClickOnOpen = computed(() => props.openOnClick != null ? props.openOnClick : props.selectable);
|
|
41
|
-
function checkChildren(item) {
|
|
42
|
-
|
|
43
|
-
if (!props.items?.length || !props.loadChildren) return
|
|
40
|
+
async function checkChildren(item) {
|
|
41
|
+
try {
|
|
42
|
+
if (!props.items?.length || !props.loadChildren) return;
|
|
44
43
|
if (item?.children?.length === 0) {
|
|
45
|
-
isLoading.
|
|
46
|
-
props.loadChildren(item
|
|
47
|
-
return;
|
|
44
|
+
isLoading.add(item.value);
|
|
45
|
+
await props.loadChildren(item.raw);
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
47
|
+
} finally {
|
|
48
|
+
isLoading.delete(item.value);
|
|
49
|
+
}
|
|
53
50
|
}
|
|
54
51
|
function selectItem(select, isSelected) {
|
|
55
52
|
if (props.selectable) {
|
|
56
53
|
select(!isSelected);
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
|
-
return () => slots.default?.() ?? props.items?.map(
|
|
60
|
-
|
|
56
|
+
return () => slots.default?.() ?? props.items?.map(item => {
|
|
57
|
+
const {
|
|
61
58
|
children,
|
|
62
|
-
props: itemProps
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const loading = isLoading.value === item.value;
|
|
59
|
+
props: itemProps
|
|
60
|
+
} = item;
|
|
61
|
+
const loading = isLoading.has(item.value);
|
|
66
62
|
const slotsWithItem = {
|
|
67
63
|
prepend: slotProps => _createVNode(_Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && _createVNode("div", null, [_createVNode(VCheckboxBtn, {
|
|
68
64
|
"key": item.value,
|
|
@@ -81,26 +77,29 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
81
77
|
}
|
|
82
78
|
}, null)]), slots.prepend?.({
|
|
83
79
|
...slotProps,
|
|
84
|
-
item
|
|
80
|
+
item: item.raw,
|
|
81
|
+
internalItem: item
|
|
85
82
|
})]),
|
|
86
83
|
append: slots.append ? slotProps => slots.append?.({
|
|
87
84
|
...slotProps,
|
|
88
|
-
item
|
|
85
|
+
item: item.raw,
|
|
86
|
+
internalItem: item
|
|
89
87
|
}) : undefined,
|
|
90
88
|
title: slots.title ? slotProps => slots.title?.({
|
|
91
89
|
...slotProps,
|
|
92
|
-
item
|
|
90
|
+
item: item.raw,
|
|
91
|
+
internalItem: item
|
|
93
92
|
}) : undefined
|
|
94
93
|
};
|
|
95
94
|
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
|
96
95
|
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
|
97
96
|
return children ? _createVNode(VTreeviewGroup, _mergeProps(treeviewGroupProps, {
|
|
98
|
-
"value": props.returnObject ? item : treeviewGroupProps?.value
|
|
97
|
+
"value": props.returnObject ? item.raw : treeviewGroupProps?.value
|
|
99
98
|
}), {
|
|
100
|
-
activator:
|
|
99
|
+
activator: _ref2 => {
|
|
101
100
|
let {
|
|
102
101
|
props: activatorProps
|
|
103
|
-
} =
|
|
102
|
+
} = _ref2;
|
|
104
103
|
const listItemProps = {
|
|
105
104
|
...itemProps,
|
|
106
105
|
...activatorProps,
|
|
@@ -109,7 +108,7 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
109
108
|
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : undefined
|
|
110
109
|
};
|
|
111
110
|
return _createVNode(VTreeviewItem, _mergeProps(listItemProps, {
|
|
112
|
-
"value": props.returnObject ? toRaw(item) : itemProps.value,
|
|
111
|
+
"value": props.returnObject ? toRaw(item.raw) : itemProps.value,
|
|
113
112
|
"loading": loading
|
|
114
113
|
}), slotsWithItem);
|
|
115
114
|
},
|
|
@@ -118,9 +117,11 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
118
117
|
"returnObject": props.returnObject
|
|
119
118
|
}), slots)
|
|
120
119
|
}) : slots.item?.({
|
|
121
|
-
props: itemProps
|
|
120
|
+
props: itemProps,
|
|
121
|
+
item: item.raw,
|
|
122
|
+
internalItem: item
|
|
122
123
|
}) ?? _createVNode(VTreeviewItem, _mergeProps(itemProps, {
|
|
123
|
-
"value": props.returnObject ? toRaw(item) : itemProps.value
|
|
124
|
+
"value": props.returnObject ? toRaw(item.raw) : itemProps.value
|
|
124
125
|
}), slotsWithItem);
|
|
125
126
|
});
|
|
126
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTreeviewChildren.mjs","names":["VTreeviewGroup","VTreeviewItem","VCheckboxBtn","IconValue","computed","shallowRef","toRaw","withModifiers","genericComponent","propsFactory","makeVTreeviewChildrenProps","loadChildren","Function","loadingIcon","type","String","default","items","Array","openOnClick","Boolean","undefined","indeterminateIcon","falseIcon","trueIcon","returnObject","selectable","selectedColor","selectStrategy","Object","VTreeviewChildren","name","props","setup","_ref","emit","slots","isLoading","isClickOnOpen","checkChildren","item","Promise","resolve","length","children","value","then","finally","selectItem","select","isSelected","map","_ref2","itemProps","raw","loading","slotsWithItem","prepend","slotProps","_createVNode","_Fragment","includes","isIndeterminate","e","key","stopPropagation","append","title","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref3","activatorProps","listItemProps","onToggleExpand","onClick"],"sources":["../../../src/labs/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, shallowRef, toRaw, withModifiers } from 'vue'\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\nimport type { SelectStrategyProp } from '@/composables/nested/nested'\nimport type { GenericProps } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VListItemSlots, 'default'>]: VListItemSlots[K] & { item: T }\n} & {\n default: never\n item: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n loadChildren: Function as PropType<(item: unknown) => Promise<void>>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n items: Array as PropType<readonly InternalListItem[]>,\n openOnClick: {\n type: Boolean,\n default: undefined,\n },\n indeterminateIcon: {\n type: IconValue,\n default: '$checkboxIndeterminate',\n },\n falseIcon: IconValue,\n trueIcon: IconValue,\n returnObject: Boolean,\n selectable: Boolean,\n selectedColor: String,\n selectStrategy: [String, Function, Object] as PropType<SelectStrategyProp>,\n}, 'VTreeviewChildren')\n\nexport const VTreeviewChildren = genericComponent<new <T extends InternalListItem>(\n props: {\n items?: readonly T[]\n },\n slots: VTreeviewChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeviewChildren',\n\n props: makeVTreeviewChildrenProps(),\n\n setup (props, { emit, slots }) {\n const isLoading = shallowRef(null)\n\n const isClickOnOpen = computed(() => props.openOnClick != null ? props.openOnClick : props.selectable)\n\n function checkChildren (item: any) {\n return new Promise<void>(resolve => {\n if (!props.items?.length || !props.loadChildren) return resolve()\n\n if (item?.children?.length === 0) {\n isLoading.value = item.value\n props.loadChildren(item).then(resolve)\n\n return\n }\n\n resolve()\n }).finally(() => {\n isLoading.value = null\n })\n }\n\n function selectItem (select: (value: boolean) => void, isSelected: boolean) {\n if (props.selectable) {\n select(!isSelected)\n }\n }\n\n return () => slots.default?.() ?? props.items?.map(({ children, props: itemProps, raw: item }) => {\n const loading = isLoading.value === item.value\n const slotsWithItem = {\n prepend: slotProps => (\n <>\n { props.selectable && (!children || (children && !['leaf', 'single-leaf'].includes(props.selectStrategy as string))) && (\n <div>\n <VCheckboxBtn\n key={ item.value }\n modelValue={ slotProps.isSelected }\n loading={ loading }\n color={ props.selectedColor }\n indeterminate={ slotProps.isIndeterminate }\n indeterminateIcon={ props.indeterminateIcon }\n falseIcon={ props.falseIcon }\n trueIcon={ props.trueIcon }\n onClick={ withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']) }\n onKeydown={ (e: KeyboardEvent) => {\n if (!['Enter', 'Space'].includes(e.key)) return\n e.stopPropagation()\n selectItem(slotProps.select, slotProps.isSelected)\n }}\n />\n </div>\n )}\n\n { slots.prepend?.({ ...slotProps, item }) }\n </>\n ),\n append: slots.append ? slotProps => slots.append?.({ ...slotProps, item }) : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item }) : undefined,\n } satisfies VTreeviewItem['$props']['$children']\n\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps)\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return children ? (\n <VTreeviewGroup\n { ...treeviewGroupProps }\n value={ props.returnObject ? item : treeviewGroupProps?.value }\n >\n {{\n activator: ({ props: activatorProps }) => {\n const listItemProps = {\n ...itemProps,\n ...activatorProps,\n value: itemProps?.value,\n onToggleExpand: [() => checkChildren(item), activatorProps.onClick] as any,\n onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] as any : undefined,\n }\n\n return (\n <VTreeviewItem\n { ...listItemProps }\n value={ props.returnObject ? toRaw(item) : itemProps.value }\n loading={ loading }\n v-slots={ slotsWithItem }\n />\n )\n },\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n ),\n }}\n </VTreeviewGroup>\n ) : (\n slots.item?.({ props: itemProps }) ?? (\n <VTreeviewItem\n { ...itemProps }\n value={ props.returnObject ? toRaw(item) : itemProps.value }\n v-slots={ slotsWithItem }\n />\n ))\n })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,aAAa;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AAEvB;MAAK;QAG3D2B,SAAS,EAAEC,KAAA,IAA+B;UAAA,IAA9B;YAAEzC,KAAK,EAAE0C;UAAe,CAAC,GAAAD,KAAA;UACnC,MAAME,aAAa,GAAG;YACpB,GAAGtB,SAAS;YACZ,GAAGqB,cAAc;YACjB7B,KAAK,EAAEQ,SAAS,EAAER,KAAK;YACvB+B,cAAc,EAAE,CAAC,MAAMrC,aAAa,CAACC,IAAI,CAAC,EAAEkC,cAAc,CAACG,OAAO,CAAQ;YAC1EA,OAAO,EAAEvC,aAAa,CAACO,KAAK,GAAG,CAAC,MAAMN,aAAa,CAACC,IAAI,CAAC,EAAEkC,cAAc,CAACG,OAAO,CAAC,GAAUxD;UAC9F,CAAC;UAED,OAAAsC,YAAA,CAAA1D,aAAA,EAAAsE,WAAA,CAESI,aAAa;YAAA,SACV3C,KAAK,CAACP,YAAY,GAAGnB,KAAK,CAACkC,IAAI,CAAC,GAAGa,SAAS,CAACR,KAAK;YAAA,WAChDU;UAAO,IACPC,aAAa;QAG7B,CAAC;QACDxC,OAAO,EAAEA,CAAA,KAAA2C,YAAA,CAAA7B,iBAAA,EAAAyC,WAAA,CAEAD,qBAAqB;UAAA,SAClB1B,QAAQ;UAAA,gBACDZ,KAAK,CAACP;QAAY,IACvBW,KAAK;MAElB,KAILA,KAAK,CAACI,IAAI,GAAG;QAAER,KAAK,EAAEqB;MAAU,CAAC,CAAC,IAAAM,YAAA,CAAA1D,aAAA,EAAAsE,WAAA,CAEzBlB,SAAS;QAAA,SACNrB,KAAK,CAACP,YAAY,GAAGnB,KAAK,CAACkC,IAAI,CAAC,GAAGa,SAAS,CAACR;MAAK,IAChDW,aAAa,CAEzB;IACN,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VTreeviewChildren.mjs","names":["VTreeviewGroup","VTreeviewItem","VCheckboxBtn","IconValue","computed","reactive","toRaw","withModifiers","genericComponent","propsFactory","makeVTreeviewChildrenProps","loadChildren","Function","loadingIcon","type","String","default","items","Array","openOnClick","Boolean","undefined","indeterminateIcon","falseIcon","trueIcon","returnObject","selectable","selectedColor","selectStrategy","Object","VTreeviewChildren","name","props","setup","_ref","slots","isLoading","Set","isClickOnOpen","checkChildren","item","length","children","add","value","raw","delete","selectItem","select","isSelected","map","itemProps","loading","has","slotsWithItem","prepend","slotProps","_createVNode","_Fragment","includes","isIndeterminate","e","key","stopPropagation","internalItem","append","title","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref2","activatorProps","listItemProps","onToggleExpand","onClick"],"sources":["../../../src/labs/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, reactive, toRaw, withModifiers } from 'vue'\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\nimport type { SelectStrategyProp } from '@/composables/nested/nested'\nimport type { GenericProps } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VListItemSlots, 'default'>]: VListItemSlots[K] & {\n item: T\n internalItem: InternalListItem<T>\n }\n} & {\n default: never\n item: {\n props: InternalListItem['props']\n item: T\n internalItem: InternalListItem<T>\n }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n loadChildren: Function as PropType<(item: unknown) => Promise<void>>,\n loadingIcon: {\n type: String,\n default: '$loading',\n },\n items: Array as PropType<readonly InternalListItem[]>,\n openOnClick: {\n type: Boolean,\n default: undefined,\n },\n indeterminateIcon: {\n type: IconValue,\n default: '$checkboxIndeterminate',\n },\n falseIcon: IconValue,\n trueIcon: IconValue,\n returnObject: Boolean,\n selectable: Boolean,\n selectedColor: String,\n selectStrategy: [String, Function, Object] as PropType<SelectStrategyProp>,\n}, 'VTreeviewChildren')\n\nexport const VTreeviewChildren = genericComponent<new <T extends InternalListItem>(\n props: {\n items?: readonly T[]\n },\n slots: VTreeviewChildrenSlots<T>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VTreeviewChildren',\n\n props: makeVTreeviewChildrenProps(),\n\n setup (props, { slots }) {\n const isLoading = reactive(new Set<unknown>())\n\n const isClickOnOpen = computed(() => props.openOnClick != null ? props.openOnClick : props.selectable)\n\n async function checkChildren (item: InternalListItem) {\n try {\n if (!props.items?.length || !props.loadChildren) return\n\n if (item?.children?.length === 0) {\n isLoading.add(item.value)\n await props.loadChildren(item.raw)\n }\n } finally {\n isLoading.delete(item.value)\n }\n }\n\n function selectItem (select: (value: boolean) => void, isSelected: boolean) {\n if (props.selectable) {\n select(!isSelected)\n }\n }\n\n return () => slots.default?.() ?? props.items?.map(item => {\n const { children, props: itemProps } = item\n const loading = isLoading.has(item.value)\n const slotsWithItem = {\n prepend: slotProps => (\n <>\n { props.selectable && (!children || (children && !['leaf', 'single-leaf'].includes(props.selectStrategy as string))) && (\n <div>\n <VCheckboxBtn\n key={ item.value }\n modelValue={ slotProps.isSelected }\n loading={ loading }\n color={ props.selectedColor }\n indeterminate={ slotProps.isIndeterminate }\n indeterminateIcon={ props.indeterminateIcon }\n falseIcon={ props.falseIcon }\n trueIcon={ props.trueIcon }\n onClick={ withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']) }\n onKeydown={ (e: KeyboardEvent) => {\n if (!['Enter', 'Space'].includes(e.key)) return\n e.stopPropagation()\n selectItem(slotProps.select, slotProps.isSelected)\n }}\n />\n </div>\n )}\n\n { slots.prepend?.({ ...slotProps, item: item.raw, internalItem: item }) }\n </>\n ),\n append: slots.append ? slotProps => slots.append?.({ ...slotProps, item: item.raw, internalItem: item }) : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item: item.raw, internalItem: item }) : undefined,\n } satisfies VTreeviewItem['$props']['$children']\n\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps)\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return children ? (\n <VTreeviewGroup\n { ...treeviewGroupProps }\n value={ props.returnObject ? item.raw : treeviewGroupProps?.value }\n >\n {{\n activator: ({ props: activatorProps }) => {\n const listItemProps = {\n ...itemProps,\n ...activatorProps,\n value: itemProps?.value,\n onToggleExpand: [() => checkChildren(item), activatorProps.onClick] as any,\n onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] as any : undefined,\n }\n\n return (\n <VTreeviewItem\n { ...listItemProps }\n value={ props.returnObject ? toRaw(item.raw) : itemProps.value }\n loading={ loading }\n v-slots={ slotsWithItem }\n />\n )\n },\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n ),\n }}\n </VTreeviewGroup>\n ) : (\n slots.item?.({ props: itemProps, item: item.raw, internalItem: item }) ?? (\n <VTreeviewItem\n { ...itemProps }\n value={ props.returnObject ? toRaw(item.raw) : itemProps.value }\n v-slots={ slotsWithItem }\n />\n ))\n })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,aAAa;AAAA,SACbC,YAAY,gDAErB;AAAA,SACSC,SAAS,uCAElB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,aAAa,QAAQ,KAAK;AAAA,SACrDC,gBAAgB,EAAEC,YAAY,gCAEvC;AAqBA,OAAO,MAAMC,0BAA0B,GAAGD,YAAY,CAAC;EACrDE,YAAY,EAAEC,QAAsD;EACpEC,WAAW,EAAE;IACXC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,KAA8C;EACrDC,WAAW,EAAE;IACXL,IAAI,EAAEM,OAAO;IACbJ,OAAO,EAAEK;EACX,CAAC;EACDC,iBAAiB,EAAE;IACjBR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Ac,CAACG,OAAO,CAAC,GAAUvD;UAC9F,CAAC;UAED,OAAAoC,YAAA,CAAAxD,aAAA,EAAAqE,WAAA,CAESI,aAAa;YAAA,SACV1C,KAAK,CAACP,YAAY,GAAGnB,KAAK,CAACkC,IAAI,CAACK,GAAG,CAAC,GAAGM,SAAS,CAACP,KAAK;YAAA,WACpDQ;UAAO,IACPE,aAAa;QAG7B,CAAC;QACDtC,OAAO,EAAEA,CAAA,KAAAyC,YAAA,CAAA3B,iBAAA,EAAAwC,WAAA,CAEAD,qBAAqB;UAAA,SAClB3B,QAAQ;UAAA,gBACDV,KAAK,CAACP;QAAY,IACvBU,KAAK;MAElB,KAILA,KAAK,CAACK,IAAI,GAAG;QAAER,KAAK,EAAEmB,SAAS;QAAEX,IAAI,EAAEA,IAAI,CAACK,GAAG;QAAEmB,YAAY,EAAExB;MAAK,CAAC,CAAC,IAAAiB,YAAA,CAAAxD,aAAA,EAAAqE,WAAA,CAE7DnB,SAAS;QAAA,SACNnB,KAAK,CAACP,YAAY,GAAGnB,KAAK,CAACkC,IAAI,CAACK,GAAG,CAAC,GAAGM,SAAS,CAACP;MAAK,IACpDU,aAAa,CAEzB;IACN,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -219,7 +219,6 @@ declare const VTreeview: {
|
|
|
219
219
|
selected?: any;
|
|
220
220
|
elevation?: string | number | undefined;
|
|
221
221
|
rounded?: string | number | boolean | undefined;
|
|
222
|
-
openOnClick?: boolean | undefined;
|
|
223
222
|
baseColor?: string | undefined;
|
|
224
223
|
bgColor?: string | undefined;
|
|
225
224
|
activeColor?: string | undefined;
|
|
@@ -241,6 +240,7 @@ declare const VTreeview: {
|
|
|
241
240
|
value: boolean;
|
|
242
241
|
path: unknown[];
|
|
243
242
|
}) => void) | undefined;
|
|
243
|
+
openOnClick?: boolean | undefined;
|
|
244
244
|
selectedColor?: string | undefined;
|
|
245
245
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
246
246
|
} & {
|
|
@@ -317,7 +317,6 @@ declare const VTreeview: {
|
|
|
317
317
|
selected?: any;
|
|
318
318
|
elevation?: string | number | undefined;
|
|
319
319
|
rounded?: string | number | boolean | undefined;
|
|
320
|
-
openOnClick?: boolean | undefined;
|
|
321
320
|
baseColor?: string | undefined;
|
|
322
321
|
bgColor?: string | undefined;
|
|
323
322
|
activeColor?: string | undefined;
|
|
@@ -339,6 +338,7 @@ declare const VTreeview: {
|
|
|
339
338
|
value: boolean;
|
|
340
339
|
path: unknown[];
|
|
341
340
|
}) => void) | undefined;
|
|
341
|
+
openOnClick?: boolean | undefined;
|
|
342
342
|
selectedColor?: string | undefined;
|
|
343
343
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
344
344
|
} & {
|
|
@@ -365,7 +365,6 @@ declare const VTreeview: {
|
|
|
365
365
|
mandatory: boolean;
|
|
366
366
|
modelValue: unknown[];
|
|
367
367
|
rounded: string | number | boolean;
|
|
368
|
-
openOnClick: boolean;
|
|
369
368
|
tile: boolean;
|
|
370
369
|
density: Density;
|
|
371
370
|
slim: boolean;
|
|
@@ -384,6 +383,7 @@ declare const VTreeview: {
|
|
|
384
383
|
itemValue: SelectItemKey;
|
|
385
384
|
itemChildren: SelectItemKey;
|
|
386
385
|
itemProps: SelectItemKey;
|
|
386
|
+
openOnClick: boolean;
|
|
387
387
|
loadingIcon: string;
|
|
388
388
|
openAll: boolean;
|
|
389
389
|
}, true, {}, vue.SlotsType<Partial<{
|
|
@@ -463,7 +463,6 @@ declare const VTreeview: {
|
|
|
463
463
|
selected?: any;
|
|
464
464
|
elevation?: string | number | undefined;
|
|
465
465
|
rounded?: string | number | boolean | undefined;
|
|
466
|
-
openOnClick?: boolean | undefined;
|
|
467
466
|
baseColor?: string | undefined;
|
|
468
467
|
bgColor?: string | undefined;
|
|
469
468
|
activeColor?: string | undefined;
|
|
@@ -485,6 +484,7 @@ declare const VTreeview: {
|
|
|
485
484
|
value: boolean;
|
|
486
485
|
path: unknown[];
|
|
487
486
|
}) => void) | undefined;
|
|
487
|
+
openOnClick?: boolean | undefined;
|
|
488
488
|
selectedColor?: string | undefined;
|
|
489
489
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
490
490
|
} & {
|
|
@@ -511,7 +511,6 @@ declare const VTreeview: {
|
|
|
511
511
|
mandatory: boolean;
|
|
512
512
|
modelValue: unknown[];
|
|
513
513
|
rounded: string | number | boolean;
|
|
514
|
-
openOnClick: boolean;
|
|
515
514
|
tile: boolean;
|
|
516
515
|
density: Density;
|
|
517
516
|
slim: boolean;
|
|
@@ -530,6 +529,7 @@ declare const VTreeview: {
|
|
|
530
529
|
itemValue: SelectItemKey;
|
|
531
530
|
itemChildren: SelectItemKey;
|
|
532
531
|
itemProps: SelectItemKey;
|
|
532
|
+
openOnClick: boolean;
|
|
533
533
|
loadingIcon: string;
|
|
534
534
|
openAll: boolean;
|
|
535
535
|
}>;
|
|
@@ -580,7 +580,6 @@ declare const VTreeview: {
|
|
|
580
580
|
selected?: any;
|
|
581
581
|
elevation?: string | number | undefined;
|
|
582
582
|
rounded?: string | number | boolean | undefined;
|
|
583
|
-
openOnClick?: boolean | undefined;
|
|
584
583
|
baseColor?: string | undefined;
|
|
585
584
|
bgColor?: string | undefined;
|
|
586
585
|
activeColor?: string | undefined;
|
|
@@ -602,6 +601,7 @@ declare const VTreeview: {
|
|
|
602
601
|
value: boolean;
|
|
603
602
|
path: unknown[];
|
|
604
603
|
}) => void) | undefined;
|
|
604
|
+
openOnClick?: boolean | undefined;
|
|
605
605
|
selectedColor?: string | undefined;
|
|
606
606
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
607
607
|
} & {
|
|
@@ -643,7 +643,6 @@ declare const VTreeview: {
|
|
|
643
643
|
mandatory: boolean;
|
|
644
644
|
modelValue: unknown[];
|
|
645
645
|
rounded: string | number | boolean;
|
|
646
|
-
openOnClick: boolean;
|
|
647
646
|
tile: boolean;
|
|
648
647
|
density: Density;
|
|
649
648
|
slim: boolean;
|
|
@@ -662,6 +661,7 @@ declare const VTreeview: {
|
|
|
662
661
|
itemValue: SelectItemKey;
|
|
663
662
|
itemChildren: SelectItemKey;
|
|
664
663
|
itemProps: SelectItemKey;
|
|
664
|
+
openOnClick: boolean;
|
|
665
665
|
loadingIcon: string;
|
|
666
666
|
openAll: boolean;
|
|
667
667
|
}, {}, string, vue.SlotsType<Partial<{
|