@dhis2/analytics 26.6.8 → 26.6.9

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.
@@ -28,7 +28,8 @@ const OrgUnitDimension = _ref => {
28
28
  hideGroupSelect,
29
29
  hideLevelSelect,
30
30
  hideUserOrgUnits,
31
- warning
31
+ warning,
32
+ displayNameProp
32
33
  } = _ref;
33
34
  const [ouLevels, setOuLevels] = (0, _react.useState)([]);
34
35
  const [ouGroups, setOuGroups] = (0, _react.useState)([]);
@@ -71,12 +72,12 @@ const OrgUnitDimension = _ref => {
71
72
  setOuLevels(result);
72
73
  };
73
74
  const doFetchOuGroups = async () => {
74
- const result = await (0, _organisationUnits.apiFetchOrganisationUnitGroups)(dataEngine);
75
+ const result = await (0, _organisationUnits.apiFetchOrganisationUnitGroups)(dataEngine, displayNameProp);
75
76
  setOuGroups(result);
76
77
  };
77
78
  !hideLevelSelect && doFetchOuLevels();
78
79
  !hideGroupSelect && doFetchOuGroups();
79
- }, [dataEngine, hideLevelSelect, hideGroupSelect]);
80
+ }, [dataEngine, hideLevelSelect, hideGroupSelect, displayNameProp]);
80
81
  const onLevelChange = ids => {
81
82
  const items = ids.map(id => ({
82
83
  id: _index2.ouIdHelper.addLevelPrefix(id),
@@ -261,6 +262,7 @@ OrgUnitDimension.defaultProps = {
261
262
  hideUserOrgUnits: false
262
263
  };
263
264
  OrgUnitDimension.propTypes = {
265
+ displayNameProp: _propTypes.default.string,
264
266
  hideGroupSelect: _propTypes.default.bool,
265
267
  hideLevelSelect: _propTypes.default.bool,
266
268
  hideUserOrgUnits: _propTypes.default.bool,
@@ -19,7 +19,8 @@ const OrgUnitDimension = _ref => {
19
19
  hideGroupSelect,
20
20
  hideLevelSelect,
21
21
  hideUserOrgUnits,
22
- warning
22
+ warning,
23
+ displayNameProp
23
24
  } = _ref;
24
25
  const [ouLevels, setOuLevels] = useState([]);
25
26
  const [ouGroups, setOuGroups] = useState([]);
@@ -62,12 +63,12 @@ const OrgUnitDimension = _ref => {
62
63
  setOuLevels(result);
63
64
  };
64
65
  const doFetchOuGroups = async () => {
65
- const result = await apiFetchOrganisationUnitGroups(dataEngine);
66
+ const result = await apiFetchOrganisationUnitGroups(dataEngine, displayNameProp);
66
67
  setOuGroups(result);
67
68
  };
68
69
  !hideLevelSelect && doFetchOuLevels();
69
70
  !hideGroupSelect && doFetchOuGroups();
70
- }, [dataEngine, hideLevelSelect, hideGroupSelect]);
71
+ }, [dataEngine, hideLevelSelect, hideGroupSelect, displayNameProp]);
71
72
  const onLevelChange = ids => {
72
73
  const items = ids.map(id => ({
73
74
  id: ouIdHelper.addLevelPrefix(id),
@@ -252,6 +253,7 @@ OrgUnitDimension.defaultProps = {
252
253
  hideUserOrgUnits: false
253
254
  };
254
255
  OrgUnitDimension.propTypes = {
256
+ displayNameProp: PropTypes.string,
255
257
  hideGroupSelect: PropTypes.bool,
256
258
  hideLevelSelect: PropTypes.bool,
257
259
  hideUserOrgUnits: PropTypes.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "26.6.8",
3
+ "version": "26.6.9",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {