@dhis2/analytics 26.6.7 → 26.6.8

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.
@@ -372,7 +372,15 @@ class PivotTableEngine {
372
372
  return undefined;
373
373
  }
374
374
  const cellValue = this.data[row][column];
375
- if (cellValue && !Array.isArray(cellValue)) {
375
+ if (!cellValue) {
376
+ // Empty cell
377
+ // The cell still needs to get the valueType to render correctly 0 and cumulative values
378
+ return {
379
+ valueType: _valueTypes.VALUE_TYPE_NUMBER,
380
+ totalAggregationType: _pivotTableConstants.AGGREGATE_TYPE_SUM
381
+ };
382
+ }
383
+ if (!Array.isArray(cellValue)) {
376
384
  // This is a total cell
377
385
  return {
378
386
  valueType: cellValue.valueType,
@@ -399,11 +407,6 @@ class PivotTableEngine {
399
407
  };
400
408
  }
401
409
 
402
- // Empty cell
403
- // The cell still needs to get the valueType to render correctly 0 and cumulative values
404
- //
405
- // OR
406
- //
407
410
  // Data is in Filter
408
411
  // TODO : This assumes the server ignores text types, we should confirm this is the case
409
412
  return {
@@ -365,7 +365,15 @@ export class PivotTableEngine {
365
365
  return undefined;
366
366
  }
367
367
  const cellValue = this.data[row][column];
368
- if (cellValue && !Array.isArray(cellValue)) {
368
+ if (!cellValue) {
369
+ // Empty cell
370
+ // The cell still needs to get the valueType to render correctly 0 and cumulative values
371
+ return {
372
+ valueType: VALUE_TYPE_NUMBER,
373
+ totalAggregationType: AGGREGATE_TYPE_SUM
374
+ };
375
+ }
376
+ if (!Array.isArray(cellValue)) {
369
377
  // This is a total cell
370
378
  return {
371
379
  valueType: cellValue.valueType,
@@ -392,11 +400,6 @@ export class PivotTableEngine {
392
400
  };
393
401
  }
394
402
 
395
- // Empty cell
396
- // The cell still needs to get the valueType to render correctly 0 and cumulative values
397
- //
398
- // OR
399
- //
400
403
  // Data is in Filter
401
404
  // TODO : This assumes the server ignores text types, we should confirm this is the case
402
405
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "26.6.7",
3
+ "version": "26.6.8",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {