@vuetify/nightly 3.8.3-master.2025-05-03 → 3.8.3-master.2025-05-05

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.
@@ -1,7 +1,8 @@
1
1
  import { provideExpanded } from './composables/expand.js';
2
2
  import { provideSelection } from './composables/select.js';
3
+ import type { DeepReadonly } from 'vue';
3
4
  import type { VDataTableSlotProps, VDataTableSlots } from './VDataTable.js';
4
- import type { CellProps, RowProps } from "./types.js";
5
+ import type { CellProps, DataTableHeader, RowProps } from "./types.js";
5
6
  import type { GenericProps, SelectItemKey } from "../../util/index.js";
6
7
  export declare const makeVDataTableServerProps: <Defaults extends {
7
8
  prevIcon?: unknown;
@@ -789,49 +790,6 @@ export declare const VDataTableServer: {
789
790
  loading?: string | boolean | undefined;
790
791
  class?: any;
791
792
  theme?: string | undefined;
792
- headers?: readonly {
793
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
794
- readonly value?: SelectItemKey<Record<string, any>>;
795
- readonly title?: string | undefined;
796
- readonly fixed?: boolean | undefined;
797
- readonly align?: ("start" | "end" | "center") | undefined;
798
- readonly width?: (number | string) | undefined;
799
- readonly minWidth?: (number | string) | undefined;
800
- readonly maxWidth?: (number | string) | undefined;
801
- readonly nowrap?: boolean | undefined;
802
- readonly headerProps?: {
803
- readonly [x: string]: any;
804
- } | undefined;
805
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
806
- readonly [x: string]: any;
807
- } | undefined;
808
- readonly sortable?: boolean | undefined;
809
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
810
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
811
- readonly filter?: import("../../types.js").FilterFunction | undefined;
812
- readonly children?: readonly {
813
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
814
- readonly value?: SelectItemKey<Record<string, any>>;
815
- readonly title?: string | undefined;
816
- readonly fixed?: boolean | undefined;
817
- readonly align?: ("start" | "end" | "center") | undefined;
818
- readonly width?: (number | string) | undefined;
819
- readonly minWidth?: (number | string) | undefined;
820
- readonly maxWidth?: (number | string) | undefined;
821
- readonly nowrap?: boolean | undefined;
822
- readonly headerProps?: {
823
- readonly [x: string]: any;
824
- } | undefined;
825
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
826
- readonly [x: string]: any;
827
- } | undefined;
828
- readonly sortable?: boolean | undefined;
829
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
830
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
831
- readonly filter?: import("../../types.js").FilterFunction | undefined;
832
- readonly children?: readonly any[] | undefined;
833
- }[] | undefined;
834
- }[] | undefined;
835
793
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
836
794
  customKeySort?: Record<string, import("./types.js").DataTableCompareFunction> | undefined;
837
795
  headerProps?: Record<string, any> | undefined;
@@ -850,7 +808,7 @@ export declare const VDataTableServer: {
850
808
  'update:options': (options: any) => true;
851
809
  'update:expanded': (options: any) => true;
852
810
  'update:groupBy': (value: any) => true;
853
- }, "$children" | "v-slots" | "v-slot:default" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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">, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
811
+ }, "headers" | "$children" | "v-slots" | "v-slot:default" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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">, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
854
812
  page: string | number;
855
813
  expanded: readonly string[];
856
814
  style: import("vue").StyleValue;
@@ -1003,49 +961,6 @@ export declare const VDataTableServer: {
1003
961
  loading?: string | boolean | undefined;
1004
962
  class?: any;
1005
963
  theme?: string | undefined;
1006
- headers?: readonly {
1007
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
1008
- readonly value?: SelectItemKey<Record<string, any>>;
1009
- readonly title?: string | undefined;
1010
- readonly fixed?: boolean | undefined;
1011
- readonly align?: ("start" | "end" | "center") | undefined;
1012
- readonly width?: (number | string) | undefined;
1013
- readonly minWidth?: (number | string) | undefined;
1014
- readonly maxWidth?: (number | string) | undefined;
1015
- readonly nowrap?: boolean | undefined;
1016
- readonly headerProps?: {
1017
- readonly [x: string]: any;
1018
- } | undefined;
1019
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
1020
- readonly [x: string]: any;
1021
- } | undefined;
1022
- readonly sortable?: boolean | undefined;
1023
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
1024
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
1025
- readonly filter?: import("../../types.js").FilterFunction | undefined;
1026
- readonly children?: readonly {
1027
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
1028
- readonly value?: SelectItemKey<Record<string, any>>;
1029
- readonly title?: string | undefined;
1030
- readonly fixed?: boolean | undefined;
1031
- readonly align?: ("start" | "end" | "center") | undefined;
1032
- readonly width?: (number | string) | undefined;
1033
- readonly minWidth?: (number | string) | undefined;
1034
- readonly maxWidth?: (number | string) | undefined;
1035
- readonly nowrap?: boolean | undefined;
1036
- readonly headerProps?: {
1037
- readonly [x: string]: any;
1038
- } | undefined;
1039
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
1040
- readonly [x: string]: any;
1041
- } | undefined;
1042
- readonly sortable?: boolean | undefined;
1043
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
1044
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
1045
- readonly filter?: import("../../types.js").FilterFunction | undefined;
1046
- readonly children?: readonly any[] | undefined;
1047
- }[] | undefined;
1048
- }[] | undefined;
1049
964
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
1050
965
  customKeySort?: Record<string, import("./types.js").DataTableCompareFunction> | undefined;
1051
966
  headerProps?: Record<string, any> | undefined;
@@ -1161,49 +1076,6 @@ export declare const VDataTableServer: {
1161
1076
  loading?: string | boolean | undefined;
1162
1077
  class?: any;
1163
1078
  theme?: string | undefined;
1164
- headers?: readonly {
1165
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
1166
- readonly value?: SelectItemKey<Record<string, any>>;
1167
- readonly title?: string | undefined;
1168
- readonly fixed?: boolean | undefined;
1169
- readonly align?: ("start" | "end" | "center") | undefined;
1170
- readonly width?: (number | string) | undefined;
1171
- readonly minWidth?: (number | string) | undefined;
1172
- readonly maxWidth?: (number | string) | undefined;
1173
- readonly nowrap?: boolean | undefined;
1174
- readonly headerProps?: {
1175
- readonly [x: string]: any;
1176
- } | undefined;
1177
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
1178
- readonly [x: string]: any;
1179
- } | undefined;
1180
- readonly sortable?: boolean | undefined;
1181
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
1182
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
1183
- readonly filter?: import("../../types.js").FilterFunction | undefined;
1184
- readonly children?: readonly {
1185
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
1186
- readonly value?: SelectItemKey<Record<string, any>>;
1187
- readonly title?: string | undefined;
1188
- readonly fixed?: boolean | undefined;
1189
- readonly align?: ("start" | "end" | "center") | undefined;
1190
- readonly width?: (number | string) | undefined;
1191
- readonly minWidth?: (number | string) | undefined;
1192
- readonly maxWidth?: (number | string) | undefined;
1193
- readonly nowrap?: boolean | undefined;
1194
- readonly headerProps?: {
1195
- readonly [x: string]: any;
1196
- } | undefined;
1197
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
1198
- readonly [x: string]: any;
1199
- } | undefined;
1200
- readonly sortable?: boolean | undefined;
1201
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
1202
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
1203
- readonly filter?: import("../../types.js").FilterFunction | undefined;
1204
- readonly children?: readonly any[] | undefined;
1205
- }[] | undefined;
1206
- }[] | undefined;
1207
1079
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
1208
1080
  customKeySort?: Record<string, import("./types.js").DataTableCompareFunction> | undefined;
