@vuetify/nightly 4.0.0-dev-20230427.0 → 4.0.0-dev-20230511.0
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 +22 -23
- package/dist/json/attributes.json +854 -658
- package/dist/json/importMap-labs.json +4 -4
- package/dist/json/tags.json +50 -1
- package/dist/json/web-types.json +1797 -1324
- package/dist/vuetify-labs.css +81 -69
- package/dist/vuetify-labs.d.ts +771 -257
- package/dist/vuetify-labs.esm.js +260 -224
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +259 -223
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +23 -11
- package/dist/vuetify.d.ts +884 -412
- package/dist/vuetify.esm.js +237 -215
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +236 -214
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +640 -645
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/{index.d.ts → index.d.mts} +5 -1
- package/lib/blueprints/{md1.d.ts → md1.d.mts} +5 -1
- package/lib/blueprints/{md2.d.ts → md2.d.mts} +5 -1
- package/lib/blueprints/{md3.d.ts → md3.d.mts} +5 -1
- package/lib/components/VAppBar/VAppBar.mjs +7 -11
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +10 -16
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/{index.d.ts → index.d.mts} +394 -28
- package/lib/components/VAutocomplete/VAutocomplete.css +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +1 -1
- package/lib/components/VAutocomplete/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VBtn/VBtn.mjs +7 -6
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +0 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -4
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +5 -4
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/{index.d.ts → index.d.mts} +97 -31
- package/lib/components/VColorPicker/util/index.mjs +2 -22
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +9 -2
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VField/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VFileInput/VFileInput.mjs +2 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VImg/VImg.css +2 -4
- package/lib/components/VImg/VImg.mjs +25 -24
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +4 -3
- package/lib/components/VImg/{index.d.ts → index.d.mts} +48 -3
- package/lib/components/VInput/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VList/VList.mjs +5 -0
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +3 -0
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +10 -5
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/{index.d.ts → index.d.mts} +18 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -8
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VRadioGroup/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VRangeSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VResponsive/VResponsive.css +13 -5
- package/lib/components/VResponsive/VResponsive.mjs +12 -8
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.sass +12 -4
- package/lib/components/VResponsive/{index.d.ts → index.d.mts} +10 -1
- package/lib/components/VSelect/VSelect.mjs +9 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSheet/VSheet.css +6 -0
- package/lib/components/VSheet/_variables.scss +1 -1
- package/lib/components/VSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSwitch/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/{index.d.ts → index.d.mts} +24 -24
- package/lib/components/VTextarea/VTextarea.mjs +1 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VValidation/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/{index.d.ts → index.d.mts} +679 -208
- package/lib/composables/defaults.mjs +15 -3
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/display.mjs +6 -6
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/scroll.mjs +18 -19
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/{index.d.ts → index.d.mts} +7 -6
- package/lib/labs/VDataTable/VDataTable.mjs +11 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +0 -5
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +7 -2
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +6 -1
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/{index.d.ts → index.d.mts} +54 -12
- package/lib/labs/{components.d.ts → components.d.mts} +54 -12
- package/lib/util/colorUtils.mjs +68 -3
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/console.mjs +12 -81
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +2 -2
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +3 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +10 -6
- /package/lib/components/VAlert/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VApp/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VAvatar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBadge/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBanner/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBottomNavigation/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBreadcrumbs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtn/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnToggle/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCard/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCarousel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChipGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCode/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCounter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDefaultsProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDialog/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDivider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VExpansionPanel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VFooter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VForm/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VGrid/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VHover/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VIcon/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VItemGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VKbd/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLabel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLayout/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLazy/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLocaleProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMain/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMenu/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMessages/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNavigationDrawer/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNoSsr/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VOverlay/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VPagination/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VParallax/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressCircular/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressLinear/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRadio/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRating/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControl/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControlGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSheet/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSlideGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSnackbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSystemBar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTable/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTabs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VThemeProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTimeline/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VToolbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTooltip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VVirtualScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VWindow/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/transitions/{index.d.ts → index.d.mts} +0 -0
- /package/lib/directives/{index.d.ts → index.d.mts} +0 -0
- /package/lib/iconsets/{fa-svg.d.ts → fa-svg.d.mts} +0 -0
- /package/lib/iconsets/{fa.d.ts → fa.d.mts} +0 -0
- /package/lib/iconsets/{fa4.d.ts → fa4.d.mts} +0 -0
- /package/lib/iconsets/{md.d.ts → md.d.mts} +0 -0
- /package/lib/iconsets/{mdi-svg.d.ts → mdi-svg.d.mts} +0 -0
- /package/lib/iconsets/{mdi.d.ts → mdi.d.mts} +0 -0
- /package/lib/labs/VInfiniteScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/VSkeletonLoader/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/date/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/labs/date/{index.d.ts → index.d.mts} +0 -0
- /package/lib/locale/adapters/{vue-i18n.d.ts → vue-i18n.d.mts} +0 -0
- /package/lib/locale/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/locale/{index.d.ts → index.d.mts} +0 -0
@@ -112,11 +112,15 @@ export const VDataTableVirtual = genericComponent()({
|
|
112
112
|
provideDefaults({
|
113
113
|
VDataTableRows: {
|
114
114
|
hideNoData: toRef(props, 'hideNoData'),
|
115
|
-
noDataText: toRef(props, 'noDataText')
|
115
|
+
noDataText: toRef(props, 'noDataText'),
|
116
|
+
loading: toRef(props, 'loading'),
|
117
|
+
loadingText: toRef(props, 'loadingText')
|
116
118
|
}
|
117
119
|
});
|
118
120
|
useRender(() => _createVNode(VTable, {
|
119
|
-
"class":
|
121
|
+
"class": ['v-data-table', {
|
122
|
+
'v-data-table--loading': props.loading
|
123
|
+
}],
|
120
124
|
"style": {
|
121
125
|
'--v-table-row-height': convertToUnit(itemHeight.value)
|
122
126
|
},
|
@@ -135,6 +139,7 @@ export const VDataTableVirtual = genericComponent()({
|
|
135
139
|
}
|
136
140
|
}, [_createVNode("table", null, [_createVNode("thead", null, [_createVNode(VDataTableHeaders, {
|
137
141
|
"sticky": props.fixedHeader,
|
142
|
+
"loading": props.loading,
|
138
143
|
"multiSort": props.multiSort
|
139
144
|
}, slots)]), _createVNode("tbody", null, [_createVNode("tr", {
|
140
145
|
"style": {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VDataTableVirtual.mjs","names":["VTable","VDataTableHeaders","VDataTableRows","createHeaders","makeDataTableHeaderProps","makeDataTableItemProps","useDataTableItems","makeDataTableExpandProps","provideExpanded","createSort","makeDataTableSortProps","provideSort","useSortedItems","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","makeDataTableSelectProps","provideSelection","makeDataTableVirtualProps","useVirtual","useOptions","makeFilterProps","useFilter","provideDefaults","computed","ref","toRef","convertToUnit","genericComponent","useRender","makeVDataTableProps","VDataTableVirtual","name","props","emits","value","click:row","e","setup","_ref","emit","slots","groupBy","sortBy","multiSort","mustSort","columns","showSelect","showExpand","items","filterKeys","map","c","key","search","filteredItems","sortByWithGroups","opened","extractRows","sortedItems","flatItems","allRows","containerRef","paddingTop","paddingBottom","startIndex","stopIndex","itemHeight","handleScroll","visibleItems","slice","page","itemsPerPage","hideNoData","noDataText","_createVNode","fixedHeader","fixedFooter","height","hover","top","wrapper","border","length","bottom"],"sources":["../../../src/labs/VDataTable/VDataTableVirtual.tsx"],"sourcesContent":["// Components\nimport { VTable } from '@/components/VTable'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRows } from './VDataTableRows'\n\n// Composables\nimport { createHeaders, makeDataTableHeaderProps } from './composables/headers'\nimport { makeDataTableItemProps, useDataTableItems } from './composables/items'\nimport { makeDataTableExpandProps, provideExpanded } from './composables/expand'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from './composables/sort'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { makeDataTableSelectProps, provideSelection } from './composables/select'\nimport { makeDataTableVirtualProps, useVirtual } from './composables/virtual'\nimport { useOptions } from './composables/options'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utlities\nimport { computed, ref, toRef } from 'vue'\nimport { convertToUnit, genericComponent, useRender } from '@/util'\nimport { makeVDataTableProps } from './VDataTable'\n\n// Types\nimport type { DataTableItem } from './types'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\n\nexport type VDataTableVirtualSlots = VDataTableRowsSlots & {\n top: []\n headers: []\n bottom: []\n}\n\nexport const VDataTableVirtual = genericComponent<VDataTableVirtualSlots>()({\n name: 'VDataTableVirtual',\n\n props: {\n ...makeVDataTableProps(),\n ...makeVDataTableProps(),\n ...makeDataTableGroupProps(),\n ...makeDataTableExpandProps(),\n ...makeDataTableHeaderProps(),\n ...makeDataTableItemProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeDataTableVirtualProps(),\n ...makeFilterProps(),\n },\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 'click:row': (e: Event, value: { item: DataTableItem }) => true,\n },\n\n setup (props, { emit, slots }) {\n const { groupBy } = createGroupBy(props)\n const { sortBy, multiSort, mustSort } = createSort(props)\n\n const { columns } = createHeaders(props, {\n groupBy,\n showSelect: toRef(props, 'showSelect'),\n showExpand: toRef(props, 'showExpand'),\n })\n const { items } = useDataTableItems(props, columns)\n\n const filterKeys = computed(() => columns.value.map(c => 'columns.' + c.key))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter<DataTableItem>(props, items, search, { filterKeys })\n\n provideSort({ sortBy, multiSort, mustSort })\n const { sortByWithGroups, opened, extractRows } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(filteredItems, sortByWithGroups, columns)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const allRows = computed(() => extractRows(flatItems.value))\n\n provideSelection(props, allRows)\n provideExpanded(props)\n\n const {\n containerRef,\n paddingTop,\n paddingBottom,\n startIndex,\n stopIndex,\n itemHeight,\n handleScroll,\n } = useVirtual(props, flatItems)\n\n const visibleItems = computed(() => {\n return flatItems.value.slice(startIndex.value, stopIndex.value)\n })\n\n useOptions({\n sortBy,\n page: ref(1),\n itemsPerPage: ref(-1),\n groupBy,\n search,\n })\n\n provideDefaults({\n VDataTableRows: {\n hideNoData: toRef(props, 'hideNoData'),\n noDataText: toRef(props, 'noDataText'),\n },\n })\n\n useRender(() => (\n <VTable\n class=\"v-data-table\"\n style={{\n '--v-table-row-height': convertToUnit(itemHeight.value),\n }}\n fixedHeader={ props.fixedHeader }\n fixedFooter={ props.fixedFooter }\n height={ props.height }\n hover={ props.hover }\n >\n {{\n top: slots.top,\n wrapper: () => (\n <div\n ref={ containerRef }\n onScroll={ handleScroll }\n class=\"v-table__wrapper\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <table>\n <thead>\n <VDataTableHeaders\n sticky={ props.fixedHeader }\n multiSort={ props.multiSort }\n v-slots={ slots }\n />\n </thead>\n <tbody>\n <tr style={{ height: convertToUnit(paddingTop.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: convertToUnit(paddingTop.value), border: 0 }}></td>\n </tr>\n\n <VDataTableRows\n items={ visibleItems.value }\n onClick:row={ props['onClick:row'] }\n v-slots={ slots }\n />\n\n <tr style={{ height: convertToUnit(paddingBottom.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: convertToUnit(paddingBottom.value), border: 0 }}></td>\n </tr>\n </tbody>\n </table>\n </div>\n ),\n bottom: slots.bottom,\n }}\n </VTable>\n ))\n },\n})\n\nexport type VDataTableVirtual = InstanceType<typeof VDataTableVirtual>\n"],"mappings":";AAAA;AAAA,SACSA,MAAM;AAAA,SACNC,iBAAiB;AAAA,SACjBC,cAAc,gCAEvB;AAAA,SACSC,aAAa,EAAEC,wBAAwB;AAAA,SACvCC,sBAAsB,EAAEC,iBAAiB;AAAA,SACzCC,wBAAwB,EAAEC,eAAe;AAAA,SACzCC,UAAU,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc;AAAA,SAC/DC,aAAa,EAAEC,uBAAuB,EAAEC,cAAc,EAAEC,eAAe;AAAA,SACvEC,wBAAwB,EAAEC,gBAAgB;AAAA,SAC1CC,yBAAyB,EAAEC,UAAU;AAAA,SACrCC,UAAU;AAAA,SACVC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,0CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,aAAa,EAAEC,gBAAgB,EAAEC,SAAS;AAAA,SAC1CC,mBAAmB,4BAE5B;AAUA,OAAO,MAAMC,iBAAiB,GAAGH,gBAAgB,EAA0B,CAAC;EAC1EI,IAAI,EAAE,mBAAmB;EAEzBC,KAAK,EAAE;IACL,GAAGH,mBAAmB,EAAE;IACxB,GAAGA,mBAAmB,EAAE;IACxB,GAAGjB,uBAAuB,EAAE;IAC5B,GAAGP,wBAAw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CAAC7B,KAAK,CAAC;UAAE+C,MAAM,EAAE;QAAE;MAAC,IAAAP,YAAA;QAAA,WACpD7B,OAAO,CAACX,KAAK,CAACgD,MAAM;QAAA,SAAU;UAAEL,MAAM,EAAEnD,aAAa,CAACqC,aAAa,CAAC7B,KAAK,CAAC;UAAE+C,MAAM,EAAE;QAAE;MAAC,gBAK9G;MACDE,MAAM,EAAE3C,KAAK,CAAC2C;IAAM,EAGzB,CAAC;EACJ;AACF,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"VDataTableVirtual.mjs","names":["VTable","VDataTableHeaders","VDataTableRows","createHeaders","makeDataTableHeaderProps","makeDataTableItemProps","useDataTableItems","makeDataTableExpandProps","provideExpanded","createSort","makeDataTableSortProps","provideSort","useSortedItems","createGroupBy","makeDataTableGroupProps","provideGroupBy","useGroupedItems","makeDataTableSelectProps","provideSelection","makeDataTableVirtualProps","useVirtual","useOptions","makeFilterProps","useFilter","provideDefaults","computed","ref","toRef","convertToUnit","genericComponent","useRender","makeVDataTableProps","VDataTableVirtual","name","props","emits","value","click:row","e","setup","_ref","emit","slots","groupBy","sortBy","multiSort","mustSort","columns","showSelect","showExpand","items","filterKeys","map","c","key","search","filteredItems","sortByWithGroups","opened","extractRows","sortedItems","flatItems","allRows","containerRef","paddingTop","paddingBottom","startIndex","stopIndex","itemHeight","handleScroll","visibleItems","slice","page","itemsPerPage","hideNoData","noDataText","loading","loadingText","_createVNode","fixedHeader","fixedFooter","height","hover","top","wrapper","border","length","bottom"],"sources":["../../../src/labs/VDataTable/VDataTableVirtual.tsx"],"sourcesContent":["// Components\nimport { VTable } from '@/components/VTable'\nimport { VDataTableHeaders } from './VDataTableHeaders'\nimport { VDataTableRows } from './VDataTableRows'\n\n// Composables\nimport { createHeaders, makeDataTableHeaderProps } from './composables/headers'\nimport { makeDataTableItemProps, useDataTableItems } from './composables/items'\nimport { makeDataTableExpandProps, provideExpanded } from './composables/expand'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from './composables/sort'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { makeDataTableSelectProps, provideSelection } from './composables/select'\nimport { makeDataTableVirtualProps, useVirtual } from './composables/virtual'\nimport { useOptions } from './composables/options'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utlities\nimport { computed, ref, toRef } from 'vue'\nimport { convertToUnit, genericComponent, useRender } from '@/util'\nimport { makeVDataTableProps } from './VDataTable'\n\n// Types\nimport type { DataTableItem } from './types'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\n\nexport type VDataTableVirtualSlots = VDataTableRowsSlots & {\n top: []\n headers: []\n bottom: []\n}\n\nexport const VDataTableVirtual = genericComponent<VDataTableVirtualSlots>()({\n name: 'VDataTableVirtual',\n\n props: {\n ...makeVDataTableProps(),\n ...makeVDataTableProps(),\n ...makeDataTableGroupProps(),\n ...makeDataTableExpandProps(),\n ...makeDataTableHeaderProps(),\n ...makeDataTableItemProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...makeDataTableVirtualProps(),\n ...makeFilterProps(),\n },\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 'click:row': (e: Event, value: { item: DataTableItem }) => true,\n },\n\n setup (props, { emit, slots }) {\n const { groupBy } = createGroupBy(props)\n const { sortBy, multiSort, mustSort } = createSort(props)\n\n const { columns } = createHeaders(props, {\n groupBy,\n showSelect: toRef(props, 'showSelect'),\n showExpand: toRef(props, 'showExpand'),\n })\n const { items } = useDataTableItems(props, columns)\n\n const filterKeys = computed(() => columns.value.map(c => 'columns.' + c.key))\n const search = toRef(props, 'search')\n const { filteredItems } = useFilter<DataTableItem>(props, items, search, { filterKeys })\n\n provideSort({ sortBy, multiSort, mustSort })\n const { sortByWithGroups, opened, extractRows } = provideGroupBy({ groupBy, sortBy })\n\n const { sortedItems } = useSortedItems(filteredItems, sortByWithGroups, columns)\n const { flatItems } = useGroupedItems(sortedItems, groupBy, opened)\n\n const allRows = computed(() => extractRows(flatItems.value))\n\n provideSelection(props, allRows)\n provideExpanded(props)\n\n const {\n containerRef,\n paddingTop,\n paddingBottom,\n startIndex,\n stopIndex,\n itemHeight,\n handleScroll,\n } = useVirtual(props, flatItems)\n\n const visibleItems = computed(() => {\n return flatItems.value.slice(startIndex.value, stopIndex.value)\n })\n\n useOptions({\n sortBy,\n page: ref(1),\n itemsPerPage: ref(-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 useRender(() => (\n <VTable\n class={[\n 'v-data-table',\n {\n 'v-data-table--loading': props.loading,\n },\n ]}\n style={{\n '--v-table-row-height': convertToUnit(itemHeight.value),\n }}\n fixedHeader={ props.fixedHeader }\n fixedFooter={ props.fixedFooter }\n height={ props.height }\n hover={ props.hover }\n >\n {{\n top: slots.top,\n wrapper: () => (\n <div\n ref={ containerRef }\n onScroll={ handleScroll }\n class=\"v-table__wrapper\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <table>\n <thead>\n <VDataTableHeaders\n sticky={ props.fixedHeader }\n loading={ props.loading }\n multiSort={ props.multiSort }\n v-slots={ slots }\n />\n </thead>\n <tbody>\n <tr style={{ height: convertToUnit(paddingTop.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: convertToUnit(paddingTop.value), border: 0 }}></td>\n </tr>\n\n <VDataTableRows\n items={ visibleItems.value }\n onClick:row={ props['onClick:row'] }\n v-slots={ slots }\n />\n\n <tr style={{ height: convertToUnit(paddingBottom.value), border: 0 }}>\n <td colspan={ columns.value.length } style={{ height: convertToUnit(paddingBottom.value), border: 0 }}></td>\n </tr>\n </tbody>\n </table>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,SAAU;UAAEL,MAAM,EAAErD,aAAa,CAACqC,aAAa,CAAC7B,KAAK,CAAC;UAAEiD,MAAM,EAAE;QAAE;MAAC,gBAK9G;MACDE,MAAM,EAAE7C,KAAK,CAAC6C;IAAM,EAGzB,CAAC;EACJ;AACF,CAAC,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Composables
|
2
2
|
import { useProxiedModel } from "../../../composables/proxiedModel.mjs"; // Utilities
|
3
|
-
import { computed, inject, provide } from 'vue';
|
3
|
+
import { computed, inject, provide, watchEffect } from 'vue';
|
4
4
|
import { propsFactory } from "../../../util/index.mjs"; // Types
|
5
5
|
export const makeDataTablePaginateProps = propsFactory({
|
6
6
|
page: {
|
@@ -39,6 +39,11 @@ export function providePagination(options) {
|
|
39
39
|
if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
|
40
40
|
return Math.ceil(itemsLength.value / itemsPerPage.value);
|
41
41
|
});
|
42
|
+
watchEffect(() => {
|
43
|
+
if (page.value > pageCount.value) {
|
44
|
+
page.value = pageCount.value;
|
45
|
+
}
|
46
|
+
});
|
42
47
|
function setItemsPerPage(value) {
|
43
48
|
itemsPerPage.value = value;
|
44
49
|
page.value = 1;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"paginate.mjs","names":["useProxiedModel","computed","inject","provide","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","data","usePagination","Error","usePaginatedItems","items","paginatedItems","slice"],"sources":["../../../../src/labs/VDataTable/composables/paginate.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\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}, 'v-data-table-paginate')\n\nconst VDataTablePaginationSymbol: InjectionKey<{\n page: Ref<number>\n itemsPerPage: Ref<number>\n setItemsPerPage: (value: number) => void\n startIndex: Ref<number>\n stopIndex: Ref<number>\n pageCount: Ref<number>\n itemsLength: Ref<number>\n}> = Symbol.for('vuetify:data-table-pagination')\n\ntype PaginationProps = {\n page: number | string\n 'onUpdate:page': ((val: any) => void) | undefined\n itemsPerPage: number | string\n 'onUpdate:itemsPerPage': ((val: any) => void) | 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 function setItemsPerPage (value: number) {\n itemsPerPage.value = value\n page.value = 1\n }\n\n const data = { page, itemsPerPage, itemsLength, startIndex, stopIndex, pageCount, 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 (options: {\n items: Ref<any[]>\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,QAAQ,KAAK;AAAA,
|
1
|
+
{"version":3,"file":"paginate.mjs","names":["useProxiedModel","computed","inject","provide","watchEffect","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","data","usePagination","Error","usePaginatedItems","items","paginatedItems","slice"],"sources":["../../../../src/labs/VDataTable/composables/paginate.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, provide, watchEffect } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\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}, 'v-data-table-paginate')\n\nconst VDataTablePaginationSymbol: InjectionKey<{\n page: Ref<number>\n itemsPerPage: Ref<number>\n setItemsPerPage: (value: number) => void\n startIndex: Ref<number>\n stopIndex: Ref<number>\n pageCount: Ref<number>\n itemsLength: Ref<number>\n}> = Symbol.for('vuetify:data-table-pagination')\n\ntype PaginationProps = {\n page: number | string\n 'onUpdate:page': ((val: any) => void) | undefined\n itemsPerPage: number | string\n 'onUpdate:itemsPerPage': ((val: any) => void) | 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 const data = { page, itemsPerPage, itemsLength, startIndex, stopIndex, pageCount, 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 (options: {\n items: Ref<any[]>\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,SACnDC,YAAY,mCAErB;AAGA,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,O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
|
373
373
|
page: string | number;
|
374
374
|
headers: DataTableHeader[] | DataTableHeader[][];
|
375
375
|
noDataText: string;
|
376
|
+
loadingText: string;
|
376
377
|
sortBy: SortItem[];
|
377
378
|
items: any[];
|
378
379
|
modelValue: any[];
|
@@ -399,6 +400,7 @@ declare const VDataTable: {
|
|
399
400
|
page: string | number;
|
400
401
|
headers: DataTableHeader[] | DataTableHeader[][];
|
401
402
|
noDataText: string;
|
403
|
+
loadingText: string;
|
402
404
|
sortBy: SortItem[];
|
403
405
|
items: any[];
|
404
406
|
modelValue: any[];
|
@@ -424,6 +426,7 @@ declare const VDataTable: {
|
|
424
426
|
search?: string | undefined;
|
425
427
|
height?: string | number | undefined;
|
426
428
|
width?: string | number | undefined;
|
429
|
+
loading?: string | boolean | undefined;
|
427
430
|
customFilter?: FilterFunction | undefined;
|
428
431
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
429
432
|
filterKeys?: FilterKeys | undefined;
|
@@ -648,7 +651,7 @@ declare const VDataTable: {
|
|
648
651
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
649
652
|
"onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
|
650
653
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
651
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "expanded" | "page" | "headers" | "noDataText" | "sortBy" | "items" | "modelValue" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "hideNoData" | "filterMode" | "noFilter" | "hover" | "fixedHeader" | "fixedFooter" | "multiSort" | "mustSort" | "groupBy" | "showSelect" | "expandOnClick" | "showExpand" | "itemsPerPage">;
|
654
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "expanded" | "page" | "headers" | "noDataText" | "loadingText" | "sortBy" | "items" | "modelValue" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "hideNoData" | "filterMode" | "noFilter" | "hover" | "fixedHeader" | "fixedFooter" | "multiSort" | "mustSort" | "groupBy" | "showSelect" | "expandOnClick" | "showExpand" | "itemsPerPage">;
|
652
655
|
$attrs: {
|
653
656
|
[x: string]: unknown;
|
654
657
|
};
|
@@ -667,6 +670,7 @@ declare const VDataTable: {
|
|
667
670
|
page: string | number;
|
668
671
|
headers: DataTableHeader[] | DataTableHeader[][];
|
669
672
|
noDataText: string;
|
673
|
+
loadingText: string;
|
670
674
|
sortBy: SortItem[];
|
671
675
|
items: any[];
|
672
676
|
modelValue: any[];
|
@@ -692,6 +696,7 @@ declare const VDataTable: {
|
|
692
696
|
search?: string | undefined;
|
693
697
|
height?: string | number | undefined;
|
694
698
|
width?: string | number | undefined;
|
699
|
+
loading?: string | boolean | undefined;
|
695
700
|
customFilter?: FilterFunction | undefined;
|
696
701
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
697
702
|
filterKeys?: FilterKeys | undefined;
|
@@ -929,6 +934,7 @@ declare const VDataTable: {
|
|
929
934
|
page: string | number;
|
930
935
|
headers: DataTableHeader[] | DataTableHeader[][];
|
931
936
|
noDataText: string;
|
937
|
+
loadingText: string;
|
932
938
|
sortBy: SortItem[];
|
933
939
|
items: any[];
|
934
940
|
modelValue: any[];
|
@@ -975,6 +981,7 @@ declare const VDataTable: {
|
|
975
981
|
page: string | number;
|
976
982
|
headers: DataTableHeader[] | DataTableHeader[][];
|
977
983
|
noDataText: string;
|
984
|
+
loadingText: string;
|
978
985
|
sortBy: SortItem[];
|
979
986
|
items: any[];
|
980
987
|
modelValue: any[];
|
@@ -1000,6 +1007,7 @@ declare const VDataTable: {
|
|
1000
1007
|
search?: string | undefined;
|
1001
1008
|
height?: string | number | undefined;
|
1002
1009
|
width?: string | number | undefined;
|
1010
|
+
loading?: string | boolean | undefined;
|
1003
1011
|
customFilter?: FilterFunction | undefined;
|
1004
1012
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
1005
1013
|
filterKeys?: FilterKeys | undefined;
|
@@ -1233,6 +1241,7 @@ declare const VDataTable: {
|
|
1233
1241
|
page: string | number;
|
1234
1242
|
headers: DataTableHeader[] | DataTableHeader[][];
|
1235
1243
|
noDataText: string;
|
1244
|
+
loadingText: string;
|
1236
1245
|
sortBy: SortItem[];
|
1237
1246
|
items: any[];
|
1238
1247
|
modelValue: any[];
|
@@ -1258,6 +1267,7 @@ declare const VDataTable: {
|
|
1258
1267
|
search?: string | undefined;
|
1259
1268
|
height?: string | number | undefined;
|
1260
1269
|
width?: string | number | undefined;
|
1270
|
+
loading?: string | boolean | undefined;
|
1261
1271
|
customFilter?: FilterFunction | undefined;
|
1262
1272
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
1263
1273
|
filterKeys?: FilterKeys | undefined;
|
@@ -1495,6 +1505,7 @@ declare const VDataTable: {
|
|
1495
1505
|
page: string | number;
|
1496
1506
|
headers: DataTableHeader[] | DataTableHeader[][];
|
1497
1507
|
noDataText: string;
|
1508
|
+
loadingText: string;
|
1498
1509
|
sortBy: SortItem[];
|
1499
1510
|
items: any[];
|
1500
1511
|
modelValue: any[];
|
@@ -1564,6 +1575,11 @@ declare const VDataTable: {
|
|
1564
1575
|
width: (StringConstructor | NumberConstructor)[];
|
1565
1576
|
fixedHeader: BooleanConstructor;
|
1566
1577
|
fixedFooter: BooleanConstructor;
|
1578
|
+
loading: (StringConstructor | BooleanConstructor)[];
|
1579
|
+
loadingText: {
|
1580
|
+
type: StringConstructor;
|
1581
|
+
default: string;
|
1582
|
+
};
|
1567
1583
|
'onClick:row': PropType<(e: Event, value: {
|
1568
1584
|
item: DataTableItem;
|
1569
1585
|
}) => void>;
|
@@ -1644,6 +1660,11 @@ declare const VDataTable: {
|
|
1644
1660
|
width: (StringConstructor | NumberConstructor)[];
|
1645
1661
|
fixedHeader: BooleanConstructor;
|
1646
1662
|
fixedFooter: BooleanConstructor;
|
1663
|
+
loading: (StringConstructor | BooleanConstructor)[];
|
1664
|
+
loadingText: {
|
1665
|
+
type: StringConstructor;
|
1666
|
+
default: string;
|
1667
|
+
};
|
1647
1668
|
'onClick:row': PropType<(e: Event, value: {
|
1648
1669
|
item: DataTableItem;
|
1649
1670
|
}) => void>;
|
@@ -1756,6 +1777,7 @@ declare const VDataTableVirtual: {
|
|
1756
1777
|
expanded: string[];
|
1757
1778
|
headers: DataTableHeader[] | DataTableHeader[][];
|
1758
1779
|
noDataText: string;
|
1780
|
+
loadingText: string;
|
1759
1781
|
sortBy: SortItem[];
|
1760
1782
|
items: any[];
|
1761
1783
|
modelValue: any[];
|
@@ -1782,6 +1804,7 @@ declare const VDataTableVirtual: {
|
|
1782
1804
|
expanded: string[];
|
1783
1805
|
headers: DataTableHeader[] | DataTableHeader[][];
|
1784
1806
|
noDataText: string;
|
1807
|
+
loadingText: string;
|
1785
1808
|
sortBy: SortItem[];
|
1786
1809
|
items: any[];
|
1787
1810
|
modelValue: any[];
|
@@ -1808,6 +1831,7 @@ declare const VDataTableVirtual: {
|
|
1808
1831
|
search?: string | undefined;
|
1809
1832
|
height?: string | number | undefined;
|
1810
1833
|
width?: string | number | undefined;
|
1834
|
+
loading?: string | boolean | undefined;
|
1811
1835
|
customFilter?: FilterFunction | undefined;
|
1812
1836
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
1813
1837
|
filterKeys?: FilterKeys | undefined;
|
@@ -2015,7 +2039,7 @@ declare const VDataTableVirtual: {
|
|
2015
2039
|
item: DataTableItem;
|
2016
2040
|
}) => any) | undefined;
|
2017
2041
|
"onUpdate:options"?: ((value: any) => any) | undefined;
|
2018
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "expanded" | "headers" | "noDataText" | "sortBy" | "items" | "modelValue" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "hideNoData" | "filterMode" | "noFilter" | "hover" | "fixedHeader" | "fixedFooter" | "itemHeight" | "multiSort" | "mustSort" | "groupBy" | "showSelect" | "expandOnClick" | "showExpand" | "visibleItems">;
|
2042
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "expanded" | "headers" | "noDataText" | "loadingText" | "sortBy" | "items" | "modelValue" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "hideNoData" | "filterMode" | "noFilter" | "hover" | "fixedHeader" | "fixedFooter" | "itemHeight" | "multiSort" | "mustSort" | "groupBy" | "showSelect" | "expandOnClick" | "showExpand" | "visibleItems">;
|
2019
2043
|
$attrs: {
|
2020
2044
|
[x: string]: unknown;
|
2021
2045
|
};
|
@@ -2035,6 +2059,7 @@ declare const VDataTableVirtual: {
|
|
2035
2059
|
expanded: string[];
|
2036
2060
|
headers: DataTableHeader[] | DataTableHeader[][];
|
2037
2061
|
noDataText: string;
|
2062
|
+
loadingText: string;
|
2038
2063
|
sortBy: SortItem[];
|
2039
2064
|
items: any[];
|
2040
2065
|
modelValue: any[];
|
@@ -2061,6 +2086,7 @@ declare const VDataTableVirtual: {
|
|
2061
2086
|
search?: string | undefined;
|
2062
2087
|
height?: string | number | undefined;
|
2063
2088
|
width?: string | number | undefined;
|
2089
|
+
loading?: string | boolean | undefined;
|
2064
2090
|
customFilter?: FilterFunction | undefined;
|
2065
2091
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
2066
2092
|
filterKeys?: FilterKeys | undefined;
|
@@ -2281,6 +2307,7 @@ declare const VDataTableVirtual: {
|
|
2281
2307
|
expanded: string[];
|
2282
2308
|
headers: DataTableHeader[] | DataTableHeader[][];
|
2283
2309
|
noDataText: string;
|
2310
|
+
loadingText: string;
|
2284
2311
|
sortBy: SortItem[];
|
2285
2312
|
items: any[];
|
2286
2313
|
modelValue: any[];
|
@@ -2327,6 +2354,7 @@ declare const VDataTableVirtual: {
|
|
2327
2354
|
expanded: string[];
|
2328
2355
|
headers: DataTableHeader[] | DataTableHeader[][];
|
2329
2356
|
noDataText: string;
|
2357
|
+
loadingText: string;
|
2330
2358
|
sortBy: SortItem[];
|
2331
2359
|
items: any[];
|
2332
2360
|
modelValue: any[];
|
@@ -2353,6 +2381,7 @@ declare const VDataTableVirtual: {
|
|
2353
2381
|
search?: string | undefined;
|
2354
2382
|
height?: string | number | undefined;
|
2355
2383
|
width?: string | number | undefined;
|
2384
|
+
loading?: string | boolean | undefined;
|
2356
2385
|
customFilter?: FilterFunction | undefined;
|
2357
2386
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
2358
2387
|
filterKeys?: FilterKeys | undefined;
|
@@ -2568,6 +2597,7 @@ declare const VDataTableVirtual: {
|
|
2568
2597
|
expanded: string[];
|
2569
2598
|
headers: DataTableHeader[] | DataTableHeader[][];
|
2570
2599
|
noDataText: string;
|
2600
|
+
loadingText: string;
|
2571
2601
|
sortBy: SortItem[];
|
2572
2602
|
items: any[];
|
2573
2603
|
modelValue: any[];
|
@@ -2594,6 +2624,7 @@ declare const VDataTableVirtual: {
|
|
2594
2624
|
search?: string | undefined;
|
2595
2625
|
height?: string | number | undefined;
|
2596
2626
|
width?: string | number | undefined;
|
2627
|
+
loading?: string | boolean | undefined;
|
2597
2628
|
customFilter?: FilterFunction | undefined;
|
2598
2629
|
customKeyFilter?: FilterKeyFunctions | undefined;
|
2599
2630
|
filterKeys?: FilterKeys | undefined;
|
@@ -2814,6 +2845,7 @@ declare const VDataTableVirtual: {
|
|
2814
2845
|
expanded: string[];
|
2815
2846
|
headers: DataTableHeader[] | DataTableHeader[][];
|
2816
2847
|
noDataText: string;
|
2848
|
+
loadingText: string;
|
2817
2849
|
sortBy: SortItem[];
|
2818
2850
|
items: any[];
|
2819
2851
|
modelValue: any[];
|
@@ -2912,6 +2944,11 @@ declare const VDataTableVirtual: {
|
|
2912
2944
|
width: (StringConstructor | NumberConstructor)[];
|
2913
2945
|
fixedHeader: BooleanConstructor;
|
2914
2946
|
fixedFooter: BooleanConstructor;
|
2947
|
+
loading: (StringConstructor | BooleanConstructor)[];
|
2948
|
+
loadingText: {
|
2949
|
+
type: StringConstructor;
|
2950
|
+
default: string;
|
2951
|
+
};
|
2915
2952
|
'onClick:row': vue.PropType<(e: Event, value: {
|
2916
2953
|
item: DataTableItem;
|
2917
2954
|
}) => void>;
|
@@ -2992,6 +3029,11 @@ declare const VDataTableVirtual: {
|
|
2992
3029
|
width: (StringConstructor | NumberConstructor)[];
|
2993
3030
|
fixedHeader: BooleanConstructor;
|
2994
3031
|
fixedFooter: BooleanConstructor;
|
3032
|
+
loading: (StringConstructor | BooleanConstructor)[];
|
3033
|
+
loadingText: {
|
3034
|
+
type: StringConstructor;
|
3035
|
+
default: string;
|
3036
|
+
};
|
2995
3037
|
'onClick:row': vue.PropType<(e: Event, value: {
|
2996
3038
|
item: DataTableItem;
|
2997
3039
|
}) => void>;
|
@@ -4232,16 +4274,16 @@ declare const VDataTableServer: {
|
|
4232
4274
|
width: (StringConstructor | NumberConstructor)[];
|
4233
4275
|
fixedHeader: BooleanConstructor;
|
4234
4276
|
fixedFooter: BooleanConstructor;
|
4235
|
-
'onClick:row': vue.PropType<(e: Event, value: {
|
4236
|
-
item: DataTableItem;
|
4237
|
-
}) => void>;
|
4238
|
-
search: StringConstructor;
|
4239
|
-
color: StringConstructor;
|
4240
4277
|
loading: (StringConstructor | BooleanConstructor)[];
|
4241
4278
|
loadingText: {
|
4242
4279
|
type: StringConstructor;
|
4243
4280
|
default: string;
|
4244
4281
|
};
|
4282
|
+
'onClick:row': vue.PropType<(e: Event, value: {
|
4283
|
+
item: DataTableItem;
|
4284
|
+
}) => void>;
|
4285
|
+
search: StringConstructor;
|
4286
|
+
color: StringConstructor;
|
4245
4287
|
itemsLength: {
|
4246
4288
|
type: (StringConstructor | NumberConstructor)[];
|
4247
4289
|
required: true;
|
@@ -4314,16 +4356,16 @@ declare const VDataTableServer: {
|
|
4314
4356
|
width: (StringConstructor | NumberConstructor)[];
|
4315
4357
|
fixedHeader: BooleanConstructor;
|
4316
4358
|
fixedFooter: BooleanConstructor;
|
4317
|
-
'onClick:row': vue.PropType<(e: Event, value: {
|
4318
|
-
item: DataTableItem;
|
4319
|
-
}) => void>;
|
4320
|
-
search: StringConstructor;
|
4321
|
-
color: StringConstructor;
|
4322
4359
|
loading: (StringConstructor | BooleanConstructor)[];
|
4323
4360
|
loadingText: {
|
4324
4361
|
type: StringConstructor;
|
4325
4362
|
default: string;
|
4326
4363
|
};
|
4364
|
+
'onClick:row': vue.PropType<(e: Event, value: {
|
4365
|
+
item: DataTableItem;
|
4366
|
+
}) => void>;
|
4367
|
+
search: StringConstructor;
|
4368
|
+
color: StringConstructor;
|
4327
4369
|
itemsLength: {
|
4328
4370
|
type: (StringConstructor | NumberConstructor)[];
|
4329
4371
|
required: true;
|