@dhis2/analytics 24.0.9 → 24.1.0

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,10 @@
1
+ # [24.1.0](https://github.com/dhis2/analytics/compare/v24.0.9...v24.1.0) (2022-09-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * add renderId prop in AboutAO and Interpretation units ([#1337](https://github.com/dhis2/analytics/issues/1337)) ([91618c3](https://github.com/dhis2/analytics/commit/91618c35d56d33a080aea44169e48d71176ee739))
7
+
1
8
  ## [24.0.9](https://github.com/dhis2/analytics/compare/v24.0.8...v24.0.9) (2022-09-08)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,9 +1,25 @@
1
1
  # Analytics
2
2
 
3
- master: ![DHIS2: Test](https://github.com/dhis2/analytics/workflows/DHIS2:%20Test/badge.svg) ![DHIS2: Release](https://github.com/dhis2/analytics/workflows/DHIS2:%20Release/badge.svg)
3
+ **master**
4
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
4
5
 
5
- 4.x:
6
- ![DHIS2: Test](https://github.com/dhis2/analytics/workflows/DHIS2:%20Test/badge.svg?branch=4.x) ![DHIS2: Release](https://github.com/dhis2/analytics/workflows/DHIS2:%20Release/badge.svg?branch=4.x)
6
+ **21.x**
7
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=21.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=21.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
8
+
9
+ **20.x**
10
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=20.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=20.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
11
+
12
+ **16.x**
13
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=16.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=16.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
14
+
15
+ **11.0.x**
16
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=11.0.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=11.0.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
17
+
18
+ **4.x**
19
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=4.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=4.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
20
+
21
+ **2.4.x**
22
+ [![Test](https://github.com/dhis2/analytics/actions/workflows/node-test.yml/badge.svg?branch=2.4.x)](https://github.com/dhis2/analytics/actions/workflows/node-test.yml) [![DHIS2: Release](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml/badge.svg?branch=2.4.x)](https://github.com/dhis2/analytics/actions/workflows/node-publish.yml)
7
23
 
8
24
  ## Overview
9
25
 
@@ -25,21 +41,9 @@ To publish, simply mark the commit using [semantic release terminology](https://
25
41
 
26
42
  The master branch follows semantic versioning according to spec.
27
43
 
28
- ### 16.x branch
29
-
30
- Commits to the 16.x branch cannot trigger a major version bump, even if it is technically a breaking change. This is because 17.0.0 has already been published. In the unlikely case that you need to commit a change that is considered breaking, you will have to mark it to only trigger a patch or minor bump, then make sure to update the apps that are locked to the 16.x version of analytics
31
-
32
- ### 11.0.x branch
33
-
34
- Commits to the 11.0.x branch cannot trigger a major or minor version bump, even if it is technically a breaking or feature change. This is because 11.1.0 and 12.0.0 have already been published. In the unlikely case that you need to commit a change that is considered breaking or feature, you will have to mark it to only trigger a patch bump, then make sure to update the apps that are locked to the 11.0.x version of analytics
35
-
36
- ### 4.x branch
37
-
38
- Commits to the 4.x branch cannot trigger a major version bump, even if it is technically a breaking change. This is because 5.0.0 has already been published. In the unlikely case that you need to commit a change that is considered breaking, you will have to mark it to only trigger a patch or minor bump, then make sure to update the apps that are locked to the 4.x version of analytics
39
-
40
- ### 2.4.x branch
44
+ ### .x branches
41
45
 
42
- Commits to the 2.4.x branch cannot trigger a major or minor version bump, even if it is technically a breaking or feature change. This is because 2.5.0 and 3.0.0 have already been published. In the unlikely case that you need to commit a change that is considered breaking or feature, you will have to mark it to only trigger a patch bump, then make sure to update the apps that are locked to the 2.4.x version of analytics
46
+ Commits to .x branches (e.g. 16.x) cannot trigger a major version bump, even if it is technically a breaking change. This is because the next version has already been published. Additionally, branches that use .x for the patch version (e.g. 11.0.x, 2.4.x), cannot trigger a minor version bump. In the unlikely case that you need to commit a change that would trigger a version bump that's not possible, you will have to mark it to only trigger a patch or minor bump respectively, then make sure to update the apps that are locked to the .x version of analytics
43
47
 
44
48
  ## Report an issue
45
49
 
@@ -75,7 +75,8 @@ const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
75
75
 
76
76
  let {
77
77
  type,
78
- id
78
+ id,
79
+ renderId
79
80
  } = _ref3;
80
81
  const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
81
82
  const queries = (0, _react.useMemo)(() => getQueries(type), [type]);
@@ -116,7 +117,7 @@ const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
116
117
  id
117
118
  });
118
119
  }
119
- }, [id, refetch]);
120
+ }, [id, renderId, refetch]);
120
121
  (0, _react.useImperativeHandle)(ref, () => ({
121
122
  refresh: refetch
122
123
  }), [refetch]);
