@dhis2/analytics 28.1.1 → 28.1.3

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.
@@ -39,7 +39,7 @@ const getHeaderForDisplay = ({
39
39
  span,
40
40
  label,
41
41
  includesHierarchy,
42
- ...(currentHeader.style ? {
42
+ ...(currentHeader !== null && currentHeader !== void 0 && currentHeader.style ? {
43
43
  style: currentHeader.style
44
44
  } : {})
45
45
  };
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getSingleValueSubtext = getSingleValueSubtext;
7
7
  var _getSingleValueFormattedValue = require("./getSingleValueFormattedValue.js");
8
+ const INDICATOR_FACTOR_1 = 1;
8
9
  function getSingleValueSubtext(metaData) {
9
10
  const indicatorType = metaData.items[metaData.dimensions.dx[0]].indicatorType;
10
- return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && (indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) !== _getSingleValueFormattedValue.INDICATOR_FACTOR_100 ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
11
+ return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && ![INDICATOR_FACTOR_1, _getSingleValueFormattedValue.INDICATOR_FACTOR_100].includes(indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
11
12
  }
@@ -33,7 +33,7 @@ export const getHeaderForDisplay = ({
33
33
  span,
34
34
  label,
35
35
  includesHierarchy,
36
- ...(currentHeader.style ? {
36
+ ...(currentHeader !== null && currentHeader !== void 0 && currentHeader.style ? {
37
37
  style: currentHeader.style
38
38
  } : {})
39
39
  };
@@ -1,5 +1,6 @@
1
1
  import { INDICATOR_FACTOR_100 } from './getSingleValueFormattedValue.js';
2
+ const INDICATOR_FACTOR_1 = 1;
2
3
  export function getSingleValueSubtext(metaData) {
3
4
  const indicatorType = metaData.items[metaData.dimensions.dx[0]].indicatorType;
4
- return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && (indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) !== INDICATOR_FACTOR_100 ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
5
+ return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && ![INDICATOR_FACTOR_1, INDICATOR_FACTOR_100].includes(indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "28.1.1",
3
+ "version": "28.1.3",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {