@stonecrop/atable 0.4.33 → 0.4.34
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/README.md +44 -0
- package/dist/atable.d.ts +169 -32
- package/dist/atable.js +550 -525
- 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/stores/table.d.ts +78 -6
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +72 -12
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +47 -5
- package/package.json +3 -3
- package/src/stores/table.ts +53 -5
- package/src/types/index.ts +80 -13
|
@@ -53,13 +53,37 @@ export declare const createTableStore: (initData: {
|
|
|
53
53
|
originalIndex?: number | undefined;
|
|
54
54
|
}[]>;
|
|
55
55
|
config: import("vue").Ref<{
|
|
56
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
56
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
57
57
|
fullWidth?: boolean | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
view: "tree";
|
|
60
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
61
|
+
fullWidth?: boolean | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
view: "gantt";
|
|
64
|
+
dependencyGraph?: boolean | undefined;
|
|
65
|
+
fullWidth?: boolean | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
view: "tree-gantt";
|
|
68
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
58
69
|
dependencyGraph?: boolean | undefined;
|
|
70
|
+
fullWidth?: boolean | undefined;
|
|
59
71
|
}, TableConfig | {
|
|
60
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
72
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
73
|
+
fullWidth?: boolean | undefined;
|
|
74
|
+
} | {
|
|
75
|
+
view: "tree";
|
|
76
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
77
|
+
fullWidth?: boolean | undefined;
|
|
78
|
+
} | {
|
|
79
|
+
view: "gantt";
|
|
80
|
+
dependencyGraph?: boolean | undefined;
|
|
61
81
|
fullWidth?: boolean | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
view: "tree-gantt";
|
|
84
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
62
85
|
dependencyGraph?: boolean | undefined;
|
|
86
|
+
fullWidth?: boolean | undefined;
|
|
63
87
|
}>;
|
|
64
88
|
connectionHandles: import("vue").Ref<{
|
|
65
89
|
id: string;
|
|
@@ -288,13 +312,37 @@ export declare const createTableStore: (initData: {
|
|
|
288
312
|
originalIndex?: number | undefined;
|
|
289
313
|
}[]>;
|
|
290
314
|
config: import("vue").Ref<{
|
|
291
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
315
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
316
|
+
fullWidth?: boolean | undefined;
|
|
317
|
+
} | {
|
|
318
|
+
view: "tree";
|
|
319
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
292
320
|
fullWidth?: boolean | undefined;
|
|
321
|
+
} | {
|
|
322
|
+
view: "gantt";
|
|
293
323
|
dependencyGraph?: boolean | undefined;
|
|
324
|
+
fullWidth?: boolean | undefined;
|
|
325
|
+
} | {
|
|
326
|
+
view: "tree-gantt";
|
|
327
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
328
|
+
dependencyGraph?: boolean | undefined;
|
|
329
|
+
fullWidth?: boolean | undefined;
|
|
294
330
|
}, TableConfig | {
|
|
295
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
331
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
296
332
|
fullWidth?: boolean | undefined;
|
|
333
|
+
} | {
|
|
334
|
+
view: "tree";
|
|
335
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
336
|
+
fullWidth?: boolean | undefined;
|
|
337
|
+
} | {
|
|
338
|
+
view: "gantt";
|
|
339
|
+
dependencyGraph?: boolean | undefined;
|
|
340
|
+
fullWidth?: boolean | undefined;
|
|
341
|
+
} | {
|
|
342
|
+
view: "tree-gantt";
|
|
343
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
297
344
|
dependencyGraph?: boolean | undefined;
|
|
345
|
+
fullWidth?: boolean | undefined;
|
|
298
346
|
}>;
|
|
299
347
|
connectionHandles: import("vue").Ref<{
|
|
300
348
|
id: string;
|
|
@@ -523,13 +571,37 @@ export declare const createTableStore: (initData: {
|
|
|
523
571
|
originalIndex?: number | undefined;
|
|
524
572
|
}[]>;
|
|
525
573
|
config: import("vue").Ref<{
|
|
526
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
574
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
575
|
+
fullWidth?: boolean | undefined;
|
|
576
|
+
} | {
|
|
577
|
+
view: "tree";
|
|
578
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
579
|
+
fullWidth?: boolean | undefined;
|
|
580
|
+
} | {
|
|
581
|
+
view: "gantt";
|
|
582
|
+
dependencyGraph?: boolean | undefined;
|
|
527
583
|
fullWidth?: boolean | undefined;
|
|
584
|
+
} | {
|
|
585
|
+
view: "tree-gantt";
|
|
586
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
528
587
|
dependencyGraph?: boolean | undefined;
|
|
588
|
+
fullWidth?: boolean | undefined;
|
|
529
589
|
}, TableConfig | {
|
|
530
|
-
view?: "uncounted" | "list" | "list-expansion" |
|
|
590
|
+
view?: "uncounted" | "list" | "list-expansion" | undefined;
|
|
591
|
+
fullWidth?: boolean | undefined;
|
|
592
|
+
} | {
|
|
593
|
+
view: "tree";
|
|
594
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
531
595
|
fullWidth?: boolean | undefined;
|
|
596
|
+
} | {
|
|
597
|
+
view: "gantt";
|
|
532
598
|
dependencyGraph?: boolean | undefined;
|
|
599
|
+
fullWidth?: boolean | undefined;
|
|
600
|
+
} | {
|
|
601
|
+
view: "tree-gantt";
|
|
602
|
+
defaultTreeExpansion?: "root" | "branch" | "leaf" | undefined;
|
|
603
|
+
dependencyGraph?: boolean | undefined;
|
|
604
|
+
fullWidth?: boolean | undefined;
|
|
533
605
|
}>;
|
|
534
606
|
connectionHandles: import("vue").Ref<{
|
|
535
607
|
id: string;
|
|
@@ -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,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,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,UAAU,CAAA;CAClB
|
|
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,cAAc,EACd,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,UAAU,CAAA;AAGjB;;;;;GAKG;AACH,eAAO,MAAM,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M,YAAY,MAAM,KAAG,CAAC;oCA6H7B,MAAM,YAAY,MAAM;kCA+I1B,MAAM;;;;;;;;;;;;;;;;kCA1IN,MAAM,YAAY,MAAM,SAAS,GAAG;8BA8IxC,MAAM;;;;;;;;;;;;iCAlPH,WAAW,KAAG,aAAa;0BAmIlC,MAAM,gBAAgB,MAAM;mCA3FnB,MAAM;2BATd,MAAM;6BAKJ,MAAM;2CA+IQ,gBAAgB;gCAlB3B,YAAY;6BA9If,MAAM,YAAY,MAAM;4BAhDzB,MAAM,YAAY,MAAM,SAAS,GAAG;4BAoBpC,MAAM,YAAY,MAAM,SAAS,MAAM;gCAiEnC,MAAM;2CAsIK,MAAM;gCAlBjB,MAAM;4BAjCV,cAAc;0BAxJhB,QAAQ,EAAE;kdAoTxC,CAAA"}
|
|
@@ -155,26 +155,55 @@ export interface CellContext {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* Base table configuration properties shared across all view types.
|
|
159
159
|
* @public
|
|
160
160
|
*/
|
|
161
|
-
export interface
|
|
162
|
-
/**
|
|
163
|
-
* The type of view to display the table in. Possible values:
|
|
164
|
-
* - `uncounted` - row numbers are not displayed in the table
|
|
165
|
-
* - `list` - row numbers are displayed in the table
|
|
166
|
-
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
167
|
-
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
168
|
-
* - `gantt` - view that allows specific rows to be displayed with Gantt functionality
|
|
169
|
-
* - `tree-gantt` - similar to `gantt`, but allows for tree functionality as well
|
|
170
|
-
*/
|
|
171
|
-
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree' | 'gantt' | 'tree-gantt';
|
|
161
|
+
export interface BaseTableConfig {
|
|
172
162
|
/**
|
|
173
163
|
* Control whether the table should be allowed to use the full width of its container.
|
|
174
164
|
*
|
|
175
165
|
* @defaultValue false
|
|
176
166
|
*/
|
|
177
167
|
fullWidth?: boolean;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Table configuration for basic view types (uncounted, list, list-expansion).
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
173
|
+
export interface BasicTableConfig extends BaseTableConfig {
|
|
174
|
+
/**
|
|
175
|
+
* The type of view to display the table in.
|
|
176
|
+
*/
|
|
177
|
+
view?: 'uncounted' | 'list' | 'list-expansion';
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Table configuration for tree view types.
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
export interface TreeTableConfig extends BaseTableConfig {
|
|
184
|
+
/**
|
|
185
|
+
* The type of view to display the table in.
|
|
186
|
+
*/
|
|
187
|
+
view: 'tree';
|
|
188
|
+
/**
|
|
189
|
+
* Default expansion state for tree views. Possible values:
|
|
190
|
+
* - `root` - Only top-level nodes are visible (fully collapsed)
|
|
191
|
+
* - `branch` - Shows minimal tree to display all gantt nodes. Expands only the necessary paths to gantt nodes, stops at gantt nodes with no gantt descendants
|
|
192
|
+
* - `leaf` - All nodes are visible (fully expanded)
|
|
193
|
+
*
|
|
194
|
+
* @defaultValue undefined (default behavior is 'leaf' mode)
|
|
195
|
+
*/
|
|
196
|
+
defaultTreeExpansion?: 'root' | 'branch' | 'leaf';
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Table configuration for gantt view types.
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
export interface GanttTableConfig extends BaseTableConfig {
|
|
203
|
+
/**
|
|
204
|
+
* The type of view to display the table in.
|
|
205
|
+
*/
|
|
206
|
+
view: 'gantt';
|
|
178
207
|
/**
|
|
179
208
|
* Control whether dependency graph connections should be enabled for Gantt views.
|
|
180
209
|
* When false, connection handles and dependency lines will be hidden.
|
|
@@ -183,6 +212,37 @@ export interface TableConfig {
|
|
|
183
212
|
*/
|
|
184
213
|
dependencyGraph?: boolean;
|
|
185
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Table configuration for tree-gantt view types.
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
export interface TreeGanttTableConfig extends BaseTableConfig {
|
|
220
|
+
/**
|
|
221
|
+
* The type of view to display the table in.
|
|
222
|
+
*/
|
|
223
|
+
view: 'tree-gantt';
|
|
224
|
+
/**
|
|
225
|
+
* Default expansion state for tree views. Possible values:
|
|
226
|
+
* - `root` - Only top-level nodes are visible (fully collapsed)
|
|
227
|
+
* - `branch` - Shows minimal tree to display all gantt nodes. Expands only the necessary paths to gantt nodes, stops at gantt nodes with no gantt descendants
|
|
228
|
+
* - `leaf` - All nodes are visible (fully expanded)
|
|
229
|
+
*
|
|
230
|
+
* @defaultValue undefined (default behavior is 'leaf' mode)
|
|
231
|
+
*/
|
|
232
|
+
defaultTreeExpansion?: 'root' | 'branch' | 'leaf';
|
|
233
|
+
/**
|
|
234
|
+
* Control whether dependency graph connections should be enabled for Gantt views.
|
|
235
|
+
* When false, connection handles and dependency lines will be hidden.
|
|
236
|
+
*
|
|
237
|
+
* @defaultValue true
|
|
238
|
+
*/
|
|
239
|
+
dependencyGraph?: boolean;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Table configuration definition using discriminated unions for type safety.
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
export type TableConfig = BasicTableConfig | TreeTableConfig | GanttTableConfig | TreeGanttTableConfig;
|
|
186
246
|
/**
|
|
187
247
|
* Table display definition.
|
|
188
248
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;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W,gBAAgB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAEtB;;OAEG;IACH,QAAQ,EAAE;QACT,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;QACrB,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;KACrB,CAAA;IAED;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE;QACL,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KACtB,CAAA;IAED;;OAEG;IACH,EAAE,EAAE;QACH,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KACtB,CAAA;IAED;;OAEG;IACH,KAAK,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,KAAK,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IAED;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAA;IACzB,UAAU,EAAE,cAAc,CAAA;CAC1B,CAAA"}
|
package/dist/stores/table.js
CHANGED
|
@@ -20,16 +20,53 @@ export const createTableStore = (initData) => {
|
|
|
20
20
|
parents.add(row.parent);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
// Helper function to check if a row has gantt data
|
|
24
|
+
const hasGanttData = (rowIndex) => {
|
|
25
|
+
return rows.value[rowIndex]?.gantt !== undefined;
|
|
26
|
+
};
|
|
27
|
+
// Helper function to check if any descendant has gantt data
|
|
28
|
+
const hasGanttDescendant = (rowIndex) => {
|
|
29
|
+
for (let i = 0; i < rows.value.length; i++) {
|
|
30
|
+
if (rows.value[i].parent === rowIndex) {
|
|
31
|
+
if (hasGanttData(i) || hasGanttDescendant(i)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
// Helper function to determine if children should be open based on expansion mode
|
|
39
|
+
const shouldChildrenBeOpen = (rowIndex) => {
|
|
40
|
+
const currentConfig = config.value;
|
|
41
|
+
const expansionMode = currentConfig.view === 'tree' || currentConfig.view === 'tree-gantt'
|
|
42
|
+
? currentConfig.defaultTreeExpansion
|
|
43
|
+
: undefined;
|
|
44
|
+
if (!expansionMode)
|
|
45
|
+
return true; // Default behavior - start expanded (leaf mode)
|
|
46
|
+
switch (expansionMode) {
|
|
47
|
+
case 'root':
|
|
48
|
+
return false; // Only root nodes are visible, all children start collapsed
|
|
49
|
+
case 'branch':
|
|
50
|
+
// Only expand if this node leads to gantt nodes OR if this node itself has gantt data AND has gantt children
|
|
51
|
+
return hasGanttDescendant(rowIndex);
|
|
52
|
+
case 'leaf':
|
|
53
|
+
return true; // All nodes should be expanded
|
|
54
|
+
default:
|
|
55
|
+
return true; // Default to expanded if unknown mode
|
|
56
|
+
}
|
|
57
|
+
};
|
|
23
58
|
for (let rowIndex = 0; rowIndex < rows.value.length; rowIndex++) {
|
|
24
59
|
const row = rows.value[rowIndex];
|
|
60
|
+
const isRootNode = row.parent === null || row.parent === undefined;
|
|
61
|
+
const isParentNode = parents.has(rowIndex);
|
|
25
62
|
defaultDisplay[rowIndex] = {
|
|
26
|
-
childrenOpen:
|
|
63
|
+
childrenOpen: shouldChildrenBeOpen(rowIndex),
|
|
27
64
|
expanded: false,
|
|
28
65
|
indent: row.indent || 0,
|
|
29
|
-
isParent:
|
|
30
|
-
isRoot:
|
|
66
|
+
isParent: isParentNode,
|
|
67
|
+
isRoot: isRootNode,
|
|
31
68
|
rowModified: false,
|
|
32
|
-
open:
|
|
69
|
+
open: isRootNode, // This will be recalculated later for non-root nodes
|
|
33
70
|
parent: row.parent,
|
|
34
71
|
};
|
|
35
72
|
}
|
|
@@ -112,7 +149,12 @@ export const createTableStore = (initData) => {
|
|
|
112
149
|
const hasPinnedColumns = computed(() => columns.value.some(col => col.pinned));
|
|
113
150
|
const isGanttView = computed(() => config.value.view === 'gantt' || config.value.view === 'tree-gantt');
|
|
114
151
|
const isTreeView = computed(() => config.value.view === 'tree' || config.value.view === 'tree-gantt');
|
|
115
|
-
const isDependencyGraphEnabled = computed(() =>
|
|
152
|
+
const isDependencyGraphEnabled = computed(() => {
|
|
153
|
+
const currentConfig = config.value;
|
|
154
|
+
return currentConfig.view === 'gantt' || currentConfig.view === 'tree-gantt'
|
|
155
|
+
? currentConfig.dependencyGraph !== false
|
|
156
|
+
: true;
|
|
157
|
+
});
|
|
116
158
|
const numberedRowWidth = computed(() => {
|
|
117
159
|
const indent = Math.ceil(rows.value.length / 100 + 1);
|
|
118
160
|
return `${indent}ch`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/atable",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@vueuse/core": "^13.6.0",
|
|
43
43
|
"pinia": "^3.0.3",
|
|
44
44
|
"vue": "^3.5.18",
|
|
45
|
-
"@stonecrop/
|
|
46
|
-
"@stonecrop/
|
|
45
|
+
"@stonecrop/utilities": "0.4.34",
|
|
46
|
+
"@stonecrop/themes": "0.4.34"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@microsoft/api-documenter": "^7.26.31",
|
package/src/stores/table.ts
CHANGED
|
@@ -42,16 +42,59 @@ export const createTableStore = (initData: {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// Helper function to check if a row has gantt data
|
|
46
|
+
const hasGanttData = (rowIndex: number): boolean => {
|
|
47
|
+
return rows.value[rowIndex]?.gantt !== undefined
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Helper function to check if any descendant has gantt data
|
|
51
|
+
const hasGanttDescendant = (rowIndex: number): boolean => {
|
|
52
|
+
for (let i = 0; i < rows.value.length; i++) {
|
|
53
|
+
if (rows.value[i].parent === rowIndex) {
|
|
54
|
+
if (hasGanttData(i) || hasGanttDescendant(i)) {
|
|
55
|
+
return true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return false
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Helper function to determine if children should be open based on expansion mode
|
|
63
|
+
const shouldChildrenBeOpen = (rowIndex: number): boolean => {
|
|
64
|
+
const currentConfig = config.value
|
|
65
|
+
const expansionMode =
|
|
66
|
+
currentConfig.view === 'tree' || currentConfig.view === 'tree-gantt'
|
|
67
|
+
? currentConfig.defaultTreeExpansion
|
|
68
|
+
: undefined
|
|
69
|
+
|
|
70
|
+
if (!expansionMode) return true // Default behavior - start expanded (leaf mode)
|
|
71
|
+
|
|
72
|
+
switch (expansionMode) {
|
|
73
|
+
case 'root':
|
|
74
|
+
return false // Only root nodes are visible, all children start collapsed
|
|
75
|
+
case 'branch':
|
|
76
|
+
// Only expand if this node leads to gantt nodes OR if this node itself has gantt data AND has gantt children
|
|
77
|
+
return hasGanttDescendant(rowIndex)
|
|
78
|
+
case 'leaf':
|
|
79
|
+
return true // All nodes should be expanded
|
|
80
|
+
default:
|
|
81
|
+
return true // Default to expanded if unknown mode
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
45
85
|
for (let rowIndex = 0; rowIndex < rows.value.length; rowIndex++) {
|
|
46
86
|
const row = rows.value[rowIndex]
|
|
87
|
+
const isRootNode = row.parent === null || row.parent === undefined
|
|
88
|
+
const isParentNode = parents.has(rowIndex)
|
|
89
|
+
|
|
47
90
|
defaultDisplay[rowIndex] = {
|
|
48
|
-
childrenOpen:
|
|
91
|
+
childrenOpen: shouldChildrenBeOpen(rowIndex),
|
|
49
92
|
expanded: false,
|
|
50
93
|
indent: row.indent || 0,
|
|
51
|
-
isParent:
|
|
52
|
-
isRoot:
|
|
94
|
+
isParent: isParentNode,
|
|
95
|
+
isRoot: isRootNode,
|
|
53
96
|
rowModified: false,
|
|
54
|
-
open:
|
|
97
|
+
open: isRootNode, // This will be recalculated later for non-root nodes
|
|
55
98
|
parent: row.parent,
|
|
56
99
|
}
|
|
57
100
|
}
|
|
@@ -148,7 +191,12 @@ export const createTableStore = (initData: {
|
|
|
148
191
|
const hasPinnedColumns = computed(() => columns.value.some(col => col.pinned))
|
|
149
192
|
const isGanttView = computed(() => config.value.view === 'gantt' || config.value.view === 'tree-gantt')
|
|
150
193
|
const isTreeView = computed(() => config.value.view === 'tree' || config.value.view === 'tree-gantt')
|
|
151
|
-
const isDependencyGraphEnabled = computed(() =>
|
|
194
|
+
const isDependencyGraphEnabled = computed(() => {
|
|
195
|
+
const currentConfig = config.value
|
|
196
|
+
return currentConfig.view === 'gantt' || currentConfig.view === 'tree-gantt'
|
|
197
|
+
? currentConfig.dependencyGraph !== false
|
|
198
|
+
: true
|
|
199
|
+
})
|
|
152
200
|
|
|
153
201
|
const numberedRowWidth = computed(() => {
|
|
154
202
|
const indent = Math.ceil(rows.value.length / 100 + 1)
|
package/src/types/index.ts
CHANGED
|
@@ -176,27 +176,59 @@ export interface CellContext {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* Base table configuration properties shared across all view types.
|
|
180
180
|
* @public
|
|
181
181
|
*/
|
|
182
|
-
export interface
|
|
183
|
-
/**
|
|
184
|
-
* The type of view to display the table in. Possible values:
|
|
185
|
-
* - `uncounted` - row numbers are not displayed in the table
|
|
186
|
-
* - `list` - row numbers are displayed in the table
|
|
187
|
-
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
188
|
-
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
189
|
-
* - `gantt` - view that allows specific rows to be displayed with Gantt functionality
|
|
190
|
-
* - `tree-gantt` - similar to `gantt`, but allows for tree functionality as well
|
|
191
|
-
*/
|
|
192
|
-
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree' | 'gantt' | 'tree-gantt'
|
|
193
|
-
|
|
182
|
+
export interface BaseTableConfig {
|
|
194
183
|
/**
|
|
195
184
|
* Control whether the table should be allowed to use the full width of its container.
|
|
196
185
|
*
|
|
197
186
|
* @defaultValue false
|
|
198
187
|
*/
|
|
199
188
|
fullWidth?: boolean
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Table configuration for basic view types (uncounted, list, list-expansion).
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
export interface BasicTableConfig extends BaseTableConfig {
|
|
196
|
+
/**
|
|
197
|
+
* The type of view to display the table in.
|
|
198
|
+
*/
|
|
199
|
+
view?: 'uncounted' | 'list' | 'list-expansion'
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Table configuration for tree view types.
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
export interface TreeTableConfig extends BaseTableConfig {
|
|
207
|
+
/**
|
|
208
|
+
* The type of view to display the table in.
|
|
209
|
+
*/
|
|
210
|
+
view: 'tree'
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Default expansion state for tree views. Possible values:
|
|
214
|
+
* - `root` - Only top-level nodes are visible (fully collapsed)
|
|
215
|
+
* - `branch` - Shows minimal tree to display all gantt nodes. Expands only the necessary paths to gantt nodes, stops at gantt nodes with no gantt descendants
|
|
216
|
+
* - `leaf` - All nodes are visible (fully expanded)
|
|
217
|
+
*
|
|
218
|
+
* @defaultValue undefined (default behavior is 'leaf' mode)
|
|
219
|
+
*/
|
|
220
|
+
defaultTreeExpansion?: 'root' | 'branch' | 'leaf'
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Table configuration for gantt view types.
|
|
225
|
+
* @public
|
|
226
|
+
*/
|
|
227
|
+
export interface GanttTableConfig extends BaseTableConfig {
|
|
228
|
+
/**
|
|
229
|
+
* The type of view to display the table in.
|
|
230
|
+
*/
|
|
231
|
+
view: 'gantt'
|
|
200
232
|
|
|
201
233
|
/**
|
|
202
234
|
* Control whether dependency graph connections should be enabled for Gantt views.
|
|
@@ -207,6 +239,41 @@ export interface TableConfig {
|
|
|
207
239
|
dependencyGraph?: boolean
|
|
208
240
|
}
|
|
209
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Table configuration for tree-gantt view types.
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
export interface TreeGanttTableConfig extends BaseTableConfig {
|
|
247
|
+
/**
|
|
248
|
+
* The type of view to display the table in.
|
|
249
|
+
*/
|
|
250
|
+
view: 'tree-gantt'
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Default expansion state for tree views. Possible values:
|
|
254
|
+
* - `root` - Only top-level nodes are visible (fully collapsed)
|
|
255
|
+
* - `branch` - Shows minimal tree to display all gantt nodes. Expands only the necessary paths to gantt nodes, stops at gantt nodes with no gantt descendants
|
|
256
|
+
* - `leaf` - All nodes are visible (fully expanded)
|
|
257
|
+
*
|
|
258
|
+
* @defaultValue undefined (default behavior is 'leaf' mode)
|
|
259
|
+
*/
|
|
260
|
+
defaultTreeExpansion?: 'root' | 'branch' | 'leaf'
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Control whether dependency graph connections should be enabled for Gantt views.
|
|
264
|
+
* When false, connection handles and dependency lines will be hidden.
|
|
265
|
+
*
|
|
266
|
+
* @defaultValue true
|
|
267
|
+
*/
|
|
268
|
+
dependencyGraph?: boolean
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Table configuration definition using discriminated unions for type safety.
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
275
|
+
export type TableConfig = BasicTableConfig | TreeTableConfig | GanttTableConfig | TreeGanttTableConfig
|
|
276
|
+
|
|
210
277
|
/**
|
|
211
278
|
* Table display definition.
|
|
212
279
|
* @public
|