@dhis2-ui/layer 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.
|
@@ -14,8 +14,7 @@ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preproces
|
|
|
14
14
|
cy.get('[data-test="dhis2-uicore-layer"]').click();
|
|
15
15
|
});
|
|
16
16
|
(0, _cypressCucumberPreprocessor.When)('the user clicks on the button coordinates', () => {
|
|
17
|
-
cy.getPositionsBySelectors('button').then(
|
|
18
|
-
let [rect] = _ref;
|
|
17
|
+
cy.getPositionsBySelectors('button').then(([rect]) => {
|
|
19
18
|
// Get button center coordinates
|
|
20
19
|
const buttonCenterX = rect.left + rect.width / 2;
|
|
21
20
|
const buttonCenterY = rect.top + rect.height / 2;
|
package/build/cjs/layer.js
CHANGED
|
@@ -11,18 +11,17 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const Layer =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
14
|
+
const Layer = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
dataTest = 'dhis2-uicore-layer',
|
|
18
|
+
disablePortal,
|
|
19
|
+
level = 'auto',
|
|
20
|
+
onBackdropClick,
|
|
21
|
+
onClick,
|
|
22
|
+
position = 'fixed',
|
|
23
|
+
translucent
|
|
24
|
+
}) => {
|
|
26
25
|
const resolvedOnClick = onBackdropClick || onClick;
|
|
27
26
|
return /*#__PURE__*/_react.default.createElement(_portal.Portal, {
|
|
28
27
|
disable: disablePortal
|
|
@@ -12,8 +12,7 @@ When('the user clicks on the layer', () => {
|
|
|
12
12
|
cy.get('[data-test="dhis2-uicore-layer"]').click();
|
|
13
13
|
});
|
|
14
14
|
When('the user clicks on the button coordinates', () => {
|
|
15
|
-
cy.getPositionsBySelectors('button').then(
|
|
16
|
-
let [rect] = _ref;
|
|
15
|
+
cy.getPositionsBySelectors('button').then(([rect]) => {
|
|
17
16
|
// Get button center coordinates
|
|
18
17
|
const buttonCenterX = rect.left + rect.width / 2;
|
|
19
18
|
const buttonCenterY = rect.top + rect.height / 2;
|
package/build/es/layer.js
CHANGED
|
@@ -4,18 +4,17 @@ import { Portal } from '@dhis2-ui/portal';
|
|
|
4
4
|
import cx from 'classnames';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
const Layer =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
7
|
+
const Layer = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
dataTest = 'dhis2-uicore-layer',
|
|
11
|
+
disablePortal,
|
|
12
|
+
level = 'auto',
|
|
13
|
+
onBackdropClick,
|
|
14
|
+
onClick,
|
|
15
|
+
position = 'fixed',
|
|
16
|
+
translucent
|
|
17
|
+
}) => {
|
|
19
18
|
const resolvedOnClick = onBackdropClick || onClick;
|
|
20
19
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
21
20
|
disable: disablePortal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/layer",
|
|
3
|
-
"version": "10.16.
|
|
3
|
+
"version": "10.16.4",
|
|
4
4
|
"description": "UI Layer",
|
|
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/portal": "10.16.
|
|
37
|
-
"@dhis2/ui-constants": "10.16.
|
|
36
|
+
"@dhis2-ui/portal": "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
|
},
|