@honed/table 0.7.1 → 0.8.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.d.ts +140 -180
- package/dist/index.es.js +450 -460
- 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
|
-
key: string;
|
|
51
|
-
record: string;
|
|
52
|
-
column: string;
|
|
53
|
-
page: string;
|
|
35
|
+
export declare interface CollectionPaginate {
|
|
36
|
+
empty: boolean;
|
|
54
37
|
}
|
|
55
38
|
|
|
56
|
-
export declare interface
|
|
39
|
+
export declare interface Column<T extends Record<string, any> = Record<string, any>> extends BaseColumn<T> {
|
|
40
|
+
toggle: (options: VisitOptions) => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
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
|
+
actions: 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
|
-
recordActions?: Record<string, (record:
|
|
137
|
+
recordActions?: 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
|
-
actions:
|
|
143
|
+
actions: InlineOperation[];
|
|
128
144
|
select: () => void;
|
|
129
145
|
deselect: () => void;
|
|
130
146
|
toggle: () => void;
|
|
@@ -136,18 +152,18 @@ 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
|
+
}; /** Bind the record to a checkbox */
|
|
147
163
|
type: string;
|
|
148
164
|
value: FilterValue;
|
|
149
165
|
options: Option_2[];
|
|
150
|
-
name: string;
|
|
166
|
+
name: string; /** Get the value of the record for the column */
|
|
151
167
|
label: string;
|
|
152
168
|
active: boolean;
|
|
153
169
|
meta: Record<string, any>;
|
|
@@ -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,115 +185,72 @@ 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>;
|
|
215
234
|
modelValue: boolean;
|
|
216
235
|
value: string;
|
|
217
|
-
}
|
|
236
|
+
};
|
|
218
237
|
stringValue: (value: any) => any;
|
|
219
238
|
omitValue: (value: any) => any;
|
|
220
239
|
toggleValue: (value: any, values: any) => any;
|
|
221
240
|
delimitArray: (value: any) => any;
|
|
222
|
-
|
|
241
|
+
table: Table<K, U>;
|
|
242
|
+
getRecordKey: (record: TableEntry<K>) => Identifier;
|
|
223
243
|
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
|
-
}[];
|
|
244
|
+
headings: Heading<K>[];
|
|
245
|
+
columns: Column<K>[];
|
|
263
246
|
records: {
|
|
264
|
-
record: Omit<
|
|
265
|
-
actions:
|
|
247
|
+
record: Omit<TableEntry<K> & {
|
|
248
|
+
actions: InlineOperation[];
|
|
266
249
|
}, "actions">;
|
|
267
250
|
/** The actions available for the record */
|
|
268
|
-
actions: {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
type: "inline";
|
|
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
|
-
}[];
|
|
251
|
+
actions: (InlineOperation & {
|
|
252
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
253
|
+
})[];
|
|
281
254
|
/** Perform this action when the record is clicked */
|
|
282
255
|
default: (options?: VisitOptions) => void;
|
|
283
256
|
/** Selects this record */
|
|
@@ -295,41 +268,23 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
295
268
|
value: Identifier;
|
|
296
269
|
};
|
|
297
270
|
/** Get the value of the record for the column */
|
|
298
|
-
value: (column: Column<
|
|
271
|
+
value: (column: Column<K> | string) => K[string] | K[number] | K[symbol] | null;
|
|
299
272
|
/** Get the extra data of the record for the column */
|
|
300
|
-
extra: (column: Column<
|
|
273
|
+
extra: (column: Column<K> | string) => any;
|
|
301
274
|
}[];
|
|
302
275
|
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;
|
|
276
|
+
bulk: (BulkOperation & {
|
|
277
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
278
|
+
})[];
|
|
279
|
+
page: (PageOperation & {
|
|
280
|
+
execute: (data?: any, options?: Partial<Visit & VisitCallbacks> | undefined) => boolean;
|
|
281
|
+
})[];
|
|
282
|
+
pages: {
|
|
328
283
|
value: number;
|
|
329
284
|
active: boolean;
|
|
330
285
|
}[];
|
|
331
|
-
currentPage:
|
|
332
|
-
paginator:
|
|
286
|
+
currentPage: PageOption | undefined;
|
|
287
|
+
paginator: PaginateMap[U] & {
|
|
333
288
|
links?: {
|
|
334
289
|
navigate: (options?: VisitOptions) => void | "" | null;
|
|
335
290
|
url: string | null;
|
|
@@ -341,22 +296,22 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
341
296
|
first: (options?: VisitOptions) => void;
|
|
342
297
|
last: (options?: VisitOptions) => void;
|
|
343
298
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
applyPage: (page:
|
|
299
|
+
executeInline: (operation: InlineOperation, data: TableEntry<K>, options?: VisitOptions) => void;
|
|
300
|
+
executeBulk: (operation: BulkOperation, options?: VisitOptions) => void;
|
|
301
|
+
executePage: (operation: PageOperation, data?: PageOperationData, options?: VisitOptions) => boolean;
|
|
302
|
+
applyPage: (page: PageOption, options?: VisitOptions) => void;
|
|
348
303
|
selection: BulkSelection<Identifier>;
|
|
349
|
-
select: (record:
|
|
350
|
-
deselect: (record:
|
|
304
|
+
select: (record: TableEntry<K>) => void;
|
|
305
|
+
deselect: (record: TableEntry<K>) => void;
|
|
351
306
|
selectPage: () => void;
|
|
352
307
|
deselectPage: () => void;
|
|
353
|
-
toggle: (record:
|
|
354
|
-
selected: (record:
|
|
308
|
+
toggle: (record: TableEntry<K>) => void;
|
|
309
|
+
selected: (record: TableEntry<K>) => boolean;
|
|
355
310
|
selectAll: () => void;
|
|
356
311
|
deselectAll: () => void;
|
|
357
312
|
isPageSelected: boolean;
|
|
358
313
|
hasSelected: boolean;
|
|
359
|
-
bindCheckbox: (record:
|
|
314
|
+
bindCheckbox: (record: TableEntry<K>) => {
|
|
360
315
|
"onUpdate:modelValue": (checked: boolean | "indeterminate") => void;
|
|
361
316
|
modelValue: boolean;
|
|
362
317
|
value: Identifier;
|
|
@@ -368,8 +323,13 @@ export declare function useTable<Props extends object, Key extends Props[keyof P
|
|
|
368
323
|
bindAll: () => {
|
|
369
324
|
"onUpdate:modelValue": (checked: boolean | "indeterminate") => void;
|
|
370
325
|
modelValue: boolean;
|
|
371
|
-
value: boolean;
|
|
372
326
|
};
|
|
373
327
|
};
|
|
374
328
|
|
|
329
|
+
export declare interface View {
|
|
330
|
+
id: number;
|
|
331
|
+
name: string;
|
|
332
|
+
view: string;
|
|
333
|
+
}
|
|
334
|
+
|
|
375
335
|
export { }
|