-
Notifications
You must be signed in to change notification settings - Fork 18
/
d-table-column-selecting.ts
47 lines (40 loc) · 1.39 KB
/
d-table-column-selecting.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { DDialogOpener } from "./d-dialog";
import { DDialogSelectOptions } from "./d-dialog-select";
import { DMenu, DMenuOptions } from "./d-menu";
export type DTableColumnSelectingGetter<CELL_VALUE, DIALOG> = (dialog: DIALOG) => CELL_VALUE;
export type DTableColumnSelectingSetter<CELL_VALUE, DIALOG> = (
dialog: DIALOG,
cell: CELL_VALUE
) => void;
export interface DTableColumnSelectingDialog<DIALOG_VALUE> {
readonly value: DIALOG_VALUE;
open(owner?: DDialogOpener): Promise<DIALOG_VALUE>;
}
export interface DTableColumnSelectingOptions<
CELL_VALUE,
DIALOG_VALUE,
DIALOG extends DTableColumnSelectingDialog<DIALOG_VALUE>
> {
getter?: DTableColumnSelectingGetter<CELL_VALUE, DIALOG>;
setter?: DTableColumnSelectingSetter<CELL_VALUE, DIALOG>;
menu?: DMenuOptions<CELL_VALUE> | DMenu<CELL_VALUE>;
multiple?: DMenuOptions<CELL_VALUE> | DMenu<CELL_VALUE>;
dialog?: DDialogSelectOptions<DIALOG_VALUE> | DIALOG;
promise?: () => Promise<CELL_VALUE>;
}
export interface DTableColumnSelecting<
CELL_VALUE,
DIALOG_VALUE,
DIALOG extends DTableColumnSelectingDialog<DIALOG_VALUE>
> {
getter: DTableColumnSelectingGetter<CELL_VALUE, DIALOG>;
setter: DTableColumnSelectingSetter<CELL_VALUE, DIALOG>;
menu?: DMenu<CELL_VALUE>;
multiple?: DMenu<CELL_VALUE>;
dialog?: DIALOG;
promise?: () => Promise<CELL_VALUE>;
}