@dhis2/analytics 24.3.14 → 24.4.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [24.4.1](https://github.com/dhis2/analytics/compare/v24.4.0...v24.4.1) (2023-01-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * make icon prop not required ([#1410](https://github.com/dhis2/analytics/issues/1410)) ([169976c](https://github.com/dhis2/analytics/commit/169976cdde28880785ff836f2e0acba263e7bb53))
7
+
8
+ # [24.4.0](https://github.com/dhis2/analytics/compare/v24.3.14...v24.4.0) (2023-01-03)
9
+
10
+
11
+ ### Features
12
+
13
+ * enable legends for stacked column/bar ([#1388](https://github.com/dhis2/analytics/issues/1388)) ([667db6a](https://github.com/dhis2/analytics/commit/667db6a04072911f8c3923dbfc33b7baecb955e2))
14
+
1
15
  ## [24.3.14](https://github.com/dhis2/analytics/compare/v24.3.13...v24.3.14) (2023-01-02)
2
16
 
3
17
 
@@ -56,11 +56,11 @@ const CustomSelectOption = props => props.disabled ? /*#__PURE__*/_react.default
56
56
 
57
57
  exports.CustomSelectOption = CustomSelectOption;
58
58
  CustomSelectOption.propTypes = {
59
- icon: _propTypes.default.element.isRequired,
60
59
  label: _propTypes.default.string.isRequired,
61
60
  value: _propTypes.default.string.isRequired,
62
61
  active: _propTypes.default.bool,
63
62
  disabled: _propTypes.default.bool,
63
+ icon: _propTypes.default.element,
64
64
  onClick: _propTypes.default.func
65
65
  };
66
66
  CustomSelectOptionItem.propTypes = CustomSelectOption.propTypes;
@@ -108,7 +108,7 @@ const multiTypeTypes = [VIS_TYPE_COLUMN, VIS_TYPE_LINE];
108
108
  const twoCategoryChartTypes = [VIS_TYPE_COLUMN, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_BAR, VIS_TYPE_STACKED_BAR, VIS_TYPE_LINE, VIS_TYPE_AREA, VIS_TYPE_STACKED_AREA];
109
109
  const columnBasedTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_YEAR_OVER_YEAR_COLUMN, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_STACKED_BAR];
110
110
  const verticalTypes = [VIS_TYPE_BAR, VIS_TYPE_STACKED_BAR, VIS_TYPE_GAUGE];
111
- const legendSetTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_GAUGE, VIS_TYPE_SINGLE_VALUE, VIS_TYPE_PIVOT_TABLE];
111
+ const legendSetTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_GAUGE, VIS_TYPE_SINGLE_VALUE, VIS_TYPE_PIVOT_TABLE, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_STACKED_BAR];
112
112
  const defaultVisType = VIS_TYPE_COLUMN;
113
113
  exports.defaultVisType = defaultVisType;
114
114
 
@@ -39,11 +39,11 @@ export const CustomSelectOption = props => props.disabled ? /*#__PURE__*/React.c
39
39
  content: i18n.t('Not supported by this app yet')
40
40
  }, /*#__PURE__*/React.createElement(CustomSelectOptionItem, props)) : /*#__PURE__*/React.createElement(CustomSelectOptionItem, props);
41
41
  CustomSelectOption.propTypes = {
42
- icon: PropTypes.element.isRequired,
43
42
  label: PropTypes.string.isRequired,
44
43
  value: PropTypes.string.isRequired,
45
44
  active: PropTypes.bool,
46
45
  disabled: PropTypes.bool,
46
+ icon: PropTypes.element,
47
47
  onClick: PropTypes.func
48
48
  };
49
49
  CustomSelectOptionItem.propTypes = CustomSelectOption.propTypes;
@@ -73,7 +73,7 @@ const multiTypeTypes = [VIS_TYPE_COLUMN, VIS_TYPE_LINE];
73
73
  const twoCategoryChartTypes = [VIS_TYPE_COLUMN, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_BAR, VIS_TYPE_STACKED_BAR, VIS_TYPE_LINE, VIS_TYPE_AREA, VIS_TYPE_STACKED_AREA];
74
74
  const columnBasedTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_YEAR_OVER_YEAR_COLUMN, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_STACKED_BAR];
75
75
  const verticalTypes = [VIS_TYPE_BAR, VIS_TYPE_STACKED_BAR, VIS_TYPE_GAUGE];
76
- const legendSetTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_GAUGE, VIS_TYPE_SINGLE_VALUE, VIS_TYPE_PIVOT_TABLE];
76
+ const legendSetTypes = [VIS_TYPE_COLUMN, VIS_TYPE_BAR, VIS_TYPE_GAUGE, VIS_TYPE_SINGLE_VALUE, VIS_TYPE_PIVOT_TABLE, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_STACKED_BAR];
77
77
  export const defaultVisType = VIS_TYPE_COLUMN;
78
78
  export const isStacked = type => stackedTypes.includes(type);
79
79
  export const isYearOverYear = type => yearOverYearTypes.includes(type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.3.14",
3
+ "version": "24.4.1",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {