vueye-table 3.0.0-alpha.9 → 3.0.0-beta.2
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 +308 -97
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +233 -63
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { CellChange, RowKey, TableIssue, TableRow, TableState } from "@vueye-table/core";
|
|
2
|
-
import { DetailSlotProps, GridCellSlotProps, TableStatusSlotProps } from "@vueye-table/headless";
|
|
1
|
+
import { CellChange, EditResult, RowKey, SortInfo, TableIssue, TableRow, TableState } from "@vueye-table/core";
|
|
2
|
+
import { CellEditorSlotProps, DetailSlotProps, GridCellSlotProps, TableStatusSlotProps } from "@vueye-table/headless";
|
|
3
|
+
import { DataTableBinding, TableLocaleOptions } from "@vueye-table/vue";
|
|
3
4
|
import { Plugin, PropType, SlotsType, VNode } from "vue";
|
|
4
5
|
export * from "@vueye-table/core";
|
|
5
6
|
export * from "@vueye-table/headless";
|
|
6
7
|
export * from "@vueye-table/styled";
|
|
7
8
|
export * from "@vueye-table/vue";
|
|
8
9
|
//#region src/plugin.d.ts
|
|
9
|
-
/**
|
|
10
|
-
|
|
10
|
+
/** Options of `VueyeTablePlugin`: the application's language, which every table speaks. */
|
|
11
|
+
type VueyeTablePluginOptions = TableLocaleOptions;
|
|
12
|
+
/**
|
|
13
|
+
* Register `<VueyeTable>` and `<VueyeGrid>` globally. A `locale` and `messages` given here are
|
|
14
|
+
* the default of every table in the application; a table's own props win over them.
|
|
15
|
+
*/
|
|
16
|
+
declare const VueyeTablePlugin: Plugin<[VueyeTablePluginOptions?]>;
|
|
11
17
|
//#endregion
|
|
12
18
|
//#region src/vueye-grid.d.ts
|
|
13
19
|
/**
|
|
@@ -43,9 +49,10 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
43
49
|
type: BooleanConstructor;
|
|
44
50
|
default: boolean;
|
|
45
51
|
};
|
|
52
|
+
/** The grid's accessible name. Defaults to the messages' `spreadsheet`. */
|
|
46
53
|
label: {
|
|
47
|
-
type:
|
|
48
|
-
default:
|
|
54
|
+
type: PropType<string | undefined>;
|
|
55
|
+
default: undefined;
|
|
49
56
|
};
|
|
50
57
|
/** Show undo, redo, and CSV export buttons. */
|
|
51
58
|
toolbar: {
|
|
@@ -153,7 +160,19 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
153
160
|
readonly default: false;
|
|
154
161
|
};
|
|
155
162
|
theme: {
|
|
156
|
-
readonly type: PropType<"light" | "dark">;
|
|
163
|
+
readonly type: PropType<"light" | "dark" | "inherit">;
|
|
164
|
+
readonly default: undefined;
|
|
165
|
+
};
|
|
166
|
+
locale: {
|
|
167
|
+
readonly type: PropType<string | undefined>;
|
|
168
|
+
readonly default: undefined;
|
|
169
|
+
};
|
|
170
|
+
messages: {
|
|
171
|
+
readonly type: PropType<Partial<import("@vueye-table/core").TableMessages> | undefined>;
|
|
172
|
+
readonly default: undefined;
|
|
173
|
+
};
|
|
174
|
+
normalizeText: {
|
|
175
|
+
readonly type: PropType<import("@vueye-table/core").TextNormalizer | undefined>;
|
|
157
176
|
readonly default: undefined;
|
|
158
177
|
};
|
|
159
178
|
maxHeight: {
|
|
@@ -161,8 +180,8 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
161
180
|
readonly default: undefined;
|
|
162
181
|
};
|
|
163
182
|
searchPlaceholder: {
|
|
164
|
-
readonly type:
|
|
165
|
-
readonly default:
|
|
183
|
+
readonly type: PropType<string | undefined>;
|
|
184
|
+
readonly default: undefined;
|
|
166
185
|
};
|
|
167
186
|
pageSizeOptions: {
|
|
168
187
|
readonly type: PropType<readonly number[]>;
|
|
@@ -228,6 +247,30 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
228
247
|
readonly type: NumberConstructor;
|
|
229
248
|
readonly default: 120;
|
|
230
249
|
};
|
|
250
|
+
validateRow: {
|
|
251
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
|
|
252
|
+
readonly default: undefined;
|
|
253
|
+
};
|
|
254
|
+
asyncValidation: {
|
|
255
|
+
readonly type: PropType<"held" | "optimistic" | undefined>;
|
|
256
|
+
readonly default: undefined;
|
|
257
|
+
};
|
|
258
|
+
createRow: {
|
|
259
|
+
readonly type: PropType<(() => any) | undefined>;
|
|
260
|
+
readonly default: undefined;
|
|
261
|
+
};
|
|
262
|
+
setParentKey: {
|
|
263
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
|
|
264
|
+
readonly default: undefined;
|
|
265
|
+
};
|
|
266
|
+
addRow: {
|
|
267
|
+
readonly type: BooleanConstructor;
|
|
268
|
+
readonly default: false;
|
|
269
|
+
};
|
|
270
|
+
removeRows: {
|
|
271
|
+
readonly type: BooleanConstructor;
|
|
272
|
+
readonly default: false;
|
|
273
|
+
};
|
|
231
274
|
data: {
|
|
232
275
|
type: PropType<readonly unknown[]>;
|
|
233
276
|
default: () => never[];
|
|
@@ -235,22 +278,24 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
235
278
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
236
279
|
[key: string]: any;
|
|
237
280
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
238
|
-
"
|
|
239
|
-
"update:
|
|
240
|
-
|
|
241
|
-
"
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
"update:
|
|
246
|
-
|
|
247
|
-
"
|
|
248
|
-
"update:
|
|
249
|
-
|
|
250
|
-
"
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
281
|
+
"state-change": (_state: TableState) => true;
|
|
282
|
+
"update:data": (_data: readonly unknown[]) => true;
|
|
283
|
+
edit: (_changes: readonly CellChange<unknown>[]) => true;
|
|
284
|
+
"edit-error": (_issues: readonly TableIssue[]) => true;
|
|
285
|
+
export: (_csv: string) => true;
|
|
286
|
+
expand: (_item: unknown, _row: TableRow<unknown>) => true;
|
|
287
|
+
collapse: (_item: unknown, _row: TableRow<unknown>) => true;
|
|
288
|
+
"update:page": (_page: number) => boolean;
|
|
289
|
+
"update:pageSize": (_pageSize: number) => boolean;
|
|
290
|
+
"update:sorting": (_sorting: readonly import("@vueye-table/core").SortRule[]) => boolean;
|
|
291
|
+
"update:search": (_search: string) => boolean;
|
|
292
|
+
"update:filters": (_filters: Readonly<Record<string, unknown>>) => boolean;
|
|
293
|
+
"update:hiddenColumns": (_hiddenColumns: readonly string[]) => boolean;
|
|
294
|
+
"update:selected": (_selected: readonly import("@vueye-table/core").RowKey[]) => boolean;
|
|
295
|
+
"update:expanded": (_expanded: import("@vueye-table/core").ExpandedState) => boolean;
|
|
296
|
+
save: (_result: EditResult<unknown>) => boolean;
|
|
297
|
+
cancel: (_key: import("@vueye-table/core").RowKey) => boolean;
|
|
298
|
+
"edit-issues": (_issues: readonly TableIssue[]) => boolean;
|
|
254
299
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
255
300
|
searchable: {
|
|
256
301
|
type: BooleanConstructor;
|
|
@@ -278,9 +323,10 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
278
323
|
type: BooleanConstructor;
|
|
279
324
|
default: boolean;
|
|
280
325
|
};
|
|
326
|
+
/** The grid's accessible name. Defaults to the messages' `spreadsheet`. */
|
|
281
327
|
label: {
|
|
282
|
-
type:
|
|
283
|
-
default:
|
|
328
|
+
type: PropType<string | undefined>;
|
|
329
|
+
default: undefined;
|
|
284
330
|
};
|
|
285
331
|
/** Show undo, redo, and CSV export buttons. */
|
|
286
332
|
toolbar: {
|
|
@@ -388,7 +434,19 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
388
434
|
readonly default: false;
|
|
389
435
|
};
|
|
390
436
|
theme: {
|
|
391
|
-
readonly type: PropType<"light" | "dark">;
|
|
437
|
+
readonly type: PropType<"light" | "dark" | "inherit">;
|
|
438
|
+
readonly default: undefined;
|
|
439
|
+
};
|
|
440
|
+
locale: {
|
|
441
|
+
readonly type: PropType<string | undefined>;
|
|
442
|
+
readonly default: undefined;
|
|
443
|
+
};
|
|
444
|
+
messages: {
|
|
445
|
+
readonly type: PropType<Partial<import("@vueye-table/core").TableMessages> | undefined>;
|
|
446
|
+
readonly default: undefined;
|
|
447
|
+
};
|
|
448
|
+
normalizeText: {
|
|
449
|
+
readonly type: PropType<import("@vueye-table/core").TextNormalizer | undefined>;
|
|
392
450
|
readonly default: undefined;
|
|
393
451
|
};
|
|
394
452
|
maxHeight: {
|
|
@@ -396,8 +454,8 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
396
454
|
readonly default: undefined;
|
|
397
455
|
};
|
|
398
456
|
searchPlaceholder: {
|
|
399
|
-
readonly type:
|
|
400
|
-
readonly default:
|
|
457
|
+
readonly type: PropType<string | undefined>;
|
|
458
|
+
readonly default: undefined;
|
|
401
459
|
};
|
|
402
460
|
pageSizeOptions: {
|
|
403
461
|
readonly type: PropType<readonly number[]>;
|
|
@@ -463,27 +521,56 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
463
521
|
readonly type: NumberConstructor;
|
|
464
522
|
readonly default: 120;
|
|
465
523
|
};
|
|
524
|
+
validateRow: {
|
|
525
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
|
|
526
|
+
readonly default: undefined;
|
|
527
|
+
};
|
|
528
|
+
asyncValidation: {
|
|
529
|
+
readonly type: PropType<"held" | "optimistic" | undefined>;
|
|
530
|
+
readonly default: undefined;
|
|
531
|
+
};
|
|
532
|
+
createRow: {
|
|
533
|
+
readonly type: PropType<(() => any) | undefined>;
|
|
534
|
+
readonly default: undefined;
|
|
535
|
+
};
|
|
536
|
+
setParentKey: {
|
|
537
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
|
|
538
|
+
readonly default: undefined;
|
|
539
|
+
};
|
|
540
|
+
addRow: {
|
|
541
|
+
readonly type: BooleanConstructor;
|
|
542
|
+
readonly default: false;
|
|
543
|
+
};
|
|
544
|
+
removeRows: {
|
|
545
|
+
readonly type: BooleanConstructor;
|
|
546
|
+
readonly default: false;
|
|
547
|
+
};
|
|
466
548
|
data: {
|
|
467
549
|
type: PropType<readonly unknown[]>;
|
|
468
550
|
default: () => never[];
|
|
469
551
|
};
|
|
470
552
|
}>> & Readonly<{
|
|
471
|
-
"
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
"onUpdate:
|
|
476
|
-
"onUpdate:
|
|
477
|
-
"onUpdate:
|
|
478
|
-
"onUpdate:
|
|
479
|
-
"
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
"onUpdate:data"?: (
|
|
484
|
-
|
|
485
|
-
|
|
553
|
+
"onState-change"?: (_state: TableState) => any;
|
|
554
|
+
onExpand?: (_item: unknown, _row: TableRow<unknown>) => any;
|
|
555
|
+
onCollapse?: (_item: unknown, _row: TableRow<unknown>) => any;
|
|
556
|
+
onCancel?: (_key: import("@vueye-table/core").RowKey) => any;
|
|
557
|
+
"onUpdate:page"?: (_page: number) => any;
|
|
558
|
+
"onUpdate:pageSize"?: (_pageSize: number) => any;
|
|
559
|
+
"onUpdate:sorting"?: (_sorting: readonly import("@vueye-table/core").SortRule[]) => any;
|
|
560
|
+
"onUpdate:search"?: (_search: string) => any;
|
|
561
|
+
"onUpdate:filters"?: (_filters: Readonly<Record<string, unknown>>) => any;
|
|
562
|
+
"onUpdate:hiddenColumns"?: (_hiddenColumns: readonly string[]) => any;
|
|
563
|
+
"onUpdate:selected"?: (_selected: readonly import("@vueye-table/core").RowKey[]) => any;
|
|
564
|
+
"onUpdate:expanded"?: (_expanded: import("@vueye-table/core").ExpandedState) => any;
|
|
565
|
+
"onUpdate:data"?: (_data: readonly unknown[]) => any;
|
|
566
|
+
onEdit?: (_changes: readonly CellChange<unknown>[]) => any;
|
|
567
|
+
onSave?: (_result: EditResult<unknown>) => any;
|
|
568
|
+
"onEdit-issues"?: (_issues: readonly TableIssue[]) => any;
|
|
569
|
+
"onEdit-error"?: (_issues: readonly TableIssue[]) => any;
|
|
570
|
+
onExport?: (_csv: string) => any;
|
|
486
571
|
}>, {
|
|
572
|
+
validateRow: ((next: any, previous: any) => import("@vueye-table/core").ValidationResult | Promise<import("@vueye-table/core").ValidationResult>) | undefined;
|
|
573
|
+
setParentKey: ((row: any, parent: import("@vueye-table/core").RowKey | undefined) => any) | undefined;
|
|
487
574
|
getChildren: ((row: any) => readonly any[] | undefined) | undefined;
|
|
488
575
|
setChildren: ((row: any, children: readonly any[]) => any) | undefined;
|
|
489
576
|
getParentKey: ((row: any) => import("@vueye-table/core").RowKey | null | undefined) | undefined;
|
|
@@ -511,16 +598,20 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
511
598
|
bordered: boolean;
|
|
512
599
|
hover: boolean;
|
|
513
600
|
stickyHeader: boolean;
|
|
514
|
-
theme: "light" | "dark";
|
|
601
|
+
theme: "light" | "dark" | "inherit";
|
|
602
|
+
locale: string | undefined;
|
|
603
|
+
messages: Partial<import("@vueye-table/core").TableMessages> | undefined;
|
|
604
|
+
search: string;
|
|
605
|
+
searchPlaceholder: string | undefined;
|
|
606
|
+
pagination: boolean;
|
|
607
|
+
addRow: boolean;
|
|
608
|
+
normalizeText: import("@vueye-table/core").TextNormalizer | undefined;
|
|
515
609
|
maxHeight: string;
|
|
516
610
|
searchable: boolean;
|
|
517
|
-
searchPlaceholder: string;
|
|
518
611
|
columnToggle: boolean;
|
|
519
|
-
pagination: boolean;
|
|
520
612
|
pageSizeOptions: readonly number[];
|
|
521
613
|
pageSize: number;
|
|
522
614
|
sorting: readonly import("@vueye-table/core").SortRule[];
|
|
523
|
-
search: string;
|
|
524
615
|
filters: Readonly<Record<string, unknown>>;
|
|
525
616
|
hiddenColumns: readonly string[];
|
|
526
617
|
selectScope: import("@vueye-table/core").SelectScope;
|
|
@@ -532,8 +623,11 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
532
623
|
overscan: number;
|
|
533
624
|
virtualColumns: boolean;
|
|
534
625
|
columnWidth: number;
|
|
535
|
-
|
|
626
|
+
asyncValidation: "held" | "optimistic" | undefined;
|
|
627
|
+
createRow: (() => any) | undefined;
|
|
628
|
+
removeRows: boolean;
|
|
536
629
|
toolbar: boolean;
|
|
630
|
+
label: string | undefined;
|
|
537
631
|
editable: boolean;
|
|
538
632
|
rowNumbers: boolean;
|
|
539
633
|
columnLetters: boolean;
|
|
@@ -541,6 +635,7 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
541
635
|
[key: `cell.${string}`]: GridCellSlotProps & {
|
|
542
636
|
readonly item: unknown;
|
|
543
637
|
};
|
|
638
|
+
[key: `editor.${string}`]: CellEditorSlotProps;
|
|
544
639
|
} & {
|
|
545
640
|
default?: (props: Record<string, unknown>) => VNode[];
|
|
546
641
|
status?: (props: TableStatusSlotProps) => VNode[];
|
|
@@ -559,14 +654,37 @@ interface CellSlotProps {
|
|
|
559
654
|
readonly header: string;
|
|
560
655
|
};
|
|
561
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* What a `<VueyeTable>` exposes on its template ref: the table binding, with every snapshot field
|
|
659
|
+
* and operation. `useTemplateRef<VueyeTableExposed>("table")` reads it typed.
|
|
660
|
+
*/
|
|
661
|
+
interface VueyeTableExposed {
|
|
662
|
+
readonly table: DataTableBinding<unknown>;
|
|
663
|
+
}
|
|
562
664
|
/** Slot props of `status`, the "1–10 of 57 rows" line. */
|
|
563
665
|
type StatusSlotProps = TableStatusSlotProps;
|
|
666
|
+
/**
|
|
667
|
+
* Slot props of `header.<column id>`. The slot fills the header cell; on a sortable column it sits
|
|
668
|
+
* inside the sort button, so the header still sorts on click and shows its indicator.
|
|
669
|
+
*/
|
|
670
|
+
interface HeaderSlotProps {
|
|
671
|
+
readonly column: {
|
|
672
|
+
readonly id: string;
|
|
673
|
+
readonly header: string;
|
|
674
|
+
};
|
|
675
|
+
readonly sort: SortInfo | undefined;
|
|
676
|
+
readonly toggleSort: (multi?: boolean) => void;
|
|
677
|
+
}
|
|
564
678
|
/**
|
|
565
679
|
* A complete data table: search, column visibility, sorting, selection, pagination, a live
|
|
566
680
|
* status line, loading and empty states, and theming. Every piece of state is available as a
|
|
567
681
|
* `v-model`, and `manual` hands searching, sorting, and paging to a server.
|
|
568
682
|
*/
|
|
569
683
|
declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
684
|
+
editMode: {
|
|
685
|
+
type: PropType<"cell" | "row" | undefined>;
|
|
686
|
+
default: undefined;
|
|
687
|
+
};
|
|
570
688
|
/** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
|
|
571
689
|
selectable: {
|
|
572
690
|
type: PropType<boolean | "single" | "multiple">;
|
|
@@ -579,8 +697,8 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
579
697
|
/** The data is one page from a server; `rowCount` is the total. */
|
|
580
698
|
/** Shown instead of the empty state while `loading` and there are no rows yet. */
|
|
581
699
|
loadingText: {
|
|
582
|
-
type:
|
|
583
|
-
default:
|
|
700
|
+
type: PropType<string | undefined>;
|
|
701
|
+
default: undefined;
|
|
584
702
|
};
|
|
585
703
|
rowCanExpand: {
|
|
586
704
|
readonly type: PropType<((row: any) => boolean) | undefined>;
|
|
@@ -683,7 +801,19 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
683
801
|
readonly default: false;
|
|
684
802
|
};
|
|
685
803
|
theme: {
|
|
686
|
-
readonly type: PropType<"light" | "dark">;
|
|
804
|
+
readonly type: PropType<"light" | "dark" | "inherit">;
|
|
805
|
+
readonly default: undefined;
|
|
806
|
+
};
|
|
807
|
+
locale: {
|
|
808
|
+
readonly type: PropType<string | undefined>;
|
|
809
|
+
readonly default: undefined;
|
|
810
|
+
};
|
|
811
|
+
messages: {
|
|
812
|
+
readonly type: PropType<Partial<import("@vueye-table/core").TableMessages> | undefined>;
|
|
813
|
+
readonly default: undefined;
|
|
814
|
+
};
|
|
815
|
+
normalizeText: {
|
|
816
|
+
readonly type: PropType<import("@vueye-table/core").TextNormalizer | undefined>;
|
|
687
817
|
readonly default: undefined;
|
|
688
818
|
};
|
|
689
819
|
maxHeight: {
|
|
@@ -695,8 +825,8 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
695
825
|
readonly default: true;
|
|
696
826
|
};
|
|
697
827
|
searchPlaceholder: {
|
|
698
|
-
readonly type:
|
|
699
|
-
readonly default:
|
|
828
|
+
readonly type: PropType<string | undefined>;
|
|
829
|
+
readonly default: undefined;
|
|
700
830
|
};
|
|
701
831
|
columnToggle: {
|
|
702
832
|
readonly type: BooleanConstructor;
|
|
@@ -770,6 +900,30 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
770
900
|
readonly type: NumberConstructor;
|
|
771
901
|
readonly default: 120;
|
|
772
902
|
};
|
|
903
|
+
validateRow: {
|
|
904
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
|
|
905
|
+
readonly default: undefined;
|
|
906
|
+
};
|
|
907
|
+
asyncValidation: {
|
|
908
|
+
readonly type: PropType<"held" | "optimistic" | undefined>;
|
|
909
|
+
readonly default: undefined;
|
|
910
|
+
};
|
|
911
|
+
createRow: {
|
|
912
|
+
readonly type: PropType<(() => any) | undefined>;
|
|
913
|
+
readonly default: undefined;
|
|
914
|
+
};
|
|
915
|
+
setParentKey: {
|
|
916
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
|
|
917
|
+
readonly default: undefined;
|
|
918
|
+
};
|
|
919
|
+
addRow: {
|
|
920
|
+
readonly type: BooleanConstructor;
|
|
921
|
+
readonly default: false;
|
|
922
|
+
};
|
|
923
|
+
removeRows: {
|
|
924
|
+
readonly type: BooleanConstructor;
|
|
925
|
+
readonly default: false;
|
|
926
|
+
};
|
|
773
927
|
data: {
|
|
774
928
|
type: PropType<readonly unknown[]>;
|
|
775
929
|
default: () => never[];
|
|
@@ -777,20 +931,29 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
777
931
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
778
932
|
[key: string]: any;
|
|
779
933
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
780
|
-
"
|
|
781
|
-
"
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
"update:
|
|
785
|
-
"update:
|
|
786
|
-
"update:
|
|
787
|
-
"update:
|
|
788
|
-
|
|
789
|
-
"
|
|
790
|
-
"
|
|
791
|
-
|
|
792
|
-
|
|
934
|
+
"state-change": (_state: TableState) => true;
|
|
935
|
+
"row-click": (_item: unknown, _row: TableRow<unknown>) => true;
|
|
936
|
+
expand: (_item: unknown, _row: TableRow<unknown>) => true;
|
|
937
|
+
collapse: (_item: unknown, _row: TableRow<unknown>) => true;
|
|
938
|
+
"update:page": (_page: number) => boolean;
|
|
939
|
+
"update:pageSize": (_pageSize: number) => boolean;
|
|
940
|
+
"update:sorting": (_sorting: readonly import("@vueye-table/core").SortRule[]) => boolean;
|
|
941
|
+
"update:search": (_search: string) => boolean;
|
|
942
|
+
"update:filters": (_filters: Readonly<Record<string, unknown>>) => boolean;
|
|
943
|
+
"update:hiddenColumns": (_hiddenColumns: readonly string[]) => boolean;
|
|
944
|
+
"update:selected": (_selected: readonly RowKey[]) => boolean;
|
|
945
|
+
"update:expanded": (_expanded: import("@vueye-table/core").ExpandedState) => boolean;
|
|
946
|
+
"update:data": (_data: readonly unknown[]) => boolean;
|
|
947
|
+
edit: (_changes: readonly import("@vueye-table/core").CellChange<unknown>[]) => boolean;
|
|
948
|
+
save: (_result: EditResult<unknown>) => boolean;
|
|
949
|
+
cancel: (_key: RowKey) => boolean;
|
|
950
|
+
"edit-issues": (_issues: readonly import("@vueye-table/core").TableIssue[]) => boolean;
|
|
951
|
+
"edit-error": (_issues: readonly import("@vueye-table/core").TableIssue[]) => boolean;
|
|
793
952
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
953
|
+
editMode: {
|
|
954
|
+
type: PropType<"cell" | "row" | undefined>;
|
|
955
|
+
default: undefined;
|
|
956
|
+
};
|
|
794
957
|
/** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
|
|
795
958
|
selectable: {
|
|
796
959
|
type: PropType<boolean | "single" | "multiple">;
|
|
@@ -803,8 +966,8 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
803
966
|
/** The data is one page from a server; `rowCount` is the total. */
|
|
804
967
|
/** Shown instead of the empty state while `loading` and there are no rows yet. */
|
|
805
968
|
loadingText: {
|
|
806
|
-
type:
|
|
807
|
-
default:
|
|
969
|
+
type: PropType<string | undefined>;
|
|
970
|
+
default: undefined;
|
|
808
971
|
};
|
|
809
972
|
rowCanExpand: {
|
|
810
973
|
readonly type: PropType<((row: any) => boolean) | undefined>;
|
|
@@ -907,7 +1070,19 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
907
1070
|
readonly default: false;
|
|
908
1071
|
};
|
|
909
1072
|
theme: {
|
|
910
|
-
readonly type: PropType<"light" | "dark">;
|
|
1073
|
+
readonly type: PropType<"light" | "dark" | "inherit">;
|
|
1074
|
+
readonly default: undefined;
|
|
1075
|
+
};
|
|
1076
|
+
locale: {
|
|
1077
|
+
readonly type: PropType<string | undefined>;
|
|
1078
|
+
readonly default: undefined;
|
|
1079
|
+
};
|
|
1080
|
+
messages: {
|
|
1081
|
+
readonly type: PropType<Partial<import("@vueye-table/core").TableMessages> | undefined>;
|
|
1082
|
+
readonly default: undefined;
|
|
1083
|
+
};
|
|
1084
|
+
normalizeText: {
|
|
1085
|
+
readonly type: PropType<import("@vueye-table/core").TextNormalizer | undefined>;
|
|
911
1086
|
readonly default: undefined;
|
|
912
1087
|
};
|
|
913
1088
|
maxHeight: {
|
|
@@ -919,8 +1094,8 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
919
1094
|
readonly default: true;
|
|
920
1095
|
};
|
|
921
1096
|
searchPlaceholder: {
|
|
922
|
-
readonly type:
|
|
923
|
-
readonly default:
|
|
1097
|
+
readonly type: PropType<string | undefined>;
|
|
1098
|
+
readonly default: undefined;
|
|
924
1099
|
};
|
|
925
1100
|
columnToggle: {
|
|
926
1101
|
readonly type: BooleanConstructor;
|
|
@@ -994,24 +1169,56 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
994
1169
|
readonly type: NumberConstructor;
|
|
995
1170
|
readonly default: 120;
|
|
996
1171
|
};
|
|
1172
|
+
validateRow: {
|
|
1173
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
|
|
1174
|
+
readonly default: undefined;
|
|
1175
|
+
};
|
|
1176
|
+
asyncValidation: {
|
|
1177
|
+
readonly type: PropType<"held" | "optimistic" | undefined>;
|
|
1178
|
+
readonly default: undefined;
|
|
1179
|
+
};
|
|
1180
|
+
createRow: {
|
|
1181
|
+
readonly type: PropType<(() => any) | undefined>;
|
|
1182
|
+
readonly default: undefined;
|
|
1183
|
+
};
|
|
1184
|
+
setParentKey: {
|
|
1185
|
+
readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
|
|
1186
|
+
readonly default: undefined;
|
|
1187
|
+
};
|
|
1188
|
+
addRow: {
|
|
1189
|
+
readonly type: BooleanConstructor;
|
|
1190
|
+
readonly default: false;
|
|
1191
|
+
};
|
|
1192
|
+
removeRows: {
|
|
1193
|
+
readonly type: BooleanConstructor;
|
|
1194
|
+
readonly default: false;
|
|
1195
|
+
};
|
|
997
1196
|
data: {
|
|
998
1197
|
type: PropType<readonly unknown[]>;
|
|
999
1198
|
default: () => never[];
|
|
1000
1199
|
};
|
|
1001
1200
|
}>> & Readonly<{
|
|
1002
|
-
"
|
|
1003
|
-
"
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
"onUpdate:
|
|
1008
|
-
"onUpdate:
|
|
1009
|
-
"onUpdate:
|
|
1010
|
-
"
|
|
1011
|
-
"
|
|
1012
|
-
|
|
1013
|
-
|
|
1201
|
+
"onState-change"?: (_state: TableState) => any;
|
|
1202
|
+
"onRow-click"?: (_item: unknown, _row: TableRow<unknown>) => any;
|
|
1203
|
+
onExpand?: (_item: unknown, _row: TableRow<unknown>) => any;
|
|
1204
|
+
onCollapse?: (_item: unknown, _row: TableRow<unknown>) => any;
|
|
1205
|
+
onCancel?: (_key: RowKey) => any;
|
|
1206
|
+
"onUpdate:page"?: (_page: number) => any;
|
|
1207
|
+
"onUpdate:pageSize"?: (_pageSize: number) => any;
|
|
1208
|
+
"onUpdate:sorting"?: (_sorting: readonly import("@vueye-table/core").SortRule[]) => any;
|
|
1209
|
+
"onUpdate:search"?: (_search: string) => any;
|
|
1210
|
+
"onUpdate:filters"?: (_filters: Readonly<Record<string, unknown>>) => any;
|
|
1211
|
+
"onUpdate:hiddenColumns"?: (_hiddenColumns: readonly string[]) => any;
|
|
1212
|
+
"onUpdate:selected"?: (_selected: readonly RowKey[]) => any;
|
|
1213
|
+
"onUpdate:expanded"?: (_expanded: import("@vueye-table/core").ExpandedState) => any;
|
|
1214
|
+
"onUpdate:data"?: (_data: readonly unknown[]) => any;
|
|
1215
|
+
onEdit?: (_changes: readonly import("@vueye-table/core").CellChange<unknown>[]) => any;
|
|
1216
|
+
onSave?: (_result: EditResult<unknown>) => any;
|
|
1217
|
+
"onEdit-issues"?: (_issues: readonly import("@vueye-table/core").TableIssue[]) => any;
|
|
1218
|
+
"onEdit-error"?: (_issues: readonly import("@vueye-table/core").TableIssue[]) => any;
|
|
1014
1219
|
}>, {
|
|
1220
|
+
validateRow: ((next: any, previous: any) => import("@vueye-table/core").ValidationResult | Promise<import("@vueye-table/core").ValidationResult>) | undefined;
|
|
1221
|
+
setParentKey: ((row: any, parent: RowKey | undefined) => any) | undefined;
|
|
1015
1222
|
getChildren: ((row: any) => readonly any[] | undefined) | undefined;
|
|
1016
1223
|
setChildren: ((row: any, children: readonly any[]) => any) | undefined;
|
|
1017
1224
|
getParentKey: ((row: any) => RowKey | null | undefined) | undefined;
|
|
@@ -1021,9 +1228,10 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1021
1228
|
paginateBy: import("@vueye-table/core").TreePagination | undefined;
|
|
1022
1229
|
page: number;
|
|
1023
1230
|
data: readonly unknown[];
|
|
1231
|
+
editMode: "row" | "cell" | undefined;
|
|
1024
1232
|
selectable: boolean | "single" | "multiple";
|
|
1025
1233
|
selected: readonly RowKey[];
|
|
1026
|
-
loadingText: string;
|
|
1234
|
+
loadingText: string | undefined;
|
|
1027
1235
|
rowCanExpand: ((row: any) => boolean) | undefined;
|
|
1028
1236
|
expandMode: import("@vueye-table/core").ExpandMode;
|
|
1029
1237
|
expanded: import("@vueye-table/core").ExpandedState | undefined;
|
|
@@ -1042,16 +1250,20 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1042
1250
|
bordered: boolean;
|
|
1043
1251
|
hover: boolean;
|
|
1044
1252
|
stickyHeader: boolean;
|
|
1045
|
-
theme: "light" | "dark";
|
|
1253
|
+
theme: "light" | "dark" | "inherit";
|
|
1254
|
+
locale: string | undefined;
|
|
1255
|
+
messages: Partial<import("@vueye-table/core").TableMessages> | undefined;
|
|
1256
|
+
search: string;
|
|
1257
|
+
searchPlaceholder: string | undefined;
|
|
1258
|
+
pagination: boolean;
|
|
1259
|
+
addRow: boolean;
|
|
1260
|
+
normalizeText: import("@vueye-table/core").TextNormalizer | undefined;
|
|
1046
1261
|
maxHeight: string;
|
|
1047
1262
|
searchable: boolean;
|
|
1048
|
-
searchPlaceholder: string;
|
|
1049
1263
|
columnToggle: boolean;
|
|
1050
|
-
pagination: boolean;
|
|
1051
1264
|
pageSizeOptions: readonly number[];
|
|
1052
1265
|
pageSize: number;
|
|
1053
1266
|
sorting: readonly import("@vueye-table/core").SortRule[];
|
|
1054
|
-
search: string;
|
|
1055
1267
|
filters: Readonly<Record<string, unknown>>;
|
|
1056
1268
|
hiddenColumns: readonly string[];
|
|
1057
1269
|
selectScope: import("@vueye-table/core").SelectScope;
|
|
@@ -1063,14 +1275,13 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1063
1275
|
overscan: number;
|
|
1064
1276
|
virtualColumns: boolean;
|
|
1065
1277
|
columnWidth: number;
|
|
1278
|
+
asyncValidation: "held" | "optimistic" | undefined;
|
|
1279
|
+
createRow: (() => any) | undefined;
|
|
1280
|
+
removeRows: boolean;
|
|
1066
1281
|
}, SlotsType<{
|
|
1067
1282
|
[key: `cell.${string}`]: CellSlotProps;
|
|
1068
|
-
[key: `
|
|
1069
|
-
|
|
1070
|
-
id: string;
|
|
1071
|
-
header: string;
|
|
1072
|
-
};
|
|
1073
|
-
};
|
|
1283
|
+
[key: `editor.${string}`]: CellEditorSlotProps;
|
|
1284
|
+
[key: `header.${string}`]: HeaderSlotProps;
|
|
1074
1285
|
} & {
|
|
1075
1286
|
toolbar: {
|
|
1076
1287
|
table: unknown;
|
|
@@ -1092,5 +1303,5 @@ declare module "vue" {
|
|
|
1092
1303
|
}
|
|
1093
1304
|
}
|
|
1094
1305
|
//#endregion
|
|
1095
|
-
export { type CellSlotProps, type StatusSlotProps, VueyeGrid, VueyeTable, VueyeTablePlugin };
|
|
1306
|
+
export { type CellSlotProps, type HeaderSlotProps, type StatusSlotProps, VueyeGrid, VueyeTable, type VueyeTableExposed, VueyeTablePlugin, type VueyeTablePluginOptions };
|
|
1096
1307
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/plugin.ts","../src/vueye-grid.ts","../src/vueye-table.ts","../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/plugin.ts","../src/vueye-grid.ts","../src/vueye-table.ts","../src/index.ts"],"mappings":";;;;;;;;;;KAOY,0BAA0B;;;;;cAMzB,kBAAkB,QAAQ;;;;;;;;;cCsC1B,yBAAS,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBO,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAXF,MAAA;;;;;;EAkBE,iBAAA,QAAA;EACF,gBAAA;EACN,OAAA,mBAAS;EACF,eAAA,kBAAS;EAClB,SAAA;EACC,SAAA,gBAAO,MAAQ;EACb,WAAA,gBAAO,MAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAbR,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAXF,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aATyC;;;;EAGpD,WAAC,OAAO,4BAA4B;EACrC,UAAC,OAAO,yBAAyB;EAC/B,YAAC,OAAO,oBAAoB;kCA2M3C;;;;UClMe;WACN;WACA,KAAK;WACL;WACA;WACA;aAAmB;aAAqB;;;;;;;UAOlC;WACN,OAAO;;;KAIN,kBAAkB;;;;;UAMb;WACN;aAAmB;aAAqB;;WACxC,MAAM;WACN,aAAa;;;;;;;cAQX,0BAAU,8BAAA;;IAMS,MAAA;;;;;IAGC,MAAA;;;;IAGF,MAAA,kBAAkB;;;;;;IAGd,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAXR,MAAA;;;;;;EAgBE,iBAAA,QAAA;EACJ,cAAA,gBAAO,MAAQ;EACpB,SAAA,gBAAO,MAAQ;EACb,WAAA,gBAAO,MAAQ;;;;;;;;;;;;;;;;;IAjBL,MAAA;;;;;IAGC,MAAA;;;;IAGF,MAAA,kBAAkB;;;;;;IAGd,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAXR,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BZ;IAAE;;EACJ,OAAA;EACE,SAAA;EACD;IAAE;;EACF,QAAA;EACE,UAAA;kCAgVd;;;;YCzciB;IACf,mBAAmB;IACnB,kBAAkB"}
|