@vuetify/nightly 3.4.10-dev.2024-01-10 → 3.4.10-dev.2024-01-16
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 +19 -2
- package/dist/json/attributes.json +265 -209
- package/dist/json/importMap.json +126 -126
- package/dist/json/tags.json +14 -0
- package/dist/json/web-types.json +560 -403
- package/dist/vuetify-labs.css +1712 -1706
- package/dist/vuetify-labs.d.ts +8344 -2173
- package/dist/vuetify-labs.esm.js +15375 -15299
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +15375 -15299
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +2807 -2801
- package/dist/vuetify.d.ts +7283 -1112
- package/dist/vuetify.esm.js +15375 -15299
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +15375 -15299
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +791 -787
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +6 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +1698 -0
- package/lib/components/VBanner/index.d.mts +4 -4
- package/lib/components/VBtn/VBtn.mjs +3 -1
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +21 -5
- package/lib/components/VCarousel/index.d.mts +9 -9
- package/lib/components/VChipGroup/VChipGroup.css +3 -3
- package/lib/components/VChipGroup/VChipGroup.mjs +22 -16
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.sass +4 -3
- package/lib/components/VChipGroup/index.d.mts +118 -1
- package/lib/components/VCombobox/VCombobox.mjs +9 -3
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +1704 -0
- package/lib/components/VDataIterator/VDataIterator.mjs +2 -1
- package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
- package/lib/components/VDataIterator/index.d.mts +6 -0
- package/lib/components/VDataTable/VDataTable.mjs +2 -1
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.css +9 -4
- package/lib/components/VDataTable/VDataTableFooter.sass +9 -4
- package/lib/components/VDataTable/_variables.scss +5 -0
- package/lib/components/VDataTable/composables/paginate.mjs +6 -2
- package/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +34 -28
- package/lib/components/VDatePicker/VDatePicker.mjs +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +56 -11
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +34 -19
- package/lib/components/VFileInput/VFileInput.mjs +2 -2
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +1 -0
- package/lib/components/VList/VListItem.sass +1 -0
- package/lib/components/VList/_variables.scss +1 -0
- package/lib/components/VSelect/VSelect.mjs +5 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +1689 -0
- package/lib/components/VSelectionControl/VSelectionControl.mjs +6 -3
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +7 -7
- package/lib/components/VSlider/VSliderThumb.mjs +4 -3
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VTabs/VTab.mjs +6 -6
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +1116 -17
- package/lib/components/VWindow/index.d.mts +7 -7
- package/lib/components/index.d.mts +8361 -2190
- package/lib/composables/calendar.mjs +1 -1
- package/lib/composables/calendar.mjs.map +1 -1
- package/lib/composables/date/adapters/vuetify.mjs +1 -2
- package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
- package/lib/composables/date/date.mjs +4 -4
- package/lib/composables/date/date.mjs.map +1 -1
- package/lib/composables/locale.mjs +47 -2
- package/lib/composables/locale.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +34 -34
- package/lib/locale/index.d.mts +2 -46
- package/lib/locale/index.mjs +0 -44
- package/lib/locale/index.mjs.map +1 -1
- package/lib/locale/km.mjs +2 -1
- package/lib/locale/km.mjs.map +1 -1
- package/lib/styles/main.css +78 -78
- package/lib/styles/settings/_utilities.scss +1 -0
- package/lib/util/helpers.mjs +1 -43
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -1
- package/lib/components/VDatePicker/utils.mjs +0 -69
- package/lib/components/VDatePicker/utils.mjs.map +0 -1
- package/lib/util/dateTimeUtils.mjs +0 -115
- package/lib/util/dateTimeUtils.mjs.map +0 -1
|
@@ -38,7 +38,8 @@ export const VDataIterator = genericComponent()({
|
|
|
38
38
|
'update:itemsPerPage': value => true,
|
|
39
39
|
'update:sortBy': value => true,
|
|
40
40
|
'update:options': value => true,
|
|
41
|
-
'update:expanded': value => true
|
|
41
|
+
'update:expanded': value => true,
|
|
42
|
+
'update:currentItems': value => true
|
|
42
43
|
},
|
|
43
44
|
setup(props, _ref) {
|
|
44
45
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDataIterator.mjs","names":["makeDataTableExpandProps","provideExpanded","makeDataTableGroupProps","provideGroupBy","useGroupedItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","usePaginatedItems","makeDataTableSelectProps","provideSelection","createSort","makeDataTableSortProps","provideSort","useSortedItems","makeDataIteratorItemsProps","useDataIteratorItems","makeComponentProps","makeFilterProps","useFilter","useProxiedModel","makeTagProps","computed","toRef","genericComponent","propsFactory","useRender","makeVDataIteratorProps","search","String","loading","Boolean","itemsPerPage","VDataIterator","name","props","emits","value","setup","_ref","slots","groupBy","items","filteredItems","transform","item","raw","sortBy","multiSort","mustSort","page","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","flatItems","itemsLength","length","startIndex","stopIndex","pageCount","prevPage","nextPage","setItemsPerPage","setPage","paginatedItems","paginatedItemsWithoutGroups","isSelected","select","selectAll","toggleSelect","allItems","currentPage","isExpanded","toggleExpand","slotProps","groupedItems","_createVNode","tag","class","style","default","header","footer"],"sources":["../../../src/components/VDataIterator/VDataIterator.tsx"],"sourcesContent":["// Components\nimport { makeDataTableExpandProps, provideExpanded } from '@/components/VDataTable/composables/expand'\nimport { makeDataTableGroupProps, provideGroupBy, useGroupedItems } from '@/components/VDataTable/composables/group'\nimport { useOptions } from '@/components/VDataTable/composables/options'\nimport {\n createPagination,\n makeDataTablePaginateProps,\n providePagination,\n usePaginatedItems,\n} from '@/components/VDataTable/composables/paginate'\nimport { makeDataTableSelectProps, provideSelection } from '@/components/VDataTable/composables/select'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from '@/components/VDataTable/composables/sort'\n\n// Composables\nimport { makeDataIteratorItemsProps, useDataIteratorItems } from './composables/items'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { DataIteratorItem } from './composables/items'\nimport type { Group } from '@/components/VDataTable/composables/group'\nimport type { SortItem } from '@/components/VDataTable/composables/sort'\n\ntype VDataIteratorSlotProps = {\n page: number\n itemsPerPage: number\n sortBy: readonly SortItem[]\n pageCount: number\n toggleSort: ReturnType<typeof provideSort>['toggleSort']\n prevPage: ReturnType<typeof providePagination>['prevPage']\n nextPage: ReturnType<typeof providePagination>['nextPage']\n setPage: ReturnType<typeof providePagination>['setPage']\n setItemsPerPage: ReturnType<typeof providePagination>['setItemsPerPage']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n select: ReturnType<typeof provideSelection>['select']\n selectAll: ReturnType<typeof provideSelection>['selectAll']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n items: readonly DataIteratorItem[]\n groupedItems: readonly (DataIteratorItem | Group<DataIteratorItem>)[]\n}\n\nexport type VDataIteratorSlots = {\n default: VDataIteratorSlotProps\n header: VDataIteratorSlotProps\n footer: VDataIteratorSlotProps\n 'no-data': never\n}\n\nexport const makeVDataIteratorProps = propsFactory({\n search: String,\n loading: Boolean,\n\n ...makeComponentProps(),\n ...makeDataIteratorItemsProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeDataTablePaginateProps({ itemsPerPage: 5 }),\n ...makeDataTableExpandProps(),\n ...makeDataTableGroupProps(),\n ...makeFilterProps(),\n ...makeTagProps(),\n}, 'VDataIterator')\n\nexport const VDataIterator = genericComponent<VDataIteratorSlots>()({\n name: 'VDataIterator',\n\n props: makeVDataIteratorProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:groupBy': (value: any) => true,\n 'update:page': (value: number) => true,\n 'update:itemsPerPage': (value: number) => true,\n 'update:sortBy': (value: any) => true,\n 'update:options': (value: any) => true,\n 'update:expanded': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const groupBy = useProxiedModel(props, 'groupBy')\n const search = toRef(props, 'search')\n\n const { items } = useDataIteratorItems(props)\n const { filteredItems } = useFilter(props, items, search, { transform: item => item.raw })\n\n const { sortBy, multiSort, mustSort } = createSort(props)\n const { page, itemsPerPage } = createPagination(props)\n\n const { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const itemsLength = computed(() => flatItems.value.length)\n\n const {\n startIndex,\n stopIndex,\n pageCount,\n prevPage,\n nextPage,\n setItemsPerPage,\n setPage,\n } = providePagination({ page, itemsPerPage, itemsLength })\n const { paginatedItems } = usePaginatedItems({ items: flatItems, startIndex, stopIndex, itemsPerPage })\n\n const paginatedItemsWithoutGroups = computed(() => extractRows(paginatedItems.value))\n\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n } = provideSelection(props, { allItems: items, currentPage: paginatedItemsWithoutGroups })\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search,\n })\n\n const slotProps = computed(() => ({\n page: page.value,\n itemsPerPage: itemsPerPage.value,\n sortBy: sortBy.value,\n pageCount: pageCount.value,\n toggleSort,\n prevPage,\n nextPage,\n setPage,\n setItemsPerPage,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n isExpanded,\n toggleExpand,\n isGroupOpen,\n toggleGroup,\n items: paginatedItemsWithoutGroups.value,\n groupedItems: paginatedItems.value,\n }))\n\n useRender(() => (\n <props.tag\n class={[\n 'v-data-iterator',\n props.class,\n ]}\n style={ props.style }\n >\n { slots.header?.(slotProps.value) }\n\n { !paginatedItems.value.length\n ? slots['no-data']?.()\n : slots.default?.(slotProps.value)\n }\n\n { slots.footer?.(slotProps.value) }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VDataIterator = InstanceType<typeof VDataIterator>\n"],"mappings":";AAAA;AAAA,SACSA,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACxDC,UAAU;AAAA,SAEjBC,gBAAgB,EAChBC,0BAA0B,EAC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AAA,CAAA7C,KAAA,CAAA8C,GAAA;MAAA,SAEC,CACL,iBAAiB,EACjB9C,KAAK,CAAC+C,KAAK,CACZ;MAAA,SACO/C,KAAK,CAACgD;IAAK;MAAAC,OAAA,EAAAA,CAAA,MAEjB5C,KAAK,CAAC6C,MAAM,GAAGP,SAAS,CAACzC,KAAK,CAAC,EAE/B,CAAC+B,cAAc,CAAC/B,KAAK,CAACuB,MAAM,GAC1BpB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GACpBA,KAAK,CAAC4C,OAAO,GAAGN,SAAS,CAACzC,KAAK,CAAC,EAGlCG,KAAK,CAAC8C,MAAM,GAAGR,SAAS,CAACzC,KAAK,CAAC;IAAA,EAEpC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VDataIterator.mjs","names":["makeDataTableExpandProps","provideExpanded","makeDataTableGroupProps","provideGroupBy","useGroupedItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","usePaginatedItems","makeDataTableSelectProps","provideSelection","createSort","makeDataTableSortProps","provideSort","useSortedItems","makeDataIteratorItemsProps","useDataIteratorItems","makeComponentProps","makeFilterProps","useFilter","useProxiedModel","makeTagProps","computed","toRef","genericComponent","propsFactory","useRender","makeVDataIteratorProps","search","String","loading","Boolean","itemsPerPage","VDataIterator","name","props","emits","value","setup","_ref","slots","groupBy","items","filteredItems","transform","item","raw","sortBy","multiSort","mustSort","page","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","flatItems","itemsLength","length","startIndex","stopIndex","pageCount","prevPage","nextPage","setItemsPerPage","setPage","paginatedItems","paginatedItemsWithoutGroups","isSelected","select","selectAll","toggleSelect","allItems","currentPage","isExpanded","toggleExpand","slotProps","groupedItems","_createVNode","tag","class","style","default","header","footer"],"sources":["../../../src/components/VDataIterator/VDataIterator.tsx"],"sourcesContent":["// Components\nimport { makeDataTableExpandProps, provideExpanded } from '@/components/VDataTable/composables/expand'\nimport { makeDataTableGroupProps, provideGroupBy, useGroupedItems } from '@/components/VDataTable/composables/group'\nimport { useOptions } from '@/components/VDataTable/composables/options'\nimport {\n createPagination,\n makeDataTablePaginateProps,\n providePagination,\n usePaginatedItems,\n} from '@/components/VDataTable/composables/paginate'\nimport { makeDataTableSelectProps, provideSelection } from '@/components/VDataTable/composables/select'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from '@/components/VDataTable/composables/sort'\n\n// Composables\nimport { makeDataIteratorItemsProps, useDataIteratorItems } from './composables/items'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { DataIteratorItem } from './composables/items'\nimport type { Group } from '@/components/VDataTable/composables/group'\nimport type { SortItem } from '@/components/VDataTable/composables/sort'\n\ntype VDataIteratorSlotProps = {\n page: number\n itemsPerPage: number\n sortBy: readonly SortItem[]\n pageCount: number\n toggleSort: ReturnType<typeof provideSort>['toggleSort']\n prevPage: ReturnType<typeof providePagination>['prevPage']\n nextPage: ReturnType<typeof providePagination>['nextPage']\n setPage: ReturnType<typeof providePagination>['setPage']\n setItemsPerPage: ReturnType<typeof providePagination>['setItemsPerPage']\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n select: ReturnType<typeof provideSelection>['select']\n selectAll: ReturnType<typeof provideSelection>['selectAll']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n items: readonly DataIteratorItem[]\n groupedItems: readonly (DataIteratorItem | Group<DataIteratorItem>)[]\n}\n\nexport type VDataIteratorSlots = {\n default: VDataIteratorSlotProps\n header: VDataIteratorSlotProps\n footer: VDataIteratorSlotProps\n 'no-data': never\n}\n\nexport const makeVDataIteratorProps = propsFactory({\n search: String,\n loading: Boolean,\n\n ...makeComponentProps(),\n ...makeDataIteratorItemsProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeDataTablePaginateProps({ itemsPerPage: 5 }),\n ...makeDataTableExpandProps(),\n ...makeDataTableGroupProps(),\n ...makeFilterProps(),\n ...makeTagProps(),\n}, 'VDataIterator')\n\nexport const VDataIterator = genericComponent<VDataIteratorSlots>()({\n name: 'VDataIterator',\n\n props: makeVDataIteratorProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:groupBy': (value: any) => true,\n 'update:page': (value: number) => true,\n 'update:itemsPerPage': (value: number) => true,\n 'update:sortBy': (value: any) => true,\n 'update:options': (value: any) => true,\n 'update:expanded': (value: any) => true,\n 'update:currentItems': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const groupBy = useProxiedModel(props, 'groupBy')\n const search = toRef(props, 'search')\n\n const { items } = useDataIteratorItems(props)\n const { filteredItems } = useFilter(props, items, search, { transform: item => item.raw })\n\n const { sortBy, multiSort, mustSort } = createSort(props)\n const { page, itemsPerPage } = createPagination(props)\n\n const { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const itemsLength = computed(() => flatItems.value.length)\n\n const {\n startIndex,\n stopIndex,\n pageCount,\n prevPage,\n nextPage,\n setItemsPerPage,\n setPage,\n } = providePagination({ page, itemsPerPage, itemsLength })\n const { paginatedItems } = usePaginatedItems({ items: flatItems, startIndex, stopIndex, itemsPerPage })\n\n const paginatedItemsWithoutGroups = computed(() => extractRows(paginatedItems.value))\n\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n } = provideSelection(props, { allItems: items, currentPage: paginatedItemsWithoutGroups })\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search,\n })\n\n const slotProps = computed(() => ({\n page: page.value,\n itemsPerPage: itemsPerPage.value,\n sortBy: sortBy.value,\n pageCount: pageCount.value,\n toggleSort,\n prevPage,\n nextPage,\n setPage,\n setItemsPerPage,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n isExpanded,\n toggleExpand,\n isGroupOpen,\n toggleGroup,\n items: paginatedItemsWithoutGroups.value,\n groupedItems: paginatedItems.value,\n }))\n\n useRender(() => (\n <props.tag\n class={[\n 'v-data-iterator',\n props.class,\n ]}\n style={ props.style }\n >\n { slots.header?.(slotProps.value) }\n\n { !paginatedItems.value.length\n ? slots['no-data']?.()\n : slots.default?.(slotProps.value)\n }\n\n { slots.footer?.(slotProps.value) }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VDataIterator = InstanceType<typeof VDataIterator>\n"],"mappings":";AAAA;AAAA,SACSA,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACxDC,UAAU;AAAA,SAEjBC,gBAAgB,EAChBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,iBAAiB;AAAA,SAEVC,wBAAwB,EAAEC,gBAAgB;AAAA,SAC1CC,UAAU,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc,8CAExE;AAAA,SACSC,0BAA0B,EAAEC,oBAAoB;AAAA,SAChDC,kBAAkB;AAAA,SAClBC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe;AAAA,SACfC,YAAY,qCAErB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAkCA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AAGN,SAAS,CAACzC,KAAK,CAAC,EAGlCG,KAAK,CAAC8C,MAAM,GAAGR,SAAS,CAACzC,KAAK,CAAC;IAAA,EAEpC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -259,6 +259,7 @@ declare const VDataIterator: {
|
|
|
259
259
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
260
260
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
261
261
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
262
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
262
263
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
263
264
|
'update:modelValue': (value: any[]) => boolean;
|
|
264
265
|
'update:groupBy': (value: any) => boolean;
|
|
@@ -267,6 +268,7 @@ declare const VDataIterator: {
|
|
|
267
268
|
'update:sortBy': (value: any) => boolean;
|
|
268
269
|
'update:options': (value: any) => boolean;
|
|
269
270
|
'update:expanded': (value: any) => boolean;
|
|
271
|
+
'update:currentItems': (value: any) => boolean;
|
|
270
272
|
}, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
271
273
|
page: string | number;
|
|
272
274
|
loading: boolean;
|
|
@@ -323,6 +325,7 @@ declare const VDataIterator: {
|
|
|
323
325
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
324
326
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
325
327
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
328
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
326
329
|
}, {
|
|
327
330
|
page: string | number;
|
|
328
331
|
loading: boolean;
|
|
@@ -422,6 +425,7 @@ declare const VDataIterator: {
|
|
|
422
425
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
423
426
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
424
427
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
428
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
425
429
|
}, {}, {}, {}, {}, {
|
|
426
430
|
page: string | number;
|
|
427
431
|
loading: boolean;
|
|
@@ -505,6 +509,7 @@ declare const VDataIterator: {
|
|
|
505
509
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
506
510
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
507
511
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
512
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
508
513
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
509
514
|
'update:modelValue': (value: any[]) => boolean;
|
|
510
515
|
'update:groupBy': (value: any) => boolean;
|
|
@@ -513,6 +518,7 @@ declare const VDataIterator: {
|
|
|
513
518
|
'update:sortBy': (value: any) => boolean;
|
|
514
519
|
'update:options': (value: any) => boolean;
|
|
515
520
|
'update:expanded': (value: any) => boolean;
|
|
521
|
+
'update:currentItems': (value: any) => boolean;
|
|
516
522
|
}, string, {
|
|
517
523
|
page: string | number;
|
|
518
524
|
loading: boolean;
|
|
@@ -49,7 +49,8 @@ export const VDataTable = genericComponent()({
|
|
|
49
49
|
'update:sortBy': value => true,
|
|
50
50
|
'update:options': value => true,
|
|
51
51
|
'update:groupBy': value => true,
|
|
52
|
-
'update:expanded': value => true
|
|
52
|
+
'update:expanded': value => true,
|
|
53
|
+
'update:currentItems': value => true
|
|
53
54
|
},
|
|
54
55
|
setup(props, _ref) {
|
|
55
56
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDataTable.mjs","names":["makeVDataTableFooterProps","VDataTableFooter","makeVDataTableHeadersProps","VDataTableHeaders","makeVDataTableRowsProps","VDataTableRows","VDivider","makeVTableProps","VTable","makeDataTableExpandProps","provideExpanded","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","createHeaders","makeDataTableHeaderProps","makeDataTableItemsProps","useDataTableItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","usePaginatedItems","makeDataTableSelectProps","provideSelection","createSort","makeDataTableSortProps","provideSort","useSortedItems","provideDefaults","makeFilterProps","useFilter","computed","toRef","genericComponent","propsFactory","useRender","makeDataTableProps","width","String","Number","search","makeVDataTableProps","VDataTable","name","props","emits","value","setup","_ref","attrs","slots","groupBy","sortBy","multiSort","mustSort","page","itemsPerPage","columns","headers","sortFunctions","filterFunctions","showSelect","showExpand","items","filteredItems","transform","item","customKeyFilter","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","flatItems","itemsLength","length","startIndex","stopIndex","pageCount","setItemsPerPage","paginatedItems","paginatedItemsWithoutGroups","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","currentPage","isExpanded","toggleExpand","hideNoData","noDataText","loading","loadingText","slotProps","map","raw","internalItems","groupedItems","dataTableFooterProps","filterProps","dataTableHeadersProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","top","default","_Fragment","colgroup","thead","body","tbody","tfoot","bottom","prepend"],"sources":["../../../src/components/VDataTable/VDataTable.tsx"],"sourcesContent":["// Styles\nimport './VDataTable.sass'\n\n// Components\nimport { makeVDataTableFooterProps, VDataTableFooter } from './VDataTableFooter'\nimport { makeVDataTableHeadersProps, VDataTableHeaders } from './VDataTableHeaders'\nimport { makeVDataTableRowsProps, VDataTableRows } from './VDataTableRows'\nimport { VDivider } from '@/components/VDivider'\nimport { makeVTableProps, VTable } from '@/components/VTable/VTable'\n\n// Composables\nimport { makeDataTableExpandProps, provideExpanded } from './composables/expand'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders, makeDataTableHeaderProps } from './composables/headers'\nimport { makeDataTableItemsProps, useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { createPagination, makeDataTablePaginateProps, providePagination, usePaginatedItems } from './composables/paginate'\nimport { makeDataTableSelectProps, provideSelection } from './composables/select'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { UnwrapRef } from 'vue'\nimport type { Group } from './composables/group'\nimport type { CellProps, DataTableItem, InternalDataTableHeader, RowProps } from './types'\nimport type { VDataTableHeadersSlots } from './VDataTableHeaders'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport type VDataTableSlotProps<T> = {\n page: number\n itemsPerPage: number\n sortBy: UnwrapRef<ReturnType<typeof provideSort>['sortBy']>\n pageCount: number\n toggleSort: ReturnType<typeof provideSort>['toggleSort']\n setItemsPerPage: ReturnType<typeof providePagination>['setItemsPerPage']\n someSelected: boolean\n allSelected: boolean\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n select: ReturnType<typeof provideSelection>['select']\n selectAll: ReturnType<typeof provideSelection>['selectAll']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n items: readonly T[]\n internalItems: readonly DataTableItem[]\n groupedItems: readonly (DataTableItem<T> | Group<DataTableItem<T>>)[]\n columns: InternalDataTableHeader[]\n headers: InternalDataTableHeader[][]\n}\n\nexport type VDataTableSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {\n default: VDataTableSlotProps<T>\n colgroup: VDataTableSlotProps<T>\n top: VDataTableSlotProps<T>\n body: VDataTableSlotProps<T>\n tbody: VDataTableSlotProps<T>\n thead: VDataTableSlotProps<T>\n tfoot: VDataTableSlotProps<T>\n bottom: VDataTableSlotProps<T>\n 'body.prepend': VDataTableSlotProps<T>\n 'body.append': VDataTableSlotProps<T>\n 'footer.prepend': never\n}\n\nexport const makeDataTableProps = propsFactory({\n ...makeVDataTableRowsProps(),\n\n width: [String, Number],\n search: String,\n\n ...makeDataTableExpandProps(),\n ...makeDataTableGroupProps(),\n ...makeDataTableHeaderProps(),\n ...makeDataTableItemsProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeVDataTableHeadersProps(),\n ...makeVTableProps(),\n}, 'DataTable')\n\nexport const makeVDataTableProps = propsFactory({\n ...makeDataTablePaginateProps(),\n ...makeDataTableProps(),\n ...makeFilterProps(),\n ...makeVDataTableFooterProps(),\n}, 'VDataTable')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTable = genericComponent<new <T extends readonly any[], V>(\n props: {\n items?: T\n itemValue?: SelectItemKey<ItemType<T>>\n rowProps?: RowProps<ItemType<T>>\n cellProps?: CellProps<ItemType<T>>\n itemSelectable?: SelectItemKey<ItemType<T>>\n modelValue?: V\n 'onUpdate:modelValue'?: (value: V) => void\n },\n slots: VDataTableSlots<ItemType<T>>,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDataTable',\n\n props: makeVDataTableProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (value: number) => true,\n 'update:itemsPerPage': (value: number) => true,\n 'update:sortBy': (value: any) => true,\n 'update:options': (value: any) => true,\n 'update:groupBy': (value: any) => true,\n 'update:expanded': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const { groupBy } = createGroupBy(props)\n const { sortBy, multiSort, mustSort } = createSort(props)\n const { page, itemsPerPage } = createPagination(props)\n\n const { columns, headers, sortFunctions, filterFunctions } = createHeaders(props, {\n groupBy,\n showSelect: toRef(props, 'showSelect'),\n showExpand: toRef(props, 'showExpand'),\n })\n\n const { items } = useDataTableItems(props, columns)\n\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, items, search, {\n transform: item => item.columns,\n customKeyFilter: filterFunctions,\n })\n\n const { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups, sortFunctions)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n const itemsLength = computed(() => flatItems.value.length)\n\n const { startIndex, stopIndex, pageCount, setItemsPerPage } = providePagination({ page, itemsPerPage, itemsLength })\n const { paginatedItems } = usePaginatedItems({ items: flatItems, startIndex, stopIndex, itemsPerPage })\n\n const paginatedItemsWithoutGroups = computed(() => extractRows(paginatedItems.value))\n\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n someSelected,\n allSelected,\n } = provideSelection(props, { allItems: items, currentPage: paginatedItemsWithoutGroups })\n\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search,\n })\n\n provideDefaults({\n VDataTableRows: {\n hideNoData: toRef(props, 'hideNoData'),\n noDataText: toRef(props, 'noDataText'),\n loading: toRef(props, 'loading'),\n loadingText: toRef(props, 'loadingText'),\n },\n })\n\n const slotProps = computed<VDataTableSlotProps<any>>(() => ({\n page: page.value,\n itemsPerPage: itemsPerPage.value,\n sortBy: sortBy.value,\n pageCount: pageCount.value,\n toggleSort,\n setItemsPerPage,\n someSelected: someSelected.value,\n allSelected: allSelected.value,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n isExpanded,\n toggleExpand,\n isGroupOpen,\n toggleGroup,\n items: paginatedItemsWithoutGroups.value.map(item => item.raw),\n internalItems: paginatedItemsWithoutGroups.value,\n groupedItems: paginatedItems.value,\n columns: columns.value,\n headers: headers.value,\n }))\n\n useRender(() => {\n const dataTableFooterProps = VDataTableFooter.filterProps(props)\n const dataTableHeadersProps = VDataTableHeaders.filterProps(props)\n const dataTableRowsProps = VDataTableRows.filterProps(props)\n const tableProps = VTable.filterProps(props)\n\n return (\n <VTable\n class={[\n 'v-data-table',\n {\n 'v-data-table--show-select': props.showSelect,\n 'v-data-table--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n default: () => slots.default ? slots.default(slotProps.value) : (\n <>\n { slots.colgroup?.(slotProps.value) }\n <thead>\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n { slots.thead?.(slotProps.value) }\n <tbody>\n { slots['body.prepend']?.(slotProps.value) }\n { slots.body ? slots.body(slotProps.value) : (\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ paginatedItems.value }\n v-slots={ slots }\n />\n )}\n { slots['body.append']?.(slotProps.value) }\n </tbody>\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </>\n ),\n bottom: () => slots.bottom ? slots.bottom(slotProps.value) : (\n <>\n <VDivider />\n\n <VDataTableFooter\n { ...dataTableFooterProps }\n v-slots={{\n prepend: slots['footer.prepend'],\n }}\n />\n </>\n ),\n }}\n </VTable>\n )\n })\n\n return {}\n },\n})\n\nexport type VDataTable = InstanceType<typeof VDataTable>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,uBAAuB,EAAEC,cAAc;AAAA,SACvCC,QAAQ;AAAA,SACRC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,aAAa,EAAEC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACvEC,aAAa,EAAEC,wBAAwB;AAAA,SACvCC,uBAAuB,EAAEC,iBAAiB;AAAA,SAC1CC,UAAU;AAAA,SACVC,gBAAgB,E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AA,KAAMtE,KAAK,CAACsE,MAAM,GAAGtE,KAAK,CAACsE,MAAM,CAACtB,SAAS,CAACpD,KAAK,CAAC,GAAA8D,YAAA,CAAAM,SAAA,SAAAN,YAAA,CAAAxG,QAAA,eAAAwG,YAAA,CAAA7G,gBAAA,EAK/CwG,oBAAoB,EAChB;UACPkB,OAAO,EAAEvE,KAAK,CAAC,gBAAgB;QACjC,CAAC;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VDataTable.mjs","names":["makeVDataTableFooterProps","VDataTableFooter","makeVDataTableHeadersProps","VDataTableHeaders","makeVDataTableRowsProps","VDataTableRows","VDivider","makeVTableProps","VTable","makeDataTableExpandProps","provideExpanded","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","createHeaders","makeDataTableHeaderProps","makeDataTableItemsProps","useDataTableItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","usePaginatedItems","makeDataTableSelectProps","provideSelection","createSort","makeDataTableSortProps","provideSort","useSortedItems","provideDefaults","makeFilterProps","useFilter","computed","toRef","genericComponent","propsFactory","useRender","makeDataTableProps","width","String","Number","search","makeVDataTableProps","VDataTable","name","props","emits","value","setup","_ref","attrs","slots","groupBy","sortBy","multiSort","mustSort","page","itemsPerPage","columns","headers","sortFunctions","filterFunctions","showSelect","showExpand","items","filteredItems","transform","item","customKeyFilter","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","flatItems","itemsLength","length","startIndex","stopIndex","pageCount","setItemsPerPage","paginatedItems","paginatedItemsWithoutGroups","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","currentPage","isExpanded","toggleExpand","hideNoData","noDataText","loading","loadingText","slotProps","map","raw","internalItems","groupedItems","dataTableFooterProps","filterProps","dataTableHeadersProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","top","default","_Fragment","colgroup","thead","body","tbody","tfoot","bottom","prepend"],"sources":["../../../src/components/VDataTable/VDataTable.tsx"],"sourcesContent":["// Styles\nimport './VDataTable.sass'\n\n// Components\nimport { makeVDataTableFooterProps, VDataTableFooter } from './VDataTableFooter'\nimport { makeVDataTableHeadersProps, VDataTableHeaders } from './VDataTableHeaders'\nimport { makeVDataTableRowsProps, VDataTableRows } from './VDataTableRows'\nimport { VDivider } from '@/components/VDivider'\nimport { makeVTableProps, VTable } from '@/components/VTable/VTable'\n\n// Composables\nimport { makeDataTableExpandProps, provideExpanded } from './composables/expand'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders, makeDataTableHeaderProps } from './composables/headers'\nimport { makeDataTableItemsProps, useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { createPagination, makeDataTablePaginateProps, providePagination, usePaginatedItems } from './composables/paginate'\nimport { makeDataTableSelectProps, provideSelection } from './composables/select'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { UnwrapRef } from 'vue'\nimport type { Group } from './composables/group'\nimport type { CellProps, DataTableItem, InternalDataTableHeader, RowProps } from './types'\nimport type { VDataTableHeadersSlots } from './VDataTableHeaders'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport type VDataTableSlotProps<T> = {\n page: number\n itemsPerPage: number\n sortBy: UnwrapRef<ReturnType<typeof provideSort>['sortBy']>\n pageCount: number\n toggleSort: ReturnType<typeof provideSort>['toggleSort']\n setItemsPerPage: ReturnType<typeof providePagination>['setItemsPerPage']\n someSelected: boolean\n allSelected: boolean\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n select: ReturnType<typeof provideSelection>['select']\n selectAll: ReturnType<typeof provideSelection>['selectAll']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n items: readonly T[]\n internalItems: readonly DataTableItem[]\n groupedItems: readonly (DataTableItem<T> | Group<DataTableItem<T>>)[]\n columns: InternalDataTableHeader[]\n headers: InternalDataTableHeader[][]\n}\n\nexport type VDataTableSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {\n default: VDataTableSlotProps<T>\n colgroup: VDataTableSlotProps<T>\n top: VDataTableSlotProps<T>\n body: VDataTableSlotProps<T>\n tbody: VDataTableSlotProps<T>\n thead: VDataTableSlotProps<T>\n tfoot: VDataTableSlotProps<T>\n bottom: VDataTableSlotProps<T>\n 'body.prepend': VDataTableSlotProps<T>\n 'body.append': VDataTableSlotProps<T>\n 'footer.prepend': never\n}\n\nexport const makeDataTableProps = propsFactory({\n ...makeVDataTableRowsProps(),\n\n width: [String, Number],\n search: String,\n\n ...makeDataTableExpandProps(),\n ...makeDataTableGroupProps(),\n ...makeDataTableHeaderProps(),\n ...makeDataTableItemsProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeVDataTableHeadersProps(),\n ...makeVTableProps(),\n}, 'DataTable')\n\nexport const makeVDataTableProps = propsFactory({\n ...makeDataTablePaginateProps(),\n ...makeDataTableProps(),\n ...makeFilterProps(),\n ...makeVDataTableFooterProps(),\n}, 'VDataTable')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTable = genericComponent<new <T extends readonly any[], V>(\n props: {\n items?: T\n itemValue?: SelectItemKey<ItemType<T>>\n rowProps?: RowProps<ItemType<T>>\n cellProps?: CellProps<ItemType<T>>\n itemSelectable?: SelectItemKey<ItemType<T>>\n modelValue?: V\n 'onUpdate:modelValue'?: (value: V) => void\n },\n slots: VDataTableSlots<ItemType<T>>,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDataTable',\n\n props: makeVDataTableProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (value: number) => true,\n 'update:itemsPerPage': (value: number) => true,\n 'update:sortBy': (value: any) => true,\n 'update:options': (value: any) => true,\n 'update:groupBy': (value: any) => true,\n 'update:expanded': (value: any) => true,\n 'update:currentItems': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const { groupBy } = createGroupBy(props)\n const { sortBy, multiSort, mustSort } = createSort(props)\n const { page, itemsPerPage } = createPagination(props)\n\n const { columns, headers, sortFunctions, filterFunctions } = createHeaders(props, {\n groupBy,\n showSelect: toRef(props, 'showSelect'),\n showExpand: toRef(props, 'showExpand'),\n })\n\n const { items } = useDataTableItems(props, columns)\n\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter(props, items, search, {\n transform: item => item.columns,\n customKeyFilter: filterFunctions,\n })\n\n const { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups, sortFunctions)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n const itemsLength = computed(() => flatItems.value.length)\n\n const { startIndex, stopIndex, pageCount, setItemsPerPage } = providePagination({ page, itemsPerPage, itemsLength })\n const { paginatedItems } = usePaginatedItems({ items: flatItems, startIndex, stopIndex, itemsPerPage })\n\n const paginatedItemsWithoutGroups = computed(() => extractRows(paginatedItems.value))\n\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n someSelected,\n allSelected,\n } = provideSelection(props, { allItems: items, currentPage: paginatedItemsWithoutGroups })\n\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search,\n })\n\n provideDefaults({\n VDataTableRows: {\n hideNoData: toRef(props, 'hideNoData'),\n noDataText: toRef(props, 'noDataText'),\n loading: toRef(props, 'loading'),\n loadingText: toRef(props, 'loadingText'),\n },\n })\n\n const slotProps = computed<VDataTableSlotProps<any>>(() => ({\n page: page.value,\n itemsPerPage: itemsPerPage.value,\n sortBy: sortBy.value,\n pageCount: pageCount.value,\n toggleSort,\n setItemsPerPage,\n someSelected: someSelected.value,\n allSelected: allSelected.value,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n isExpanded,\n toggleExpand,\n isGroupOpen,\n toggleGroup,\n items: paginatedItemsWithoutGroups.value.map(item => item.raw),\n internalItems: paginatedItemsWithoutGroups.value,\n groupedItems: paginatedItems.value,\n columns: columns.value,\n headers: headers.value,\n }))\n\n useRender(() => {\n const dataTableFooterProps = VDataTableFooter.filterProps(props)\n const dataTableHeadersProps = VDataTableHeaders.filterProps(props)\n const dataTableRowsProps = VDataTableRows.filterProps(props)\n const tableProps = VTable.filterProps(props)\n\n return (\n <VTable\n class={[\n 'v-data-table',\n {\n 'v-data-table--show-select': props.showSelect,\n 'v-data-table--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n default: () => slots.default ? slots.default(slotProps.value) : (\n <>\n { slots.colgroup?.(slotProps.value) }\n <thead>\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n { slots.thead?.(slotProps.value) }\n <tbody>\n { slots['body.prepend']?.(slotProps.value) }\n { slots.body ? slots.body(slotProps.value) : (\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ paginatedItems.value }\n v-slots={ slots }\n />\n )}\n { slots['body.append']?.(slotProps.value) }\n </tbody>\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </>\n ),\n bottom: () => slots.bottom ? slots.bottom(slotProps.value) : (\n <>\n <VDivider />\n\n <VDataTableFooter\n { ...dataTableFooterProps }\n v-slots={{\n prepend: slots['footer.prepend'],\n }}\n />\n </>\n ),\n }}\n </VTable>\n )\n })\n\n return {}\n },\n})\n\nexport type VDataTable = InstanceType<typeof VDataTable>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,0BAA0B,EAAEC,iBAAiB;AAAA,SAC7CC,uBAAuB,EAAEC,cAAc;AAAA,SACvCC,QAAQ;AAAA,SACRC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,aAAa,EAAEC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACvEC,aAAa,EAAEC,wBAAwB;AAAA,SACvCC,uBAAuB,EAAEC,iBAAiB;AAAA,SAC1CC,UAAU;AAAA,SACVC,gBAAgB,EAAEC,0BAA0B,EAAEC,iBAAiB,EAAEC,iBAAiB;AAAA,SAClFC,wBAAwB,EAAEC,gBAAgB;AAAA,SAC1CC,UAAU,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc;AAAA,SAC/DC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS,wCAEnC;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AA8CA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7C,GAAGhC,uBAAuB,CAAC,CAAC;EAE5BmC,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACvBC,MAAM,EAAEF,MAAM;EAEd,GAAG/B,wBAAwB,CAAC,CAAC;EAC7B,GAAGG,uBAAuB,CAAC,CAAC;EAC5B,GAAGI,wBAAwB,CAAC,CAAC;EAC7B,GAAGC,uBAAuB,CAAC,CAAC;EAC5B,GAAGO,wBAAwB,CAAC,CAAC;EAC7B,GAAGG,sBAAsB,CAAC,CAAC;EAC3B,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BvD,KAAK,KAGjBA,KAAK,CAACkE,KAAK,GAAGlB,SAAS,CAACpD,KAAK,CAAC,EAAA8D,YAAA,iBAE5B1D,KAAK,CAAC,cAAc,CAAC,GAAGgD,SAAS,CAACpD,KAAK,CAAC,EACxCI,KAAK,CAACmE,IAAI,GAAGnE,KAAK,CAACmE,IAAI,CAACnB,SAAS,CAACpD,KAAK,CAAC,GAAA8D,YAAA,CAAAzG,cAAA,EAAA0G,WAAA,CAEjC5D,KAAK,EACLyD,kBAAkB;UAAA,SACfxB,cAAc,CAACpC;QAAK,IAClBI,KAAK,CAElB,EACCA,KAAK,CAAC,aAAa,CAAC,GAAGgD,SAAS,CAACpD,KAAK,CAAC,IAEzCI,KAAK,CAACoE,KAAK,GAAGpB,SAAS,CAACpD,KAAK,CAAC,EAC9BI,KAAK,CAACqE,KAAK,GAAGrB,SAAS,CAACpD,KAAK,CAAC,EAEnC;QACD0E,MAAM,EAAEA,CAAA,KAAMtE,KAAK,CAACsE,MAAM,GAAGtE,KAAK,CAACsE,MAAM,CAACtB,SAAS,CAACpD,KAAK,CAAC,GAAA8D,YAAA,CAAAM,SAAA,SAAAN,YAAA,CAAAxG,QAAA,eAAAwG,YAAA,CAAA7G,gBAAA,EAK/CwG,oBAAoB,EAChB;UACPkB,OAAO,EAAEvE,KAAK,CAAC,gBAAgB;QACjC,CAAC;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -7,23 +7,28 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.v-data-table-footer__items-per-page {
|
|
10
|
-
padding-inline-end: 24px;
|
|
11
10
|
display: flex;
|
|
12
11
|
align-items: center;
|
|
13
|
-
justify-content:
|
|
12
|
+
justify-content: center;
|
|
14
13
|
}
|
|
15
14
|
.v-data-table-footer__items-per-page > span {
|
|
16
|
-
padding-inline-end:
|
|
15
|
+
padding-inline-end: 8px;
|
|
16
|
+
}
|
|
17
|
+
.v-data-table-footer__items-per-page > .v-select {
|
|
18
|
+
width: 90px;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
.v-data-table-footer__info {
|
|
20
22
|
display: flex;
|
|
21
|
-
|
|
23
|
+
justify-content: flex-end;
|
|
24
|
+
min-width: 116px;
|
|
25
|
+
padding: 0 16px;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
.v-data-table-footer__pagination {
|
|
25
29
|
display: flex;
|
|
26
30
|
align-items: center;
|
|
31
|
+
margin-inline-start: 16px;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
.v-data-table-footer__page {
|
|
@@ -10,21 +10,26 @@
|
|
|
10
10
|
justify-content: flex-end
|
|
11
11
|
|
|
12
12
|
.v-data-table-footer__items-per-page
|
|
13
|
-
padding-inline-end: 24px
|
|
14
13
|
display: flex
|
|
15
14
|
align-items: center
|
|
16
|
-
justify-content:
|
|
15
|
+
justify-content: center
|
|
17
16
|
|
|
18
17
|
> span
|
|
19
|
-
padding-inline-end:
|
|
18
|
+
padding-inline-end: $data-table-footer-items-per-page-padding
|
|
19
|
+
|
|
20
|
+
> .v-select
|
|
21
|
+
width: $data-table-footer-select-width
|
|
20
22
|
|
|
21
23
|
.v-data-table-footer__info
|
|
22
24
|
display: flex
|
|
23
|
-
|
|
25
|
+
justify-content: flex-end
|
|
26
|
+
min-width: $data-table-footer-info-min-width
|
|
27
|
+
padding: $data-table-footer-info-padding
|
|
24
28
|
|
|
25
29
|
.v-data-table-footer__pagination
|
|
26
30
|
display: flex
|
|
27
31
|
align-items: center
|
|
32
|
+
margin-inline-start: $data-table-footer-pagination-margin-inline-start
|
|
28
33
|
|
|
29
34
|
.v-data-table-footer__page
|
|
30
35
|
padding: 0 8px
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
@use '../../styles/settings';
|
|
2
2
|
@use '../../styles/tools';
|
|
3
3
|
|
|
4
|
+
$data-table-footer-info-min-width: 116px !default;
|
|
5
|
+
$data-table-footer-info-padding: 0 16px !default;
|
|
4
6
|
$data-table-footer-padding: 4px !default;
|
|
7
|
+
$data-table-footer-pagination-margin-inline-start: 16px !default;
|
|
8
|
+
$data-table-footer-select-width: 90px !default;
|
|
9
|
+
$data-table-footer-items-per-page-padding: 8px !default;
|
|
5
10
|
$data-table-header-sort-badge-size: 20px !default;
|
|
6
11
|
$data-table-header-sort-badge-color: rgba(var(--v-border-color), var(--v-border-opacity)) !default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Composables
|
|
2
2
|
import { useProxiedModel } from "../../../composables/proxiedModel.mjs"; // Utilities
|
|
3
|
-
import { computed, inject, provide, watchEffect } from 'vue';
|
|
4
|
-
import { clamp, propsFactory } from "../../../util/index.mjs"; // Types
|
|
3
|
+
import { computed, inject, provide, watch, watchEffect } from 'vue';
|
|
4
|
+
import { clamp, getCurrentInstance, propsFactory } from "../../../util/index.mjs"; // Types
|
|
5
5
|
export const makeDataTablePaginateProps = propsFactory({
|
|
6
6
|
page: {
|
|
7
7
|
type: [Number, String],
|
|
@@ -78,6 +78,7 @@ export function usePagination() {
|
|
|
78
78
|
return data;
|
|
79
79
|
}
|
|
80
80
|
export function usePaginatedItems(options) {
|
|
81
|
+
const vm = getCurrentInstance('usePaginatedItems');
|
|
81
82
|
const {
|
|
82
83
|
items,
|
|
83
84
|
startIndex,
|
|
@@ -88,6 +89,9 @@ export function usePaginatedItems(options) {
|
|
|
88
89
|
if (itemsPerPage.value <= 0) return items.value;
|
|
89
90
|
return items.value.slice(startIndex.value, stopIndex.value);
|
|
90
91
|
});
|
|
92
|
+
watch(paginatedItems, val => {
|
|
93
|
+
vm.emit('update:currentItems', val);
|
|
94
|
+
});
|
|
91
95
|
return {
|
|
92
96
|
paginatedItems
|
|
93
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginate.mjs","names":["useProxiedModel","computed","inject","provide","watchEffect","clamp","propsFactory","makeDataTablePaginateProps","page","type","Number","String","default","itemsPerPage","VDataTablePaginationSymbol","Symbol","for","createPagination","props","undefined","value","providePagination","options","itemsLength","startIndex","stopIndex","Math","min","pageCount","ceil","setItemsPerPage","nextPage","prevPage","setPage","data","usePagination","Error","usePaginatedItems","items","paginatedItems","slice"],"sources":["../../../../src/components/VDataTable/composables/paginate.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide, watchEffect } from 'vue'\nimport { clamp, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\nimport type { Group } from './group'\nimport type { EventProp } from '@/util'\n\nexport const makeDataTablePaginateProps = propsFactory({\n page: {\n type: [Number, String],\n default: 1,\n },\n itemsPerPage: {\n type: [Number, String],\n default: 10,\n },\n}, 'DataTable-paginate')\n\nconst VDataTablePaginationSymbol: InjectionKey<{\n page: Ref<number>\n itemsPerPage: Ref<number>\n startIndex: Ref<number>\n stopIndex: Ref<number>\n pageCount: Ref<number>\n itemsLength: Ref<number>\n prevPage: () => void\n nextPage: () => void\n setPage: (value: number) => void\n setItemsPerPage: (value: number) => void\n}> = Symbol.for('vuetify:data-table-pagination')\n\ntype PaginationProps = {\n page: number | string\n 'onUpdate:page': EventProp | undefined\n itemsPerPage: number | string\n 'onUpdate:itemsPerPage': EventProp | undefined\n itemsLength?: number | string\n}\n\nexport function createPagination (props: PaginationProps) {\n const page = useProxiedModel(props, 'page', undefined, value => +(value ?? 1))\n const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value => +(value ?? 10))\n\n return { page, itemsPerPage }\n}\n\nexport function providePagination (options: {\n page: Ref<number>\n itemsPerPage: Ref<number>\n itemsLength: Ref<number>\n}) {\n const { page, itemsPerPage, itemsLength } = options\n\n const startIndex = computed(() => {\n if (itemsPerPage.value === -1) return 0\n\n return itemsPerPage.value * (page.value - 1)\n })\n const stopIndex = computed(() => {\n if (itemsPerPage.value === -1) return itemsLength.value\n\n return Math.min(itemsLength.value, startIndex.value + itemsPerPage.value)\n })\n\n const pageCount = computed(() => {\n if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1\n\n return Math.ceil(itemsLength.value / itemsPerPage.value)\n })\n\n watchEffect(() => {\n if (page.value > pageCount.value) {\n page.value = pageCount.value\n }\n })\n\n function setItemsPerPage (value: number) {\n itemsPerPage.value = value\n page.value = 1\n }\n\n function nextPage () {\n page.value = clamp(page.value + 1, 1, pageCount.value)\n }\n\n function prevPage () {\n page.value = clamp(page.value - 1, 1, pageCount.value)\n }\n\n function setPage (value: number) {\n page.value = clamp(value, 1, pageCount.value)\n }\n\n const data = { page, itemsPerPage, startIndex, stopIndex, pageCount, itemsLength, nextPage, prevPage, setPage, setItemsPerPage }\n\n provide(VDataTablePaginationSymbol, data)\n\n return data\n}\n\nexport function usePagination () {\n const data = inject(VDataTablePaginationSymbol)\n\n if (!data) throw new Error('Missing pagination!')\n\n return data\n}\n\nexport function usePaginatedItems <T> (options: {\n items: Ref<readonly (T | Group<T>)[]>\n startIndex: Ref<number>\n stopIndex: Ref<number>\n itemsPerPage: Ref<number>\n}) {\n const { items, startIndex, stopIndex, itemsPerPage } = options\n const paginatedItems = computed(() => {\n if (itemsPerPage.value <= 0) return items.value\n\n return items.value.slice(startIndex.value, stopIndex.value)\n })\n\n return { paginatedItems }\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,iDAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,WAAW,QAAQ,KAAK;AAAA,
|
|
1
|
+
{"version":3,"file":"paginate.mjs","names":["useProxiedModel","computed","inject","provide","watch","watchEffect","clamp","getCurrentInstance","propsFactory","makeDataTablePaginateProps","page","type","Number","String","default","itemsPerPage","VDataTablePaginationSymbol","Symbol","for","createPagination","props","undefined","value","providePagination","options","itemsLength","startIndex","stopIndex","Math","min","pageCount","ceil","setItemsPerPage","nextPage","prevPage","setPage","data","usePagination","Error","usePaginatedItems","vm","items","paginatedItems","slice","val","emit"],"sources":["../../../../src/components/VDataTable/composables/paginate.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide, watch, watchEffect } from 'vue'\nimport { clamp, getCurrentInstance, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\nimport type { Group } from './group'\nimport type { EventProp } from '@/util'\n\nexport const makeDataTablePaginateProps = propsFactory({\n page: {\n type: [Number, String],\n default: 1,\n },\n itemsPerPage: {\n type: [Number, String],\n default: 10,\n },\n}, 'DataTable-paginate')\n\nconst VDataTablePaginationSymbol: InjectionKey<{\n page: Ref<number>\n itemsPerPage: Ref<number>\n startIndex: Ref<number>\n stopIndex: Ref<number>\n pageCount: Ref<number>\n itemsLength: Ref<number>\n prevPage: () => void\n nextPage: () => void\n setPage: (value: number) => void\n setItemsPerPage: (value: number) => void\n}> = Symbol.for('vuetify:data-table-pagination')\n\ntype PaginationProps = {\n page: number | string\n 'onUpdate:page': EventProp | undefined\n itemsPerPage: number | string\n 'onUpdate:itemsPerPage': EventProp | undefined\n itemsLength?: number | string\n}\n\nexport function createPagination (props: PaginationProps) {\n const page = useProxiedModel(props, 'page', undefined, value => +(value ?? 1))\n const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value => +(value ?? 10))\n\n return { page, itemsPerPage }\n}\n\nexport function providePagination (options: {\n page: Ref<number>\n itemsPerPage: Ref<number>\n itemsLength: Ref<number>\n}) {\n const { page, itemsPerPage, itemsLength } = options\n\n const startIndex = computed(() => {\n if (itemsPerPage.value === -1) return 0\n\n return itemsPerPage.value * (page.value - 1)\n })\n const stopIndex = computed(() => {\n if (itemsPerPage.value === -1) return itemsLength.value\n\n return Math.min(itemsLength.value, startIndex.value + itemsPerPage.value)\n })\n\n const pageCount = computed(() => {\n if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1\n\n return Math.ceil(itemsLength.value / itemsPerPage.value)\n })\n\n watchEffect(() => {\n if (page.value > pageCount.value) {\n page.value = pageCount.value\n }\n })\n\n function setItemsPerPage (value: number) {\n itemsPerPage.value = value\n page.value = 1\n }\n\n function nextPage () {\n page.value = clamp(page.value + 1, 1, pageCount.value)\n }\n\n function prevPage () {\n page.value = clamp(page.value - 1, 1, pageCount.value)\n }\n\n function setPage (value: number) {\n page.value = clamp(value, 1, pageCount.value)\n }\n\n const data = { page, itemsPerPage, startIndex, stopIndex, pageCount, itemsLength, nextPage, prevPage, setPage, setItemsPerPage }\n\n provide(VDataTablePaginationSymbol, data)\n\n return data\n}\n\nexport function usePagination () {\n const data = inject(VDataTablePaginationSymbol)\n\n if (!data) throw new Error('Missing pagination!')\n\n return data\n}\n\nexport function usePaginatedItems <T> (options: {\n items: Ref<readonly (T | Group<T>)[]>\n startIndex: Ref<number>\n stopIndex: Ref<number>\n itemsPerPage: Ref<number>\n}) {\n const vm = getCurrentInstance('usePaginatedItems')\n\n const { items, startIndex, stopIndex, itemsPerPage } = options\n const paginatedItems = computed(() => {\n if (itemsPerPage.value <= 0) return items.value\n\n return items.value.slice(startIndex.value, stopIndex.value)\n })\n\n watch(paginatedItems, val => {\n vm.emit('update:currentItems', val)\n })\n\n return { paginatedItems }\n}\n"],"mappings":"AAAA;AAAA,SACSA,eAAe,iDAExB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAC1DC,KAAK,EAAEC,kBAAkB,EAAEC,YAAY,mCAEhD;AAKA,OAAO,MAAMC,0BAA0B,GAAGD,YAAY,CAAC;EACrDE,IAAI,EAAE;IACJC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EACDC,YAAY,EAAE;IACZJ,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX;AACF,CAAC,EAAE,oBAAoB,CAAC;AAExB,MAAME,0BAWJ,GAAGC,MAAM,CAACC,GAAG,CAAC,+BAA+B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MgB,EAAE,GAAGjC,kBAAkB,CAAC,mBAAmB,CAAC;EAElD,MAAM;IAAEkC,KAAK;IAAEf,UAAU;IAAEC,SAAS;IAAEZ;EAAa,CAAC,GAAGS,OAAO;EAC9D,MAAMkB,cAAc,GAAGzC,QAAQ,CAAC,MAAM;IACpC,IAAIc,YAAY,CAACO,KAAK,IAAI,CAAC,EAAE,OAAOmB,KAAK,CAACnB,KAAK;IAE/C,OAAOmB,KAAK,CAACnB,KAAK,CAACqB,KAAK,CAACjB,UAAU,CAACJ,KAAK,EAAEK,SAAS,CAACL,KAAK,CAAC;EAC7D,CAAC,CAAC;EAEFlB,KAAK,CAACsC,cAAc,EAAEE,GAAG,IAAI;IAC3BJ,EAAE,CAACK,IAAI,CAAC,qBAAqB,EAAED,GAAG,CAAC;EACrC,CAAC,CAAC;EAEF,OAAO;IAAEF;EAAe,CAAC;AAC3B"}
|
|
@@ -605,14 +605,14 @@ declare const VDataTable: {
|
|
|
605
605
|
pageText: string;
|
|
606
606
|
density: Density;
|
|
607
607
|
valueComparator: typeof deepEqual;
|
|
608
|
+
nextIcon: string;
|
|
609
|
+
prevIcon: string;
|
|
608
610
|
selectStrategy: "all" | "page" | "single";
|
|
609
611
|
returnObject: boolean;
|
|
610
612
|
filterMode: FilterMode;
|
|
611
613
|
noFilter: boolean;
|
|
612
614
|
hideNoData: boolean;
|
|
613
615
|
hover: boolean;
|
|
614
|
-
nextIcon: string;
|
|
615
|
-
prevIcon: string;
|
|
616
616
|
multiSort: boolean;
|
|
617
617
|
mustSort: boolean;
|
|
618
618
|
groupBy: readonly SortItem[];
|
|
@@ -674,6 +674,7 @@ declare const VDataTable: {
|
|
|
674
674
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
675
675
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
676
676
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
677
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
677
678
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
678
679
|
'update:modelValue': (value: any[]) => boolean;
|
|
679
680
|
'update:page': (value: number) => boolean;
|
|
@@ -682,6 +683,7 @@ declare const VDataTable: {
|
|
|
682
683
|
'update:options': (value: any) => boolean;
|
|
683
684
|
'update:groupBy': (value: any) => boolean;
|
|
684
685
|
'update:expanded': (value: any) => boolean;
|
|
686
|
+
'update:currentItems': (value: any) => boolean;
|
|
685
687
|
}, "$children" | "v-slot:default" | "v-slots" | "items" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "itemValue" | "v-slot:no-data" | "cellProps" | "itemSelectable" | "rowProps" | "v-slot:headers" | `v-slot:header.${string}` | "v-slot:data-table-group" | "v-slot:data-table-select" | `v-slot:item.${string}` | "v-slot:loading" | "v-slot:group-header" | "v-slot:expanded-row" | "v-slot:top" | "v-slot:bottom" | "v-slot:body" | "v-slot:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append" | "v-slot:footer.prepend">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
686
688
|
page: string | number;
|
|
687
689
|
style: vue.StyleValue;
|
|
@@ -695,14 +697,14 @@ declare const VDataTable: {
|
|
|
695
697
|
pageText: string;
|
|
696
698
|
density: Density;
|
|
697
699
|
valueComparator: typeof deepEqual;
|
|
700
|
+
nextIcon: string;
|
|
701
|
+
prevIcon: string;
|
|
698
702
|
selectStrategy: "all" | "page" | "single";
|
|
699
703
|
returnObject: boolean;
|
|
700
704
|
filterMode: FilterMode;
|
|
701
705
|
noFilter: boolean;
|
|
702
706
|
hideNoData: boolean;
|
|
703
707
|
hover: boolean;
|
|
704
|
-
nextIcon: string;
|
|
705
|
-
prevIcon: string;
|
|
706
708
|
multiSort: boolean;
|
|
707
709
|
mustSort: boolean;
|
|
708
710
|
groupBy: readonly SortItem[];
|
|
@@ -764,6 +766,7 @@ declare const VDataTable: {
|
|
|
764
766
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
765
767
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
766
768
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
769
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
767
770
|
}, {
|
|
768
771
|
page: string | number;
|
|
769
772
|
style: vue.StyleValue;
|
|
@@ -777,14 +780,14 @@ declare const VDataTable: {
|
|
|
777
780
|
pageText: string;
|
|
778
781
|
density: Density;
|
|
779
782
|
valueComparator: typeof deepEqual;
|
|
783
|
+
nextIcon: string;
|
|
784
|
+
prevIcon: string;
|
|
780
785
|
selectStrategy: "all" | "page" | "single";
|
|
781
786
|
returnObject: boolean;
|
|
782
787
|
filterMode: FilterMode;
|
|
783
788
|
noFilter: boolean;
|
|
784
789
|
hideNoData: boolean;
|
|
785
790
|
hover: boolean;
|
|
786
|
-
nextIcon: string;
|
|
787
|
-
prevIcon: string;
|
|
788
791
|
multiSort: boolean;
|
|
789
792
|
mustSort: boolean;
|
|
790
793
|
groupBy: readonly SortItem[];
|
|
@@ -951,14 +954,14 @@ declare const VDataTable: {
|
|
|
951
954
|
pageText: string;
|
|
952
955
|
density: Density;
|
|
953
956
|
valueComparator: typeof deepEqual;
|
|
957
|
+
nextIcon: string;
|
|
958
|
+
prevIcon: string;
|
|
954
959
|
selectStrategy: "all" | "page" | "single";
|
|
955
960
|
returnObject: boolean;
|
|
956
961
|
filterMode: FilterMode;
|
|
957
962
|
noFilter: boolean;
|
|
958
963
|
hideNoData: boolean;
|
|
959
964
|
hover: boolean;
|
|
960
|
-
nextIcon: string;
|
|
961
|
-
prevIcon: string;
|
|
962
965
|
multiSort: boolean;
|
|
963
966
|
mustSort: boolean;
|
|
964
967
|
groupBy: readonly SortItem[];
|
|
@@ -1020,6 +1023,7 @@ declare const VDataTable: {
|
|
|
1020
1023
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
1021
1024
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
1022
1025
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
1026
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
1023
1027
|
}, {}, {}, {}, {}, {
|
|
1024
1028
|
page: string | number;
|
|
1025
1029
|
style: vue.StyleValue;
|
|
@@ -1033,14 +1037,14 @@ declare const VDataTable: {
|
|
|
1033
1037
|
pageText: string;
|
|
1034
1038
|
density: Density;
|
|
1035
1039
|
valueComparator: typeof deepEqual;
|
|
1040
|
+
nextIcon: string;
|
|
1041
|
+
prevIcon: string;
|
|
1036
1042
|
selectStrategy: "all" | "page" | "single";
|
|
1037
1043
|
returnObject: boolean;
|
|
1038
1044
|
filterMode: FilterMode;
|
|
1039
1045
|
noFilter: boolean;
|
|
1040
1046
|
hideNoData: boolean;
|
|
1041
1047
|
hover: boolean;
|
|
1042
|
-
nextIcon: string;
|
|
1043
|
-
prevIcon: string;
|
|
1044
1048
|
multiSort: boolean;
|
|
1045
1049
|
mustSort: boolean;
|
|
1046
1050
|
groupBy: readonly SortItem[];
|
|
@@ -1080,14 +1084,14 @@ declare const VDataTable: {
|
|
|
1080
1084
|
pageText: string;
|
|
1081
1085
|
density: Density;
|
|
1082
1086
|
valueComparator: typeof deepEqual;
|
|
1087
|
+
nextIcon: string;
|
|
1088
|
+
prevIcon: string;
|
|
1083
1089
|
selectStrategy: "all" | "page" | "single";
|
|
1084
1090
|
returnObject: boolean;
|
|
1085
1091
|
filterMode: FilterMode;
|
|
1086
1092
|
noFilter: boolean;
|
|
1087
1093
|
hideNoData: boolean;
|
|
1088
1094
|
hover: boolean;
|
|
1089
|
-
nextIcon: string;
|
|
1090
|
-
prevIcon: string;
|
|
1091
1095
|
multiSort: boolean;
|
|
1092
1096
|
mustSort: boolean;
|
|
1093
1097
|
groupBy: readonly SortItem[];
|
|
@@ -1149,6 +1153,7 @@ declare const VDataTable: {
|
|
|
1149
1153
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
1150
1154
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
|
1151
1155
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
1156
|
+
"onUpdate:currentItems"?: ((value: any) => any) | undefined;
|
|
1152
1157
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
1153
1158
|
'update:modelValue': (value: any[]) => boolean;
|
|
1154
1159
|
'update:page': (value: number) => boolean;
|
|
@@ -1157,6 +1162,7 @@ declare const VDataTable: {
|
|
|
1157
1162
|
'update:options': (value: any) => boolean;
|
|
1158
1163
|
'update:groupBy': (value: any) => boolean;
|
|
1159
1164
|
'update:expanded': (value: any) => boolean;
|
|
1165
|
+
'update:currentItems': (value: any) => boolean;
|
|
1160
1166
|
}, "$children" | "v-slot:default" | "v-slots" | "items" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "itemValue" | "v-slot:no-data" | "cellProps" | "itemSelectable" | "rowProps" | "v-slot:headers" | `v-slot:header.${string}` | "v-slot:data-table-group" | "v-slot:data-table-select" | `v-slot:item.${string}` | "v-slot:loading" | "v-slot:group-header" | "v-slot:expanded-row" | "v-slot:top" | "v-slot:bottom" | "v-slot:body" | "v-slot:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append" | "v-slot:footer.prepend">, string, {
|
|
1161
1167
|
page: string | number;
|
|
1162
1168
|
style: vue.StyleValue;
|
|
@@ -1170,14 +1176,14 @@ declare const VDataTable: {
|
|
|
1170
1176
|
pageText: string;
|
|
1171
1177
|
density: Density;
|
|
1172
1178
|
valueComparator: typeof deepEqual;
|
|
1179
|
+
nextIcon: string;
|
|
1180
|
+
prevIcon: string;
|
|
1173
1181
|
selectStrategy: "all" | "page" | "single";
|
|
1174
1182
|
returnObject: boolean;
|
|
1175
1183
|
filterMode: FilterMode;
|
|
1176
1184
|
noFilter: boolean;
|
|
1177
1185
|
hideNoData: boolean;
|
|
1178
1186
|
hover: boolean;
|
|
1179
|
-
nextIcon: string;
|
|
1180
|
-
prevIcon: string;
|
|
1181
1187
|
multiSort: boolean;
|
|
1182
1188
|
mustSort: boolean;
|
|
1183
1189
|
groupBy: readonly SortItem[];
|
|
@@ -2820,12 +2826,12 @@ declare const VDataTableServer: {
|
|
|
2820
2826
|
pageText: string;
|
|
2821
2827
|
density: Density;
|
|
2822
2828
|
valueComparator: typeof deepEqual;
|
|
2829
|
+
nextIcon: string;
|
|
2830
|
+
prevIcon: string;
|
|
2823
2831
|
selectStrategy: "all" | "page" | "single";
|
|
2824
2832
|
returnObject: boolean;
|
|
2825
2833
|
hideNoData: boolean;
|
|
2826
2834
|
hover: boolean;
|
|
2827
|
-
nextIcon: string;
|
|
2828
|
-
prevIcon: string;
|
|
2829
2835
|
multiSort: boolean;
|
|
2830
2836
|
mustSort: boolean;
|
|
2831
2837
|
groupBy: readonly SortItem[];
|
|
@@ -2906,12 +2912,12 @@ declare const VDataTableServer: {
|
|
|
2906
2912
|
pageText: string;
|
|
2907
2913
|
density: Density;
|
|
2908
2914
|
valueComparator: typeof deepEqual;
|
|
2915
|
+
nextIcon: string;
|
|
2916
|
+
prevIcon: string;
|
|
2909
2917
|
selectStrategy: "all" | "page" | "single";
|
|
2910
2918
|
returnObject: boolean;
|
|
2911
2919
|
hideNoData: boolean;
|
|
2912
2920
|
hover: boolean;
|
|
2913
|
-
nextIcon: string;
|
|
2914
|
-
prevIcon: string;
|
|
2915
2921
|
multiSort: boolean;
|
|
2916
2922
|
mustSort: boolean;
|
|
2917
2923
|
groupBy: readonly SortItem[];
|
|
@@ -2984,12 +2990,12 @@ declare const VDataTableServer: {
|
|
|
2984
2990
|
pageText: string;
|
|
2985
2991
|
density: Density;
|
|
2986
2992
|
valueComparator: typeof deepEqual;
|
|
2993
|
+
nextIcon: string;
|
|
2994
|
+
prevIcon: string;
|
|
2987
2995
|
selectStrategy: "all" | "page" | "single";
|
|
2988
2996
|
returnObject: boolean;
|
|
2989
2997
|
hideNoData: boolean;
|
|
2990
2998
|
hover: boolean;
|
|
2991
|
-
nextIcon: string;
|
|
2992
|
-
prevIcon: string;
|
|
2993
2999
|
multiSort: boolean;
|
|
2994
3000
|
mustSort: boolean;
|
|
2995
3001
|
groupBy: readonly SortItem[];
|
|
@@ -3156,12 +3162,12 @@ declare const VDataTableServer: {
|
|
|
3156
3162
|
pageText: string;
|
|
3157
3163
|
density: Density;
|
|
3158
3164
|
valueComparator: typeof deepEqual;
|
|
3165
|
+
nextIcon: string;
|
|
3166
|
+
prevIcon: string;
|
|
3159
3167
|
selectStrategy: "all" | "page" | "single";
|
|
3160
3168
|
returnObject: boolean;
|
|
3161
3169
|
hideNoData: boolean;
|
|
3162
3170
|
hover: boolean;
|
|
3163
|
-
nextIcon: string;
|
|
3164
|
-
prevIcon: string;
|
|
3165
3171
|
multiSort: boolean;
|
|
3166
3172
|
mustSort: boolean;
|
|
3167
3173
|
groupBy: readonly SortItem[];
|
|
@@ -3234,12 +3240,12 @@ declare const VDataTableServer: {
|
|
|
3234
3240
|
pageText: string;
|
|
3235
3241
|
density: Density;
|
|
3236
3242
|
valueComparator: typeof deepEqual;
|
|
3243
|
+
nextIcon: string;
|
|
3244
|
+
prevIcon: string;
|
|
3237
3245
|
selectStrategy: "all" | "page" | "single";
|
|
3238
3246
|
returnObject: boolean;
|
|
3239
3247
|
hideNoData: boolean;
|
|
3240
3248
|
hover: boolean;
|
|
3241
|
-
nextIcon: string;
|
|
3242
|
-
prevIcon: string;
|
|
3243
3249
|
multiSort: boolean;
|
|
3244
3250
|
mustSort: boolean;
|
|
3245
3251
|
groupBy: readonly SortItem[];
|
|
@@ -3279,12 +3285,12 @@ declare const VDataTableServer: {
|
|
|
3279
3285
|
pageText: string;
|
|
3280
3286
|
density: Density;
|
|
3281
3287
|
valueComparator: typeof deepEqual;
|
|
3288
|
+
nextIcon: string;
|
|
3289
|
+
prevIcon: string;
|
|
3282
3290
|
selectStrategy: "all" | "page" | "single";
|
|
3283
3291
|
returnObject: boolean;
|
|
3284
3292
|
hideNoData: boolean;
|
|
3285
3293
|
hover: boolean;
|
|
3286
|
-
nextIcon: string;
|
|
3287
|
-
prevIcon: string;
|
|
3288
3294
|
multiSort: boolean;
|
|
3289
3295
|
mustSort: boolean;
|
|
3290
3296
|
groupBy: readonly SortItem[];
|
|
@@ -3365,12 +3371,12 @@ declare const VDataTableServer: {
|
|
|
3365
3371
|
pageText: string;
|
|
3366
3372
|
density: Density;
|
|
3367
3373
|
valueComparator: typeof deepEqual;
|
|
3374
|
+
nextIcon: string;
|
|
3375
|
+
prevIcon: string;
|
|
3368
3376
|
selectStrategy: "all" | "page" | "single";
|
|
3369
3377
|
returnObject: boolean;
|
|
3370
3378
|
hideNoData: boolean;
|
|
3371
3379
|
hover: boolean;
|
|
3372
|
-
nextIcon: string;
|
|
3373
|
-
prevIcon: string;
|
|
3374
3380
|
multiSort: boolean;
|
|
3375
3381
|
mustSort: boolean;
|
|
3376
3382
|
groupBy: readonly SortItem[];
|