@vuetify/nightly 3.6.14-master.2024-08-03 → 3.6.14-master.2024-08-12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +0 -4
- package/dist/json/importMap-labs.json +16 -16
- package/dist/json/importMap.json +154 -154
- package/dist/json/tags.json +0 -1
- package/dist/json/web-types.json +1 -11
- package/dist/vuetify-labs.css +2369 -2369
- package/dist/vuetify-labs.d.ts +0 -15
- package/dist/vuetify-labs.esm.js +5 -5
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +5 -5
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +411 -411
- package/dist/vuetify.d.ts +52 -52
- package/dist/vuetify.esm.js +4 -4
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +4 -4
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +4 -4
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/composables/teleport.mjs +1 -1
- package/lib/composables/teleport.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +52 -52
- package/lib/labs/VTreeview/VTreeview.mjs +1 -1
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +0 -15
- package/lib/labs/components.d.mts +0 -15
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VList.mjs","names":["VListChildren","createList","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeItemsProps","makeNestedProps","useNested","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","computed","ref","shallowRef","toRef","EventProp","focusChild","genericComponent","getPropertyFromItem","omit","propsFactory","useRender","isPrimitive","value","transformItem","props","item","type","itemType","title","itemTitle","itemValue","undefined","children","itemChildren","itemProps","_props","transformItems","raw","items","array","push","useListItems","makeVListProps","baseColor","String","activeColor","activeClass","bgColor","disabled","Boolean","expandIcon","collapseIcon","lines","default","slim","nav","selectStrategy","openStrategy","variant","VList","name","emits","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","open","parents","select","lineClasses","color","VListGroup","VListItem","density","isFocused","contentRef","onFocusin","e","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","target","includes","tagName","key","preventDefault","onMousedown","location","_createVNode","tag","class","style","returnObject"],"sources":["../../../src/components/VList/VList.tsx"],"sourcesContent":["// Styles\nimport './VList.sass'\n\n// Components\nimport { VListChildren } from './VListChildren'\n\n// Composables\nimport { createList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeItemsProps } from '@/composables/list-items'\nimport { makeNestedProps, useNested } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue'\nimport { EventProp, focusChild, genericComponent, getPropertyFromItem, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListChildrenSlots } from './VListChildren'\nimport type { ItemProps, ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport interface InternalListItem<T = any> extends ListItem<T> {\n type?: 'item' | 'subheader' | 'divider'\n}\n\nfunction isPrimitive (value: unknown): value is string | number | boolean {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n}\n\nfunction transformItem (props: ItemProps & { itemType: string }, item: any): InternalListItem {\n const type = getPropertyFromItem(item, props.itemType, 'item')\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle)\n const value = getPropertyFromItem(item, props.itemValue, undefined)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? omit(item, ['children'])\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nfunction transformItems (props: ItemProps & { itemType: string }, items: (string | object)[]) {\n const array: InternalListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useListItems (props: ItemProps & { itemType: string }) {\n const items = computed(() => transformItems(props, props.items))\n\n return { items }\n}\n\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n expandIcon: String,\n collapseIcon: String,\n lines: {\n type: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n default: 'one',\n },\n slim: Boolean,\n nav: Boolean,\n\n 'onClick:open': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onClick:select': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onUpdate:opened': EventProp<[]>(),\n ...makeNestedProps({\n selectStrategy: 'single-leaf' as const,\n openStrategy: 'list' as const,\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n itemType: {\n type: String,\n default: 'type',\n },\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VList')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VList = genericComponent<new <\n T extends readonly any[],\n S = unknown,\n O = unknown\n>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemChildren?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n selected?: S\n 'onUpdate:selected'?: (value: S) => void\n 'onClick:open'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n 'onClick:select'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n opened?: O\n 'onUpdate:opened'?: (value: O) => void\n },\n slots: VListChildrenSlots<ItemType<T>>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VList',\n\n props: makeVListProps(),\n\n emits: {\n 'update:selected': (value: unknown) => true,\n 'update:activated': (value: unknown) => true,\n 'update:opened': (value: unknown) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:activate': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { borderClasses } = useBorder(props)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n const { children, open, parents, select } = useNested(props)\n const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n\n createList()\n\n provideDefaults({\n VListGroup: {\n activeColor,\n baseColor,\n color,\n expandIcon: toRef(props, 'expandIcon'),\n collapseIcon: toRef(props, 'collapseIcon'),\n },\n VListItem: {\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 nav: toRef(props, 'nav'),\n slim: toRef(props, 'slim'),\n variant: toRef(props, 'variant'),\n },\n })\n\n const isFocused = shallowRef(false)\n const contentRef = ref<HTMLElement>()\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n const target = e.target as HTMLElement\n\n if (!contentRef.value || ['INPUT', 'TEXTAREA'].includes(target.tagName)) return\n\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n } else if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n } else {\n return\n }\n\n e.preventDefault()\n }\n\n function onMousedown (e: MouseEvent) {\n isFocused.value = true\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (contentRef.value) {\n return focusChild(contentRef.value, location)\n }\n }\n\n useRender(() => {\n return (\n <props.tag\n ref={ contentRef }\n class={[\n 'v-list',\n {\n 'v-list--disabled': props.disabled,\n 'v-list--nav': props.nav,\n 'v-list--slim': props.slim,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n tabindex={ (props.disabled || isFocused.value) ? -1 : 0 }\n role=\"listbox\"\n aria-activedescendant={ undefined }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onFocus={ onFocus }\n onKeydown={ onKeydown }\n onMousedown={ onMousedown }\n >\n <VListChildren\n items={ items.value }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n </props.tag>\n )\n })\n\n return {\n open,\n select,\n focus,\n children,\n parents,\n }\n },\n})\n\nexport type VList = InstanceType<typeof VList>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,+BAEtB;AAAA,SACSC,UAAU;AAAA,SACVC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc;AAAA,SACdC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,gBAAgB,yCAEzB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,SAAS,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,mBAAmB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEpG;AAUA,SAASC,WAAWA,CAAEC,KAAc,EAAsC;EACxE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,OAAOA,KAAK,KAAK,SAAS;AAC7F;AAEA,SAASC,aAAaA,CAAEC,KAAuC,EAAEC,IAAS,EAAoB;EAC5F,MAAMC,IAAI,GAAGT,mBAAmB,CAACQ,IAAI,EAAED,KAAK,CAACG,QAAQ,EAAE,MAAM,CAAC;EAC9D,MAAMC,KAAK,GAAGP,WAAW,CAACI,IAAI,CAAC,GAAGA,IAAI,GAAGR,mBAAmB,CAACQ,IAAI,EAAED,KAAK,CAACK,SAAS,CAAC;EACnF,MAAMP,KAAK,GAAGL,mBAAmB,CAACQ,IAAI,EAAED,KAAK,CAACM,SAAS,EAAEC,SAAS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,CAAClD,KAAK,EACpBE,KAAK,CAAC4E,KAAK,CACZ;QAAA,SACM,CACLjC,qBAAqB,CAAC7C,KAAK,EAC3BgD,eAAe,CAAChD,KAAK,EACrBE,KAAK,CAAC6E,KAAK,CACZ;QAAA,YACW7E,KAAK,CAACwB,QAAQ,IAAIiC,SAAS,CAAC3D,KAAK,GAAI,CAAC,CAAC,GAAG,CAAC;QAAA;QAAA,yBAE/BS,SAAS;QAAA,aACrBoD,SAAS;QAAA,cACRE,UAAU;QAAA,WACbC,OAAO;QAAA,aACLI,SAAS;QAAA,eACPM;MAAW;QAAA3C,OAAA,EAAAA,CAAA,MAAA6C,YAAA,CAAA9G,aAAA;UAAA,SAGfkD,KAAK,CAAChB,KAAK;UAAA,gBACJE,KAAK,CAAC8E;QAAY,GACvBtC,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO;MACLS,IAAI;MACJE,MAAM;MACNc,KAAK;MACLzD,QAAQ;MACR0C;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VList.mjs","names":["VListChildren","createList","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","makeItemsProps","makeNestedProps","useNested","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","computed","ref","shallowRef","toRef","EventProp","focusChild","genericComponent","getPropertyFromItem","omit","propsFactory","useRender","isPrimitive","value","transformItem","props","item","type","itemType","title","itemTitle","itemValue","undefined","children","itemChildren","itemProps","_props","transformItems","raw","items","array","push","useListItems","makeVListProps","baseColor","String","activeColor","activeClass","bgColor","disabled","Boolean","expandIcon","collapseIcon","lines","default","slim","nav","selectStrategy","openStrategy","variant","VList","name","emits","setup","_ref","slots","themeClasses","backgroundColorClasses","backgroundColorStyles","borderClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","open","parents","select","lineClasses","color","VListGroup","VListItem","density","isFocused","contentRef","onFocusin","e","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","target","includes","tagName","key","preventDefault","onMousedown","location","_createVNode","tag","class","style","returnObject"],"sources":["../../../src/components/VList/VList.tsx"],"sourcesContent":["// Styles\nimport './VList.sass'\n\n// Components\nimport { VListChildren } from './VListChildren'\n\n// Composables\nimport { createList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeItemsProps } from '@/composables/list-items'\nimport { makeNestedProps, useNested } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue'\nimport { EventProp, focusChild, genericComponent, getPropertyFromItem, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListChildrenSlots } from './VListChildren'\nimport type { ItemProps, ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport interface InternalListItem<T = any> extends ListItem<T> {\n type?: 'item' | 'subheader' | 'divider'\n}\n\nfunction isPrimitive (value: unknown): value is string | number | boolean {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'\n}\n\nfunction transformItem (props: ItemProps & { itemType?: string }, item: any): InternalListItem {\n const type = getPropertyFromItem(item, props.itemType, 'item')\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle)\n const value = getPropertyFromItem(item, props.itemValue, undefined)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? omit(item, ['children'])\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nfunction transformItems (props: ItemProps & { itemType?: string }, items: (string | object)[]) {\n const array: InternalListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useListItems (props: ItemProps & { itemType?: string }) {\n const items = computed(() => transformItems(props, props.items))\n\n return { items }\n}\n\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n expandIcon: String,\n collapseIcon: String,\n lines: {\n type: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n default: 'one',\n },\n slim: Boolean,\n nav: Boolean,\n\n 'onClick:open': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onClick:select': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onUpdate:opened': EventProp<[]>(),\n ...makeNestedProps({\n selectStrategy: 'single-leaf' as const,\n openStrategy: 'list' as const,\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n itemType: {\n type: String,\n default: 'type',\n },\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VList')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VList = genericComponent<new <\n T extends readonly any[],\n S = unknown,\n O = unknown\n>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemChildren?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n selected?: S\n 'onUpdate:selected'?: (value: S) => void\n 'onClick:open'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n 'onClick:select'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n opened?: O\n 'onUpdate:opened'?: (value: O) => void\n },\n slots: VListChildrenSlots<ItemType<T>>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VList',\n\n props: makeVListProps(),\n\n emits: {\n 'update:selected': (value: unknown) => true,\n 'update:activated': (value: unknown) => true,\n 'update:opened': (value: unknown) => true,\n 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:activate': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const { themeClasses } = provideTheme(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { borderClasses } = useBorder(props)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n const { children, open, parents, select } = useNested(props)\n const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n\n createList()\n\n provideDefaults({\n VListGroup: {\n activeColor,\n baseColor,\n color,\n expandIcon: toRef(props, 'expandIcon'),\n collapseIcon: toRef(props, 'collapseIcon'),\n },\n VListItem: {\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 nav: toRef(props, 'nav'),\n slim: toRef(props, 'slim'),\n variant: toRef(props, 'variant'),\n },\n })\n\n const isFocused = shallowRef(false)\n const contentRef = ref<HTMLElement>()\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n const target = e.target as HTMLElement\n\n if (!contentRef.value || ['INPUT', 'TEXTAREA'].includes(target.tagName)) return\n\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n } else if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n } else {\n return\n }\n\n e.preventDefault()\n }\n\n function onMousedown (e: MouseEvent) {\n isFocused.value = true\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (contentRef.value) {\n return focusChild(contentRef.value, location)\n }\n }\n\n useRender(() => {\n return (\n <props.tag\n ref={ contentRef }\n class={[\n 'v-list',\n {\n 'v-list--disabled': props.disabled,\n 'v-list--nav': props.nav,\n 'v-list--slim': props.slim,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n tabindex={ (props.disabled || isFocused.value) ? -1 : 0 }\n role=\"listbox\"\n aria-activedescendant={ undefined }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onFocus={ onFocus }\n onKeydown={ onKeydown }\n onMousedown={ onMousedown }\n >\n <VListChildren\n items={ items.value }\n returnObject={ props.returnObject }\n v-slots={ slots }\n />\n </props.tag>\n )\n })\n\n return {\n open,\n select,\n focus,\n children,\n parents,\n }\n },\n})\n\nexport type VList = InstanceType<typeof VList>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,+BAEtB;AAAA,SACSC,UAAU;AAAA,SACVC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC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AA,WACbC,OAAO;QAAA,aACLI,SAAS;QAAA,eACPM;MAAW;QAAA3C,OAAA,EAAAA,CAAA,MAAA6C,YAAA,CAAA9G,aAAA;UAAA,SAGfkD,KAAK,CAAChB,KAAK;UAAA,gBACJE,KAAK,CAAC8E;QAAY,GACvBtC,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO;MACLS,IAAI;MACJE,MAAM;MACNc,KAAK;MACLzD,QAAQ;MACR0C;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -10,7 +10,7 @@ export function useTeleport(target) {
|
|
10
10
|
warn(`Unable to locate target ${_target}`);
|
11
11
|
return undefined;
|
12
12
|
}
|
13
|
-
let container = targetElement.
|
13
|
+
let container = [...targetElement.children].find(el => el.matches('.v-overlay-container'));
|
14
14
|
if (!container) {
|
15
15
|
container = document.createElement('div');
|
16
16
|
container.className = 'v-overlay-container';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teleport.mjs","names":["computed","warn","IN_BROWSER","useTeleport","target","teleportTarget","_target","undefined","targetElement","document","body","querySelector","container","createElement","className","appendChild"],"sources":["../../src/composables/teleport.ts"],"sourcesContent":["// Utilities\nimport { computed, warn } from 'vue'\nimport { IN_BROWSER } from '@/util'\n\nexport function useTeleport (target: () => (boolean | string | ParentNode)) {\n const teleportTarget = computed(() => {\n const _target = target()\n\n if (_target === true || !IN_BROWSER) return undefined\n\n const targetElement =\n _target === false ? document.body\n : typeof _target === 'string' ? document.querySelector(_target)\n : _target\n\n if (targetElement == null) {\n warn(`Unable to locate target ${_target}`)\n return undefined\n }\n\n let container = targetElement.
|
1
|
+
{"version":3,"file":"teleport.mjs","names":["computed","warn","IN_BROWSER","useTeleport","target","teleportTarget","_target","undefined","targetElement","document","body","querySelector","container","children","find","el","matches","createElement","className","appendChild"],"sources":["../../src/composables/teleport.ts"],"sourcesContent":["// Utilities\nimport { computed, warn } from 'vue'\nimport { IN_BROWSER } from '@/util'\n\nexport function useTeleport (target: () => (boolean | string | ParentNode)) {\n const teleportTarget = computed(() => {\n const _target = target()\n\n if (_target === true || !IN_BROWSER) return undefined\n\n const targetElement =\n _target === false ? document.body\n : typeof _target === 'string' ? document.querySelector(_target)\n : _target\n\n if (targetElement == null) {\n warn(`Unable to locate target ${_target}`)\n return undefined\n }\n\n let container = [...targetElement.children].find(el => el.matches('.v-overlay-container'))\n\n if (!container) {\n container = document.createElement('div')\n container.className = 'v-overlay-container'\n targetElement.appendChild(container)\n }\n\n return container\n })\n\n return { teleportTarget }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,IAAI,QAAQ,KAAK;AAAA,SAC3BC,UAAU;AAEnB,OAAO,SAASC,WAAWA,CAAEC,MAA6C,EAAE;EAC1E,MAAMC,cAAc,GAAGL,QAAQ,CAAC,MAAM;IACpC,MAAMM,OAAO,GAAGF,MAAM,CAAC,CAAC;IAExB,IAAIE,OAAO,KAAK,IAAI,IAAI,CAACJ,UAAU,EAAE,OAAOK,SAAS;IAErD,MAAMC,aAAa,GACjBF,OAAO,KAAK,KAAK,GAAGG,QAAQ,CAACC,IAAI,GAC/B,OAAOJ,OAAO,KAAK,QAAQ,GAAGG,QAAQ,CAACE,aAAa,CAACL,OAAO,CAAC,GAC7DA,OAAO;IAEX,IAAIE,aAAa,IAAI,IAAI,EAAE;MACzBP,IAAI,CAAC,2BAA2BK,OAAO,EAAE,CAAC;MAC1C,OAAOC,SAAS;IAClB;IAEA,IAAIK,SAAS,GAAG,CAAC,GAAGJ,aAAa,CAACK,QAAQ,CAAC,CAACC,IAAI,CAACC,EAAE,IAAIA,EAAE,CAACC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE1F,IAAI,CAACJ,SAAS,EAAE;MACdA,SAAS,GAAGH,QAAQ,CAACQ,aAAa,CAAC,KAAK,CAAC;MACzCL,SAAS,CAACM,SAAS,GAAG,qBAAqB;MAC3CV,aAAa,CAACW,WAAW,CAACP,SAAS,CAAC;IACtC;IAEA,OAAOA,SAAS;EAClB,CAAC,CAAC;EAEF,OAAO;IAAEP;EAAe,CAAC;AAC3B","ignoreList":[]}
|
package/lib/entry-bundler.mjs
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.6.14-master.2024-08-
|
19
|
+
export const version = "3.6.14-master.2024-08-12";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.mjs";
|
package/lib/framework.mjs
CHANGED
package/lib/index.d.mts
CHANGED
@@ -464,43 +464,48 @@ declare global {
|
|
464
464
|
}
|
465
465
|
}
|
466
466
|
interface _GlobalComponents {
|
467
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
468
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
469
467
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
470
468
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
471
469
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
472
470
|
VApp: typeof import('vuetify/components')['VApp']
|
473
471
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
472
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
473
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
474
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
475
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
476
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
477
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
474
478
|
VBanner: typeof import('vuetify/components')['VBanner']
|
475
479
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
476
480
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
477
|
-
|
478
|
-
|
479
|
-
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
480
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
481
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
482
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
481
483
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
482
484
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
483
485
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
484
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
485
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
486
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
487
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
488
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
489
|
-
VChip: typeof import('vuetify/components')['VChip']
|
490
486
|
VCard: typeof import('vuetify/components')['VCard']
|
491
487
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
492
488
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
493
489
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
494
490
|
VCardText: typeof import('vuetify/components')['VCardText']
|
495
491
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
492
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
493
|
+
VChip: typeof import('vuetify/components')['VChip']
|
496
494
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
497
495
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
498
|
-
|
496
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
497
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
499
498
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
500
499
|
VCode: typeof import('vuetify/components')['VCode']
|
500
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
501
501
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
502
502
|
VCounter: typeof import('vuetify/components')['VCounter']
|
503
|
-
|
503
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
504
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
505
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
506
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
507
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
508
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
504
509
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
505
510
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
506
511
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -508,37 +513,29 @@ interface _GlobalComponents {
|
|
508
513
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
509
514
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
510
515
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
511
|
-
|
512
|
-
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
513
|
-
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
514
|
-
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
515
|
-
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
516
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
517
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
516
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
518
517
|
VDivider: typeof import('vuetify/components')['VDivider']
|
519
518
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
520
519
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
521
520
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
522
521
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
523
522
|
VFab: typeof import('vuetify/components')['VFab']
|
524
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
525
|
-
VField: typeof import('vuetify/components')['VField']
|
526
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
527
523
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
524
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
528
525
|
VIcon: typeof import('vuetify/components')['VIcon']
|
529
526
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
530
527
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
531
528
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
532
529
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
533
|
-
|
534
|
-
|
530
|
+
VField: typeof import('vuetify/components')['VField']
|
531
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
535
532
|
VImg: typeof import('vuetify/components')['VImg']
|
533
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
534
|
+
VInput: typeof import('vuetify/components')['VInput']
|
536
535
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
537
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
538
536
|
VLabel: typeof import('vuetify/components')['VLabel']
|
539
|
-
|
540
|
-
|
541
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
537
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
538
|
+
VItem: typeof import('vuetify/components')['VItem']
|
542
539
|
VList: typeof import('vuetify/components')['VList']
|
543
540
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
544
541
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -548,69 +545,71 @@ interface _GlobalComponents {
|
|
548
545
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
549
546
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
550
547
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
548
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
551
549
|
VMenu: typeof import('vuetify/components')['VMenu']
|
550
|
+
VMain: typeof import('vuetify/components')['VMain']
|
552
551
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
552
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
553
553
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
554
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
555
554
|
VPagination: typeof import('vuetify/components')['VPagination']
|
556
|
-
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
557
555
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
558
|
-
|
556
|
+
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
559
557
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
558
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
559
|
+
VRating: typeof import('vuetify/components')['VRating']
|
560
560
|
VSelect: typeof import('vuetify/components')['VSelect']
|
561
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
561
562
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
562
563
|
VSheet: typeof import('vuetify/components')['VSheet']
|
563
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
564
|
-
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
565
564
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
566
565
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
567
566
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
568
|
-
|
567
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
569
568
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
570
|
-
|
569
|
+
VTable: typeof import('vuetify/components')['VTable']
|
571
570
|
VStepper: typeof import('vuetify/components')['VStepper']
|
572
571
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
573
572
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
574
573
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
575
574
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
576
575
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
577
|
-
|
576
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
577
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
578
578
|
VTab: typeof import('vuetify/components')['VTab']
|
579
579
|
VTabs: typeof import('vuetify/components')['VTabs']
|
580
580
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
581
581
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
582
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
583
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
584
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
585
582
|
VTextField: typeof import('vuetify/components')['VTextField']
|
586
583
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
587
584
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
588
|
-
|
589
|
-
|
585
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
586
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
587
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
588
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
590
589
|
VWindow: typeof import('vuetify/components')['VWindow']
|
591
590
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
591
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
592
592
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
593
593
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
594
594
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
595
|
-
VForm: typeof import('vuetify/components')['VForm']
|
596
|
-
VHover: typeof import('vuetify/components')['VHover']
|
597
595
|
VContainer: typeof import('vuetify/components')['VContainer']
|
598
596
|
VCol: typeof import('vuetify/components')['VCol']
|
599
597
|
VRow: typeof import('vuetify/components')['VRow']
|
600
598
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
599
|
+
VForm: typeof import('vuetify/components')['VForm']
|
600
|
+
VHover: typeof import('vuetify/components')['VHover']
|
601
601
|
VLayout: typeof import('vuetify/components')['VLayout']
|
602
602
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
603
603
|
VLazy: typeof import('vuetify/components')['VLazy']
|
604
604
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
605
605
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
606
|
-
VParallax: typeof import('vuetify/components')['VParallax']
|
607
606
|
VRadio: typeof import('vuetify/components')['VRadio']
|
608
|
-
|
607
|
+
VParallax: typeof import('vuetify/components')['VParallax']
|
609
608
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
609
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
610
610
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
611
611
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
612
612
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
613
|
-
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
614
613
|
VValidation: typeof import('vuetify/components')['VValidation']
|
615
614
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
616
615
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
@@ -628,6 +627,7 @@ interface _GlobalComponents {
|
|
628
627
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
629
628
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
630
629
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
630
|
+
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
631
631
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
632
632
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
633
633
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
@@ -635,20 +635,20 @@ interface _GlobalComponents {
|
|
635
635
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
636
636
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
637
637
|
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
638
|
-
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
639
|
-
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
640
|
-
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
641
638
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
642
639
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
643
640
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
641
|
+
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
642
|
+
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
643
|
+
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
644
644
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
645
645
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
646
646
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
647
647
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
648
648
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
649
649
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
650
|
-
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
651
650
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
651
|
+
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
652
652
|
}
|
653
653
|
declare module 'vue' {
|
654
654
|
export type JSXComponent<Props = any> = { new (): ComponentPublicInstance<Props> } | FunctionalComponent<Props>
|
@@ -27,7 +27,7 @@ export const makeVTreeviewProps = propsFactory({
|
|
27
27
|
collapseIcon: '$treeviewCollapse',
|
28
28
|
expandIcon: '$treeviewExpand',
|
29
29
|
slim: true
|
30
|
-
}), ['nav'])
|
30
|
+
}), ['itemType', 'nav'])
|
31
31
|
}, 'VTreeview');
|
32
32
|
export const VTreeview = genericComponent()({
|
33
33
|
name: 'VTreeview',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VTreeview.mjs","names":["makeVTreeviewChildrenProps","VTreeviewChildren","makeVListProps","useListItems","VList","provideDefaults","makeFilterProps","useFilter","useProxiedModel","computed","provide","ref","toRef","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","flatten","items","flat","arguments","length","undefined","item","push","children","makeVTreeviewProps","openAll","Boolean","search","String","filterKeys","collapseIcon","expandIcon","slim","VTreeview","name","props","emits","val","value","setup","_ref","slots","activeColor","baseColor","color","activated","selected","vListRef","opened","flatItems","filteredItems","visibleIds","Set","flatMap","getPath","getChildren","id","path","parent","unshift","parents","get","arr","queue","slice","child","shift","ids","i","concat","VTreeviewGroup","VTreeviewItem","activeClass","density","disabled","lines","variant","listProps","filterProps","treeviewChildrenProps","_createVNode","_mergeProps","class","style","$event","default"],"sources":["../../../src/labs/VTreeview/VTreeview.tsx"],"sourcesContent":["// Components\nimport { makeVTreeviewChildrenProps, VTreeviewChildren } from './VTreeviewChildren'\nimport { makeVListProps, useListItems, VList } from '@/components/VList/VList'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, provide, ref, toRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { VListChildrenSlots } from '@/components/VList/VListChildren'\nimport type { ListItem } from '@/composables/list-items'\nimport type { GenericProps } from '@/util'\n\nfunction flatten (items: ListItem[], flat: ListItem[] = []) {\n for (const item of items) {\n flat.push(item)\n if (item.children) flatten(item.children, flat)\n }\n return flat\n}\n\nexport const makeVTreeviewProps = propsFactory({\n openAll: Boolean,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...makeVTreeviewChildrenProps(),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['nav']),\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 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n const activated = useProxiedModel(props, 'activated')\n const selected = useProxiedModel(props, 'selected')\n\n const vListRef = ref<VList>()\n\n const opened = computed(() => props.openAll ? openAll(items.value) : props.opened)\n const flatItems = computed(() => flatten(items.value))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, flatItems, search)\n const visibleIds = computed(() => {\n if (!search.value) {\n return null\n }\n return new Set(filteredItems.value.flatMap(item => {\n return [...getPath(item.props.value), ...getChildren(item.props.value)]\n }))\n })\n\n function getPath (id: unknown) {\n const path: unknown[] = []\n let parent: unknown = id\n while (parent != null) {\n path.unshift(parent)\n parent = vListRef.value?.parents.get(parent)\n }\n return path\n }\n\n function getChildren (id: unknown) {\n const arr: unknown[] = []\n const queue = ((vListRef.value?.children.get(id) ?? []).slice())\n while (queue.length) {\n const child = queue.shift()\n if (!child) continue\n arr.push(child)\n queue.push(...((vListRef.value?.children.get(child) ?? []).slice()))\n }\n return arr\n }\n\n function openAll (item: any) {\n let ids: number[] = []\n\n for (const i of item) {\n if (!i.children) continue\n\n ids.push(i.value)\n\n if (i.children) {\n ids = ids.concat(openAll(i.children))\n }\n }\n\n return ids\n }\n\n provide(VTreeviewSymbol, { visibleIds })\n\n provideDefaults({\n VTreeviewGroup: {\n activeColor,\n baseColor,\n color,\n collapseIcon: toRef(props, 'collapseIcon'),\n expandIcon: toRef(props, 'expandIcon'),\n },\n VTreeviewItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n variant: toRef(props, 'variant'),\n },\n })\n\n useRender(() => {\n const listProps = VList.filterProps(props)\n\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n props.class,\n ]}\n 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 items={ items.value }\n v-slots={ slots }\n ></VTreeviewChildren>\n </VList>\n )\n })\n\n return { }\n },\n})\n\nexport type VTreeview = InstanceType<typeof VTreeview>\n"],"mappings":";AAAA;AAAA,SACSA,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,cAAc,EAAEC,YAAY,EAAEC,KAAK,4CAE5C;AAAA,SACSC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC1CC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAExD;AAAA,SACSC,eAAe;AAKxB,SAASC,OAAOA,CAAEC,KAAiB,EAAyB;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A,CAG1BF,qBAAqB;UAAA,SAClB/D,KAAK,CAACsB;QAAK,IACTG,KAAK;MAAA;IAIvB,CAAC,CAAC;IAEF,OAAO,CAAE,CAAC;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VTreeview.mjs","names":["makeVTreeviewChildrenProps","VTreeviewChildren","makeVListProps","useListItems","VList","provideDefaults","makeFilterProps","useFilter","useProxiedModel","computed","provide","ref","toRef","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","flatten","items","flat","arguments","length","undefined","item","push","children","makeVTreeviewProps","openAll","Boolean","search","String","filterKeys","collapseIcon","expandIcon","slim","VTreeview","name","props","emits","val","value","setup","_ref","slots","activeColor","baseColor","color","activated","selected","vListRef","opened","flatItems","filteredItems","visibleIds","Set","flatMap","getPath","getChildren","id","path","parent","unshift","parents","get","arr","queue","slice","child","shift","ids","i","concat","VTreeviewGroup","VTreeviewItem","activeClass","density","disabled","lines","variant","listProps","filterProps","treeviewChildrenProps","_createVNode","_mergeProps","class","style","$event","default"],"sources":["../../../src/labs/VTreeview/VTreeview.tsx"],"sourcesContent":["// Components\nimport { makeVTreeviewChildrenProps, VTreeviewChildren } from './VTreeviewChildren'\nimport { makeVListProps, useListItems, VList } from '@/components/VList/VList'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, provide, ref, toRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { VListChildrenSlots } from '@/components/VList/VListChildren'\nimport type { ListItem } from '@/composables/list-items'\nimport type { GenericProps } from '@/util'\n\nfunction flatten (items: ListItem[], flat: ListItem[] = []) {\n for (const item of items) {\n flat.push(item)\n if (item.children) flatten(item.children, flat)\n }\n return flat\n}\n\nexport const makeVTreeviewProps = propsFactory({\n openAll: Boolean,\n search: String,\n\n ...makeFilterProps({ filterKeys: ['title'] }),\n ...makeVTreeviewChildrenProps(),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true,\n }), ['itemType', 'nav']),\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 'click:open': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n 'click:select': (value: { id: unknown, value: boolean, path: unknown[] }) => true,\n },\n\n setup (props, { slots }) {\n const { items } = useListItems(props)\n const activeColor = toRef(props, 'activeColor')\n const baseColor = toRef(props, 'baseColor')\n const color = toRef(props, 'color')\n const activated = useProxiedModel(props, 'activated')\n const selected = useProxiedModel(props, 'selected')\n\n const vListRef = ref<VList>()\n\n const opened = computed(() => props.openAll ? openAll(items.value) : props.opened)\n const flatItems = computed(() => flatten(items.value))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, flatItems, search)\n const visibleIds = computed(() => {\n if (!search.value) {\n return null\n }\n return new Set(filteredItems.value.flatMap(item => {\n return [...getPath(item.props.value), ...getChildren(item.props.value)]\n }))\n })\n\n function getPath (id: unknown) {\n const path: unknown[] = []\n let parent: unknown = id\n while (parent != null) {\n path.unshift(parent)\n parent = vListRef.value?.parents.get(parent)\n }\n return path\n }\n\n function getChildren (id: unknown) {\n const arr: unknown[] = []\n const queue = ((vListRef.value?.children.get(id) ?? []).slice())\n while (queue.length) {\n const child = queue.shift()\n if (!child) continue\n arr.push(child)\n queue.push(...((vListRef.value?.children.get(child) ?? []).slice()))\n }\n return arr\n }\n\n function openAll (item: any) {\n let ids: number[] = []\n\n for (const i of item) {\n if (!i.children) continue\n\n ids.push(i.value)\n\n if (i.children) {\n ids = ids.concat(openAll(i.children))\n }\n }\n\n return ids\n }\n\n provide(VTreeviewSymbol, { visibleIds })\n\n provideDefaults({\n VTreeviewGroup: {\n activeColor,\n baseColor,\n color,\n collapseIcon: toRef(props, 'collapseIcon'),\n expandIcon: toRef(props, 'expandIcon'),\n },\n VTreeviewItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n variant: toRef(props, 'variant'),\n },\n })\n\n useRender(() => {\n const listProps = VList.filterProps(props)\n\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props)\n\n return (\n <VList\n ref={ vListRef }\n { ...listProps }\n class={[\n 'v-treeview',\n props.class,\n ]}\n 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 items={ items.value }\n v-slots={ slots }\n ></VTreeviewChildren>\n </VList>\n )\n })\n\n return { }\n },\n})\n\nexport type VTreeview = InstanceType<typeof VTreeview>\n"],"mappings":";AAAA;AAAA,SACSA,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,cAAc,EAAEC,YAAY,EAAEC,KAAK,4CAE5C;AAAA,SACSC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC1CC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAExD;AAAA,SACSC,eAAe;AAKxB,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,I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@@ -194,7 +194,6 @@ declare const VTreeview: {
|
|
194
194
|
itemValue: SelectItemKey;
|
195
195
|
itemChildren: SelectItemKey;
|
196
196
|
itemProps: SelectItemKey;
|
197
|
-
itemType: string;
|
198
197
|
loadingIcon: string;
|
199
198
|
openAll: boolean;
|
200
199
|
} & {
|
@@ -286,7 +285,6 @@ declare const VTreeview: {
|
|
286
285
|
itemValue: SelectItemKey;
|
287
286
|
itemChildren: SelectItemKey;
|
288
287
|
itemProps: SelectItemKey;
|
289
|
-
itemType: string;
|
290
288
|
loadingIcon: string;
|
291
289
|
openAll: boolean;
|
292
290
|
} & {
|
@@ -365,7 +363,6 @@ declare const VTreeview: {
|
|
365
363
|
itemValue: SelectItemKey;
|
366
364
|
itemChildren: SelectItemKey;
|
367
365
|
itemProps: SelectItemKey;
|
368
|
-
itemType: string;
|
369
366
|
loadingIcon: string;
|
370
367
|
openAll: boolean;
|
371
368
|
}, true, {}, vue.SlotsType<Partial<{
|
@@ -460,7 +457,6 @@ declare const VTreeview: {
|
|
460
457
|
itemValue: SelectItemKey;
|
461
458
|
itemChildren: SelectItemKey;
|
462
459
|
itemProps: SelectItemKey;
|
463
|
-
itemType: string;
|
464
460
|
loadingIcon: string;
|
465
461
|
openAll: boolean;
|
466
462
|
} & {
|
@@ -539,7 +535,6 @@ declare const VTreeview: {
|
|
539
535
|
itemValue: SelectItemKey;
|
540
536
|
itemChildren: SelectItemKey;
|
541
537
|
itemProps: SelectItemKey;
|
542
|
-
itemType: string;
|
543
538
|
loadingIcon: string;
|
544
539
|
openAll: boolean;
|
545
540
|
}>;
|
@@ -571,7 +566,6 @@ declare const VTreeview: {
|
|
571
566
|
itemValue: SelectItemKey;
|
572
567
|
itemChildren: SelectItemKey;
|
573
568
|
itemProps: SelectItemKey;
|
574
|
-
itemType: string;
|
575
569
|
loadingIcon: string;
|
576
570
|
openAll: boolean;
|
577
571
|
} & {
|
@@ -664,7 +658,6 @@ declare const VTreeview: {
|
|
664
658
|
itemValue: SelectItemKey;
|
665
659
|
itemChildren: SelectItemKey;
|
666
660
|
itemProps: SelectItemKey;
|
667
|
-
itemType: string;
|
668
661
|
loadingIcon: string;
|
669
662
|
openAll: boolean;
|
670
663
|
}, {}, string, vue.SlotsType<Partial<{
|
@@ -844,10 +837,6 @@ declare const VTreeview: {
|
|
844
837
|
value: boolean;
|
845
838
|
path: unknown[];
|
846
839
|
}) => void>;
|
847
|
-
itemType: {
|
848
|
-
type: StringConstructor;
|
849
|
-
default: string;
|
850
|
-
};
|
851
840
|
loadChildren: vue.PropType<(item: unknown) => Promise<void>>;
|
852
841
|
loadingIcon: {
|
853
842
|
type: StringConstructor;
|
@@ -979,10 +968,6 @@ declare const VTreeview: {
|
|
979
968
|
value: boolean;
|
980
969
|
path: unknown[];
|
981
970
|
}) => void>;
|
982
|
-
itemType: {
|
983
|
-
type: StringConstructor;
|
984
|
-
default: string;
|
985
|
-
};
|
986
971
|
loadChildren: vue.PropType<(item: unknown) => Promise<void>>;
|
987
972
|
loadingIcon: {
|
988
973
|
type: StringConstructor;
|
@@ -9786,7 +9786,6 @@ declare const VTreeview: {
|
|
9786
9786
|
itemValue: SelectItemKey;
|
9787
9787
|
itemChildren: SelectItemKey;
|
9788
9788
|
itemProps: SelectItemKey;
|
9789
|
-
itemType: string;
|
9790
9789
|
loadingIcon: string;
|
9791
9790
|
openAll: boolean;
|
9792
9791
|
} & {
|
@@ -9878,7 +9877,6 @@ declare const VTreeview: {
|
|
9878
9877
|
itemValue: SelectItemKey;
|
9879
9878
|
itemChildren: SelectItemKey;
|
9880
9879
|
itemProps: SelectItemKey;
|
9881
|
-
itemType: string;
|
9882
9880
|
loadingIcon: string;
|
9883
9881
|
openAll: boolean;
|
9884
9882
|
} & {
|
@@ -9957,7 +9955,6 @@ declare const VTreeview: {
|
|
9957
9955
|
itemValue: SelectItemKey;
|
9958
9956
|
itemChildren: SelectItemKey;
|
9959
9957
|
itemProps: SelectItemKey;
|
9960
|
-
itemType: string;
|
9961
9958
|
loadingIcon: string;
|
9962
9959
|
openAll: boolean;
|
9963
9960
|
}, true, {}, vue.SlotsType<Partial<{
|
@@ -10052,7 +10049,6 @@ declare const VTreeview: {
|
|
10052
10049
|
itemValue: SelectItemKey;
|
10053
10050
|
itemChildren: SelectItemKey;
|
10054
10051
|
itemProps: SelectItemKey;
|
10055
|
-
itemType: string;
|
10056
10052
|
loadingIcon: string;
|
10057
10053
|
openAll: boolean;
|
10058
10054
|
} & {
|
@@ -10131,7 +10127,6 @@ declare const VTreeview: {
|
|
10131
10127
|
itemValue: SelectItemKey;
|
10132
10128
|
itemChildren: SelectItemKey;
|
10133
10129
|
itemProps: SelectItemKey;
|
10134
|
-
itemType: string;
|
10135
10130
|
loadingIcon: string;
|
10136
10131
|
openAll: boolean;
|
10137
10132
|
}>;
|
@@ -10163,7 +10158,6 @@ declare const VTreeview: {
|
|
10163
10158
|
itemValue: SelectItemKey;
|
10164
10159
|
itemChildren: SelectItemKey;
|
10165
10160
|
itemProps: SelectItemKey;
|
10166
|
-
itemType: string;
|
10167
10161
|
loadingIcon: string;
|
10168
10162
|
openAll: boolean;
|
10169
10163
|
} & {
|
@@ -10256,7 +10250,6 @@ declare const VTreeview: {
|
|
10256
10250
|
itemValue: SelectItemKey;
|
10257
10251
|
itemChildren: SelectItemKey;
|
10258
10252
|
itemProps: SelectItemKey;
|
10259
|
-
itemType: string;
|
10260
10253
|
loadingIcon: string;
|
10261
10254
|
openAll: boolean;
|
10262
10255
|
}, {}, string, vue.SlotsType<Partial<{
|
@@ -10436,10 +10429,6 @@ declare const VTreeview: {
|
|
10436
10429
|
value: boolean;
|
10437
10430
|
path: unknown[];
|
10438
10431
|
}) => void>;
|
10439
|
-
itemType: {
|
10440
|
-
type: StringConstructor;
|
10441
|
-
default: string;
|
10442
|
-
};
|
10443
10432
|
loadChildren: vue.PropType<(item: unknown) => Promise<void>>;
|
10444
10433
|
loadingIcon: {
|
10445
10434
|
type: StringConstructor;
|
@@ -10571,10 +10560,6 @@ declare const VTreeview: {
|
|
10571
10560
|
value: boolean;
|
10572
10561
|
path: unknown[];
|
10573
10562
|
}) => void>;
|
10574
|
-
itemType: {
|
10575
|
-
type: StringConstructor;
|
10576
|
-
default: string;
|
10577
|
-
};
|
10578
10563
|
loadChildren: vue.PropType<(item: unknown) => Promise<void>>;
|
10579
10564
|
loadingIcon: {
|
10580
10565
|
type: StringConstructor;
|
package/package.json
CHANGED