@dhis2-ui/organisation-unit-tree 9.2.0 → 9.3.0-alpha.2
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/__stories__/rtl.js +25 -0
- package/build/cjs/organisation-unit-node/label/iconized-checkbox.js +3 -3
- package/build/cjs/organisation-unit-node/label/label-container.js +4 -4
- package/build/cjs/organisation-unit-tree.stories.js +10 -1
- package/build/es/__stories__/rtl.js +11 -0
- package/build/es/organisation-unit-node/label/iconized-checkbox.js +3 -3
- package/build/es/organisation-unit-node/label/label-container.js +4 -4
- package/build/es/organisation-unit-tree.stories.js +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RTL = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = require("../index.js");
|
|
11
|
+
|
|
12
|
+
var _shared = require("./shared.js");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
const RTL = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
+
dir: "rtl"
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement(_index.OrganisationUnitTree, {
|
|
19
|
+
onChange: _shared.onChange,
|
|
20
|
+
name: "Root org unit",
|
|
21
|
+
roots: ['A0000000000'],
|
|
22
|
+
initiallyExpanded: ['/A0000000000/A0000000001']
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
exports.RTL = RTL;
|
|
@@ -39,10 +39,10 @@ const IconizedCheckbox = _ref => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
const checkboxLabel = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
42
|
-
className: "jsx-
|
|
42
|
+
className: "jsx-1000763175"
|
|
43
43
|
}, icon), children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
44
|
-
id: "
|
|
45
|
-
}, ["span.jsx-
|
|
44
|
+
id: "1000763175"
|
|
45
|
+
}, ["span.jsx-1000763175{display:inline-block;margin-inline-end:4px;}"]));
|
|
46
46
|
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
|
|
48
48
|
dense: true,
|
|
@@ -29,15 +29,15 @@ const LabelContainer = _ref => {
|
|
|
29
29
|
children
|
|
30
30
|
} = _ref;
|
|
31
31
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: _style.default.dynamic([["
|
|
32
|
+
className: _style.default.dynamic([["1387769986", [_uiConstants.colors.teal200]]]) + " " + ((0, _classnames.default)({
|
|
33
33
|
highlighted
|
|
34
34
|
}) || "")
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
36
|
-
className: _style.default.dynamic([["
|
|
36
|
+
className: _style.default.dynamic([["1387769986", [_uiConstants.colors.teal200]]])
|
|
37
37
|
}, children), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
38
|
-
id: "
|
|
38
|
+
id: "1387769986",
|
|
39
39
|
dynamic: [_uiConstants.colors.teal200]
|
|
40
|
-
}, ["div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", "span.__jsx-style-dynamic-selector{display:block;}", ".highlighted.__jsx-style-dynamic-selector{background:".concat(_uiConstants.colors.teal200, ";padding-
|
|
40
|
+
}, ["div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", "span.__jsx-style-dynamic-selector{display:block;}", ".highlighted.__jsx-style-dynamic-selector{background:".concat(_uiConstants.colors.teal200, ";padding-inline-end:4px;}")]));
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
exports.LabelContainer = LabelContainer;
|
|
@@ -22,7 +22,8 @@ var _exportNames = {
|
|
|
22
22
|
Loading: true,
|
|
23
23
|
RootLoading: true,
|
|
24
24
|
RootError: true,
|
|
25
|
-
LoadingErrorGrandchild: true
|
|
25
|
+
LoadingErrorGrandchild: true,
|
|
26
|
+
RTL: true
|
|
26
27
|
};
|
|
27
28
|
Object.defineProperty(exports, "Collapsed", {
|
|
28
29
|
enumerable: true,
|
|
@@ -108,6 +109,12 @@ Object.defineProperty(exports, "NoSelection", {
|
|
|
108
109
|
return _noSelection.NoSelection;
|
|
109
110
|
}
|
|
110
111
|
});
|
|
112
|
+
Object.defineProperty(exports, "RTL", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return _rtl.RTL;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
111
118
|
Object.defineProperty(exports, "ReplaceRoots", {
|
|
112
119
|
enumerable: true,
|
|
113
120
|
get: function () {
|
|
@@ -186,6 +193,8 @@ var _rootError = require("./__stories__/root-error.js");
|
|
|
186
193
|
|
|
187
194
|
var _loadingErrorGrandchild = require("./__stories__/loading-error-grandchild.js");
|
|
188
195
|
|
|
196
|
+
var _rtl = require("./__stories__/rtl.js");
|
|
197
|
+
|
|
189
198
|
var _developmentStories = require("./__stories__/development-stories.js");
|
|
190
199
|
|
|
191
200
|
Object.keys(_developmentStories).forEach(function (key) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OrganisationUnitTree } from '../index.js';
|
|
3
|
+
import { onChange } from './shared.js';
|
|
4
|
+
export const RTL = () => /*#__PURE__*/React.createElement("div", {
|
|
5
|
+
dir: "rtl"
|
|
6
|
+
}, /*#__PURE__*/React.createElement(OrganisationUnitTree, {
|
|
7
|
+
onChange: onChange,
|
|
8
|
+
name: "Root org unit",
|
|
9
|
+
roots: ['A0000000000'],
|
|
10
|
+
initiallyExpanded: ['/A0000000000/A0000000001']
|
|
11
|
+
}));
|
|
@@ -23,10 +23,10 @@ export const IconizedCheckbox = _ref => {
|
|
|
23
23
|
dataTest: dataTest
|
|
24
24
|
});
|
|
25
25
|
const checkboxLabel = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
26
|
-
className: "jsx-
|
|
26
|
+
className: "jsx-1000763175"
|
|
27
27
|
}, icon), children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
28
|
-
id: "
|
|
29
|
-
}, ["span.jsx-
|
|
28
|
+
id: "1000763175"
|
|
29
|
+
}, ["span.jsx-1000763175{display:inline-block;margin-inline-end:4px;}"]));
|
|
30
30
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
31
31
|
dense: true,
|
|
32
32
|
checked: checked,
|
|
@@ -16,15 +16,15 @@ export const LabelContainer = _ref => {
|
|
|
16
16
|
children
|
|
17
17
|
} = _ref;
|
|
18
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: _JSXStyle.dynamic([["
|
|
19
|
+
className: _JSXStyle.dynamic([["1387769986", [colors.teal200]]]) + " " + (cx({
|
|
20
20
|
highlighted
|
|
21
21
|
}) || "")
|
|
22
22
|
}, /*#__PURE__*/React.createElement("span", {
|
|
23
|
-
className: _JSXStyle.dynamic([["
|
|
23
|
+
className: _JSXStyle.dynamic([["1387769986", [colors.teal200]]])
|
|
24
24
|
}, children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
25
|
-
id: "
|
|
25
|
+
id: "1387769986",
|
|
26
26
|
dynamic: [colors.teal200]
|
|
27
|
-
}, ["div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", "span.__jsx-style-dynamic-selector{display:block;}", ".highlighted.__jsx-style-dynamic-selector{background:".concat(colors.teal200, ";padding-
|
|
27
|
+
}, ["div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", "span.__jsx-style-dynamic-selector{display:block;}", ".highlighted.__jsx-style-dynamic-selector{background:".concat(colors.teal200, ";padding-inline-end:4px;}")]));
|
|
28
28
|
};
|
|
29
29
|
LabelContainer.propTypes = {
|
|
30
30
|
children: PropTypes.node,
|
|
@@ -38,4 +38,5 @@ export { Loading } from './__stories__/loading.js';
|
|
|
38
38
|
export { RootLoading } from './__stories__/root-loading.js';
|
|
39
39
|
export { RootError } from './__stories__/root-error.js';
|
|
40
40
|
export { LoadingErrorGrandchild } from './__stories__/loading-error-grandchild.js';
|
|
41
|
+
export { RTL } from './__stories__/rtl.js';
|
|
41
42
|
export * from './__stories__/development-stories.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/organisation-unit-tree",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0-alpha.2",
|
|
4
4
|
"description": "UI OrganisationUnitTree",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@dhis2/prop-types": "^3.1.2",
|
|
38
|
-
"@dhis2-ui/checkbox": "9.
|
|
39
|
-
"@dhis2-ui/loader": "9.
|
|
40
|
-
"@dhis2-ui/node": "9.
|
|
41
|
-
"@dhis2/ui-constants": "9.
|
|
38
|
+
"@dhis2-ui/checkbox": "9.3.0-alpha.2",
|
|
39
|
+
"@dhis2-ui/loader": "9.3.0-alpha.2",
|
|
40
|
+
"@dhis2-ui/node": "9.3.0-alpha.2",
|
|
41
|
+
"@dhis2/ui-constants": "9.3.0-alpha.2",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"prop-types": "^15.7.2"
|
|
44
44
|
},
|