vueye-table 2.0.0-alpha.1 → 2.0.0-alpha.12

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.
Files changed (51) hide show
  1. package/LICENSE +14 -13
  2. package/README.md +89 -41
  3. package/dist/components/core/VueyeTable/VueyeTable.vue.d.ts +151 -25
  4. package/dist/components/core/VueyeTable/api.d.ts +34 -0
  5. package/dist/components/core/VueyeTable/components/VueyeBody/VueyeBody.vue.d.ts +52 -0
  6. package/dist/components/core/VueyeTable/components/VueyeBody/api.d.ts +12 -0
  7. package/dist/components/core/VueyeTable/components/VueyeBody/index.d.ts +2 -0
  8. package/dist/components/core/VueyeTable/components/VueyeDropdown/VueyeDropdown.vue.d.ts +36 -0
  9. package/dist/components/core/VueyeTable/components/VueyeDropdown/api.d.ts +19 -0
  10. package/dist/components/core/VueyeTable/components/VueyeDropdown/index.d.ts +4 -0
  11. package/dist/components/core/VueyeTable/components/VueyeHead/VueyeHead.vue.d.ts +47 -0
  12. package/dist/components/core/VueyeTable/components/VueyeHead/api.d.ts +16 -0
  13. package/dist/components/core/VueyeTable/components/VueyePagination/VueyePagination.vue.d.ts +31 -0
  14. package/dist/components/core/VueyeTable/components/VueyePagination/api.d.ts +12 -0
  15. package/dist/components/core/VueyeTable/components/VueyePagination/index.d.ts +3 -0
  16. package/dist/components/core/VueyeTable/components/icons/ArrowUpDownIcon.vue.d.ts +8 -0
  17. package/dist/components/core/VueyeTable/components/icons/ChevronDownIcon.vue.d.ts +2 -0
  18. package/dist/components/core/VueyeTable/components/icons/ChevronLeftIcon.vue.d.ts +2 -0
  19. package/dist/components/core/VueyeTable/components/icons/ChevronRightIcon.vue.d.ts +2 -0
  20. package/dist/components/core/VueyeTable/components/icons/DoubleChevronLeftIcon.vue.d.ts +2 -0
  21. package/dist/components/core/VueyeTable/components/icons/DoubleChevronRightIcon.vue.d.ts +2 -0
  22. package/dist/components/core/VueyeTable/components/index.d.ts +4 -0
  23. package/dist/components/core/VueyeTable/components/utils/VueyeCheckbox.vue.d.ts +24 -0
  24. package/dist/components/core/VueyeTable/composables/index.d.ts +4 -0
  25. package/dist/components/core/VueyeTable/composables/useBodyRows.d.ts +16 -0
  26. package/dist/components/core/VueyeTable/composables/usePagination.d.ts +12 -0
  27. package/dist/components/core/VueyeTable/index.d.ts +1 -0
  28. package/dist/components/core/VueyeTable/types/Column.d.ts +19 -39
  29. package/dist/components/core/VueyeTable/types/Row.d.ts +25 -0
  30. package/dist/components/core/VueyeTable/types/Utils.d.ts +25 -0
  31. package/dist/components/core/VueyeTable/utils/body.d.ts +6 -4
  32. package/dist/components/core/VueyeTable/utils/header.d.ts +4 -2
  33. package/dist/components/core/VueyeTable/utils/humanize.d.ts +1 -0
  34. package/dist/components/core/VueyeTable/utils/index.d.ts +1 -0
  35. package/dist/default.css +1 -0
  36. package/dist/vueye-table.js +799 -378
  37. package/dist/vueye-table.umd.cjs +1 -1
  38. package/package.json +93 -98
  39. package/dist/components/core/VueyeTable/VSelect.d.ts +0 -15
  40. package/dist/components/core/VueyeTable/VueyeBody/VueyeBody.vue.d.ts +0 -49
  41. package/dist/components/core/VueyeTable/VueyeBody/index.d.ts +0 -2
  42. package/dist/components/core/VueyeTable/VueyeHead/VueyeHead.vue.d.ts +0 -22
  43. package/dist/components/core/VueyeTable/VueyePagination/VueyePagination.vue.d.ts +0 -55
  44. package/dist/components/core/VueyeTable/VueyePagination/index.d.ts +0 -6
  45. package/dist/components/core/VueyeTable/composables/props/PaginationProps.d.ts +0 -5
  46. package/dist/components/core/VueyeTable/util-components/VueyeDropdown.vue.d.ts +0 -53
  47. package/dist/data/product.d.ts +0 -18
  48. package/dist/data/user.d.ts +0 -22
  49. package/dist/style.css +0 -1
  50. package/dist/types.d.ts +0 -8
  51. /package/dist/components/core/VueyeTable/{VueyeHead → components/VueyeHead}/index.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,20 +1,21 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2017 Antério Vieira
