vuetify 3.7.0 → 3.7.2
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 +172 -172
- package/dist/json/importMap-labs.json +8 -8
- package/dist/json/importMap.json +160 -160
- package/dist/json/web-types.json +230 -219
- package/dist/vuetify-labs.css +1941 -1926
- package/dist/vuetify-labs.d.ts +4266 -2397
- package/dist/vuetify-labs.esm.js +107 -111
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +107 -111
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1521 -1506
- package/dist/vuetify.d.ts +1282 -901
- package/dist/vuetify.esm.js +79 -54
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +79 -54
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1087 -1086
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +4 -1
- package/lib/blueprints/md1.d.mts +4 -1
- package/lib/blueprints/md2.d.mts +4 -1
- package/lib/blueprints/md3.d.mts +4 -1
- package/lib/components/VAlert/index.d.mts +14 -11
- package/lib/components/VAppBar/index.d.mts +22 -19
- package/lib/components/VAutocomplete/index.d.mts +158 -110
- package/lib/components/VAvatar/VAvatar.css +1 -1
- package/lib/components/VAvatar/_variables.scss +1 -1
- package/lib/components/VAvatar/index.d.mts +8 -5
- package/lib/components/VBadge/index.d.mts +8 -5
- package/lib/components/VBanner/index.d.mts +18 -15
- package/lib/components/VBottomNavigation/index.d.mts +4 -4
- package/lib/components/VBottomSheet/index.d.mts +11 -11
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +3 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +8 -5
- package/lib/components/VBtn/VBtn.mjs +3 -4
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +18 -15
- package/lib/components/VBtnGroup/index.d.mts +4 -4
- package/lib/components/VBtnToggle/index.d.mts +4 -4
- package/lib/components/VCard/VCard.mjs +3 -4
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.mts +18 -15
- package/lib/components/VCarousel/index.d.mts +17 -14
- package/lib/components/VCheckbox/index.d.mts +8 -5
- package/lib/components/VChip/VChip.mjs +2 -3
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.mts +12 -9
- package/lib/components/VChipGroup/index.d.mts +8 -5
- package/lib/components/VColorPicker/index.d.mts +22 -22
- package/lib/components/VCombobox/index.d.mts +158 -110
- package/lib/components/VDataTable/index.d.mts +18 -15
- package/lib/components/VDatePicker/index.d.mts +16 -13
- package/lib/components/VDialog/VDialog.css +4 -1
- package/lib/components/VDialog/VDialog.mjs +3 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +2 -1
- package/lib/components/VDialog/index.d.mts +89 -50
- package/lib/components/VEmptyState/index.d.mts +12 -9
- package/lib/components/VExpansionPanel/index.d.mts +8 -5
- package/lib/components/VFab/index.d.mts +22 -19
- package/lib/components/VField/index.d.mts +4 -1
- package/lib/components/VFileInput/index.d.mts +34 -7
- package/lib/components/VFooter/index.d.mts +4 -4
- package/lib/components/VForm/index.d.mts +96 -3
- package/lib/components/VIcon/index.d.mts +8 -5
- package/lib/components/VInfiniteScroll/VInfiniteScroll.css +13 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +6 -8
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.sass +10 -1
- package/lib/components/VInput/index.d.mts +6 -3
- package/lib/components/VItemGroup/index.d.mts +4 -4
- package/lib/components/VLabel/index.d.mts +4 -4
- package/lib/components/VList/VList.mjs +4 -2
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +8 -6
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +84 -24
- package/lib/components/VMenu/index.d.mts +92 -50
- package/lib/components/VMessages/index.d.mts +8 -8
- package/lib/components/VNavigationDrawer/index.d.mts +18 -18
- package/lib/components/VOtpInput/index.d.mts +4 -4
- package/lib/components/VOverlay/index.d.mts +11 -11
- package/lib/components/VPagination/index.d.mts +8 -5
- package/lib/components/VProgressCircular/index.d.mts +4 -4
- package/lib/components/VRadio/index.d.mts +4 -1
- package/lib/components/VRadioGroup/index.d.mts +6 -3
- package/lib/components/VRangeSlider/index.d.mts +12 -9
- package/lib/components/VRating/index.d.mts +4 -1
- package/lib/components/VSelect/index.d.mts +158 -110
- package/lib/components/VSelectionControl/index.d.mts +4 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +4 -1
- package/lib/components/VSheet/index.d.mts +10 -10
- package/lib/components/VSkeletonLoader/index.d.mts +4 -4
- package/lib/components/VSlideGroup/index.d.mts +4 -1
- package/lib/components/VSlider/index.d.mts +12 -9
- package/lib/components/VSnackbar/index.d.mts +95 -62
- package/lib/components/VSpeedDial/index.d.mts +11 -11
- package/lib/components/VStepper/index.d.mts +12 -12
- package/lib/components/VSwitch/index.d.mts +6 -3
- package/lib/components/VSystemBar/index.d.mts +4 -4
- package/lib/components/VTabs/index.d.mts +69 -54
- package/lib/components/VTextField/index.d.mts +47 -14
- package/lib/components/VTextarea/index.d.mts +38 -11
- package/lib/components/VTimeline/index.d.mts +8 -5
- package/lib/components/VToolbar/index.d.mts +4 -4
- package/lib/components/VTooltip/index.d.mts +78 -45
- package/lib/components/VWindow/index.d.mts +10 -7
- package/lib/components/index.d.mts +1204 -814
- package/lib/components/index.mjs +1 -1
- package/lib/components/index.mjs.map +1 -1
- package/lib/composables/directiveComponent.mjs +1 -1
- package/lib/composables/directiveComponent.mjs.map +1 -1
- package/lib/composables/forwardRefs.mjs +2 -0
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +18 -6
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +2 -4
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/router.mjs +19 -9
- package/lib/composables/router.mjs.map +1 -1
- package/lib/directives/tooltip/index.mjs +1 -1
- package/lib/directives/tooltip/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.d.mts +4 -1
- package/lib/iconsets/fa.d.mts +4 -1
- package/lib/iconsets/fa4.d.mts +4 -1
- package/lib/iconsets/md.d.mts +4 -1
- package/lib/iconsets/mdi-svg.d.mts +4 -1
- package/lib/iconsets/mdi.d.mts +4 -1
- package/lib/index.d.mts +82 -88
- package/lib/labs/VDateInput/index.d.mts +16 -13
- package/lib/labs/VNumberInput/VNumberInput.mjs +7 -1
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +2212 -730
- package/lib/labs/VPicker/index.d.mts +10 -10
- package/lib/labs/VSnackbarQueue/index.d.mts +128 -95
- package/lib/labs/VStepperVertical/index.d.mts +10 -7
- package/lib/labs/VTimePicker/VTimePicker.mjs +1 -1
- package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +2 -2
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +26 -26
- package/lib/labs/VTimePicker/util.mjs +5 -0
- package/lib/labs/VTimePicker/util.mjs.map +1 -0
- package/lib/labs/VTreeview/VTreeview.mjs +3 -12
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.mjs +9 -20
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +44 -41
- package/lib/labs/components.d.mts +2515 -1000
- package/lib/util/helpers.mjs +7 -3
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +7 -13
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -21
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +0 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs +0 -22
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +0 -1
- package/lib/components/VDatePicker/util/index.mjs +0 -9
- package/lib/components/VDatePicker/util/index.mjs.map +0 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs +0 -7
- package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +0 -1
- package/lib/components/VDatePicker/util/monthChange.mjs +0 -18
- package/lib/components/VDatePicker/util/monthChange.mjs.map +0 -1
- package/lib/components/VDatePicker/util/pad.mjs +0 -21
- package/lib/components/VDatePicker/util/pad.mjs.map +0 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs +0 -12
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +0 -1
- package/lib/components/VTreeview/VTreeview.mjs +0 -350
- package/lib/components/VTreeview/VTreeview.mjs.map +0 -1
- package/lib/components/VTreeview/VTreeview.sass +0 -128
- package/lib/components/VTreeview/VTreeviewNode.mjs +0 -321
- package/lib/components/VTreeview/VTreeviewNode.mjs.map +0 -1
- package/lib/components/VTreeview/_mixins.sass +0 -18
- package/lib/components/VTreeview/_variables.scss +0 -10
- package/lib/components/VTreeview/index.mjs +0 -10
- package/lib/components/VTreeview/index.mjs.map +0 -1
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -25
- package/lib/components/VTreeview/util/filterTreeItems.mjs.map +0 -1
- package/lib/services/goto/easing-patterns.mjs +0 -27
- package/lib/services/goto/easing-patterns.mjs.map +0 -1
- package/lib/services/goto/index.mjs +0 -73
- package/lib/services/goto/index.mjs.map +0 -1
- package/lib/services/goto/util.mjs +0 -39
- package/lib/services/goto/util.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","Set","flatMap","getPath","getChildren","id","path","parent","unshift","parents","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) {\n return null\n }\n return new Set(filteredItems.value.flatMap(item => {\n return [...getPath(item.props.value), ...getChildren(item.props.value)]\n }))\n })\n\n function getPath (id: unknown) {\n const path: unknown[] = []\n let parent: unknown = id\n while (parent != null) {\n path.unshift(parent)\n parent = vListRef.value?.parents.get(parent)\n }\n return path\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,EAA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EAAE5E,KAAK,CAAC8B,KAAK,EAAE,SAAS;MACjC;IACF,CAAC,CAAC;IAEF1B,SAAS,CAAC,MAAM;MACd,MAAMyE,SAAS,GAAGtF,KAAK,CAACuF,WAAW,CAAChD,KAAK,CAAC;MAE1C,MAAMiD,qBAAqB,GAAG3F,iBAAiB,CAAC0F,WAAW,CAAChD,KAAK,CAAC;MAElE,OAAAkD,YAAA,CAAAzF,KAAA,EAAA0F,WAAA;QAAA,OAEUnC;MAAQ,GACT+B,SAAS;QAAA,SACP,CACL,YAAY,EACZ/C,KAAK,CAACoD,KAAK,CACZ;QAAA;QAAA,SAEOpD,KAAK,CAACqD,KAAK;QAAA,UACVpC,MAAM,CAACd,KAAK;QAAA,aACDO,SAAS,CAACP,KAAK;QAAA,sBAAAmD,MAAA,IAAf5C,SAAS,CAACP,KAAK,GAAAmD,MAAA;QAAA,YAChBzC,QAAQ,CAACV,KAAK;QAAA,qBAAAmD,MAAA,IAAdzC,QAAQ,CAACV,KAAK,GAAAmD;MAAA;QAAAzD,OAAA,EAAAA,CAAA,MAAAqD,YAAA,CAAA5F,iBAAA,EAAA6F,WAAA,CAG1BF,qBAAqB;UAAA,gBACXjD,KAAK,CAACqC,YAAY;UAAA,SACzB5D,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","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;EAChBC,MAAM,EAAEC,MAAM;EAEd,GAAG1B,eAAe,CA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AK,IACTG,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -105,7 +105,7 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
105
105
|
...itemProps,
|
|
106
106
|
...activatorProps,
|
|
107
107
|
value: itemProps?.value,
|
|
108
|
-
onToggleExpand: activatorProps.onClick,
|
|
108
|
+
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
|
109
109
|
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : undefined
|
|
110
110
|
};
|
|
111
111
|
return _createVNode(VTreeviewItem, _mergeProps(listItemProps, {
|
|
@@ -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: 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"],"mapp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K,CAACP,YAAY,GAAGe,IAAI,GAAG4B,kBAAkB,EAAEvB;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,EAAEF,cAAc,CAACG,OAAc;YAC7CA,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","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;AAAA,SACbC,YAAY,gDAErB;AAAA,SACSC,SAAS,uCAElB;AACA,SAASC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,aAAa,QAAQ,KAAK;AAAA,SACvDC,gBAAgB,EAAEC,YAAY,gCAEvC;AAcA,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,IAAI,EAAEX,SAAS;IACfa,OAAO,EAAE;EACX,CAAC;EACDO,SAAS,EAAEpB,SAAS;EACpBqB,QAAQ,EAA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Y,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":[]}
|
|
@@ -8,7 +8,6 @@ import { VListItemAction } from "../../components/VList/index.mjs";
|
|
|
8
8
|
import { makeVListItemProps, VListItem } from "../../components/VList/VListItem.mjs";
|
|
9
9
|
import { VProgressCircular } from "../../components/VProgressCircular/index.mjs"; // Composables
|
|
10
10
|
import { IconValue } from "../../composables/icons.mjs";
|
|
11
|
-
import { useNestedItem } from "../../composables/nested/nested.mjs";
|
|
12
11
|
import { useLink } from "../../composables/router.mjs"; // Utilities
|
|
13
12
|
import { computed, inject, ref } from 'vue';
|
|
14
13
|
import { EventProp, genericComponent, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
|
@@ -31,25 +30,13 @@ export const VTreeviewItem = genericComponent()({
|
|
|
31
30
|
emit
|
|
32
31
|
} = _ref;
|
|
33
32
|
const link = useLink(props, attrs);
|
|
34
|
-
const rawId = computed(() => props.value === undefined ? link.href.value : props.value);
|
|
35
33
|
const vListItemRef = ref();
|
|
36
|
-
const
|
|
37
|
-
activate,
|
|
38
|
-
isActivated,
|
|
39
|
-
isGroupActivator,
|
|
40
|
-
root,
|
|
41
|
-
id
|
|
42
|
-
} = useNestedItem(rawId, false);
|
|
43
|
-
const isActivatableGroupActivator = computed(() => root.activatable.value && isGroupActivator);
|
|
34
|
+
const isActivatableGroupActivator = computed(() => vListItemRef.value?.root.activatable.value && vListItemRef.value?.isGroupActivator);
|
|
44
35
|
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list || isActivatableGroupActivator.value));
|
|
45
36
|
function activateItem(e) {
|
|
46
|
-
if (!isClickable.value || !isActivatableGroupActivator.value && isGroupActivator) return;
|
|
47
|
-
if (root.activatable.value) {
|
|
48
|
-
|
|
49
|
-
activate(!isActivated.value, e);
|
|
50
|
-
} else {
|
|
51
|
-
vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e);
|
|
52
|
-
}
|
|
37
|
+
if (!isClickable.value || !isActivatableGroupActivator.value && vListItemRef.value?.isGroupActivator) return;
|
|
38
|
+
if (vListItemRef.value?.root.activatable.value) {
|
|
39
|
+
vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e);
|
|
53
40
|
}
|
|
54
41
|
}
|
|
55
42
|
const visibleIds = inject(VTreeviewSymbol, {
|
|
@@ -58,11 +45,13 @@ export const VTreeviewItem = genericComponent()({
|
|
|
58
45
|
useRender(() => {
|
|
59
46
|
const listItemProps = omit(VListItem.filterProps(props), ['onClick']);
|
|
60
47
|
const hasPrepend = slots.prepend || props.toggleIcon;
|
|
61
|
-
return _createVNode(VListItem, _mergeProps(
|
|
62
|
-
"
|
|
48
|
+
return _createVNode(VListItem, _mergeProps({
|
|
49
|
+
"ref": vListItemRef
|
|
50
|
+
}, listItemProps, {
|
|
51
|
+
"active": vListItemRef.value?.isActivated,
|
|
63
52
|
"class": ['v-treeview-item', {
|
|
64
53
|
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
|
65
|
-
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(
|
|
54
|
+
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(vListItemRef.value?.id)
|
|
66
55
|
}, props.class],
|
|
67
56
|
"ripple": false,
|
|
68
57
|
"onClick": props.onClick ?? activateItem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTreeviewItem.mjs","names":["VBtn","VListItemAction","makeVListItemProps","VListItem","VProgressCircular","IconValue","
|
|
1
|
+
{"version":3,"file":"VTreeviewItem.mjs","names":["VBtn","VListItemAction","makeVListItemProps","VListItem","VProgressCircular","IconValue","useLink","computed","inject","ref","EventProp","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","makeVTreeviewItemProps","loading","Boolean","onToggleExpand","toggleIcon","slim","VTreeviewItem","name","props","setup","_ref","attrs","slots","emit","link","vListItemRef","isActivatableGroupActivator","value","root","activatable","isGroupActivator","isClickable","disabled","list","activateItem","e","activate","isActivated","visibleIds","listItemProps","filterProps","hasPrepend","prepend","_createVNode","_mergeProps","has","id","class","onClick","slotProps","_Fragment","default","loader","undefined"],"sources":["../../../src/labs/VTreeview/VTreeviewItem.tsx"],"sourcesContent":["// Styles\nimport './VTreeviewItem.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VListItemAction } from '@/components/VList'\nimport { makeVListItemProps, VListItem } from '@/components/VList/VListItem'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLink } from '@/composables/router'\n\n// Utilities\nimport { computed, inject, ref } from 'vue'\nimport { EventProp, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\n\nexport const makeVTreeviewItemProps = propsFactory({\n loading: Boolean,\n onToggleExpand: EventProp<[MouseEvent]>(),\n toggleIcon: IconValue,\n\n ...makeVListItemProps({ slim: true }),\n}, 'VTreeviewItem')\n\nexport const VTreeviewItem = genericComponent<VListItemSlots>()({\n name: 'VTreeviewItem',\n\n props: makeVTreeviewItemProps(),\n\n setup (props, { attrs, slots, emit }) {\n const link = useLink(props, attrs)\n const vListItemRef = ref<VListItem>()\n\n const isActivatableGroupActivator = computed(() =>\n (vListItemRef.value?.root.activatable.value) &&\n vListItemRef.value?.isGroupActivator\n )\n\n const isClickable = computed(() =>\n !props.disabled &&\n props.link !== false &&\n (props.link || link.isClickable.value || (props.value != null && !!vListItemRef.value?.list) || isActivatableGroupActivator.value)\n )\n\n function activateItem (e: MouseEvent | KeyboardEvent) {\n if (\n !isClickable.value ||\n (!isActivatableGroupActivator.value && vListItemRef.value?.isGroupActivator)\n ) return\n\n if (vListItemRef.value?.root.activatable.value) {\n vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e)\n }\n }\n\n const visibleIds = inject(VTreeviewSymbol, { visibleIds: ref() }).visibleIds\n\n useRender(() => {\n const listItemProps = omit(VListItem.filterProps(props), ['onClick'])\n const hasPrepend = slots.prepend || props.toggleIcon\n\n return (\n <VListItem\n ref={ vListItemRef }\n { ...listItemProps }\n active={ vListItemRef.value?.isActivated }\n class={[\n 'v-treeview-item',\n {\n 'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,\n 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(vListItemRef.value?.id),\n },\n props.class,\n ]}\n ripple={ false }\n onClick={ props.onClick ?? activateItem }\n >\n {{\n ...slots,\n prepend: hasPrepend ? slotProps => {\n return (\n <>\n { props.toggleIcon && (\n <VListItemAction start={ false }>\n <VBtn\n density=\"compact\"\n icon={ props.toggleIcon }\n loading={ props.loading }\n variant=\"text\"\n onClick={ props.onToggleExpand }\n >\n {{\n loader () {\n return (\n <VProgressCircular\n indeterminate=\"disable-shrink\"\n size=\"20\"\n width=\"2\"\n />\n )\n },\n }}\n </VBtn>\n </VListItemAction>\n )}\n\n { slots.prepend?.(slotProps) }\n </>\n )\n } : undefined,\n }}\n </VListItem>\n )\n })\n\n return {}\n },\n})\n\nexport type VTreeviewItem = InstanceType<typeof VTreeviewItem>\n"],"mappings":";AAAA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MAAY;QAGrC,GAAGZ,KAAK;QACRoB,OAAO,EAAED,UAAU,GAAGQ,SAAS,IAAI;UACjC,OAAAN,YAAA,CAAAO,SAAA,SAEMhC,KAAK,CAACJ,UAAU,IAAA6B,YAAA,CAAAhD,eAAA;YAAA,SACS;UAAK;YAAAwD,OAAA,EAAAA,CAAA,MAAAR,YAAA,CAAAjD,IAAA;cAAA;cAAA,QAGnBwB,KAAK,CAACJ,UAAU;cAAA,WACbI,KAAK,CAACP,OAAO;cAAA;cAAA,WAEbO,KAAK,CAACL;YAAc;cAG5BuC,MAAMA,CAAA,EAAI;gBACR,OAAAT,YAAA,CAAA7C,iBAAA;kBAAA;kBAAA;kBAAA;gBAAA;cAOF;YAAC;UAAA,EAIR,EAECwB,KAAK,CAACoB,OAAO,GAAGO,SAAS,CAAC;QAGlC,CAAC,GAAGI;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode,
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, PropType, ComponentPublicInstance, FunctionalComponent, DirectiveBinding } from 'vue';
|
|
3
3
|
// @ts-ignore
|
|
4
4
|
import * as vue_router from 'vue-router';
|
|
5
5
|
|
|
@@ -42,6 +42,9 @@ type Density = null | 'default' | 'comfortable' | 'compact';
|
|
|
42
42
|
declare const allowedVariants: readonly ["elevated", "flat", "tonal", "outlined", "text", "plain"];
|
|
43
43
|
type Variant = typeof allowedVariants[number];
|
|
44
44
|
|
|
45
|
+
type JSXComponent<Props = any> = {
|
|
46
|
+
new (): ComponentPublicInstance<Props>;
|
|
47
|
+
} | FunctionalComponent<Props>;
|
|
45
48
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
46
49
|
declare const IconValue: PropType<IconValue>;
|
|
47
50
|
|
|
@@ -177,6 +180,7 @@ declare const VTreeview: {
|
|
|
177
180
|
style: vue.StyleValue;
|
|
178
181
|
disabled: boolean;
|
|
179
182
|
tag: string;
|
|
183
|
+
lines: false | "one" | "two" | "three";
|
|
180
184
|
mandatory: boolean;
|
|
181
185
|
modelValue: unknown[];
|
|
182
186
|
tile: boolean;
|
|
@@ -189,7 +193,6 @@ declare const VTreeview: {
|
|
|
189
193
|
selectStrategy: SelectStrategyProp;
|
|
190
194
|
collapseIcon: string;
|
|
191
195
|
expandIcon: string;
|
|
192
|
-
lines: false | "one" | "two" | "three";
|
|
193
196
|
returnObject: boolean;
|
|
194
197
|
filterMode: FilterMode;
|
|
195
198
|
noFilter: boolean;
|
|
@@ -212,10 +215,11 @@ declare const VTreeview: {
|
|
|
212
215
|
minWidth?: string | number | undefined;
|
|
213
216
|
activated?: any;
|
|
214
217
|
class?: any;
|
|
218
|
+
theme?: string | undefined;
|
|
215
219
|
selected?: any;
|
|
216
220
|
elevation?: string | number | undefined;
|
|
217
|
-
theme?: string | undefined;
|
|
218
221
|
rounded?: string | number | boolean | undefined;
|
|
222
|
+
openOnClick?: boolean | undefined;
|
|
219
223
|
baseColor?: string | undefined;
|
|
220
224
|
bgColor?: string | undefined;
|
|
221
225
|
activeColor?: string | undefined;
|
|
@@ -237,7 +241,6 @@ declare const VTreeview: {
|
|
|
237
241
|
value: boolean;
|
|
238
242
|
path: unknown[];
|
|
239
243
|
}) => void) | undefined;
|
|
240
|
-
openOnClick?: boolean | undefined;
|
|
241
244
|
selectedColor?: string | undefined;
|
|
242
245
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
243
246
|
} & {
|
|
@@ -275,6 +278,7 @@ declare const VTreeview: {
|
|
|
275
278
|
style: vue.StyleValue;
|
|
276
279
|
disabled: boolean;
|
|
277
280
|
tag: string;
|
|
281
|
+
lines: false | "one" | "two" | "three";
|
|
278
282
|
mandatory: boolean;
|
|
279
283
|
modelValue: unknown[];
|
|
280
284
|
tile: boolean;
|
|
@@ -287,7 +291,6 @@ declare const VTreeview: {
|
|
|
287
291
|
selectStrategy: SelectStrategyProp;
|
|
288
292
|
collapseIcon: string;
|
|
289
293
|
expandIcon: string;
|
|
290
|
-
lines: false | "one" | "two" | "three";
|
|
291
294
|
returnObject: boolean;
|
|
292
295
|
filterMode: FilterMode;
|
|
293
296
|
noFilter: boolean;
|
|
@@ -310,10 +313,11 @@ declare const VTreeview: {
|
|
|
310
313
|
minWidth?: string | number | undefined;
|
|
311
314
|
activated?: any;
|
|
312
315
|
class?: any;
|
|
316
|
+
theme?: string | undefined;
|
|
313
317
|
selected?: any;
|
|
314
318
|
elevation?: string | number | undefined;
|
|
315
|
-
theme?: string | undefined;
|
|
316
319
|
rounded?: string | number | boolean | undefined;
|
|
320
|
+
openOnClick?: boolean | undefined;
|
|
317
321
|
baseColor?: string | undefined;
|
|
318
322
|
bgColor?: string | undefined;
|
|
319
323
|
activeColor?: string | undefined;
|
|
@@ -335,7 +339,6 @@ declare const VTreeview: {
|
|
|
335
339
|
value: boolean;
|
|
336
340
|
path: unknown[];
|
|
337
341
|
}) => void) | undefined;
|
|
338
|
-
openOnClick?: boolean | undefined;
|
|
339
342
|
selectedColor?: string | undefined;
|
|
340
343
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
341
344
|
} & {
|
|
@@ -358,9 +361,11 @@ declare const VTreeview: {
|
|
|
358
361
|
style: vue.StyleValue;
|
|
359
362
|
disabled: boolean;
|
|
360
363
|
tag: string;
|
|
364
|
+
lines: false | "one" | "two" | "three";
|
|
361
365
|
mandatory: boolean;
|
|
362
366
|
modelValue: unknown[];
|
|
363
367
|
rounded: string | number | boolean;
|
|
368
|
+
openOnClick: boolean;
|
|
364
369
|
tile: boolean;
|
|
365
370
|
density: Density;
|
|
366
371
|
slim: boolean;
|
|
@@ -371,7 +376,6 @@ declare const VTreeview: {
|
|
|
371
376
|
selectStrategy: SelectStrategyProp;
|
|
372
377
|
collapseIcon: string;
|
|
373
378
|
expandIcon: string;
|
|
374
|
-
lines: false | "one" | "two" | "three";
|
|
375
379
|
returnObject: boolean;
|
|
376
380
|
filterMode: FilterMode;
|
|
377
381
|
noFilter: boolean;
|
|
@@ -380,7 +384,6 @@ declare const VTreeview: {
|
|
|
380
384
|
itemValue: SelectItemKey;
|
|
381
385
|
itemChildren: SelectItemKey;
|
|
382
386
|
itemProps: SelectItemKey;
|
|
383
|
-
openOnClick: boolean;
|
|
384
387
|
loadingIcon: string;
|
|
385
388
|
openAll: boolean;
|
|
386
389
|
}, true, {}, vue.SlotsType<Partial<{
|
|
@@ -421,6 +424,7 @@ declare const VTreeview: {
|
|
|
421
424
|
style: vue.StyleValue;
|
|
422
425
|
disabled: boolean;
|
|
423
426
|
tag: string;
|
|
427
|
+
lines: false | "one" | "two" | "three";
|
|
424
428
|
mandatory: boolean;
|
|
425
429
|
modelValue: unknown[];
|
|
426
430
|
tile: boolean;
|
|
@@ -433,7 +437,6 @@ declare const VTreeview: {
|
|
|
433
437
|
selectStrategy: SelectStrategyProp;
|
|
434
438
|
collapseIcon: string;
|
|
435
439
|
expandIcon: string;
|
|
436
|
-
lines: false | "one" | "two" | "three";
|
|
437
440
|
returnObject: boolean;
|
|
438
441
|
filterMode: FilterMode;
|
|
439
442
|
noFilter: boolean;
|
|
@@ -456,10 +459,11 @@ declare const VTreeview: {
|
|
|
456
459
|
minWidth?: string | number | undefined;
|
|
457
460
|
activated?: any;
|
|
458
461
|
class?: any;
|
|
462
|
+
theme?: string | undefined;
|
|
459
463
|
selected?: any;
|
|
460
464
|
elevation?: string | number | undefined;
|
|
461
|
-
theme?: string | undefined;
|
|
462
465
|
rounded?: string | number | boolean | undefined;
|
|
466
|
+
openOnClick?: boolean | undefined;
|
|
463
467
|
baseColor?: string | undefined;
|
|
464
468
|
bgColor?: string | undefined;
|
|
465
469
|
activeColor?: string | undefined;
|
|
@@ -481,7 +485,6 @@ declare const VTreeview: {
|
|
|
481
485
|
value: boolean;
|
|
482
486
|
path: unknown[];
|
|
483
487
|
}) => void) | undefined;
|
|
484
|
-
openOnClick?: boolean | undefined;
|
|
485
488
|
selectedColor?: string | undefined;
|
|
486
489
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
487
490
|
} & {
|
|
@@ -504,9 +507,11 @@ declare const VTreeview: {
|
|
|
504
507
|
style: vue.StyleValue;
|
|
505
508
|
disabled: boolean;
|
|
506
509
|
tag: string;
|
|
510
|
+
lines: false | "one" | "two" | "three";
|
|
507
511
|
mandatory: boolean;
|
|
508
512
|
modelValue: unknown[];
|
|
509
513
|
rounded: string | number | boolean;
|
|
514
|
+
openOnClick: boolean;
|
|
510
515
|
tile: boolean;
|
|
511
516
|
density: Density;
|
|
512
517
|
slim: boolean;
|
|
@@ -517,7 +522,6 @@ declare const VTreeview: {
|
|
|
517
522
|
selectStrategy: SelectStrategyProp;
|
|
518
523
|
collapseIcon: string;
|
|
519
524
|
expandIcon: string;
|
|
520
|
-
lines: false | "one" | "two" | "three";
|
|
521
525
|
returnObject: boolean;
|
|
522
526
|
filterMode: FilterMode;
|
|
523
527
|
noFilter: boolean;
|
|
@@ -526,7 +530,6 @@ declare const VTreeview: {
|
|
|
526
530
|
itemValue: SelectItemKey;
|
|
527
531
|
itemChildren: SelectItemKey;
|
|
528
532
|
itemProps: SelectItemKey;
|
|
529
|
-
openOnClick: boolean;
|
|
530
533
|
loadingIcon: string;
|
|
531
534
|
openAll: boolean;
|
|
532
535
|
}>;
|
|
@@ -538,6 +541,7 @@ declare const VTreeview: {
|
|
|
538
541
|
style: vue.StyleValue;
|
|
539
542
|
disabled: boolean;
|
|
540
543
|
tag: string;
|
|
544
|
+
lines: false | "one" | "two" | "three";
|
|
541
545
|
mandatory: boolean;
|
|
542
546
|
modelValue: unknown[];
|
|
543
547
|
tile: boolean;
|
|
@@ -550,7 +554,6 @@ declare const VTreeview: {
|
|
|
550
554
|
selectStrategy: SelectStrategyProp;
|
|
551
555
|
collapseIcon: string;
|
|
552
556
|
expandIcon: string;
|
|
553
|
-
lines: false | "one" | "two" | "three";
|
|
554
557
|
returnObject: boolean;
|
|
555
558
|
filterMode: FilterMode;
|
|
556
559
|
noFilter: boolean;
|
|
@@ -573,10 +576,11 @@ declare const VTreeview: {
|
|
|
573
576
|
minWidth?: string | number | undefined;
|
|
574
577
|
activated?: any;
|
|
575
578
|
class?: any;
|
|
579
|
+
theme?: string | undefined;
|
|
576
580
|
selected?: any;
|
|
577
581
|
elevation?: string | number | undefined;
|
|
578
|
-
theme?: string | undefined;
|
|
579
582
|
rounded?: string | number | boolean | undefined;
|
|
583
|
+
openOnClick?: boolean | undefined;
|
|
580
584
|
baseColor?: string | undefined;
|
|
581
585
|
bgColor?: string | undefined;
|
|
582
586
|
activeColor?: string | undefined;
|
|
@@ -598,7 +602,6 @@ declare const VTreeview: {
|
|
|
598
602
|
value: boolean;
|
|
599
603
|
path: unknown[];
|
|
600
604
|
}) => void) | undefined;
|
|
601
|
-
openOnClick?: boolean | undefined;
|
|
602
605
|
selectedColor?: string | undefined;
|
|
603
606
|
loadChildren?: ((item: unknown) => Promise<void>) | undefined;
|
|
604
607
|
} & {
|
|
@@ -636,9 +639,11 @@ declare const VTreeview: {
|
|
|
636
639
|
style: vue.StyleValue;
|
|
637
640
|
disabled: boolean;
|
|
638
641
|
tag: string;
|
|
642
|
+
lines: false | "one" | "two" | "three";
|
|
639
643
|
mandatory: boolean;
|
|
640
644
|
modelValue: unknown[];
|
|
641
645
|
rounded: string | number | boolean;
|
|
646
|
+
openOnClick: boolean;
|
|
642
647
|
tile: boolean;
|
|
643
648
|
density: Density;
|
|
644
649
|
slim: boolean;
|
|
@@ -649,7 +654,6 @@ declare const VTreeview: {
|
|
|
649
654
|
selectStrategy: SelectStrategyProp;
|
|
650
655
|
collapseIcon: string;
|
|
651
656
|
expandIcon: string;
|
|
652
|
-
lines: false | "one" | "two" | "three";
|
|
653
657
|
returnObject: boolean;
|
|
654
658
|
filterMode: FilterMode;
|
|
655
659
|
noFilter: boolean;
|
|
@@ -658,7 +662,6 @@ declare const VTreeview: {
|
|
|
658
662
|
itemValue: SelectItemKey;
|
|
659
663
|
itemChildren: SelectItemKey;
|
|
660
664
|
itemProps: SelectItemKey;
|
|
661
|
-
openOnClick: boolean;
|
|
662
665
|
loadingIcon: string;
|
|
663
666
|
openAll: boolean;
|
|
664
667
|
}, {}, string, vue.SlotsType<Partial<{
|
|
@@ -717,17 +720,21 @@ declare const VTreeview: {
|
|
|
717
720
|
disabled: BooleanConstructor;
|
|
718
721
|
activated: null;
|
|
719
722
|
class: vue.PropType<ClassValue>;
|
|
723
|
+
theme: StringConstructor;
|
|
720
724
|
tag: {
|
|
721
725
|
type: StringConstructor;
|
|
722
726
|
default: string;
|
|
723
727
|
};
|
|
728
|
+
lines: {
|
|
729
|
+
type: vue.PropType<"one" | "two" | "three" | false>;
|
|
730
|
+
default: string;
|
|
731
|
+
};
|
|
724
732
|
mandatory: BooleanConstructor;
|
|
725
733
|
selected: null;
|
|
726
734
|
elevation: {
|
|
727
735
|
type: (StringConstructor | NumberConstructor)[];
|
|
728
736
|
validator(v: any): boolean;
|
|
729
737
|
};
|
|
730
|
-
theme: StringConstructor;
|
|
731
738
|
rounded: {
|
|
732
739
|
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
733
740
|
default: undefined;
|
|
@@ -771,10 +778,6 @@ declare const VTreeview: {
|
|
|
771
778
|
type: vue.PropType<string>;
|
|
772
779
|
default: string;
|
|
773
780
|
};
|
|
774
|
-
lines: {
|
|
775
|
-
type: vue.PropType<"one" | "two" | "three" | false>;
|
|
776
|
-
default: string;
|
|
777
|
-
};
|
|
778
781
|
returnObject: BooleanConstructor;
|
|
779
782
|
itemTitle: {
|
|
780
783
|
type: vue.PropType<SelectItemKey>;
|
|
@@ -859,17 +862,21 @@ declare const VTreeview: {
|
|
|
859
862
|
disabled: BooleanConstructor;
|
|
860
863
|
activated: null;
|
|
861
864
|
class: vue.PropType<ClassValue>;
|
|
865
|
+
theme: StringConstructor;
|
|
862
866
|
tag: {
|
|
863
867
|
type: StringConstructor;
|
|
864
868
|
default: string;
|
|
865
869
|
};
|
|
870
|
+
lines: {
|
|
871
|
+
type: vue.PropType<"one" | "two" | "three" | false>;
|
|
872
|
+
default: string;
|
|
873
|
+
};
|
|
866
874
|
mandatory: BooleanConstructor;
|
|
867
875
|
selected: null;
|
|
868
876
|
elevation: {
|
|
869
877
|
type: (StringConstructor | NumberConstructor)[];
|
|
870
878
|
validator(v: any): boolean;
|
|
871
879
|
};
|
|
872
|
-
theme: StringConstructor;
|
|
873
880
|
rounded: {
|
|
874
881
|
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
875
882
|
default: undefined;
|
|
@@ -913,10 +920,6 @@ declare const VTreeview: {
|
|
|
913
920
|
type: vue.PropType<string>;
|
|
914
921
|
default: string;
|
|
915
922
|
};
|
|
916
|
-
lines: {
|
|
917
|
-
type: vue.PropType<"one" | "two" | "three" | false>;
|
|
918
|
-
default: string;
|
|
919
|
-
};
|
|
920
923
|
returnObject: BooleanConstructor;
|
|
921
924
|
itemTitle: {
|
|
922
925
|
type: vue.PropType<SelectItemKey>;
|
|
@@ -1006,12 +1009,13 @@ declare const VTreeviewItem: {
|
|
|
1006
1009
|
value?: any;
|
|
1007
1010
|
title?: string | number | undefined;
|
|
1008
1011
|
class?: any;
|
|
1012
|
+
theme?: string | undefined;
|
|
1013
|
+
to?: vue_router.RouteLocationRaw | undefined;
|
|
1014
|
+
lines?: false | "one" | "two" | "three" | undefined;
|
|
1009
1015
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
|
1010
1016
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
|
1011
1017
|
href?: string | undefined;
|
|
1012
1018
|
elevation?: string | number | undefined;
|
|
1013
|
-
to?: vue_router.RouteLocationRaw | undefined;
|
|
1014
|
-
theme?: string | undefined;
|
|
1015
1019
|
rounded?: string | number | boolean | undefined;
|
|
1016
1020
|
baseColor?: string | undefined;
|
|
1017
1021
|
activeColor?: string | undefined;
|
|
@@ -1021,7 +1025,6 @@ declare const VTreeviewItem: {
|
|
|
1021
1025
|
appendAvatar?: string | undefined;
|
|
1022
1026
|
prependAvatar?: string | undefined;
|
|
1023
1027
|
subtitle?: string | number | undefined;
|
|
1024
|
-
lines?: false | "one" | "two" | "three" | undefined;
|
|
1025
1028
|
toggleIcon?: IconValue | undefined;
|
|
1026
1029
|
onToggleExpand?: ((args_0: MouseEvent) => void) | undefined;
|
|
1027
1030
|
} & {
|
|
@@ -1074,12 +1077,13 @@ declare const VTreeviewItem: {
|
|
|
1074
1077
|
value?: any;
|
|
1075
1078
|
title?: string | number | undefined;
|
|
1076
1079
|
class?: any;
|
|
1080
|
+
theme?: string | undefined;
|
|
1081
|
+
to?: vue_router.RouteLocationRaw | undefined;
|
|
1082
|
+
lines?: false | "one" | "two" | "three" | undefined;
|
|
1077
1083
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
|
1078
1084
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
|
1079
1085
|
href?: string | undefined;
|
|
1080
1086
|
elevation?: string | number | undefined;
|
|
1081
|
-
to?: vue_router.RouteLocationRaw | undefined;
|
|
1082
|
-
theme?: string | undefined;
|
|
1083
1087
|
rounded?: string | number | boolean | undefined;
|
|
1084
1088
|
baseColor?: string | undefined;
|
|
1085
1089
|
activeColor?: string | undefined;
|
|
@@ -1089,7 +1093,6 @@ declare const VTreeviewItem: {
|
|
|
1089
1093
|
appendAvatar?: string | undefined;
|
|
1090
1094
|
prependAvatar?: string | undefined;
|
|
1091
1095
|
subtitle?: string | number | undefined;
|
|
1092
|
-
lines?: false | "one" | "two" | "three" | undefined;
|
|
1093
1096
|
toggleIcon?: IconValue | undefined;
|
|
1094
1097
|
onToggleExpand?: ((args_0: MouseEvent) => void) | undefined;
|
|
1095
1098
|
} & {
|
|
@@ -1173,12 +1176,13 @@ declare const VTreeviewItem: {
|
|
|
1173
1176
|
value?: any;
|
|
1174
1177
|
title?: string | number | undefined;
|
|
1175
1178
|
class?: any;
|
|
1179
|
+
theme?: string | undefined;
|
|
1180
|
+
to?: vue_router.RouteLocationRaw | undefined;
|
|
1181
|
+
lines?: false | "one" | "two" | "three" | undefined;
|
|
1176
1182
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
|
1177
1183
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
|
1178
1184
|
href?: string | undefined;
|
|
1179
1185
|
elevation?: string | number | undefined;
|
|
1180
|
-
to?: vue_router.RouteLocationRaw | undefined;
|
|
1181
|
-
theme?: string | undefined;
|
|
1182
1186
|
rounded?: string | number | boolean | undefined;
|
|
1183
1187
|
baseColor?: string | undefined;
|
|
1184
1188
|
activeColor?: string | undefined;
|
|
@@ -1188,7 +1192,6 @@ declare const VTreeviewItem: {
|
|
|
1188
1192
|
appendAvatar?: string | undefined;
|
|
1189
1193
|
prependAvatar?: string | undefined;
|
|
1190
1194
|
subtitle?: string | number | undefined;
|
|
1191
|
-
lines?: false | "one" | "two" | "three" | undefined;
|
|
1192
1195
|
toggleIcon?: IconValue | undefined;
|
|
1193
1196
|
onToggleExpand?: ((args_0: MouseEvent) => void) | undefined;
|
|
1194
1197
|
} & {
|
|
@@ -1263,12 +1266,13 @@ declare const VTreeviewItem: {
|
|
|
1263
1266
|
value?: any;
|
|
1264
1267
|
title?: string | number | undefined;
|
|
1265
1268
|
class?: any;
|
|
1269
|
+
theme?: string | undefined;
|
|
1270
|
+
to?: vue_router.RouteLocationRaw | undefined;
|
|
1271
|
+
lines?: false | "one" | "two" | "three" | undefined;
|
|
1266
1272
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
|
1267
1273
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
|
1268
1274
|
href?: string | undefined;
|
|
1269
1275
|
elevation?: string | number | undefined;
|
|
1270
|
-
to?: vue_router.RouteLocationRaw | undefined;
|
|
1271
|
-
theme?: string | undefined;
|
|
1272
1276
|
rounded?: string | number | boolean | undefined;
|
|
1273
1277
|
baseColor?: string | undefined;
|
|
1274
1278
|
activeColor?: string | undefined;
|
|
@@ -1278,7 +1282,6 @@ declare const VTreeviewItem: {
|
|
|
1278
1282
|
appendAvatar?: string | undefined;
|
|
1279
1283
|
prependAvatar?: string | undefined;
|
|
1280
1284
|
subtitle?: string | number | undefined;
|
|
1281
|
-
lines?: false | "one" | "two" | "three" | undefined;
|
|
1282
1285
|
toggleIcon?: IconValue | undefined;
|
|
1283
1286
|
onToggleExpand?: ((args_0: MouseEvent) => void) | undefined;
|
|
1284
1287
|
} & {
|