@enact/ui 4.5.3 → 4.5.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/CHANGELOG.md +6 -0
- package/package.json +2 -2
- package/useScroll/useScroll.js +59 -49
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact ui module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [4.5.4] - 2023-06-07
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `ui/Scroller` and `ui/VirtualList` to pass scrolling state properly to UI libraries
|
|
10
|
+
|
|
5
11
|
## [4.5.3] - 2023-04-06
|
|
6
12
|
|
|
7
13
|
No significant changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@enact/core": "^4.5.
|
|
34
|
+
"@enact/core": "^4.5.4",
|
|
35
35
|
"classnames": "^2.3.1",
|
|
36
36
|
"direction": "^1.0.4",
|
|
37
37
|
"invariant": "^2.2.4",
|
package/useScroll/useScroll.js
CHANGED
|
@@ -236,73 +236,83 @@ var useScrollBase = function useScrollBase(props) {
|
|
|
236
236
|
isVerticalScrollbarVisible: isVerticalScrollbarVisible
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
|
+
|
|
240
|
+
/* istanbul ignore next */
|
|
241
|
+
var themeScrollContainerHandle = (0, _react.useRef)({
|
|
242
|
+
get animator() {
|
|
243
|
+
return mutableRef.current.animator;
|
|
244
|
+
},
|
|
245
|
+
get bounds() {
|
|
246
|
+
return mutableRef.current.bounds;
|
|
247
|
+
},
|
|
248
|
+
get isDragging() {
|
|
249
|
+
return mutableRef.current.isDragging;
|
|
250
|
+
},
|
|
251
|
+
set isDragging(val) {
|
|
252
|
+
mutableRef.current.isDragging = val;
|
|
253
|
+
},
|
|
254
|
+
get isScrollAnimationTargetAccumulated() {
|
|
255
|
+
return mutableRef.current.isScrollAnimationTargetAccumulated;
|
|
256
|
+
},
|
|
257
|
+
set isScrollAnimationTargetAccumulated(val) {
|
|
258
|
+
mutableRef.current.isScrollAnimationTargetAccumulated = val;
|
|
259
|
+
},
|
|
260
|
+
get lastInputType() {
|
|
261
|
+
return mutableRef.current.lastInputType;
|
|
262
|
+
},
|
|
263
|
+
set lastInputType(val) {
|
|
264
|
+
mutableRef.current.lastInputType = val;
|
|
265
|
+
},
|
|
266
|
+
get rtl() {
|
|
267
|
+
return rtl;
|
|
268
|
+
},
|
|
269
|
+
get scrollBounds() {
|
|
270
|
+
return getScrollBounds();
|
|
271
|
+
},
|
|
272
|
+
get scrollHeight() {
|
|
273
|
+
return mutableRef.current.bounds.scrollHeight;
|
|
274
|
+
},
|
|
275
|
+
get scrolling() {
|
|
276
|
+
return mutableRef.current.scrolling;
|
|
277
|
+
},
|
|
278
|
+
get scrollLeft() {
|
|
279
|
+
return mutableRef.current.scrollLeft;
|
|
280
|
+
},
|
|
281
|
+
get scrollToInfo() {
|
|
282
|
+
return mutableRef.current.scrollToInfo;
|
|
283
|
+
},
|
|
284
|
+
get scrollTop() {
|
|
285
|
+
return mutableRef.current.scrollTop;
|
|
286
|
+
},
|
|
287
|
+
get wheelDirection() {
|
|
288
|
+
return mutableRef.current.wheelDirection;
|
|
289
|
+
},
|
|
290
|
+
set wheelDirection(val) {
|
|
291
|
+
mutableRef.current.wheelDirection = val;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
239
294
|
if (mutableRef.current.animator == null) {
|
|
240
295
|
mutableRef.current.animator = new _ScrollAnimator["default"]();
|
|
241
296
|
}
|
|
242
297
|
(0, _react.useLayoutEffect)(function () {
|
|
298
|
+
/* istanbul ignore next */
|
|
243
299
|
if (setScrollContainerHandle) {
|
|
244
|
-
|
|
245
|
-
animator: mutableRef.current.animator,
|
|
300
|
+
Object.assign(themeScrollContainerHandle.current, {
|
|
246
301
|
applyOverscrollEffect: applyOverscrollEffect,
|
|
247
|
-
bounds: mutableRef.current.bounds,
|
|
248
302
|
calculateDistanceByWheel: calculateDistanceByWheel,
|
|
249
303
|
canScrollHorizontally: canScrollHorizontally,
|
|
250
304
|
canScrollVertically: canScrollVertically,
|
|
251
305
|
checkAndApplyOverscrollEffect: checkAndApplyOverscrollEffect,
|
|
252
306
|
getScrollBounds: getScrollBounds,
|
|
253
|
-
get isDragging() {
|
|
254
|
-
return mutableRef.current.isDragging;
|
|
255
|
-
},
|
|
256
|
-
set isDragging(val) {
|
|
257
|
-
mutableRef.current.isDragging = val;
|
|
258
|
-
},
|
|
259
|
-
get isScrollAnimationTargetAccumulated() {
|
|
260
|
-
return mutableRef.current.isScrollAnimationTargetAccumulated;
|
|
261
|
-
},
|
|
262
|
-
set isScrollAnimationTargetAccumulated(val) {
|
|
263
|
-
mutableRef.current.isScrollAnimationTargetAccumulated = val;
|
|
264
|
-
},
|
|
265
|
-
get lastInputType() {
|
|
266
|
-
return mutableRef.current.lastInputType;
|
|
267
|
-
},
|
|
268
|
-
set lastInputType(val) {
|
|
269
|
-
mutableRef.current.lastInputType = val;
|
|
270
|
-
},
|
|
271
|
-
get rtl() {
|
|
272
|
-
return rtl;
|
|
273
|
-
},
|
|
274
|
-
get scrollBounds() {
|
|
275
|
-
return getScrollBounds();
|
|
276
|
-
},
|
|
277
|
-
get scrollHeight() {
|
|
278
|
-
return mutableRef.current.bounds.scrollHeight;
|
|
279
|
-
},
|
|
280
|
-
get scrolling() {
|
|
281
|
-
return mutableRef.current.scrolling;
|
|
282
|
-
},
|
|
283
|
-
get scrollLeft() {
|
|
284
|
-
return mutableRef.current.scrollLeft;
|
|
285
|
-
},
|
|
286
307
|
scrollTo: scrollTo,
|
|
287
308
|
scrollToAccumulatedTarget: scrollToAccumulatedTarget,
|
|
288
|
-
get scrollToInfo() {
|
|
289
|
-
return mutableRef.current.scrollToInfo;
|
|
290
|
-
},
|
|
291
|
-
get scrollTop() {
|
|
292
|
-
return mutableRef.current.scrollTop;
|
|
293
|
-
},
|
|
294
309
|
setOverscrollStatus: setOverscrollStatus,
|
|
295
310
|
showScrollbarTrack: showScrollbarTrack,
|
|
296
311
|
start: start,
|
|
297
312
|
startHidingScrollbarTrack: startHidingScrollbarTrack,
|
|
298
|
-
stop: stop
|
|
299
|
-
get wheelDirection() {
|
|
300
|
-
return mutableRef.current.wheelDirection;
|
|
301
|
-
},
|
|
302
|
-
set wheelDirection(val) {
|
|
303
|
-
mutableRef.current.wheelDirection = val;
|
|
304
|
-
}
|
|
313
|
+
stop: stop
|
|
305
314
|
});
|
|
315
|
+
setScrollContainerHandle(themeScrollContainerHandle.current);
|
|
306
316
|
}
|
|
307
317
|
});
|
|
308
318
|
(0, _react.useLayoutEffect)(function () {
|