3
+ Copyright (c) 2023 radix-vue
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
11
 
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,41 +1,89 @@
1
- # Vueye-table
2
-
3
- > Fully automated.
4
-
5
- - [x] Eslint
6
- - [x] Prettier
7
- - [x] Conventional Commit
8
- - [x] Pre-commit
9
- - [x] Lint-staged
10
- - [x] Semantic-release
11
- - [x] TypeScript
12
-
13
- ## TODO
14
-
15
- 1. Data Rendering ✅
16
- 2. Sorting
17
- 3. Filtering
18
- 4. Pagination ✅
19
- 5. Selection
20
- 6. Editing
21
- 7. Resizing and Reordering
22
- 8. Row Expansion
23
- 9. Grouping by columns ✅
24
- 10. Exporting
25
- 11. Responsive Design
26
- 12. Customization
27
- 13. Accessibility
28
-
29
- ## How to use:
30
-
31
- 1. Clone the project
32
- 2. `yarn`
33
- 3. `npx semantic-release-cli setup`
34
- 4. Add components
35
- 5. `git add .`
36
- 6. `yarn commit`
37
- 7. `git push`
38
-
39
- ## Real Example:
40
-
41
- [vue-tradingviewWidgets](https://github.com/boussadjra/vue-tradingviewWidgets)
1
+ # Vueye Table
2
+
3
+ Vueye Table is a Vue 3 component for displaying data in a table.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install vueye-table
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```vue
14
+ <template>
15
+ <VueyeTable
16
+ :data="data"
17
+ :columnHeaders="columnHeaders"
18
+ :itemValue="itemValue"
19
+ :perPage="perPage"
20
+ :currentPage="currentPage"
21
+ :perPageOptions="perPageOptions"
22
+ :loading="loading"
23
+ :selected="selected"
24
+ :selectMode="selectMode"
25
+ :caption="caption"
26
+ :summary="summary"
27
+ @update:loading="updateLoading"
28
+ @update:selected="updateSelected"
29
+ >
30
+ <template #headerCellContent.name="props">
31
+ {{ props.columnHeader.name }}
32
+ </template>
33
+ <template #itemCellContent.name="props">
34
+ {{ props.item.name }}
35
+ </template>
36
+ </VueyeTable>
37
+ </template>
38
+ ```
39
+
40
+ ### VueyeTableProps
41
+
42
+ | Prop Name | Type | Default Value | Description |
43
+ | --- | --- | --- | --- |
44
+ | data | TData[] | [] | An array of data for the table. |
45
+ | columnHeaders | TColumn[] or a function returning an array | [] | An array of column headers for the table. |
46
+ | itemValue | string | 'id' | The property name used as a unique identifier for each item. |
47
+ | perPage | number | 10 | The number of items displayed per page. |
48
+ | currentPage | number | 1 | The current page number. |
49
+ | perPageOptions | number[] or a function returning an array | [5, 10, 20, 30] | An array of options for the number of items per page. |
50
+ | loading | boolean | false | Indicates whether the table is in a loading state. |
51
+ | selected | TData[], Row[], or null | null | An array of selected items or rows. |
52
+ | selectMode | 'page' or 'all' | 'all' | The mode for selecting items: 'page' or 'all'. |
53
+ | caption | string | '' | The table's caption. |
54
+ | summary | string | '' | The table's summary. |
55
+
56
+ ### VueyeTableEmits
57
+
58
+ | Emit Name | Parameters | Description |
59
+ | --------------- | -------------- | ------------------------------------- |
60
+ | update:loading | value: boolean | Emits when the loading state changes. |
61
+ | update:selected | value: T[] | Emits when the selected items change. |
62
+
63
+ ### PaginationEmits
64
+
65
+ | Emit Name | Parameters | Description |
66
+ | ------------------ | ------------- | ------------------------------------------------ |
67
+ | update:currentPage | value: number | Emits when the current page changes. |
68
+ | update:perPage | value: number | Emits when the number of items per page changes. |
69
+
70
+ ### SlotHeader
71
+
72
+ The SlotHeader component defines various slots for customizing the table header.
73
+
74
+ - `headerCell.<ColumnKey>`: Slot for customizing the content of a specific column header.
75
+ - `headerCellContent.<ColumnKey>`: Slot for customizing the content within a specific column header cell.
76
+ - `headers`: Slot for customizing the entire table header, containing all column headers.
77
+ - `checkbox`: Slot for customizing the checkbox used for selecting all items.
78
+
79
+ ### SlotRow
80
+
81
+ The SlotRow component defines various slots for customizing the table rows.
82
+
83
+ - `itemCell.<ItemKey>`: Slot for customizing the content of a specific item cell within a row.
84
+ - `itemCellContent.<ItemKey>`: Slot for customizing the content within a specific item cell.
85
+ - `rows`: Slot for customizing the entire table rows, containing all rows.
86
+ - `row`: Slot for customizing a specific row.
87
+ - `checkbox`: Slot for customizing the checkbox used for selecting a specific row.
88
+
89
+ You can use these Markdown tables to document the props, emits, and slot definitions for the data table and pagination components in your Vue 3 project.
@@ -1,36 +1,162 @@
1
- import { ColumnHeaderBase } from './types';
2
- import { SlotHeader } from './types';
3
- export interface VueyeTableProps<TData extends Record<string, unknown>, TItemValue extends string = 'id'> {
4
- itemValue?: TItemValue;
5
- columnHeaders: ColumnHeaderBase<Record<string, unknown>>[];
1
+ import { VueyeTableEmits } from './api';
2
+ import type { ColumnHeader } from './types';
3
+ declare const _default: <TData extends Record<string, unknown> = Record<string, unknown>, TColumn extends ColumnHeader<TData> = ColumnHeader<TData>>(__VLS_props: {
4
+ caption?: string | undefined;
6
5
  data: TData[];
7
- perPage?: number;
8
- currentPage?: number;
9
- perPageOptions?: number[];
10
- loading?: boolean;
11
- selectable?: boolean;
12
- }
13
- declare const _default: <TData extends Record<TItemValue, unknown>, TItemValue extends string = "id">(__VLS_props: VueyeTableProps<Record<string, unknown>, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
14
- props: VueyeTableProps<Record<string, unknown>, string>;
15
- expose(exposed: {}): void;
6
+ summary?: string | undefined;
7
+ perPage?: number | undefined;
8
+ currentPage?: number | undefined;
9
+ perPageOptions?: number[] | undefined;
10
+ columnHeaders?: TColumn[] | undefined;
11
+ itemValue?: string | undefined;
12
+ loading?: boolean | undefined;
13
+ selected?: import("./types").Row[] | TData[] | null | undefined;
14
+ selectMode?: "page" | "all" | undefined;
15
+ filterQuery?: string | undefined;
16
+ filterBy?: import("./types").FlattenKeys<TData, "">[] | undefined;
17
+ filterMethod?: import("./api").FilterMethod<TData> | undefined;
18
+ "onUpdate:selected"?: ((value: TData[]) => any) | undefined;
19
+ "onUpdate:currentPage"?: ((value: number) => any) | undefined;
20
+ "onUpdate:perPage"?: ((value: number) => any) | undefined;
21
+ "onUpdate:loading"?: ((value: boolean) => any) | undefined;
22
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
16
23
  attrs: any;
17
- slots: SlotHeader<string>;
18
- emit: any;
19
- }, "attrs" | "emit" | "slots"> | undefined, __VLS_setup?: Promise<{
20
- props: VueyeTableProps<Record<string, unknown>, string>;
21
- expose(exposed: {}): void;
24
+ slots: Readonly<import("./types").SlotHeaderCell<TData> & import("./types").SlotHeaderCellContent<TData> & {
25
+ headers: (props: {
26
+ headers: ColumnHeader<Record<string, unknown>>[][];
27
+ }) => any;
28
+ checkbox: () => any;
29
+ } & import("./types").SlotRowItem<TData> & import("./types").SlotRowItemContent<TData> & {
30
+ body: (props: {
31
+ rows: TData[];
32
+ }) => any;
33
+ rows: (props: {
34
+ rows: TData[];
35
+ }) => any;
36
+ row: (props: {
37
+ row: TData;
38
+ }) => any;
39
+ checkbox: (props: {
40
+ row: TData;
41
+ }) => any;
42
+ } & {
43
+ caption: () => any;
44
+ summary: () => any;
45
+ loading: () => any;
46
+ empty: () => any;
47
+ pagination: (props: {
48
+ pagination: import("./components").PaginationProps;
49
+ }) => any;
50
+ }>;
51
+ emit: VueyeTableEmits<TData>;
52
+ } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
53
+ props: {
54
+ caption?: string | undefined;
55
+ data: TData[];
56
+ summary?: string | undefined;
57
+ perPage?: number | undefined;
58
+ currentPage?: number | undefined;
59
+ perPageOptions?: number[] | undefined;
60
+ columnHeaders?: TColumn[] | undefined;
61
+ itemValue?: string | undefined;
62
+ loading?: boolean | undefined;
63
+ selected?: import("./types").Row[] | TData[] | null | undefined;
64
+ selectMode?: "page" | "all" | undefined;
65
+ filterQuery?: string | undefined;
66
+ filterBy?: import("./types").FlattenKeys<TData, "">[] | undefined;
67
+ filterMethod?: import("./api").FilterMethod<TData> | undefined;
68
+ "onUpdate:selected"?: ((value: TData[]) => any) | undefined;
69
+ "onUpdate:currentPage"?: ((value: number) => any) | undefined;
70
+ "onUpdate:perPage"?: ((value: number) => any) | undefined;
71
+ "onUpdate:loading"?: ((value: boolean) => any) | undefined;
72
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
73
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
22
74
  attrs: any;
23
- slots: SlotHeader<string>;
24
- emit: any;
75
+ slots: Readonly<import("./types").SlotHeaderCell<TData> & import("./types").SlotHeaderCellContent<TData> & {
76
+ headers: (props: {
77
+ headers: ColumnHeader<Record<string, unknown>>[][];
78
+ }) => any;
79
+ checkbox: () => any;
80
+ } & import("./types").SlotRowItem<TData> & import("./types").SlotRowItemContent<TData> & {
81
+ body: (props: {
82
+ rows: TData[];
83
+ }) => any;
84
+ rows: (props: {
85
+ rows: TData[];
86
+ }) => any;
87
+ row: (props: {
88
+ row: TData;
89
+ }) => any;
90
+ checkbox: (props: {
91
+ row: TData;
92
+ }) => any;
93
+ } & {
94
+ caption: () => any;
95
+ summary: () => any;
96
+ loading: () => any;
97
+ empty: () => any;
98
+ pagination: (props: {
99
+ pagination: import("./components").PaginationProps;
100
+ }) => any;
101
+ }>;
102
+ emit: VueyeTableEmits<TData>;
25
103
  }>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
104
  [key: string]: any;
27
105
  }> & {
28
106
  __ctx?: {
29
- props: VueyeTableProps<Record<string, unknown>, string>;
30
- expose(exposed: {}): void;
107
+ props: {
108
+ caption?: string | undefined;
109
+ data: TData[];
110
+ summary?: string | undefined;
111
+ perPage?: number | undefined;
112
+ currentPage?: number | undefined;
113
+ perPageOptions?: number[] | undefined;
114
+ columnHeaders?: TColumn[] | undefined;
115
+ itemValue?: string | undefined;
116
+ loading?: boolean | undefined;
117
+ selected?: import("./types").Row[] | TData[] | null | undefined;
118
+ selectMode?: "page" | "all" | undefined;
119
+ filterQuery?: string | undefined;
120
+ filterBy?: import("./types").FlattenKeys<TData, "">[] | undefined;
121
+ filterMethod?: import("./api").FilterMethod<TData> | undefined;
122
+ "onUpdate:selected"?: ((value: TData[]) => any) | undefined;
123
+ "onUpdate:currentPage"?: ((value: number) => any) | undefined;
124
+ "onUpdate:perPage"?: ((value: number) => any) | undefined;
125
+ "onUpdate:loading"?: ((value: boolean) => any) | undefined;
126
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
127
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
31
128
  attrs: any;
32
- slots: SlotHeader<string>;
33
- emit: any;
129
+ slots: Readonly<import("./types").SlotHeaderCell<TData> & import("./types").SlotHeaderCellContent<TData> & {
130
+ headers: (props: {
131
+ headers: ColumnHeader<Record<string, unknown>>[][];
132
+ }) => any;
133
+ checkbox: () => any;
134
+ } & import("./types").SlotRowItem<TData> & import("./types").SlotRowItemContent<TData> & {
135
+ body: (props: {
136
+ rows: TData[];
137
+ }) => any;
138
+ rows: (props: {
139
+ rows: TData[];
140
+ }) => any;
141
+ row: (props: {
142
+ row: TData;
143
+ }) => any;
144
+ checkbox: (props: {
145
+ row: TData;
146
+ }) => any;
147
+ } & {
148
+ caption: () => any;
149
+ summary: () => any;
150
+ loading: () => any;
151
+ empty: () => any;
152
+ pagination: (props: {
153
+ pagination: import("./components").PaginationProps;
154
+ }) => any;
155
+ }>;
156
+ emit: VueyeTableEmits<TData>;
34
157
  } | undefined;
35
158
  };
36
159
  export default _default;
160
+ type __VLS_Prettify<T> = {
161
+ [K in keyof T]: T[K];
162
+ } & {};
@@ -0,0 +1,34 @@
1
+ import { PaginationEmits, PaginationProps } from './components/VueyePagination/api';
2
+ import { InferDefaults, Row, SlotHeader, SlotRow, FlattenKeys, ColumnHeader, FlattenObject } from './types';
3
+ export type FilterMethod<TData extends Record<string, unknown>> = (query: string | undefined, item: FlattenObject<TData>, filterBy?: FlattenKeys<TData>[]) => boolean | undefined;
4
+ export declare function defineFilterMethod<TData extends Record<string, unknown>>(filterMethod: FilterMethod<TData>): (query: string | undefined, item: FlattenObject<TData>, filterBy?: FlattenKeys<TData>[]) => boolean | undefined;
5
+ export type VueyeTableProps<TData extends Record<string, unknown> = Record<string, unknown>, TColumn extends ColumnHeader<TData> = ColumnHeader<TData>> = {
6
+ data: TData[];
7
+ columnHeaders?: TColumn[];
8
+ itemValue?: string;
9
+ perPage?: number;
10
+ currentPage?: number;
11
+ perPageOptions?: number[];
12
+ loading?: boolean;
13
+ selected?: TData[] | Row[] | null;
14
+ selectMode?: 'page' | 'all';
15
+ caption?: string;
16
+ summary?: string;
17
+ filterQuery?: string;
18
+ filterBy?: FlattenKeys<TData>[];
19
+ filterMethod?: FilterMethod<TData>;
20
+ };
21
+ export declare function getVueyeTablePropDefaults<TData extends Record<string, unknown>, TColumn extends ColumnHeader<TData>>(): InferDefaults<VueyeTableProps<TData, TColumn>>;
22
+ export type VueyeTableEmits<T> = PaginationEmits & {
23
+ (event: 'update:loading', value: boolean): void;
24
+ (event: 'update:selected', value: T[]): void;
25
+ };
26
+ export type VueyeTableSlots<TData extends Record<string, any>> = SlotHeader<TData> & SlotRow<TData> & {
27
+ caption: () => any;
28
+ summary: () => any;
29
+ loading: () => any;
30
+ empty: () => any;
31
+ pagination: (props: {
32
+ pagination: PaginationProps;
33
+ }) => any;
34
+ };
@@ -0,0 +1,52 @@
1
+ import { Row } from '../../types';
2
+ import { BodyProps } from './api';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BodyProps>, import("../../types").InferDefaults<BodyProps>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:selected": (value: Row[]) => void;
5
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BodyProps>, import("../../types").InferDefaults<BodyProps>>>> & {
6
+ "onUpdate:selected"?: ((value: Row[]) => any) | undefined;
7
+ }, {
8
+ itemValue: string;
9
+ loading: boolean;
10
+ selected: Row[] | null;
11
+ bodyRows: Row[];
12
+ columnsLength: number;
13
+ }, {}>, Readonly<import("../../types").SlotRowItem<Record<string, string>> & import("../../types").SlotRowItemContent<Record<string, string>> & {
14
+ body: (props: {
15
+ rows: Record<string, string>[];
16
+ }) => any;
17
+ rows: (props: {
18
+ rows: Record<string, string>[];
19
+ }) => any;
20
+ row: (props: {
21
+ row: Record<string, string>;
22
+ }) => any;
23
+ checkbox: (props: {
24
+ row: Record<string, string>;
25
+ }) => any;
26
+ } & {
27
+ loading: () => any;
28
+ empty: () => any;
29
+ }>>;
30
+ export default _default;
31
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
+ type __VLS_TypePropsToRuntimeProps<T> = {
33
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
34
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
+ } : {
36
+ type: import('vue').PropType<T[K]>;
37
+ required: true;
38
+ };
39
+ };
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
+ default: D[K];
43
+ }> : P[K];
44
+ };
45
+ type __VLS_Prettify<T> = {
46
+ [K in keyof T]: T[K];
47
+ } & {};
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,12 @@
1
+ import { InferDefaults, Row } from '../../types';
2
+ export type BodyProps = {
3
+ loading: boolean;
4
+ bodyRows: Row[];
5
+ itemValue: string;
6
+ columnsLength: number;
7
+ selected: Row[] | null;
8
+ };
9
+ export declare const bodyPropDefaults: InferDefaults<BodyProps>;
10
+ export type BodyEmits = {
11
+ (event: 'update:selected', value: Row[]): void;
12
+ };
@@ -0,0 +1,2 @@
1
+ import VueyeBody from './VueyeBody.vue';
2
+ export { VueyeBody };
@@ -0,0 +1,36 @@
1
+ import { DropdownProps } from './api';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
3
+ options: () => never[];
4
+ modelValue: string;
5
+ label: string;
6
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: import("./api").OptionValue) => void;
8
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DropdownProps>, {
9
+ options: () => never[];
10
+ modelValue: string;
11
+ label: string;
12
+ }>>> & {
13
+ "onUpdate:modelValue"?: ((value: import("./api").OptionValue) => any) | undefined;
14
+ }, {
15
+ label: string;
16
+ options: import("./api").Option[];
17
+ modelValue: string | number;
18
+ }, {}>;
19
+ export default _default;
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToRuntimeProps<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
29
+ type __VLS_WithDefaults<P, D> = {
30
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
31
+ default: D[K];
32
+ }> : P[K];
33
+ };
34
+ type __VLS_Prettify<T> = {
35
+ [K in keyof T]: T[K];
36
+ } & {};
@@ -0,0 +1,19 @@
1
+ export type OptionValue = string | number | boolean | object | symbol;
2
+ export interface Option {
3
+ content: OptionValue;
4
+ label: string;
5
+ }
6
+ export type DropdownProps = {
7
+ options: Option[];
8
+ modelValue?: string | number;
9
+ label?: string;
10
+ defaultValue?: Option;
11
+ };
12
+ export declare const dropdownPropsDefaults: {
13
+ options: () => never[];
14
+ modelValue: string;
15
+ label: string;
16
+ };
17
+ export type DropdownEmits = {
18
+ (event: 'update:modelValue', value: OptionValue): void;
19
+ };
@@ -0,0 +1,4 @@
1
+ import type { OptionValue } from './api';
2
+ import VueyeDropdown from './VueyeDropdown.vue';
3
+ export { VueyeDropdown };
4
+ export type { OptionValue };
@@ -0,0 +1,47 @@
1
+ import type { ColumnHeader } from '../../types';
2
+ import { type HeadProps } from './api';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<HeadProps>, import("../../types").InferDefaults<HeadProps>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:select": (value: "all" | "none" | "indeterminate") => void;
5
+ sort: (value: {
6
+ key: any;
7
+ desc: boolean;
8
+ }) => void;
9
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<HeadProps>, import("../../types").InferDefaults<HeadProps>>>> & {
10
+ onSort?: ((value: {
11
+ key: any;
12
+ desc: boolean;
13
+ }) => any) | undefined;
14
+ "onUpdate:select"?: ((value: "all" | "none" | "indeterminate") => any) | undefined;
15
+ }, {
16
+ select: "all" | "none" | "indeterminate";
17
+ columnHeaders: ColumnHeader[][];
18
+ selectable: boolean;
19
+ }, {}>, Readonly<import("../../types").SlotHeaderCell<Record<string, string>> & import("../../types").SlotHeaderCellContent<Record<string, string>> & {
20
+ headers: (props: {
21
+ headers: ColumnHeader<Record<string, unknown>>[][];
22
+ }) => any;
23
+ checkbox: () => any;
24
+ }>>;
25
+ export default _default;
26
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
+ type __VLS_TypePropsToRuntimeProps<T> = {
28
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
+ } : {
31
+ type: import('vue').PropType<T[K]>;
32
+ required: true;
33
+ };
34
+ };
35
+ type __VLS_WithDefaults<P, D> = {
36
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
37
+ default: D[K];
38
+ }> : P[K];
39
+ };
40
+ type __VLS_Prettify<T> = {
41
+ [K in keyof T]: T[K];
42
+ } & {};
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,16 @@
1
+ import { ColumnHeader, InferDefaults } from '../../types';
2
+ type SelectState = 'all' | 'indeterminate' | 'none';
3
+ export type HeadProps = {
4
+ columnHeaders: ColumnHeader[][];
5
+ selectable?: boolean;
6
+ select?: SelectState;
7
+ };
8
+ export declare const headPropDefaults: InferDefaults<HeadProps>;
9
+ export type HeadEmits = {
10
+ (event: 'update:select', value: SelectState): void;
11
+ (event: 'sort', value: {
12
+ key: any;
13
+ desc: boolean;
14
+ }): void;
15
+ };
16
+ export {};
@@ -0,0 +1,31 @@
1
+ import { PaginationProps } from './api';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginationProps>, import("../..").InferDefaults<PaginationProps>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:currentPage": (value: number) => void;
4
+ "update:perPage": (value: number) => void;
5
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginationProps>, import("../..").InferDefaults<PaginationProps>>>> & {
6
+ "onUpdate:currentPage"?: ((value: number) => any) | undefined;
7
+ "onUpdate:perPage"?: ((value: number) => any) | undefined;
8
+ }, {
9
+ perPage: number;
10
+ currentPage: number;
11
+ total: number;
12
+ perPageOptions: number[];
13
+ }, {}>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
24
+ type __VLS_WithDefaults<P, D> = {
25
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
26
+ default: D[K];
27
+ }> : P[K];
28
+ };
29
+ type __VLS_Prettify<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
@@ -0,0 +1,12 @@
1
+ import { InferDefaults } from '../../types';
2
+ export interface PaginationProps {
3
+ perPage: number;
4
+ currentPage: number;
5
+ total: number;
6
+ perPageOptions: number[];
7
+ }
8
+ export declare const paginationPropsDefaults: InferDefaults<PaginationProps>;
9
+ export interface PaginationEmits {
10
+ (event: 'update:currentPage', value: number): void;
11
+ (event: 'update:perPage', value: number): void;
12
+ }
@@ -0,0 +1,3 @@
1
+ import VueyePagination from './VueyePagination.vue';
2
+ export * from './api';
3
+ export { VueyePagination };
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ down: BooleanConstructor;
3
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
4
+ down: BooleanConstructor;
5
+ }>>, {
6
+ down: boolean;
7
+ }, {}>;
8
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;