@vuetify/nightly 3.10.4-dev.2025-10-01 → 3.10.4-dev.2025-10-06
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 +10 -3
- package/dist/json/attributes.json +1626 -1610
- package/dist/json/importMap-labs.json +24 -24
- package/dist/json/importMap.json +208 -208
- package/dist/json/tags.json +4 -0
- package/dist/json/web-types.json +3135 -3091
- package/dist/vuetify-labs.cjs +93 -30
- package/dist/vuetify-labs.css +4262 -4262
- package/dist/vuetify-labs.d.ts +209 -105
- package/dist/vuetify-labs.esm.js +93 -30
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +93 -30
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +93 -30
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3923 -3923
- package/dist/vuetify.d.ts +209 -105
- package/dist/vuetify.esm.js +93 -30
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +93 -30
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +40 -37
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.d.ts +52 -11
- package/lib/components/VDataIterator/VDataIterator.js +2 -0
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.d.ts +78 -18
- package/lib/components/VDataTable/VDataTable.js +9 -5
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +2 -2
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.d.ts +54 -13
- package/lib/components/VDataTable/VDataTableServer.js +8 -4
- package/lib/components/VDataTable/VDataTableServer.js.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +54 -13
- package/lib/components/VDataTable/VDataTableVirtual.js +7 -3
- package/lib/components/VDataTable/VDataTableVirtual.js.map +1 -1
- package/lib/components/VDataTable/composables/sort.d.ts +36 -8
- package/lib/components/VDataTable/composables/sort.js +55 -14
- package/lib/components/VDataTable/composables/sort.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.d.ts +6 -0
- package/lib/components/VTreeview/VTreeviewChildren.d.ts +9 -0
- package/lib/components/VTreeview/VTreeviewChildren.js +6 -1
- package/lib/components/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +71 -71
- package/lib/framework.js +1 -1
- package/lib/util/indentLines.d.ts +1 -0
- package/lib/util/indentLines.js +7 -4
- package/lib/util/indentLines.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort.js","names":["useLocale","useProxiedModel","computed","inject","provide","toRef","getObjectValueByPath","isEmpty","propsFactory","makeDataTableSortProps","sortBy","type","Array","default","customKeySort","Object","multiSort","Boolean","mustSort","VDataTableSortSymbol","Symbol","for","createSort","props","provideSort","options","page","toggleSort","column","key","newSortBy","value","map","x","item","find","push","order","length","filter","isSorted","data","useSort","Error","useSortedItems","items","locale","sortedItems","sortItems","current","transform","sortFunctions","sortRawFunctions","sortByItems","stringCollator","Intl","Collator","sensitivity","usage","transformedItems","sort","a","b","i","hasCustomResult","sortKey","sortOrder","sortA","sortB","sortARaw","raw","sortBRaw","customResult","Date","getTime","s","toString","toLocaleLowerCase","isNaN","Number","compare","_ref"],"sources":["../../../../src/components/VDataTable/composables/sort.ts"],"sourcesContent":["// Composables\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide, toRef } from 'vue'\nimport { getObjectValueByPath, isEmpty, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, PropType, Ref } from 'vue'\nimport type { DataTableCompareFunction, InternalDataTableHeader } from '../types'\nimport type { InternalItem } from '@/composables/filter'\n\nexport const makeDataTableSortProps = propsFactory({\n sortBy: {\n type: Array as PropType<readonly SortItem[]>,\n default: () => ([]),\n },\n customKeySort: Object as PropType<Record<string, DataTableCompareFunction>>,\n multiSort: Boolean,\n mustSort: Boolean,\n}, 'DataTable-sort')\n\nconst VDataTableSortSymbol: InjectionKey<{\n sortBy: Ref<readonly SortItem[]>\n toggleSort: (column: InternalDataTableHeader) => void\n isSorted: (column: InternalDataTableHeader) => boolean\n}> = Symbol.for('vuetify:data-table-sort')\n\nexport type SortItem = { key: string, order?: boolean | 'asc' | 'desc' }\n\ntype SortProps = {\n sortBy: readonly SortItem[]\n 'onUpdate:sortBy': ((value: any) => void) | undefined\n mustSort: boolean\n multiSort: boolean\n}\n\nexport function createSort (props: SortProps) {\n const sortBy = useProxiedModel(props, 'sortBy')\n const mustSort = toRef(() => props.mustSort)\n const multiSort = toRef(() => props.multiSort)\n\n return { sortBy, mustSort, multiSort }\n}\n\nexport function provideSort (options: {\n sortBy: Ref<readonly SortItem[]>\n mustSort: Ref<boolean>\n multiSort: Ref<boolean>\n page?: Ref<number>\n}) {\n const { sortBy, mustSort, multiSort, page } = options\n\n const toggleSort = (column: InternalDataTableHeader) => {\n if (column.key == null) return\n\n let newSortBy = sortBy.value.map(x => ({ ...x })) ?? []\n const item = newSortBy.find(x => x.key === column.key)\n\n if (!item) {\n if (multiSort.value) {\n newSortBy.push({ key: column.key, order: 'asc' })\n } else {\n newSortBy = [{ key: column.key, order: 'asc' }]\n }\n } else if (item.order === 'desc') {\n if (mustSort.value && newSortBy.length === 1) {\n item.order = 'asc'\n } else {\n newSortBy = newSortBy.filter(x => x.key !== column.key)\n }\n } else {\n item.order = 'desc'\n }\n\n sortBy.value = newSortBy\n if (page) page.value = 1\n }\n\n function isSorted (column: InternalDataTableHeader) {\n return !!sortBy.value.find(item => item.key === column.key)\n }\n\n const data = { sortBy, toggleSort, isSorted }\n\n provide(VDataTableSortSymbol, data)\n\n return data\n}\n\nexport function useSort () {\n const data = inject(VDataTableSortSymbol)\n\n if (!data) throw new Error('Missing sort!')\n\n return data\n}\n\n// TODO: abstract into project composable\nexport function useSortedItems<T extends InternalItem> (\n props: {\n customKeySort: Record<string, DataTableCompareFunction> | undefined\n },\n items: Ref<T[]>,\n sortBy: Ref<readonly SortItem[]>,\n options?: {\n transform?: (item: T) => {}\n sortFunctions?: Ref<Record<string, DataTableCompareFunction> | undefined>\n sortRawFunctions?: Ref<Record<string, DataTableCompareFunction> | undefined>\n },\n) {\n const locale = useLocale()\n const sortedItems = computed(() => {\n if (!sortBy.value.length) return items.value\n\n return sortItems(items.value, sortBy.value, locale.current.value, {\n transform: options?.transform,\n sortFunctions: {\n ...props.customKeySort,\n ...options?.sortFunctions?.value,\n },\n sortRawFunctions: options?.sortRawFunctions?.value,\n })\n })\n\n return { sortedItems }\n}\n\nexport function sortItems<T extends InternalItem> (\n items: T[],\n sortByItems: readonly SortItem[],\n locale: string,\n options?: {\n transform?: (item: T) => Record<string, any>\n sortFunctions?: Record<string, DataTableCompareFunction>\n sortRawFunctions?: Record<string, DataTableCompareFunction>\n },\n): T[] {\n const stringCollator = new Intl.Collator(locale, { sensitivity: 'accent', usage: 'sort' })\n\n const transformedItems = items.map(item => (\n [item, options?.transform ? options.transform(item) : item as never] as const)\n )\n\n return transformedItems.sort((a, b) => {\n for (let i = 0; i < sortByItems.length; i++) {\n let hasCustomResult = false\n const sortKey = sortByItems[i].key\n const sortOrder = sortByItems[i].order ?? 'asc'\n\n if (sortOrder === false) continue\n\n let sortA = getObjectValueByPath(a[1], sortKey)\n let sortB = getObjectValueByPath(b[1], sortKey)\n let sortARaw = a[0].raw\n let sortBRaw = b[0].raw\n\n if (sortOrder === 'desc') {\n [sortA, sortB] = [sortB, sortA]\n ;[sortARaw, sortBRaw] = [sortBRaw, sortARaw]\n }\n\n if (options?.sortRawFunctions?.[sortKey]) {\n const customResult = options.sortRawFunctions[sortKey](sortARaw, sortBRaw)\n\n if (customResult == null) continue\n hasCustomResult = true\n if (customResult) return customResult\n }\n\n if (options?.sortFunctions?.[sortKey]) {\n const customResult = options.sortFunctions[sortKey](sortA, sortB)\n\n if (customResult == null) continue\n hasCustomResult = true\n if (customResult) return customResult\n }\n\n if (hasCustomResult) continue\n\n // Dates should be compared numerically\n if (sortA instanceof Date && sortB instanceof Date) {\n sortA = sortA.getTime()\n sortB = sortB.getTime()\n }\n\n [sortA, sortB] = [sortA, sortB].map(s => s != null ? s.toString().toLocaleLowerCase() : s)\n\n if (sortA !== sortB) {\n if (isEmpty(sortA) && isEmpty(sortB)) return 0\n if (isEmpty(sortA)) return -1\n if (isEmpty(sortB)) return 1\n if (!isNaN(sortA) && !isNaN(sortB)) return Number(sortA) - Number(sortB)\n return stringCollator.compare(sortA, sortB)\n }\n }\n\n return 0\n }).map(([item]) => item)\n}\n"],"mappings":"AAAA;AAAA,SACSA,SAAS;AAAA,SACTC,eAAe,gDAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,oBAAoB,EAAEC,OAAO,EAAEC,YAAY,kCAEpD;AAKA,OAAO,MAAMC,sBAAsB,GAAGD,YAAY,CAAC;EACjDE,MAAM,EAAE;IACNC,IAAI,EAAEC,KAAsC;IAC5CC,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDC,aAAa,EAAEC,MAA4D;EAC3EC,SAAS,EAAEC,OAAO;EAClBC,QAAQ,EAAED;AACZ,CAAC,EAAE,gBAAgB,CAAC;AAEpB,MAAME,oBAIJ,GAAGC,MAAM,CAACC,GAAG,CAAC,yBAAyB,CAAC;AAW1C,OAAO,SAASC,UAAUA,CAAEC,KAAgB,EAAE;EAC5C,MAAMb,MAAM,GAAGT,eAAe,CAACsB,KAAK,EAAE,QAAQ,CAAC;EAC/C,MAAML,QAAQ,GAAGb,KAAK,CAAC,MAAMkB,KAAK,CAACL,QAAQ,CAAC;EAC5C,MAAMF,SAAS,GAAGX,KAAK,CAAC,MAAMkB,KAA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,OAAO,CAAC,CAAC;QAC7B,IAAI5D,OAAO,CAAC6D,KAAK,CAAC,EAAE,OAAO,CAAC;QAC5B,IAAI,CAACU,KAAK,CAACX,KAAK,CAAC,IAAI,CAACW,KAAK,CAACV,KAAK,CAAC,EAAE,OAAOW,MAAM,CAACZ,KAAK,CAAC,GAAGY,MAAM,CAACX,KAAK,CAAC;QACxE,OAAOd,cAAc,CAAC0B,OAAO,CAACb,KAAK,EAAEC,KAAK,CAAC;MAC7C;IACF;IAEA,OAAO,CAAC;EACV,CAAC,CAAC,CAACpC,GAAG,CAACiD,IAAA;IAAA,IAAC,CAAC/C,IAAI,CAAC,GAAA+C,IAAA;IAAA,OAAK/C,IAAI;EAAA,EAAC;AAC1B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"sort.js","names":["useLocale","useProxiedModel","computed","inject","provide","toRef","getObjectValueByPath","isEmpty","isObject","propsFactory","makeDataTableSortProps","initialSortOrder","type","String","default","validator","v","includes","sortBy","Array","customKeySort","Object","multiSort","Boolean","mustSort","VDataTableSortSymbol","Symbol","for","createSort","props","resolveMultiSort","event","active","key","mode","modifier","reverseMode","altKey","shiftKey","ctrlKey","metaKey","provideSort","options","page","toggleSort","column","newSortBy","value","map","x","item","find","initialOrder","secondaryOrder","unshift","order","push","length","filter","isSorted","data","useSort","Error","useSortedItems","items","locale","sortedItems","sortItems","current","transform","sortFunctions","sortRawFunctions","sortByItems","stringCollator","Intl","Collator","sensitivity","usage","transformedItems","sort","a","b","i","hasCustomResult","sortKey","sortOrder","sortA","sortB","sortARaw","raw","sortBRaw","customResult","Date","getTime","s","toString","toLocaleLowerCase","isNaN","Number","compare","_ref"],"sources":["../../../../src/components/VDataTable/composables/sort.ts"],"sourcesContent":["// Composables\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide, toRef } from 'vue'\nimport { getObjectValueByPath, isEmpty, isObject, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, PropType, Ref } from 'vue'\nimport type { DataTableCompareFunction, InternalDataTableHeader } from '../types'\nimport type { InternalItem } from '@/composables/filter'\n\nexport const makeDataTableSortProps = propsFactory({\n initialSortOrder: {\n type: String as PropType<'asc' | 'desc'>,\n default: 'asc',\n validator: (v: any) => !v || ['asc', 'desc'].includes(v),\n },\n sortBy: {\n type: Array as PropType<readonly SortItem[]>,\n default: () => ([]),\n },\n customKeySort: Object as PropType<Record<string, DataTableCompareFunction>>,\n multiSort: {\n type: [Boolean, Object] as PropType<boolean | MultiSortProps>,\n default: false,\n },\n mustSort: Boolean,\n}, 'DataTable-sort')\n\nconst VDataTableSortSymbol: InjectionKey<{\n sortBy: Ref<readonly SortItem[]>\n toggleSort: (column: InternalDataTableHeader, event?: KeyboardEvent | PointerEvent) => void\n isSorted: (column: InternalDataTableHeader) => boolean\n}> = Symbol.for('vuetify:data-table-sort')\n\nexport type SortItem = { key: string, order?: boolean | 'asc' | 'desc' }\nexport type MultiSortProps = {\n key?: 'ctrl'\n mode?: MultiSortMode\n modifier?: 'alt' | 'shift'\n}\n\nexport type MultiSortMode = 'append' | 'prepend'\n\ntype SortProps = {\n initialSortOrder: 'asc' | 'desc'\n sortBy: readonly SortItem[]\n 'onUpdate:sortBy': ((value: any) => void) | undefined\n multiSort: boolean | MultiSortProps\n mustSort: boolean\n}\n\nexport function createSort (props: SortProps) {\n const initialSortOrder = toRef(() => props.initialSortOrder)\n const sortBy = useProxiedModel(props, 'sortBy')\n const mustSort = toRef(() => props.mustSort)\n const multiSort = toRef(() => props.multiSort)\n return { initialSortOrder, sortBy, multiSort, mustSort }\n}\n\nfunction resolveMultiSort (\n multiSort: boolean | MultiSortProps,\n event?: KeyboardEvent | PointerEvent\n): {\n active: boolean\n mode?: MultiSortMode\n } {\n if (!isObject(multiSort)) {\n return { active: !!multiSort }\n }\n\n const { key, mode, modifier } = multiSort\n const reverseMode = (modifier === 'alt' && event?.altKey) ||\n (modifier === 'shift' && event?.shiftKey)\n\n return {\n active: !key || event?.ctrlKey || event?.metaKey || false,\n mode: reverseMode ? (mode === 'append' ? 'prepend' : 'append') : mode,\n }\n}\n\nexport function provideSort (options: {\n initialSortOrder: Ref<'asc' | 'desc'>\n sortBy: Ref<readonly SortItem[]>\n multiSort: Ref<boolean | MultiSortProps>\n mustSort: Ref<boolean>\n page?: Ref<number>\n}) {\n const { initialSortOrder, sortBy, mustSort, multiSort, page } = options\n\n const toggleSort = (column: InternalDataTableHeader, event?: KeyboardEvent | PointerEvent) => {\n if (column.key == null) return\n\n let newSortBy = sortBy.value.map(x => ({ ...x })) ?? []\n const item = newSortBy.find(x => x.key === column.key)\n\n const initialOrder = initialSortOrder.value\n const secondaryOrder = initialSortOrder.value === 'desc' ? 'asc' : 'desc'\n if (!item) {\n const { active, mode } = resolveMultiSort(multiSort.value, event)\n if (active) {\n if (mode === 'prepend') {\n newSortBy.unshift({ key: column.key, order: initialOrder })\n } else {\n newSortBy.push({ key: column.key, order: initialOrder })\n }\n } else {\n newSortBy = [{ key: column.key, order: initialOrder }]\n }\n } else if (item.order === secondaryOrder) {\n if (mustSort.value && newSortBy.length === 1) {\n item.order = initialSortOrder.value\n } else {\n newSortBy = newSortBy.filter(x => x.key !== column.key)\n }\n } else {\n item.order = secondaryOrder\n }\n\n sortBy.value = newSortBy\n if (page) page.value = 1\n }\n\n function isSorted (column: InternalDataTableHeader) {\n return !!sortBy.value.find(item => item.key === column.key)\n }\n\n const data = { sortBy, toggleSort, isSorted }\n\n provide(VDataTableSortSymbol, data)\n\n return data\n}\n\nexport function useSort () {\n const data = inject(VDataTableSortSymbol)\n\n if (!data) throw new Error('Missing sort!')\n\n return data\n}\n\n// TODO: abstract into project composable\nexport function useSortedItems<T extends InternalItem> (\n props: {\n customKeySort: Record<string, DataTableCompareFunction> | undefined\n },\n items: Ref<T[]>,\n sortBy: Ref<readonly SortItem[]>,\n options?: {\n transform?: (item: T) => {}\n sortFunctions?: Ref<Record<string, DataTableCompareFunction> | undefined>\n sortRawFunctions?: Ref<Record<string, DataTableCompareFunction> | undefined>\n },\n) {\n const locale = useLocale()\n const sortedItems = computed(() => {\n if (!sortBy.value.length) return items.value\n\n return sortItems(items.value, sortBy.value, locale.current.value, {\n transform: options?.transform,\n sortFunctions: {\n ...props.customKeySort,\n ...options?.sortFunctions?.value,\n },\n sortRawFunctions: options?.sortRawFunctions?.value,\n })\n })\n\n return { sortedItems }\n}\n\nexport function sortItems<T extends InternalItem> (\n items: T[],\n sortByItems: readonly SortItem[],\n locale: string,\n options?: {\n transform?: (item: T) => Record<string, any>\n sortFunctions?: Record<string, DataTableCompareFunction>\n sortRawFunctions?: Record<string, DataTableCompareFunction>\n },\n): T[] {\n const stringCollator = new Intl.Collator(locale, { sensitivity: 'accent', usage: 'sort' })\n\n const transformedItems = items.map(item => (\n [item, options?.transform ? options.transform(item) : item as never] as const)\n )\n\n return transformedItems.sort((a, b) => {\n for (let i = 0; i < sortByItems.length; i++) {\n let hasCustomResult = false\n const sortKey = sortByItems[i].key\n const sortOrder = sortByItems[i].order ?? 'asc'\n\n if (sortOrder === false) continue\n\n let sortA = getObjectValueByPath(a[1], sortKey)\n let sortB = getObjectValueByPath(b[1], sortKey)\n let sortARaw = a[0].raw\n let sortBRaw = b[0].raw\n\n if (sortOrder === 'desc') {\n [sortA, sortB] = [sortB, sortA]\n ;[sortARaw, sortBRaw] = [sortBRaw, sortARaw]\n }\n\n if (options?.sortRawFunctions?.[sortKey]) {\n const customResult = options.sortRawFunctions[sortKey](sortARaw, sortBRaw)\n\n if (customResult == null) continue\n hasCustomResult = true\n if (customResult) return customResult\n }\n\n if (options?.sortFunctions?.[sortKey]) {\n const customResult = options.sortFunctions[sortKey](sortA, sortB)\n\n if (customResult == null) continue\n hasCustomResult = true\n if (customResult) return customResult\n }\n\n if (hasCustomResult) continue\n\n // Dates should be compared numerically\n if (sortA instanceof Date && sortB instanceof Date) {\n sortA = sortA.getTime()\n sortB = sortB.getTime()\n }\n\n [sortA, sortB] = [sortA, sortB].map(s => s != null ? s.toString().toLocaleLowerCase() : s)\n\n if (sortA !== sortB) {\n if (isEmpty(sortA) && isEmpty(sortB)) return 0\n if (isEmpty(sortA)) return -1\n if (isEmpty(sortB)) return 1\n if (!isNaN(sortA) && !isNaN(sortB)) return Number(sortA) - Number(sortB)\n return stringCollator.compare(sortA, sortB)\n }\n }\n\n return 0\n }).map(([item]) => item)\n}\n"],"mappings":"AAAA;AAAA,SACSA,SAAS;AAAA,SACTC,eAAe,gDAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,oBAAoB,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,YAAY,kCAE9D;AAKA,OAAO,MAAMC,sBAAsB,GAAGD,YAAY,CAAC;EACjDE,gBAAgB,EAAE;IAChBC,IAAI,EAAEC,MAAkC;IACxCC,OAAO,EAAE,KAAK;IACdC,SAAS,EAAGC,CAAM,IAAK,CAACA,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAACC,QAAQ,CAACD,CAAC;EACzD,CAAC;EACDE,MAAM,EAAE;IACNN,IAAI,EAAEO,KAAsC;IAC5CL,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDM,aAAa,EAAEC,MAA4D;EAC3EC,SAAS,EAAE;IACTV,IAAI,EAAE,CAACW,OAAO,EAAEF,MAAM,CAAuC;IAC7DP,OAAO,EAAE;EACX,CAAC;EACDU,QAAQ,EAAED;AACZ,CAAC,EAAE,gBAAgB,CAAC;AAEpB,MAAME,oBAIJ,GAAGC,MAAM,CAACC,GAAG,CAAC,yBAAyB,CAAC;AAmB1C,OAAO,SAASC,UAAUA,CAAEC,KAAgB,EAAE;EAC5C,MAAMlB,gBAAgB,GAAGN,KAAK,CAAC,MAAMwB,KAAK,CAAClB,gBAAgB,CAAC;EAC5D,MAAMO,MAAM,GAAGjB,eAAe,CAAC4B,KAAK,EAAE,QAAQ,CAAC;EAC/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AC7B,IAAI/E,OAAO,CAACgF,KAAK,CAAC,EAAE,OAAO,CAAC;QAC5B,IAAI,CAACU,KAAK,CAACX,KAAK,CAAC,IAAI,CAACW,KAAK,CAACV,KAAK,CAAC,EAAE,OAAOW,MAAM,CAACZ,KAAK,CAAC,GAAGY,MAAM,CAACX,KAAK,CAAC;QACxE,OAAOd,cAAc,CAAC0B,OAAO,CAACb,KAAK,EAAEC,KAAK,CAAC;MAC7C;IACF;IAEA,OAAO,CAAC;EACV,CAAC,CAAC,CAACvC,GAAG,CAACoD,IAAA;IAAA,IAAC,CAAClD,IAAI,CAAC,GAAAkD,IAAA;IAAA,OAAKlD,IAAI;EAAA,EAAC;AAC1B","ignoreList":[]}
|
|
@@ -715,6 +715,9 @@ export declare const VTreeview: {
|
|
|
715
715
|
[key: string]: any;
|
|
716
716
|
}>[];
|
|
717
717
|
footer: (arg: {
|
|
718
|
+
props: {
|
|
719
|
+
indentLines?: import("../../util/index.js").IndentLineType[] | undefined;
|
|
720
|
+
};
|
|
718
721
|
item: unknown;
|
|
719
722
|
internalItem: InternalListItem<unknown>;
|
|
720
723
|
loading: boolean;
|
|
@@ -1073,6 +1076,9 @@ export declare const VTreeview: {
|
|
|
1073
1076
|
[key: string]: any;
|
|
1074
1077
|
}>[];
|
|
1075
1078
|
footer: (arg: {
|
|
1079
|
+
props: {
|
|
1080
|
+
indentLines?: import("../../util/index.js").IndentLineType[] | undefined;
|
|
1081
|
+
};
|
|
1076
1082
|
item: unknown;
|
|
1077
1083
|
internalItem: InternalListItem<unknown>;
|
|
1078
1084
|
loading: boolean;
|
|
@@ -24,6 +24,9 @@ export type VTreeviewChildrenSlots<T> = {
|
|
|
24
24
|
loading: boolean;
|
|
25
25
|
};
|
|
26
26
|
footer: {
|
|
27
|
+
props: {
|
|
28
|
+
indentLines?: IndentLineType[];
|
|
29
|
+
};
|
|
27
30
|
item: T;
|
|
28
31
|
internalItem: InternalListItem<T>;
|
|
29
32
|
loading: boolean;
|
|
@@ -282,6 +285,9 @@ export declare const VTreeviewChildren: {
|
|
|
282
285
|
[key: string]: any;
|
|
283
286
|
}>[];
|
|
284
287
|
footer: (arg: {
|
|
288
|
+
props: {
|
|
289
|
+
indentLines?: IndentLineType[] | undefined;
|
|
290
|
+
};
|
|
285
291
|
item: InternalListItem<any>;
|
|
286
292
|
internalItem: InternalListItem<InternalListItem<any>>;
|
|
287
293
|
loading: boolean;
|
|
@@ -455,6 +461,9 @@ export declare const VTreeviewChildren: {
|
|
|
455
461
|
[key: string]: any;
|
|
456
462
|
}>[];
|
|
457
463
|
footer: (arg: {
|
|
464
|
+
props: {
|
|
465
|
+
indentLines?: IndentLineType[] | undefined;
|
|
466
|
+
};
|
|
458
467
|
item: InternalListItem<any>;
|
|
459
468
|
internalItem: InternalListItem<InternalListItem<any>>;
|
|
460
469
|
loading: boolean;
|
|
@@ -155,6 +155,10 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
155
155
|
...props,
|
|
156
156
|
...treeItemProps
|
|
157
157
|
});
|
|
158
|
+
const footerProps = {
|
|
159
|
+
hideActions: props.hideActions,
|
|
160
|
+
indentLines: indentLines.footer
|
|
161
|
+
};
|
|
158
162
|
return children ? _createVNode(VTreeviewGroup, _mergeProps(treeviewGroupProps, {
|
|
159
163
|
"value": props.returnObject ? item.raw : treeviewGroupProps?.value,
|
|
160
164
|
"rawId": treeviewGroupProps?.value
|
|
@@ -167,6 +171,7 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
167
171
|
...itemProps,
|
|
168
172
|
...activatorProps,
|
|
169
173
|
value: itemProps?.value,
|
|
174
|
+
hideActions: props.hideActions,
|
|
170
175
|
indentLines: indentLines.node,
|
|
171
176
|
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
|
172
177
|
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected)
|
|
@@ -180,7 +185,6 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
180
185
|
"ref": el => activatorItems.value[index] = el
|
|
181
186
|
}, listItemProps, {
|
|
182
187
|
"hasCustomPrepend": !!slots.prepend,
|
|
183
|
-
"hideActions": props.hideActions,
|
|
184
188
|
"value": props.returnObject ? item.raw : itemProps.value,
|
|
185
189
|
"loading": loading
|
|
186
190
|
}), slotsWithItem));
|
|
@@ -192,6 +196,7 @@ export const VTreeviewChildren = genericComponent()({
|
|
|
192
196
|
"isLastGroup": nextItemHasChildren,
|
|
193
197
|
"returnObject": props.returnObject
|
|
194
198
|
}), slots), slots.footer?.({
|
|
199
|
+
props: footerProps,
|
|
195
200
|
item: item.raw,
|
|
196
201
|
internalItem: item,
|
|
197
202
|
loading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTreeviewChildren.js","names":["VTreeviewGroup","makeVTreeviewItemProps","VTreeviewItem","VCheckboxBtn","VDivider","VListItemAction","VListSubheader","makeDensityProps","IconValue","computed","reactive","ref","toRaw","genericComponent","getIndentLines","pick","propsFactory","renderSlot","makeVTreeviewChildrenProps","fluid","Boolean","disabled","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","toggle","slotProps","internalItem","prepend","_createElementVNode","_Fragment","includes","_createVNode","density","isIndeterminate","v","e","stopPropagation","key","append","title","subtitle","treeviewGroupProps","filterProps","treeviewChildrenProps","_mergeProps","activator","_ref2","activatorProps","listItemProps","node","onToggleExpand","onClick","header","el","footer","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 { VListItemAction, 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 { VTreeviewItemSlots } from './VTreeviewItem'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { SelectStrategyProp } from '@/composables/nested/nested'\nimport type { GenericProps, IndentLinesVariant, IndentLineType } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VTreeviewItemSlots, 'default'>]: VTreeviewItemSlots[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 header: {\n props: InternalListItem['props']\n item: T\n internalItem: InternalListItem<T>\n loading: boolean\n }\n footer: {\n item: T\n internalItem: InternalListItem<T>\n loading: boolean\n }\n divider: { props: InternalListItem['props'] }\n subheader: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n fluid: Boolean,\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 && !props.fluid,\n separateRoots: props.separateRoots,\n parentIndentLines: props.parentIndentLines,\n variant: props.indentLinesVariant,\n })\n\n const slotsWithItem = {\n toggle: slots.toggle\n ? slotProps => slots.toggle?.({ ...slotProps, ...treeItemProps, item: item.raw, internalItem: item, loading })\n : undefined,\n prepend: slotProps => (\n <>\n { props.selectable && (!children || (children && !['leaf', 'single-leaf'].includes(props.selectStrategy as string))) && (\n <VListItemAction start>\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 </VListItemAction>\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 indentLines: indentLines.node,\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 renderSlot(\n slots.header,\n { props: listItemProps, item: item.raw, internalItem: item, loading },\n () => (\n <VTreeviewItem\n ref={ el => activatorItems.value[index] = el as VTreeviewItem }\n { ...listItemProps }\n hasCustomPrepend={ !!slots.prepend }\n hideActions={ props.hideActions }\n value={ props.returnObject ? item.raw : itemProps.value }\n loading={ loading }\n v-slots={ slotsWithItem }\n />\n )\n )\n },\n default: () => (\n <>\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 { slots.footer?.({ item: item.raw, internalItem: item, loading }) }\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 hasCustomPrepend={ !!slots.prepend }\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 })\n },\n})\n"],"mappings":";AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,sBAAsB,EAAEC,aAAa;AAAA,SACrCC,YAAY;AAAA,SACZC,QAAQ;AAAA,SACRC,eAAe,EAAEC,cAAc,6BAExC;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,EAAEC,YAAY,EAAEC,UAAU,+BAEzE;AAkCA,OAAO,MAAMC,0BAA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,MAAM;QACJ,IAAIA,IAAI,CAAClC,IAAI,KAAK,SAAS,EAAE;UAC3B,OAAOR,UAAU,CACfoC,KAAK,CAAC+D,OAAO,EACb;YAAElE,KAAK,EAAES,IAAI,CAACK;UAAI,CAAC,EACnB,MAAA4B,YAAA,CAAAxF,QAAA,EAAqBuD,IAAI,CAACT,KAAK,OACjC,CAAC;QACH;QACA,IAAIS,IAAI,CAAClC,IAAI,KAAK,WAAW,EAAE;UAC7B,OAAOR,UAAU,CACfoC,KAAK,CAACgE,SAAS,EACf;YAAEnE,KAAK,EAAES,IAAI,CAACK;UAAI,CAAC,EACnB,MAAA4B,YAAA,CAAAtF,cAAA,EAA2BqD,IAAI,CAACT,KAAK,OACvC,CAAC;QACH;QACA,OAAA0C,YAAA,CAAA1F,aAAA,EAAAuG,WAAA,CAESnC,SAAS;UAAA,oBACK,CAAC,CAACjB,KAAK,CAACmC,OAAO;UAAA,eACpBtC,KAAK,CAAC8B,WAAW;UAAA,eACjBC,WAAW,CAACqC,IAAI;UAAA,SACtBpE,KAAK,CAACf,YAAY,GAAGvB,KAAK,CAAC+C,IAAI,CAACK,GAAG,CAAC,GAAGM,SAAS,CAACP;QAAK,IACpDqB,aAAa;MAG7B,CAAC,CAAC;IACN,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VTreeviewChildren.js","names":["VTreeviewGroup","makeVTreeviewItemProps","VTreeviewItem","VCheckboxBtn","VDivider","VListItemAction","VListSubheader","makeDensityProps","IconValue","computed","reactive","ref","toRaw","genericComponent","getIndentLines","pick","propsFactory","renderSlot","makeVTreeviewChildrenProps","fluid","Boolean","disabled","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","toggle","slotProps","internalItem","prepend","_createElementVNode","_Fragment","includes","_createVNode","density","isIndeterminate","v","e","stopPropagation","key","append","title","subtitle","treeviewGroupProps","filterProps","treeviewChildrenProps","footerProps","footer","_mergeProps","activator","_ref2","activatorProps","listItemProps","node","onToggleExpand","onClick","header","el","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 { VListItemAction, 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 { VTreeviewItemSlots } from './VTreeviewItem'\nimport type { InternalListItem } from '@/components/VList/VList'\nimport type { SelectStrategyProp } from '@/composables/nested/nested'\nimport type { GenericProps, IndentLinesVariant, IndentLineType } from '@/util'\n\nexport type VTreeviewChildrenSlots<T> = {\n [K in keyof Omit<VTreeviewItemSlots, 'default'>]: VTreeviewItemSlots[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 header: {\n props: InternalListItem['props']\n item: T\n internalItem: InternalListItem<T>\n loading: boolean\n }\n footer: {\n props: { indentLines?: IndentLineType[] }\n item: T\n internalItem: InternalListItem<T>\n loading: boolean\n }\n divider: { props: InternalListItem['props'] }\n subheader: { props: InternalListItem['props'] }\n}\n\nexport const makeVTreeviewChildrenProps = propsFactory({\n fluid: Boolean,\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 && !props.fluid,\n separateRoots: props.separateRoots,\n parentIndentLines: props.parentIndentLines,\n variant: props.indentLinesVariant,\n })\n\n const slotsWithItem = {\n toggle: slots.toggle\n ? slotProps => slots.toggle?.({ ...slotProps, ...treeItemProps, item: item.raw, internalItem: item, loading })\n : undefined,\n prepend: slotProps => (\n <>\n { props.selectable && (!children || (children && !['leaf', 'single-leaf'].includes(props.selectStrategy as string))) && (\n <VListItemAction start>\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 </VListItemAction>\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 const footerProps = {\n hideActions: props.hideActions,\n indentLines: indentLines.footer,\n }\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 hideActions: props.hideActions,\n indentLines: indentLines.node,\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 renderSlot(\n slots.header,\n { props: listItemProps, item: item.raw, internalItem: item, loading },\n () => (\n <VTreeviewItem\n ref={ el => activatorItems.value[index] = el as VTreeviewItem }\n { ...listItemProps }\n hasCustomPrepend={ !!slots.prepend }\n value={ props.returnObject ? item.raw : itemProps.value }\n loading={ loading }\n v-slots={ slotsWithItem }\n />\n )\n )\n },\n default: () => (\n <>\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 { slots.footer?.({ props: footerProps, item: item.raw, internalItem: item, loading }) }\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 hasCustomPrepend={ !!slots.prepend }\n hideActions={ props.hideActions }\n indentLines={ indentLines.leaf }\n value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IAAI;UAAA,SACtBrE,KAAK,CAACf,YAAY,GAAGvB,KAAK,CAAC+C,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.10.4-dev.2025-10-
|
|
19
|
+
export const version = "3.10.4-dev.2025-10-06";
|
|
20
20
|
createVuetify.version = version;
|
|
21
21
|
export { blueprints, components, directives };
|
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
|
@@ -2712,78 +2712,79 @@ declare module 'vue' {
|
|
|
2712
2712
|
$children?: VNodeChild
|
|
2713
2713
|
}
|
|
2714
2714
|
export interface GlobalComponents {
|
|
2715
|
-
VApp: typeof import('vuetify/components')['VApp']
|
|
2716
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
|
2717
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
2718
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
2719
2715
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
2720
2716
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
2721
2717
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
2722
|
-
|
|
2718
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
|
2719
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
2723
2720
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
2724
|
-
|
|
2725
|
-
|
|
2721
|
+
VApp: typeof import('vuetify/components')['VApp']
|
|
2722
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
|
2723
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
2724
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
2726
2725
|
VBtn: typeof import('vuetify/components')['VBtn']
|
|
2726
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
2727
2727
|
VBanner: typeof import('vuetify/components')['VBanner']
|
|
2728
2728
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
2729
2729
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
2730
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
2730
2731
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
2731
2732
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
2732
2733
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
2733
|
-
|
|
2734
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
2735
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
2734
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
2736
2735
|
VCard: typeof import('vuetify/components')['VCard']
|
|
2737
2736
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
|
2738
2737
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
|
2739
2738
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
|
2740
2739
|
VCardText: typeof import('vuetify/components')['VCardText']
|
|
2741
2740
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
2742
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
2743
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
2744
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
2745
2741
|
VChip: typeof import('vuetify/components')['VChip']
|
|
2746
2742
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
2747
|
-
|
|
2743
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
2744
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
2748
2745
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
2746
|
+
VCode: typeof import('vuetify/components')['VCode']
|
|
2747
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
2749
2748
|
VCounter: typeof import('vuetify/components')['VCounter']
|
|
2749
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
|
2750
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
2751
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
2750
2752
|
VDialog: typeof import('vuetify/components')['VDialog']
|
|
2753
|
+
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
2754
|
+
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
2755
|
+
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
2756
|
+
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
|
2757
|
+
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
2758
|
+
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
2759
|
+
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
2760
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
|
2751
2761
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
2752
2762
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
2753
2763
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
2754
2764
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
2755
2765
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
2756
2766
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
|
2767
|
+
VField: typeof import('vuetify/components')['VField']
|
|
2768
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
2760
2769
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
2761
2770
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
2762
2771
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
2763
2772
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
2764
|
-
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
2765
|
-
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
2766
|
-
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
2767
|
-
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
|
2768
|
-
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
2769
|
-
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
2770
|
-
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
2771
|
-
VField: typeof import('vuetify/components')['VField']
|
|
2772
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
2773
2773
|
VFab: typeof import('vuetify/components')['VFab']
|
|
2774
2774
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
2775
|
-
|
|
2775
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
|
2776
2776
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
2777
2777
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
|
2778
2778
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
|
2779
2779
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
|
2780
2780
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
|
2781
|
-
|
|
2781
|
+
VImg: typeof import('vuetify/components')['VImg']
|
|
2782
|
+
VInput: typeof import('vuetify/components')['VInput']
|
|
2782
2783
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
2783
2784
|
VItem: typeof import('vuetify/components')['VItem']
|
|
2784
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
|
2785
2785
|
VKbd: typeof import('vuetify/components')['VKbd']
|
|
2786
|
-
|
|
2786
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
2787
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
|
2787
2788
|
VList: typeof import('vuetify/components')['VList']
|
|
2788
2789
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
2789
2790
|
VListImg: typeof import('vuetify/components')['VListImg']
|
|
@@ -2794,80 +2795,78 @@ declare module 'vue' {
|
|
|
2794
2795
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
2795
2796
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
2796
2797
|
VLabel: typeof import('vuetify/components')['VLabel']
|
|
2797
|
-
VMain: typeof import('vuetify/components')['VMain']
|
|
2798
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
|
2799
2798
|
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
|
2800
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
|
2801
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
2802
2799
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
2803
|
-
|
|
2800
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
|
2801
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
2802
|
+
VMain: typeof import('vuetify/components')['VMain']
|
|
2804
2803
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
2805
|
-
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
2806
2804
|
VPagination: typeof import('vuetify/components')['VPagination']
|
|
2807
2805
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
2806
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
2807
|
+
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
2808
2808
|
VSelect: typeof import('vuetify/components')['VSelect']
|
|
2809
|
-
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
2810
2809
|
VRating: typeof import('vuetify/components')['VRating']
|
|
2810
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
|
2811
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
2812
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
2813
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
|
2811
2814
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
2812
2815
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
2813
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
2814
2816
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
+
VTab: typeof import('vuetify/components')['VTab']
|
|
2818
|
+
VTabs: typeof import('vuetify/components')['VTabs']
|
|
2819
|
+
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
|
2820
|
+
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
|
2821
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
2822
|
+
VTable: typeof import('vuetify/components')['VTable']
|
|
2823
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
2817
2824
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
2818
2825
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
2819
2826
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
|
2820
2827
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
|
2821
2828
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
2822
2829
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
2823
|
-
|
|
2824
|
-
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
2825
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
2826
|
-
VTable: typeof import('vuetify/components')['VTable']
|
|
2827
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
2828
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
2829
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
2830
|
-
VTab: typeof import('vuetify/components')['VTab']
|
|
2831
|
-
VTabs: typeof import('vuetify/components')['VTabs']
|
|
2832
|
-
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
|
2833
|
-
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
|
2830
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
|
2834
2831
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
2835
2832
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
2833
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
2836
2834
|
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
|
2837
2835
|
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
|
2838
2836
|
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
|
2839
|
-
|
|
2837
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
2838
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
2839
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
2840
2840
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
2841
|
+
VWindow: typeof import('vuetify/components')['VWindow']
|
|
2842
|
+
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
2841
2843
|
VTreeview: typeof import('vuetify/components')['VTreeview']
|
|
2842
2844
|
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
|
2843
2845
|
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
|
2844
|
-
|
|
2845
|
-
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
2846
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
2847
|
-
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
|
2846
|
+
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
2848
2847
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
2848
|
+
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
|
2849
2849
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
2850
|
+
VContainer: typeof import('vuetify/components')['VContainer']
|
|
2851
|
+
VCol: typeof import('vuetify/components')['VCol']
|
|
2852
|
+
VRow: typeof import('vuetify/components')['VRow']
|
|
2853
|
+
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
2850
2854
|
VForm: typeof import('vuetify/components')['VForm']
|
|
2851
2855
|
VHover: typeof import('vuetify/components')['VHover']
|
|
2852
2856
|
VLayout: typeof import('vuetify/components')['VLayout']
|
|
2853
2857
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
2854
2858
|
VLazy: typeof import('vuetify/components')['VLazy']
|
|
2855
|
-
VContainer: typeof import('vuetify/components')['VContainer']
|
|
2856
|
-
VCol: typeof import('vuetify/components')['VCol']
|
|
2857
|
-
VRow: typeof import('vuetify/components')['VRow']
|
|
2858
|
-
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
2859
|
-
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
2860
2859
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
2860
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
2861
2861
|
VParallax: typeof import('vuetify/components')['VParallax']
|
|
2862
2862
|
VRadio: typeof import('vuetify/components')['VRadio']
|
|
2863
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
2864
2863
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
2864
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
2865
2865
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
|
2866
2866
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
|
2867
2867
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
|
2868
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
|
2869
2868
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
2870
|
-
|
|
2869
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
|
2871
2870
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
2872
2871
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
2873
2872
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
|
@@ -2884,16 +2883,12 @@ declare module 'vue' {
|
|
|
2884
2883
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
|
2885
2884
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
|
2886
2885
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
|
2887
|
-
|
|
2886
|
+
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
2888
2887
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
|
2889
|
-
|
|
2888
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
|
2890
2889
|
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
|
2891
2890
|
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
|
2892
|
-
|
|
2893
|
-
VPieSegment: typeof import('vuetify/labs/components')['VPieSegment']
|
|
2894
|
-
VPieTooltip: typeof import('vuetify/labs/components')['VPieTooltip']
|
|
2895
|
-
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
2896
|
-
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
2891
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
|
2897
2892
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
|
2898
2893
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
|
2899
2894
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
|
@@ -2901,6 +2896,11 @@ declare module 'vue' {
|
|
|
2901
2896
|
VVideoControls: typeof import('vuetify/labs/components')['VVideoControls']
|
|
2902
2897
|
VVideoVolume: typeof import('vuetify/labs/components')['VVideoVolume']
|
|
2903
2898
|
VHotkey: typeof import('vuetify/labs/components')['VHotkey']
|
|
2899
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
2900
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
2901
|
+
VPie: typeof import('vuetify/labs/components')['VPie']
|
|
2902
|
+
VPieSegment: typeof import('vuetify/labs/components')['VPieSegment']
|
|
2903
|
+
VPieTooltip: typeof import('vuetify/labs/components')['VPieTooltip']
|
|
2904
2904
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
|
2905
2905
|
VMaskInput: typeof import('vuetify/labs/components')['VMaskInput']
|
|
2906
2906
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
package/lib/framework.js
CHANGED
|
@@ -14,5 +14,6 @@ export type IndentLines = {
|
|
|
14
14
|
leaf: IndentLineType[] | undefined;
|
|
15
15
|
node: IndentLineType[] | undefined;
|
|
16
16
|
children: IndentLineType[] | undefined;
|
|
17
|
+
footer: IndentLineType[] | undefined;
|
|
17
18
|
};
|
|
18
19
|
export declare function getIndentLines({ depth, isLast, isLastGroup, leafLinks, separateRoots, parentIndentLines, variant }: IndentLinesOptions): IndentLines;
|
package/lib/util/indentLines.js
CHANGED
|
@@ -10,25 +10,28 @@ export function getIndentLines(_ref) {
|
|
|
10
10
|
parentIndentLines,
|
|
11
11
|
variant
|
|
12
12
|
} = _ref;
|
|
13
|
+
const isLastLeaf = isLast && (!isLastGroup || separateRoots || depth > 1);
|
|
13
14
|
if (!parentIndentLines || !depth) {
|
|
14
15
|
return {
|
|
15
16
|
leaf: undefined,
|
|
16
17
|
node: undefined,
|
|
17
|
-
children: parentIndentLines
|
|
18
|
+
children: parentIndentLines,
|
|
19
|
+
footer: parentIndentLines && (!isLastLeaf || variant === 'simple') ? [...parentIndentLines, separateRoots ? 'none' : 'line'] : ['none']
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
22
|
if (variant === 'simple') {
|
|
21
23
|
return {
|
|
22
24
|
leaf: [...parentIndentLines, 'line'],
|
|
23
25
|
node: [...parentIndentLines, 'line'],
|
|
24
|
-
children: [...parentIndentLines, 'line']
|
|
26
|
+
children: [...parentIndentLines, 'line'],
|
|
27
|
+
footer: [...parentIndentLines, 'line', 'line']
|
|
25
28
|
};
|
|
26
29
|
}
|
|
27
|
-
const isLastLeaf = isLast && (!isLastGroup || separateRoots || depth > 1);
|
|
28
30
|
return {
|
|
29
31
|
leaf: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf', ...(leafLinks ? ['leaf-link'] : [])],
|
|
30
32
|
node: [...parentIndentLines, isLastLeaf ? 'last-leaf' : 'leaf'],
|
|
31
|
-
children: [...parentIndentLines, isLastLeaf ? 'none' : 'line']
|
|
33
|
+
children: [...parentIndentLines, isLastLeaf ? 'none' : 'line'],
|
|
34
|
+
footer: [...parentIndentLines, isLastLeaf ? 'none' : 'line']
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
37
|
//# sourceMappingURL=indentLines.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indentLines.js","names":["getIndentLines","_ref","depth","isLast","isLastGroup","leafLinks","separateRoots","parentIndentLines","variant","leaf","undefined","node","children","
|
|
1
|
+
{"version":3,"file":"indentLines.js","names":["getIndentLines","_ref","depth","isLast","isLastGroup","leafLinks","separateRoots","parentIndentLines","variant","isLastLeaf","leaf","undefined","node","children","footer"],"sources":["../../src/util/indentLines.ts"],"sourcesContent":["// Types\nexport type IndentLinesVariant = 'default' | 'simple'\nexport type IndentLineType = 'leaf' | 'last-leaf' | 'line' | 'leaf-link' | 'none'\n\nexport type IndentLinesOptions = {\n depth: number\n isLast: boolean\n isLastGroup: boolean\n leafLinks: boolean\n separateRoots: boolean\n parentIndentLines: IndentLineType[] | undefined\n variant: IndentLinesVariant | undefined\n}\n\nexport type IndentLines = {\n leaf: IndentLineType[] | undefined\n node: IndentLineType[] | undefined\n children: IndentLineType[] | undefined\n footer: IndentLineType[] | undefined\n}\n\nexport function getIndentLines ({\n depth,\n isLast,\n isLastGroup,\n leafLinks,\n separateRoots,\n parentIndentLines,\n variant,\n}: IndentLinesOptions): IndentLines {\n const isLastLeaf = isLast && (!isLastGroup || separateRoots || depth > 1)\n\n if (!parentIndentLines || !depth) {\n return {\n leaf: undefined,\n node: undefined,\n children: parentIndentLines,\n footer: parentIndentLines && (!isLastLeaf || variant === 'simple')\n ? [...parentIndentLines, separateRoots ? 'none' : 'line']\n : ['none'],\n }\n }\n\n if (variant === 'simple') {\n return {\n leaf: [...parentIndentLines, 'line'],\n node: [...parentIndentLines, 'line'],\n children: [...parentIndentLines, 'line'],\n footer: [...parentIndentLines, 'line', 'line'],\n }\n }\n\n return {\n leaf: [\n ...parentIndentLines,\n isLastLeaf ? 'last-leaf' : 'leaf',\n ...leafLinks ? ['leaf-link'] as IndentLineType[] : [],\n ],\n node: [\n ...parentIndentLines,\n isLastLeaf ? 'last-leaf' : 'leaf',\n ],\n children: [\n ...parentIndentLines,\n isLastLeaf ? 'none' : 'line',\n ],\n footer: [\n ...parentIndentLines,\n isLastLeaf ? 'none' : 'line',\n ],\n }\n}\n"],"mappings":"AAAA;;AAqBA,OAAO,SAASA,cAAcA,CAAAC,IAAA,EAQM;EAAA,IARJ;IAC9BC,KAAK;IACLC,MAAM;IACNC,WAAW;IACXC,SAAS;IACTC,aAAa;IACb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