@stonecrop/atable 0.2.63 → 0.2.65
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/assets/index.css +1 -1
- package/dist/atable.d.ts +509 -20
- package/dist/atable.js +706 -702
- package/dist/atable.js.map +1 -1
- package/dist/atable.tsbuildinfo +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/src/index.d.ts +9 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stores/table.d.ts +326 -0
- package/dist/src/stores/table.d.ts.map +1 -0
- package/dist/{atable/src → src}/tsdoc-metadata.json +1 -1
- package/dist/src/types/index.d.ts +27 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +180 -0
- package/package.json +10 -9
- package/src/components/ACell.vue +32 -63
- package/src/components/AExpansionRow.vue +9 -10
- package/src/components/ARow.vue +14 -33
- package/src/components/ATable.vue +47 -57
- package/src/components/ATableHeader.vue +10 -19
- package/src/components/ATableModal.vue +5 -8
- package/src/index.ts +9 -9
- package/src/stores/table.ts +214 -0
- package/src/types/index.ts +25 -3
- package/dist/components/index.js +0 -97
- package/dist/src/components/index.d.ts +0 -23
- package/dist/src/components/index.d.ts.map +0 -1
- package/src/components/index.ts +0 -120
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height);border-left:4px solid var(--sc-row-border-color);display:flex}.expanded-row{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color)}.expanded-row-content{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.table-row{border-top:1px solid var(--sc-row-border-color);display:flex;background-color:#fff}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;width:7ch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-header-row{display:flex}.atable-header-row th{padding-left:.5ch!important;font-weight:700;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color)}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:fixed;background-color:var(--sc-row-color-zebra-dark);z-index:100}.sticky-index{position:sticky;left:0;z-index:1;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:1;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color);border-right-width:1px}[data-v-
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height);border-left:4px solid var(--sc-row-border-color);display:flex}.expanded-row{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color)}.expanded-row-content{border-bottom:1px solid var(--sc-row-border-color);border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.table-row{border-top:1px solid var(--sc-row-border-color);display:flex;background-color:#fff}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;width:7ch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-header-row{display:flex}.atable-header-row th{padding-left:.5ch!important;font-weight:700;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color)}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:fixed;background-color:var(--sc-row-color-zebra-dark);z-index:100}.sticky-index{position:sticky;left:0;z-index:1;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:1;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color);border-right-width:1px}[data-v-20244978]:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-modified: #ffffb1;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: 5px;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.atable[data-v-20244978]{font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);border-collapse:collapse;box-sizing:border-box;table-layout:auto;width:auto}.atable th[data-v-20244978]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);color:var(--sc-gray-60);height:var(--sc-atable-row-height);font-weight:300;letter-spacing:.05rem;order:1;box-sizing:border-box}.atable th[data-v-20244978]:focus{outline:none}
|
package/dist/atable.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import ACell from '
|
|
2
|
-
import AExpansionRow from '
|
|
1
|
+
import ACell from './components/ACell.vue';
|
|
2
|
+
import AExpansionRow from './components/AExpansionRow.vue';
|
|
3
3
|
import { App } from 'vue';
|
|
4
|
-
import ARow from '
|
|
5
|
-
import ATable from '
|
|
6
|
-
import ATableHeader from '
|
|
7
|
-
import ATableModal from '
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import { TableDisplay } from '@/types';
|
|
13
|
-
import { TableModal } from '@/types';
|
|
14
|
-
import { TableRow } from '@/types';
|
|
4
|
+
import ARow from './components/ARow.vue';
|
|
5
|
+
import ATable from './components/ATable.vue';
|
|
6
|
+
import ATableHeader from './components/ATableHeader.vue';
|
|
7
|
+
import ATableModal from './components/ATableModal.vue';
|
|
8
|
+
import { ComputedRef } from 'vue';
|
|
9
|
+
import { CSSProperties } from 'vue';
|
|
10
|
+
import { Ref } from 'vue';
|
|
11
|
+
import { Store } from 'pinia';
|
|
15
12
|
|
|
16
13
|
export { ACell }
|
|
17
14
|
|
|
@@ -25,7 +22,351 @@ export { ATableHeader }
|
|
|
25
22
|
|
|
26
23
|
export { ATableModal }
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Table cell context definition.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare type CellContext = {
|
|
30
|
+
row: TableRow;
|
|
31
|
+
column: TableColumn;
|
|
32
|
+
table: {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Table cell context definition.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
declare type CellContext_2 = {
|
|
42
|
+
row: TableRow_2
|
|
43
|
+
column: TableColumn_2
|
|
44
|
+
table: { [key: string]: any }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Create a table store
|
|
49
|
+
* @param initData - Initial data for the table store
|
|
50
|
+
* @returns table store instance
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export declare const createTableStore: (initData: {
|
|
54
|
+
columns: TableColumn_2[];
|
|
55
|
+
rows: TableRow_2[];
|
|
56
|
+
id?: string;
|
|
57
|
+
config?: TableConfig_2;
|
|
58
|
+
table?: {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
display?: TableDisplay_2[];
|
|
62
|
+
modal?: TableModal_2;
|
|
63
|
+
}) => Store<`table-${string}`, Pick<{
|
|
64
|
+
columns: Ref< {
|
|
65
|
+
name: string;
|
|
66
|
+
align?: CanvasTextAlign;
|
|
67
|
+
edit?: boolean;
|
|
68
|
+
label?: string;
|
|
69
|
+
type?: string;
|
|
70
|
+
width?: string;
|
|
71
|
+
pinned?: boolean;
|
|
72
|
+
cellComponent?: string;
|
|
73
|
+
cellComponentProps?: Record<string, any>;
|
|
74
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
75
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
76
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
77
|
+
mask?: (value: any) => any;
|
|
78
|
+
}[], TableColumn_2[] | {
|
|
79
|
+
name: string;
|
|
80
|
+
align?: CanvasTextAlign;
|
|
81
|
+
edit?: boolean;
|
|
82
|
+
label?: string;
|
|
83
|
+
type?: string;
|
|
84
|
+
width?: string;
|
|
85
|
+
pinned?: boolean;
|
|
86
|
+
cellComponent?: string;
|
|
87
|
+
cellComponentProps?: Record<string, any>;
|
|
88
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
89
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
90
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
91
|
+
mask?: (value: any) => any;
|
|
92
|
+
}[]>;
|
|
93
|
+
rows: Ref< {
|
|
94
|
+
[x: string]: any;
|
|
95
|
+
indent?: number;
|
|
96
|
+
parent?: number;
|
|
97
|
+
}[], TableRow_2[] | {
|
|
98
|
+
[x: string]: any;
|
|
99
|
+
indent?: number;
|
|
100
|
+
parent?: number;
|
|
101
|
+
}[]>;
|
|
102
|
+
config: Ref< {
|
|
103
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
104
|
+
fullWidth?: boolean;
|
|
105
|
+
}, TableConfig_2 | {
|
|
106
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
107
|
+
fullWidth?: boolean;
|
|
108
|
+
}>;
|
|
109
|
+
table: Ref< {}, {}>;
|
|
110
|
+
display: Ref< {
|
|
111
|
+
childrenOpen?: boolean;
|
|
112
|
+
expanded?: boolean;
|
|
113
|
+
indent?: number;
|
|
114
|
+
isParent?: boolean;
|
|
115
|
+
isRoot?: boolean;
|
|
116
|
+
open?: boolean;
|
|
117
|
+
parent?: number;
|
|
118
|
+
rowModified?: boolean;
|
|
119
|
+
}[], TableDisplay_2[] | {
|
|
120
|
+
childrenOpen?: boolean;
|
|
121
|
+
expanded?: boolean;
|
|
122
|
+
indent?: number;
|
|
123
|
+
isParent?: boolean;
|
|
124
|
+
isRoot?: boolean;
|
|
125
|
+
open?: boolean;
|
|
126
|
+
parent?: number;
|
|
127
|
+
rowModified?: boolean;
|
|
128
|
+
}[]>;
|
|
129
|
+
modal: Ref< {
|
|
130
|
+
colIndex?: number;
|
|
131
|
+
event?: string;
|
|
132
|
+
left?: number;
|
|
133
|
+
parent?: HTMLElement;
|
|
134
|
+
rowIndex?: number;
|
|
135
|
+
top?: number;
|
|
136
|
+
visible?: boolean;
|
|
137
|
+
width?: string;
|
|
138
|
+
component?: string;
|
|
139
|
+
componentProps?: Record<string, any>;
|
|
140
|
+
}, TableModal_2 | {
|
|
141
|
+
colIndex?: number;
|
|
142
|
+
event?: string;
|
|
143
|
+
left?: number;
|
|
144
|
+
parent?: HTMLElement;
|
|
145
|
+
rowIndex?: number;
|
|
146
|
+
top?: number;
|
|
147
|
+
visible?: boolean;
|
|
148
|
+
width?: string;
|
|
149
|
+
component?: string;
|
|
150
|
+
componentProps?: Record<string, any>;
|
|
151
|
+
}>;
|
|
152
|
+
hasPinnedColumns: ComputedRef<boolean>;
|
|
153
|
+
numberedRowWidth: ComputedRef<string>;
|
|
154
|
+
zeroColumn: ComputedRef<boolean>;
|
|
155
|
+
closeModal: (event: MouseEvent) => void;
|
|
156
|
+
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
157
|
+
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
158
|
+
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
159
|
+
getHeaderCellStyle: (column: TableColumn_2) => CSSProperties;
|
|
160
|
+
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
161
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
162
|
+
isRowVisible: (rowIndex: number) => boolean;
|
|
163
|
+
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
164
|
+
toggleRowExpand: (rowIndex: number) => void;
|
|
165
|
+
}, "columns" | "rows" | "config" | "table" | "display" | "modal">, Pick<{
|
|
166
|
+
columns: Ref< {
|
|
167
|
+
name: string;
|
|
168
|
+
align?: CanvasTextAlign;
|
|
169
|
+
edit?: boolean;
|
|
170
|
+
label?: string;
|
|
171
|
+
type?: string;
|
|
172
|
+
width?: string;
|
|
173
|
+
pinned?: boolean;
|
|
174
|
+
cellComponent?: string;
|
|
175
|
+
cellComponentProps?: Record<string, any>;
|
|
176
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
177
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
178
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
179
|
+
mask?: (value: any) => any;
|
|
180
|
+
}[], TableColumn_2[] | {
|
|
181
|
+
name: string;
|
|
182
|
+
align?: CanvasTextAlign;
|
|
183
|
+
edit?: boolean;
|
|
184
|
+
label?: string;
|
|
185
|
+
type?: string;
|
|
186
|
+
width?: string;
|
|
187
|
+
pinned?: boolean;
|
|
188
|
+
cellComponent?: string;
|
|
189
|
+
cellComponentProps?: Record<string, any>;
|
|
190
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
191
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
192
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
193
|
+
mask?: (value: any) => any;
|
|
194
|
+
}[]>;
|
|
195
|
+
rows: Ref< {
|
|
196
|
+
[x: string]: any;
|
|
197
|
+
indent?: number;
|
|
198
|
+
parent?: number;
|
|
199
|
+
}[], TableRow_2[] | {
|
|
200
|
+
[x: string]: any;
|
|
201
|
+
indent?: number;
|
|
202
|
+
parent?: number;
|
|
203
|
+
}[]>;
|
|
204
|
+
config: Ref< {
|
|
205
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
206
|
+
fullWidth?: boolean;
|
|
207
|
+
}, TableConfig_2 | {
|
|
208
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
209
|
+
fullWidth?: boolean;
|
|
210
|
+
}>;
|
|
211
|
+
table: Ref< {}, {}>;
|
|
212
|
+
display: Ref< {
|
|
213
|
+
childrenOpen?: boolean;
|
|
214
|
+
expanded?: boolean;
|
|
215
|
+
indent?: number;
|
|
216
|
+
isParent?: boolean;
|
|
217
|
+
isRoot?: boolean;
|
|
218
|
+
open?: boolean;
|
|
219
|
+
parent?: number;
|
|
220
|
+
rowModified?: boolean;
|
|
221
|
+
}[], TableDisplay_2[] | {
|
|
222
|
+
childrenOpen?: boolean;
|
|
223
|
+
expanded?: boolean;
|
|
224
|
+
indent?: number;
|
|
225
|
+
isParent?: boolean;
|
|
226
|
+
isRoot?: boolean;
|
|
227
|
+
open?: boolean;
|
|
228
|
+
parent?: number;
|
|
229
|
+
rowModified?: boolean;
|
|
230
|
+
}[]>;
|
|
231
|
+
modal: Ref< {
|
|
232
|
+
colIndex?: number;
|
|
233
|
+
event?: string;
|
|
234
|
+
left?: number;
|
|
235
|
+
parent?: HTMLElement;
|
|
236
|
+
rowIndex?: number;
|
|
237
|
+
top?: number;
|
|
238
|
+
visible?: boolean;
|
|
239
|
+
width?: string;
|
|
240
|
+
component?: string;
|
|
241
|
+
componentProps?: Record<string, any>;
|
|
242
|
+
}, TableModal_2 | {
|
|
243
|
+
colIndex?: number;
|
|
244
|
+
event?: string;
|
|
245
|
+
left?: number;
|
|
246
|
+
parent?: HTMLElement;
|
|
247
|
+
rowIndex?: number;
|
|
248
|
+
top?: number;
|
|
249
|
+
visible?: boolean;
|
|
250
|
+
width?: string;
|
|
251
|
+
component?: string;
|
|
252
|
+
componentProps?: Record<string, any>;
|
|
253
|
+
}>;
|
|
254
|
+
hasPinnedColumns: ComputedRef<boolean>;
|
|
255
|
+
numberedRowWidth: ComputedRef<string>;
|
|
256
|
+
zeroColumn: ComputedRef<boolean>;
|
|
257
|
+
closeModal: (event: MouseEvent) => void;
|
|
258
|
+
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
259
|
+
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
260
|
+
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
261
|
+
getHeaderCellStyle: (column: TableColumn_2) => CSSProperties;
|
|
262
|
+
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
263
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
264
|
+
isRowVisible: (rowIndex: number) => boolean;
|
|
265
|
+
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
266
|
+
toggleRowExpand: (rowIndex: number) => void;
|
|
267
|
+
}, "hasPinnedColumns" | "numberedRowWidth" | "zeroColumn">, Pick<{
|
|
268
|
+
columns: Ref< {
|
|
269
|
+
name: string;
|
|
270
|
+
align?: CanvasTextAlign;
|
|
271
|
+
edit?: boolean;
|
|
272
|
+
label?: string;
|
|
273
|
+
type?: string;
|
|
274
|
+
width?: string;
|
|
275
|
+
pinned?: boolean;
|
|
276
|
+
cellComponent?: string;
|
|
277
|
+
cellComponentProps?: Record<string, any>;
|
|
278
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
279
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
280
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
281
|
+
mask?: (value: any) => any;
|
|
282
|
+
}[], TableColumn_2[] | {
|
|
283
|
+
name: string;
|
|
284
|
+
align?: CanvasTextAlign;
|
|
285
|
+
edit?: boolean;
|
|
286
|
+
label?: string;
|
|
287
|
+
type?: string;
|
|
288
|
+
width?: string;
|
|
289
|
+
pinned?: boolean;
|
|
290
|
+
cellComponent?: string;
|
|
291
|
+
cellComponentProps?: Record<string, any>;
|
|
292
|
+
modalComponent?: string | ((context?: CellContext_2) => string);
|
|
293
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
294
|
+
format?: string | ((value: any, context?: CellContext_2) => string);
|
|
295
|
+
mask?: (value: any) => any;
|
|
296
|
+
}[]>;
|
|
297
|
+
rows: Ref< {
|
|
298
|
+
[x: string]: any;
|
|
299
|
+
indent?: number;
|
|
300
|
+
parent?: number;
|
|
301
|
+
}[], TableRow_2[] | {
|
|
302
|
+
[x: string]: any;
|
|
303
|
+
indent?: number;
|
|
304
|
+
parent?: number;
|
|
305
|
+
}[]>;
|
|
306
|
+
config: Ref< {
|
|
307
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
308
|
+
fullWidth?: boolean;
|
|
309
|
+
}, TableConfig_2 | {
|
|
310
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree";
|
|
311
|
+
fullWidth?: boolean;
|
|
312
|
+
}>;
|
|
313
|
+
table: Ref< {}, {}>;
|
|
314
|
+
display: Ref< {
|
|
315
|
+
childrenOpen?: boolean;
|
|
316
|
+
expanded?: boolean;
|
|
317
|
+
indent?: number;
|
|
318
|
+
isParent?: boolean;
|
|
319
|
+
isRoot?: boolean;
|
|
320
|
+
open?: boolean;
|
|
321
|
+
parent?: number;
|
|
322
|
+
rowModified?: boolean;
|
|
323
|
+
}[], TableDisplay_2[] | {
|
|
324
|
+
childrenOpen?: boolean;
|
|
325
|
+
expanded?: boolean;
|
|
326
|
+
indent?: number;
|
|
327
|
+
isParent?: boolean;
|
|
328
|
+
isRoot?: boolean;
|
|
329
|
+
open?: boolean;
|
|
330
|
+
parent?: number;
|
|
331
|
+
rowModified?: boolean;
|
|
332
|
+
}[]>;
|
|
333
|
+
modal: Ref< {
|
|
334
|
+
colIndex?: number;
|
|
335
|
+
event?: string;
|
|
336
|
+
left?: number;
|
|
337
|
+
parent?: HTMLElement;
|
|
338
|
+
rowIndex?: number;
|
|
339
|
+
top?: number;
|
|
340
|
+
visible?: boolean;
|
|
341
|
+
width?: string;
|
|
342
|
+
component?: string;
|
|
343
|
+
componentProps?: Record<string, any>;
|
|
344
|
+
}, TableModal_2 | {
|
|
345
|
+
colIndex?: number;
|
|
346
|
+
event?: string;
|
|
347
|
+
left?: number;
|
|
348
|
+
parent?: HTMLElement;
|
|
349
|
+
rowIndex?: number;
|
|
350
|
+
top?: number;
|
|
351
|
+
visible?: boolean;
|
|
352
|
+
width?: string;
|
|
353
|
+
component?: string;
|
|
354
|
+
componentProps?: Record<string, any>;
|
|
355
|
+
}>;
|
|
356
|
+
hasPinnedColumns: ComputedRef<boolean>;
|
|
357
|
+
numberedRowWidth: ComputedRef<string>;
|
|
358
|
+
zeroColumn: ComputedRef<boolean>;
|
|
359
|
+
closeModal: (event: MouseEvent) => void;
|
|
360
|
+
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
361
|
+
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
362
|
+
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
363
|
+
getHeaderCellStyle: (column: TableColumn_2) => CSSProperties;
|
|
364
|
+
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
365
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
366
|
+
isRowVisible: (rowIndex: number) => boolean;
|
|
367
|
+
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
368
|
+
toggleRowExpand: (rowIndex: number) => void;
|
|
369
|
+
}, "closeModal" | "getCellData" | "getCellDisplayValue" | "getFormattedValue" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowVisible" | "setCellData" | "toggleRowExpand">>;
|
|
29
370
|
|
|
30
371
|
/**
|
|
31
372
|
* Install all ATable components
|
|
@@ -34,16 +375,164 @@ export { CellContext }
|
|
|
34
375
|
*/
|
|
35
376
|
export declare function install(app: App): void;
|
|
36
377
|
|
|
37
|
-
|
|
378
|
+
/**
|
|
379
|
+
* Table column definition.
|
|
380
|
+
* @public
|
|
381
|
+
*/
|
|
382
|
+
export declare type TableColumn = {
|
|
383
|
+
name: string;
|
|
384
|
+
align?: CanvasTextAlign;
|
|
385
|
+
edit?: boolean;
|
|
386
|
+
label?: string;
|
|
387
|
+
type?: string;
|
|
388
|
+
width?: string;
|
|
389
|
+
pinned?: boolean;
|
|
390
|
+
cellComponent?: string;
|
|
391
|
+
cellComponentProps?: Record<string, any>;
|
|
392
|
+
modalComponent?: string | ((context?: CellContext) => string);
|
|
393
|
+
modalComponentExtraProps?: Record<string, any>;
|
|
394
|
+
format?: string | ((value: any, context?: CellContext) => string);
|
|
395
|
+
mask?: (value: any) => any;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Table column definition.
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
402
|
+
declare type TableColumn_2 = {
|
|
403
|
+
name: string
|
|
404
|
+
|
|
405
|
+
align?: CanvasTextAlign
|
|
406
|
+
edit?: boolean
|
|
407
|
+
label?: string
|
|
408
|
+
type?: string
|
|
409
|
+
width?: string
|
|
410
|
+
pinned?: boolean
|
|
38
411
|
|
|
39
|
-
|
|
412
|
+
cellComponent?: string
|
|
413
|
+
cellComponentProps?: Record<string, any>
|
|
414
|
+
modalComponent?: string | ((context?: CellContext_2) => string)
|
|
415
|
+
modalComponentExtraProps?: Record<string, any>
|
|
40
416
|
|
|
41
|
-
|
|
417
|
+
format?: string | ((value: any, context?: CellContext_2) => string)
|
|
418
|
+
mask?: (value: any) => any
|
|
419
|
+
}
|
|
42
420
|
|
|
43
|
-
|
|
421
|
+
/**
|
|
422
|
+
* Table configuration definition.
|
|
423
|
+
* @public
|
|
424
|
+
*/
|
|
425
|
+
export declare type TableConfig = {
|
|
426
|
+
/**
|
|
427
|
+
* The type of view to display the table in. Possible values:
|
|
428
|
+
* - `uncounted` - row numbers are not displayed in the table
|
|
429
|
+
* - `list` - row numbers are displayed in the table
|
|
430
|
+
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
431
|
+
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
432
|
+
*/
|
|
433
|
+
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree';
|
|
434
|
+
fullWidth?: boolean;
|
|
435
|
+
};
|
|
44
436
|
|
|
45
|
-
|
|
437
|
+
/**
|
|
438
|
+
* Table configuration definition.
|
|
439
|
+
* @public
|
|
440
|
+
*/
|
|
441
|
+
declare type TableConfig_2 = {
|
|
442
|
+
/**
|
|
443
|
+
* The type of view to display the table in. Possible values:
|
|
444
|
+
* - `uncounted` - row numbers are not displayed in the table
|
|
445
|
+
* - `list` - row numbers are displayed in the table
|
|
446
|
+
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
447
|
+
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
448
|
+
*/
|
|
449
|
+
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree'
|
|
450
|
+
fullWidth?: boolean
|
|
451
|
+
}
|
|
46
452
|
|
|
47
|
-
|
|
453
|
+
/**
|
|
454
|
+
* Table display definition.
|
|
455
|
+
* @public
|
|
456
|
+
*/
|
|
457
|
+
export declare type TableDisplay = {
|
|
458
|
+
childrenOpen?: boolean;
|
|
459
|
+
expanded?: boolean;
|
|
460
|
+
indent?: number;
|
|
461
|
+
isParent?: boolean;
|
|
462
|
+
isRoot?: boolean;
|
|
463
|
+
open?: boolean;
|
|
464
|
+
parent?: number;
|
|
465
|
+
rowModified?: boolean;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Table display definition.
|
|
470
|
+
* @public
|
|
471
|
+
*/
|
|
472
|
+
declare type TableDisplay_2 = {
|
|
473
|
+
childrenOpen?: boolean
|
|
474
|
+
expanded?: boolean
|
|
475
|
+
indent?: number
|
|
476
|
+
isParent?: boolean
|
|
477
|
+
isRoot?: boolean
|
|
478
|
+
open?: boolean
|
|
479
|
+
parent?: number
|
|
480
|
+
rowModified?: boolean
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Table modal definition.
|
|
485
|
+
* @public
|
|
486
|
+
*/
|
|
487
|
+
export declare type TableModal = {
|
|
488
|
+
colIndex?: number;
|
|
489
|
+
event?: string;
|
|
490
|
+
left?: number;
|
|
491
|
+
parent?: HTMLElement;
|
|
492
|
+
rowIndex?: number;
|
|
493
|
+
top?: number;
|
|
494
|
+
visible?: boolean;
|
|
495
|
+
width?: string;
|
|
496
|
+
component?: string;
|
|
497
|
+
componentProps?: Record<string, any>;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Table modal definition.
|
|
502
|
+
* @public
|
|
503
|
+
*/
|
|
504
|
+
declare type TableModal_2 = {
|
|
505
|
+
colIndex?: number
|
|
506
|
+
event?: string
|
|
507
|
+
left?: number
|
|
508
|
+
parent?: HTMLElement
|
|
509
|
+
rowIndex?: number
|
|
510
|
+
top?: number
|
|
511
|
+
visible?: boolean
|
|
512
|
+
width?: string
|
|
513
|
+
|
|
514
|
+
component?: string
|
|
515
|
+
componentProps?: Record<string, any>
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Table row definition.
|
|
520
|
+
* @public
|
|
521
|
+
*/
|
|
522
|
+
export declare type TableRow = {
|
|
523
|
+
[key: string]: any;
|
|
524
|
+
indent?: number;
|
|
525
|
+
parent?: number;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Table row definition.
|
|
530
|
+
* @public
|
|
531
|
+
*/
|
|
532
|
+
declare type TableRow_2 = {
|
|
533
|
+
[key: string]: any
|
|
534
|
+
indent?: number
|
|
535
|
+
parent?: number
|
|
536
|
+
}
|
|
48
537
|
|
|
49
538
|
export { }
|