@honed/table 0.7.1 → 0.8.1
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.d.ts +145 -182
- package/dist/index.es.js +459 -467
- package/dist/index.umd.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,67 +1,70 @@
|
|
|
1
1
|
import { BindingOptions } from '@honed/refine';
|
|
2
|
-
import {
|
|
2
|
+
import { BulkOperation } from '@honed/action';
|
|
3
3
|
import { BulkSelection } from '@honed/action';
|
|
4
|
-
import { Config as Config_2 } from '@honed/refine';
|
|
5
|
-
import { Confirm } from '@honed/action';
|
|
6
4
|
import { Direction } from '@honed/refine';
|
|
7
5
|
import { Filter } from '@honed/refine';
|
|
8
6
|
import { FilterValue } from '@honed/refine';
|
|
9
|
-
import {
|
|
7
|
+
import { InlineOperation } from '@honed/action';
|
|
8
|
+
import { MaybeEndpoint } from '@honed/action';
|
|
9
|
+
import { MaybeId } from '@honed/action';
|
|
10
10
|
import { Option as Option_2 } from '@honed/refine';
|
|
11
|
-
import {
|
|
11
|
+
import { PageOperation } from '@honed/action';
|
|
12
|
+
import { PageOperationData } from '@honed/action';
|
|
12
13
|
import { PromisifyFn } from '@vueuse/shared';
|
|
13
14
|
import { Refine } from '@honed/refine';
|
|
14
|
-
import { Route } from '@honed/action';
|
|
15
15
|
import { Search } from '@honed/refine';
|
|
16
16
|
import { Sort } from '@honed/refine';
|
|
17
17
|
import { Visit } from '@inertiajs/core';
|
|
18
18
|
import { VisitCallbacks } from '@inertiajs/core';
|
|
19
19
|
import { VisitOptions } from '@inertiajs/core';
|
|
20
20
|
|
|
21
|
-
export declare
|
|
22
|
-
[K in keyof RecordType]: {
|
|
23
|
-
value: RecordType[K];
|
|
24
|
-
extra: Record<string, any>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export declare interface CollectionPaginator {
|
|
29
|
-
empty: boolean;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export declare interface Column<T extends Record<string, any> = Record<string, any>> {
|
|
21
|
+
export declare interface BaseColumn<T extends Record<string, any> = Record<string, any>> {
|
|
33
22
|
name: keyof T;
|
|
34
23
|
label: string;
|
|
35
|
-
type
|
|
24
|
+
type?: ColumnType;
|
|
36
25
|
hidden: boolean;
|
|
37
26
|
active: boolean;
|
|
27
|
+
badge?: boolean;
|
|
38
28
|
toggleable: boolean;
|
|
39
|
-
icon?: string;
|
|
40
29
|
class?: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
next: string | null;
|
|
45
|
-
};
|
|
30
|
+
record_class?: string;
|
|
31
|
+
icon?: string;
|
|
32
|
+
sort?: Pick<Sort, "active" | "direction" | "next">;
|
|
46
33
|
}
|
|
47
34
|
|
|
48
|
-
export declare interface
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
export declare interface CollectionPaginate {
|
|
36
|
+
empty: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare interface Column<T extends Record<string, any> = Record<string, any>> extends BaseColumn<T> {
|
|
40
|
+
toggle: (options: VisitOptions) => void;
|
|
54
41
|
}
|
|
55
42
|
|
|
56
|
-
export declare
|
|
43
|
+
export declare type ColumnType = "array" | "badge" | "boolean" | "color" | "date" | "datetime" | "icon" | "image" | "numeric" | "text" | "time" | string;
|
|
44
|
+
|
|
45
|
+
export declare interface CursorPaginate extends CollectionPaginate {
|
|
57
46
|
prevLink: string | null;
|
|
58
47
|
nextLink: string | null;
|
|
59
48
|
perPage: number;
|
|
60
49
|
}
|
|
61
50
|
|
|
51
|
+
export declare interface EmptyState {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
icon?: string;
|
|
55
|
+
operations: PageOperation[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare interface Heading<T extends Record<string, any> = Record<string, any>> extends BaseColumn<T> {
|
|
59
|
+
isSorting: boolean;
|
|
60
|
+
toggleSort: (options: VisitOptions) => void;
|
|
61
|
+
}
|
|
62
|
+
|
|
62
63
|
export declare type Identifier = string | number;
|
|
63
64
|
|
|
64
|
-
export declare
|
|
65
|
+
export declare function is(column: Column | string | null | undefined, type: ColumnType): boolean;
|
|
66
|
+
|
|
67
|
+
export declare interface LengthAwarePaginate extends SimplePaginate {
|
|
65
68
|
total: number;
|
|
66
69
|
from: number;
|
|
67
70
|
to: number;
|
|
@@ -70,7 +73,19 @@ export declare interface LengthAwarePaginator extends SimplePaginator {
|
|
|
70
73
|
links: PaginatorLink[];
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
export declare
|
|
76
|
+
export declare interface PageOption {
|
|
77
|
+
value: number;
|
|
78
|
+
active: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare type Paginate = "cursor" | "length-aware" | "simple" | "collection";
|
|
82
|
+
|
|
83
|
+
export declare type PaginateMap = {
|
|
84
|
+
cursor: CursorPaginate;
|
|
85
|
+
"length-aware": LengthAwarePaginate;
|
|
86
|
+
simple: SimplePaginate;
|
|
87
|
+
collection: CollectionPaginate;
|
|
88
|
+
};
|
|
74
89
|
|
|
75
90
|
export declare interface PaginatorLink {
|
|
76
91
|
url: string | null;
|
|
@@ -78,53 +93,54 @@ export declare interface PaginatorLink {
|
|
|
78
93
|
active: boolean;
|
|
79
94
|
}
|
|
80
95
|
|
|
81
|
-
export declare interface
|
|
82
|
-
value: number;
|
|
83
|
-
active: boolean;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export declare interface SimplePaginator extends CursorPaginator {
|
|
96
|
+
export declare interface SimplePaginate extends CursorPaginate {
|
|
87
97
|
currentPage: number;
|
|
88
98
|
}
|
|
89
99
|
|
|
90
|
-
export declare interface Table<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
export declare interface Table<T extends Record<string, any> = Record<string, any>, K extends Paginate = "length-aware"> extends Refine {
|
|
101
|
+
id: MaybeId;
|
|
102
|
+
endpoint: MaybeEndpoint;
|
|
103
|
+
key: string;
|
|
104
|
+
column?: string;
|
|
105
|
+
record?: string;
|
|
106
|
+
page?: string;
|
|
107
|
+
records: Array<TableEntry<T> & {
|
|
108
|
+
operations: InlineOperation[];
|
|
95
109
|
}>;
|
|
96
|
-
|
|
97
|
-
columns
|
|
98
|
-
|
|
110
|
+
paginate: PaginateMap[K];
|
|
111
|
+
columns: BaseColumn<T>[];
|
|
112
|
+
pages: PageOption[];
|
|
99
113
|
toggleable: boolean;
|
|
100
|
-
|
|
114
|
+
operations: {
|
|
101
115
|
inline: boolean;
|
|
102
|
-
bulk:
|
|
103
|
-
page:
|
|
116
|
+
bulk: BulkOperation[];
|
|
117
|
+
page: PageOperation[];
|
|
104
118
|
};
|
|
119
|
+
emptyState?: EmptyState;
|
|
120
|
+
views?: View[];
|
|
105
121
|
meta: Record<string, any>;
|
|
106
122
|
}
|
|
107
123
|
|
|
108
|
-
export declare
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
124
|
+
export declare type TableEntry<RecordType extends Record<string, any> = any> = {
|
|
125
|
+
[K in keyof RecordType]: {
|
|
126
|
+
v: RecordType[K];
|
|
127
|
+
e: any;
|
|
128
|
+
c: string | null;
|
|
129
|
+
f: boolean;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
116
132
|
|
|
117
|
-
export declare interface TableOptions<RecordType extends Record<string, any> = Record<string, any>> {
|
|
133
|
+
export declare interface TableOptions<RecordType extends Record<string, any> = Record<string, any>> extends VisitOptions {
|
|
118
134
|
/**
|
|
119
|
-
*
|
|
135
|
+
* Mappings of operations to be applied on a record in JavaScript.
|
|
120
136
|
*/
|
|
121
|
-
|
|
137
|
+
recordOperations?: Record<string, (record: TableEntry<RecordType>) => void>;
|
|
122
138
|
}
|
|
123
139
|
|
|
124
140
|
export declare interface TableRecord<RecordType extends Record<string, any> = Record<string, any>> {
|
|
125
141
|
record: RecordType;
|
|
126
142
|
default: (options?: VisitOptions) => void;
|
|
127
|
-
|
|
143
|
+
operations: InlineOperation[];
|
|
128
144
|
select: () => void;
|
|
129
145
|
deselect: () => void;
|
|
130
146
|
toggle: () => void;
|
|
@@ -136,14 +152,14 @@ export declare interface TableRecord<RecordType extends Record<string, any> = Re
|
|
|
136
152
|
|
|
137
153
|
export declare type UseTable = typeof useTable;
|
|
138
154
|
|
|
139
|
-
export declare function useTable<
|
|
155
|
+
export declare function useTable<T extends Record<string, Table>, K extends Record<string, any> = Record<string, any>, U extends Paginate = "length-aware">(props: T, key: keyof T, defaults?: TableOptions): {
|
|
140
156
|
filters: {
|
|
141
|
-
apply: (value:
|
|
157
|
+
apply: (value: T, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
142
158
|
clear: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
143
|
-
bind: () => {
|
|
159
|
+
bind: () => void | {
|
|
144
160
|
"onUpdate:modelValue": PromisifyFn<(value: any) => void>;
|
|
145
|
-
modelValue:
|
|
146
|
-
}
|
|
161
|
+
modelValue: FilterValue;
|
|
162
|
+
};
|
|
147
163
|
type: string;
|
|
148
164
|
value: FilterValue;
|
|
149
165
|
options: Option_2[];
|
|
@@ -155,9 +171,9 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
155
171
|
sorts: {
|
|
156
172
|
apply: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
157
173
|
clear: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
158
|
-
bind: () => {
|
|
174
|
+
bind: () => void | {
|
|
159
175
|
onClick: PromisifyFn<() => void>;
|
|
160
|
-
}
|
|
176
|
+
};
|
|
161
177
|
type: string;
|
|
162
178
|
direction: Direction;
|
|
163
179
|
next: string | null;
|
|
@@ -169,116 +185,76 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
169
185
|
searches: {
|
|
170
186
|
apply: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
171
187
|
clear: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
172
|
-
bind: () => {
|
|
188
|
+
bind: () => void | {
|
|
173
189
|
"onUpdate:modelValue": PromisifyFn<(value: any) => void>;
|
|
174
190
|
modelValue: boolean;
|
|
175
191
|
value: string;
|
|
176
|
-
}
|
|
192
|
+
};
|
|
177
193
|
type: string;
|
|
178
194
|
name: string;
|
|
179
195
|
label: string;
|
|
180
196
|
active: boolean;
|
|
181
197
|
meta: Record<string, any>;
|
|
182
|
-
}[]
|
|
183
|
-
getFilter: (name: string) => Filter | undefined;
|
|
184
|
-
getSort: (name: string, direction?: Direction | undefined) => Sort | undefined;
|
|
185
|
-
getSearch: (name: string) => Search | undefined;
|
|
198
|
+
}[];
|
|
186
199
|
currentFilters: Filter[];
|
|
187
200
|
currentSort: Sort | undefined;
|
|
188
201
|
currentSearches: Search[];
|
|
202
|
+
isSortable: boolean;
|
|
203
|
+
isSearchable: boolean;
|
|
204
|
+
isMatchable: boolean;
|
|
189
205
|
isFiltering: (name?: string | Filter | undefined) => boolean;
|
|
190
206
|
isSorting: (name?: string | Sort | undefined) => boolean;
|
|
191
207
|
isSearching: (name?: string | Search | undefined) => boolean;
|
|
192
|
-
|
|
208
|
+
getFilter: (filter: string | Filter) => Filter | undefined;
|
|
209
|
+
getSort: (sort: string | Sort, dir?: Direction | undefined) => Sort | undefined;
|
|
210
|
+
getSearch: (search: string | Search) => Search | undefined;
|
|
211
|
+
apply: (values: Record<string, FilterValue>, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
193
212
|
applyFilter: (filter: string | Filter, value: any, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
194
213
|
applySort: (sort: string | Sort, direction?: Direction | undefined, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
195
214
|
applySearch: (value: string | null | undefined, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
196
215
|
applyMatch: (search: string | Search, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
197
|
-
clearFilter: (filter
|
|
216
|
+
clearFilter: (filter?: string | Filter | undefined, options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
198
217
|
clearSort: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
199
218
|
clearSearch: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
200
219
|
clearMatch: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
201
220
|
reset: (options?: Partial<Visit & VisitCallbacks> | undefined) => void;
|
|
202
|
-
bindFilter:
|
|
221
|
+
bindFilter: (filter: string | Filter, options?: BindingOptions | undefined) => void | {
|
|
203
222
|
"onUpdate:modelValue": PromisifyFn<(value: any) => void>;
|
|
204
|
-
modelValue:
|
|
205
|
-
}
|
|
206
|
-
bindSort: (sort: string | Sort, options?: BindingOptions | undefined) => {
|
|
223
|
+
modelValue: FilterValue;
|
|
224
|
+
};
|
|
225
|
+
bindSort: (sort: string | Sort, options?: BindingOptions | undefined) => void | {
|
|
207
226
|
onClick: PromisifyFn<() => void>;
|
|
208
|
-
}
|
|
227
|
+
};
|
|
209
228
|
bindSearch: (options?: BindingOptions | undefined) => {
|
|
210
229
|
"onUpdate:modelValue": PromisifyFn<(value: string | null | undefined) => void>;
|
|
211
230
|
modelValue: string;
|
|
212
231
|
};
|
|
213
|
-
bindMatch: (match: string | Search, options?: BindingOptions | undefined) => {
|
|
232
|
+
bindMatch: (match: string | Search, options?: BindingOptions | undefined) => void | {
|
|
214
233
|
"onUpdate:modelValue": PromisifyFn<(value: any) => void>;
|
|
234
|
+
/**
|
|
235
|
+
* Create operations with execute methods
|
|
236
|
+
*/
|
|
215
237
|
modelValue: boolean;
|
|
216
238
|
value: string;
|
|
217
|
-
}
|
|
239
|
+
};
|
|
218
240
|
stringValue: (value: any) => any;
|
|
219
241
|
omitValue: (value: any) => any;
|
|
220
242
|
toggleValue: (value: any, values: any) => any;
|
|
221
243
|
delimitArray: (value: any) => any;
|
|
222
|
-
|
|
244
|
+
table: Table<K, U>;
|
|
245
|
+
getRecordKey: (record: TableEntry<K>) => Identifier;
|
|
223
246
|
meta: Record<string, any>;
|
|
224
|
-
headings:
|
|
225
|
-
|
|
226
|
-
toggleSort: (options?: VisitOptions) => void;
|
|
227
|
-
name: keyof RecordType;
|
|
228
|
-
/**
|
|
229
|
-
* The heading columns for the table.
|
|
230
|
-
*/
|
|
231
|
-
label: string;
|
|
232
|
-
type: string;
|
|
233
|
-
hidden: boolean;
|
|
234
|
-
active: boolean;
|
|
235
|
-
toggleable: boolean;
|
|
236
|
-
icon?: string | undefined;
|
|
237
|
-
class?: string | undefined;
|
|
238
|
-
sort?: {
|
|
239
|
-
active: boolean;
|
|
240
|
-
direction: Direction;
|
|
241
|
-
next: string | null;
|
|
242
|
-
} | undefined;
|
|
243
|
-
}[];
|
|
244
|
-
columns: {
|
|
245
|
-
toggle: (options?: VisitOptions) => void;
|
|
246
|
-
name: keyof RecordType;
|
|
247
|
-
/**
|
|
248
|
-
* The heading columns for the table.
|
|
249
|
-
*/
|
|
250
|
-
label: string;
|
|
251
|
-
type: string;
|
|
252
|
-
hidden: boolean;
|
|
253
|
-
active: boolean;
|
|
254
|
-
toggleable: boolean;
|
|
255
|
-
icon?: string | undefined;
|
|
256
|
-
class?: string | undefined;
|
|
257
|
-
sort?: {
|
|
258
|
-
active: boolean;
|
|
259
|
-
direction: Direction;
|
|
260
|
-
next: string | null;
|
|
261
|
-
} | undefined;
|
|
262
|
-
}[];
|
|
247
|
+
headings: Heading<K>[];
|
|
248
|
+
columns: Column<K>[];
|
|
263
249
|
records: {
|
|
264
|
-
record: Omit<
|
|
265
|
-
|
|
266
|
-
}, "
|
|
267
|
-
/** The
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
default: boolean;
|
|
273
|
-
name: string;
|
|
274
|
-
label: string;
|
|
275
|
-
icon?: string | undefined;
|
|
276
|
-
extra?: Record<string, unknown> | undefined;
|
|
277
|
-
action?: boolean | undefined;
|
|
278
|
-
confirm?: Confirm | undefined;
|
|
279
|
-
route?: Route | undefined;
|
|
280
|
-
}[];
|
|
281
|
-
/** Perform this action when the record is clicked */
|
|
250
|
+
record: Omit<TableEntry<K> & {
|
|
251
|
+
operations: InlineOperation[];
|
|
252
|
+
}, "operations">;
|
|
253
|
+
/** The operations available for the record */
|
|
254
|
+
operations: (InlineOperation & {
|
|
255
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
256
|
+
})[];
|
|
257
|
+
/** Perform this operation when the record is clicked */
|
|
282
258
|
default: (options?: VisitOptions) => void;
|
|
283
259
|
/** Selects this record */
|
|
284
260
|
select: () => void;
|
|
@@ -295,41 +271,23 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
295
271
|
value: Identifier;
|
|
296
272
|
};
|
|
297
273
|
/** Get the value of the record for the column */
|
|
298
|
-
value: (column: Column<
|
|
274
|
+
value: (column: Column<K> | string) => K[string] | K[number] | K[symbol] | null;
|
|
299
275
|
/** Get the extra data of the record for the column */
|
|
300
|
-
extra: (column: Column<
|
|
276
|
+
extra: (column: Column<K> | string) => any;
|
|
301
277
|
}[];
|
|
302
278
|
inline: boolean;
|
|
303
|
-
|
|
304
|
-
execute: (options?:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
extra?: Record<string, unknown> | undefined;
|
|
311
|
-
action?: boolean | undefined;
|
|
312
|
-
confirm?: Confirm | undefined;
|
|
313
|
-
route?: Route | undefined;
|
|
314
|
-
}[];
|
|
315
|
-
pageActions: {
|
|
316
|
-
execute: (options?: VisitOptions) => void;
|
|
317
|
-
type: "page";
|
|
318
|
-
name: string;
|
|
319
|
-
label: string;
|
|
320
|
-
icon?: string | undefined;
|
|
321
|
-
extra?: Record<string, unknown> | undefined;
|
|
322
|
-
action?: boolean | undefined;
|
|
323
|
-
confirm?: Confirm | undefined;
|
|
324
|
-
route?: Route | undefined;
|
|
325
|
-
}[];
|
|
326
|
-
rowsPerPage: {
|
|
327
|
-
apply: (options?: VisitOptions) => void;
|
|
279
|
+
bulk: (BulkOperation & {
|
|
280
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
281
|
+
})[];
|
|
282
|
+
page: (PageOperation & {
|
|
283
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
284
|
+
})[];
|
|
285
|
+
pages: {
|
|
328
286
|
value: number;
|
|
329
287
|
active: boolean;
|
|
330
288
|
}[];
|
|
331
|
-
currentPage:
|
|
332
|
-
paginator:
|
|
289
|
+
currentPage: PageOption | undefined;
|
|
290
|
+
paginator: PaginateMap[U] & {
|
|
333
291
|
links?: {
|
|
334
292
|
navigate: (options?: VisitOptions) => void | "" | null;
|
|
335
293
|
url: string | null;
|
|
@@ -341,22 +299,22 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
341
299
|
first: (options?: VisitOptions) => void;
|
|
342
300
|
last: (options?: VisitOptions) => void;
|
|
343
301
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
applyPage: (page:
|
|
302
|
+
executeInline: (operation: InlineOperation, data: TableEntry<K>, options?: VisitOptions) => void;
|
|
303
|
+
executeBulk: (operation: BulkOperation, options?: VisitOptions) => void;
|
|
304
|
+
executePage: (operation: PageOperation, data?: PageOperationData, options?: VisitOptions) => boolean;
|
|
305
|
+
applyPage: (page: PageOption, options?: VisitOptions) => void;
|
|
348
306
|
selection: BulkSelection<Identifier>;
|
|
349
|
-
select: (record:
|
|
350
|
-
deselect: (record:
|
|
307
|
+
select: (record: TableEntry<K>) => void;
|
|
308
|
+
deselect: (record: TableEntry<K>) => void;
|
|
351
309
|
selectPage: () => void;
|
|
352
310
|
deselectPage: () => void;
|
|
353
|
-
toggle: (record:
|
|
354
|
-
selected: (record:
|
|
311
|
+
toggle: (record: TableEntry<K>) => void;
|
|
312
|
+
selected: (record: TableEntry<K>) => boolean;
|
|
355
313
|
selectAll: () => void;
|
|
356
314
|
deselectAll: () => void;
|
|
357
315
|
isPageSelected: boolean;
|
|
358
316
|
hasSelected: boolean;
|
|
359
|
-
bindCheckbox: (record:
|
|
317
|
+
bindCheckbox: (record: TableEntry<K>) => {
|
|
360
318
|
"onUpdate:modelValue": (checked: boolean | "indeterminate") => void;
|
|
361
319
|
modelValue: boolean;
|
|
362
320
|
value: Identifier;
|
|
@@ -368,8 +326,13 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
368
326
|
bindAll: () => {
|
|
369
327
|
"onUpdate:modelValue": (checked: boolean | "indeterminate") => void;
|
|
370
328
|
modelValue: boolean;
|
|
371
|
-
value: boolean;
|
|
372
329
|
};
|
|
373
330
|
};
|
|
374
331
|
|
|
332
|
+
export declare interface View {
|
|
333
|
+
id: number;
|
|
334
|
+
name: string;
|
|
335
|
+
view: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
375
338
|
export { }
|