@itwin/itwinui-react 1.48.2-dev.2 → 1.48.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### 1.48.3
|
|
4
|
+
|
|
5
|
+
- Updated `@itwin/itwinui-css` to `0.63.3` which renames the cascade layer to `itwinui` (considered public).
|
|
6
|
+
|
|
7
|
+
### 1.48.2
|
|
8
|
+
|
|
9
|
+
- Wrapped all styles in a `@layer` to make it easier to override them. This makes it possible for iTwinUI v2 to unset all conflicting styles from v1, thereby enabling incremental adoption.
|
|
10
|
+
- Fixed an issue where Table's `onBottomReached` callback was not being invoked when using strict mode with react 18.
|
|
11
|
+
|
|
3
12
|
### [1.48.1](https://www.github.com/iTwin/iTwinUI-react/compare/v1.48.0...v1.48.1) (2022-10-24)
|
|
4
13
|
|
|
5
14
|
### Fixes
|
|
@@ -26,19 +26,15 @@ var useIntersection = function (onIntersect, options, once) {
|
|
|
26
26
|
if (options === void 0) { options = {}; }
|
|
27
27
|
if (once === void 0) { once = true; }
|
|
28
28
|
var root = options.root, rootMargin = options.rootMargin, threshold = options.threshold;
|
|
29
|
-
var
|
|
29
|
+
var cleanupRef = react_1.default.useRef(function () { });
|
|
30
30
|
var setRef = react_1.default.useCallback(function (node) {
|
|
31
|
-
var _a;
|
|
32
|
-
|
|
31
|
+
var _a, _b;
|
|
32
|
+
(_a = cleanupRef.current) === null || _a === void 0 ? void 0 : _a.call(cleanupRef);
|
|
33
|
+
cleanupRef.current = function () { }; // ensure it doesn't try to clean up again
|
|
34
|
+
if (!node || !((_b = (0, dom_1.getWindow)()) === null || _b === void 0 ? void 0 : _b.IntersectionObserver)) {
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
35
|
-
|
|
36
|
-
observer.current.disconnect();
|
|
37
|
-
}
|
|
38
|
-
if (!node) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
observer.current = new IntersectionObserver(function (_a, obs) {
|
|
37
|
+
var observer = new IntersectionObserver(function (_a, obs) {
|
|
42
38
|
var entry = _a[0];
|
|
43
39
|
if (entry.isIntersecting) {
|
|
44
40
|
if (once) {
|
|
@@ -47,9 +43,9 @@ var useIntersection = function (onIntersect, options, once) {
|
|
|
47
43
|
onIntersect();
|
|
48
44
|
}
|
|
49
45
|
}, { root: root, rootMargin: rootMargin, threshold: threshold });
|
|
50
|
-
observer.
|
|
46
|
+
observer.observe(node);
|
|
47
|
+
cleanupRef.current = function () { return observer.disconnect(); };
|
|
51
48
|
}, [onIntersect, once, root, rootMargin, threshold]);
|
|
52
|
-
react_1.default.useEffect(function () { return function () { var _a; return (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect(); }; }, []);
|
|
53
49
|
return setRef;
|
|
54
50
|
};
|
|
55
51
|
exports.useIntersection = useIntersection;
|
|
@@ -20,19 +20,15 @@ export var useIntersection = function (onIntersect, options, once) {
|
|
|
20
20
|
if (options === void 0) { options = {}; }
|
|
21
21
|
if (once === void 0) { once = true; }
|
|
22
22
|
var root = options.root, rootMargin = options.rootMargin, threshold = options.threshold;
|
|
23
|
-
var
|
|
23
|
+
var cleanupRef = React.useRef(function () { });
|
|
24
24
|
var setRef = React.useCallback(function (node) {
|
|
25
|
-
var _a;
|
|
26
|
-
|
|
25
|
+
var _a, _b;
|
|
26
|
+
(_a = cleanupRef.current) === null || _a === void 0 ? void 0 : _a.call(cleanupRef);
|
|
27
|
+
cleanupRef.current = function () { }; // ensure it doesn't try to clean up again
|
|
28
|
+
if (!node || !((_b = getWindow()) === null || _b === void 0 ? void 0 : _b.IntersectionObserver)) {
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
observer.current.disconnect();
|
|
31
|
-
}
|
|
32
|
-
if (!node) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
observer.current = new IntersectionObserver(function (_a, obs) {
|
|
31
|
+
var observer = new IntersectionObserver(function (_a, obs) {
|
|
36
32
|
var entry = _a[0];
|
|
37
33
|
if (entry.isIntersecting) {
|
|
38
34
|
if (once) {
|
|
@@ -41,8 +37,8 @@ export var useIntersection = function (onIntersect, options, once) {
|
|
|
41
37
|
onIntersect();
|
|
42
38
|
}
|
|
43
39
|
}, { root: root, rootMargin: rootMargin, threshold: threshold });
|
|
44
|
-
observer.
|
|
40
|
+
observer.observe(node);
|
|
41
|
+
cleanupRef.current = function () { return observer.disconnect(); };
|
|
45
42
|
}, [onIntersect, once, root, rootMargin, threshold]);
|
|
46
|
-
React.useEffect(function () { return function () { var _a; return (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect(); }; }, []);
|
|
47
43
|
return setRef;
|
|
48
44
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/itwinui-react",
|
|
3
|
-
"version": "1.48.
|
|
3
|
+
"version": "1.48.3",
|
|
4
4
|
"author": "Bentley Systems",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"createComponent": "node ../../scripts/createComponent.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@itwin/itwinui-css": "0.63.
|
|
47
|
+
"@itwin/itwinui-css": "^0.63.3",
|
|
48
48
|
"@itwin/itwinui-icons-react": "^1.10.1",
|
|
49
49
|
"@itwin/itwinui-illustrations-react": "^1.3.1",
|
|
50
50
|
"@tippyjs/react": "^4.2.6",
|