@dhis2-ui/intersection-detector 9.12.0-alpha.4 → 9.13.0
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.
|
@@ -12,11 +12,11 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
const IntersectionDetector = _ref => {
|
|
14
14
|
let {
|
|
15
|
-
threshold,
|
|
15
|
+
threshold = 0,
|
|
16
16
|
onChange,
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
|
-
dataTest,
|
|
19
|
+
dataTest = 'dhis2-uicore-intersectiondetector',
|
|
20
20
|
rootRef
|
|
21
21
|
} = _ref;
|
|
22
22
|
// Use useRef instead of useState to prevent unnecessary re-render:
|
|
@@ -73,10 +73,6 @@ const IntersectionDetector = _ref => {
|
|
|
73
73
|
}, ["div.jsx-2829611397{height:100%;}"]));
|
|
74
74
|
};
|
|
75
75
|
exports.IntersectionDetector = IntersectionDetector;
|
|
76
|
-
IntersectionDetector.defaultProps = {
|
|
77
|
-
threshold: 0,
|
|
78
|
-
dataTest: 'dhis2-uicore-intersectiondetector'
|
|
79
|
-
};
|
|
80
76
|
IntersectionDetector.propTypes = {
|
|
81
77
|
/** React ref on other component to detect intersections with */
|
|
82
78
|
rootRef: _propTypes.default.shape({
|
|
@@ -3,11 +3,11 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React, { useEffect, useRef } from 'react';
|
|
4
4
|
export const IntersectionDetector = _ref => {
|
|
5
5
|
let {
|
|
6
|
-
threshold,
|
|
6
|
+
threshold = 0,
|
|
7
7
|
onChange,
|
|
8
8
|
children,
|
|
9
9
|
className,
|
|
10
|
-
dataTest,
|
|
10
|
+
dataTest = 'dhis2-uicore-intersectiondetector',
|
|
11
11
|
rootRef
|
|
12
12
|
} = _ref;
|
|
13
13
|
// Use useRef instead of useState to prevent unnecessary re-render:
|
|
@@ -63,10 +63,6 @@ export const IntersectionDetector = _ref => {
|
|
|
63
63
|
id: "2829611397"
|
|
64
64
|
}, ["div.jsx-2829611397{height:100%;}"]));
|
|
65
65
|
};
|
|
66
|
-
IntersectionDetector.defaultProps = {
|
|
67
|
-
threshold: 0,
|
|
68
|
-
dataTest: 'dhis2-uicore-intersectiondetector'
|
|
69
|
-
};
|
|
70
66
|
IntersectionDetector.propTypes = {
|
|
71
67
|
/** React ref on other component to detect intersections with */
|
|
72
68
|
rootRef: PropTypes.shape({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/intersection-detector",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0",
|
|
4
4
|
"description": "UI IntersectionDetector",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"react": "^16.13",
|
|
31
|
-
"react-dom": "^16.13",
|
|
30
|
+
"react": "^16.13 || ^18",
|
|
31
|
+
"react-dom": "^16.13 || ^18",
|
|
32
32
|
"styled-jsx": "^4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2/ui-constants": "9.
|
|
36
|
+
"@dhis2/ui-constants": "9.13.0",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"types"
|
|
43
43
|
],
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"react": "
|
|
46
|
-
"react-dom": "
|
|
45
|
+
"react": "^18.3.1",
|
|
46
|
+
"react-dom": "^18.3.1",
|
|
47
47
|
"styled-jsx": "^4.0.1"
|
|
48
48
|
},
|
|
49
49
|
"types": "types"
|