@stonecrop/atable 0.4.10 → 0.4.12
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 +52 -8
- package/dist/atable.js +935 -682
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stores/table.d.ts +40 -7
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +9 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +6 -0
- package/package.json +3 -3
- package/src/components/ACell.vue +4 -0
- package/src/components/AExpansionRow.vue +4 -2
- package/src/components/AGanttCell.vue +311 -0
- package/src/components/ARow.vue +1 -2
- package/src/components/ATable.vue +79 -18
- package/src/components/ATableHeader.vue +0 -3
- package/src/index.ts +14 -1
- package/src/stores/table.ts +7 -0
- package/src/types/index.ts +12 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ACell from './components/ACell.vue';
|
|
2
2
|
import AExpansionRow from './components/AExpansionRow.vue';
|
|
3
|
+
import AGanttCell from './components/AGanttCell.vue';
|
|
3
4
|
import ARow from './components/ARow.vue';
|
|
4
5
|
import ATable from './components/ATable.vue';
|
|
5
6
|
import ATableHeader from './components/ATableHeader.vue';
|
|
@@ -15,6 +16,7 @@ export { createTableStore } from './stores/table';
|
|
|
15
16
|
function install(app /* options */) {
|
|
16
17
|
app.component('ACell', ACell);
|
|
17
18
|
app.component('AExpansionRow', AExpansionRow);
|
|
19
|
+
app.component('AGanttCell', AGanttCell);
|
|
18
20
|
app.component('ARow', ARow);
|
|
19
21
|
app.component('ATable', ATable);
|
|
20
22
|
app.component('ATableHeader', ATableHeader);
|
|
@@ -22,4 +24,4 @@ function install(app /* options */) {
|
|
|
22
24
|
app.component('ATableLoadingBar', ATableLoadingBar);
|
|
23
25
|
app.component('ATableModal', ATableModal);
|
|
24
26
|
}
|
|
25
|
-
export {
|
|
27
|
+
export { ACell, AExpansionRow, AGanttCell, ARow, ATable, ATableHeader, ATableLoading, ATableLoadingBar, ATableModal, install, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import ACell from './components/ACell.vue';
|
|
3
3
|
import AExpansionRow from './components/AExpansionRow.vue';
|
|
4
|
+
import AGanttCell from './components/AGanttCell.vue';
|
|
4
5
|
import ARow from './components/ARow.vue';
|
|
5
6
|
import ATable from './components/ATable.vue';
|
|
6
7
|
import ATableHeader from './components/ATableHeader.vue';
|
|
@@ -15,5 +16,5 @@ export type { CellContext, TableColumn, TableConfig, TableDisplay, TableModal, T
|
|
|
15
16
|
* @public
|
|
16
17
|
*/
|
|
17
18
|
declare function install(app: App): void;
|
|
18
|
-
export {
|
|
19
|
+
export { ACell, AExpansionRow, AGanttCell, ARow, ATable, ATableHeader, ATableLoading, ATableLoadingBar, ATableModal, install, };
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAC1C,OAAO,aAAa,MAAM,gCAAgC,CAAA;AAC1D,OAAO,IAAI,MAAM,uBAAuB,CAAA;AACxC,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,aAAa,MAAM,gCAAgC,CAAA;AAC1D,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AAChE,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,QAAQ,GACR,MAAM,SAAS,CAAA;AAEhB;;;;GAIG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAC1C,OAAO,aAAa,MAAM,gCAAgC,CAAA;AAC1D,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,IAAI,MAAM,uBAAuB,CAAA;AACxC,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,aAAa,MAAM,gCAAgC,CAAA;AAC1D,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AAChE,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EACX,WAAW,EACX,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"}
|
|
@@ -25,6 +25,10 @@ export declare const createTableStore: (initData: {
|
|
|
25
25
|
type?: string | undefined;
|
|
26
26
|
width?: string | undefined;
|
|
27
27
|
pinned?: boolean | undefined;
|
|
28
|
+
colspan?: number | undefined;
|
|
29
|
+
ganttComponent?: string | undefined;
|
|
30
|
+
isGantt?: boolean | undefined;
|
|
31
|
+
originalIndex?: number | undefined;
|
|
28
32
|
cellComponent?: string | undefined;
|
|
29
33
|
cellComponentProps?: Record<string, any> | undefined;
|
|
30
34
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -39,6 +43,10 @@ export declare const createTableStore: (initData: {
|
|
|
39
43
|
type?: string | undefined;
|
|
40
44
|
width?: string | undefined;
|
|
41
45
|
pinned?: boolean | undefined;
|
|
46
|
+
colspan?: number | undefined;
|
|
47
|
+
ganttComponent?: string | undefined;
|
|
48
|
+
isGantt?: boolean | undefined;
|
|
49
|
+
originalIndex?: number | undefined;
|
|
42
50
|
cellComponent?: string | undefined;
|
|
43
51
|
cellComponentProps?: Record<string, any> | undefined;
|
|
44
52
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -47,10 +55,10 @@ export declare const createTableStore: (initData: {
|
|
|
47
55
|
mask?: ((value: any) => any) | undefined;
|
|
48
56
|
}[]>;
|
|
49
57
|
config: import("vue").Ref<{
|
|
50
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
58
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
51
59
|
fullWidth?: boolean | undefined;
|
|
52
60
|
}, TableConfig | {
|
|
53
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
61
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
54
62
|
fullWidth?: boolean | undefined;
|
|
55
63
|
}>;
|
|
56
64
|
display: import("vue").Ref<{
|
|
@@ -103,10 +111,12 @@ export declare const createTableStore: (initData: {
|
|
|
103
111
|
[x: string]: any;
|
|
104
112
|
indent?: number | undefined;
|
|
105
113
|
parent?: number | undefined;
|
|
114
|
+
gantt_color?: string | undefined;
|
|
106
115
|
}[], TableRow[] | {
|
|
107
116
|
[x: string]: any;
|
|
108
117
|
indent?: number | undefined;
|
|
109
118
|
parent?: number | undefined;
|
|
119
|
+
gantt_color?: string | undefined;
|
|
110
120
|
}[]>;
|
|
111
121
|
table: import("vue").Ref<{}, {}>;
|
|
112
122
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
@@ -120,6 +130,7 @@ export declare const createTableStore: (initData: {
|
|
|
120
130
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
121
131
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
122
132
|
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
133
|
+
isRowGantt: (rowIndex: number) => boolean;
|
|
123
134
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
124
135
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
125
136
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
@@ -133,6 +144,10 @@ export declare const createTableStore: (initData: {
|
|
|
133
144
|
type?: string | undefined;
|
|
134
145
|
width?: string | undefined;
|
|
135
146
|
pinned?: boolean | undefined;
|
|
147
|
+
colspan?: number | undefined;
|
|
148
|
+
ganttComponent?: string | undefined;
|
|
149
|
+
isGantt?: boolean | undefined;
|
|
150
|
+
originalIndex?: number | undefined;
|
|
136
151
|
cellComponent?: string | undefined;
|
|
137
152
|
cellComponentProps?: Record<string, any> | undefined;
|
|
138
153
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -147,6 +162,10 @@ export declare const createTableStore: (initData: {
|
|
|
147
162
|
type?: string | undefined;
|
|
148
163
|
width?: string | undefined;
|
|
149
164
|
pinned?: boolean | undefined;
|
|
165
|
+
colspan?: number | undefined;
|
|
166
|
+
ganttComponent?: string | undefined;
|
|
167
|
+
isGantt?: boolean | undefined;
|
|
168
|
+
originalIndex?: number | undefined;
|
|
150
169
|
cellComponent?: string | undefined;
|
|
151
170
|
cellComponentProps?: Record<string, any> | undefined;
|
|
152
171
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -155,10 +174,10 @@ export declare const createTableStore: (initData: {
|
|
|
155
174
|
mask?: ((value: any) => any) | undefined;
|
|
156
175
|
}[]>;
|
|
157
176
|
config: import("vue").Ref<{
|
|
158
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
177
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
159
178
|
fullWidth?: boolean | undefined;
|
|
160
179
|
}, TableConfig | {
|
|
161
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
180
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
162
181
|
fullWidth?: boolean | undefined;
|
|
163
182
|
}>;
|
|
164
183
|
display: import("vue").Ref<{
|
|
@@ -211,10 +230,12 @@ export declare const createTableStore: (initData: {
|
|
|
211
230
|
[x: string]: any;
|
|
212
231
|
indent?: number | undefined;
|
|
213
232
|
parent?: number | undefined;
|
|
233
|
+
gantt_color?: string | undefined;
|
|
214
234
|
}[], TableRow[] | {
|
|
215
235
|
[x: string]: any;
|
|
216
236
|
indent?: number | undefined;
|
|
217
237
|
parent?: number | undefined;
|
|
238
|
+
gantt_color?: string | undefined;
|
|
218
239
|
}[]>;
|
|
219
240
|
table: import("vue").Ref<{}, {}>;
|
|
220
241
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
@@ -228,6 +249,7 @@ export declare const createTableStore: (initData: {
|
|
|
228
249
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
229
250
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
230
251
|
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
252
|
+
isRowGantt: (rowIndex: number) => boolean;
|
|
231
253
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
232
254
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
233
255
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
@@ -241,6 +263,10 @@ export declare const createTableStore: (initData: {
|
|
|
241
263
|
type?: string | undefined;
|
|
242
264
|
width?: string | undefined;
|
|
243
265
|
pinned?: boolean | undefined;
|
|
266
|
+
colspan?: number | undefined;
|
|
267
|
+
ganttComponent?: string | undefined;
|
|
268
|
+
isGantt?: boolean | undefined;
|
|
269
|
+
originalIndex?: number | undefined;
|
|
244
270
|
cellComponent?: string | undefined;
|
|
245
271
|
cellComponentProps?: Record<string, any> | undefined;
|
|
246
272
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -255,6 +281,10 @@ export declare const createTableStore: (initData: {
|
|
|
255
281
|
type?: string | undefined;
|
|
256
282
|
width?: string | undefined;
|
|
257
283
|
pinned?: boolean | undefined;
|
|
284
|
+
colspan?: number | undefined;
|
|
285
|
+
ganttComponent?: string | undefined;
|
|
286
|
+
isGantt?: boolean | undefined;
|
|
287
|
+
originalIndex?: number | undefined;
|
|
258
288
|
cellComponent?: string | undefined;
|
|
259
289
|
cellComponentProps?: Record<string, any> | undefined;
|
|
260
290
|
modalComponent?: (string | ((context: CellContext) => string)) | undefined;
|
|
@@ -263,10 +293,10 @@ export declare const createTableStore: (initData: {
|
|
|
263
293
|
mask?: ((value: any) => any) | undefined;
|
|
264
294
|
}[]>;
|
|
265
295
|
config: import("vue").Ref<{
|
|
266
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
296
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
267
297
|
fullWidth?: boolean | undefined;
|
|
268
298
|
}, TableConfig | {
|
|
269
|
-
view?: ("uncounted" | "list" | "list-expansion" | "tree") | undefined;
|
|
299
|
+
view?: ("uncounted" | "list" | "list-expansion" | "tree" | "gantt") | undefined;
|
|
270
300
|
fullWidth?: boolean | undefined;
|
|
271
301
|
}>;
|
|
272
302
|
display: import("vue").Ref<{
|
|
@@ -319,10 +349,12 @@ export declare const createTableStore: (initData: {
|
|
|
319
349
|
[x: string]: any;
|
|
320
350
|
indent?: number | undefined;
|
|
321
351
|
parent?: number | undefined;
|
|
352
|
+
gantt_color?: string | undefined;
|
|
322
353
|
}[], TableRow[] | {
|
|
323
354
|
[x: string]: any;
|
|
324
355
|
indent?: number | undefined;
|
|
325
356
|
parent?: number | undefined;
|
|
357
|
+
gantt_color?: string | undefined;
|
|
326
358
|
}[]>;
|
|
327
359
|
table: import("vue").Ref<{}, {}>;
|
|
328
360
|
updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
@@ -336,9 +368,10 @@ export declare const createTableStore: (initData: {
|
|
|
336
368
|
getHeaderCellStyle: (column: TableColumn) => CSSProperties;
|
|
337
369
|
getIndent: (colIndex: number, indentLevel?: number) => string;
|
|
338
370
|
getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
|
|
371
|
+
isRowGantt: (rowIndex: number) => boolean;
|
|
339
372
|
isRowVisible: (rowIndex: number) => boolean | undefined;
|
|
340
373
|
setCellData: (colIndex: number, rowIndex: number, value: any) => void;
|
|
341
374
|
setCellText: (colIndex: number, rowIndex: number, value: string) => void;
|
|
342
375
|
toggleRowExpand: (rowIndex: number) => void;
|
|
343
|
-
}, "closeModal" | "getCellData" | "getCellDisplayValue" | "getFormattedValue" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowVisible" | "setCellData" | "setCellText" | "toggleRowExpand">>;
|
|
376
|
+
}, "closeModal" | "getCellData" | "getCellDisplayValue" | "getFormattedValue" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowGantt" | "isRowVisible" | "setCellData" | "setCellText" | "toggleRowExpand">>;
|
|
344
377
|
//# 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,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"}
|
|
@@ -12,6 +12,10 @@ export type TableColumn = {
|
|
|
12
12
|
type?: string;
|
|
13
13
|
width?: string;
|
|
14
14
|
pinned?: boolean;
|
|
15
|
+
colspan?: number;
|
|
16
|
+
ganttComponent?: string;
|
|
17
|
+
isGantt?: boolean;
|
|
18
|
+
originalIndex?: number;
|
|
15
19
|
cellComponent?: string;
|
|
16
20
|
cellComponentProps?: Record<string, any>;
|
|
17
21
|
/**
|
|
@@ -56,7 +60,7 @@ export type TableConfig = {
|
|
|
56
60
|
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
57
61
|
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
58
62
|
*/
|
|
59
|
-
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree';
|
|
63
|
+
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree' | 'gantt';
|
|
60
64
|
fullWidth?: boolean;
|
|
61
65
|
};
|
|
62
66
|
/**
|
|
@@ -81,6 +85,10 @@ export type TableRow = {
|
|
|
81
85
|
[key: string]: any;
|
|
82
86
|
indent?: number;
|
|
83
87
|
parent?: number;
|
|
88
|
+
/**
|
|
89
|
+
* When a table is being viewed as a Gantt chart, this colour would be applied to the row's gantt bar, if one exists.
|
|
90
|
+
*/
|
|
91
|
+
gantt_color?: string;
|
|
84
92
|
};
|
|
85
93
|
/**
|
|
86
94
|
* Table modal definition.
|
|
@@ -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;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAA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AAkB,CAAC,CAAC,QAAQ,CAAC,CAAA;IACxD,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;IACpD,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAAA;IAEtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACpC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;CAC1C,CAAA"}
|
package/dist/stores/table.js
CHANGED
|
@@ -90,6 +90,11 @@ export const createTableStore = (initData) => {
|
|
|
90
90
|
textAlign: column.align || 'center',
|
|
91
91
|
width: config.value.fullWidth ? 'auto' : undefined,
|
|
92
92
|
});
|
|
93
|
+
const isRowGantt = (rowIndex) => {
|
|
94
|
+
const row = rows.value[rowIndex];
|
|
95
|
+
console.log(config.value.view, row.indent);
|
|
96
|
+
return config.value.view === 'gantt' && row.indent === 0;
|
|
97
|
+
};
|
|
93
98
|
const isRowVisible = (rowIndex) => {
|
|
94
99
|
return config.value.view !== 'tree' || display.value[rowIndex].isRoot || display.value[rowIndex].open;
|
|
95
100
|
};
|
|
@@ -181,6 +186,7 @@ export const createTableStore = (initData) => {
|
|
|
181
186
|
getHeaderCellStyle,
|
|
182
187
|
getIndent,
|
|
183
188
|
getRowExpandSymbol,
|
|
189
|
+
isRowGantt,
|
|
184
190
|
isRowVisible,
|
|
185
191
|
setCellData,
|
|
186
192
|
setCellText,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/atable",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@vueuse/core": "^12.7.0",
|
|
39
39
|
"pinia": "^3.0.1",
|
|
40
40
|
"vue": "^3.5.13",
|
|
41
|
-
"@stonecrop/themes": "0.4.
|
|
42
|
-
"@stonecrop/utilities": "0.4.
|
|
41
|
+
"@stonecrop/themes": "0.4.12",
|
|
42
|
+
"@stonecrop/utilities": "0.4.12"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-documenter": "^7.26.10",
|
package/src/components/ACell.vue
CHANGED
|
@@ -72,28 +72,30 @@ if (addNavigation) {
|
|
|
72
72
|
align-items: center;
|
|
73
73
|
justify-content: center;
|
|
74
74
|
}
|
|
75
|
+
|
|
75
76
|
.expandable-row {
|
|
76
77
|
border-top: 1px solid var(--sc-row-border-color);
|
|
77
78
|
height: var(--sc-atable-row-height);
|
|
78
|
-
display: flex;
|
|
79
79
|
}
|
|
80
|
+
|
|
80
81
|
.expandable-row > td:first-child {
|
|
81
82
|
border-left: 4px solid var(--sc-row-border-color);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.expanded-row {
|
|
85
|
-
display: flex;
|
|
86
86
|
border-left: 2px solid var(--sc-row-border-color);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.expandable-row:last-child {
|
|
90
90
|
border-bottom: 1px solid var(--sc-row-border-color);
|
|
91
91
|
}
|
|
92
|
+
|
|
92
93
|
.expanded-row-content {
|
|
93
94
|
border-top: 1px solid var(--sc-row-border-color);
|
|
94
95
|
padding: 1.5rem;
|
|
95
96
|
}
|
|
96
97
|
</style>
|
|
98
|
+
|
|
97
99
|
<style scoped>
|
|
98
100
|
.expandable-row.changed-row-gradient:has(td.cell-modified) {
|
|
99
101
|
--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<td class="aganttcell" :colspan="colspan">
|
|
3
|
+
<div ref="container" class="gantt-handler">
|
|
4
|
+
<!-- Draggable gantt bar -->
|
|
5
|
+
<div
|
|
6
|
+
ref="bar"
|
|
7
|
+
class="gantt-bar"
|
|
8
|
+
:class="{ 'is-dragging': isBarDragging || isLeftDragging || isRightDragging }"
|
|
9
|
+
:style="barStyle">
|
|
10
|
+
<!-- Left resizer handle -->
|
|
11
|
+
<div ref="leftHandle" class="gantt-handle left-handle" :class="{ 'is-dragging': isLeftDragging }">
|
|
12
|
+
<div class="handle-grip"></div>
|
|
13
|
+
<div class="vertical-indicator left-indicator"></div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<label v-if="label" class="gantt-label">{{ label }}</label>
|
|
17
|
+
|
|
18
|
+
<!-- Right resizer handle -->
|
|
19
|
+
<div ref="rightHandle" class="gantt-handle right-handle" :class="{ 'is-dragging': isRightDragging }">
|
|
20
|
+
<div class="handle-grip"></div>
|
|
21
|
+
<div class="vertical-indicator right-indicator"></div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</td>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { ref, computed, onMounted, useTemplateRef } from 'vue'
|
|
30
|
+
import { useDraggable, useElementBounding } from '@vueuse/core'
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
start,
|
|
34
|
+
end,
|
|
35
|
+
colspan = 1,
|
|
36
|
+
label,
|
|
37
|
+
color,
|
|
38
|
+
} = defineProps<{
|
|
39
|
+
start?: number
|
|
40
|
+
end?: number
|
|
41
|
+
colspan?: number
|
|
42
|
+
label?: string
|
|
43
|
+
color?: string
|
|
44
|
+
}>()
|
|
45
|
+
|
|
46
|
+
const baseColor = ref()
|
|
47
|
+
|
|
48
|
+
onMounted(() => {
|
|
49
|
+
if (!color || color == '' || color.length < 6) {
|
|
50
|
+
baseColor.value = '#cccccc'
|
|
51
|
+
} else {
|
|
52
|
+
baseColor.value = color
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const emit = defineEmits<{
|
|
57
|
+
'update:start': [value: number]
|
|
58
|
+
'update:end': [value: number]
|
|
59
|
+
drag: [{ type: 'bar'; start: number; end: number } | { type: 'resize'; edge: 'start' | 'end'; value: number }]
|
|
60
|
+
}>()
|
|
61
|
+
|
|
62
|
+
const containerRef = useTemplateRef('container')
|
|
63
|
+
const barRef = useTemplateRef('bar')
|
|
64
|
+
const leftHandleRef = useTemplateRef('leftHandle')
|
|
65
|
+
const rightHandleRef = useTemplateRef('rightHandle')
|
|
66
|
+
|
|
67
|
+
const { width: totalBarWidth } = useElementBounding(containerRef)
|
|
68
|
+
const { left: barLeft, right: barRight } = useElementBounding(barRef)
|
|
69
|
+
const currentStart = ref(start || 0)
|
|
70
|
+
const currentEnd = ref(end || colspan)
|
|
71
|
+
const dragStartData = ref({ startX: 0, startPos: 0 })
|
|
72
|
+
|
|
73
|
+
const pixelsPerColumn = computed(() => (colspan > 0 ? totalBarWidth.value / colspan : 0))
|
|
74
|
+
|
|
75
|
+
const barStyle = computed(() => {
|
|
76
|
+
const startPercent = (currentStart.value / colspan) * 100
|
|
77
|
+
const endPercent = (currentEnd.value / colspan) * 100
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
left: `${startPercent}%`,
|
|
81
|
+
width: `${endPercent - startPercent}%`,
|
|
82
|
+
backgroundColor: baseColor.value,
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const { isDragging: isLeftDragging } = useDraggable(leftHandleRef, {
|
|
87
|
+
axis: 'x',
|
|
88
|
+
onStart: () => {
|
|
89
|
+
if (barRef.value) barRef.value.style.transition = 'none'
|
|
90
|
+
dragStartData.value = {
|
|
91
|
+
startX: barLeft.value,
|
|
92
|
+
startPos: currentStart.value,
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
onMove: ({ x }) => {
|
|
96
|
+
if (isLeftDragging.value && barRef.value) {
|
|
97
|
+
const deltaX = x - dragStartData.value.startX
|
|
98
|
+
const deltaColumns = deltaX / pixelsPerColumn.value
|
|
99
|
+
const newStart = Math.max(0, Math.min(currentEnd.value - 1, dragStartData.value.startPos + deltaColumns))
|
|
100
|
+
barRef.value.style.left = `${(newStart / colspan) * 100}%`
|
|
101
|
+
barRef.value.style.width = `${((currentEnd.value - newStart) / colspan) * 100}%`
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
onEnd: ({ x }) => {
|
|
105
|
+
if (barRef.value) {
|
|
106
|
+
const deltaX = x - dragStartData.value.startX
|
|
107
|
+
const deltaColumns = Math.round(deltaX / pixelsPerColumn.value)
|
|
108
|
+
const newStart = Math.max(0, Math.min(currentEnd.value - 1, dragStartData.value.startPos + deltaColumns))
|
|
109
|
+
currentStart.value = newStart
|
|
110
|
+
|
|
111
|
+
emit('update:start', newStart)
|
|
112
|
+
emit('drag', { type: 'resize', edge: 'start', value: newStart })
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const { isDragging: isRightDragging } = useDraggable(rightHandleRef, {
|
|
118
|
+
axis: 'x',
|
|
119
|
+
onStart: () => {
|
|
120
|
+
if (barRef.value) barRef.value.style.transition = 'none'
|
|
121
|
+
dragStartData.value = {
|
|
122
|
+
startX: barRight.value,
|
|
123
|
+
startPos: currentEnd.value,
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
onMove: ({ x }) => {
|
|
127
|
+
if (isRightDragging.value && barRef.value) {
|
|
128
|
+
const deltaX = x - dragStartData.value.startX
|
|
129
|
+
const deltaColumns = deltaX / pixelsPerColumn.value
|
|
130
|
+
const newEnd = Math.max(currentStart.value + 1, Math.min(colspan, dragStartData.value.startPos + deltaColumns))
|
|
131
|
+
barRef.value.style.width = `${((newEnd - currentStart.value) / colspan) * 100}%`
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
onEnd: ({ x }) => {
|
|
135
|
+
if (barRef.value) {
|
|
136
|
+
const deltaX = x - dragStartData.value.startX
|
|
137
|
+
const deltaColumns = Math.round(deltaX / pixelsPerColumn.value)
|
|
138
|
+
const newEnd = Math.max(currentStart.value + 1, Math.min(colspan, dragStartData.value.startPos + deltaColumns))
|
|
139
|
+
currentEnd.value = newEnd
|
|
140
|
+
|
|
141
|
+
emit('update:end', newEnd)
|
|
142
|
+
emit('drag', { type: 'resize', edge: 'end', value: newEnd })
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
const { isDragging: isBarDragging } = useDraggable(barRef, {
|
|
148
|
+
exact: true, // to avoid triggering when the left and right handles are being used
|
|
149
|
+
axis: 'x',
|
|
150
|
+
onStart: () => {
|
|
151
|
+
if (barRef.value) barRef.value.style.transition = 'none'
|
|
152
|
+
dragStartData.value = {
|
|
153
|
+
startX: barLeft.value,
|
|
154
|
+
startPos: currentStart.value,
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
onMove: ({ x }) => {
|
|
158
|
+
if (isBarDragging.value && barRef.value) {
|
|
159
|
+
const deltaX = x - dragStartData.value.startX
|
|
160
|
+
const deltaColumns = deltaX / pixelsPerColumn.value
|
|
161
|
+
const barWidth = currentEnd.value - currentStart.value
|
|
162
|
+
const newStart = Math.max(0, Math.min(dragStartData.value.startPos + deltaColumns, colspan - barWidth))
|
|
163
|
+
barRef.value.style.left = `${(newStart / colspan) * 100}%`
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
onEnd: ({ x }) => {
|
|
167
|
+
if (barRef.value) {
|
|
168
|
+
const deltaX = x - dragStartData.value.startX
|
|
169
|
+
const deltaColumns = Math.round(deltaX / pixelsPerColumn.value)
|
|
170
|
+
const barWidth = currentEnd.value - currentStart.value
|
|
171
|
+
|
|
172
|
+
let newStart = dragStartData.value.startPos + deltaColumns
|
|
173
|
+
let newEnd = newStart + barWidth
|
|
174
|
+
if (newStart < 0) {
|
|
175
|
+
newStart = 0
|
|
176
|
+
newEnd = barWidth
|
|
177
|
+
} else if (newEnd > colspan) {
|
|
178
|
+
newEnd = colspan
|
|
179
|
+
newStart = newEnd - barWidth
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
currentStart.value = newStart
|
|
183
|
+
currentEnd.value = newEnd
|
|
184
|
+
|
|
185
|
+
emit('update:start', newStart)
|
|
186
|
+
emit('update:end', newEnd)
|
|
187
|
+
emit('drag', { type: 'bar', start: newStart, end: newEnd })
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<style scoped>
|
|
194
|
+
.aganttcell {
|
|
195
|
+
background-color: #f9f9f9;
|
|
196
|
+
width: 100%;
|
|
197
|
+
padding: 0;
|
|
198
|
+
height: 100%;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.gantt-handler {
|
|
202
|
+
position: relative;
|
|
203
|
+
height: 100%;
|
|
204
|
+
background-color: #f0f0f0;
|
|
205
|
+
border-radius: 4px;
|
|
206
|
+
overflow: visible; /* Changed from hidden to allow indicators to extend out */
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.gantt-bar {
|
|
210
|
+
position: absolute;
|
|
211
|
+
height: 100%;
|
|
212
|
+
border-radius: 4px;
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: space-between;
|
|
216
|
+
cursor: grab;
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
border: 1px solid rgba(0, 0, 0, 0.5);
|
|
219
|
+
transition: left 0.1s ease-out, width 0.1s ease-out;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.gantt-bar:active {
|
|
223
|
+
cursor: grabbing;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.gantt-bar.is-dragging {
|
|
227
|
+
z-index: 10;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.gantt-label {
|
|
231
|
+
flex: 1;
|
|
232
|
+
text-align: center;
|
|
233
|
+
font-size: 12px;
|
|
234
|
+
color: #aaaaaa;
|
|
235
|
+
white-space: nowrap;
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
text-overflow: ellipsis;
|
|
238
|
+
padding: 0 8px;
|
|
239
|
+
user-select: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.gantt-handle {
|
|
243
|
+
position: relative;
|
|
244
|
+
width: 12px;
|
|
245
|
+
height: 100%;
|
|
246
|
+
cursor: ew-resize;
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
z-index: 0;
|
|
251
|
+
background: rgba(0, 0, 0, 0.25);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.left-handle {
|
|
255
|
+
border-right: 1px solid rgba(0, 0, 0, 0.5);
|
|
256
|
+
}
|
|
257
|
+
.right-handle {
|
|
258
|
+
border-left: 1px solid rgba(0, 0, 0, 0.5);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.handle-grip {
|
|
262
|
+
width: 4px;
|
|
263
|
+
height: 12px;
|
|
264
|
+
border-radius: 2px;
|
|
265
|
+
background: rgba(0, 0, 0, 0.8);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.gantt-handle:hover {
|
|
269
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* Vertical indicators for handles */
|
|
273
|
+
.vertical-indicator {
|
|
274
|
+
position: absolute;
|
|
275
|
+
width: 2px;
|
|
276
|
+
opacity: 0;
|
|
277
|
+
pointer-events: none;
|
|
278
|
+
transition: opacity 0.2s ease;
|
|
279
|
+
top: -100vh; /* Extend up */
|
|
280
|
+
height: 100vh; /* Full height, but will be clipped by tbody */
|
|
281
|
+
z-index: 5;
|
|
282
|
+
background-color: v-bind(baseColor);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.left-indicator {
|
|
286
|
+
left: 50%;
|
|
287
|
+
transform: translateX(-50%);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.right-indicator {
|
|
291
|
+
right: 50%;
|
|
292
|
+
transform: translateX(50%);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.gantt-handle.is-dragging .vertical-indicator {
|
|
296
|
+
opacity: 0.7;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.gantt-handler::after {
|
|
300
|
+
content: '';
|
|
301
|
+
position: absolute;
|
|
302
|
+
top: 0;
|
|
303
|
+
left: 0;
|
|
304
|
+
right: 0;
|
|
305
|
+
bottom: 0;
|
|
306
|
+
background-size: calc(100% / v-bind(colspan)) 100%;
|
|
307
|
+
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
|
|
308
|
+
pointer-events: none;
|
|
309
|
+
z-index: 1;
|
|
310
|
+
}
|
|
311
|
+
</style>
|
package/src/components/ARow.vue
CHANGED
|
@@ -70,11 +70,10 @@ if (addNavigation) {
|
|
|
70
70
|
@import url('@stonecrop/themes/default.css');
|
|
71
71
|
|
|
72
72
|
.atable-row {
|
|
73
|
-
display: flex;
|
|
74
73
|
background-color: white;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.
|
|
76
|
+
.atable-row > td:first-child {
|
|
78
77
|
border-left: 4px solid var(--sc-row-border-color);
|
|
79
78
|
}
|
|
80
79
|
|