@stonecrop/atable 0.4.11 → 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.
@@ -25,7 +25,6 @@ export declare const createTableStore: (initData: {
25
25
  type?: string | undefined;
26
26
  width?: string | undefined;
27
27
  pinned?: boolean | undefined;
28
- color?: string | undefined;
29
28
  colspan?: number | undefined;
30
29
  ganttComponent?: string | undefined;
31
30
  isGantt?: boolean | undefined;
@@ -44,7 +43,6 @@ export declare const createTableStore: (initData: {
44
43
  type?: string | undefined;
45
44
  width?: string | undefined;
46
45
  pinned?: boolean | undefined;
47
- color?: string | undefined;
48
46
  colspan?: number | undefined;
49
47
  ganttComponent?: string | undefined;
50
48
  isGantt?: boolean | undefined;
@@ -113,10 +111,12 @@ export declare const createTableStore: (initData: {
113
111
  [x: string]: any;
114
112
  indent?: number | undefined;
115
113
  parent?: number | undefined;
114
+ gantt_color?: string | undefined;
116
115
  }[], TableRow[] | {
117
116
  [x: string]: any;
118
117
  indent?: number | undefined;
119
118
  parent?: number | undefined;
119
+ gantt_color?: string | undefined;
120
120
  }[]>;
121
121
  table: import("vue").Ref<{}, {}>;
122
122
  updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
@@ -130,6 +130,7 @@ export declare const createTableStore: (initData: {
130
130
  getHeaderCellStyle: (column: TableColumn) => CSSProperties;
131
131
  getIndent: (colIndex: number, indentLevel?: number) => string;
132
132
  getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
133
+ isRowGantt: (rowIndex: number) => boolean;
133
134
  isRowVisible: (rowIndex: number) => boolean | undefined;
134
135
  setCellData: (colIndex: number, rowIndex: number, value: any) => void;
135
136
  setCellText: (colIndex: number, rowIndex: number, value: string) => void;
@@ -143,7 +144,6 @@ export declare const createTableStore: (initData: {
143
144
  type?: string | undefined;
144
145
  width?: string | undefined;
145
146
  pinned?: boolean | undefined;
146
- color?: string | undefined;
147
147
  colspan?: number | undefined;
148
148
  ganttComponent?: string | undefined;
149
149
  isGantt?: boolean | undefined;
@@ -162,7 +162,6 @@ export declare const createTableStore: (initData: {
162
162
  type?: string | undefined;
163
163
  width?: string | undefined;
164
164
  pinned?: boolean | undefined;
165
- color?: string | undefined;
166
165
  colspan?: number | undefined;
167
166
  ganttComponent?: string | undefined;
168
167
  isGantt?: boolean | undefined;
@@ -231,10 +230,12 @@ export declare const createTableStore: (initData: {
231
230
  [x: string]: any;
232
231
  indent?: number | undefined;
233
232
  parent?: number | undefined;
233
+ gantt_color?: string | undefined;
234
234
  }[], TableRow[] | {
235
235
  [x: string]: any;
236
236
  indent?: number | undefined;
237
237
  parent?: number | undefined;
238
+ gantt_color?: string | undefined;
238
239
  }[]>;
239
240
  table: import("vue").Ref<{}, {}>;
240
241
  updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
@@ -248,6 +249,7 @@ export declare const createTableStore: (initData: {
248
249
  getHeaderCellStyle: (column: TableColumn) => CSSProperties;
249
250
  getIndent: (colIndex: number, indentLevel?: number) => string;
250
251
  getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
252
+ isRowGantt: (rowIndex: number) => boolean;
251
253
  isRowVisible: (rowIndex: number) => boolean | undefined;
252
254
  setCellData: (colIndex: number, rowIndex: number, value: any) => void;
253
255
  setCellText: (colIndex: number, rowIndex: number, value: string) => void;
@@ -261,7 +263,6 @@ export declare const createTableStore: (initData: {
261
263
  type?: string | undefined;
262
264
  width?: string | undefined;
263
265
  pinned?: boolean | undefined;
264
- color?: string | undefined;
265
266
  colspan?: number | undefined;
266
267
  ganttComponent?: string | undefined;
267
268
  isGantt?: boolean | undefined;
@@ -280,7 +281,6 @@ export declare const createTableStore: (initData: {
280
281
  type?: string | undefined;
281
282
  width?: string | undefined;
282
283
  pinned?: boolean | undefined;
283
- color?: string | undefined;
284
284
  colspan?: number | undefined;
285
285
  ganttComponent?: string | undefined;
286
286
  isGantt?: boolean | undefined;
@@ -349,10 +349,12 @@ export declare const createTableStore: (initData: {
349
349
  [x: string]: any;
350
350
  indent?: number | undefined;
351
351
  parent?: number | undefined;
352
+ gantt_color?: string | undefined;
352
353
  }[], TableRow[] | {
353
354
  [x: string]: any;
354
355
  indent?: number | undefined;
355
356
  parent?: number | undefined;
357
+ gantt_color?: string | undefined;
356
358
  }[]>;
357
359
  table: import("vue").Ref<{}, {}>;
358
360
  updates: import("vue").Ref<Record<string, string>, Record<string, string>>;
@@ -366,9 +368,10 @@ export declare const createTableStore: (initData: {
366
368
  getHeaderCellStyle: (column: TableColumn) => CSSProperties;
367
369
  getIndent: (colIndex: number, indentLevel?: number) => string;
368
370
  getRowExpandSymbol: (rowIndex: number) => "" | "-" | "+";
371
+ isRowGantt: (rowIndex: number) => boolean;
369
372
  isRowVisible: (rowIndex: number) => boolean | undefined;
370
373
  setCellData: (colIndex: number, rowIndex: number, value: any) => void;
371
374
  setCellText: (colIndex: number, rowIndex: number, value: string) => void;
372
375
  toggleRowExpand: (rowIndex: number) => void;
373
- }, "closeModal" | "getCellData" | "getCellDisplayValue" | "getFormattedValue" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowVisible" | "setCellData" | "setCellText" | "toggleRowExpand">>;
376
+ }, "closeModal" | "getCellData" | "getCellDisplayValue" | "getFormattedValue" | "getHeaderCellStyle" | "getIndent" | "getRowExpandSymbol" | "isRowGantt" | "isRowVisible" | "setCellData" | "setCellText" | "toggleRowExpand">>;
374
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,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGzG;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAc;IAC1C,OAAO,EAAE,WAAW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string;
14
14
  pinned?: boolean;
15
- color?: string;
16
15
  colspan?: number;
17
16
  ganttComponent?: string;
18
17
  isGantt?: boolean;
@@ -86,6 +85,10 @@ export type TableRow = {
86
85
  [key: string]: any;
87
86
  indent?: number;
88
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;
89
92
  };
90
93
  /**
91
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,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAGhB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC,CAAA;IAC5D,wBAAwB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IA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AQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;CAC1C,CAAA"}
@@ -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.11",
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.11",
42
- "@stonecrop/utilities": "0.4.11"
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",
@@ -66,8 +66,8 @@ const rightHandleRef = useTemplateRef('rightHandle')
66
66
 
67
67
  const { width: totalBarWidth } = useElementBounding(containerRef)
68
68
  const { left: barLeft, right: barRight } = useElementBounding(barRef)
69
- const currentStart = ref(start || 1)
70
- const currentEnd = ref(end || 4)
69
+ const currentStart = ref(start || 0)
70
+ const currentEnd = ref(end || colspan)
71
71
  const dragStartData = ref({ startX: 0, startPos: 0 })
72
72
 
73
73
  const pixelsPerColumn = computed(() => (colspan > 0 ? totalBarWidth.value / colspan : 0))
@@ -18,18 +18,16 @@
18
18
  v-if="column.isGantt"
19
19
  :is="column.ganttComponent || 'AGanttCell'"
20
20
  :store="store"
21
- :color="column.color"
21
+ :color="row.gantt_color"
22
22
  :colspan="column.colspan"
23
23
  :pinned="column.pinned"
24
24
  :rowIndex="rowIndex"
25
- :colIndex="column.originalIndex !== undefined ? column.originalIndex : colIndex"
25
+ :colIndex="column.originalIndex ?? colIndex"
26
26
  :style="{
27
27
  textAlign: column?.align || 'center',
28
28
  minWidth: column?.width || '40ch',
29
29
  width: store.config.fullWidth ? 'auto' : null,
30
- // tabIndex: column.isGantt ? '-1' : '0',
31
- }"
32
- spellcheck="false" />
30
+ }" />
33
31
  <component
34
32
  v-else
35
33
  :is="column.cellComponent || 'ACell'"
@@ -187,21 +185,20 @@ const getProcessedColumnsForRow = (row: TableRow) => {
187
185
  return store.columns
188
186
  }
189
187
 
190
- // Add pinned columns
188
+ // For Gantt views, first add the pinned columns
191
189
  const result: TableColumn[] = []
192
190
  for (let i = 0; i < pinnedColumnCount; i++) {
193
191
  const column = { ...store.columns[i] }
194
192
  column.originalIndex = i // Preserve original index
195
193
  result.push(column)
196
194
  }
197
- // Add the Gantt column with colspan
198
195
 
196
+ // Finally, add the Gantt bar column with a full-width colspan
199
197
  result.push({
200
198
  ...store.columns[pinnedColumnCount],
201
- colspan: store.columns.length - pinnedColumnCount,
202
199
  isGantt: true,
200
+ colspan: store.columns.length - pinnedColumnCount,
203
201
  originalIndex: pinnedColumnCount,
204
- color: isGanttRow ? (row.resource_name as { color: string }).color : '',
205
202
  width: 'auto', // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
206
203
  })
207
204
 
@@ -119,6 +119,12 @@ export const createTableStore = (initData: {
119
119
  width: config.value.fullWidth ? 'auto' : undefined,
120
120
  })
121
121
 
122
+ const isRowGantt = (rowIndex: number) => {
123
+ const row = rows.value[rowIndex]
124
+ console.log(config.value.view, row.indent)
125
+ return config.value.view === 'gantt' && row.indent === 0
126
+ }
127
+
122
128
  const isRowVisible = (rowIndex: number) => {
123
129
  return config.value.view !== 'tree' || display.value[rowIndex].isRoot || display.value[rowIndex].open
124
130
  }
@@ -218,6 +224,7 @@ export const createTableStore = (initData: {
218
224
  getHeaderCellStyle,
219
225
  getIndent,
220
226
  getRowExpandSymbol,
227
+ isRowGantt,
221
228
  isRowVisible,
222
229
  setCellData,
223
230
  setCellText,
@@ -17,7 +17,6 @@ export type TableColumn = {
17
17
  pinned?: boolean
18
18
 
19
19
  // Gantt-specific fields
20
- color?: string
21
20
  colspan?: number
22
21
  ganttComponent?: string
23
22
  isGantt?: boolean
@@ -95,6 +94,11 @@ export type TableRow = {
95
94
  [key: string]: any
96
95
  indent?: number
97
96
  parent?: number
97
+
98
+ /**
99
+ * When a table is being viewed as a Gantt chart, this colour would be applied to the row's gantt bar, if one exists.
100
+ */
101
+ gantt_color?: string
98
102
  }
99
103
 
100
104
  /**