vueye-table 2.0.0-alpha.10 → 2.0.0-alpha.13
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/dist/components/core/VueyeTable/VueyeTable.vue.d.ts +113 -16
- package/dist/components/core/VueyeTable/api.d.ts +24 -4
- package/dist/components/core/VueyeTable/components/VueyeBody/VueyeBody.vue.d.ts +44 -40
- package/dist/components/core/VueyeTable/components/VueyeBody/api.d.ts +6 -0
- package/dist/components/core/VueyeTable/components/VueyeDropdown/VueyeDropdown.vue.d.ts +36 -0
- package/dist/components/core/VueyeTable/components/VueyeDropdown/api.d.ts +3 -4
- package/dist/components/core/VueyeTable/components/VueyeHead/VueyeHead.vue.d.ts +39 -14
- package/dist/components/core/VueyeTable/components/VueyeHead/api.d.ts +16 -0
- package/dist/components/core/VueyeTable/components/VueyePagination/VueyePagination.vue.d.ts +20 -45
- package/dist/components/core/VueyeTable/components/VueyePagination/api.d.ts +1 -1
- package/dist/components/core/VueyeTable/components/VueyePagination/index.d.ts +1 -0
- package/dist/components/core/VueyeTable/components/icons/ArrowUpDownIcon.vue.d.ts +8 -0
- package/dist/components/core/VueyeTable/components/icons/ChevronDownIcon.vue.d.ts +2 -0
- package/dist/components/core/VueyeTable/components/icons/ChevronLeftIcon.vue.d.ts +2 -0
- package/dist/components/core/VueyeTable/components/icons/ChevronRightIcon.vue.d.ts +2 -0
- package/dist/components/core/VueyeTable/components/icons/DoubleChevronLeftIcon.vue.d.ts +2 -0
- package/dist/components/core/VueyeTable/components/icons/DoubleChevronRightIcon.vue.d.ts +2 -0
- package/dist/components/core/VueyeTable/components/utils/VueyeCheckbox.vue.d.ts +23 -0
- package/dist/components/core/VueyeTable/composables/index.d.ts +1 -0
- package/dist/components/core/VueyeTable/composables/useBodyRows.d.ts +17 -0
- package/dist/components/core/VueyeTable/composables/usePagination.d.ts +5 -4
- package/dist/components/core/VueyeTable/index.d.ts +1 -0
- package/dist/components/core/VueyeTable/types/Column.d.ts +15 -40
- package/dist/components/core/VueyeTable/types/Row.d.ts +25 -0
- package/dist/components/core/VueyeTable/types/Utils.d.ts +13 -4
- package/dist/components/core/VueyeTable/utils/body.d.ts +6 -4
- package/dist/components/core/VueyeTable/utils/header.d.ts +1 -1
- package/dist/default.css +1 -0
- package/dist/vueye-table.js +782 -320
- package/dist/vueye-table.umd.cjs +1 -1
- package/package.json +9 -5
- package/dist/style.css +0 -1
|
@@ -1,42 +1,105 @@
|
|
|
1
|
+
import { VueyeTableEmits } from './api';
|
|
1
2
|
import type { ColumnHeader } from './types';
|
|
2
|
-
declare const _default: <TData extends Record<string, unknown>, TColumn extends ColumnHeader>(__VLS_props: {
|
|
3
|
+
declare const _default: <TData extends Record<string, unknown> = Record<string, unknown>, TColumn extends ColumnHeader<TData> = ColumnHeader<TData>>(__VLS_props: {
|
|
3
4
|
caption?: string | undefined;
|
|
4
5
|
data: TData[];
|
|
5
6
|
summary?: string | undefined;
|
|
6
|
-
columnHeaders?: TColumn[] | undefined;
|
|
7
|
-
itemValue?: string | undefined;
|
|
8
7
|
perPage?: number | undefined;
|
|
9
8
|
currentPage?: number | undefined;
|
|
10
9
|
perPageOptions?: number[] | undefined;
|
|
10
|
+
columnHeaders?: TColumn[] | undefined;
|
|
11
|
+
itemValue?: string | undefined;
|
|
11
12
|
loading?: boolean | undefined;
|
|
12
|
-
|
|
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;
|
|
13
22
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
14
23
|
attrs: any;
|
|
15
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
|
+
} & {
|
|
16
43
|
caption: () => any;
|
|
17
44
|
summary: () => any;
|
|
45
|
+
loading: () => any;
|
|
46
|
+
empty: () => any;
|
|
47
|
+
pagination: (props: {
|
|
48
|
+
pagination: import("./components").PaginationProps;
|
|
49
|
+
}) => any;
|
|
18
50
|
}>;
|
|
19
|
-
emit:
|
|
20
|
-
} | undefined, __VLS_expose?: ((exposed: {}) => void) | undefined, __VLS_setup?: Promise<{
|
|
51
|
+
emit: VueyeTableEmits<TData>;
|
|
52
|
+
} | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
21
53
|
props: {
|
|
22
54
|
caption?: string | undefined;
|
|
23
55
|
data: TData[];
|
|
24
56
|
summary?: string | undefined;
|
|
25
|
-
columnHeaders?: TColumn[] | undefined;
|
|
26
|
-
itemValue?: string | undefined;
|
|
27
57
|
perPage?: number | undefined;
|
|
28
58
|
currentPage?: number | undefined;
|
|
29
59
|
perPageOptions?: number[] | undefined;
|
|
60
|
+
columnHeaders?: TColumn[] | undefined;
|
|
61
|
+
itemValue?: string | undefined;
|
|
30
62
|
loading?: boolean | undefined;
|
|
31
|
-
|
|
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;
|
|
32
72
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
33
|
-
expose(exposed: {}): void;
|
|
73
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
34
74
|
attrs: any;
|
|
35
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
|
+
} & {
|
|
36
94
|
caption: () => any;
|
|
37
95
|
summary: () => any;
|
|
96
|
+
loading: () => any;
|
|
97
|
+
empty: () => any;
|
|
98
|
+
pagination: (props: {
|
|
99
|
+
pagination: import("./components").PaginationProps;
|
|
100
|
+
}) => any;
|
|
38
101
|
}>;
|
|
39
|
-
emit:
|
|
102
|
+
emit: VueyeTableEmits<TData>;
|
|
40
103
|
}>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
41
104
|
[key: string]: any;
|
|
42
105
|
}> & {
|
|
@@ -45,21 +108,55 @@ declare const _default: <TData extends Record<string, unknown>, TColumn extends
|
|
|
45
108
|
caption?: string | undefined;
|
|
46
109
|
data: TData[];
|
|
47
110
|
summary?: string | undefined;
|
|
48
|
-
columnHeaders?: TColumn[] | undefined;
|
|
49
|
-
itemValue?: string | undefined;
|
|
50
111
|
perPage?: number | undefined;
|
|
51
112
|
currentPage?: number | undefined;
|
|
52
113
|
perPageOptions?: number[] | undefined;
|
|
114
|
+
columnHeaders?: TColumn[] | undefined;
|
|
115
|
+
itemValue?: string | undefined;
|
|
53
116
|
loading?: boolean | undefined;
|
|
54
|
-
|
|
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;
|
|
55
126
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
56
|
-
expose(exposed: {}): void;
|
|
127
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
57
128
|
attrs: any;
|
|
58
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
|
+
} & {
|
|
59
148
|
caption: () => any;
|
|
60
149
|
summary: () => any;
|
|
150
|
+
loading: () => any;
|
|
151
|
+
empty: () => any;
|
|
152
|
+
pagination: (props: {
|
|
153
|
+
pagination: import("./components").PaginationProps;
|
|
154
|
+
}) => any;
|
|
61
155
|
}>;
|
|
62
|
-
emit:
|
|
156
|
+
emit: VueyeTableEmits<TData>;
|
|
63
157
|
} | undefined;
|
|
64
158
|
};
|
|
65
159
|
export default _default;
|
|
160
|
+
type __VLS_Prettify<T> = {
|
|
161
|
+
[K in keyof T]: T[K];
|
|
162
|
+
} & {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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>> = {
|
|
3
6
|
data: TData[];
|
|
4
7
|
columnHeaders?: TColumn[];
|
|
5
8
|
itemValue?: string;
|
|
@@ -7,8 +10,25 @@ export type VueyeTableProps<TColumn = any, TData = any> = {
|
|
|
7
10
|
currentPage?: number;
|
|
8
11
|
perPageOptions?: number[];
|
|
9
12
|
loading?: boolean;
|
|
10
|
-
|
|
13
|
+
selected?: TData[] | Row[] | null;
|
|
14
|
+
selectMode?: 'page' | 'all';
|
|
11
15
|
caption?: string;
|
|
12
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;
|
|
13
34
|
};
|
|
14
|
-
export declare const VueyeTablePropsDefaults: InferDefaults<VueyeTableProps>;
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
+
import { Row } from '../../types';
|
|
1
2
|
import { BodyProps } from './api';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
loading: {
|
|
9
|
-
type: globalThis.PropType<boolean>;
|
|
10
|
-
required: true;
|
|
11
|
-
default: (boolean | ((props: BodyProps) => boolean)) | undefined;
|
|
12
|
-
};
|
|
13
|
-
bodyRows: {
|
|
14
|
-
type: globalThis.PropType<import("../..").Row[]>;
|
|
15
|
-
required: true;
|
|
16
|
-
default: ((props: BodyProps) => import("../..").Row[]) | undefined;
|
|
17
|
-
};
|
|
18
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
|
|
19
|
-
itemValue: {
|
|
20
|
-
type: globalThis.PropType<string>;
|
|
21
|
-
required: true;
|
|
22
|
-
default: (string | ((props: BodyProps) => string)) | undefined;
|
|
23
|
-
};
|
|
24
|
-
loading: {
|
|
25
|
-
type: globalThis.PropType<boolean>;
|
|
26
|
-
required: true;
|
|
27
|
-
default: (boolean | ((props: BodyProps) => boolean)) | undefined;
|
|
28
|
-
};
|
|
29
|
-
bodyRows: {
|
|
30
|
-
type: globalThis.PropType<import("../..").Row[]>;
|
|
31
|
-
required: true;
|
|
32
|
-
default: ((props: BodyProps) => import("../..").Row[]) | undefined;
|
|
33
|
-
};
|
|
34
|
-
}>>, {
|
|
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
|
+
}, {
|
|
35
8
|
itemValue: string;
|
|
36
9
|
loading: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
10
|
+
selected: Row[] | null;
|
|
11
|
+
bodyRows: Row[];
|
|
12
|
+
notListedKeys: string[];
|
|
13
|
+
columnsLength: number;
|
|
14
|
+
}, {}>, Readonly<import("../../types").SlotRowItem<Record<string, string>> & import("../../types").SlotRowItemContent<Record<string, string>> & {
|
|
15
|
+
body: (props: {
|
|
16
|
+
rows: Record<string, string>[];
|
|
17
|
+
}) => any;
|
|
18
|
+
rows: (props: {
|
|
19
|
+
rows: Record<string, string>[];
|
|
20
|
+
}) => any;
|
|
21
|
+
row: (props: {
|
|
22
|
+
row: Record<string, string>;
|
|
23
|
+
}) => any;
|
|
24
|
+
checkbox: (props: {
|
|
25
|
+
row: Record<string, string>;
|
|
26
|
+
}) => any;
|
|
27
|
+
} & {
|
|
28
|
+
loading: () => any;
|
|
29
|
+
empty: () => any;
|
|
30
|
+
}>>;
|
|
44
31
|
export default _default;
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type __VLS_WithDefaults<P, D> = {
|
|
42
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
|
+
default: D[K];
|
|
44
|
+
}> : P[K];
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
45
49
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
50
|
new (): {
|
|
47
51
|
$slots: S;
|
|
@@ -2,6 +2,12 @@ import { InferDefaults, Row } from '../../types';
|
|
|
2
2
|
export type BodyProps = {
|
|
3
3
|
loading: boolean;
|
|
4
4
|
bodyRows: Row[];
|
|
5
|
+
notListedKeys: string[];
|
|
5
6
|
itemValue: string;
|
|
7
|
+
columnsLength: number;
|
|
8
|
+
selected: Row[] | null;
|
|
6
9
|
};
|
|
7
10
|
export declare const bodyPropDefaults: InferDefaults<BodyProps>;
|
|
11
|
+
export type BodyEmits = {
|
|
12
|
+
(event: 'update:selected', value: Row[]): void;
|
|
13
|
+
};
|
|
@@ -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
|
+
} & {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type OptionValue = string | number | boolean | object | symbol;
|
|
2
|
-
interface Option {
|
|
2
|
+
export interface Option {
|
|
3
3
|
content: OptionValue;
|
|
4
4
|
label: string;
|
|
5
5
|
}
|
|
6
6
|
export type DropdownProps = {
|
|
7
7
|
options: Option[];
|
|
8
|
-
modelValue
|
|
9
|
-
label
|
|
8
|
+
modelValue?: string | number;
|
|
9
|
+
label?: string;
|
|
10
10
|
defaultValue?: Option;
|
|
11
11
|
};
|
|
12
12
|
export declare const dropdownPropsDefaults: {
|
|
@@ -17,4 +17,3 @@ export declare const dropdownPropsDefaults: {
|
|
|
17
17
|
export type DropdownEmits = {
|
|
18
18
|
(event: 'update:modelValue', value: OptionValue): void;
|
|
19
19
|
};
|
|
20
|
-
export {};
|
|
@@ -1,20 +1,45 @@
|
|
|
1
1
|
import type { ColumnHeader } from '../../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
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";
|
|
15
17
|
columnHeaders: ColumnHeader[][];
|
|
16
|
-
|
|
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
|
+
}>>;
|
|
17
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
|
+
} & {};
|
|
18
43
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
44
|
new (): {
|
|
20
45
|
$slots: S;
|
|
@@ -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 {};
|
|
@@ -1,56 +1,31 @@
|
|
|
1
1
|
import { PaginationProps } from './api';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
perPage: {
|
|
4
|
-
type: globalThis.PropType<number>;
|
|
5
|
-
required: true;
|
|
6
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
7
|
-
};
|
|
8
|
-
currentPage: {
|
|
9
|
-
type: globalThis.PropType<number>;
|
|
10
|
-
required: true;
|
|
11
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
12
|
-
};
|
|
13
|
-
perPageOptions: {
|
|
14
|
-
type: globalThis.PropType<number[]>;
|
|
15
|
-
required: true;
|
|
16
|
-
default: ((props: PaginationProps) => number[]) | undefined;
|
|
17
|
-
};
|
|
18
|
-
total: {
|
|
19
|
-
type: globalThis.PropType<number>;
|
|
20
|
-
required: true;
|
|
21
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
22
|
-
};
|
|
23
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginationProps>, import("../..").InferDefaults<PaginationProps>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
3
|
"update:currentPage": (value: number) => void;
|
|
25
4
|
"update:perPage": (value: number) => void;
|
|
26
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
|
|
27
|
-
perPage: {
|
|
28
|
-
type: globalThis.PropType<number>;
|
|
29
|
-
required: true;
|
|
30
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
31
|
-
};
|
|
32
|
-
currentPage: {
|
|
33
|
-
type: globalThis.PropType<number>;
|
|
34
|
-
required: true;
|
|
35
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
36
|
-
};
|
|
37
|
-
perPageOptions: {
|
|
38
|
-
type: globalThis.PropType<number[]>;
|
|
39
|
-
required: true;
|
|
40
|
-
default: ((props: PaginationProps) => number[]) | undefined;
|
|
41
|
-
};
|
|
42
|
-
total: {
|
|
43
|
-
type: globalThis.PropType<number>;
|
|
44
|
-
required: true;
|
|
45
|
-
default: (number | ((props: PaginationProps) => number)) | undefined;
|
|
46
|
-
};
|
|
47
|
-
}>> & {
|
|
5
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PaginationProps>, import("../..").InferDefaults<PaginationProps>>>> & {
|
|
48
6
|
"onUpdate:currentPage"?: ((value: number) => any) | undefined;
|
|
49
7
|
"onUpdate:perPage"?: ((value: number) => any) | undefined;
|
|
50
8
|
}, {
|
|
51
9
|
perPage: number;
|
|
52
10
|
currentPage: number;
|
|
53
|
-
perPageOptions: number[];
|
|
54
11
|
total: number;
|
|
12
|
+
perPageOptions: number[];
|
|
55
13
|
}, {}>;
|
|
56
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
|
+
} & {};
|
|
@@ -5,8 +5,8 @@ export interface PaginationProps {
|
|
|
5
5
|
total: number;
|
|
6
6
|
perPageOptions: number[];
|
|
7
7
|
}
|
|
8
|
+
export declare const paginationPropsDefaults: InferDefaults<PaginationProps>;
|
|
8
9
|
export interface PaginationEmits {
|
|
9
10
|
(event: 'update:currentPage', value: number): void;
|
|
10
11
|
(event: 'update:perPage', value: number): void;
|
|
11
12
|
}
|
|
12
|
-
export declare const paginationPropsDefaults: InferDefaults<PaginationProps>;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
checked: BooleanConstructor;
|
|
3
|
+
id: StringConstructor;
|
|
4
|
+
label: StringConstructor;
|
|
5
|
+
indeterminate: BooleanConstructor;
|
|
6
|
+
modelValue: (BooleanConstructor | ArrayConstructor)[];
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
change: (...args: any[]) => void;
|
|
10
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
|
|
11
|
+
checked: BooleanConstructor;
|
|
12
|
+
id: StringConstructor;
|
|
13
|
+
label: StringConstructor;
|
|
14
|
+
indeterminate: BooleanConstructor;
|
|
15
|
+
modelValue: (BooleanConstructor | ArrayConstructor)[];
|
|
16
|
+
}>> & {
|
|
17
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
checked: boolean;
|
|
21
|
+
indeterminate: boolean;
|
|
22
|
+
}, {}>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColumnHeader, FlattenObject } from '../types';
|
|
2
|
+
import { MaybeRef } from 'vue';
|
|
3
|
+
import { VueyeTableProps } from '../api';
|
|
4
|
+
interface PaginationProps {
|
|
5
|
+
perPage: number;
|
|
6
|
+
currentPage: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function useBodyRows<TData extends Record<string, unknown>, TColumn extends ColumnHeader<TData>>(props: VueyeTableProps<TData, TColumn>, headers: MaybeRef<ColumnHeader[]>, pagination: MaybeRef<PaginationProps>): {
|
|
9
|
+
bodyRows: globalThis.ComputedRef<FlattenObject<TData>[]>;
|
|
10
|
+
notListedKeys: globalThis.ComputedRef<string[]>;
|
|
11
|
+
rowsCount: globalThis.ComputedRef<number>;
|
|
12
|
+
onSort: ({ key, desc }: {
|
|
13
|
+
key: keyof FlattenObject<TData>;
|
|
14
|
+
desc: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PaginationEmits } from '../components';
|
|
2
|
+
export declare function usePagination(props: {
|
|
3
|
+
perPage?: number | undefined;
|
|
4
|
+
currentPage?: number | undefined;
|
|
5
|
+
} | undefined, emit: PaginationEmits): {
|
|
5
6
|
pagination: globalThis.Ref<{
|
|
6
7
|
perPage: number;
|
|
7
8
|
currentPage: number;
|