eru-grid 0.0.12 → 0.0.13

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/index.d.ts CHANGED
@@ -45,9 +45,12 @@ interface GridFeatures {
45
45
  showRowLines?: boolean;
46
46
  enableRowSubtotals?: boolean;
47
47
  enableColumnSubtotals?: boolean;
48
+ enableColumnGrandTotal?: boolean;
48
49
  enableGrandTotal?: boolean;
49
50
  subtotalPosition?: 'before' | 'after';
51
+ subtotalPositionColumn?: 'before' | 'after';
50
52
  grandTotalPosition?: 'before' | 'after';
53
+ grandTotalPositionColumn?: 'before' | 'after';
51
54
  subtotalLabel?: string;
52
55
  freezeField?: string;
53
56
  freezeHeader?: boolean;
@@ -137,6 +140,7 @@ interface PivotColumnHeader {
137
140
  isSubtotal?: boolean;
138
141
  isGrandTotal?: boolean;
139
142
  subtotalLevel?: number;
143
+ parentValue?: string;
140
144
  isCollapsible?: boolean;
141
145
  isExpanded?: boolean;
142
146
  groupKey?: string;
@@ -173,7 +177,7 @@ declare class PivotTransformService {
173
177
  */
174
178
  transformData(sourceData: any[], configuration: PivotConfiguration, gridConfiguration?: GridConfiguration): PivotResult;
175
179
  /**
176
- * Group data by row dimensions
180
+ * Group data by row dimensions and collect unique column dimension values
177
181
  */
178
182
  private groupByDimensions;
179
183
  /**
@@ -185,9 +189,13 @@ declare class PivotTransformService {
185
189
  */
186
190
  private naturalSort;
187
191
  /**
188
- * Generate unique pivot column values using cartesian product of all dimension values
192
+ * Convert string to title case
189
193
  */
190
- private generatePivotColumns;
194
+ private toTitleCase;
195
+ /**
196
+ * Generate unique pivot column values from pre-collected dimension value sets
197
+ */
198
+ private generatePivotColumnsFromSets;
191
199
  /**
192
200
  * Create pivot rows with aggregated data (PERFORMANCE OPTIMIZED)
193
201
  */
@@ -221,7 +229,7 @@ declare class PivotTransformService {
221
229
  */
222
230
  private chunkArray;
223
231
  /**
224
- * Generate nested header structure for multi-dimensional columns
232
+ * Generate nested header structure with collapsible support
225
233
  */
226
234
  private generateNestedHeaderStructure;
227
235
  /**
@@ -248,6 +256,14 @@ declare class PivotTransformService {
248
256
  * Generate all combinations of dimension values
249
257
  */
250
258
  private generateCombinations;
259
+ /**
260
+ * Generate hierarchical subtotal combinations - creates combinations at each level separately
261
+ * For 3 dimensions [["Low", "Medium"], ["0", "1"], ["Open", "Closed"]] this generates:
262
+ * Level 0: ["Low"], ["Medium"] (first dimension only)
263
+ * Level 1: ["Low", "0"], ["Low", "1"], ["Medium", "0"], ["Medium", "1"] (first + second dimensions)
264
+ * This ensures subtotals are calculated for ALL dimension levels, not just full combinations
265
+ */
266
+ private generateHierarchicalSubtotalCombinations;
251
267
  /**
252
268
  * Generate flat header structure for single dimension
253
269
  */
@@ -260,10 +276,18 @@ declare class PivotTransformService {
260
276
  * Add subtotal rows for row dimensions
261
277
  */
262
278
  private addRowSubtotals;
279
+ /**
280
+ * Add column subtotals as new columns
281
+ */
282
+ private addColumnSubtotals;
263
283
  /**
264
284
  * Add grand total row
265
285
  */
266
286
  private addGrandTotalRow;
287
+ /**
288
+ * Add column grand totals as new columns
289
+ */
290
+ private addColumnGrandTotals;
267
291
  /**
268
292
  * Calculate grand total values for all rows (ignores showSubtotals flag)
269
293
  */
@@ -339,6 +363,14 @@ declare class PivotTransformService {
339
363
  skip: boolean;
340
364
  parentSpan: number;
341
365
  }>;
366
+ /**
367
+ * Insert column subtotal headers at the correct positions within each priority group
368
+ */
369
+ private insertColumnSubtotalHeaders;
370
+ /**
371
+ * Find the correct insertion position for a subtotal header based on parentValue and position config
372
+ */
373
+ private findSubtotalInsertPosition;
342
374
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PivotTransformService, never>;
343
375
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<PivotTransformService>;
344
376
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eru-grid",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.3",
6
6
  "@angular/core": "^20.1.3"