@codemonster-ru/vueforge 0.81.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.ts.mjs +4634 -4505
- package/dist/index.ts.umd.js +12 -12
- package/dist/package/components/data-table.vue.d.ts +36 -0
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ type Variant = 'filled' | 'outlined';
|
|
|
3
3
|
type Align = 'left' | 'center' | 'right';
|
|
4
4
|
type SortOrder = 'asc' | 'desc' | null;
|
|
5
5
|
type DataTableFilters = Record<string, unknown>;
|
|
6
|
+
type DataTableSelectionMode = 'single' | 'multiple' | null;
|
|
7
|
+
type DataTableRowKey = string | number;
|
|
6
8
|
export interface DataTableColumn {
|
|
7
9
|
field: string;
|
|
8
10
|
header?: string;
|
|
@@ -10,6 +12,7 @@ export interface DataTableColumn {
|
|
|
10
12
|
align?: Align;
|
|
11
13
|
width?: string;
|
|
12
14
|
minWidth?: string;
|
|
15
|
+
sticky?: 'left' | 'right';
|
|
13
16
|
formatter?: (row: Record<string, unknown>, value: unknown, column: DataTableColumn) => string | number;
|
|
14
17
|
}
|
|
15
18
|
export interface DataTableQuery {
|
|
@@ -19,6 +22,11 @@ export interface DataTableQuery {
|
|
|
19
22
|
pageSize: number;
|
|
20
23
|
filters: DataTableFilters;
|
|
21
24
|
}
|
|
25
|
+
export interface DataTableBulkAction {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
22
30
|
interface Props {
|
|
23
31
|
rows?: Array<Record<string, unknown>>;
|
|
24
32
|
columns?: Array<DataTableColumn>;
|
|
@@ -39,6 +47,12 @@ interface Props {
|
|
|
39
47
|
page?: number;
|
|
40
48
|
pageSize?: number;
|
|
41
49
|
filters?: DataTableFilters;
|
|
50
|
+
selectionMode?: DataTableSelectionMode;
|
|
51
|
+
selection?: DataTableRowKey | Array<DataTableRowKey> | null;
|
|
52
|
+
bulkActions?: Array<DataTableBulkAction>;
|
|
53
|
+
selectAllAriaLabel?: string;
|
|
54
|
+
selectRowAriaLabel?: string;
|
|
55
|
+
stickyHeader?: boolean;
|
|
42
56
|
}
|
|
43
57
|
declare function __VLS_template(): {
|
|
44
58
|
attrs: Partial<{}>;
|
|
@@ -52,6 +66,12 @@ declare function __VLS_template(): {
|
|
|
52
66
|
value: unknown;
|
|
53
67
|
index: number;
|
|
54
68
|
}) => any>> & {
|
|
69
|
+
'bulk-actions'?(_: {
|
|
70
|
+
selectedKeys: DataTableRowKey[];
|
|
71
|
+
selectedRows: Record<string, unknown>[];
|
|
72
|
+
clearSelection: () => void;
|
|
73
|
+
applyAction: (value: string) => void;
|
|
74
|
+
}): any;
|
|
55
75
|
loading?(_: {}): any;
|
|
56
76
|
empty?(_: {}): any;
|
|
57
77
|
};
|
|
@@ -65,6 +85,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
65
85
|
setFilters: (value: DataTableFilters) => void;
|
|
66
86
|
clearFilters: () => void;
|
|
67
87
|
getQuery: () => DataTableQuery;
|
|
88
|
+
clearSelection: () => void;
|
|
89
|
+
getSelectedKeys: () => DataTableRowKey[];
|
|
90
|
+
getSelectedRows: () => Record<string, unknown>[];
|
|
91
|
+
applyBulkAction: (value: string) => void;
|
|
68
92
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
69
93
|
sort: (...args: any[]) => void;
|
|
70
94
|
filter: (...args: any[]) => void;
|
|
@@ -76,6 +100,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
76
100
|
"update:pageSize": (...args: any[]) => void;
|
|
77
101
|
"update:filters": (...args: any[]) => void;
|
|
78
102
|
request: (...args: any[]) => void;
|
|
103
|
+
"update:selection": (...args: any[]) => void;
|
|
104
|
+
selectionChange: (...args: any[]) => void;
|
|
105
|
+
bulkAction: (...args: any[]) => void;
|
|
79
106
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
80
107
|
onSort?: ((...args: any[]) => any) | undefined;
|
|
81
108
|
onFilter?: ((...args: any[]) => any) | undefined;
|
|
@@ -87,6 +114,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
87
114
|
"onUpdate:pageSize"?: ((...args: any[]) => any) | undefined;
|
|
88
115
|
"onUpdate:filters"?: ((...args: any[]) => any) | undefined;
|
|
89
116
|
onRequest?: ((...args: any[]) => any) | undefined;
|
|
117
|
+
"onUpdate:selection"?: ((...args: any[]) => any) | undefined;
|
|
118
|
+
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
|
119
|
+
onBulkAction?: ((...args: any[]) => any) | undefined;
|
|
90
120
|
}>, {
|
|
91
121
|
size: Size;
|
|
92
122
|
columns: Array<DataTableColumn>;
|
|
@@ -98,6 +128,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
98
128
|
emptyText: string;
|
|
99
129
|
rows: Array<Record<string, unknown>>;
|
|
100
130
|
pageSize: number;
|
|
131
|
+
stickyHeader: boolean;
|
|
101
132
|
rowKey: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
102
133
|
sortable: boolean;
|
|
103
134
|
sortField: string | null;
|
|
@@ -107,6 +138,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
107
138
|
showHeader: boolean;
|
|
108
139
|
server: boolean;
|
|
109
140
|
filters: DataTableFilters;
|
|
141
|
+
selectionMode: DataTableSelectionMode;
|
|
142
|
+
selection: DataTableRowKey | Array<DataTableRowKey> | null;
|
|
143
|
+
bulkActions: Array<DataTableBulkAction>;
|
|
144
|
+
selectAllAriaLabel: string;
|
|
145
|
+
selectRowAriaLabel: string;
|
|
110
146
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
111
147
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
112
148
|
export default _default;
|