@enact/ui 4.1.2 → 4.5.0-alpha.1
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/AnnounceDecorator/Announce.js +9 -9
- package/AnnounceDecorator/AnnounceDecorator.js +6 -4
- package/AnnounceDecorator/tests/Announce-specs.js +13 -5
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +9 -7
- package/AnnounceDecorator/tests/useAnnounce-specs.js +25 -17
- package/AnnounceDecorator/useAnnounce.js +1 -1
- package/BodyText/BodyText.d.ts +1 -1
- package/BodyText/BodyText.js +6 -4
- package/BodyText/tests/BodyText-specs.js +51 -37
- package/Button/Button.d.ts +6 -6
- package/Button/Button.js +11 -7
- package/Button/tests/Button-specs.js +104 -3
- package/CHANGELOG.md +25 -0
- package/Cancelable/Cancelable.js +12 -11
- package/Cancelable/tests/Cancelable-specs.js +133 -70
- package/Changeable/Changeable.js +9 -9
- package/Changeable/tests/Changeable-specs.js +172 -110
- package/ComponentOverride/ComponentOverride.js +6 -4
- package/FloatingLayer/FloatingLayer.js +40 -49
- package/FloatingLayer/FloatingLayer.module.css +3 -0
- package/FloatingLayer/FloatingLayerContainer.js +2 -2
- package/FloatingLayer/FloatingLayerDecorator.js +6 -4
- package/FloatingLayer/Scrim.js +9 -7
- package/FloatingLayer/index.js +1 -1
- package/FloatingLayer/tests/FloatingLayer-specs.js +83 -8
- package/FloatingLayer/tests/Scrim-specs.js +20 -11
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +17 -11
- package/FloatingLayer/useFloatingLayer.js +2 -2
- package/FloatingLayer/useFloatingLayerDecorator.js +1 -1
- package/ForwardRef/ForwardRef.js +3 -3
- package/GridListImageItem/GridListImageItem.d.ts +1 -1
- package/GridListImageItem/GridListImageItem.js +6 -4
- package/Group/Group.d.ts +2 -2
- package/Group/Group.js +7 -4
- package/Group/GroupItem.js +6 -4
- package/Group/tests/Group-specs.js +73 -43
- package/Heading/Heading.d.ts +2 -1
- package/Heading/Heading.js +6 -4
- package/Heading/tests/Heading-specs.js +27 -20
- package/Icon/Icon.d.ts +4 -4
- package/Icon/Icon.js +6 -4
- package/Icon/tests/Icon-specs.js +54 -33
- package/IconButton/IconButton.d.ts +4 -4
- package/IconButton/IconButton.js +6 -4
- package/IconButton/tests/IconButton-specs.js +2 -2
- package/Image/Image.js +6 -4
- package/Image/tests/Image-specs.js +41 -31
- package/ImageItem/ImageItem.js +8 -5
- package/ImageItem/tests/ImageItem-specs.js +75 -72
- package/Item/Item.js +6 -4
- package/Item/tests/Item-specs.js +59 -35
- package/LabeledIcon/LabeledIcon.d.ts +4 -4
- package/LabeledIcon/LabeledIcon.js +6 -4
- package/LabeledIcon/tests/LabeledIcon-specs.js +30 -19
- package/Layout/Cell.js +6 -4
- package/Layout/Layout.d.ts +16 -16
- package/Layout/Layout.js +6 -4
- package/Layout/tests/Layout-specs.js +42 -30
- package/Marquee/MarqueeBase.js +7 -9
- package/Marquee/MarqueeController.js +9 -9
- package/Marquee/MarqueeDecorator.js +18 -13
- package/Marquee/index.d.ts +4 -1
- package/Marquee/index.js +2 -1
- package/Marquee/tests/Marquee-specs.js +254 -122
- package/Measurable/Measurable.js +4 -4
- package/Media/Media.js +10 -10
- package/Placeholder/PlaceholderControllerDecorator.js +9 -9
- package/Placeholder/PlaceholderDecorator.js +9 -9
- package/ProgressBar/ProgressBar.js +6 -4
- package/ProgressBar/tests/ProgressBar-specs.js +60 -42
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +9 -9
- package/RadioDecorator/RadioDecorator.js +12 -14
- package/RadioDecorator/tests/RadioDecorator-specs.js +179 -65
- package/Repeater/Repeater.d.ts +2 -1
- package/Repeater/Repeater.js +6 -4
- package/Repeater/tests/Repeater-specs.js +90 -49
- package/Resizable/Resizable.js +10 -10
- package/Routable/Link.js +9 -7
- package/Routable/Routable.d.ts +2 -2
- package/Routable/Routable.js +10 -6
- package/Routable/Route.js +1 -1
- package/Routable/Router.js +14 -11
- package/Routable/tests/Routable-specs.js +29 -20
- package/Routable/tests/Router-specs.js +65 -41
- package/Routable/useLink.js +1 -1
- package/Routable/util.js +1 -1
- package/Scrollable/ScrollAnimator.js +2 -2
- package/Scrollable/ScrollThumb.js +3 -3
- package/Scrollable/Scrollable.js +14 -10
- package/Scrollable/ScrollableNative.js +14 -10
- package/Scrollable/Scrollbar.js +14 -8
- package/Scroller/Scroller.d.ts +2 -14
- package/Scroller/Scroller.js +8 -7
- package/Scroller/ScrollerBasic.js +18 -35
- package/Scroller/UiScrollerBase.js +9 -7
- package/Skinnable/Skinnable.js +6 -4
- package/Skinnable/tests/Skinnable-specs.js +104 -56
- package/Skinnable/tests/useSkins-specs.js +39 -44
- package/Skinnable/useSkins.js +1 -1
- package/Slider/Knob.js +6 -4
- package/Slider/PositionDecorator.js +9 -9
- package/Slider/Slider.d.ts +3 -3
- package/Slider/Slider.js +6 -4
- package/Slider/tests/Slider-specs.js +4 -4
- package/SlotItem/SlotItem.d.ts +2 -2
- package/SlotItem/SlotItem.js +6 -4
- package/SlotItem/tests/SlotItem-specs.js +4 -4
- package/Slottable/Slottable.js +3 -3
- package/Slottable/tests/Slottable-specs.js +67 -36
- package/Slottable/tests/useSlots-specs.js +68 -35
- package/Slottable/useSlots.js +6 -4
- package/Spinner/Spinner.d.ts +1 -1
- package/Spinner/Spinner.js +6 -4
- package/Spinner/tests/Spinner-specs.js +46 -31
- package/ToggleIcon/ToggleIcon.js +6 -4
- package/ToggleIcon/tests/ToggleIcon-specs.js +32 -20
- package/ToggleItem/ToggleItem.d.ts +13 -11
- package/ToggleItem/ToggleItem.js +6 -4
- package/ToggleItem/tests/ToggleItem-specs.js +54 -37
- package/Toggleable/Toggle.js +10 -10
- package/Toggleable/Toggleable.js +11 -17
- package/Toggleable/tests/Toggleable-specs.js +464 -324
- package/Toggleable/useToggle.js +4 -2
- package/Touchable/ClickAllow.js +2 -2
- package/Touchable/Drag.js +22 -22
- package/Touchable/Flick.js +22 -18
- package/Touchable/Hold.js +18 -23
- package/Touchable/Touch.js +2 -2
- package/Touchable/Touchable.d.ts +3 -3
- package/Touchable/Touchable.js +7 -4
- package/Touchable/config.js +3 -3
- package/Touchable/tests/Touchable-specs.js +225 -109
- package/Touchable/tests/useTouch-specs.js +163 -86
- package/Touchable/useTouch.js +4 -4
- package/Transition/Transition.d.ts +29 -27
- package/Transition/Transition.js +22 -17
- package/Transition/tests/Transition-specs.js +116 -36
- package/ViewManager/Arranger.js +3 -3
- package/ViewManager/TransitionGroup.js +10 -9
- package/ViewManager/View.js +7 -7
- package/ViewManager/ViewManager.d.ts +4 -4
- package/ViewManager/ViewManager.js +24 -22
- package/ViewManager/tests/View-specs.js +141 -81
- package/ViewManager/tests/ViewManager-specs.js +486 -193
- package/VirtualList/UiVirtualListBase.js +26 -35
- package/VirtualList/VirtualList.d.ts +11 -29
- package/VirtualList/VirtualList.js +10 -9
- package/VirtualList/VirtualListBase.js +1 -1
- package/VirtualList/VirtualListBasic.js +44 -61
- package/VirtualList/tests/VirtualList-specs.js +81 -95
- package/internal/IdProvider/IdProvider.js +3 -3
- package/internal/IdProvider/Provider.js +2 -2
- package/internal/IdProvider/tests/useId-specs.js +37 -20
- package/internal/Pure/Pure.js +9 -9
- package/internal/localized-fonts/localized-fonts.js +1 -1
- package/internal/validators/validators.js +1 -1
- package/package.json +11 -11
- package/resolution/ResolutionDecorator.js +9 -9
- package/resolution/index.js +2 -2
- package/resolution/resolution.js +4 -2
- package/resolution/tests/ResolutionDecorator-specs.js +17 -8
- package/styles/mixins.less +14 -2
- package/useControlledState/tests/useControlledState-specs.js +68 -43
- package/useControlledState/useControlledState.js +2 -2
- package/useScroll/ScrollAnimator.js +2 -2
- package/useScroll/Scrollbar.js +7 -4
- package/useScroll/ScrollbarTrack.js +6 -4
- package/useScroll/useScroll.js +18 -29
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports["default"] = exports.UiVirtualListBaseNative = exports.UiVirtualListBase = void 0;
|
|
7
7
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
|
|
@@ -21,6 +21,8 @@ var _UiVirtualListModule = _interopRequireDefault(require("./UiVirtualList.modul
|
|
|
21
21
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
|
|
24
|
+
var _excluded = ["className", "containerProps", "itemsRenderer", "style"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -39,9 +41,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
39
41
|
|
|
40
42
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
43
|
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
44
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
45
|
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
46
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
47
|
|
|
46
48
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
47
49
|
|
|
@@ -49,15 +51,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
49
51
|
|
|
50
52
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
51
53
|
|
|
52
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
54
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
53
55
|
|
|
54
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
56
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
55
57
|
|
|
56
58
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
57
59
|
|
|
58
60
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
59
61
|
|
|
60
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
62
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
61
63
|
|
|
62
64
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
63
65
|
|
|
@@ -84,9 +86,9 @@ var gridListItemSizeShape = _propTypes["default"].shape({
|
|
|
84
86
|
|
|
85
87
|
|
|
86
88
|
var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
87
|
-
var _class
|
|
89
|
+
var _class;
|
|
88
90
|
|
|
89
|
-
return
|
|
91
|
+
return _class = /*#__PURE__*/function (_Component) {
|
|
90
92
|
_inherits(VirtualListCore, _Component);
|
|
91
93
|
|
|
92
94
|
var _super = _createSuper(VirtualListCore);
|
|
@@ -388,8 +390,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
388
390
|
value: // Calculate metrics for VirtualList after the 1st render to know client W/H.
|
|
389
391
|
function componentDidMount() {
|
|
390
392
|
if (!this.props.clientSize) {
|
|
391
|
-
this.calculateMetrics(this.props);
|
|
392
|
-
|
|
393
|
+
this.calculateMetrics(this.props);
|
|
393
394
|
this.setState(this.getStatesAndUpdateBounds(this.props));
|
|
394
395
|
} else {
|
|
395
396
|
this.emitUpdateItems();
|
|
@@ -467,8 +468,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
467
468
|
x = _this$getXY.x,
|
|
468
469
|
y = _this$getXY.y;
|
|
469
470
|
|
|
470
|
-
this.calculateMetrics(this.props);
|
|
471
|
-
|
|
471
|
+
this.calculateMetrics(this.props);
|
|
472
472
|
this.setState(this.getStatesAndUpdateBounds(this.props));
|
|
473
473
|
this.setContainerSize();
|
|
474
474
|
var _this$scrollBounds = this.scrollBounds,
|
|
@@ -484,8 +484,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
484
484
|
});
|
|
485
485
|
deferScrollTo = true;
|
|
486
486
|
} else if (this.hasDataSizeChanged) {
|
|
487
|
-
var newState = this.getStatesAndUpdateBounds(this.props, this.state.firstIndex);
|
|
488
|
-
|
|
487
|
+
var newState = this.getStatesAndUpdateBounds(this.props, this.state.firstIndex);
|
|
489
488
|
this.setState(newState);
|
|
490
489
|
this.setContainerSize();
|
|
491
490
|
deferScrollTo = true;
|
|
@@ -1113,11 +1112,10 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1113
1112
|
value: function render() {
|
|
1114
1113
|
var _this$props7 = this.props,
|
|
1115
1114
|
className = _this$props7.className,
|
|
1116
|
-
|
|
1117
|
-
voiceGroupLabel = _this$props7['data-webos-voice-group-label'],
|
|
1115
|
+
containerProps = _this$props7.containerProps,
|
|
1118
1116
|
itemsRenderer = _this$props7.itemsRenderer,
|
|
1119
1117
|
style = _this$props7.style,
|
|
1120
|
-
rest = _objectWithoutProperties(_this$props7,
|
|
1118
|
+
rest = _objectWithoutProperties(_this$props7, _excluded),
|
|
1121
1119
|
cc = this.cc,
|
|
1122
1120
|
itemContainerRef = this.itemContainerRef,
|
|
1123
1121
|
primary = this.primary,
|
|
@@ -1147,10 +1145,9 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1147
1145
|
this.positionItems();
|
|
1148
1146
|
}
|
|
1149
1147
|
|
|
1150
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1151
|
-
className: containerClasses
|
|
1152
|
-
|
|
1153
|
-
"data-webos-voice-group-label": voiceGroupLabel,
|
|
1148
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
|
|
1149
|
+
className: containerClasses
|
|
1150
|
+
}, containerProps), {}, {
|
|
1154
1151
|
ref: this.containerRef,
|
|
1155
1152
|
style: style,
|
|
1156
1153
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -1162,7 +1159,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1162
1159
|
primary: primary
|
|
1163
1160
|
})
|
|
1164
1161
|
}))
|
|
1165
|
-
});
|
|
1162
|
+
}));
|
|
1166
1163
|
}
|
|
1167
1164
|
}], [{
|
|
1168
1165
|
key: "getDerivedStateFromProps",
|
|
@@ -1264,20 +1261,12 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1264
1261
|
}),
|
|
1265
1262
|
|
|
1266
1263
|
/**
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
1269
|
-
* @type {Boolean}
|
|
1270
|
-
* @public
|
|
1271
|
-
*/
|
|
1272
|
-
'data-webos-voice-focused': _propTypes["default"].bool,
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* The voice control group label.
|
|
1264
|
+
* An object with properties to be passed to the container DOM.
|
|
1276
1265
|
*
|
|
1277
|
-
* @type {
|
|
1278
|
-
* @
|
|
1266
|
+
* @type {Object}
|
|
1267
|
+
* @private
|
|
1279
1268
|
*/
|
|
1280
|
-
|
|
1269
|
+
containerProps: _propTypes["default"].object,
|
|
1281
1270
|
|
|
1282
1271
|
/**
|
|
1283
1272
|
* The number of items of data the list contains.
|
|
@@ -1375,10 +1364,12 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1375
1364
|
cbScrollTo: nop,
|
|
1376
1365
|
dataSize: 0,
|
|
1377
1366
|
direction: 'vertical',
|
|
1367
|
+
itemsRenderer: nop,
|
|
1368
|
+
// eslint-disable-line react/default-props-match-prop-types
|
|
1378
1369
|
overhang: 3,
|
|
1379
1370
|
pageScroll: false,
|
|
1380
1371
|
spacing: 0
|
|
1381
|
-
},
|
|
1372
|
+
}, _class;
|
|
1382
1373
|
};
|
|
1383
1374
|
/**
|
|
1384
1375
|
* A basic base component for
|
|
@@ -7,7 +7,7 @@ type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The shape for the grid list item size
|
|
10
|
-
in a list for
|
|
10
|
+
in a list for [VirtualGridList] .
|
|
11
11
|
*/
|
|
12
12
|
export interface gridListItemSizeShape {
|
|
13
13
|
/**
|
|
@@ -36,7 +36,7 @@ This option is available for only `VirtualList` kind.
|
|
|
36
36
|
* * {animate} - When `true` , scroll occurs with animation. When `false` , no
|
|
37
37
|
animation occurs.
|
|
38
38
|
* * {focus} - When `true` , attempts to focus item after scroll. Only valid when scrolling
|
|
39
|
-
|
|
39
|
+
by `index` or `node` .
|
|
40
40
|
*
|
|
41
41
|
* Note: Only specify one of: `position` , `align` , `index` or `node`
|
|
42
42
|
*
|
|
@@ -156,7 +156,7 @@ export class VirtualList extends React.Component<
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* The shape for the list different item size
|
|
159
|
-
in a list for
|
|
159
|
+
in a list for [VirtualList] .
|
|
160
160
|
*/
|
|
161
161
|
export interface itemSizesShape {
|
|
162
162
|
/**
|
|
@@ -173,7 +173,8 @@ export interface VirtualListBasicProps {
|
|
|
173
173
|
* The rendering function called for each item in the list.
|
|
174
174
|
*
|
|
175
175
|
* Note : The list does not always render a component whenever its render function is called
|
|
176
|
-
|
|
176
|
+
*
|
|
177
|
+
* due to performance optimization.
|
|
177
178
|
*
|
|
178
179
|
* Example:
|
|
179
180
|
* ```
|
|
@@ -194,18 +195,6 @@ renderItem = ({index, ...rest}) => {
|
|
|
194
195
|
* Client size of the list; valid values are an object that has `clientWidth` and `clientHeight` .
|
|
195
196
|
*/
|
|
196
197
|
clientSize?: object;
|
|
197
|
-
/**
|
|
198
|
-
* Disable voice control feature of component.
|
|
199
|
-
*/
|
|
200
|
-
"data-webos-voice-disabled"?: boolean;
|
|
201
|
-
/**
|
|
202
|
-
* Activates the component for voice control.
|
|
203
|
-
*/
|
|
204
|
-
"data-webos-voice-focused"?: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* The voice control group label.
|
|
207
|
-
*/
|
|
208
|
-
"data-webos-voice-group-label"?: string;
|
|
209
198
|
/**
|
|
210
199
|
* The number of items of data the list contains.
|
|
211
200
|
*/
|
|
@@ -237,7 +226,7 @@ renderItem = ({index, ...rest}) => {
|
|
|
237
226
|
}
|
|
238
227
|
/**
|
|
239
228
|
* A basic base component for
|
|
240
|
-
|
|
229
|
+
[VirtualList] and [VirtualGridList] .
|
|
241
230
|
*/
|
|
242
231
|
|
|
243
232
|
export class VirtualListBasic extends React.Component<
|
|
@@ -249,7 +238,8 @@ export interface VirtualListBaseProps {
|
|
|
249
238
|
* The rendering function called for each item in the list.
|
|
250
239
|
*
|
|
251
240
|
* Note : The list does not always render a component whenever its render function is called
|
|
252
|
-
|
|
241
|
+
*
|
|
242
|
+
* due to performance optimization.
|
|
253
243
|
*
|
|
254
244
|
* Example:
|
|
255
245
|
* ```
|
|
@@ -279,7 +269,7 @@ This option is available for only `VirtualList` kind.
|
|
|
279
269
|
* * {animate} - When `true` , scroll occurs with animation. When `false` , no
|
|
280
270
|
animation occurs.
|
|
281
271
|
* * {focus} - When `true` , attempts to focus item after scroll. Only valid when scrolling
|
|
282
|
-
|
|
272
|
+
by `index` or `node` .
|
|
283
273
|
*
|
|
284
274
|
* Note: Only specify one of: `position` , `align` , `index` or `node`
|
|
285
275
|
*
|
|
@@ -300,14 +290,6 @@ this.scrollTo({align: 'top'}); // scroll to the top
|
|
|
300
290
|
* Client size of the list; valid values are an object that has `clientWidth` and `clientHeight` .
|
|
301
291
|
*/
|
|
302
292
|
clientSize?: object;
|
|
303
|
-
/**
|
|
304
|
-
* Activates the component for voice control.
|
|
305
|
-
*/
|
|
306
|
-
"data-webos-voice-focused"?: boolean;
|
|
307
|
-
/**
|
|
308
|
-
* The voice control group label.
|
|
309
|
-
*/
|
|
310
|
-
"data-webos-voice-group-label"?: string;
|
|
311
293
|
/**
|
|
312
294
|
* The number of items of data the list contains.
|
|
313
295
|
*/
|
|
@@ -403,7 +385,7 @@ render = () => (
|
|
|
403
385
|
}
|
|
404
386
|
/**
|
|
405
387
|
* A basic base component for
|
|
406
|
-
|
|
388
|
+
[VirtualList] and [VirtualGridList] .
|
|
407
389
|
*/
|
|
408
390
|
|
|
409
391
|
export class VirtualListBase extends React.Component<
|
|
@@ -427,7 +409,7 @@ This option is available for only `VirtualList` kind.
|
|
|
427
409
|
* * {animate} - When `true` , scroll occurs with animation. When `false` , no
|
|
428
410
|
animation occurs.
|
|
429
411
|
* * {focus} - When `true` , attempts to focus item after scroll. Only valid when scrolling
|
|
430
|
-
|
|
412
|
+
by `index` or `node` .
|
|
431
413
|
*
|
|
432
414
|
* Note: Only specify one of: `position` , `align` , `index` or `node`
|
|
433
415
|
*
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.VirtualList = exports.VirtualGridList = void 0;
|
|
6
7
|
Object.defineProperty(exports, "VirtualListBase", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function get() {
|
|
@@ -15,25 +16,25 @@ Object.defineProperty(exports, "VirtualListBaseNative", {
|
|
|
15
16
|
return _UiVirtualListBase.UiVirtualListBaseNative;
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "VirtualListBasic", {
|
|
19
20
|
enumerable: true,
|
|
20
21
|
get: function get() {
|
|
21
|
-
return _VirtualListBasic.
|
|
22
|
+
return _VirtualListBasic.VirtualListBasic;
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
+
exports["default"] = void 0;
|
|
26
|
+
Object.defineProperty(exports, "gridListItemSizeShape", {
|
|
25
27
|
enumerable: true,
|
|
26
28
|
get: function get() {
|
|
27
|
-
return _VirtualListBasic.
|
|
29
|
+
return _VirtualListBasic.gridListItemSizeShape;
|
|
28
30
|
}
|
|
29
31
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "itemSizesShape", {
|
|
31
33
|
enumerable: true,
|
|
32
34
|
get: function get() {
|
|
33
|
-
return _VirtualListBasic.
|
|
35
|
+
return _VirtualListBasic.itemSizesShape;
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
|
-
exports.VirtualList = exports.VirtualGridList = exports["default"] = void 0;
|
|
37
38
|
|
|
38
39
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
39
40
|
|
|
@@ -51,9 +52,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
51
52
|
|
|
52
53
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
54
|
|
|
54
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
55
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
55
56
|
|
|
56
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
57
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
57
58
|
|
|
58
59
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
59
60
|
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "VirtualListBaseNative", {
|
|
|
15
15
|
return _UiVirtualListBase.UiVirtualListBaseNative;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
exports["default"] = void 0;
|
|
18
19
|
Object.defineProperty(exports, "gridListItemSizeShape", {
|
|
19
20
|
enumerable: true,
|
|
20
21
|
get: function get() {
|
|
@@ -27,7 +28,6 @@ Object.defineProperty(exports, "itemSizesShape", {
|
|
|
27
28
|
return _VirtualListBasic.itemSizesShape;
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
|
-
exports["default"] = void 0;
|
|
31
31
|
|
|
32
32
|
var _UiVirtualListBase = require("./UiVirtualListBase");
|
|
33
33
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.itemSizesShape = exports.gridListItemSizeShape = exports["default"] = exports.VirtualListBasic = void 0;
|
|
7
7
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
|
|
@@ -25,6 +25,8 @@ var _VirtualListModule = _interopRequireDefault(require("./VirtualList.module.cs
|
|
|
25
25
|
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
|
|
28
|
+
var _excluded = ["className", "containerProps", "placeholderRenderer", "role", "style", "scrollMode"];
|
|
29
|
+
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
31
|
|
|
30
32
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -43,9 +45,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
43
45
|
|
|
44
46
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
45
47
|
|
|
46
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
48
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
49
|
|
|
48
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
49
51
|
|
|
50
52
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
53
|
|
|
@@ -53,15 +55,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
53
55
|
|
|
54
56
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
55
57
|
|
|
56
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
58
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
57
59
|
|
|
58
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
60
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
59
61
|
|
|
60
62
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
63
|
|
|
62
64
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
65
|
|
|
64
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
66
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
65
67
|
|
|
66
68
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
67
69
|
|
|
@@ -159,17 +161,16 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
159
161
|
_this.itemPositions = [];
|
|
160
162
|
_this.indexToScrollIntoView = -1;
|
|
161
163
|
|
|
162
|
-
_this.updateScrollPosition = function (_ref) {
|
|
164
|
+
_this.updateScrollPosition = function (_ref, behavior) {
|
|
163
165
|
var x = _ref.x,
|
|
164
166
|
y = _ref.y;
|
|
165
|
-
var rtl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.props.rtl;
|
|
166
167
|
|
|
167
168
|
if (_this.props.scrollMode === 'native') {
|
|
168
|
-
_this.scrollToPosition(x, y,
|
|
169
|
+
_this.scrollToPosition(x, y, behavior);
|
|
169
170
|
} else {
|
|
170
171
|
_this.setScrollPositionTarget(x, y);
|
|
171
172
|
|
|
172
|
-
_this.setScrollPosition(x, y
|
|
173
|
+
_this.setScrollPosition(x, y);
|
|
173
174
|
}
|
|
174
175
|
};
|
|
175
176
|
|
|
@@ -319,6 +320,14 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
319
320
|
}
|
|
320
321
|
};
|
|
321
322
|
|
|
323
|
+
_this.getRtlPositionX = function (x) {
|
|
324
|
+
if (_this.props.rtl) {
|
|
325
|
+
return _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : _this.scrollBounds.maxLeft - x;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
return x;
|
|
329
|
+
};
|
|
330
|
+
|
|
322
331
|
_this.applyStyleToNewNode = function (index) {
|
|
323
332
|
var _this2;
|
|
324
333
|
|
|
@@ -445,8 +454,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
445
454
|
value: // Calculate metrics for VirtualList after the 1st render to know client W/H.
|
|
446
455
|
function componentDidMount() {
|
|
447
456
|
if (!this.props.clientSize) {
|
|
448
|
-
this.calculateMetrics(this.props);
|
|
449
|
-
|
|
457
|
+
this.calculateMetrics(this.props);
|
|
450
458
|
this.setState(this.getStatesAndUpdateBounds(this.props));
|
|
451
459
|
} else {
|
|
452
460
|
this.emitUpdateItems();
|
|
@@ -524,8 +532,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
524
532
|
x = _this$getXY.x,
|
|
525
533
|
y = _this$getXY.y;
|
|
526
534
|
|
|
527
|
-
this.calculateMetrics(this.props);
|
|
528
|
-
|
|
535
|
+
this.calculateMetrics(this.props);
|
|
529
536
|
this.setState(this.getStatesAndUpdateBounds(this.props));
|
|
530
537
|
this.setContainerSize();
|
|
531
538
|
var _this$scrollBounds = this.scrollBounds,
|
|
@@ -538,16 +545,15 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
538
545
|
this.updateScrollPosition({
|
|
539
546
|
x: xMax > x ? x : xMax,
|
|
540
547
|
y: yMax > y ? y : yMax
|
|
541
|
-
});
|
|
548
|
+
}, 'instant');
|
|
542
549
|
deferScrollTo = true;
|
|
543
550
|
} else if (this.hasDataSizeChanged) {
|
|
544
|
-
var newState = this.getStatesAndUpdateBounds(this.props, this.state.firstIndex);
|
|
545
|
-
|
|
551
|
+
var newState = this.getStatesAndUpdateBounds(this.props, this.state.firstIndex);
|
|
546
552
|
this.setState(newState);
|
|
547
553
|
this.setContainerSize();
|
|
548
554
|
deferScrollTo = true;
|
|
549
555
|
} else if (prevProps.rtl !== this.props.rtl) {
|
|
550
|
-
this.updateScrollPosition(this.getXY(this.scrollPosition, 0));
|
|
556
|
+
this.updateScrollPosition(this.getXY(this.scrollPosition, 0), 'instant');
|
|
551
557
|
}
|
|
552
558
|
|
|
553
559
|
var maxPos = this.isPrimaryDirectionVertical ? this.scrollBounds.maxTop : this.scrollBounds.maxLeft;
|
|
@@ -692,9 +698,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
692
698
|
if (scrollMode === 'translate' && this.contentRef.current) {
|
|
693
699
|
this.contentRef.current.style.transform = null;
|
|
694
700
|
} else if (scrollMode === 'native' && node) {
|
|
695
|
-
|
|
696
|
-
this.updateScrollPosition(this.getXY(this.scrollPosition, 0));
|
|
697
|
-
node.style.scrollBehavior = 'smooth';
|
|
701
|
+
this.updateScrollPosition(this.getXY(this.scrollPosition, 0), 'instant');
|
|
698
702
|
}
|
|
699
703
|
}
|
|
700
704
|
}, {
|
|
@@ -835,15 +839,14 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
835
839
|
|
|
836
840
|
}, {
|
|
837
841
|
key: "scrollToPosition",
|
|
838
|
-
value:
|
|
839
|
-
|
|
840
|
-
|
|
842
|
+
value: // scrollMode 'native' only
|
|
843
|
+
function scrollToPosition(left, top, behavior) {
|
|
841
844
|
if (this.props.scrollContentRef.current && this.props.scrollContentRef.current.scrollTo) {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
845
|
+
this.props.scrollContentRef.current.scrollTo({
|
|
846
|
+
left: this.getRtlPositionX(left),
|
|
847
|
+
top: top,
|
|
848
|
+
behavior: behavior
|
|
849
|
+
});
|
|
847
850
|
}
|
|
848
851
|
} // scrollMode 'native' only
|
|
849
852
|
|
|
@@ -860,7 +863,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
860
863
|
}, {
|
|
861
864
|
key: "setScrollPositionTarget",
|
|
862
865
|
value: function setScrollPositionTarget(x, y) {
|
|
863
|
-
// The `
|
|
866
|
+
// The `left`, `top` as parameters in scrollToPosition() are the position when stopping scrolling.
|
|
864
867
|
// But the `x`, `y` as parameters in setScrollPosition() are the position between current position and the position stopping scrolling.
|
|
865
868
|
// To know the position when stopping scrolling properly, `x` and `y` are passed and cached in `this.scrollPositionTarget`.
|
|
866
869
|
if (this.isPrimaryDirectionVertical) {
|
|
@@ -873,7 +876,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
873
876
|
}, {
|
|
874
877
|
key: "setScrollPosition",
|
|
875
878
|
value: function setScrollPosition(x, y) {
|
|
876
|
-
var rtl =
|
|
879
|
+
var rtl = this.props.rtl;
|
|
877
880
|
|
|
878
881
|
if (this.contentRef.current) {
|
|
879
882
|
this.contentRef.current.style.transform = "translate3d(".concat(rtl ? x : -x, "px, -").concat(y, "px, 0)");
|
|
@@ -1170,14 +1173,12 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
1170
1173
|
function render() {
|
|
1171
1174
|
var _this$props7 = this.props,
|
|
1172
1175
|
className = _this$props7.className,
|
|
1173
|
-
|
|
1174
|
-
voiceGroupLabel = _this$props7['data-webos-voice-group-label'],
|
|
1175
|
-
voiceDisabled = _this$props7['data-webos-voice-disabled'],
|
|
1176
|
+
containerProps = _this$props7.containerProps,
|
|
1176
1177
|
placeholderRenderer = _this$props7.placeholderRenderer,
|
|
1177
1178
|
role = _this$props7.role,
|
|
1178
1179
|
style = _this$props7.style,
|
|
1179
1180
|
scrollMode = _this$props7.scrollMode,
|
|
1180
|
-
rest = _objectWithoutProperties(_this$props7,
|
|
1181
|
+
rest = _objectWithoutProperties(_this$props7, _excluded),
|
|
1181
1182
|
cc = this.cc,
|
|
1182
1183
|
isPrimaryDirectionVertical = this.isPrimaryDirectionVertical,
|
|
1183
1184
|
primary = this.primary,
|
|
@@ -1214,11 +1215,9 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
1214
1215
|
this.positionItems();
|
|
1215
1216
|
}
|
|
1216
1217
|
|
|
1217
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1218
|
-
className: containerClasses
|
|
1219
|
-
|
|
1220
|
-
"data-webos-voice-group-label": voiceGroupLabel,
|
|
1221
|
-
"data-webos-voice-disabled": voiceDisabled,
|
|
1218
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
|
|
1219
|
+
className: containerClasses
|
|
1220
|
+
}, containerProps), {}, {
|
|
1222
1221
|
ref: this.props.scrollContentRef,
|
|
1223
1222
|
style: style,
|
|
1224
1223
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -1227,7 +1226,7 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
1227
1226
|
role: role,
|
|
1228
1227
|
children: [].concat(_toConsumableArray(cc), [placeholderRenderer && placeholderRenderer(primary)])
|
|
1229
1228
|
}))
|
|
1230
|
-
});
|
|
1229
|
+
}));
|
|
1231
1230
|
}
|
|
1232
1231
|
}], [{
|
|
1233
1232
|
key: "getDerivedStateFromProps",
|
|
@@ -1321,28 +1320,12 @@ VirtualListBasic.propTypes =
|
|
|
1321
1320
|
}),
|
|
1322
1321
|
|
|
1323
1322
|
/**
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* @type {Boolean}
|
|
1327
|
-
* @public
|
|
1328
|
-
*/
|
|
1329
|
-
'data-webos-voice-disabled': _propTypes2["default"].bool,
|
|
1330
|
-
|
|
1331
|
-
/**
|
|
1332
|
-
* Activates the component for voice control.
|
|
1323
|
+
* An object with properties to be passed to the container DOM.
|
|
1333
1324
|
*
|
|
1334
|
-
* @type {
|
|
1335
|
-
* @
|
|
1336
|
-
*/
|
|
1337
|
-
'data-webos-voice-focused': _propTypes2["default"].bool,
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* The voice control group label.
|
|
1341
|
-
*
|
|
1342
|
-
* @type {String}
|
|
1343
|
-
* @public
|
|
1325
|
+
* @type {Object}
|
|
1326
|
+
* @private
|
|
1344
1327
|
*/
|
|
1345
|
-
|
|
1328
|
+
containerProps: _propTypes2["default"].object,
|
|
1346
1329
|
|
|
1347
1330
|
/**
|
|
1348
1331
|
* The number of items of data the list contains.
|