@byyuurin/ui 0.0.9 → 0.0.11
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/README.md +2 -5
- package/dist/module.json +3 -3
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/runtime/app/injections.d.ts +9323 -3
- package/dist/runtime/app/injections.js +35 -0
- package/dist/runtime/components/Accordion.vue +36 -69
- package/dist/runtime/components/Accordion.vue.d.ts +52 -0
- package/dist/runtime/components/Alert.vue +37 -75
- package/dist/runtime/components/Alert.vue.d.ts +59 -0
- package/dist/runtime/components/App.vue +25 -40
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +31 -51
- package/dist/runtime/components/Avatar.vue.d.ts +25 -0
- package/dist/runtime/components/AvatarGroup.vue +38 -69
- package/dist/runtime/components/AvatarGroup.vue.d.ts +27 -0
- package/dist/runtime/components/Badge.vue +25 -51
- package/dist/runtime/components/Badge.vue.d.ts +44 -0
- package/dist/runtime/components/Breadcrumb.vue +35 -77
- package/dist/runtime/components/Breadcrumb.vue.d.ts +52 -0
- package/dist/runtime/components/Button.vue +62 -51
- package/dist/runtime/components/Button.vue.d.ts +29 -0
- package/dist/runtime/components/ButtonGroup.vue +17 -37
- package/dist/runtime/components/ButtonGroup.vue.d.ts +26 -0
- package/dist/runtime/components/Calendar.vue +75 -101
- package/dist/runtime/components/Calendar.vue.d.ts +75 -0
- package/dist/runtime/components/Card.vue +25 -42
- package/dist/runtime/components/Card.vue.d.ts +30 -0
- package/dist/runtime/components/Carousel.vue +118 -223
- package/dist/runtime/components/Carousel.vue.d.ts +104 -0
- package/dist/runtime/components/Checkbox.vue +49 -71
- package/dist/runtime/components/Checkbox.vue.d.ts +56 -0
- package/dist/runtime/components/Chip.vue +31 -48
- package/dist/runtime/components/Chip.vue.d.ts +30 -0
- package/dist/runtime/components/Collapsible.vue +22 -30
- package/dist/runtime/components/Collapsible.vue.d.ts +26 -0
- package/dist/runtime/components/Drawer.vue +52 -102
- package/dist/runtime/components/Drawer.vue.d.ts +80 -0
- package/dist/runtime/components/DropdownMenu.vue +65 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +99 -0
- package/dist/runtime/components/DropdownMenuContent.vue +192 -0
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +39 -0
- package/dist/runtime/components/Form.vue +197 -0
- package/dist/runtime/components/Form.vue.d.ts +78 -0
- package/dist/runtime/components/FormItem.vue +90 -0
- package/dist/runtime/components/FormItem.vue.d.ts +60 -0
- package/dist/runtime/components/Input.vue +93 -115
- package/dist/runtime/components/Input.vue.d.ts +64 -0
- package/dist/runtime/components/InputNumber.vue +81 -116
- package/dist/runtime/components/InputNumber.vue.d.ts +245 -0
- package/dist/runtime/components/Kbd.vue +18 -39
- package/dist/runtime/components/Kbd.vue.d.ts +28 -0
- package/dist/runtime/components/Link.vue +170 -244
- package/dist/runtime/components/Link.vue.d.ts +95 -0
- package/dist/runtime/components/LinkBase.vue +36 -54
- package/dist/runtime/components/LinkBase.vue.d.ts +28 -0
- package/dist/runtime/components/Modal.vue +50 -85
- package/dist/runtime/components/Modal.vue.d.ts +66 -0
- package/dist/runtime/components/OverlayProvider.vue +10 -14
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +55 -121
- package/dist/runtime/components/Pagination.vue.d.ts +93 -0
- package/dist/runtime/components/PinInput.vue +57 -57
- package/dist/runtime/components/PinInput.vue.d.ts +35 -0
- package/dist/runtime/components/Popover.vue +39 -68
- package/dist/runtime/components/Popover.vue.d.ts +45 -0
- package/dist/runtime/components/Progress.vue +68 -120
- package/dist/runtime/components/Progress.vue.d.ts +54 -0
- package/dist/runtime/components/RadioGroup.vue +75 -129
- package/dist/runtime/components/RadioGroup.vue.d.ts +74 -0
- package/dist/runtime/components/ScrollArea.vue +31 -31
- package/dist/runtime/components/ScrollArea.vue.d.ts +17 -0
- package/dist/runtime/components/Select.vue +119 -199
- package/dist/runtime/components/Select.vue.d.ts +119 -0
- package/dist/runtime/components/Separator.vue +26 -44
- package/dist/runtime/components/Separator.vue.d.ts +27 -0
- package/dist/runtime/components/Skeleton.vue +12 -21
- package/dist/runtime/components/Skeleton.vue.d.ts +19 -0
- package/dist/runtime/components/Slider.vue +54 -71
- package/dist/runtime/components/Slider.vue.d.ts +36 -0
- package/dist/runtime/components/Switch.vue +54 -68
- package/dist/runtime/components/Switch.vue.d.ts +49 -0
- package/dist/runtime/components/Table.vue +113 -186
- package/dist/runtime/components/Table.vue.d.ts +148 -0
- package/dist/runtime/components/Tabs.vue +35 -79
- package/dist/runtime/components/Tabs.vue.d.ts +65 -0
- package/dist/runtime/components/Textarea.vue +82 -123
- package/dist/runtime/components/Textarea.vue.d.ts +60 -0
- package/dist/runtime/components/Toast.vue +51 -76
- package/dist/runtime/components/Toast.vue.d.ts +131 -0
- package/dist/runtime/components/ToastProvider.vue +65 -101
- package/dist/runtime/components/ToastProvider.vue.d.ts +38 -0
- package/dist/runtime/components/Tooltip.vue +36 -47
- package/dist/runtime/components/Tooltip.vue.d.ts +31 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormItem.d.ts +27 -0
- package/dist/runtime/composables/useFormItem.js +64 -0
- package/dist/runtime/composables/useKbd.d.ts +1 -1
- package/dist/runtime/composables/useLocale.d.ts +3 -3
- package/dist/runtime/composables/useTheme.d.ts +1 -1
- package/dist/runtime/composables/useTheme.js +2 -1
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/locale/en.d.ts +1 -1
- package/dist/runtime/locale/zh-tw.d.ts +1 -1
- package/dist/runtime/theme/accordion.d.ts +45 -51
- package/dist/runtime/theme/accordion.js +1 -1
- package/dist/runtime/theme/alert.d.ts +115 -121
- package/dist/runtime/theme/alert.js +1 -1
- package/dist/runtime/theme/app.d.ts +1 -0
- package/dist/runtime/theme/app.js +2 -1
- package/dist/runtime/theme/avatar-group.d.ts +42 -48
- package/dist/runtime/theme/avatar-group.js +1 -1
- package/dist/runtime/theme/avatar.d.ts +46 -52
- package/dist/runtime/theme/avatar.js +1 -1
- package/dist/runtime/theme/badge.d.ts +63 -93
- package/dist/runtime/theme/badge.js +1 -1
- package/dist/runtime/theme/breadcrumb.d.ts +52 -58
- package/dist/runtime/theme/breadcrumb.js +1 -1
- package/dist/runtime/theme/button-group.d.ts +36 -42
- package/dist/runtime/theme/button.d.ts +165 -117
- package/dist/runtime/theme/button.js +1 -1
- package/dist/runtime/theme/calendar.d.ts +52 -50
- package/dist/runtime/theme/calendar.js +20 -3
- package/dist/runtime/theme/card.d.ts +52 -58
- package/dist/runtime/theme/card.js +1 -1
- package/dist/runtime/theme/carousel.d.ts +98 -104
- package/dist/runtime/theme/carousel.js +1 -1
- package/dist/runtime/theme/checkbox.d.ts +77 -83
- package/dist/runtime/theme/checkbox.js +1 -1
- package/dist/runtime/theme/chip.d.ts +50 -89
- package/dist/runtime/theme/chip.js +1 -1
- package/dist/runtime/theme/collapsible.d.ts +29 -35
- package/dist/runtime/theme/collapsible.js +1 -1
- package/dist/runtime/theme/drawer.d.ts +131 -102
- package/dist/runtime/theme/drawer.js +1 -1
- package/dist/runtime/theme/dropdown-menu.d.ts +65 -0
- package/dist/runtime/theme/dropdown-menu.js +83 -0
- package/dist/runtime/theme/form-item.d.ts +70 -0
- package/dist/runtime/theme/form-item.js +34 -0
- package/dist/runtime/theme/form.d.ts +2 -0
- package/dist/runtime/theme/form.js +7 -0
- package/dist/runtime/theme/index.d.ts +3 -0
- package/dist/runtime/theme/index.js +3 -0
- package/dist/runtime/theme/input-number.d.ts +100 -126
- package/dist/runtime/theme/input-number.js +1 -1
- package/dist/runtime/theme/input.d.ts +153 -131
- package/dist/runtime/theme/input.js +3 -3
- package/dist/runtime/theme/kbd.d.ts +30 -36
- package/dist/runtime/theme/link.d.ts +37 -43
- package/dist/runtime/theme/modal.d.ts +35 -69
- package/dist/runtime/theme/modal.js +1 -1
- package/dist/runtime/theme/pagination.d.ts +71 -77
- package/dist/runtime/theme/pagination.js +1 -1
- package/dist/runtime/theme/pinInput.d.ts +82 -88
- package/dist/runtime/theme/pinInput.js +2 -2
- package/dist/runtime/theme/popover.d.ts +29 -35
- package/dist/runtime/theme/popover.js +1 -1
- package/dist/runtime/theme/progress.d.ts +167 -109
- package/dist/runtime/theme/progress.js +1 -1
- package/dist/runtime/theme/radio-group.d.ts +99 -105
- package/dist/runtime/theme/radio-group.js +1 -1
- package/dist/runtime/theme/scroll-area.d.ts +62 -68
- package/dist/runtime/theme/scroll-area.js +1 -1
- package/dist/runtime/theme/select.d.ts +168 -158
- package/dist/runtime/theme/select.js +3 -2
- package/dist/runtime/theme/separator.d.ts +64 -85
- package/dist/runtime/theme/separator.js +1 -1
- package/dist/runtime/theme/skeleton.d.ts +1 -7
- package/dist/runtime/theme/slider.d.ts +62 -68
- package/dist/runtime/theme/slider.js +1 -1
- package/dist/runtime/theme/switch.d.ts +111 -117
- package/dist/runtime/theme/switch.js +1 -1
- package/dist/runtime/theme/table.d.ts +75 -78
- package/dist/runtime/theme/table.js +3 -2
- package/dist/runtime/theme/tabs.d.ts +116 -139
- package/dist/runtime/theme/tabs.js +1 -1
- package/dist/runtime/theme/textarea.d.ts +78 -90
- package/dist/runtime/theme/textarea.js +2 -2
- package/dist/runtime/theme/toast-provider.d.ts +110 -131
- package/dist/runtime/theme/toast-provider.js +1 -1
- package/dist/runtime/theme/toast.d.ts +74 -80
- package/dist/runtime/theme/toast.js +1 -1
- package/dist/runtime/theme/tooltip.d.ts +35 -41
- package/dist/runtime/theme/tooltip.js +1 -1
- package/dist/runtime/types/components.d.ts +3 -0
- package/dist/runtime/types/form.d.ts +45 -0
- package/dist/runtime/types/form.js +0 -0
- package/dist/runtime/types/index.d.ts +5 -2
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/utils.d.ts +37 -16
- package/dist/runtime/utils/extend-theme.js +15 -4
- package/dist/runtime/utils/form.d.ts +5 -0
- package/dist/runtime/utils/form.js +24 -0
- package/dist/runtime/utils/index.d.ts +2 -0
- package/dist/runtime/utils/index.js +4 -0
- package/dist/runtime/utils/link.d.ts +4 -28
- package/dist/runtime/utils/link.js +10 -3
- package/dist/runtime/utils/styler.d.ts +2 -2
- package/dist/runtime/utils/styler.js +2 -2
- package/dist/shared/ui.D1BTWZFB.mjs +5 -0
- package/dist/shared/ui.D1BTWZFB.mjs.map +1 -0
- package/dist/types.d.mts +1 -1
- package/dist/unocss.mjs +7 -6
- package/dist/unocss.mjs.map +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/unplugin.mjs.map +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +78 -74
- package/dist/module.cjs +0 -5
- package/dist/shared/ui.1a1f119c.mjs +0 -5
- package/dist/shared/ui.1a1f119c.mjs.map +0 -1
- package/dist/types.d.ts +0 -1
|
@@ -1,258 +1,178 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import type { CellContext, ColumnDef, ColumnFiltersOptions, ColumnFiltersState, ColumnOrderState, ColumnPinningOptions, ColumnPinningState, ColumnSizingInfoState, ColumnSizingOptions, ColumnSizingState, CoreOptions, ExpandedOptions, ExpandedState, FacetedOptions, GlobalFilterOptions, GroupingOptions, GroupingState, HeaderContext, PaginationOptions, PaginationState, Row, RowData, RowPinningOptions, RowPinningState, RowSelectionOptions, RowSelectionState, SortingOptions, SortingState, Updater, VisibilityOptions, VisibilityState } from '@tanstack/vue-table'
|
|
3
|
-
import type { PrimitiveProps } from 'reka-ui'
|
|
4
|
-
import type { Ref } from 'vue'
|
|
5
|
-
import type { table } from '../theme'
|
|
6
|
-
import type { ComponentAttrs } from '../types'
|
|
1
|
+
<script>
|
|
7
2
|
|
|
8
|
-
type DynamicHeaderSlots<T, K = keyof T> = Record<string, (props: HeaderContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-header`, (props: HeaderContext<T, unknown>) => any>
|
|
9
|
-
|
|
10
|
-
type DynamicCellSlots<T, K = keyof T> = Record<string, (props: CellContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-cell`, (props: CellContext<T, unknown>) => any>
|
|
11
|
-
|
|
12
|
-
export type TableSlots<T> = {
|
|
13
|
-
expanded: (props: { row: Row<T> }) => any
|
|
14
|
-
empty: (props?: {}) => any
|
|
15
|
-
caption: (props?: {}) => any
|
|
16
|
-
} & DynamicHeaderSlots<T> & DynamicCellSlots<T>
|
|
17
|
-
|
|
18
|
-
export type TableData = RowData
|
|
19
|
-
export type TableColumn<T extends TableData, D = unknown> = ColumnDef<T, D> & { title?: string }
|
|
20
|
-
|
|
21
|
-
export interface TableOptions<T extends TableData> extends Omit<CoreOptions<T>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'> {
|
|
22
|
-
state?: CoreOptions<T>['state']
|
|
23
|
-
onStateChange?: CoreOptions<T>['onStateChange']
|
|
24
|
-
renderFallbackValue?: CoreOptions<T>['renderFallbackValue']
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface TableProps<T extends TableData> extends ComponentAttrs<typeof table>, TableOptions<T> {
|
|
28
|
-
/**
|
|
29
|
-
* The element or component this component should render as.
|
|
30
|
-
* @default "div"
|
|
31
|
-
*/
|
|
32
|
-
as?: PrimitiveProps['as']
|
|
33
|
-
data?: T[]
|
|
34
|
-
columns?: TableColumn<T>[]
|
|
35
|
-
caption?: string
|
|
36
|
-
/**
|
|
37
|
-
* Whether the table should have a sticky header.
|
|
38
|
-
* @default false
|
|
39
|
-
*/
|
|
40
|
-
sticky?: boolean
|
|
41
|
-
/**
|
|
42
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#table-options)
|
|
43
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
44
|
-
*/
|
|
45
|
-
globalFilterOptions?: Omit<GlobalFilterOptions<T>, 'onGlobalFilterChange'>
|
|
46
|
-
/**
|
|
47
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#table-options)
|
|
48
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
49
|
-
*/
|
|
50
|
-
columnFiltersOptions?: Omit<ColumnFiltersOptions<T>, 'getFilteredRowModel' | 'onColumnFiltersChange'>
|
|
51
|
-
/**
|
|
52
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#table-options)
|
|
53
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
54
|
-
*/
|
|
55
|
-
columnPinningOptions?: Omit<ColumnPinningOptions, 'onColumnPinningChange'>
|
|
56
|
-
/**
|
|
57
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#table-options)
|
|
58
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
59
|
-
*/
|
|
60
|
-
columnSizingOptions?: Omit<ColumnSizingOptions, 'onColumnSizingChange' | 'onColumnSizingInfoChange'>
|
|
61
|
-
/**
|
|
62
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#table-options)
|
|
63
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
64
|
-
*/
|
|
65
|
-
visibilityOptions?: Omit<VisibilityOptions, 'onColumnVisibilityChange'>
|
|
66
|
-
/**
|
|
67
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#table-options)
|
|
68
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
69
|
-
*/
|
|
70
|
-
sortingOptions?: Omit<SortingOptions<T>, 'getSortedRowModel' | 'onSortingChange'>
|
|
71
|
-
/**
|
|
72
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#table-options)
|
|
73
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
74
|
-
*/
|
|
75
|
-
groupingOptions?: Omit<GroupingOptions, 'onGroupingChange'>
|
|
76
|
-
/**
|
|
77
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#table-options)
|
|
78
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
79
|
-
*/
|
|
80
|
-
expandedOptions?: Omit<ExpandedOptions<T>, 'getExpandedRowModel' | 'onExpandedChange'>
|
|
81
|
-
/**
|
|
82
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#table-options)
|
|
83
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
84
|
-
*/
|
|
85
|
-
rowSelectionOptions?: Omit<RowSelectionOptions<T>, 'onRowSelectionChange'>
|
|
86
|
-
/**
|
|
87
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#table-options)
|
|
88
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
89
|
-
*/
|
|
90
|
-
rowPinningOptions?: Omit<RowPinningOptions<T>, 'onRowPinningChange'>
|
|
91
|
-
/**
|
|
92
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#table-options)
|
|
93
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
94
|
-
*/
|
|
95
|
-
paginationOptions?: Omit<PaginationOptions, 'onPaginationChange'>
|
|
96
|
-
/**
|
|
97
|
-
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#table-options)
|
|
98
|
-
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
99
|
-
*/
|
|
100
|
-
facetedOptions?: FacetedOptions<T>
|
|
101
|
-
}
|
|
102
3
|
</script>
|
|
103
4
|
|
|
104
|
-
<script setup
|
|
105
|
-
import { FlexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getSortedRowModel, useVueTable } from
|
|
106
|
-
import { reactiveOmit } from
|
|
107
|
-
import { Primitive } from
|
|
108
|
-
import { upperFirst } from
|
|
109
|
-
import { computed } from
|
|
110
|
-
import { useLocale } from
|
|
111
|
-
import { useTheme } from
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { FlexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getSortedRowModel, useVueTable } from "@tanstack/vue-table";
|
|
7
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
8
|
+
import { Primitive } from "reka-ui";
|
|
9
|
+
import { upperFirst } from "scule";
|
|
10
|
+
import { computed } from "vue";
|
|
11
|
+
import { useLocale } from "../composables/useLocale";
|
|
12
|
+
import { useTheme } from "../composables/useTheme";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
data: { type: Array, required: false },
|
|
16
|
+
columns: { type: Array, required: false },
|
|
17
|
+
caption: { type: String, required: false },
|
|
18
|
+
empty: { type: String, required: false },
|
|
19
|
+
sticky: { type: Boolean, required: false },
|
|
20
|
+
loading: { type: Boolean, required: false },
|
|
21
|
+
globalFilterOptions: { type: Object, required: false },
|
|
22
|
+
columnFiltersOptions: { type: Object, required: false },
|
|
23
|
+
columnPinningOptions: { type: Object, required: false },
|
|
24
|
+
columnSizingOptions: { type: Object, required: false },
|
|
25
|
+
visibilityOptions: { type: Object, required: false },
|
|
26
|
+
sortingOptions: { type: Object, required: false },
|
|
27
|
+
groupingOptions: { type: Object, required: false },
|
|
28
|
+
expandedOptions: { type: Object, required: false },
|
|
29
|
+
rowSelectionOptions: { type: Object, required: false },
|
|
30
|
+
rowPinningOptions: { type: Object, required: false },
|
|
31
|
+
paginationOptions: { type: Object, required: false },
|
|
32
|
+
facetedOptions: { type: Object, required: false },
|
|
33
|
+
class: { type: null, required: false },
|
|
34
|
+
ui: { type: null, required: false },
|
|
35
|
+
state: { type: Object, required: false },
|
|
36
|
+
onStateChange: { type: Function, required: false },
|
|
37
|
+
renderFallbackValue: { type: null, required: false },
|
|
38
|
+
_features: { type: Array, required: false },
|
|
39
|
+
autoResetAll: { type: Boolean, required: false },
|
|
40
|
+
debugAll: { type: Boolean, required: false },
|
|
41
|
+
debugCells: { type: Boolean, required: false },
|
|
42
|
+
debugColumns: { type: Boolean, required: false },
|
|
43
|
+
debugHeaders: { type: Boolean, required: false },
|
|
44
|
+
debugRows: { type: Boolean, required: false },
|
|
45
|
+
debugTable: { type: Boolean, required: false },
|
|
46
|
+
defaultColumn: { type: Object, required: false },
|
|
47
|
+
getRowId: { type: Function, required: false },
|
|
48
|
+
getSubRows: { type: Function, required: false },
|
|
49
|
+
initialState: { type: Object, required: false },
|
|
50
|
+
mergeOptions: { type: Function, required: false },
|
|
51
|
+
meta: { type: Object, required: false }
|
|
52
|
+
});
|
|
53
|
+
const slots = defineSlots();
|
|
54
|
+
const globalFilterState = defineModel("globalFilter", { type: String, ...{ default: void 0 } });
|
|
55
|
+
const columnFiltersState = defineModel("columnFilters", { type: Array, ...{ default: [] } });
|
|
56
|
+
const columnOrderState = defineModel("columnOrder", { type: Array, ...{ default: [] } });
|
|
57
|
+
const columnVisibilityState = defineModel("columnVisibility", { type: Object, ...{ default: {} } });
|
|
58
|
+
const columnPinningState = defineModel("columnPinning", { type: Object, ...{ default: {} } });
|
|
59
|
+
const columnSizingState = defineModel("columnSizing", { type: Object, ...{ default: {} } });
|
|
60
|
+
const columnSizingInfoState = defineModel("columnSizingInfo", { type: Object, ...{ default: {} } });
|
|
61
|
+
const rowSelectionState = defineModel("rowSelection", { type: Object, ...{ default: {} } });
|
|
62
|
+
const rowPinningState = defineModel("rowPinning", { type: Object, ...{ default: {} } });
|
|
63
|
+
const sortingState = defineModel("sorting", { type: Array, ...{ default: [] } });
|
|
64
|
+
const groupingState = defineModel("grouping", { type: Array, ...{ default: [] } });
|
|
65
|
+
const expandedState = defineModel("expanded", { type: [Boolean, Object], ...{ default: {} } });
|
|
66
|
+
const paginationState = defineModel("pagination", { type: Object, ...{ default: {} } });
|
|
67
|
+
const data = computed(() => props.data ?? []);
|
|
68
|
+
const columns = computed(
|
|
69
|
+
() => props.columns ?? Object.keys(data.value[0] ?? {}).map(
|
|
70
|
+
(accessorKey) => ({ accessorKey, header: upperFirst(accessorKey) })
|
|
71
|
+
)
|
|
72
|
+
);
|
|
139
73
|
const tableApi = useVueTable({
|
|
140
|
-
...reactiveOmit(props,
|
|
74
|
+
...reactiveOmit(props, "data", "columns", "caption", "sticky", "loading", "class", "ui"),
|
|
141
75
|
data,
|
|
142
76
|
columns: columns.value,
|
|
143
77
|
getCoreRowModel: getCoreRowModel(),
|
|
144
|
-
|
|
145
78
|
...props.globalFilterOptions,
|
|
146
79
|
onGlobalFilterChange: (updaterOrValue) => valueUpdater(updaterOrValue, globalFilterState),
|
|
147
|
-
|
|
148
80
|
...props.columnFiltersOptions,
|
|
149
81
|
getFilteredRowModel: getFilteredRowModel(),
|
|
150
82
|
onColumnFiltersChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnFiltersState),
|
|
151
83
|
onColumnOrderChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnOrderState),
|
|
152
|
-
|
|
153
84
|
...props.visibilityOptions,
|
|
154
85
|
onColumnVisibilityChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnVisibilityState),
|
|
155
|
-
|
|
156
86
|
...props.columnPinningOptions,
|
|
157
87
|
onColumnPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnPinningState),
|
|
158
|
-
|
|
159
88
|
...props.columnSizingOptions,
|
|
160
89
|
onColumnSizingChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingState),
|
|
161
90
|
onColumnSizingInfoChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingInfoState),
|
|
162
|
-
|
|
163
91
|
...props.rowSelectionOptions,
|
|
164
92
|
onRowSelectionChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowSelectionState),
|
|
165
|
-
|
|
166
93
|
...props.rowPinningOptions,
|
|
167
94
|
onRowPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowPinningState),
|
|
168
|
-
|
|
169
95
|
...props.sortingOptions,
|
|
170
96
|
getSortedRowModel: getSortedRowModel(),
|
|
171
97
|
onSortingChange: (updaterOrValue) => valueUpdater(updaterOrValue, sortingState),
|
|
172
|
-
|
|
173
98
|
...props.groupingOptions,
|
|
174
99
|
onGroupingChange: (updaterOrValue) => valueUpdater(updaterOrValue, groupingState),
|
|
175
|
-
|
|
176
100
|
...props.expandedOptions,
|
|
177
101
|
getExpandedRowModel: getExpandedRowModel(),
|
|
178
102
|
onExpandedChange: (updaterOrValue) => valueUpdater(updaterOrValue, expandedState),
|
|
179
|
-
|
|
180
103
|
...props.paginationOptions,
|
|
181
104
|
onPaginationChange: (updaterOrValue) => valueUpdater(updaterOrValue, paginationState),
|
|
182
|
-
|
|
183
105
|
...props.facetedOptions,
|
|
184
106
|
state: {
|
|
185
107
|
get globalFilter() {
|
|
186
|
-
return globalFilterState.value
|
|
108
|
+
return globalFilterState.value;
|
|
187
109
|
},
|
|
188
110
|
get columnFilters() {
|
|
189
|
-
return columnFiltersState.value
|
|
111
|
+
return columnFiltersState.value;
|
|
190
112
|
},
|
|
191
113
|
get columnOrder() {
|
|
192
|
-
return columnOrderState.value
|
|
114
|
+
return columnOrderState.value;
|
|
193
115
|
},
|
|
194
116
|
get columnVisibility() {
|
|
195
|
-
return columnVisibilityState.value
|
|
117
|
+
return columnVisibilityState.value;
|
|
196
118
|
},
|
|
197
119
|
get columnPinning() {
|
|
198
|
-
return columnPinningState.value
|
|
120
|
+
return columnPinningState.value;
|
|
199
121
|
},
|
|
200
122
|
get expanded() {
|
|
201
|
-
return expandedState.value
|
|
123
|
+
return expandedState.value;
|
|
202
124
|
},
|
|
203
125
|
get rowSelection() {
|
|
204
|
-
return rowSelectionState.value
|
|
126
|
+
return rowSelectionState.value;
|
|
205
127
|
},
|
|
206
128
|
get sorting() {
|
|
207
|
-
return sortingState.value
|
|
129
|
+
return sortingState.value;
|
|
208
130
|
},
|
|
209
131
|
get grouping() {
|
|
210
|
-
return groupingState.value
|
|
132
|
+
return groupingState.value;
|
|
211
133
|
},
|
|
212
134
|
get rowPinning() {
|
|
213
|
-
return rowPinningState.value
|
|
135
|
+
return rowPinningState.value;
|
|
214
136
|
},
|
|
215
137
|
get columnSizing() {
|
|
216
|
-
return columnSizingState.value
|
|
138
|
+
return columnSizingState.value;
|
|
217
139
|
},
|
|
218
140
|
get columnSizingInfo() {
|
|
219
|
-
return columnSizingInfoState.value
|
|
141
|
+
return columnSizingInfoState.value;
|
|
220
142
|
},
|
|
221
143
|
get pagination() {
|
|
222
|
-
return paginationState.value
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
ref.value = typeof updaterOrValue === 'function' ? updaterOrValue(ref.value) : updaterOrValue
|
|
144
|
+
return paginationState.value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
function valueUpdater(updaterOrValue, ref) {
|
|
149
|
+
ref.value = typeof updaterOrValue === "function" ? updaterOrValue(ref.value) : updaterOrValue;
|
|
229
150
|
}
|
|
230
|
-
|
|
231
|
-
const {
|
|
232
|
-
const
|
|
233
|
-
const style = computed(() => generateStyle('table', props))
|
|
234
|
-
|
|
151
|
+
const { t } = useLocale();
|
|
152
|
+
const { generateStyle } = useTheme();
|
|
153
|
+
const style = computed(() => generateStyle("table", props));
|
|
235
154
|
defineExpose({
|
|
236
|
-
tableApi
|
|
237
|
-
})
|
|
155
|
+
tableApi
|
|
156
|
+
});
|
|
238
157
|
</script>
|
|
239
158
|
|
|
240
159
|
<template>
|
|
241
|
-
<Primitive :as="props.as" :class="style.root({ class: [props.class, props.ui?.root] })">
|
|
242
|
-
<table :class="style.base({ class: props.ui?.base })">
|
|
243
|
-
<caption v-if="props.caption" :class="style.caption({ class: props.caption })">
|
|
160
|
+
<Primitive :as="props.as" :class="style.root({ class: [props.class, props.ui?.root] })" data-part="root">
|
|
161
|
+
<table :class="style.base({ class: props.ui?.base })" data-part="base">
|
|
162
|
+
<caption v-if="props.caption || slots.caption" :class="style.caption({ class: props.caption })" data-part="caption">
|
|
244
163
|
<slot name="caption">
|
|
245
164
|
{{ props.caption }}
|
|
246
165
|
</slot>
|
|
247
166
|
</caption>
|
|
248
167
|
|
|
249
|
-
<thead :class="style.thead({ class: props.ui?.thead })">
|
|
250
|
-
<tr v-for="headerGroup in tableApi.getHeaderGroups()" :key="headerGroup.id" :class="style.tr({ class: props.ui?.tr })">
|
|
168
|
+
<thead :class="style.thead({ class: props.ui?.thead })" data-part="thead">
|
|
169
|
+
<tr v-for="headerGroup in tableApi.getHeaderGroups()" :key="headerGroup.id" :class="style.tr({ class: props.ui?.tr })" data-part="tr">
|
|
251
170
|
<th
|
|
252
171
|
v-for="header in headerGroup.headers"
|
|
253
172
|
:key="header.id"
|
|
254
173
|
:data-pinned="header.column.getIsPinned()"
|
|
255
174
|
:class="style.th({ class: props.ui?.th, pinned: !!header.column.getIsPinned() })"
|
|
175
|
+
data-part="th"
|
|
256
176
|
>
|
|
257
177
|
<slot :name="`${header.id}-header`" v-bind="header.getContext()">
|
|
258
178
|
<FlexRender v-if="!header.isPlaceholder" :render="header.column.columnDef.header" :props="header.getContext" />
|
|
@@ -261,33 +181,40 @@ defineExpose({
|
|
|
261
181
|
</tr>
|
|
262
182
|
</thead>
|
|
263
183
|
|
|
264
|
-
<tbody :class="style.tbody({ class: props.ui?.tbody })">
|
|
184
|
+
<tbody :class="style.tbody({ class: props.ui?.tbody })" data-part="tbody">
|
|
265
185
|
<template v-if="tableApi.getRowModel().rows.length > 0">
|
|
266
186
|
<template v-for="row in tableApi.getRowModel().rows" :key="row.id">
|
|
267
187
|
<tr :data-selected="row.getIsSelected()" :data-expanded="row.getIsExpanded()" :class="style.tr({ class: props.ui?.tr })">
|
|
268
188
|
<td
|
|
269
189
|
v-for="cell in row.getVisibleCells()"
|
|
270
190
|
:key="cell.id"
|
|
271
|
-
:data-pinned="cell.column.getIsPinned()"
|
|
272
191
|
:class="style.td({ class: props.ui?.td, pinned: !!cell.column.getIsPinned() })"
|
|
192
|
+
data-part="td"
|
|
193
|
+
:data-pinned="cell.column.getIsPinned()"
|
|
273
194
|
>
|
|
274
195
|
<slot :name="`${cell.column.id}-cell`" v-bind="cell.getContext()">
|
|
275
196
|
<FlexRender :render="cell.column.columnDef.cell" :props="cell.getContext()" />
|
|
276
197
|
</slot>
|
|
277
198
|
</td>
|
|
278
199
|
</tr>
|
|
279
|
-
<tr v-if="row.getIsExpanded()" :class="style.tr({ class: props.ui?.tr, expanded: true })">
|
|
280
|
-
<td :colspan="row.getAllCells().length" :class="style.td({ class: props.ui?.td })">
|
|
200
|
+
<tr v-if="row.getIsExpanded()" :class="style.tr({ class: props.ui?.tr, expanded: true })" data-part="tr">
|
|
201
|
+
<td :colspan="row.getAllCells().length" :class="style.td({ class: props.ui?.td })" data-part="td">
|
|
281
202
|
<slot name="expanded" :row="row"></slot>
|
|
282
203
|
</td>
|
|
283
204
|
</tr>
|
|
284
205
|
</template>
|
|
285
206
|
</template>
|
|
286
207
|
|
|
287
|
-
<tr v-else
|
|
288
|
-
<td :colspan="columns.length" :class="style.
|
|
208
|
+
<tr v-else-if="props.loading && slots.loading">
|
|
209
|
+
<td :colspan="columns.length" :class="style.loading({ class: props.ui?.loading })" data-part="loading">
|
|
210
|
+
<slot name="loading"></slot>
|
|
211
|
+
</td>
|
|
212
|
+
</tr>
|
|
213
|
+
|
|
214
|
+
<tr v-else :class="style.tr({ class: props.ui?.tr })" data-part="tr">
|
|
215
|
+
<td :colspan="columns.length" :class="style.empty({ class: props.ui?.empty })" data-part="empty">
|
|
289
216
|
<slot name="empty">
|
|
290
|
-
{{ t(
|
|
217
|
+
{{ props.empty || t("table.noData") }}
|
|
291
218
|
</slot>
|
|
292
219
|
</td>
|
|
293
220
|
</tr>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { CellContext, ColumnDef, ColumnFiltersOptions, ColumnFiltersState, ColumnOrderState, ColumnPinningOptions, ColumnPinningState, ColumnSizingInfoState, ColumnSizingOptions, ColumnSizingState, CoreOptions, ExpandedOptions, ExpandedState, FacetedOptions, GlobalFilterOptions, GroupingOptions, GroupingState, HeaderContext, PaginationOptions, PaginationState, Row, RowData, RowPinningOptions, RowPinningState, RowSelectionOptions, RowSelectionState, SortingOptions, SortingState, VisibilityOptions, VisibilityState } from '@tanstack/vue-table';
|
|
2
|
+
import type { PrimitiveProps } from 'reka-ui';
|
|
3
|
+
import type { table } from '../theme/index.js';
|
|
4
|
+
import type { ComponentAttrs } from '../types/index.js';
|
|
5
|
+
type DynamicHeaderSlots<T, K = keyof T> = Record<string, (props: HeaderContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-header`, (props: HeaderContext<T, unknown>) => any>;
|
|
6
|
+
type DynamicCellSlots<T, K = keyof T> = Record<string, (props: CellContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-cell`, (props: CellContext<T, unknown>) => any>;
|
|
7
|
+
export type TableSlots<T> = {
|
|
8
|
+
expanded?: (props: {
|
|
9
|
+
row: Row<T>;
|
|
10
|
+
}) => any;
|
|
11
|
+
empty?: any;
|
|
12
|
+
loading?: any;
|
|
13
|
+
caption?: any;
|
|
14
|
+
} & DynamicHeaderSlots<T> & DynamicCellSlots<T>;
|
|
15
|
+
export type TableData = RowData;
|
|
16
|
+
export type TableColumn<T extends TableData, D = unknown> = ColumnDef<T, D> & {
|
|
17
|
+
title?: string;
|
|
18
|
+
};
|
|
19
|
+
export interface TableOptions<T extends TableData> extends Omit<CoreOptions<T>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'> {
|
|
20
|
+
state?: CoreOptions<T>['state'];
|
|
21
|
+
onStateChange?: CoreOptions<T>['onStateChange'];
|
|
22
|
+
renderFallbackValue?: CoreOptions<T>['renderFallbackValue'];
|
|
23
|
+
}
|
|
24
|
+
export interface TableProps<T extends TableData> extends ComponentAttrs<typeof table>, TableOptions<T> {
|
|
25
|
+
/**
|
|
26
|
+
* The element or component this component should render as.
|
|
27
|
+
* @default "div"
|
|
28
|
+
*/
|
|
29
|
+
as?: PrimitiveProps['as'];
|
|
30
|
+
data?: T[];
|
|
31
|
+
columns?: TableColumn<T>[];
|
|
32
|
+
caption?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The text to display when the table is empty.
|
|
35
|
+
* @default t('table.noData')
|
|
36
|
+
*/
|
|
37
|
+
empty?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the table should have a sticky header.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
sticky?: boolean;
|
|
43
|
+
/** Whether the table should be in loading state. */
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#table-options)
|
|
47
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
48
|
+
*/
|
|
49
|
+
globalFilterOptions?: Omit<GlobalFilterOptions<T>, 'onGlobalFilterChange'>;
|
|
50
|
+
/**
|
|
51
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#table-options)
|
|
52
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
53
|
+
*/
|
|
54
|
+
columnFiltersOptions?: Omit<ColumnFiltersOptions<T>, 'getFilteredRowModel' | 'onColumnFiltersChange'>;
|
|
55
|
+
/**
|
|
56
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#table-options)
|
|
57
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
58
|
+
*/
|
|
59
|
+
columnPinningOptions?: Omit<ColumnPinningOptions, 'onColumnPinningChange'>;
|
|
60
|
+
/**
|
|
61
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#table-options)
|
|
62
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
63
|
+
*/
|
|
64
|
+
columnSizingOptions?: Omit<ColumnSizingOptions, 'onColumnSizingChange' | 'onColumnSizingInfoChange'>;
|
|
65
|
+
/**
|
|
66
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#table-options)
|
|
67
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
68
|
+
*/
|
|
69
|
+
visibilityOptions?: Omit<VisibilityOptions, 'onColumnVisibilityChange'>;
|
|
70
|
+
/**
|
|
71
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#table-options)
|
|
72
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
73
|
+
*/
|
|
74
|
+
sortingOptions?: Omit<SortingOptions<T>, 'getSortedRowModel' | 'onSortingChange'>;
|
|
75
|
+
/**
|
|
76
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#table-options)
|
|
77
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
78
|
+
*/
|
|
79
|
+
groupingOptions?: Omit<GroupingOptions, 'onGroupingChange'>;
|
|
80
|
+
/**
|
|
81
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#table-options)
|
|
82
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
83
|
+
*/
|
|
84
|
+
expandedOptions?: Omit<ExpandedOptions<T>, 'getExpandedRowModel' | 'onExpandedChange'>;
|
|
85
|
+
/**
|
|
86
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#table-options)
|
|
87
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
88
|
+
*/
|
|
89
|
+
rowSelectionOptions?: Omit<RowSelectionOptions<T>, 'onRowSelectionChange'>;
|
|
90
|
+
/**
|
|
91
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#table-options)
|
|
92
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
93
|
+
*/
|
|
94
|
+
rowPinningOptions?: Omit<RowPinningOptions<T>, 'onRowPinningChange'>;
|
|
95
|
+
/**
|
|
96
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#table-options)
|
|
97
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
98
|
+
*/
|
|
99
|
+
paginationOptions?: Omit<PaginationOptions, 'onPaginationChange'>;
|
|
100
|
+
/**
|
|
101
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#table-options)
|
|
102
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
103
|
+
*/
|
|
104
|
+
facetedOptions?: FacetedOptions<T>;
|
|
105
|
+
}
|
|
106
|
+
declare const _default: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
107
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
108
|
+
readonly "onUpdate:globalFilter"?: ((value: string) => any) | undefined;
|
|
109
|
+
readonly "onUpdate:columnFilters"?: ((value: ColumnFiltersState) => any) | undefined;
|
|
110
|
+
readonly "onUpdate:columnOrder"?: ((value: ColumnOrderState) => any) | undefined;
|
|
111
|
+
readonly "onUpdate:columnVisibility"?: ((value: VisibilityState) => any) | undefined;
|
|
112
|
+
readonly "onUpdate:columnPinning"?: ((value: ColumnPinningState) => any) | undefined;
|
|
113
|
+
readonly "onUpdate:columnSizing"?: ((value: ColumnSizingState) => any) | undefined;
|
|
114
|
+
readonly "onUpdate:columnSizingInfo"?: ((value: ColumnSizingInfoState) => any) | undefined;
|
|
115
|
+
readonly "onUpdate:rowSelection"?: ((value: RowSelectionState) => any) | undefined;
|
|
116
|
+
readonly "onUpdate:rowPinning"?: ((value: RowPinningState) => any) | undefined;
|
|
117
|
+
readonly "onUpdate:sorting"?: ((value: SortingState) => any) | undefined;
|
|
118
|
+
readonly "onUpdate:grouping"?: ((value: GroupingState) => any) | undefined;
|
|
119
|
+
readonly "onUpdate:expanded"?: ((value: ExpandedState) => any) | undefined;
|
|
120
|
+
readonly "onUpdate:pagination"?: ((value: PaginationState) => any) | undefined;
|
|
121
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:globalFilter" | "onUpdate:columnFilters" | "onUpdate:columnOrder" | "onUpdate:columnVisibility" | "onUpdate:columnPinning" | "onUpdate:columnSizing" | "onUpdate:columnSizingInfo" | "onUpdate:rowSelection" | "onUpdate:rowPinning" | "onUpdate:sorting" | "onUpdate:grouping" | "onUpdate:expanded" | "onUpdate:pagination"> & (TableProps<T> & {
|
|
122
|
+
globalFilter?: string;
|
|
123
|
+
columnFilters?: ColumnFiltersState;
|
|
124
|
+
columnOrder?: ColumnOrderState;
|
|
125
|
+
columnVisibility?: VisibilityState;
|
|
126
|
+
columnPinning?: ColumnPinningState;
|
|
127
|
+
columnSizing?: ColumnSizingState;
|
|
128
|
+
columnSizingInfo?: ColumnSizingInfoState;
|
|
129
|
+
rowSelection?: RowSelectionState;
|
|
130
|
+
rowPinning?: RowPinningState;
|
|
131
|
+
sorting?: SortingState;
|
|
132
|
+
grouping?: GroupingState;
|
|
133
|
+
expanded?: ExpandedState;
|
|
134
|
+
pagination?: PaginationState;
|
|
135
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
136
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
137
|
+
tableApi: import("@tanstack/vue-table").Table<T>;
|
|
138
|
+
}>): void;
|
|
139
|
+
attrs: any;
|
|
140
|
+
slots: TableSlots<T>;
|
|
141
|
+
emit: ((evt: "update:globalFilter", value: string) => void) & ((evt: "update:columnFilters", value: ColumnFiltersState) => void) & ((evt: "update:columnOrder", value: ColumnOrderState) => void) & ((evt: "update:columnVisibility", value: VisibilityState) => void) & ((evt: "update:columnPinning", value: ColumnPinningState) => void) & ((evt: "update:columnSizing", value: ColumnSizingState) => void) & ((evt: "update:columnSizingInfo", value: ColumnSizingInfoState) => void) & ((evt: "update:rowSelection", value: RowSelectionState) => void) & ((evt: "update:rowPinning", value: RowPinningState) => void) & ((evt: "update:sorting", value: SortingState) => void) & ((evt: "update:grouping", value: GroupingState) => void) & ((evt: "update:expanded", value: ExpandedState) => void) & ((evt: "update:pagination", value: PaginationState) => void);
|
|
142
|
+
}>) => import("vue").VNode & {
|
|
143
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
144
|
+
};
|
|
145
|
+
export default _default;
|
|
146
|
+
type __VLS_PrettifyLocal<T> = {
|
|
147
|
+
[K in keyof T]: T[K];
|
|
148
|
+
} & {};
|