@xn-lib/component 0.1.42 → 0.1.44
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/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/list-card/index.vue.d.ts +35 -13
- package/dist/types/list-card/props.d.ts +8 -0
- package/dist/types/select-panel/index.vue.d.ts +9 -0
- package/dist/types/select-panel/props.d.ts +4 -0
- package/dist/types/table/composables/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/table/composables/useSelectionSync.d.ts +0 -4
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import 'vue-virtual-scroller';
|
|
2
|
-
declare function handleAddClick(): void;
|
|
3
2
|
declare var __VLS_1: {}, __VLS_3: {}, __VLS_37: {
|
|
4
3
|
item: any;
|
|
5
4
|
index: any;
|
|
6
5
|
selected: boolean;
|
|
7
|
-
},
|
|
6
|
+
}, __VLS_47: {
|
|
8
7
|
item: any;
|
|
9
8
|
index: any;
|
|
10
|
-
},
|
|
9
|
+
}, __VLS_69: {
|
|
11
10
|
item: any;
|
|
12
11
|
index: number;
|
|
13
12
|
selected: boolean;
|
|
14
|
-
},
|
|
13
|
+
}, __VLS_71: {
|
|
15
14
|
item: any;
|
|
16
15
|
index: number;
|
|
17
|
-
},
|
|
18
|
-
add: typeof handleAddClick;
|
|
19
|
-
};
|
|
16
|
+
}, __VLS_84: {}, __VLS_94: {};
|
|
20
17
|
type __VLS_Slots = {} & {
|
|
21
18
|
title?: (props: typeof __VLS_1) => any;
|
|
22
19
|
} & {
|
|
@@ -24,15 +21,15 @@ type __VLS_Slots = {} & {
|
|
|
24
21
|
} & {
|
|
25
22
|
item?: (props: typeof __VLS_37) => any;
|
|
26
23
|
} & {
|
|
27
|
-
'item-actions'?: (props: typeof
|
|
24
|
+
'item-actions'?: (props: typeof __VLS_47) => any;
|
|
28
25
|
} & {
|
|
29
|
-
item?: (props: typeof
|
|
26
|
+
item?: (props: typeof __VLS_69) => any;
|
|
30
27
|
} & {
|
|
31
|
-
'item-actions'?: (props: typeof
|
|
28
|
+
'item-actions'?: (props: typeof __VLS_71) => any;
|
|
32
29
|
} & {
|
|
33
|
-
empty?: (props: typeof
|
|
30
|
+
empty?: (props: typeof __VLS_84) => any;
|
|
34
31
|
} & {
|
|
35
|
-
footer?: (props: typeof
|
|
32
|
+
footer?: (props: typeof __VLS_94) => any;
|
|
36
33
|
};
|
|
37
34
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
38
35
|
readonly title: {
|
|
@@ -103,6 +100,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
103
100
|
readonly type: import("vue").PropType<string | number>;
|
|
104
101
|
readonly default: undefined;
|
|
105
102
|
};
|
|
103
|
+
readonly selectable: {
|
|
104
|
+
readonly type: BooleanConstructor;
|
|
105
|
+
readonly default: false;
|
|
106
|
+
};
|
|
107
|
+
readonly getSelectable: {
|
|
108
|
+
readonly type: import("vue").PropType<(item: any) => boolean>;
|
|
109
|
+
readonly default: () => () => boolean;
|
|
110
|
+
};
|
|
106
111
|
readonly showHeader: {
|
|
107
112
|
readonly type: BooleanConstructor;
|
|
108
113
|
readonly default: true;
|
|
@@ -119,13 +124,18 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
119
124
|
refresh(): Promise<void>;
|
|
120
125
|
loadMore(): Promise<void>;
|
|
121
126
|
clearSearch(): void;
|
|
122
|
-
getSelectedValue():
|
|
127
|
+
getSelectedValue(): string | number | undefined;
|
|
128
|
+
clearSelection(): void;
|
|
129
|
+
getSelections(): (string | number)[];
|
|
130
|
+
clearSelections(): void;
|
|
123
131
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
124
132
|
search: (keyword: string) => any;
|
|
125
133
|
select: (value: any, index: number, item: any) => any;
|
|
126
134
|
"update:modelValue": (value: any) => any;
|
|
127
135
|
add: () => any;
|
|
128
136
|
"scroll-bottom": () => any;
|
|
137
|
+
"handle-selections-change": (selections: (string | number)[]) => any;
|
|
138
|
+
"handle-all-selections-change": (selections: (string | number)[], checked: boolean) => any;
|
|
129
139
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
130
140
|
readonly title: {
|
|
131
141
|
readonly type: StringConstructor;
|
|
@@ -195,6 +205,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
195
205
|
readonly type: import("vue").PropType<string | number>;
|
|
196
206
|
readonly default: undefined;
|
|
197
207
|
};
|
|
208
|
+
readonly selectable: {
|
|
209
|
+
readonly type: BooleanConstructor;
|
|
210
|
+
readonly default: false;
|
|
211
|
+
};
|
|
212
|
+
readonly getSelectable: {
|
|
213
|
+
readonly type: import("vue").PropType<(item: any) => boolean>;
|
|
214
|
+
readonly default: () => () => boolean;
|
|
215
|
+
};
|
|
198
216
|
readonly showHeader: {
|
|
199
217
|
readonly type: BooleanConstructor;
|
|
200
218
|
readonly default: true;
|
|
@@ -213,6 +231,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
213
231
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
214
232
|
onAdd?: (() => any) | undefined;
|
|
215
233
|
"onScroll-bottom"?: (() => any) | undefined;
|
|
234
|
+
"onHandle-selections-change"?: ((selections: (string | number)[]) => any) | undefined;
|
|
235
|
+
"onHandle-all-selections-change"?: ((selections: (string | number)[], checked: boolean) => any) | undefined;
|
|
216
236
|
}>, {
|
|
217
237
|
readonly data: any[];
|
|
218
238
|
readonly title: string;
|
|
@@ -226,6 +246,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
226
246
|
readonly itemHeight: number;
|
|
227
247
|
readonly immediate: boolean;
|
|
228
248
|
readonly pageSize: number;
|
|
249
|
+
readonly selectable: boolean;
|
|
229
250
|
readonly showSearch: boolean;
|
|
230
251
|
readonly searchKey: string;
|
|
231
252
|
readonly searchPlaceholder: string;
|
|
@@ -234,6 +255,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
234
255
|
readonly idKey: string;
|
|
235
256
|
readonly nameKey: string;
|
|
236
257
|
readonly addText: string;
|
|
258
|
+
readonly getSelectable: (item: any) => boolean;
|
|
237
259
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
238
260
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
239
261
|
declare const _default: typeof __VLS_export;
|
|
@@ -72,6 +72,14 @@ export declare const listCardProps: {
|
|
|
72
72
|
readonly type: PropType<string | number>;
|
|
73
73
|
readonly default: undefined;
|
|
74
74
|
};
|
|
75
|
+
readonly selectable: {
|
|
76
|
+
readonly type: BooleanConstructor;
|
|
77
|
+
readonly default: false;
|
|
78
|
+
};
|
|
79
|
+
readonly getSelectable: {
|
|
80
|
+
readonly type: PropType<(item: any) => boolean>;
|
|
81
|
+
readonly default: () => () => boolean;
|
|
82
|
+
};
|
|
75
83
|
readonly showHeader: {
|
|
76
84
|
readonly type: BooleanConstructor;
|
|
77
85
|
readonly default: true;
|
|
@@ -19,6 +19,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
19
19
|
readonly type: BooleanConstructor;
|
|
20
20
|
readonly default: true;
|
|
21
21
|
};
|
|
22
|
+
readonly showRemove: {
|
|
23
|
+
readonly type: import("vue").PropType<boolean | ((item: any, index: number) => boolean)>;
|
|
24
|
+
readonly default: true;
|
|
25
|
+
};
|
|
22
26
|
readonly showRefresh: {
|
|
23
27
|
readonly type: BooleanConstructor;
|
|
24
28
|
readonly default: false;
|
|
@@ -62,6 +66,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
62
66
|
readonly type: BooleanConstructor;
|
|
63
67
|
readonly default: true;
|
|
64
68
|
};
|
|
69
|
+
readonly showRemove: {
|
|
70
|
+
readonly type: import("vue").PropType<boolean | ((item: any, index: number) => boolean)>;
|
|
71
|
+
readonly default: true;
|
|
72
|
+
};
|
|
65
73
|
readonly showRefresh: {
|
|
66
74
|
readonly type: BooleanConstructor;
|
|
67
75
|
readonly default: false;
|
|
@@ -93,6 +101,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
93
101
|
readonly max: number;
|
|
94
102
|
readonly itemLabel: string | ((item: any) => string);
|
|
95
103
|
readonly showClear: boolean;
|
|
104
|
+
readonly showRemove: boolean | ((item: any, index: number) => boolean);
|
|
96
105
|
readonly showRefresh: boolean;
|
|
97
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
107
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,6 +20,10 @@ export declare const selectPanelProps: {
|
|
|
20
20
|
readonly type: BooleanConstructor;
|
|
21
21
|
readonly default: true;
|
|
22
22
|
};
|
|
23
|
+
readonly showRemove: {
|
|
24
|
+
readonly type: PropType<boolean | ((item: any, index: number) => boolean)>;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
23
27
|
readonly showRefresh: {
|
|
24
28
|
readonly type: BooleanConstructor;
|
|
25
29
|
readonly default: false;
|
|
@@ -8,5 +8,4 @@ export { useRequest } from './useRequest';
|
|
|
8
8
|
export { useFilter } from './useFilter';
|
|
9
9
|
export { useModal } from './useModal';
|
|
10
10
|
export { useAutoHeight } from './useAutoHeight';
|
|
11
|
-
export { useSelectionSync } from './useSelectionSync';
|
|
12
11
|
export { useModalHandlers } from './useModalHandlers';
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
export declare function useSelectionSync(selectedKeys: Ref<Set<any>>, selectedRows: Ref<any[]>, selectionType: Ref<string>, selectionConfig: Ref<{
|
|
3
|
-
reserve?: boolean;
|
|
4
|
-
}>, displayData: Ref<any[]>, getRowKey: (row: any) => any, setSelection: (keys: any[], rows?: any[]) => void, propsSelectedKeys: Ref<any[] | undefined>, propsSelectedRows: Ref<any[] | undefined>, emitUpdateKeys: (keys: any[]) => void, emitUpdateRows: (rows: any[]) => void, tableMainRef: Ref<any>): void;
|