@vuetify/nightly 3.9.1-dev.2025-07-17 → 3.9.2-dev.2025-07-18
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/CHANGELOG.md +3 -3
- package/dist/json/attributes.json +3289 -3289
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +212 -212
- package/dist/json/web-types.json +19421 -6043
- package/dist/vuetify-labs.cjs +64 -65
- package/dist/vuetify-labs.css +4117 -4117
- package/dist/vuetify-labs.d.ts +71 -71
- package/dist/vuetify-labs.esm.js +64 -65
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +64 -65
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +64 -65
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3167 -3167
- package/dist/vuetify.d.ts +71 -71
- package/dist/vuetify.esm.js +64 -65
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +64 -65
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +8 -8
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +2 -3
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewChildren.js +59 -59
- package/lib/components/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +71 -71
- package/lib/framework.js +1 -1
- package/package.json +1 -1
@@ -141,14 +141,13 @@ export const VTreeview = genericComponent()({
|
|
141
141
|
"selected": selected.value,
|
142
142
|
"onUpdate:selected": $event => selected.value = $event
|
143
143
|
}), {
|
144
|
-
default: () => _createVNode(VTreeviewChildren, _mergeProps(treeviewChildrenProps, {
|
144
|
+
default: () => [_createVNode(VTreeviewChildren, _mergeProps(treeviewChildrenProps, {
|
145
145
|
"density": props.density,
|
146
146
|
"returnObject": props.returnObject,
|
147
147
|
"items": items.value,
|
148
148
|
"parentIndentLines": props.indentLines ? [] : undefined,
|
149
149
|
"indentLinesVariant": indentLinesVariant
|
150
|
-
}), slots)
|
151
|
-
$stable: true
|
150
|
+
}), slots)]
|
152
151
|
});
|
153
152
|
});
|
154
153
|
return {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VTreeview.js","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","fluid","Boolean","openAll","indentLines","String","search","filterKeys","collapseIcon","expandIcon","slim","modelValue","Array","VTreeview","name","props","emits","val","value","setup","_ref","slots","emit","activeColor","baseColor","color","activated","_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","indentLinesVariant","_createVNode","_mergeProps","class","style","$event","default","$stable"],"sources":["../../../src/components/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 type { PropType } from 'vue'\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, IndentLinesVariant } 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 fluid: Boolean,\n openAll: Boolean,\n indentLines: [Boolean, String] as PropType<boolean | IndentLinesVariant>,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...omit(makeVTreeviewChildrenProps(), [\n 'index',\n 'path',\n 'indentLinesVariant',\n 'parentIndentLines',\n 'isLastGroup',\n ]),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['nav', 'openStrategy']),\n\n modelValue: Array,\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, emit }) {\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 _selected = useProxiedModel(props, 'selected')\n\n const selected = computed({\n get: () => props.modelValue ?? _selected.value,\n set (val) {\n _selected.value = val\n emit('update:modelValue', 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 const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n const indentLinesVariant = typeof props.indentLines === 'boolean' ? 'default' : props.indentLines\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n {\n 'v-treeview--fluid': props.fluid,\n },\n props.class,\n ]}\n openStrategy=\"multiple\"\n style={ props.style }\n opened={ opened.value }\n v-model:activated={ activated.value }\n v-model:selected={ selected.value }\n >\n {{\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n density={ props.density }\n returnObject={ props.returnObject }\n items={ items.value }\n parentIndentLines={ props.indentLines ? [] : undefined }\n indentLinesVariant={ indentLinesVariant }\n v-slots={ slots }\n />\n ),\n $stable: true,\n }}\n </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OAAO;UAAA,gBACRzC,KAAK,CAACyB,YAAY;UAAA,SACzBhD,KAAK,CAAC0B,KAAK;UAAA,qBACCH,KAAK,CAACX,WAAW,GAAG,EAAE,GAAGR,SAAS;UAAA,sBACjCmE;QAAkB,IAC7B1C,KAAK,CAElB;QACDiD,OAAO,EAAE;MAAI;IAIrB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VTreeview.js","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","fluid","Boolean","openAll","indentLines","String","search","filterKeys","collapseIcon","expandIcon","slim","modelValue","Array","VTreeview","name","props","emits","val","value","setup","_ref","slots","emit","activeColor","baseColor","color","activated","_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","indentLinesVariant","_createVNode","_mergeProps","class","style","$event","default"],"sources":["../../../src/components/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 type { PropType } from 'vue'\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, IndentLinesVariant } 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 fluid: Boolean,\n openAll: Boolean,\n indentLines: [Boolean, String] as PropType<boolean | IndentLinesVariant>,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...omit(makeVTreeviewChildrenProps(), [\n 'index',\n 'path',\n 'indentLinesVariant',\n 'parentIndentLines',\n 'isLastGroup',\n ]),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['nav', 'openStrategy']),\n\n modelValue: Array,\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, emit }) {\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 _selected = useProxiedModel(props, 'selected')\n\n const selected = computed({\n get: () => props.modelValue ?? _selected.value,\n set (val) {\n _selected.value = val\n emit('update:modelValue', 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 const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n const indentLinesVariant = typeof props.indentLines === 'boolean' ? 'default' : props.indentLines\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n {\n 'v-treeview--fluid': props.fluid,\n },\n props.class,\n ]}\n openStrategy=\"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 density={ props.density }\n returnObject={ props.returnObject }\n items={ items.value }\n parentIndentLines={ props.indentLines ? [] : undefined }\n indentLinesVariant={ indentLinesVariant }\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,6BAE5C;AAAA,SACSC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjDC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAExD;AAAA,SAESC,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,KAAK,EAAEC,OAAO;EACdC,OAAO,EAAED,OAAO;EAChBE,WAAW,EAAE,CAACF,OAAO,EAAEG,MAAM,CAA2C;EACxEC,MAAM,EAAED,MAAM;EAEd,GAAG3B,eAAe,CAAC;IAAE6B,UAAU,EAAE,CAAC,OAAO;EAAE,CAAC,CAAC;EAC7C,GAAGpB,IAAI,CAACf,0BAA0B,CAAC,CAAC,EAAE,CACpC,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,CACd,CAAC;EACF,GAAGe,IAAI,CAACb,cA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EAAA4F,WAAA,CAG1BH,qBAAqB;UAAA,WAChB/C,KAAK,CAACyC,OAAO;UAAA,gBACRzC,KAAK,CAACyB,YAAY;UAAA,SACzBhD,KAAK,CAAC0B,KAAK;UAAA,qBACCH,KAAK,CAACX,WAAW,GAAG,EAAE,GAAGR,SAAS;UAAA,sBACjCmE;QAAkB,IAC7B1C,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -96,51 +96,48 @@ export const VTreeviewChildren = genericComponent()({
|
|
96
96
|
parentIndentLines: props.parentIndentLines,
|
97
97
|
variant: props.indentLinesVariant
|
98
98
|
});
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
$stable: true
|
142
|
-
});
|
143
|
-
}
|
99
|
+
const slotsWithItem = {
|
100
|
+
prepend: slotProps => _createElementVNode(_Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && _createElementVNode("div", null, [_createVNode(VCheckboxBtn, {
|
101
|
+
"key": item.value,
|
102
|
+
"modelValue": slotProps.isSelected,
|
103
|
+
"disabled": props.disabled,
|
104
|
+
"loading": loading,
|
105
|
+
"color": props.selectedColor,
|
106
|
+
"density": props.density,
|
107
|
+
"indeterminate": slotProps.isIndeterminate,
|
108
|
+
"indeterminateIcon": props.indeterminateIcon,
|
109
|
+
"falseIcon": props.falseIcon,
|
110
|
+
"trueIcon": props.trueIcon,
|
111
|
+
"onUpdate:modelValue": v => selectItem(slotProps.select, v),
|
112
|
+
"onClick": e => e.stopPropagation(),
|
113
|
+
"onKeydown": e => {
|
114
|
+
if (!['Enter', 'Space'].includes(e.key)) return;
|
115
|
+
e.stopPropagation();
|
116
|
+
selectItem(slotProps.select, slotProps.isSelected);
|
117
|
+
}
|
118
|
+
}, null)]), slots.prepend?.({
|
119
|
+
...slotProps,
|
120
|
+
...treeItemProps,
|
121
|
+
item: item.raw,
|
122
|
+
internalItem: item
|
123
|
+
})]),
|
124
|
+
append: slots.append ? slotProps => slots.append?.({
|
125
|
+
...slotProps,
|
126
|
+
...treeItemProps,
|
127
|
+
item: item.raw,
|
128
|
+
internalItem: item
|
129
|
+
}) : undefined,
|
130
|
+
title: slots.title ? slotProps => slots.title?.({
|
131
|
+
...slotProps,
|
132
|
+
item: item.raw,
|
133
|
+
internalItem: item
|
134
|
+
}) : undefined,
|
135
|
+
subtitle: slots.subtitle ? slotProps => slots.subtitle?.({
|
136
|
+
...slotProps,
|
137
|
+
item: item.raw,
|
138
|
+
internalItem: item
|
139
|
+
}) : undefined
|
140
|
+
};
|
144
141
|
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
145
142
|
const treeviewChildrenProps = VTreeviewChildren.filterProps({
|
146
143
|
...props,
|
@@ -154,16 +151,21 @@ export const VTreeviewChildren = genericComponent()({
|
|
154
151
|
let {
|
155
152
|
props: activatorProps
|
156
153
|
} = _ref2;
|
157
|
-
|
154
|
+
const listItemProps = {
|
158
155
|
...itemProps,
|
159
156
|
...activatorProps,
|
160
|
-
|
161
|
-
hideActions: props.hideActions,
|
162
|
-
indentLines: indentLines.node,
|
163
|
-
value: props.returnObject ? item.raw : itemProps.value,
|
157
|
+
value: itemProps?.value,
|
164
158
|
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
165
159
|
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected)
|
166
|
-
}
|
160
|
+
};
|
161
|
+
return _createVNode(VTreeviewItem, _mergeProps({
|
162
|
+
"ref": el => activatorItems.value[index] = el
|
163
|
+
}, listItemProps, {
|
164
|
+
"hideActions": props.hideActions,
|
165
|
+
"indentLines": indentLines.node,
|
166
|
+
"value": props.returnObject ? item.raw : itemProps.value,
|
167
|
+
"loading": loading
|
168
|
+
}), slotsWithItem);
|
167
169
|
},
|
168
170
|
default: () => _createVNode(VTreeviewChildren, _mergeProps(treeviewChildrenProps, {
|
169
171
|
"items": children,
|
@@ -171,8 +173,7 @@ export const VTreeviewChildren = genericComponent()({
|
|
171
173
|
"parentIndentLines": indentLines.children,
|
172
174
|
"isLastGroup": nextItemHasChildren,
|
173
175
|
"returnObject": props.returnObject
|
174
|
-
}), slots)
|
175
|
-
$stable: true
|
176
|
+
}), slots)
|
176
177
|
}) : renderSlot(slots.item, {
|
177
178
|
props: itemProps,
|
178
179
|
item: item.raw,
|
@@ -188,12 +189,11 @@ export const VTreeviewChildren = genericComponent()({
|
|
188
189
|
props: item.raw
|
189
190
|
}, () => _createVNode(VListSubheader, item.props, null));
|
190
191
|
}
|
191
|
-
return
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
});
|
192
|
+
return _createVNode(VTreeviewItem, _mergeProps(itemProps, {
|
193
|
+
"hideActions": props.hideActions,
|
194
|
+
"indentLines": indentLines.leaf,
|
195
|
+
"value": props.returnObject ? toRaw(item.raw) : itemProps.value
|
196
|
+
}), slotsWithItem);
|
197
197
|
});
|
198
198
|
});
|
199
199
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VTreeviewChildren.js","names":["VTreeviewGroup","makeVTreeviewItemProps","VTreeviewItem","VCheckboxBtn","VDivider","VListSubheader","makeDensityProps","IconValue","computed","reactive","ref","toRaw","genericComponent","getIndentLines","pick","propsFactory","renderSlot","makeVTreeviewChildrenProps","disabled","Boolean","loadChildren","Function","loadingIcon","type","String","default","items","Array","openOnClick","undefined","indeterminateIcon","falseIcon","trueIcon","returnObject","activatable","selectable","selectedColor","selectStrategy","Object","index","Number","isLastGroup","separateRoots","parentIndentLines","indentLinesVariant","path","VTreeviewChildren","name","props","setup","_ref","slots","isLoading","Set","activatorItems","isClickOnOpen","checkChildren","item","length","children","add","value","raw","delete","selectItem","select","isSelected","map","itemProps","loading","has","nextItemHasChildren","at","depth","isLast","treeItemProps","isFirst","hideAction","hideActions","indentLines","leafLinks","variant","renderItem","_createVNode","prepend","slotProps","_createElementVNode","_Fragment","includes","density","isIndeterminate","v","e","stopPropagation","key","internalItem","append","title","subtitle","$stable","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref2","activatorProps","node","onToggleExpand","onClick","divider","subheader","leaf"],"sources":["../../../src/components/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { makeVTreeviewItemProps, VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\nimport { VDivider } from '@/components/VDivider'\nimport { VListSubheader } from '@/components/VList'\n\n// Composables\nimport { makeDensityProps } from '@/composables/density'\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, reactive, ref, toRaw } from 'vue'\nimport { genericComponent, getIndentLines, pick, propsFactory, renderSlot } 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, IndentLinesVariant, IndentLineType } 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 divider: { props: InternalListItem['props'] }\n subheader: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n disabled: Boolean,\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 activatable: Boolean,\n selectable: Boolean,\n selectedColor: String,\n selectStrategy: [String, Function, Object] as PropType<SelectStrategyProp>,\n index: Number,\n isLastGroup: Boolean,\n separateRoots: Boolean,\n parentIndentLines: Array as PropType<IndentLineType[]>,\n indentLinesVariant: String as PropType<IndentLinesVariant>,\n path: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n ...pick(makeVTreeviewItemProps(), ['hideActions']),\n ...makeDensityProps(),\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 const activatorItems = ref<VTreeviewItem[]>([])\n\n const isClickOnOpen = computed(() => (\n !props.disabled && (\n props.openOnClick != null\n ? props.openOnClick\n : props.selectable && !props.activatable\n )))\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, index, items) => {\n const { children, props: itemProps } = item\n const loading = isLoading.has(item.value)\n const nextItemHasChildren = !!items.at(index + 1)?.children\n\n const depth = props.path?.length ?? 0\n const isLast = items.length - 1 === index\n const treeItemProps = {\n index,\n depth,\n isFirst: index === 0,\n isLast,\n path: [...props.path, index],\n hideAction: props.hideActions,\n }\n\n const indentLines = getIndentLines({\n depth,\n isLast,\n isLastGroup: props.isLastGroup,\n leafLinks: !props.hideActions,\n separateRoots: props.separateRoots,\n parentIndentLines: props.parentIndentLines,\n variant: props.indentLinesVariant,\n })\n\n function renderItem (itemProps: Record<string, unknown>) {\n return (\n <VTreeviewItem { ...itemProps }>\n {{\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 disabled={ props.disabled }\n loading={ loading }\n color={ props.selectedColor }\n density={ props.density }\n indeterminate={ slotProps.isIndeterminate }\n indeterminateIcon={ props.indeterminateIcon }\n falseIcon={ props.falseIcon }\n trueIcon={ props.trueIcon }\n onUpdate:modelValue={ v => selectItem(slotProps.select, v) }\n onClick={ (e: PointerEvent) => e.stopPropagation() }\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, ...treeItemProps, item: item.raw, internalItem: item }) }\n </>\n ),\n append: slots.append\n ? slotProps => slots.append?.({ ...slotProps, ...treeItemProps, item: item.raw, internalItem: item })\n : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item: item.raw, internalItem: item }) : undefined,\n subtitle: slots.subtitle ? slotProps => slots.subtitle?.({ ...slotProps, item: item.raw, internalItem: item }) : undefined,\n $stable: true,\n }}\n </VTreeviewItem>\n )\n }\n\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps)\n const treeviewChildrenProps = VTreeviewChildren.filterProps({ ...props, ...treeItemProps })\n\n return children ? (\n <VTreeviewGroup\n { ...treeviewGroupProps }\n value={ props.returnObject ? item.raw : treeviewGroupProps?.value }\n rawId={ treeviewGroupProps?.value }\n >\n {{\n activator: ({ props: activatorProps }) => {\n return renderItem({\n ...itemProps,\n ...activatorProps,\n loading,\n hideActions: props.hideActions,\n indentLines: indentLines.node,\n value: props.returnObject ? item.raw : itemProps.value,\n onToggleExpand: [() => checkChildren(item), activatorProps.onClick] as any,\n onClick: isClickOnOpen.value\n ? [() => checkChildren(item), activatorProps.onClick] as any\n : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected),\n })\n },\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n indentLinesVariant={ props.indentLinesVariant }\n parentIndentLines={ indentLines.children }\n isLastGroup={ nextItemHasChildren }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n ),\n $stable: true,\n }}\n </VTreeviewGroup>\n ) : renderSlot(\n slots.item,\n { props: itemProps, item: item.raw, internalItem: item },\n () => {\n if (item.type === 'divider') {\n return renderSlot(\n slots.divider,\n { props: item.raw },\n () => <VDivider { ...item.props } />,\n )\n }\n if (item.type === 'subheader') {\n return renderSlot(\n slots.subheader,\n { props: item.raw },\n () => <VListSubheader { ...item.props } />,\n )\n }\n return renderItem({\n ...itemProps,\n hideActions: props.hideActions,\n indentLines: indentLines.leaf,\n value: props.returnObject ? toRaw(item.raw) : itemProps.value,\n })\n })\n })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,sBAAsB,EAAEC,aAAa;AAAA,SACrCC,YAAY;AAAA,SACZC,QAAQ;AAAA,SACRC,cAAc,6BAEvB;AAAA,SACSC,gBAAgB;AAAA,SAChBC,SAAS,sCAElB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3CC,gBAAgB,EAAEC,cAAc,EAAEC,IAAI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,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VTreeviewChildren.js","names":["VTreeviewGroup","makeVTreeviewItemProps","VTreeviewItem","VCheckboxBtn","VDivider","VListSubheader","makeDensityProps","IconValue","computed","reactive","ref","toRaw","genericComponent","getIndentLines","pick","propsFactory","renderSlot","makeVTreeviewChildrenProps","disabled","Boolean","loadChildren","Function","loadingIcon","type","String","default","items","Array","openOnClick","undefined","indeterminateIcon","falseIcon","trueIcon","returnObject","activatable","selectable","selectedColor","selectStrategy","Object","index","Number","isLastGroup","separateRoots","parentIndentLines","indentLinesVariant","path","VTreeviewChildren","name","props","setup","_ref","slots","isLoading","Set","activatorItems","isClickOnOpen","checkChildren","item","length","children","add","value","raw","delete","selectItem","select","isSelected","map","itemProps","loading","has","nextItemHasChildren","at","depth","isLast","treeItemProps","isFirst","hideAction","hideActions","indentLines","leafLinks","variant","slotsWithItem","prepend","slotProps","_createElementVNode","_Fragment","includes","_createVNode","density","isIndeterminate","v","e","stopPropagation","key","internalItem","append","title","subtitle","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref2","activatorProps","listItemProps","onToggleExpand","onClick","el","node","divider","subheader","leaf"],"sources":["../../../src/components/VTreeview/VTreeviewChildren.tsx"],"sourcesContent":["// Components\nimport { VTreeviewGroup } from './VTreeviewGroup'\nimport { makeVTreeviewItemProps, VTreeviewItem } from './VTreeviewItem'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\nimport { VDivider } from '@/components/VDivider'\nimport { VListSubheader } from '@/components/VList'\n\n// Composables\nimport { makeDensityProps } from '@/composables/density'\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, reactive, ref, toRaw } from 'vue'\nimport { genericComponent, getIndentLines, pick, propsFactory, renderSlot } 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, IndentLinesVariant, IndentLineType } 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 divider: { props: InternalListItem['props'] }\n subheader: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n disabled: Boolean,\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 activatable: Boolean,\n selectable: Boolean,\n selectedColor: String,\n selectStrategy: [String, Function, Object] as PropType<SelectStrategyProp>,\n index: Number,\n isLastGroup: Boolean,\n separateRoots: Boolean,\n parentIndentLines: Array as PropType<IndentLineType[]>,\n indentLinesVariant: String as PropType<IndentLinesVariant>,\n path: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n ...pick(makeVTreeviewItemProps(), ['hideActions']),\n ...makeDensityProps(),\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 const activatorItems = ref<VTreeviewItem[]>([])\n\n const isClickOnOpen = computed(() => (\n !props.disabled && (\n props.openOnClick != null\n ? props.openOnClick\n : props.selectable && !props.activatable\n )))\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, index, items) => {\n const { children, props: itemProps } = item\n const loading = isLoading.has(item.value)\n const nextItemHasChildren = !!items.at(index + 1)?.children\n\n const depth = props.path?.length ?? 0\n const isLast = items.length - 1 === index\n const treeItemProps = {\n index,\n depth,\n isFirst: index === 0,\n isLast,\n path: [...props.path, index],\n hideAction: props.hideActions,\n }\n\n const indentLines = getIndentLines({\n depth,\n isLast,\n isLastGroup: props.isLastGroup,\n leafLinks: !props.hideActions,\n separateRoots: props.separateRoots,\n parentIndentLines: props.parentIndentLines,\n variant: props.indentLinesVariant,\n })\n\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 disabled={ props.disabled }\n loading={ loading }\n color={ props.selectedColor }\n density={ props.density }\n indeterminate={ slotProps.isIndeterminate }\n indeterminateIcon={ props.indeterminateIcon }\n falseIcon={ props.falseIcon }\n trueIcon={ props.trueIcon }\n onUpdate:modelValue={ v => selectItem(slotProps.select, v) }\n onClick={ (e: PointerEvent) => e.stopPropagation() }\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, ...treeItemProps, item: item.raw, internalItem: item }) }\n </>\n ),\n append: slots.append\n ? slotProps => slots.append?.({ ...slotProps, ...treeItemProps, item: item.raw, internalItem: item })\n : undefined,\n title: slots.title ? slotProps => slots.title?.({ ...slotProps, item: item.raw, internalItem: item }) : undefined,\n subtitle: slots.subtitle ? slotProps => slots.subtitle?.({ ...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, ...treeItemProps })\n\n return children ? (\n <VTreeviewGroup\n { ...treeviewGroupProps }\n value={ props.returnObject ? item.raw : treeviewGroupProps?.value }\n rawId={ 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\n ? [() => checkChildren(item), activatorProps.onClick] as any\n : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected),\n }\n\n return (\n <VTreeviewItem\n ref={ el => activatorItems.value[index] = el as VTreeviewItem }\n { ...listItemProps }\n hideActions={ props.hideActions }\n indentLines={ indentLines.node }\n value={ props.returnObject ? item.raw : itemProps.value }\n loading={ loading }\n v-slots={ slotsWithItem }\n />\n )\n },\n default: () => (\n <VTreeviewChildren\n { ...treeviewChildrenProps }\n items={ children }\n indentLinesVariant={ props.indentLinesVariant }\n parentIndentLines={ indentLines.children }\n isLastGroup={ nextItemHasChildren }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n ),\n }}\n </VTreeviewGroup>\n ) : renderSlot(\n slots.item,\n { props: itemProps, item: item.raw, internalItem: item },\n () => {\n if (item.type === 'divider') {\n return renderSlot(\n slots.divider,\n { props: item.raw },\n () => <VDivider { ...item.props } />,\n )\n }\n if (item.type === 'subheader') {\n return renderSlot(\n slots.subheader,\n { props: item.raw },\n () => <VListSubheader { ...item.props } />,\n )\n }\n return (\n <VTreeviewItem\n { ...itemProps }\n hideActions={ props.hideActions }\n indentLines={ indentLines.leaf }\n value={ props.returnObject ? toRaw(item.raw) : itemProps.value }\n v-slots={ slotsWithItem }\n />\n )\n })\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AC,EACnB,MAAA0B,YAAA,CAAAnF,cAAA,EAA2BoD,IAAI,CAACT,KAAK,OACvC,CAAC;QACH;QACA,OAAAwC,YAAA,CAAAtF,aAAA,EAAAoG,WAAA,CAESlC,SAAS;UAAA,eACApB,KAAK,CAAC8B,WAAW;UAAA,eACjBC,WAAW,CAACkC,IAAI;UAAA,SACtBjE,KAAK,CAACf,YAAY,GAAGtB,KAAK,CAAC8C,IAAI,CAACK,GAAG,CAAC,GAAGM,SAAS,CAACP;QAAK,IACpDqB,aAAa;MAG7B,CAAC,CAAC;IACN,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/entry-bundler.js
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.9.
|
19
|
+
export const version = "3.9.2-dev.2025-07-18";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -2601,48 +2601,39 @@ declare module 'vue' {
|
|
2601
2601
|
$children?: VNodeChild
|
2602
2602
|
}
|
2603
2603
|
export interface GlobalComponents {
|
2604
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
2605
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2606
|
-
VApp: typeof import('vuetify/components')['VApp']
|
2607
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2608
2604
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2609
2605
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2610
2606
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2607
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2608
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
2609
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2610
|
+
VApp: typeof import('vuetify/components')['VApp']
|
2611
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2611
2612
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2613
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2612
2614
|
VBadge: typeof import('vuetify/components')['VBadge']
|
2613
2615
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2614
2616
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2615
2617
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2616
|
-
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2617
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
2618
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2619
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2620
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2621
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2622
2618
|
VBtn: typeof import('vuetify/components')['VBtn']
|
2619
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2620
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2623
2621
|
VCard: typeof import('vuetify/components')['VCard']
|
2624
2622
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2625
2623
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2626
2624
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2627
2625
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2628
2626
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2629
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2630
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2631
2627
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2632
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2633
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2634
|
-
VChip: typeof import('vuetify/components')['VChip']
|
2635
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2636
2628
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2629
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2630
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
2631
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2637
2632
|
VCode: typeof import('vuetify/components')['VCode']
|
2638
|
-
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2639
|
-
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2640
|
-
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2641
|
-
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2642
|
-
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2643
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2644
2633
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2645
|
-
|
2634
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2635
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2636
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2646
2637
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2647
2638
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2648
2639
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -2650,25 +2641,36 @@ declare module 'vue' {
|
|
2650
2641
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2651
2642
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2652
2643
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2653
|
-
|
2644
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2645
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2646
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2647
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2648
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2649
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2654
2650
|
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2655
|
-
|
2656
|
-
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2657
|
-
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2658
|
-
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2659
|
-
VField: typeof import('vuetify/components')['VField']
|
2660
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2651
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
2661
2652
|
VDivider: typeof import('vuetify/components')['VDivider']
|
2662
2653
|
VFab: typeof import('vuetify/components')['VFab']
|
2663
|
-
|
2654
|
+
VField: typeof import('vuetify/components')['VField']
|
2655
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2664
2656
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2665
|
-
VImg: typeof import('vuetify/components')['VImg']
|
2666
2657
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2667
2658
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2668
2659
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2669
2660
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2670
2661
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2662
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
2663
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2664
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2671
2665
|
VInput: typeof import('vuetify/components')['VInput']
|
2666
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2667
|
+
VItem: typeof import('vuetify/components')['VItem']
|
2668
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
2669
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
2670
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
2671
|
+
VMain: typeof import('vuetify/components')['VMain']
|
2672
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2673
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2672
2674
|
VList: typeof import('vuetify/components')['VList']
|
2673
2675
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2674
2676
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2678,57 +2680,53 @@ declare module 'vue' {
|
|
2678
2680
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
2679
2681
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2680
2682
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2681
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2682
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2683
|
-
VItem: typeof import('vuetify/components')['VItem']
|
2684
|
-
VMain: typeof import('vuetify/components')['VMain']
|
2685
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
2686
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
2687
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2688
2683
|
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2689
|
-
|
2684
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
2690
2685
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2691
|
-
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2692
2686
|
VPagination: typeof import('vuetify/components')['VPagination']
|
2693
2687
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2694
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2695
2688
|
VRating: typeof import('vuetify/components')['VRating']
|
2689
|
+
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2690
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2696
2691
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2697
|
-
VSelect: typeof import('vuetify/components')['VSelect']
|
2698
2692
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2699
|
-
|
2693
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2700
2694
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2701
2695
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2702
|
-
|
2696
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
2703
2697
|
VSlider: typeof import('vuetify/components')['VSlider']
|
2704
|
-
|
2705
|
-
|
2706
|
-
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2707
|
-
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2708
|
-
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2709
|
-
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2710
|
-
VLabel: typeof import('vuetify/components')['VLabel']
|
2698
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2699
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2711
2700
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2712
2701
|
VTab: typeof import('vuetify/components')['VTab']
|
2713
2702
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2714
2703
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2715
2704
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2716
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2717
2705
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2718
2706
|
VTable: typeof import('vuetify/components')['VTable']
|
2719
2707
|
VTextField: typeof import('vuetify/components')['VTextField']
|
2708
|
+
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
2709
|
+
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
2710
|
+
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
2711
|
+
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2712
|
+
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2713
|
+
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2720
2714
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2721
2715
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2722
2716
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2723
2717
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2724
2718
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2725
|
-
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2726
|
-
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2727
|
-
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2728
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2729
2719
|
VWindow: typeof import('vuetify/components')['VWindow']
|
2730
2720
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2731
|
-
|
2721
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2722
|
+
VStepper: typeof import('vuetify/components')['VStepper']
|
2723
|
+
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2724
|
+
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2725
|
+
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2726
|
+
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2727
|
+
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2728
|
+
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2729
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
2732
2730
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2733
2731
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2734
2732
|
VForm: typeof import('vuetify/components')['VForm']
|
@@ -2736,23 +2734,22 @@ declare module 'vue' {
|
|
2736
2734
|
VCol: typeof import('vuetify/components')['VCol']
|
2737
2735
|
VRow: typeof import('vuetify/components')['VRow']
|
2738
2736
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2737
|
+
VHover: typeof import('vuetify/components')['VHover']
|
2739
2738
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2740
2739
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2741
2740
|
VLazy: typeof import('vuetify/components')['VLazy']
|
2742
|
-
VHover: typeof import('vuetify/components')['VHover']
|
2743
2741
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2744
2742
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2743
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2745
2744
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2746
2745
|
VRadio: typeof import('vuetify/components')['VRadio']
|
2747
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2748
2746
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2749
|
-
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2750
2747
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2751
|
-
|
2748
|
+
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2749
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
2750
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2751
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2752
2752
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2753
|
-
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
2754
|
-
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
2755
|
-
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
2756
2753
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2757
2754
|
VValidation: typeof import('vuetify/components')['VValidation']
|
2758
2755
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
@@ -2772,22 +2769,25 @@ declare module 'vue' {
|
|
2772
2769
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2773
2770
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2774
2771
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2775
|
-
|
2776
|
-
|
2777
|
-
|
2778
|
-
|
2779
|
-
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2780
|
-
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2772
|
+
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2773
|
+
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2774
|
+
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2775
|
+
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2781
2776
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2782
2777
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2783
2778
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2784
2779
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2785
2780
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2786
2781
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2782
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2787
2783
|
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2788
2784
|
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2785
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2789
2786
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2790
2787
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2788
|
+
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2789
|
+
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2790
|
+
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2791
2791
|
VHotkey: typeof import('vuetify/labs/components')['VHotkey']
|
2792
2792
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2793
2793
|
VMaskInput: typeof import('vuetify/labs/components')['VMaskInput']
|
package/lib/framework.js
CHANGED