@stonecrop/atable 0.4.23 → 0.4.25
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 +518 -86
- package/dist/atable.js +1340 -1044
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stores/table.d.ts +376 -77
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +138 -10
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +186 -41
- package/package.json +3 -3
- package/src/components/AGanttCell.vue +444 -170
- package/src/components/AGanttConnection.vue +164 -0
- package/src/components/ARow.vue +1 -1
- package/src/components/ATable.vue +96 -71
- package/src/components/ATableHeader.vue +1 -1
- package/src/index.ts +4 -0
- package/src/stores/table.ts +213 -45
- package/src/types/index.ts +159 -10
package/dist/src/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import ATableLoading from './components/ATableLoading.vue';
|
|
|
9
9
|
import ATableLoadingBar from './components/ATableLoadingBar.vue';
|
|
10
10
|
import ATableModal from './components/ATableModal.vue';
|
|
11
11
|
export { createTableStore } from './stores/table';
|
|
12
|
-
export type { CellContext, GanttDragEvent, GanttOptions, TableColumn, TableConfig, TableDisplay, TableModal, TableModalProps, TableRow, } from './types';
|
|
12
|
+
export type { CellContext, ConnectionEvent, ConnectionHandle, ConnectionPath, GanttBarInfo, GanttDragEvent, GanttOptions, TableColumn, TableConfig, TableDisplay, TableModal, TableModalProps, TableRow, } from './types';
|
|
13
13
|
/**
|
|
14
14
|
* Install all ATable components
|
|
15
15
|
* @param app - Vue app instance
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"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C,CAAA;AAChE,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,GACR,MAAM,SAAS,CAAA;AAEhB;;;;GAIG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,QAUxB;AAED,OAAO,EACN,KAAK,EACL,aAAa,EACb,UAAU,EACV,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,OAAO,GACP,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'vue';
|
|
2
|
-
import type { CellContext, GanttDragEvent, TableColumn, TableConfig, TableDisplay, TableModal, TableRow } from '../types';
|
|
2
|
+
import type { CellContext, ConnectionHandle, ConnectionPath, GanttBarInfo, GanttDragEvent, TableColumn, TableConfig, TableDisplay, TableModal, TableRow } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Create a table store
|
|
5
5
|
* @param initData - Initial data for the table store
|
|
@@ -11,10 +11,6 @@ export declare const createTableStore: (initData: {
|
|
|
11
11
|
rows: TableRow[];
|
|
12
12
|
id?: string;
|
|
13
13
|
config?: TableConfig;
|
|
14
|
-
table?: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
display?: TableDisplay[];
|
|
18
14
|
modal?: TableModal;
|
|
19
15
|
}) => import("pinia").Store<`table-${string}`, Pick<{
|
|
20
16
|
columns: import("vue").Ref<{
|
|
@@ -57,30 +53,91 @@ export declare const createTableStore: (initData: {
|
|
|
57
53
|
originalIndex?: number | undefined;
|
|
58
54
|
}[]>;
|
|
59
55
|
config: import("vue").Ref<{
|
|
60
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
56
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
61
57
|
fullWidth?: boolean | undefined;
|
|
62
58
|
}, TableConfig | {
|
|
63
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
59
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
64
60
|
fullWidth?: boolean | undefined;
|
|
65
61
|
}>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
connectionHandles: import("vue").Ref<{
|
|
63
|
+
id: string;
|
|
64
|
+
rowIndex: number;
|
|
65
|
+
colIndex: number;
|
|
66
|
+
side: "left" | "right";
|
|
67
|
+
position: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
};
|
|
71
|
+
visible: boolean;
|
|
72
|
+
barId: string;
|
|
73
|
+
}[], ConnectionHandle[] | {
|
|
74
|
+
id: string;
|
|
75
|
+
rowIndex: number;
|
|
76
|
+
colIndex: number;
|
|
77
|
+
side: "left" | "right";
|
|
78
|
+
position: {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
};
|
|
82
|
+
visible: boolean;
|
|
83
|
+
barId: string;
|
|
84
|
+
}[]>;
|
|
85
|
+
connectionPaths: import("vue").Ref<{
|
|
86
|
+
id: string;
|
|
87
|
+
from: {
|
|
88
|
+
barId: string;
|
|
89
|
+
side: "left" | "right";
|
|
90
|
+
};
|
|
91
|
+
to: {
|
|
92
|
+
barId: string;
|
|
93
|
+
side: "left" | "right";
|
|
94
|
+
};
|
|
95
|
+
style?: {
|
|
96
|
+
color?: string | undefined;
|
|
97
|
+
width?: number | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
label?: string | undefined;
|
|
100
|
+
}[], ConnectionPath[] | {
|
|
101
|
+
id: string;
|
|
102
|
+
from: {
|
|
103
|
+
barId: string;
|
|
104
|
+
side: "left" | "right";
|
|
105
|
+
};
|
|
106
|
+
to: {
|
|
107
|
+
barId: string;
|
|
108
|
+
side: "left" | "right";
|
|
109
|
+
};
|
|
110
|
+
style?: {
|
|
111
|
+
color?: string | undefined;
|
|
112
|
+
width?: number | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
label?: string | undefined;
|
|
115
|
+
}[]>;
|
|
116
|
+
display: import("vue").WritableComputedRef<TableDisplay[], TableDisplay[]>;
|
|
117
|
+
ganttBars: import("vue").Ref<{
|
|
118
|
+
id: string;
|
|
119
|
+
rowIndex: number;
|
|
120
|
+
colIndex: number;
|
|
121
|
+
startIndex: number;
|
|
122
|
+
endIndex: number;
|
|
123
|
+
color: string;
|
|
124
|
+
position: {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
};
|
|
128
|
+
label?: string | undefined;
|
|
129
|
+
}[], GanttBarInfo[] | {
|
|
130
|
+
id: string;
|
|
131
|
+
rowIndex: number;
|
|
132
|
+
colIndex: number;
|
|
133
|
+
startIndex: number;
|
|
134
|
+
endIndex: number;
|
|
135
|
+
color: string;
|
|
136
|
+
position: {
|
|
137
|
+
x: number;
|
|
138
|
+
y: number;
|
|
139
|
+
};
|
|
140
|
+
label?: string | undefined;
|
|
84
141
|
}[]>;
|
|
85
142
|
modal: import("vue").Ref<{
|
|
86
143
|
visible?: boolean | undefined;
|
|
@@ -128,26 +185,66 @@ export declare const createTableStore: (initData: {
|
|
|
128
185
|
colspan?: number | undefined;
|
|
129
186
|
} | undefined;
|
|
130
187
|
}[]>;
|
|
131
|
-
table: import("vue").
|
|
188
|
+
table: import("vue").ComputedRef<{}>;
|
|
132
189
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
133
190
|
hasPinnedColumns: import("vue").ComputedRef<boolean>;
|
|
191
|
+
isGanttView: import("vue").ComputedRef<boolean>;
|
|
192
|
+
isTreeView: import("vue").ComputedRef<boolean>;
|
|
134
193
|
numberedRowWidth: import("vue").ComputedRef<string>;
|
|
135
194
|
zeroColumn: import("vue").ComputedRef<boolean>;
|
|
136
195
|
closeModal: (event: MouseEvent) => void;
|
|
196
|
+
createConnection: (fromHandleId: string, toHandleId: string, options?: {
|
|
197
|
+
style?: ConnectionPath["style"];
|
|
198
|
+
label?: string;
|
|
199
|
+
}) => ConnectionPath | null;
|
|
200
|
+
deleteConnection: (connectionId: string) => boolean;
|
|
137
201
|
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
138
202
|
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
203
|
+
getConnectionsForBar: (barId: string) => {
|
|
204
|
+
id: string;
|
|
205
|
+
from: {
|
|
206
|
+
barId: string;
|
|
207
|
+
side: "left" | "right";
|
|
208
|
+
};
|
|
209
|
+
to: {
|
|
210
|
+
barId: string;
|
|
211
|
+
side: "left" | "right";
|
|
212
|
+
};
|
|
213
|
+
style?: {
|
|
214
|
+
color?: string | undefined;
|
|
215
|
+
width?: number | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
label?: string | undefined;
|
|
218
|
+
}[];
|
|
139
219
|
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
220
|
+
getHandlesForBar: (barId: string) => {
|
|
221
|
+
id: string;
|
|
222
|
+
rowIndex: number;
|
|
223
|
+
colIndex: number;
|
|
224
|
+
side: "left" | "right";
|
|
225
|
+
position: {
|
|
226
|
+
x: number;
|
|
227
|
+
y: number;
|
|
228
|
+
};
|
|
229
|
+
visible: boolean;
|
|
230
|
+
barId: string;
|
|
231
|
+
}[];
|
|
140
232
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
141
|
-
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
142
233
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
143
|
-
getRowExpandSymbol: (rowIndex: number) => "" | "
|
|
234
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "▼" | "►";
|
|
144
235
|
isRowGantt: (rowIndex: number) => boolean;
|
|
145
236
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
237
|
+
registerConnectionHandle: (handleInfo: ConnectionHandle) => void;
|
|
238
|
+
registerGanttBar: (barInfo: GanttBarInfo) => void;
|
|
239
|
+
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
146
240
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
147
241
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
148
242
|
toggleRowExpand: (rowIndex: number) => void;
|
|
243
|
+
unregisterConnectionHandle: (handleId: string) => void;
|
|
244
|
+
unregisterGanttBar: (barId: string) => void;
|
|
149
245
|
updateGanttBar: (event: GanttDragEvent) => void;
|
|
150
|
-
|
|
246
|
+
updateRows: (newRows: TableRow[]) => void;
|
|
247
|
+
}, "columns" | "config" | "connectionHandles" | "connectionPaths" | "ganttBars" | "modal" | "rows" | "updates">, Pick<{
|
|
151
248
|
columns: import("vue").Ref<{
|
|
152
249
|
name: string;
|
|
153
250
|
align?: CanvasTextAlign | undefined;
|
|
@@ -188,30 +285,91 @@ export declare const createTableStore: (initData: {
|
|
|
188
285
|
originalIndex?: number | undefined;
|
|
189
286
|
}[]>;
|
|
190
287
|
config: import("vue").Ref<{
|
|
191
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
288
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
192
289
|
fullWidth?: boolean | undefined;
|
|
193
290
|
}, TableConfig | {
|
|
194
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
291
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
195
292
|
fullWidth?: boolean | undefined;
|
|
196
293
|
}>;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
294
|
+
connectionHandles: import("vue").Ref<{
|
|
295
|
+
id: string;
|
|
296
|
+
rowIndex: number;
|
|
297
|
+
colIndex: number;
|
|
298
|
+
side: "left" | "right";
|
|
299
|
+
position: {
|
|
300
|
+
x: number;
|
|
301
|
+
y: number;
|
|
302
|
+
};
|
|
303
|
+
visible: boolean;
|
|
304
|
+
barId: string;
|
|
305
|
+
}[], ConnectionHandle[] | {
|
|
306
|
+
id: string;
|
|
307
|
+
rowIndex: number;
|
|
308
|
+
colIndex: number;
|
|
309
|
+
side: "left" | "right";
|
|
310
|
+
position: {
|
|
311
|
+
x: number;
|
|
312
|
+
y: number;
|
|
313
|
+
};
|
|
314
|
+
visible: boolean;
|
|
315
|
+
barId: string;
|
|
316
|
+
}[]>;
|
|
317
|
+
connectionPaths: import("vue").Ref<{
|
|
318
|
+
id: string;
|
|
319
|
+
from: {
|
|
320
|
+
barId: string;
|
|
321
|
+
side: "left" | "right";
|
|
322
|
+
};
|
|
323
|
+
to: {
|
|
324
|
+
barId: string;
|
|
325
|
+
side: "left" | "right";
|
|
326
|
+
};
|
|
327
|
+
style?: {
|
|
328
|
+
color?: string | undefined;
|
|
329
|
+
width?: number | undefined;
|
|
330
|
+
} | undefined;
|
|
331
|
+
label?: string | undefined;
|
|
332
|
+
}[], ConnectionPath[] | {
|
|
333
|
+
id: string;
|
|
334
|
+
from: {
|
|
335
|
+
barId: string;
|
|
336
|
+
side: "left" | "right";
|
|
337
|
+
};
|
|
338
|
+
to: {
|
|
339
|
+
barId: string;
|
|
340
|
+
side: "left" | "right";
|
|
341
|
+
};
|
|
342
|
+
style?: {
|
|
343
|
+
color?: string | undefined;
|
|
344
|
+
width?: number | undefined;
|
|
345
|
+
} | undefined;
|
|
346
|
+
label?: string | undefined;
|
|
347
|
+
}[]>;
|
|
348
|
+
display: import("vue").WritableComputedRef<TableDisplay[], TableDisplay[]>;
|
|
349
|
+
ganttBars: import("vue").Ref<{
|
|
350
|
+
id: string;
|
|
351
|
+
rowIndex: number;
|
|
352
|
+
colIndex: number;
|
|
353
|
+
startIndex: number;
|
|
354
|
+
endIndex: number;
|
|
355
|
+
color: string;
|
|
356
|
+
position: {
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
};
|
|
360
|
+
label?: string | undefined;
|
|
361
|
+
}[], GanttBarInfo[] | {
|
|
362
|
+
id: string;
|
|
363
|
+
rowIndex: number;
|
|
364
|
+
colIndex: number;
|
|
365
|
+
startIndex: number;
|
|
366
|
+
endIndex: number;
|
|
367
|
+
color: string;
|
|
368
|
+
position: {
|
|
369
|
+
x: number;
|
|
370
|
+
y: number;
|
|
371
|
+
};
|
|
372
|
+
label?: string | undefined;
|
|
215
373
|
}[]>;
|
|
216
374
|
modal: import("vue").Ref<{
|
|
217
375
|
visible?: boolean | undefined;
|
|
@@ -259,26 +417,66 @@ export declare const createTableStore: (initData: {
|
|
|
259
417
|
colspan?: number | undefined;
|
|
260
418
|
} | undefined;
|
|
261
419
|
}[]>;
|
|
262
|
-
table: import("vue").
|
|
420
|
+
table: import("vue").ComputedRef<{}>;
|
|
263
421
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
264
422
|
hasPinnedColumns: import("vue").ComputedRef<boolean>;
|
|
423
|
+
isGanttView: import("vue").ComputedRef<boolean>;
|
|
424
|
+
isTreeView: import("vue").ComputedRef<boolean>;
|
|
265
425
|
numberedRowWidth: import("vue").ComputedRef<string>;
|
|
266
426
|
zeroColumn: import("vue").ComputedRef<boolean>;
|
|
267
427
|
closeModal: (event: MouseEvent) => void;
|
|
428
|
+
createConnection: (fromHandleId: string, toHandleId: string, options?: {
|
|
429
|
+
style?: ConnectionPath["style"];
|
|
430
|
+
label?: string;
|
|
431
|
+
}) => ConnectionPath | null;
|
|
432
|
+
deleteConnection: (connectionId: string) => boolean;
|
|
268
433
|
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
269
434
|
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
435
|
+
getConnectionsForBar: (barId: string) => {
|
|
436
|
+
id: string;
|
|
437
|
+
from: {
|
|
438
|
+
barId: string;
|
|
439
|
+
side: "left" | "right";
|
|
440
|
+
};
|
|
441
|
+
to: {
|
|
442
|
+
barId: string;
|
|
443
|
+
side: "left" | "right";
|
|
444
|
+
};
|
|
445
|
+
style?: {
|
|
446
|
+
color?: string | undefined;
|
|
447
|
+
width?: number | undefined;
|
|
448
|
+
} | undefined;
|
|
449
|
+
label?: string | undefined;
|
|
450
|
+
}[];
|
|
270
451
|
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
452
|
+
getHandlesForBar: (barId: string) => {
|
|
453
|
+
id: string;
|
|
454
|
+
rowIndex: number;
|
|
455
|
+
colIndex: number;
|
|
456
|
+
side: "left" | "right";
|
|
457
|
+
position: {
|
|
458
|
+
x: number;
|
|
459
|
+
y: number;
|
|
460
|
+
};
|
|
461
|
+
visible: boolean;
|
|
462
|
+
barId: string;
|
|
463
|
+
}[];
|
|
271
464
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
272
|
-
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
273
465
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
274
|
-
getRowExpandSymbol: (rowIndex: number) => "" | "
|
|
466
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "▼" | "►";
|
|
275
467
|
isRowGantt: (rowIndex: number) => boolean;
|
|
276
468
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
469
|
+
registerConnectionHandle: (handleInfo: ConnectionHandle) => void;
|
|
470
|
+
registerGanttBar: (barInfo: GanttBarInfo) => void;
|
|
471
|
+
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
277
472
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
278
473
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
279
474
|
toggleRowExpand: (rowIndex: number) => void;
|
|
475
|
+
unregisterConnectionHandle: (handleId: string) => void;
|
|
476
|
+
unregisterGanttBar: (barId: string) => void;
|
|
280
477
|
updateGanttBar: (event: GanttDragEvent) => void;
|
|
281
|
-
|
|
478
|
+
updateRows: (newRows: TableRow[]) => void;
|
|
479
|
+
}, "display" | "table" | "hasPinnedColumns" | "isGanttView" | "isTreeView" | "numberedRowWidth" | "zeroColumn">, Pick<{
|
|
282
480
|
columns: import("vue").Ref<{
|
|
283
481
|
name: string;
|
|
284
482
|
align?: CanvasTextAlign | undefined;
|
|
@@ -319,30 +517,91 @@ export declare const createTableStore: (initData: {
|
|
|
319
517
|
originalIndex?: number | undefined;
|
|
320
518
|
}[]>;
|
|
321
519
|
config: import("vue").Ref<{
|
|
322
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
520
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
323
521
|
fullWidth?: boolean | undefined;
|
|
324
522
|
}, TableConfig | {
|
|
325
|
-
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | undefined;
|
|
523
|
+
view?: "uncounted" | "list" | "list-expansion" | "tree" | "gantt" | "tree-gantt" | undefined;
|
|
326
524
|
fullWidth?: boolean | undefined;
|
|
327
525
|
}>;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
526
|
+
connectionHandles: import("vue").Ref<{
|
|
527
|
+
id: string;
|
|
528
|
+
rowIndex: number;
|
|
529
|
+
colIndex: number;
|
|
530
|
+
side: "left" | "right";
|
|
531
|
+
position: {
|
|
532
|
+
x: number;
|
|
533
|
+
y: number;
|
|
534
|
+
};
|
|
535
|
+
visible: boolean;
|
|
536
|
+
barId: string;
|
|
537
|
+
}[], ConnectionHandle[] | {
|
|
538
|
+
id: string;
|
|
539
|
+
rowIndex: number;
|
|
540
|
+
colIndex: number;
|
|
541
|
+
side: "left" | "right";
|
|
542
|
+
position: {
|
|
543
|
+
x: number;
|
|
544
|
+
y: number;
|
|
545
|
+
};
|
|
546
|
+
visible: boolean;
|
|
547
|
+
barId: string;
|
|
548
|
+
}[]>;
|
|
549
|
+
connectionPaths: import("vue").Ref<{
|
|
550
|
+
id: string;
|
|
551
|
+
from: {
|
|
552
|
+
barId: string;
|
|
553
|
+
side: "left" | "right";
|
|
554
|
+
};
|
|
555
|
+
to: {
|
|
556
|
+
barId: string;
|
|
557
|
+
side: "left" | "right";
|
|
558
|
+
};
|
|
559
|
+
style?: {
|
|
560
|
+
color?: string | undefined;
|
|
561
|
+
width?: number | undefined;
|
|
562
|
+
} | undefined;
|
|
563
|
+
label?: string | undefined;
|
|
564
|
+
}[], ConnectionPath[] | {
|
|
565
|
+
id: string;
|
|
566
|
+
from: {
|
|
567
|
+
barId: string;
|
|
568
|
+
side: "left" | "right";
|
|
569
|
+
};
|
|
570
|
+
to: {
|
|
571
|
+
barId: string;
|
|
572
|
+
side: "left" | "right";
|
|
573
|
+
};
|
|
574
|
+
style?: {
|
|
575
|
+
color?: string | undefined;
|
|
576
|
+
width?: number | undefined;
|
|
577
|
+
} | undefined;
|
|
578
|
+
label?: string | undefined;
|
|
579
|
+
}[]>;
|
|
580
|
+
display: import("vue").WritableComputedRef<TableDisplay[], TableDisplay[]>;
|
|
581
|
+
ganttBars: import("vue").Ref<{
|
|
582
|
+
id: string;
|
|
583
|
+
rowIndex: number;
|
|
584
|
+
colIndex: number;
|
|
585
|
+
startIndex: number;
|
|
586
|
+
endIndex: number;
|
|
587
|
+
color: string;
|
|
588
|
+
position: {
|
|
589
|
+
x: number;
|
|
590
|
+
y: number;
|
|
591
|
+
};
|
|
592
|
+
label?: string | undefined;
|
|
593
|
+
}[], GanttBarInfo[] | {
|
|
594
|
+
id: string;
|
|
595
|
+
rowIndex: number;
|
|
596
|
+
colIndex: number;
|
|
597
|
+
startIndex: number;
|
|
598
|
+
endIndex: number;
|
|
599
|
+
color: string;
|
|
600
|
+
position: {
|
|
601
|
+
x: number;
|
|
602
|
+
y: number;
|
|
603
|
+
};
|
|
604
|
+
label?: string | undefined;
|
|
346
605
|
}[]>;
|
|
347
606
|
modal: import("vue").Ref<{
|
|
348
607
|
visible?: boolean | undefined;
|
|
@@ -390,24 +649,64 @@ export declare const createTableStore: (initData: {
|
|
|
390
649
|
colspan?: number | undefined;
|
|
391
650
|
} | undefined;
|
|
392
651
|
}[]>;
|
|
393
|
-
table: import("vue").
|
|
652
|
+
table: import("vue").ComputedRef<{}>;
|
|
394
653
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
395
654
|
hasPinnedColumns: import("vue").ComputedRef<boolean>;
|
|
655
|
+
isGanttView: import("vue").ComputedRef<boolean>;
|
|
656
|
+
isTreeView: import("vue").ComputedRef<boolean>;
|
|
396
657
|
numberedRowWidth: import("vue").ComputedRef<string>;
|
|
397
658
|
zeroColumn: import("vue").ComputedRef<boolean>;
|
|
398
659
|
closeModal: (event: MouseEvent) => void;
|
|
660
|
+
createConnection: (fromHandleId: string, toHandleId: string, options?: {
|
|
661
|
+
style?: ConnectionPath["style"];
|
|
662
|
+
label?: string;
|
|
663
|
+
}) => ConnectionPath | null;
|
|
664
|
+
deleteConnection: (connectionId: string) => boolean;
|
|
399
665
|
getCellData: <T = any>(colIndex: number, rowIndex: number) => T;
|
|
400
666
|
getCellDisplayValue: (colIndex: number, rowIndex: number) => any;
|
|
667
|
+
getConnectionsForBar: (barId: string) => {
|
|
668
|
+
id: string;
|
|
669
|
+
from: {
|
|
670
|
+
barId: string;
|
|
671
|
+
side: "left" | "right";
|
|
672
|
+
};
|
|
673
|
+
to: {
|
|
674
|
+
barId: string;
|
|
675
|
+
side: "left" | "right";
|
|
676
|
+
};
|
|
677
|
+
style?: {
|
|
678
|
+
color?: string | undefined;
|
|
679
|
+
width?: number | undefined;
|
|
680
|
+
} | undefined;
|
|
681
|
+
label?: string | undefined;
|
|
682
|
+
}[];
|
|
401
683
|
getFormattedValue: (colIndex: number, rowIndex: number, value: any) => any;
|
|
684
|
+
getHandlesForBar: (barId: string) => {
|
|
685
|
+
id: string;
|
|
686
|
+
rowIndex: number;
|
|
687
|
+
colIndex: number;
|
|
688
|
+
side: "left" | "right";
|
|
689
|
+
position: {
|
|
690
|
+
x: number;
|
|
691
|
+
y: number;
|
|
692
|
+
};
|
|
693
|
+
visible: boolean;
|
|
694
|
+
barId: string;
|
|
695
|
+
}[];
|
|
402
696
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
403
|
-
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
404
697
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
405
|
-
getRowExpandSymbol: (rowIndex: number) => "" | "
|
|
698
|
+
getRowExpandSymbol: (rowIndex: number) => "" | "▼" | "►";
|
|
406
699
|
isRowGantt: (rowIndex: number) => boolean;
|
|
407
700
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
701
|
+
registerConnectionHandle: (handleInfo: ConnectionHandle) => void;
|
|
702
|
+
registerGanttBar: (barInfo: GanttBarInfo) => void;
|
|
703
|
+
resizeColumn: (colIndex: number, newWidth: number) => void;
|
|
408
704
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
409
705
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
410
706
|
toggleRowExpand: (rowIndex: number) => void;
|
|
707
|
+
unregisterConnectionHandle: (handleId: string) => void;
|
|
708
|
+
unregisterGanttBar: (barId: string) => void;
|
|
411
709
|
updateGanttBar: (event: GanttDragEvent) => void;
|
|
412
|
-
|
|
710
|
+
updateRows: (newRows: TableRow[]) => void;
|
|
711
|
+
}, "closeModal" | "createConnection" | "deleteConnection" | "getCellData" | "getCellDisplayValue" | "getConnectionsForBar" | "getFormattedValue" | "getHandlesForBar" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowGantt" | "isRowVisible" | "registerConnectionHandle" | "registerGanttBar" | "resizeColumn" | "setCellData" | "setCellText" | "toggleRowExpand" | "unregisterConnectionHandle" | "unregisterGanttBar" | "updateGanttBar" | "updateRows">>;
|
|
413
712
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/stores/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,UAAU,CAAA;AAGjB;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU;IAC1C,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,KAAK,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/stores/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EACX,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,cAA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