1209
1081
  headerProps?: Record<string, any> | undefined;
@@ -1222,7 +1094,7 @@ export declare const VDataTableServer: {
1222
1094
  'update:options': (options: any) => true;
1223
1095
  'update:expanded': (options: any) => true;
1224
1096
  'update:groupBy': (value: any) => true;
1225
- }, "$children" | "v-slots" | "v-slot:default" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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, {
1097
+ }, "headers" | "$children" | "v-slots" | "v-slot:default" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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, {
1226
1098
  page: string | number;
1227
1099
  expanded: readonly string[];
1228
1100
  style: import("vue").StyleValue;
@@ -1319,6 +1191,7 @@ export declare const VDataTableServer: {
1319
1191
  rowProps?: RowProps<ItemType<T>>;
1320
1192
  cellProps?: CellProps<ItemType<T>>;
1321
1193
  itemSelectable?: SelectItemKey<ItemType<T>>;
1194
+ headers?: DeepReadonly<DataTableHeader<ItemType<T>>[]>;
1322
1195
  modelValue?: V;
1323
1196
  "onUpdate:modelValue"?: (value: V) => void;
1324
1197
  }, slots: VDataTableSlots<ItemType<T>>) => GenericProps<typeof props, typeof slots>) & import("../../util/index.js").FilterPropsOptions<{
@@ -1447,7 +1320,7 @@ export declare const VDataTableServer: {
1447
1320
  rowProps: import("vue").PropType<RowProps<any>>;
1448
1321
  cellProps: import("vue").PropType<CellProps<any>>;
1449
1322
  returnObject: BooleanConstructor;
1450
- headers: import("vue").PropType<import("vue").DeepReadonly<import("./types.js").DataTableHeader[]>>;
1323
+ headers: import("vue").PropType<DeepReadonly<DataTableHeader[]>>;
1451
1324
  groupBy: {
1452
1325
  type: import("vue").PropType<readonly import("./composables/sort.js").SortItem[]>;
1453
1326
  default: () => never[];
@@ -1610,7 +1483,7 @@ export declare const VDataTableServer: {
1610
1483
  rowProps: import("vue").PropType<RowProps<any>>;
1611
1484
  cellProps: import("vue").PropType<CellProps<any>>;
1612
1485
  returnObject: BooleanConstructor;
1613
- headers: import("vue").PropType<import("vue").DeepReadonly<import("./types.js").DataTableHeader[]>>;
1486
+ headers: import("vue").PropType<DeepReadonly<DataTableHeader[]>>;
1614
1487
  groupBy: {
1615
1488
  type: import("vue").PropType<readonly import("./composables/sort.js").SortItem[]>;
1616
1489
  default: () => never[];
@@ -1 +1 @@
1
- {"version":3,"file":"VDataTableServer.js","names":["makeDataTableProps","makeVDataTableFooterProps","VDataTableFooter","VDataTableHeaders","VDataTableRows","VDivider","VTable","provideExpanded","createGroupBy","provideGroupBy","useGroupedItems","createHeaders","useDataTableItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","provideSelection","createSort","provideSort","provideDefaults","computed","provide","toRef","toRefs","genericComponent","propsFactory","useRender","makeVDataTableServerProps","itemsLength","type","Number","String","required","VDataTableServer","name","props","emits","value","page","sortBy","options","setup","_ref","attrs","slots","groupBy","multiSort","mustSort","itemsPerPage","disableSort","parseInt","columns","headers","showSelect","showExpand","items","toggleSort","opened","isGroupOpen","toggleGroup","extractRows","pageCount","setItemsPerPage","flatItems","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","currentPage","isExpanded","toggleExpand","itemsWithoutGroups","search","hideNoData","noDataText","loading","loadingText","slotProps","map","item","raw","internalItems","groupedItems","dataTableFooterProps","filterProps","dataTableHeadersProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","fixedHeader","sticky","top","default","_Fragment","colgroup","hideDefaultHeader","thead","hideDefaultBody","body","tbody","tfoot","bottom","hideDefaultFooter","prepend"],"sources":["../../../src/components/VDataTable/VDataTableServer.tsx"],"sourcesContent":["// Components\nimport { makeDataTableProps } from './VDataTable'\nimport { makeVDataTableFooterProps, VDataTableFooter } from './VDataTableFooter'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRows } from './VDataTableRows'\nimport { VDivider } from '@/components/VDivider'\nimport { VTable } from '@/components/VTable'\n\n// Composables\nimport { provideExpanded } from './composables/expand'\nimport { createGroupBy, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders } from './composables/headers'\nimport { useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { createPagination, makeDataTablePaginateProps, providePagination } from './composables/paginate'\nimport { provideSelection } from './composables/select'\nimport { createSort, provideSort } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utilities\nimport { computed, provide, toRef, toRefs } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VDataTableSlotProps, VDataTableSlots } from './VDataTable'\nimport type { CellProps, RowProps } from '@/components/VDataTable/types'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport const makeVDataTableServerProps = propsFactory({\n itemsLength: {\n type: [Number, String],\n required: true,\n },\n\n ...makeDataTablePaginateProps(),\n ...makeDataTableProps(),\n ...makeVDataTableFooterProps(),\n}, 'VDataTableServer')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTableServer = 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: 'VDataTableServer',\n\n props: makeVDataTableServerProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (page: number) => true,\n 'update:itemsPerPage': (page: number) => true,\n 'update:sortBy': (sortBy: any) => true,\n 'update:options': (options: any) => true,\n 'update:expanded': (options: any) => true,\n 'update:groupBy': (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 const { disableSort } = toRefs(props)\n const itemsLength = computed(() => parseInt(props.itemsLength, 10))\n\n const { columns, headers } = 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 { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n\n const { opened, isGroupOpen, toggleGroup, extractRows } = provideGroupBy({ groupBy, sortBy, disableSort })\n\n const { pageCount, setItemsPerPage } = providePagination({ page, itemsPerPage, itemsLength })\n\n const { flatItems } = useGroupedItems(items, groupBy, opened)\n\n const { isSelected, select, selectAll, toggleSelect, someSelected, allSelected } = provideSelection(props, {\n allItems: items,\n currentPage: items,\n })\n\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n const itemsWithoutGroups = computed(() => extractRows(items.value))\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search: toRef(() => props.search),\n })\n\n provide('v-data-table', {\n toggleSort,\n sortBy,\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: itemsWithoutGroups.value.map(item => item.raw),\n internalItems: itemsWithoutGroups.value,\n groupedItems: flatItems.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--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n fixedHeader={ props.fixedHeader || props.sticky }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n default: () => slots.default ? slots.default(slotProps.value) : (\n <>\n { slots.colgroup?.(slotProps.value) }\n { !props.hideDefaultHeader && (\n <thead key=\"thead\" class=\"v-data-table__thead\" role=\"rowgroup\">\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n )}\n { slots.thead?.(slotProps.value) }\n { !props.hideDefaultBody && (\n <tbody class=\"v-data-table__tbody\" role=\"rowgroup\">\n { slots['body.prepend']?.(slotProps.value) }\n { slots.body ? slots.body(slotProps.value) : (\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ flatItems.value }\n v-slots={ slots }\n />\n )}\n { slots['body.append']?.(slotProps.value) }\n </tbody>\n )}\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </>\n ),\n bottom: () => slots.bottom ? slots.bottom(slotProps.value) : !props.hideDefaultFooter && (\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})\n\nexport type VDataTableServer = InstanceType<typeof VDataTableServer>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,QAAQ;AAAA,SACRC,MAAM,8BAEf;AAAA,SACSC,eAAe;AAAA,SACfC,aAAa,EAAEC,cAAc,EAAEC,eAAe;AAAA,SAC9CC,aAAa;AAAA,SACbC,iBAAiB;AAAA,SACjBC,UAAU;AAAA,SACVC,gBAAgB,EAAEC,0BAA0B,EAAEC,iBA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C3C,KAAK,CAAC,EAC9B,CAACF,KAAK,CAACoE,eAAe,IAAAZ,YAAA;UAAA;UAAA;QAAA,IAElB/C,KAAK,CAAC,cAAc,CAAC,GAAGoC,SAAS,CAAC3C,KAAK,CAAC,EACxCO,KAAK,CAAC4D,IAAI,GAAG5D,KAAK,CAAC4D,IAAI,CAACxB,SAAS,CAAC3C,KAAK,CAAC,GAAAsD,YAAA,CAAAxF,cAAA,EAAAyF,WAAA,CAEjCjD,KAAK,EACL8C,kBAAkB;UAAA,SACf1B,SAAS,CAAC1B;QAAK,IACbO,KAAK,CAElB,EACCA,KAAK,CAAC,aAAa,CAAC,GAAGoC,SAAS,CAAC3C,KAAK,CAAC,EAE5C,EACCO,KAAK,CAAC6D,KAAK,GAAGzB,SAAS,CAAC3C,KAAK,CAAC,EAC9BO,KAAK,CAAC8D,KAAK,GAAG1B,SAAS,CAAC3C,KAAK,CAAC,EAEnC;QACDsE,MAAM,EAAEA,CAAA,KAAM/D,KAAK,CAAC+D,MAAM,GAAG/D,KAAK,CAAC+D,MAAM,CAAC3B,SAAS,CAAC3C,KAAK,CAAC,GAAG,CAACF,KAAK,CAACyE,iBAAiB,IAAAjB,YAAA,CAAAQ,SAAA,SAAAR,YAAA,CAAAvF,QAAA,eAAAuF,YAAA,CAAA1F,gBAAA,EAK1EqF,oBAAoB,EAChB;UACPuB,OAAO,EAAEjE,KAAK,CAAC,gBAAgB;QACjC,CAAC;MAGN;IAIT,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VDataTableServer.js","names":["makeDataTableProps","makeVDataTableFooterProps","VDataTableFooter","VDataTableHeaders","VDataTableRows","VDivider","VTable","provideExpanded","createGroupBy","provideGroupBy","useGroupedItems","createHeaders","useDataTableItems","useOptions","createPagination","makeDataTablePaginateProps","providePagination","provideSelection","createSort","provideSort","provideDefaults","computed","provide","toRef","toRefs","genericComponent","propsFactory","useRender","makeVDataTableServerProps","itemsLength","type","Number","String","required","VDataTableServer","name","props","emits","value","page","sortBy","options","setup","_ref","attrs","slots","groupBy","multiSort","mustSort","itemsPerPage","disableSort","parseInt","columns","headers","showSelect","showExpand","items","toggleSort","opened","isGroupOpen","toggleGroup","extractRows","pageCount","setItemsPerPage","flatItems","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","currentPage","isExpanded","toggleExpand","itemsWithoutGroups","search","hideNoData","noDataText","loading","loadingText","slotProps","map","item","raw","internalItems","groupedItems","dataTableFooterProps","filterProps","dataTableHeadersProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","fixedHeader","sticky","top","default","_Fragment","colgroup","hideDefaultHeader","thead","hideDefaultBody","body","tbody","tfoot","bottom","hideDefaultFooter","prepend"],"sources":["../../../src/components/VDataTable/VDataTableServer.tsx"],"sourcesContent":["// Components\nimport { makeDataTableProps } from './VDataTable'\nimport { makeVDataTableFooterProps, VDataTableFooter } from './VDataTableFooter'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRows } from './VDataTableRows'\nimport { VDivider } from '@/components/VDivider'\nimport { VTable } from '@/components/VTable'\n\n// Composables\nimport { provideExpanded } from './composables/expand'\nimport { createGroupBy, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders } from './composables/headers'\nimport { useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { createPagination, makeDataTablePaginateProps, providePagination } from './composables/paginate'\nimport { provideSelection } from './composables/select'\nimport { createSort, provideSort } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utilities\nimport { computed, provide, toRef, toRefs } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { DeepReadonly } from 'vue'\nimport type { VDataTableSlotProps, VDataTableSlots } from './VDataTable'\nimport type { CellProps, DataTableHeader, RowProps } from '@/components/VDataTable/types'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport const makeVDataTableServerProps = propsFactory({\n itemsLength: {\n type: [Number, String],\n required: true,\n },\n\n ...makeDataTablePaginateProps(),\n ...makeDataTableProps(),\n ...makeVDataTableFooterProps(),\n}, 'VDataTableServer')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTableServer = 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 headers?: DeepReadonly<DataTableHeader<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: 'VDataTableServer',\n\n props: makeVDataTableServerProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (page: number) => true,\n 'update:itemsPerPage': (page: number) => true,\n 'update:sortBy': (sortBy: any) => true,\n 'update:options': (options: any) => true,\n 'update:expanded': (options: any) => true,\n 'update:groupBy': (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 const { disableSort } = toRefs(props)\n const itemsLength = computed(() => parseInt(props.itemsLength, 10))\n\n const { columns, headers } = 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 { toggleSort } = provideSort({ sortBy, multiSort, mustSort, page })\n\n const { opened, isGroupOpen, toggleGroup, extractRows } = provideGroupBy({ groupBy, sortBy, disableSort })\n\n const { pageCount, setItemsPerPage } = providePagination({ page, itemsPerPage, itemsLength })\n\n const { flatItems } = useGroupedItems(items, groupBy, opened)\n\n const { isSelected, select, selectAll, toggleSelect, someSelected, allSelected } = provideSelection(props, {\n allItems: items,\n currentPage: items,\n })\n\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n const itemsWithoutGroups = computed(() => extractRows(items.value))\n\n useOptions({\n page,\n itemsPerPage,\n sortBy,\n groupBy,\n search: toRef(() => props.search),\n })\n\n provide('v-data-table', {\n toggleSort,\n sortBy,\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: itemsWithoutGroups.value.map(item => item.raw),\n internalItems: itemsWithoutGroups.value,\n groupedItems: flatItems.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--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n fixedHeader={ props.fixedHeader || props.sticky }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n default: () => slots.default ? slots.default(slotProps.value) : (\n <>\n { slots.colgroup?.(slotProps.value) }\n { !props.hideDefaultHeader && (\n <thead key=\"thead\" class=\"v-data-table__thead\" role=\"rowgroup\">\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n )}\n { slots.thead?.(slotProps.value) }\n { !props.hideDefaultBody && (\n <tbody class=\"v-data-table__tbody\" role=\"rowgroup\">\n { slots['body.prepend']?.(slotProps.value) }\n { slots.body ? slots.body(slotProps.value) : (\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ flatItems.value }\n v-slots={ slots }\n />\n )}\n { slots['body.append']?.(slotProps.value) }\n </tbody>\n )}\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </>\n ),\n bottom: () => slots.bottom ? slots.bottom(slotProps.value) : !props.hideDefaultFooter && (\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})\n\nexport type VDataTableServer = InstanceType<typeof VDataTableServer>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,yBAAyB,EAAEC,gBAAgB;AAAA,SAC3CC,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,QAAQ;AAAA,SACRC,MAAM,8BAEf;AAAA,SACSC,eAAe;AAAA,SACfC,aAAa,EAAEC,cAAc,EAAEC,eAAe;AAAA,SAC9CC,aAAa;AAAA,SACbC,iBAAiB;AAAA,SACjBC,UAAU;AAAA,SACVC,gBAAgB,EAAEC,0BAA0B,EAAEC,iBAAiB;AAAA,SAC/DC,gBAAgB;AAAA,SAChBC,UAAU,EAAEC,WAAW;AAAA,SACvBC,eAAe,yCAExB;AACA,SAASC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,QAAQ,KAAK;AAAA,SAC7CC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,+BAElD;AAMA,OAAO,MAAMC,yBAAyB,GAAGF,YAAY,CAAC;EACpDG,WAAW,EAAE;IACXC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,QAAQ,EAAE;EACZ,CAAC;EAED,GAAGlB,0BAA0B,CAAC,CAAC;EAC/B,GAAGf,kBAAkB,CAAC,CAAC;EACvB,GAAGC,yBAAyB,CAAC;AAC/B,CAAC,EAAE,kBAAkB,CAAC;AAItB,OAAO,MA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,KAAK,CAAC8D,KAAK,GAAG1B,SAAS,CAAC3C,KAAK,CAAC,EAEnC;QACDsE,MAAM,EAAEA,CAAA,KAAM/D,KAAK,CAAC+D,MAAM,GAAG/D,KAAK,CAAC+D,MAAM,CAAC3B,SAAS,CAAC3C,KAAK,CAAC,GAAG,CAACF,KAAK,CAACyE,iBAAiB,IAAAjB,YAAA,CAAAQ,SAAA,SAAAR,YAAA,CAAAvF,QAAA,eAAAuF,YAAA,CAAA1F,gBAAA,EAK1EqF,oBAAoB,EAChB;UACPuB,OAAO,EAAEjE,KAAK,CAAC,gBAAgB;QACjC,CAAC;MAGN;IAIT,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,9 +1,10 @@
1
1
  import { provideExpanded } from './composables/expand.js';
2
2
  import { provideSelection } from './composables/select.js';
3
+ import type { DeepReadonly } from 'vue';
3
4
  import type { VDataTableSlotProps } from './VDataTable.js';
4
5
  import type { VDataTableHeadersSlots } from './VDataTableHeaders.js';
5
6
  import type { VDataTableRowsSlots } from './VDataTableRows.js';
6
- import type { CellProps, RowProps } from "./types.js";
7
+ import type { CellProps, DataTableHeader, RowProps } from "./types.js";
7
8
  import type { GenericProps, SelectItemKey, TemplateRef } from "../../util/index.js";
8
9
  type VDataTableVirtualSlotProps<T> = Omit<VDataTableSlotProps<T>, 'setItemsPerPage' | 'page' | 'pageCount' | 'itemsPerPage'>;
9
10
  export type VDataTableVirtualSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {
@@ -656,49 +657,6 @@ export declare const VDataTableVirtual: {
656
657
  loading?: string | boolean | undefined;
657
658
  class?: any;
658
659
  theme?: string | undefined;
659
- headers?: readonly {
660
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
661
- readonly value?: SelectItemKey<Record<string, any>>;
662
- readonly title?: string | undefined;
663
- readonly fixed?: boolean | undefined;
664
- readonly align?: ("start" | "end" | "center") | undefined;
665
- readonly width?: (number | string) | undefined;
666
- readonly minWidth?: (number | string) | undefined;
667
- readonly maxWidth?: (number | string) | undefined;
668
- readonly nowrap?: boolean | undefined;
669
- readonly headerProps?: {
670
- readonly [x: string]: any;
671
- } | undefined;
672
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
673
- readonly [x: string]: any;
674
- } | undefined;
675
- readonly sortable?: boolean | undefined;
676
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
677
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
678
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
679
- readonly children?: readonly {
680
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
681
- readonly value?: SelectItemKey<Record<string, any>>;
682
- readonly title?: string | undefined;
683
- readonly fixed?: boolean | undefined;
684
- readonly align?: ("start" | "end" | "center") | undefined;
685
- readonly width?: (number | string) | undefined;
686
- readonly minWidth?: (number | string) | undefined;
687
- readonly maxWidth?: (number | string) | undefined;
688
- readonly nowrap?: boolean | undefined;
689
- readonly headerProps?: {
690
- readonly [x: string]: any;
691
- } | undefined;
692
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
693
- readonly [x: string]: any;
694
- } | undefined;
695
- readonly sortable?: boolean | undefined;
696
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
697
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
698
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
699
- readonly children?: readonly any[] | undefined;
700
- }[] | undefined;
701
- }[] | undefined;
702
660
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
703
661
  customFilter?: import("../../composables/filter.js").FilterFunction | undefined;
704
662
  customKeyFilter?: import("../../composables/filter.js").FilterKeyFunctions | undefined;
@@ -719,7 +677,7 @@ export declare const VDataTableVirtual: {
719
677
  'update:options': (value: any) => true;
720
678
  'update:groupBy': (value: any) => true;
721
679
  'update:expanded': (value: any) => true;
722
- }, "$children" | "v-slots" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append">, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
680
+ }, "headers" | "$children" | "v-slots" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append">, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
723
681
  expanded: readonly string[];
724
682
  style: import("vue").StyleValue;
725
683
  mobile: boolean | null;
@@ -842,49 +800,6 @@ export declare const VDataTableVirtual: {
842
800
  loading?: string | boolean | undefined;
843
801
  class?: any;
844
802
  theme?: string | undefined;
845
- headers?: readonly {
846
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
847
- readonly value?: SelectItemKey<Record<string, any>>;
848
- readonly title?: string | undefined;
849
- readonly fixed?: boolean | undefined;
850
- readonly align?: ("start" | "end" | "center") | undefined;
851
- readonly width?: (number | string) | undefined;
852
- readonly minWidth?: (number | string) | undefined;
853
- readonly maxWidth?: (number | string) | undefined;
854
- readonly nowrap?: boolean | undefined;
855
- readonly headerProps?: {
856
- readonly [x: string]: any;
857
- } | undefined;
858
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
859
- readonly [x: string]: any;
860
- } | undefined;
861
- readonly sortable?: boolean | undefined;
862
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
863
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
864
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
865
- readonly children?: readonly {
866
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
867
- readonly value?: SelectItemKey<Record<string, any>>;
868
- readonly title?: string | undefined;
869
- readonly fixed?: boolean | undefined;
870
- readonly align?: ("start" | "end" | "center") | undefined;
871
- readonly width?: (number | string) | undefined;
872
- readonly minWidth?: (number | string) | undefined;
873
- readonly maxWidth?: (number | string) | undefined;
874
- readonly nowrap?: boolean | undefined;
875
- readonly headerProps?: {
876
- readonly [x: string]: any;
877
- } | undefined;
878
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
879
- readonly [x: string]: any;
880
- } | undefined;
881
- readonly sortable?: boolean | undefined;
882
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
883
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
884
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
885
- readonly children?: readonly any[] | undefined;
886
- }[] | undefined;
887
- }[] | undefined;
888
803
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
889
804
  customFilter?: import("../../composables/filter.js").FilterFunction | undefined;
890
805
  customKeyFilter?: import("../../composables/filter.js").FilterKeyFunctions | undefined;
@@ -975,49 +890,6 @@ export declare const VDataTableVirtual: {
975
890
  loading?: string | boolean | undefined;
976
891
  class?: any;
977
892
  theme?: string | undefined;
978
- headers?: readonly {
979
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
980
- readonly value?: SelectItemKey<Record<string, any>>;
981
- readonly title?: string | undefined;
982
- readonly fixed?: boolean | undefined;
983
- readonly align?: ("start" | "end" | "center") | undefined;
984
- readonly width?: (number | string) | undefined;
985
- readonly minWidth?: (number | string) | undefined;
986
- readonly maxWidth?: (number | string) | undefined;
987
- readonly nowrap?: boolean | undefined;
988
- readonly headerProps?: {
989
- readonly [x: string]: any;
990
- } | undefined;
991
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
992
- readonly [x: string]: any;
993
- } | undefined;
994
- readonly sortable?: boolean | undefined;
995
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
996
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
997
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
998
- readonly children?: readonly {
999
- readonly key?: ("data-table-group" | "data-table-select" | "data-table-expand" | (string & {})) | undefined;
1000
- readonly value?: SelectItemKey<Record<string, any>>;
1001
- readonly title?: string | undefined;
1002
- readonly fixed?: boolean | undefined;
1003
- readonly align?: ("start" | "end" | "center") | undefined;
1004
- readonly width?: (number | string) | undefined;
1005
- readonly minWidth?: (number | string) | undefined;
1006
- readonly maxWidth?: (number | string) | undefined;
1007
- readonly nowrap?: boolean | undefined;
1008
- readonly headerProps?: {
1009
- readonly [x: string]: any;
1010
- } | undefined;
1011
- readonly cellProps?: import("./types.js").HeaderCellPropsFunction | {
1012
- readonly [x: string]: any;
1013
- } | undefined;
1014
- readonly sortable?: boolean | undefined;
1015
- readonly sort?: import("./types.js").DataTableCompareFunction | undefined;
1016
- readonly sortRaw?: import("./types.js").DataTableCompareFunction | undefined;
1017
- readonly filter?: import("../../composables/filter.js").FilterFunction | undefined;
1018
- readonly children?: readonly any[] | undefined;
1019
- }[] | undefined;
1020
- }[] | undefined;
1021
893
  mobileBreakpoint?: number | import("../../types.js").DisplayBreakpoint | undefined;
1022
894
  customFilter?: import("../../composables/filter.js").FilterFunction | undefined;
1023
895
  customKeyFilter?: import("../../composables/filter.js").FilterKeyFunctions | undefined;
@@ -1038,7 +910,7 @@ export declare const VDataTableVirtual: {
1038
910
  'update:options': (value: any) => true;
1039
911
  'update:groupBy': (value: any) => true;
1040
912
  'update:expanded': (value: any) => true;
1041
- }, "$children" | "v-slots" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append">, string, {
913
+ }, "headers" | "$children" | "v-slots" | "modelValue" | "cellProps" | "items" | "itemValue" | "itemSelectable" | "rowProps" | "update:modelValue" | "v-slot:loader" | "v-slot:item" | "v-slot:no-data" | "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:colgroup" | "v-slot:tbody" | "v-slot:tfoot" | "v-slot:thead" | "v-slot:body.prepend" | "v-slot:body.append">, string, {
1042
914
  expanded: readonly string[];
1043
915
  style: import("vue").StyleValue;
1044
916
  mobile: boolean | null;
@@ -1120,6 +992,7 @@ export declare const VDataTableVirtual: {
1120
992
  rowProps?: RowProps<ItemType<T>>;
1121
993
  cellProps?: CellProps<ItemType<T>>;
1122
994
  itemSelectable?: SelectItemKey<ItemType<T>>;
995
+ headers?: DeepReadonly<DataTableHeader<ItemType<T>>[]>;
1123
996
  modelValue?: V;
1124
997
  "onUpdate:modelValue"?: (value: V) => void;
1125
998
  }, slots: VDataTableVirtualSlots<ItemType<T>>) => GenericProps<typeof props, typeof slots>) & import("../../util/index.js").FilterPropsOptions<{
@@ -1162,7 +1035,7 @@ export declare const VDataTableVirtual: {
1162
1035
  };
1163
1036
  class: import("vue").PropType<import("../../composables/component.js").ClassValue>;
1164
1037
  theme: StringConstructor;
1165
- headers: import("vue").PropType<import("vue").DeepReadonly<import("./types.js").DataTableHeader[]>>;
1038
+ headers: import("vue").PropType<DeepReadonly<DataTableHeader[]>>;
1166
1039
  tag: {
1167
1040
  type: import("vue").PropType<string | import("../../util/index.js").JSXComponent>;
1168
1041
  default: string;
@@ -1277,7 +1150,7 @@ export declare const VDataTableVirtual: {
1277
1150
  };
1278
1151
  class: import("vue").PropType<import("../../composables/component.js").ClassValue>;
1279
1152
  theme: StringConstructor;
1280
- headers: import("vue").PropType<import("vue").DeepReadonly<import("./types.js").DataTableHeader[]>>;
1153
+ headers: import("vue").PropType<DeepReadonly<DataTableHeader[]>>;
1281
1154
  tag: {
1282
1155
  type: import("vue").PropType<string | import("../../util/index.js").JSXComponent>;
1283
1156
  default: string;
@@ -1 +1 @@
1
- {"version":3,"file":"VDataTableVirtual.js","names":["makeDataTableProps","VDataTableHeaders","VDataTableRow","VDataTableRows","VTable","VVirtualScrollItem","provideExpanded","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","createHeaders","useDataTableItems","useOptions","provideSelection","createSort","provideSort","useSortedItems","provideDefaults","makeFilterProps","useFilter","makeVirtualProps","useVirtual","computed","shallowRef","toRef","toRefs","convertToUnit","genericComponent","omit","propsFactory","useRender","makeVDataTableVirtualProps","VDataTableVirtual","name","props","emits","value","setup","_ref","attrs","slots","groupBy","sortBy","multiSort","mustSort","disableSort","columns","headers","filterFunctions","sortFunctions","sortRawFunctions","showSelect","showExpand","items","search","filteredItems","transform","item","customKeyFilter","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","raw","flatItems","allItems","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","currentPage","isExpanded","toggleExpand","containerRef","markerRef","paddingTop","paddingBottom","computedItems","handleItemResize","handleScroll","handleScrollend","calculateVisibleItems","scrollToIndex","displayItems","map","page","itemsPerPage","hideNoData","noDataText","loading","loadingText","slotProps","internalItems","groupedItems","dataTableHeadersProps","filterProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","fixedHeader","sticky","top","wrapper","height","colgroup","hideDefaultHeader","thead","hideDefaultBody","border","length","itemSlotProps","internalItem","index","default","_ref2","itemRef","tbody","tfoot","bottom"],"sources":["../../../src/components/VDataTable/VDataTableVirtual.tsx"],"sourcesContent":["// Components\nimport { makeDataTableProps } from './VDataTable'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRow } from './VDataTableRow'\nimport { VDataTableRows } from './VDataTableRows'\nimport { VTable } from '@/components/VTable'\nimport { VVirtualScrollItem } from '@/components/VVirtualScroll/VVirtualScrollItem'\n\n// Composables\nimport { provideExpanded } from './composables/expand'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders } from './composables/headers'\nimport { useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { provideSelection } from './composables/select'\nimport { createSort, provideSort, useSortedItems } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { makeVirtualProps, useVirtual } from '@/composables/virtual'\n\n// Utilities\nimport { computed, shallowRef, toRef, toRefs } from 'vue'\nimport { convertToUnit, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VDataTableSlotProps } from './VDataTable'\nimport type { VDataTableHeadersSlots } from './VDataTableHeaders'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\nimport type { CellProps, RowProps } from '@/components/VDataTable/types'\nimport type { GenericProps, SelectItemKey, TemplateRef } from '@/util'\n\ntype VDataTableVirtualSlotProps<T> = Omit<\n VDataTableSlotProps<T>,\n | 'setItemsPerPage'\n | 'page'\n | 'pageCount'\n | 'itemsPerPage'\n>\n\nexport type VDataTableVirtualSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {\n colgroup: VDataTableVirtualSlotProps<T>\n top: VDataTableVirtualSlotProps<T>\n headers: VDataTableHeadersSlots['headers']\n tbody: VDataTableVirtualSlotProps<T>\n thead: VDataTableVirtualSlotProps<T>\n tfoot: VDataTableVirtualSlotProps<T>\n bottom: VDataTableVirtualSlotProps<T>\n 'body.prepend': VDataTableVirtualSlotProps<T>\n 'body.append': VDataTableVirtualSlotProps<T>\n item: {\n itemRef: TemplateRef\n }\n}\n\nexport const makeVDataTableVirtualProps = propsFactory({\n ...omit(makeDataTableProps(), ['hideDefaultFooter']),\n ...makeDataTableGroupProps(),\n ...makeVirtualProps(),\n ...makeFilterProps(),\n}, 'VDataTableVirtual')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTableVirtual = 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: VDataTableVirtualSlots<ItemType<T>>,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDataTableVirtual',\n\n props: makeVDataTableVirtualProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => 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 { disableSort } = toRefs(props)\n\n const {\n columns,\n headers,\n filterFunctions,\n sortFunctions,\n sortRawFunctions,\n } = createHeaders(props, {\n groupBy,\n showSelect: toRef(() => props.showSelect),\n showExpand: toRef(() => props.showExpand),\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 })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy, disableSort })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups, {\n transform: item => ({ ...item.raw, ...item.columns }),\n sortFunctions,\n sortRawFunctions,\n })\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const allItems = computed(() => extractRows(flatItems.value))\n\n const { isSelected, select, selectAll, toggleSelect, someSelected, allSelected } = provideSelection(props, {\n allItems,\n currentPage: allItems,\n })\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n const {\n containerRef,\n markerRef,\n paddingTop,\n paddingBottom,\n computedItems,\n handleItemResize,\n handleScroll,\n handleScrollend,\n calculateVisibleItems,\n scrollToIndex,\n } = useVirtual(props, flatItems)\n const displayItems = computed(() => computedItems.value.map(item => item.raw))\n\n useOptions({\n sortBy,\n page: shallowRef(1),\n itemsPerPage: shallowRef(-1),\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<VDataTableVirtualSlotProps<any>>(() => ({\n sortBy: sortBy.value,\n toggleSort,\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: allItems.value.map(item => item.raw),\n internalItems: allItems.value,\n groupedItems: flatItems.value,\n columns: columns.value,\n headers: headers.value,\n }))\n\n useRender(() => {\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--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n fixedHeader={ props.fixedHeader || props.sticky }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n wrapper: () => (\n <div\n ref={ containerRef }\n onScrollPassive={ handleScroll }\n onScrollend={ handleScrollend }\n class=\"v-table__wrapper\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <table>\n { slots.colgroup?.(slotProps.value) }\n { !props.hideDefaultHeader && (\n <thead key=\"thead\">\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n )}\n { slots.thead?.(slotProps.value) }\n { !props.hideDefaultBody && (\n <tbody key=\"tbody\">\n <tr ref={ markerRef } style={{ height: convertToUnit(paddingTop.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: 0, border: 0 }}></td>\n </tr>\n\n { slots['body.prepend']?.(slotProps.value) }\n\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ displayItems.value }\n >\n {{\n ...slots,\n item: itemSlotProps => (\n <VVirtualScrollItem\n key={ itemSlotProps.internalItem.index }\n renderless\n onUpdate:height={ height => handleItemResize(itemSlotProps.internalItem.index, height) }\n >\n { ({ itemRef }) => (\n slots.item?.({ ...itemSlotProps, itemRef }) ?? (\n <VDataTableRow\n { ...itemSlotProps.props }\n ref={ itemRef }\n key={ itemSlotProps.internalItem.index }\n index={ itemSlotProps.internalItem.index }\n v-slots={ slots }\n />\n )\n )}\n </VVirtualScrollItem>\n ),\n }}\n </VDataTableRows>\n\n { slots['body.append']?.(slotProps.value) }\n\n <tr style={{ height: convertToUnit(paddingBottom.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: 0, border: 0 }}></td>\n </tr>\n </tbody>\n )}\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </table>\n </div>\n ),\n bottom: () => slots.bottom?.(slotProps.value),\n }}\n </VTable>\n )\n })\n\n return {\n calculateVisibleItems,\n scrollToIndex,\n }\n },\n})\n\nexport type VDataTableVirtual = InstanceType<typeof VDataTableVirtual>\n"],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A;YAAA,mBAEpBT,MAAM,IAAI5B,gBAAgB,CAACmC,aAAa,CAACC,YAAY,CAACC,KAAK,EAAET,MAAM;UAAC;YAAAU,OAAA,EAEpFC,KAAA;cAAA,IAAC;gBAAEC;cAAQ,CAAC,GAAAD,KAAA;cAAA,OACZlF,KAAK,CAACiB,IAAI,GAAG;gBAAE,GAAG6D,aAAa;gBAAEK;cAAQ,CAAC,CAAC,IAAApB,YAAA,CAAAtG,aAAA,EAAAuG,WAAA,CAElCc,aAAa,CAACpF,KAAK;gBAAA,OAClByF,OAAO;gBAAA,OACPL,aAAa,CAACC,YAAY,CAACC,KAAK;gBAAA,SAC9BF,aAAa,CAACC,YAAY,CAACC;cAAK,IAC9BhF,KAAK,CAElB;YAAA;UACF;QAEJ,IAIHA,KAAK,CAAC,aAAa,CAAC,GAAGwD,SAAS,CAAC5D,KAAK,CAAC,EAAAmE,YAAA;UAAA,SAE9B;YAAEQ,MAAM,EAAErF,aAAa,CAACuD,aAAa,CAAC7C,KAAK,CAAC;YAAEgF,MAAM,EAAE;UAAE;QAAC,IAAAb,YAAA;UAAA,WACpDzD,OAAO,CAACV,KAAK,CAACiF,MAAM;UAAA,SAAU;YAAEN,MAAM,EAAE,CAAC;YAAEK,MAAM,EAAE;UAAE;QAAC,YAGzE,EACC5E,KAAK,CAACoF,KAAK,GAAG5B,SAAS,CAAC5D,KAAK,CAAC,EAC9BI,KAAK,CAACqF,KAAK,GAAG7B,SAAS,CAAC5D,KAAK,CAAC,IAGrC;QACD0F,MAAM,EAAEA,CAAA,KAAMtF,KAAK,CAACsF,MAAM,GAAG9B,SAAS,CAAC5D,KAAK;MAAC;IAIrD,CAAC,CAAC;IAEF,OAAO;MACLkD,qBAAqB;MACrBC;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VDataTableVirtual.js","names":["makeDataTableProps","VDataTableHeaders","VDataTableRow","VDataTableRows","VTable","VVirtualScrollItem","provideExpanded","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","createHeaders","useDataTableItems","useOptions","provideSelection","createSort","provideSort","useSortedItems","provideDefaults","makeFilterProps","useFilter","makeVirtualProps","useVirtual","computed","shallowRef","toRef","toRefs","convertToUnit","genericComponent","omit","propsFactory","useRender","makeVDataTableVirtualProps","VDataTableVirtual","name","props","emits","value","setup","_ref","attrs","slots","groupBy","sortBy","multiSort","mustSort","disableSort","columns","headers","filterFunctions","sortFunctions","sortRawFunctions","showSelect","showExpand","items","search","filteredItems","transform","item","customKeyFilter","toggleSort","sortByWithGroups","opened","extractRows","isGroupOpen","toggleGroup","sortedItems","raw","flatItems","allItems","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","currentPage","isExpanded","toggleExpand","containerRef","markerRef","paddingTop","paddingBottom","computedItems","handleItemResize","handleScroll","handleScrollend","calculateVisibleItems","scrollToIndex","displayItems","map","page","itemsPerPage","hideNoData","noDataText","loading","loadingText","slotProps","internalItems","groupedItems","dataTableHeadersProps","filterProps","dataTableRowsProps","tableProps","_createVNode","_mergeProps","class","style","fixedHeader","sticky","top","wrapper","height","colgroup","hideDefaultHeader","thead","hideDefaultBody","border","length","itemSlotProps","internalItem","index","default","_ref2","itemRef","tbody","tfoot","bottom"],"sources":["../../../src/components/VDataTable/VDataTableVirtual.tsx"],"sourcesContent":["// Components\nimport { makeDataTableProps } from './VDataTable'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRow } from './VDataTableRow'\nimport { VDataTableRows } from './VDataTableRows'\nimport { VTable } from '@/components/VTable'\nimport { VVirtualScrollItem } from '@/components/VVirtualScroll/VVirtualScrollItem'\n\n// Composables\nimport { provideExpanded } from './composables/expand'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders } from './composables/headers'\nimport { useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { provideSelection } from './composables/select'\nimport { createSort, provideSort, useSortedItems } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { makeVirtualProps, useVirtual } from '@/composables/virtual'\n\n// Utilities\nimport { computed, shallowRef, toRef, toRefs } from 'vue'\nimport { convertToUnit, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { DeepReadonly } from 'vue'\nimport type { VDataTableSlotProps } from './VDataTable'\nimport type { VDataTableHeadersSlots } from './VDataTableHeaders'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\nimport type { CellProps, DataTableHeader, RowProps } from '@/components/VDataTable/types'\nimport type { GenericProps, SelectItemKey, TemplateRef } from '@/util'\n\ntype VDataTableVirtualSlotProps<T> = Omit<\n VDataTableSlotProps<T>,\n | 'setItemsPerPage'\n | 'page'\n | 'pageCount'\n | 'itemsPerPage'\n>\n\nexport type VDataTableVirtualSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {\n colgroup: VDataTableVirtualSlotProps<T>\n top: VDataTableVirtualSlotProps<T>\n headers: VDataTableHeadersSlots['headers']\n tbody: VDataTableVirtualSlotProps<T>\n thead: VDataTableVirtualSlotProps<T>\n tfoot: VDataTableVirtualSlotProps<T>\n bottom: VDataTableVirtualSlotProps<T>\n 'body.prepend': VDataTableVirtualSlotProps<T>\n 'body.append': VDataTableVirtualSlotProps<T>\n item: {\n itemRef: TemplateRef\n }\n}\n\nexport const makeVDataTableVirtualProps = propsFactory({\n ...omit(makeDataTableProps(), ['hideDefaultFooter']),\n ...makeDataTableGroupProps(),\n ...makeVirtualProps(),\n ...makeFilterProps(),\n}, 'VDataTableVirtual')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTableVirtual = 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 headers?: DeepReadonly<DataTableHeader<ItemType<T>>[]>\n modelValue?: V\n 'onUpdate:modelValue'?: (value: V) => void\n },\n slots: VDataTableVirtualSlots<ItemType<T>>,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDataTableVirtual',\n\n props: makeVDataTableVirtualProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => 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 { disableSort } = toRefs(props)\n\n const {\n columns,\n headers,\n filterFunctions,\n sortFunctions,\n sortRawFunctions,\n } = createHeaders(props, {\n groupBy,\n showSelect: toRef(() => props.showSelect),\n showExpand: toRef(() => props.showExpand),\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 })\n const { sortByWithGroups, opened, extractRows, isGroupOpen, toggleGroup } = provideGroupBy({ groupBy, sortBy, disableSort })\n\n const { sortedItems } = useSortedItems(props, filteredItems, sortByWithGroups, {\n transform: item => ({ ...item.raw, ...item.columns }),\n sortFunctions,\n sortRawFunctions,\n })\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const allItems = computed(() => extractRows(flatItems.value))\n\n const { isSelected, select, selectAll, toggleSelect, someSelected, allSelected } = provideSelection(props, {\n allItems,\n currentPage: allItems,\n })\n const { isExpanded, toggleExpand } = provideExpanded(props)\n\n const {\n containerRef,\n markerRef,\n paddingTop,\n paddingBottom,\n computedItems,\n handleItemResize,\n handleScroll,\n handleScrollend,\n calculateVisibleItems,\n scrollToIndex,\n } = useVirtual(props, flatItems)\n const displayItems = computed(() => computedItems.value.map(item => item.raw))\n\n useOptions({\n sortBy,\n page: shallowRef(1),\n itemsPerPage: shallowRef(-1),\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<VDataTableVirtualSlotProps<any>>(() => ({\n sortBy: sortBy.value,\n toggleSort,\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: allItems.value.map(item => item.raw),\n internalItems: allItems.value,\n groupedItems: flatItems.value,\n columns: columns.value,\n headers: headers.value,\n }))\n\n useRender(() => {\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--loading': props.loading,\n },\n props.class,\n ]}\n style={ props.style }\n { ...tableProps }\n fixedHeader={ props.fixedHeader || props.sticky }\n >\n {{\n top: () => slots.top?.(slotProps.value),\n wrapper: () => (\n <div\n ref={ containerRef }\n onScrollPassive={ handleScroll }\n onScrollend={ handleScrollend }\n class=\"v-table__wrapper\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <table>\n { slots.colgroup?.(slotProps.value) }\n { !props.hideDefaultHeader && (\n <thead key=\"thead\">\n <VDataTableHeaders\n { ...dataTableHeadersProps }\n v-slots={ slots }\n />\n </thead>\n )}\n { slots.thead?.(slotProps.value) }\n { !props.hideDefaultBody && (\n <tbody key=\"tbody\">\n <tr ref={ markerRef } style={{ height: convertToUnit(paddingTop.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: 0, border: 0 }}></td>\n </tr>\n\n { slots['body.prepend']?.(slotProps.value) }\n\n <VDataTableRows\n { ...attrs }\n { ...dataTableRowsProps }\n items={ displayItems.value }\n >\n {{\n ...slots,\n item: itemSlotProps => (\n <VVirtualScrollItem\n key={ itemSlotProps.internalItem.index }\n renderless\n onUpdate:height={ height => handleItemResize(itemSlotProps.internalItem.index, height) }\n >\n { ({ itemRef }) => (\n slots.item?.({ ...itemSlotProps, itemRef }) ?? (\n <VDataTableRow\n { ...itemSlotProps.props }\n ref={ itemRef }\n key={ itemSlotProps.internalItem.index }\n index={ itemSlotProps.internalItem.index }\n v-slots={ slots }\n />\n )\n )}\n </VVirtualScrollItem>\n ),\n }}\n </VDataTableRows>\n\n { slots['body.append']?.(slotProps.value) }\n\n <tr style={{ height: convertToUnit(paddingBottom.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: 0, border: 0 }}></td>\n </tr>\n </tbody>\n )}\n { slots.tbody?.(slotProps.value) }\n { slots.tfoot?.(slotProps.value) }\n </table>\n </div>\n ),\n bottom: () => slots.bottom?.(slotProps.value),\n }}\n </VTable>\n )\n })\n\n return {\n calculateVisibleItems,\n scrollToIndex,\n }\n },\n})\n\nexport type VDataTableVirtual = InstanceType<typeof VDataTableVirtual>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,iBAAiB;AAAA,SACjBC,aAAa;AAAA,SACbC,cAAc;AAAA,SACdC,MAAM;AAAA,SACNC,kBAAkB,mDAE3B;AAAA,SACSC,eAAe;AAAA,SACfC,aAAa,EAAEC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACvEC,aAAa;AAAA,SACbC,iBAAiB;AAAA,SACjBC,UAAU;AAAA,SACVC,gBAAgB;AAAA,SAChBC,UAAU,EAAEC,WAAW,EAAEC,cAAc;AAAA,SACvCC,eAAe;AAAA,SACfC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,gBAAgB,EAAEC,UAAU,wCAErC;AACA,SAASC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,QAAQ,KAAK;AAAA,SAChDC,aAAa,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAEvE;AA+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Aa,CAACuD,aAAa,CAAC7C,KAAK,CAAC;YAAEgF,MAAM,EAAE;UAAE;QAAC,IAAAb,YAAA;UAAA,WACpDzD,OAAO,CAACV,KAAK,CAACiF,MAAM;UAAA,SAAU;YAAEN,MAAM,EAAE,CAAC;YAAEK,MAAM,EAAE;UAAE;QAAC,YAGzE,EACC5E,KAAK,CAACoF,KAAK,GAAG5B,SAAS,CAAC5D,KAAK,CAAC,EAC9BI,KAAK,CAACqF,KAAK,GAAG7B,SAAS,CAAC5D,KAAK,CAAC,IAGrC;QACD0F,MAAM,EAAEA,CAAA,KAAMtF,KAAK,CAACsF,MAAM,GAAG9B,SAAS,CAAC5D,KAAK;MAAC;IAIrD,CAAC,CAAC;IAEF,OAAO;MACLkD,qBAAqB;MACrBC;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -79,7 +79,7 @@ export const VDialog = genericComponent()({
79
79
  }
80
80
  function onAfterEnter() {
81
81
  emit('afterEnter');
82
- if (overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
82
+ if ((props.scrim || props.retainFocus) && overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
83
83
  overlay.value.contentEl.focus({
84
84
  preventScroll: true
85
85
  });