@stonecrop/atable 0.4.32 → 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 +831 -758
- 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/components/ACell.vue +100 -2
- package/src/stores/table.ts +53 -5
- package/src/types/index.ts +80 -13
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
|