@dhis2-ui/node 10.16.3 → 10.16.4
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/leaves.js +12 -15
- package/build/cjs/node.js +10 -11
- package/build/cjs/node.prod.stories.js +2 -6
- package/build/cjs/toggle.js +6 -7
- package/build/es/leaves.js +12 -15
- package/build/es/node.js +10 -11
- package/build/es/node.prod.stories.js +2 -6
- package/build/es/toggle.js +6 -7
- package/package.json +3 -3
package/build/cjs/leaves.js
CHANGED
|
@@ -9,21 +9,18 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const Leaves =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: "3677374542"
|
|
25
|
-
}, ["div.jsx-3677374542{height:0;overflow:hidden;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".open.jsx-3677374542{height:auto;}"]));
|
|
26
|
-
};
|
|
12
|
+
const Leaves = ({
|
|
13
|
+
children,
|
|
14
|
+
open,
|
|
15
|
+
dataTest
|
|
16
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
+
"data-test": dataTest,
|
|
18
|
+
className: "jsx-3677374542" + " " + ((0, _classnames.default)({
|
|
19
|
+
open
|
|
20
|
+
}) || "")
|
|
21
|
+
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
22
|
+
id: "3677374542"
|
|
23
|
+
}, ["div.jsx-3677374542{height:0;overflow:hidden;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".open.jsx-3677374542{height:auto;}"]));
|
|
27
24
|
exports.Leaves = Leaves;
|
|
28
25
|
Leaves.propTypes = {
|
|
29
26
|
children: _propTypes.default.node,
|
package/build/cjs/node.js
CHANGED
|
@@ -12,17 +12,16 @@ var _leaves = require("./leaves.js");
|
|
|
12
12
|
var _spacer = require("./spacer.js");
|
|
13
13
|
var _toggle = require("./toggle.js");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const Node =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
15
|
+
const Node = ({
|
|
16
|
+
open,
|
|
17
|
+
className,
|
|
18
|
+
component: label,
|
|
19
|
+
children,
|
|
20
|
+
icon,
|
|
21
|
+
onOpen,
|
|
22
|
+
onClose,
|
|
23
|
+
dataTest = 'dhis2-uicore-node'
|
|
24
|
+
}) => {
|
|
26
25
|
const hasLeaves = !!_react.default.Children.toArray(children).filter(i => i).length;
|
|
27
26
|
const showArrow = !icon && hasLeaves;
|
|
28
27
|
const showSpacer = !icon && !hasLeaves;
|
|
@@ -27,12 +27,8 @@ window.onClose = (payload, event) => {
|
|
|
27
27
|
console.log('onClose payload', payload);
|
|
28
28
|
console.log('onClose event', event);
|
|
29
29
|
};
|
|
30
|
-
const onOpen =
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
const onClose = function () {
|
|
34
|
-
return window.onClose(...arguments);
|
|
35
|
-
};
|
|
30
|
+
const onOpen = (...args) => window.onOpen(...args);
|
|
31
|
+
const onClose = (...args) => window.onClose(...args);
|
|
36
32
|
var _default = exports.default = {
|
|
37
33
|
title: 'Node',
|
|
38
34
|
component: _node.Node,
|
package/build/cjs/toggle.js
CHANGED
|
@@ -22,13 +22,12 @@ const ArrowDown = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
|
22
22
|
}), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
23
23
|
id: "4098137027"
|
|
24
24
|
}, ["svg.jsx-4098137027{fill:inherit;height:24px;width:24px;vertical-align:middle;pointer-events:none;}"])));
|
|
25
|
-
const Toggle =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref;
|
|
25
|
+
const Toggle = ({
|
|
26
|
+
open,
|
|
27
|
+
onOpen,
|
|
28
|
+
onClose,
|
|
29
|
+
dataTest
|
|
30
|
+
}) => {
|
|
32
31
|
const onClick = open ? onClose : onOpen;
|
|
33
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
33
|
"data-test": dataTest,
|
package/build/es/leaves.js
CHANGED
|
@@ -2,21 +2,18 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const Leaves =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
id: "3677374542"
|
|
18
|
-
}, ["div.jsx-3677374542{height:0;overflow:hidden;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".open.jsx-3677374542{height:auto;}"]));
|
|
19
|
-
};
|
|
5
|
+
export const Leaves = ({
|
|
6
|
+
children,
|
|
7
|
+
open,
|
|
8
|
+
dataTest
|
|
9
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
"data-test": dataTest,
|
|
11
|
+
className: "jsx-3677374542" + " " + (cx({
|
|
12
|
+
open
|
|
13
|
+
}) || "")
|
|
14
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
15
|
+
id: "3677374542"
|
|
16
|
+
}, ["div.jsx-3677374542{height:0;overflow:hidden;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".open.jsx-3677374542{height:auto;}"]));
|
|
20
17
|
Leaves.propTypes = {
|
|
21
18
|
children: PropTypes.node,
|
|
22
19
|
dataTest: PropTypes.string,
|
package/build/es/node.js
CHANGED
|
@@ -5,17 +5,16 @@ import React from 'react';
|
|
|
5
5
|
import { Leaves } from './leaves.js';
|
|
6
6
|
import { Spacer } from './spacer.js';
|
|
7
7
|
import { Toggle } from './toggle.js';
|
|
8
|
-
export const Node =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
8
|
+
export const Node = ({
|
|
9
|
+
open,
|
|
10
|
+
className,
|
|
11
|
+
component: label,
|
|
12
|
+
children,
|
|
13
|
+
icon,
|
|
14
|
+
onOpen,
|
|
15
|
+
onClose,
|
|
16
|
+
dataTest = 'dhis2-uicore-node'
|
|
17
|
+
}) => {
|
|
19
18
|
const hasLeaves = !!React.Children.toArray(children).filter(i => i).length;
|
|
20
19
|
const showArrow = !icon && hasLeaves;
|
|
21
20
|
const showSpacer = !icon && !hasLeaves;
|
|
@@ -20,12 +20,8 @@ window.onClose = (payload, event) => {
|
|
|
20
20
|
console.log('onClose payload', payload);
|
|
21
21
|
console.log('onClose event', event);
|
|
22
22
|
};
|
|
23
|
-
const onOpen =
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
const onClose = function () {
|
|
27
|
-
return window.onClose(...arguments);
|
|
28
|
-
};
|
|
23
|
+
const onOpen = (...args) => window.onOpen(...args);
|
|
24
|
+
const onClose = (...args) => window.onClose(...args);
|
|
29
25
|
export default {
|
|
30
26
|
title: 'Node',
|
|
31
27
|
component: Node,
|
package/build/es/toggle.js
CHANGED
|
@@ -15,13 +15,12 @@ const ArrowDown = () => /*#__PURE__*/React.createElement("div", {
|
|
|
15
15
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
16
16
|
id: "4098137027"
|
|
17
17
|
}, ["svg.jsx-4098137027{fill:inherit;height:24px;width:24px;vertical-align:middle;pointer-events:none;}"])));
|
|
18
|
-
export const Toggle =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref;
|
|
18
|
+
export const Toggle = ({
|
|
19
|
+
open,
|
|
20
|
+
onOpen,
|
|
21
|
+
onClose,
|
|
22
|
+
dataTest
|
|
23
|
+
}) => {
|
|
25
24
|
const onClick = open ? onClose : onOpen;
|
|
26
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
26
|
"data-test": dataTest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/node",
|
|
3
|
-
"version": "10.16.
|
|
3
|
+
"version": "10.16.4",
|
|
4
4
|
"description": "UI Node",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2-ui/loader": "10.16.
|
|
37
|
-
"@dhis2/ui-constants": "10.16.
|
|
36
|
+
"@dhis2-ui/loader": "10.16.4",
|
|
37
|
+
"@dhis2/ui-constants": "10.16.4",
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"prop-types": "^15.7.2"
|
|
40
40
|
},
|