@dhis2-ui/organisation-unit-tree 9.11.4 → 9.11.5
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/build/cjs/organisation-unit-tree/organisation-unit-tree-root-error.js +1 -4
- package/build/cjs/organisation-unit-tree/organisation-unit-tree-root-loading.js +1 -4
- package/build/cjs/organisation-unit-tree/organisation-unit-tree.js +8 -14
- package/build/es/organisation-unit-tree/organisation-unit-tree-root-error.js +1 -4
- package/build/es/organisation-unit-tree/organisation-unit-tree-root-loading.js +1 -4
- package/build/es/organisation-unit-tree/organisation-unit-tree.js +9 -14
- package/package.json +6 -6
|
@@ -10,7 +10,7 @@ var _index = _interopRequireDefault(require("../locales/index.js"));
|
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const OrganisationUnitTreeRootError = _ref => {
|
|
12
12
|
let {
|
|
13
|
-
dataTest,
|
|
13
|
+
dataTest = 'dhis2-uiwidgets-orgunittree-error',
|
|
14
14
|
error
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -21,9 +21,6 @@ const OrganisationUnitTreeRootError = _ref => {
|
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
exports.OrganisationUnitTreeRootError = OrganisationUnitTreeRootError;
|
|
24
|
-
OrganisationUnitTreeRootError.defaultProps = {
|
|
25
|
-
dataTest: 'dhis2-uiwidgets-orgunittree-error'
|
|
26
|
-
};
|
|
27
24
|
OrganisationUnitTreeRootError.propTypes = {
|
|
28
25
|
error: _propTypes.default.string.isRequired,
|
|
29
26
|
dataTest: _propTypes.default.string
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const OrganisationUnitTreeRootLoading = _ref => {
|
|
13
13
|
let {
|
|
14
|
-
dataTest
|
|
14
|
+
dataTest = 'dhis2-uiwidgets-orgunittree-loading'
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
17
|
"data-test": dataTest,
|
|
@@ -23,9 +23,6 @@ const OrganisationUnitTreeRootLoading = _ref => {
|
|
|
23
23
|
}, ["div.jsx-814846266{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}"]));
|
|
24
24
|
};
|
|
25
25
|
exports.OrganisationUnitTreeRootLoading = OrganisationUnitTreeRootLoading;
|
|
26
|
-
OrganisationUnitTreeRootLoading.defaultProps = {
|
|
27
|
-
dataTest: 'dhis2-uiwidgets-orgunittree-loading'
|
|
28
|
-
};
|
|
29
26
|
OrganisationUnitTreeRootLoading.propTypes = {
|
|
30
27
|
dataTest: _propTypes.default.string
|
|
31
28
|
};
|
|
@@ -19,20 +19,22 @@ var _index4 = require("./use-root-org-data/index.js");
|
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
// A stable object to reference
|
|
23
|
+
const staticArray = [];
|
|
22
24
|
const OrganisationUnitTree = _ref => {
|
|
23
25
|
let {
|
|
24
26
|
onChange,
|
|
25
27
|
roots,
|
|
26
28
|
autoExpandLoadingError,
|
|
27
|
-
dataTest,
|
|
29
|
+
dataTest = 'dhis2-uiwidgets-orgunittree',
|
|
28
30
|
disableSelection,
|
|
29
31
|
forceReload,
|
|
30
|
-
highlighted,
|
|
32
|
+
highlighted = staticArray,
|
|
31
33
|
isUserDataViewFallback,
|
|
32
|
-
initiallyExpanded,
|
|
33
|
-
filter,
|
|
34
|
-
renderNodeLabel,
|
|
35
|
-
selected,
|
|
34
|
+
initiallyExpanded = staticArray,
|
|
35
|
+
filter = staticArray,
|
|
36
|
+
renderNodeLabel = _index2.defaultRenderNodeLabel,
|
|
37
|
+
selected = staticArray,
|
|
36
38
|
singleSelection,
|
|
37
39
|
suppressAlphabeticalSorting,
|
|
38
40
|
expanded: expandedControlled,
|
|
@@ -200,12 +202,4 @@ OrganisationUnitTree.propTypes = {
|
|
|
200
202
|
* we'd have to reload the sibling nodes currently as well)
|
|
201
203
|
*/
|
|
202
204
|
//idsThatShouldBeReloaded: propTypes.arrayOf(orgUnitIdPropType),
|
|
203
|
-
};
|
|
204
|
-
OrganisationUnitTree.defaultProps = {
|
|
205
|
-
dataTest: 'dhis2-uiwidgets-orgunittree',
|
|
206
|
-
filter: [],
|
|
207
|
-
highlighted: [],
|
|
208
|
-
initiallyExpanded: [],
|
|
209
|
-
selected: [],
|
|
210
|
-
renderNodeLabel: _index2.defaultRenderNodeLabel
|
|
211
205
|
};
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import i18n from '../locales/index.js';
|
|
4
4
|
export const OrganisationUnitTreeRootError = _ref => {
|
|
5
5
|
let {
|
|
6
|
-
dataTest,
|
|
6
|
+
dataTest = 'dhis2-uiwidgets-orgunittree-error',
|
|
7
7
|
error
|
|
8
8
|
} = _ref;
|
|
9
9
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -13,9 +13,6 @@ export const OrganisationUnitTreeRootError = _ref => {
|
|
|
13
13
|
nsSeparator: '>'
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
|
-
OrganisationUnitTreeRootError.defaultProps = {
|
|
17
|
-
dataTest: 'dhis2-uiwidgets-orgunittree-error'
|
|
18
|
-
};
|
|
19
16
|
OrganisationUnitTreeRootError.propTypes = {
|
|
20
17
|
error: PropTypes.string.isRequired,
|
|
21
18
|
dataTest: PropTypes.string
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
export const OrganisationUnitTreeRootLoading = _ref => {
|
|
6
6
|
let {
|
|
7
|
-
dataTest
|
|
7
|
+
dataTest = 'dhis2-uiwidgets-orgunittree-loading'
|
|
8
8
|
} = _ref;
|
|
9
9
|
return /*#__PURE__*/React.createElement("div", {
|
|
10
10
|
"data-test": dataTest,
|
|
@@ -15,9 +15,6 @@ export const OrganisationUnitTreeRootLoading = _ref => {
|
|
|
15
15
|
id: "814846266"
|
|
16
16
|
}, ["div.jsx-814846266{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}"]));
|
|
17
17
|
};
|
|
18
|
-
OrganisationUnitTreeRootLoading.defaultProps = {
|
|
19
|
-
dataTest: 'dhis2-uiwidgets-orgunittree-loading'
|
|
20
|
-
};
|
|
21
18
|
OrganisationUnitTreeRootLoading.propTypes = {
|
|
22
19
|
dataTest: PropTypes.string
|
|
23
20
|
};
|
|
@@ -10,20 +10,23 @@ import { OrganisationUnitTreeRootLoading } from './organisation-unit-tree-root-l
|
|
|
10
10
|
import { useExpanded } from './use-expanded/index.js';
|
|
11
11
|
import { useForceReload } from './use-force-reload.js';
|
|
12
12
|
import { useRootOrgData } from './use-root-org-data/index.js';
|
|
13
|
+
|
|
14
|
+
// A stable object to reference
|
|
15
|
+
const staticArray = [];
|
|
13
16
|
const OrganisationUnitTree = _ref => {
|
|
14
17
|
let {
|
|
15
18
|
onChange,
|
|
16
19
|
roots,
|
|
17
20
|
autoExpandLoadingError,
|
|
18
|
-
dataTest,
|
|
21
|
+
dataTest = 'dhis2-uiwidgets-orgunittree',
|
|
19
22
|
disableSelection,
|
|
20
23
|
forceReload,
|
|
21
|
-
highlighted,
|
|
24
|
+
highlighted = staticArray,
|
|
22
25
|
isUserDataViewFallback,
|
|
23
|
-
initiallyExpanded,
|
|
24
|
-
filter,
|
|
25
|
-
renderNodeLabel,
|
|
26
|
-
selected,
|
|
26
|
+
initiallyExpanded = staticArray,
|
|
27
|
+
filter = staticArray,
|
|
28
|
+
renderNodeLabel = defaultRenderNodeLabel,
|
|
29
|
+
selected = staticArray,
|
|
27
30
|
singleSelection,
|
|
28
31
|
suppressAlphabeticalSorting,
|
|
29
32
|
expanded: expandedControlled,
|
|
@@ -191,12 +194,4 @@ OrganisationUnitTree.propTypes = {
|
|
|
191
194
|
*/
|
|
192
195
|
//idsThatShouldBeReloaded: propTypes.arrayOf(orgUnitIdPropType),
|
|
193
196
|
};
|
|
194
|
-
OrganisationUnitTree.defaultProps = {
|
|
195
|
-
dataTest: 'dhis2-uiwidgets-orgunittree',
|
|
196
|
-
filter: [],
|
|
197
|
-
highlighted: [],
|
|
198
|
-
initiallyExpanded: [],
|
|
199
|
-
selected: [],
|
|
200
|
-
renderNodeLabel: defaultRenderNodeLabel
|
|
201
|
-
};
|
|
202
197
|
export { OrganisationUnitTree };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/organisation-unit-tree",
|
|
3
|
-
"version": "9.11.
|
|
3
|
+
"version": "9.11.5",
|
|
4
4
|
"description": "UI OrganisationUnitTree",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@dhis2/prop-types": "^3.1.2",
|
|
38
|
-
"@dhis2-ui/button": "9.11.
|
|
39
|
-
"@dhis2-ui/checkbox": "9.11.
|
|
40
|
-
"@dhis2-ui/loader": "9.11.
|
|
41
|
-
"@dhis2-ui/node": "9.11.
|
|
42
|
-
"@dhis2/ui-constants": "9.11.
|
|
38
|
+
"@dhis2-ui/button": "9.11.5",
|
|
39
|
+
"@dhis2-ui/checkbox": "9.11.5",
|
|
40
|
+
"@dhis2-ui/loader": "9.11.5",
|
|
41
|
+
"@dhis2-ui/node": "9.11.5",
|
|
42
|
+
"@dhis2/ui-constants": "9.11.5",
|
|
43
43
|
"classnames": "^2.3.1",
|
|
44
44
|
"prop-types": "^15.7.2"
|
|
45
45
|
},
|