@vuetify/nightly 3.9.1-master.2025-07-17 → 3.9.2-master.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 -8
- package/dist/json/attributes.json +3450 -3450
- package/dist/json/importMap-labs.json +18 -18
- package/dist/json/importMap.json +146 -146
- package/dist/json/web-types.json +19741 -6363
- package/dist/vuetify-labs.cjs +64 -65
- package/dist/vuetify-labs.css +4852 -4852
- package/dist/vuetify-labs.d.ts +50 -50
- 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 +2681 -2681
- package/dist/vuetify.d.ts +50 -50
- 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 +50 -50
- 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 </VList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AO;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,cAAc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AA4F,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,E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AAC;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 })\n })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,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-master.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
@@ -2602,41 +2602,40 @@ declare module 'vue' {
|
|
2602
2602
|
}
|
2603
2603
|
export interface GlobalComponents {
|
2604
2604
|
VApp: typeof import('vuetify/components')['VApp']
|
2605
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2606
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2605
2607
|
VAlert: typeof import('vuetify/components')['VAlert']
|
2606
2608
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2607
2609
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2608
2610
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2609
2611
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2610
2612
|
VBadge: typeof import('vuetify/components')['VBadge']
|
2611
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2612
2613
|
VBanner: typeof import('vuetify/components')['VBanner']
|
2613
2614
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2614
2615
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2615
|
-
|
2616
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2616
2617
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2617
2618
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2618
2619
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2619
|
-
|
2620
|
-
|
2621
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2620
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
2621
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2622
2622
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2623
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2624
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2625
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2623
2626
|
VCard: typeof import('vuetify/components')['VCard']
|
2624
2627
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2625
2628
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2626
2629
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2627
2630
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2628
2631
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2629
|
-
|
2630
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2631
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2632
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2632
2633
|
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2633
2634
|
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2634
|
-
VChip: typeof import('vuetify/components')['VChip']
|
2635
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2636
2635
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2637
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2638
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
2639
2636
|
VCounter: typeof import('vuetify/components')['VCounter']
|
2637
|
+
VCode: typeof import('vuetify/components')['VCode']
|
2638
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2640
2639
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2641
2640
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2642
2641
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -2650,29 +2649,31 @@ declare module 'vue' {
|
|
2650
2649
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2651
2650
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2652
2651
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2653
|
-
|
2654
|
-
|
2652
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2653
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
2654
|
+
VField: typeof import('vuetify/components')['VField']
|
2655
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2655
2656
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2656
2657
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2657
2658
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2658
2659
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2659
|
-
|
2660
|
-
|
2661
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2662
|
-
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2663
|
-
VImg: typeof import('vuetify/components')['VImg']
|
2660
|
+
VFab: typeof import('vuetify/components')['VFab']
|
2661
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
2664
2662
|
VFooter: typeof import('vuetify/components')['VFooter']
|
2665
|
-
|
2666
|
-
VInput: typeof import('vuetify/components')['VInput']
|
2663
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2667
2664
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2668
2665
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2669
2666
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2670
2667
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2671
2668
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2672
|
-
|
2669
|
+
VInput: typeof import('vuetify/components')['VInput']
|
2670
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2671
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2673
2672
|
VKbd: typeof import('vuetify/components')['VKbd']
|
2674
2673
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2675
2674
|
VItem: typeof import('vuetify/components')['VItem']
|
2675
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
2676
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2676
2677
|
VList: typeof import('vuetify/components')['VList']
|
2677
2678
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2678
2679
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2684,24 +2685,22 @@ declare module 'vue' {
|
|
2684
2685
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2685
2686
|
VMain: typeof import('vuetify/components')['VMain']
|
2686
2687
|
VMenu: typeof import('vuetify/components')['VMenu']
|
2687
|
-
|
2688
|
-
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2688
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2689
2689
|
VMessages: typeof import('vuetify/components')['VMessages']
|
2690
|
+
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2690
2691
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2691
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2692
|
-
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2693
2692
|
VPagination: typeof import('vuetify/components')['VPagination']
|
2694
2693
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2695
|
-
|
2694
|
+
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2696
2695
|
VRating: typeof import('vuetify/components')['VRating']
|
2697
2696
|
VSelect: typeof import('vuetify/components')['VSelect']
|
2698
|
-
VSheet: typeof import('vuetify/components')['VSheet']
|
2699
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2700
2697
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2701
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
2702
2698
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2703
2699
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2704
2700
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2701
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2702
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
2703
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
2705
2704
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2706
2705
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2707
2706
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
@@ -2710,53 +2709,54 @@ declare module 'vue' {
|
|
2710
2709
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2711
2710
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2712
2711
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2713
|
-
VTable: typeof import('vuetify/components')['VTable']
|
2714
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2715
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
2716
2712
|
VTab: typeof import('vuetify/components')['VTab']
|
2717
2713
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2718
2714
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2719
2715
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2716
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
2717
|
+
VTable: typeof import('vuetify/components')['VTable']
|
2718
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2719
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2720
2720
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2721
2721
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2722
|
-
|
2722
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2723
2723
|
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
2724
2724
|
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
2725
2725
|
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
2726
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2727
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2728
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2729
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2730
2726
|
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2731
2727
|
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2732
2728
|
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2729
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2730
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2731
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2733
2732
|
VWindow: typeof import('vuetify/components')['VWindow']
|
2734
2733
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2735
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
2736
|
-
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2737
|
-
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2738
2734
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2739
|
-
|
2735
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2740
2736
|
VContainer: typeof import('vuetify/components')['VContainer']
|
2741
2737
|
VCol: typeof import('vuetify/components')['VCol']
|
2742
2738
|
VRow: typeof import('vuetify/components')['VRow']
|
2743
2739
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2740
|
+
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2741
|
+
VForm: typeof import('vuetify/components')['VForm']
|
2744
2742
|
VHover: typeof import('vuetify/components')['VHover']
|
2743
|
+
VLazy: typeof import('vuetify/components')['VLazy']
|
2745
2744
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2746
2745
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2747
|
-
VLazy: typeof import('vuetify/components')['VLazy']
|
2748
2746
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2749
2747
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2748
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2749
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2750
2750
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2751
2751
|
VRadio: typeof import('vuetify/components')['VRadio']
|
2752
2752
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2753
2753
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2754
|
-
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2755
2754
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2755
|
+
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2756
2756
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2757
2757
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2758
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
2759
2758
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
2759
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
2760
2760
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
2761
2761
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
2762
2762
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -2773,25 +2773,25 @@ declare module 'vue' {
|
|
2773
2773
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2774
2774
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2775
2775
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2776
|
-
|
2776
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2777
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2777
2778
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2778
2779
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2779
2780
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2780
2781
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2781
2782
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2782
2783
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2783
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2784
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2785
2784
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2786
2785
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2787
|
-
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2788
2786
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2789
2787
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2790
2788
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2789
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2791
2790
|
VHotkey: typeof import('vuetify/labs/components')['VHotkey']
|
2791
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2792
2792
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2793
|
-
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2794
2793
|
VMaskInput: typeof import('vuetify/labs/components')['VMaskInput']
|
2794
|
+
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2795
2795
|
}
|
2796
2796
|
export interface GlobalDirectives {
|
2797
2797
|
vClickOutside: typeof import('vuetify/directives')['ClickOutside']
|
package/lib/framework.js
CHANGED