@@ -240,7 +241,8 @@ const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
240
241
  AboutAOUnit.displayName = 'AboutUnit';
241
242
  AboutAOUnit.propTypes = {
242
243
  id: _propTypes.default.string.isRequired,
243
- type: _propTypes.default.string.isRequired
244
+ type: _propTypes.default.string.isRequired,
245
+ renderId: _propTypes.default.number
244
246
  };
245
247
  var _default = AboutAOUnit;
246
248
  exports.default = _default;
@@ -51,7 +51,8 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
51
51
  id,
52
52
  onInterpretationClick,
53
53
  onReplyIconClick,
54
- disabled
54
+ disabled,
55
+ renderId
55
56
  } = _ref2;
56
57
  const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
57
58
  const {
@@ -78,7 +79,7 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
78
79
  id
79
80
  });
80
81
  }
81
- }, [type, id, refetch]);
82
+ }, [type, id, renderId, refetch]);
82
83
  return /*#__PURE__*/_react.default.createElement("div", {
83
84
  className: _style.default.dynamic([["4120713286", [_ui.spacers.dp16, _ui.colors.grey400, _ui.colors.white, _ui.spacers.dp32, _ui.colors.grey900]]]) + " " + ((0, _classnames.default)('container', {
84
85
  expanded: isExpanded
@@ -128,6 +129,7 @@ InterpretationsUnit.propTypes = {
128
129
  id: _propTypes.default.string.isRequired,
129
130
  type: _propTypes.default.string.isRequired,
130
131
  disabled: _propTypes.default.bool,
132
+ renderId: _propTypes.default.number,
131
133
  onInterpretationClick: _propTypes.default.func,
132
134
  onReplyIconClick: _propTypes.default.func
133
135
  };
@@ -51,7 +51,8 @@ const AboutAOUnit = /*#__PURE__*/forwardRef((_ref3, ref) => {
51
51
 
52
52
  let {
53
53
  type,
54
- id
54
+ id,
55
+ renderId
55
56
  } = _ref3;
56
57
  const [isExpanded, setIsExpanded] = useState(true);
57
58
  const queries = useMemo(() => getQueries(type), [type]);
@@ -92,7 +93,7 @@ const AboutAOUnit = /*#__PURE__*/forwardRef((_ref3, ref) => {
92
93
  id
93
94
  });
94
95
  }
95
- }, [id, refetch]);
96
+ }, [id, renderId, refetch]);
96
97
  useImperativeHandle(ref, () => ({
97
98
  refresh: refetch
98
99
  }), [refetch]);
@@ -216,6 +217,7 @@ const AboutAOUnit = /*#__PURE__*/forwardRef((_ref3, ref) => {
216
217
  AboutAOUnit.displayName = 'AboutUnit';
217
218
  AboutAOUnit.propTypes = {
218
219
  id: PropTypes.string.isRequired,
219
- type: PropTypes.string.isRequired
220
+ type: PropTypes.string.isRequired,
221
+ renderId: PropTypes.number
220
222
  };
221
223
  export default AboutAOUnit;
@@ -29,7 +29,8 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
29
29
  id,
30
30
  onInterpretationClick,
31
31
  onReplyIconClick,
32
- disabled
32
+ disabled,
33
+ renderId
33
34
  } = _ref2;
34
35
  const [isExpanded, setIsExpanded] = useState(true);
35
36
  const {
@@ -56,7 +57,7 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
56
57
  id
57
58
  });
58
59
  }
59
- }, [type, id, refetch]);
60
+ }, [type, id, renderId, refetch]);
60
61
  return /*#__PURE__*/React.createElement("div", {
61
62
  className: _JSXStyle.dynamic([["4120713286", [spacers.dp16, colors.grey400, colors.white, spacers.dp32, colors.grey900]]]) + " " + (cx('container', {
62
63
  expanded: isExpanded
@@ -105,6 +106,7 @@ InterpretationsUnit.propTypes = {
105
106
  id: PropTypes.string.isRequired,
106
107
  type: PropTypes.string.isRequired,
107
108
  disabled: PropTypes.bool,
109
+ renderId: PropTypes.number,
108
110
  onInterpretationClick: PropTypes.func,
109
111
  onReplyIconClick: PropTypes.func
110
112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.0.9",
3
+ "version": "24.1.0",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {