@enact/ui 4.7.10 → 4.9.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.
Files changed (42) hide show
  1. package/AnnounceDecorator/Announce.js +1 -1
  2. package/CHANGELOG.md +7 -1
  3. package/Cancelable/Cancelable.js +1 -1
  4. package/Changeable/Changeable.js +1 -1
  5. package/FloatingLayer/FloatingLayer.js +1 -1
  6. package/FloatingLayer/Scrim.js +1 -1
  7. package/ForwardRef/ForwardRef.js +1 -1
  8. package/Group/Group.js +1 -1
  9. package/Layout/Cell.js +14 -2
  10. package/Layout/Layout.d.ts +8 -1
  11. package/Marquee/MarqueeController.js +1 -1
  12. package/Marquee/MarqueeDecorator.js +1 -1
  13. package/Media/Media.js +2 -2
  14. package/Placeholder/PlaceholderControllerDecorator.js +1 -1
  15. package/Placeholder/PlaceholderDecorator.js +1 -1
  16. package/RadioDecorator/RadioControllerDecorator.js +1 -1
  17. package/RadioDecorator/RadioDecorator.js +1 -1
  18. package/Repeater/Repeater.js +1 -1
  19. package/Routable/Link.js +1 -1
  20. package/Routable/Router.js +1 -1
  21. package/Scrollable/Scrollable.js +1 -1
  22. package/Scrollable/ScrollableNative.js +2 -2
  23. package/Scrollable/Scrollbar.js +1 -1
  24. package/Scroller/ScrollerBasic.js +2 -2
  25. package/Scroller/UiScrollerBase.js +2 -2
  26. package/Slider/PositionDecorator.js +1 -1
  27. package/Touchable/ClickAllow.js +1 -1
  28. package/Touchable/Touch.js +3 -3
  29. package/Transition/Transition.js +1 -1
  30. package/ViewManager/TransitionGroup.js +1 -1
  31. package/ViewManager/View.js +1 -1
  32. package/ViewManager/ViewManager.js +1 -1
  33. package/ViewManager/tests/ViewManager-specs.js +1 -1
  34. package/VirtualList/UiVirtualListBase.js +2 -2
  35. package/VirtualList/VirtualListBasic.js +12 -2
  36. package/VirtualList/tests/VirtualList-specs.js +66 -0
  37. package/internal/Pure/Pure.js +1 -1
  38. package/internal/Pure/tests/Pure-specs.js +1 -1
  39. package/package.json +4 -3
  40. package/resolution/ResolutionDecorator.js +1 -1
  41. package/useScroll/ScrollbarTrack.js +5 -4
  42. package/useScroll/useScroll.js +2 -2
@@ -57,7 +57,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
57
57
  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); }; }
58
58
  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); }
59
59
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
60
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
60
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
61
61
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
62
62
  var Announce = exports.Announce = (_class = /*#__PURE__*/function (_Component) {
63
63
  _inherits(Announce, _Component);
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
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.7.10] - 2024-03-05
5
+ ## [4.9.0-alpha.1] - 2024-04-09
6
+
7
+ ### Added
8
+
9
+ - `ui/Layout.Cell` prop `componentCss` to support customizing the component used in `Cell`
10
+
11
+ ## [4.8.0] - 2024-02-08
6
12
 
7
13
  No significant changes.
8
14
 
@@ -40,7 +40,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
40
40
  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); }; }
41
41
  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); }
42
42
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
44
44
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
45
45
  * Provides components and methods to add support for handling cancel actions.
46
46
  *
@@ -25,7 +25,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
25
25
  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); }; }
26
26
  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); }
27
27
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
28
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
29
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /* eslint-disable react/sort-prop-types */ /**
30
30
  * A higher-order component that adds state management for a single prop via a single event handler.
31
31
  *
@@ -33,7 +33,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
33
33
  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); }; }
34
34
  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); }
35
35
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
36
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
37
37
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
38
38
  * A component that creates an entry point to the new render tree.
39
39
  *
@@ -25,7 +25,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
25
25
  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); }; }
26
26
  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); }
27
27
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
28
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
29
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
30
  var transparentClassName = _ScrimModule["default"].scrim + ' enact-fit ' + _ScrimModule["default"].transparent;
31
31
  var translucentClassName = _ScrimModule["default"].scrim + ' enact-fit ' + _ScrimModule["default"].translucent;
@@ -35,7 +35,7 @@ var defaultConfig = {
35
35
  };
36
36
 
37
37
  /**
38
- * A higher-order component that adapts [`React.forwardRef`](https://reactjs.org/docs/forwarding-refs.html)
38
+ * A higher-order component that adapts [`React.forwardRef`](https://react.dev/reference/react/forwardRef)
39
39
  * to be chainable with other HOCs.
40
40
  *
41
41
  * The following examples are equivalent:
package/Group/Group.js CHANGED
@@ -68,7 +68,7 @@ var GroupBase = exports.GroupBase = (0, _kind["default"])({
68
68
  * like `disabled`, `className`, and setting the content using `children`.
69
69
  *
70
70
  * NOTE: When providing an array of objects be sure a unique `key` is assigned to each
71
- * item. [Read about keys](https://reactjs.org/docs/lists-and-keys.html#keys) for more
71
+ * item. [Read about keys](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key) for more
72
72
  * information.
73
73
  *
74
74
  * @type {String[]|Array.<{key: (Number|String)}>}
package/Layout/Cell.js CHANGED
@@ -11,7 +11,7 @@ var _ForwardRef = _interopRequireDefault(require("../ForwardRef"));
11
11
  var _resolution = _interopRequireDefault(require("../resolution"));
12
12
  var _LayoutModule = _interopRequireDefault(require("./Layout.module.css"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
- var _excluded = ["component", "componentRef"];
14
+ var _excluded = ["component", "componentCss", "componentRef"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
16
  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; }
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -66,10 +66,20 @@ var CellBase = exports.CellBase = (0, _kind["default"])({
66
66
  * @public
67
67
  */
68
68
  component: _propTypes["default"].renderable,
69
+ /**
70
+ * Customizes `Cell` together with `component` prop.
71
+ *
72
+ * When using {@link ui/Layout.Cell}, the `componentCss` prop is passed to the rendered component
73
+ * as `css`.
74
+ *
75
+ * @type {Object}
76
+ * @public
77
+ */
78
+ componentCss: _propTypes2["default"].object,
69
79
  /**
70
80
  * Called with a reference to the root component.
71
81
  *
72
- * When using {@link ui/Layout.Cell}, the `ref` prop is forwarded to this component
82
+ * When using {@link ui/Layout.Cell}, the `ref` prop is forwarded to the rendered component
73
83
  * as `componentRef`.
74
84
  *
75
85
  * @type {Object|Function}
@@ -175,6 +185,7 @@ var CellBase = exports.CellBase = (0, _kind["default"])({
175
185
  },
176
186
  render: function render(_ref3) {
177
187
  var Component = _ref3.component,
188
+ componentCss = _ref3.componentCss,
178
189
  componentRef = _ref3.componentRef,
179
190
  rest = _objectWithoutProperties(_ref3, _excluded);
180
191
  delete rest.align;
@@ -182,6 +193,7 @@ var CellBase = exports.CellBase = (0, _kind["default"])({
182
193
  delete rest.shrink;
183
194
  delete rest.size;
184
195
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread({
196
+ css: componentCss,
185
197
  ref: componentRef
186
198
  }, rest));
187
199
  }
@@ -28,9 +28,16 @@ horizontally in the case of a vertical layout. `"start"` , `"center"` and
28
28
  */
29
29
  component?: string | React.ComponentType;
30
30
  /**
31
+ * Customizes `Cell` together with `component` prop.
32
+ *
33
+ * When using , the `componentCss` prop is passed to the rendered component
34
+ as `css` .
35
+ */
36
+ componentCss?: object;
37
+ /**
31
38
  * Called with a reference to the root component.
32
39
  *
33
- * When using , the `ref` prop is forwarded to this component
40
+ * When using , the `ref` prop is forwarded to the rendered component
34
41
  as `componentRef` .
35
42
  */
36
43
  componentRef?: object | Function;
@@ -23,7 +23,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
23
23
  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); }; }
24
24
  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); }
25
25
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
26
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
27
27
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
28
  var STATE = {
29
29
  inactive: 0,
@@ -38,7 +38,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
38
38
  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); }; }
39
39
  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); }
40
40
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
41
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
42
42
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /* global ResizeObserver */ // The minimum number of milliseconds to wait before resetting the marquee position after it finishes.
43
43
  var MINIMUM_MARQUEE_RESET_DELAY = 40;
44
44
 
package/Media/Media.js CHANGED
@@ -27,7 +27,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
27
27
  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); }; }
28
28
  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); }
29
29
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
30
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
31
31
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
32
32
  * A representation of `HTMLMediaElement` component with an ability to attach a custom event
33
33
  * handler.
@@ -73,7 +73,7 @@ var getKeyFromSource = exports.getKeyFromSource = function getKeyFromSource() {
73
73
  /**
74
74
  * Maps standard media event `type` values to React-style callback prop names
75
75
  *
76
- * See https://reactjs.org/docs/events.html#media-events
76
+ * See https://react.dev/reference/react-dom/components/common#common-props
77
77
  *
78
78
  * ```
79
79
  * {
@@ -25,7 +25,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
25
25
  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); }; }
26
26
  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); }
27
27
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
28
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
29
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
30
30
  * Default config for `PlaceholderControllerDecorator`.
31
31
  *
@@ -22,7 +22,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
22
22
  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); }; }
23
23
  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); }
24
24
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
25
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
26
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
27
27
  * Default config for PlaceholderDecorator.
28
28
  *
@@ -23,7 +23,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
23
23
  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); }; }
24
24
  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); }
25
25
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
26
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
27
27
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
28
  var RadioContext = exports.RadioContext = /*#__PURE__*/(0, _react.createContext)();
29
29
 
@@ -30,7 +30,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
30
30
  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); }; }
31
31
  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); }
32
32
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
33
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
34
34
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
35
35
  * A higher-order component that manages activation of components.
36
36
  *
@@ -54,7 +54,7 @@ var RepeaterBase = exports.RepeaterBase = (0, _kind["default"])({
54
54
  * text content using the `children` key.
55
55
  *
56
56
  * > **NOTE**: When an array of objects is provided, make sure a unique `key` is assigned to each
57
- * data. See https://fb.me/react-warning-keys for more information.
57
+ * data. See https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key for more information.
58
58
  *
59
59
  * @type {String[]|Array.<{key: (Number|String)}>}
60
60
  * @required
package/Routable/Link.js CHANGED
@@ -30,7 +30,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
30
30
  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); }; }
31
31
  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); }
32
32
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
33
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
34
34
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
35
35
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
36
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -39,7 +39,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
39
39
  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); }; }
40
40
  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); }
41
41
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
42
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
43
43
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
44
44
  var RouterBase = exports.RouterBase = (_class = /*#__PURE__*/function (_ReactComponent) {
45
45
  _inherits(RouterBase, _ReactComponent);
@@ -40,7 +40,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
40
40
  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); }; }
41
41
  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); }
42
42
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
44
44
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
45
45
  * Unstyled scrollable components and behaviors to be customized by a theme or application.
46
46
  *
@@ -40,7 +40,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
40
40
  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); }; }
41
41
  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); }
42
42
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
44
44
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
45
  var constants = exports.constants = {
46
46
  epsilon: 1,
@@ -327,7 +327,7 @@ var ScrollableBaseNative = exports.ScrollableBaseNative = /*#__PURE__*/function
327
327
  _this.scrollStartOnScroll();
328
328
  }
329
329
  if (_this.props.rtl && canScrollHorizontally) {
330
- scrollLeft = _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -scrollLeft : bounds.maxLeft - scrollLeft;
330
+ scrollLeft = _platform.platform.chrome < 85 ? bounds.maxLeft - scrollLeft : -scrollLeft;
331
331
  }
332
332
  if (scrollLeft !== _this.scrollLeft) {
333
333
  _this.setScrollLeft(scrollLeft);
@@ -36,7 +36,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
36
36
  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); }; }
37
37
  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); }
38
38
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
40
40
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
41
  var minThumbSize = 18,
42
42
  // Size in pixels
@@ -28,7 +28,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
28
28
  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); }; }
29
29
  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); }
30
30
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
32
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
33
33
  * An unstyled base scroller component.
34
34
  *
@@ -64,7 +64,7 @@ var ScrollerBasic = exports.ScrollerBasic = /*#__PURE__*/function (_Component) {
64
64
  };
65
65
  _this.getRtlPositionX = function (x) {
66
66
  if (_this.props.rtl) {
67
- return _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : _this.scrollBounds.maxLeft - x;
67
+ return _platform.platform.chrome < 85 ? _this.scrollBounds.maxLeft - x : -x; // Chrome lower than 85 has a bug with RTL scrollLeft
68
68
  }
69
69
  return x;
70
70
  };
@@ -28,7 +28,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
28
28
  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); }; }
29
29
  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); }
30
30
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
32
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
33
33
  * An unstyled base scroller component.
34
34
  *
@@ -64,7 +64,7 @@ var ScrollerBase = exports.ScrollerBase = /*#__PURE__*/function (_Component) {
64
64
  };
65
65
  _this.getRtlPositionX = function (x) {
66
66
  if (_this.props.rtl) {
67
- return _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : _this.scrollBounds.maxLeft - x;
67
+ return _platform.platform.chrome < 85 ? _this.scrollBounds.maxLeft - x : -x;
68
68
  }
69
69
  return x;
70
70
  };
@@ -26,7 +26,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
26
26
  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); }; }
27
27
  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); }
28
28
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
29
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
30
30
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
31
31
  var validateRange = (0, _validators.validateRangeOnce)(function (props) {
32
32
  return props;
@@ -51,7 +51,7 @@ var ClickAllow = exports.ClickAllow = /*#__PURE__*/function () {
51
51
  var timeStamp = ev.timeStamp;
52
52
 
53
53
  // iOS Safari sends both touch and mouse events (with differing timestamps)
54
- return !_platform.platform.ios && this.lastTouchEndTime !== timeStamp && shouldAllowMouseDown(ev);
54
+ return !(_platform.platform.browserName === 'safari' && _platform.platform.type === 'mobile') && this.lastTouchEndTime !== timeStamp && shouldAllowMouseDown(ev);
55
55
  }
56
56
  }, {
57
57
  key: "shouldAllowTap",
@@ -130,7 +130,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
130
130
  onMouseLeave: handleMouseLeave.bindAs(this, 'handleMouseLeave'),
131
131
  onMouseUp: handleMouseUp.bindAs(this, 'handleMouseUp')
132
132
  };
133
- if (_platform["default"].touch) {
133
+ if (_platform["default"].touchEvent) {
134
134
  Object.assign(this.handlers, {
135
135
  onTouchStart: handleTouchStart.bindAs(this, 'handleTouchStart'),
136
136
  onTouchMove: handleTouchMove.bindAs(this, 'handleTouchMove'),
@@ -162,7 +162,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
162
162
  key: "addGlobalHandlers",
163
163
  value: function addGlobalHandlers() {
164
164
  // ensure we clean up our internal state
165
- if (_platform["default"].touch) {
165
+ if (_platform["default"].touchEvent) {
166
166
  (0, _dispatcher.on)('touchend', this.handleGlobalUp, document);
167
167
  }
168
168
  (0, _dispatcher.on)('mouseup', this.handleGlobalUp, document);
@@ -171,7 +171,7 @@ var Touch = exports.Touch = /*#__PURE__*/function () {
171
171
  }, {
172
172
  key: "removeGlobalHandlers",
173
173
  value: function removeGlobalHandlers() {
174
- if (_platform["default"].touch) {
174
+ if (_platform["default"].touchEvent) {
175
175
  (0, _dispatcher.off)('touchend', this.handleGlobalUp, document);
176
176
  }
177
177
  (0, _dispatcher.off)('mouseup', this.handleGlobalUp, document);
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  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); }; }
25
25
  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); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
29
  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; }
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -27,7 +27,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
27
27
  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); }; }
28
28
  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); }
29
29
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
30
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
31
31
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
32
32
  * Exports the {@link ui/ViewManager.TransitionGroup} component.
33
33
  */ // Using string refs from the source code of ReactTransitionGroup
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  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); }; }
25
25
  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); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
29
29
  * Exports the {@link ui/ViewManager.View} component.
30
30
  */ // If the View was "appearing", then entering will always be false and this will not result in a
@@ -72,7 +72,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
72
72
  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); }; }
73
73
  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); }
74
74
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
75
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
75
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
76
76
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
77
77
  var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
78
78
  _inherits(ViewManagerBase, _Component);
@@ -20,7 +20,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
20
20
  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); }; }
21
21
  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); }
22
22
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  describe('ViewManager', function () {
26
26
  // Suite-wide setup
@@ -36,7 +36,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
36
36
  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); }; }
37
37
  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); }
38
38
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
40
40
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
41
  var nop = function nop() {},
42
42
  JS = 'JS',
@@ -668,7 +668,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
668
668
  this.scrollPositionTarget = x;
669
669
  }
670
670
  if (rtl) {
671
- x = _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : this.scrollBounds.maxLeft - x;
671
+ x = _platform.platform.chrome < 85 ? this.scrollBounds.maxLeft - x : -x;
672
672
  }
673
673
  this.containerRef.current.scrollTo(x, y);
674
674
  }
@@ -37,7 +37,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
37
37
  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); }; }
38
38
  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); }
39
39
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
40
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
41
41
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
42
42
  var nop = function nop() {};
43
43
 
@@ -159,6 +159,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
159
159
  _this.getItemPosition = function (index) {
160
160
  var stickTo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'start';
161
161
  var optionalOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
162
+ var disallowNegativeOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
162
163
  var _assertThisInitialize = _assertThisInitialized(_this),
163
164
  isPrimaryDirectionVertical = _assertThisInitialize.isPrimaryDirectionVertical,
164
165
  primary = _assertThisInitialize.primary,
@@ -167,14 +168,23 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
167
168
  var position = _this.getGridPosition(index);
168
169
  var offset = 0;
169
170
  if (stickTo === 'start') {
171
+ // 'start'
170
172
  offset = optionalOffset;
171
173
  } else if (_this.props.itemSizes) {
174
+ // 'end' for different item sizes
172
175
  offset = primary.clientSize - _this.props.itemSizes[index] - optionalOffset;
173
176
  } else if (stickTo === 'center') {
177
+ // 'center'
174
178
  offset = primary.clientSize / 2 - primary.gridSize / 2 - optionalOffset;
175
179
  } else {
180
+ // 'end' for same item sizes
176
181
  offset = primary.clientSize - primary.itemSize - optionalOffset;
177
182
  }
183
+
184
+ /* istanbul ignore next */
185
+ if (disallowNegativeOffset) {
186
+ offset = Math.max(0, offset);
187
+ }
178
188
  position.primaryPosition = (0, _util.clamp)(0, maxPos, position.primaryPosition - offset);
179
189
  return _this.gridPositionToItemPosition(position);
180
190
  };
@@ -254,7 +264,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
254
264
  // scrollMode 'native' only
255
265
  _this.getRtlPositionX = function (x) {
256
266
  if (_this.props.rtl) {
257
- return _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -x : _this.scrollBounds.maxLeft - x;
267
+ return _platform.platform.chrome < 85 ? _this.scrollBounds.maxLeft - x : -x;
258
268
  }
259
269
  return x;
260
270
  };
@@ -217,6 +217,72 @@ describe('VirtualList', function () {
217
217
  });
218
218
  });
219
219
  });
220
+ test('should scroll to make the specific item of a given index stick to \'start\' position with scrollTo', function (done) {
221
+ var onScrollStop = handlerOnScrollStop(done, function () {
222
+ var expected = 900;
223
+ var actual = resultScrollTop;
224
+ expect(actual).toBe(expected);
225
+ });
226
+ (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_VirtualList["default"], {
227
+ cbScrollTo: getScrollTo,
228
+ clientSize: clientSize,
229
+ dataSize: dataSize,
230
+ itemRenderer: renderItem,
231
+ itemSize: itemSize,
232
+ onScrollStop: onScrollStop
233
+ }));
234
+ (0, _react.act)(function () {
235
+ return myScrollTo({
236
+ index: 30,
237
+ animate: false,
238
+ stickTo: 'start'
239
+ });
240
+ });
241
+ });
242
+ test('should scroll to make the specific item of a given index stick to \'center\' position with scrollTo', function (done) {
243
+ var onScrollStop = handlerOnScrollStop(done, function () {
244
+ var expected = 555;
245
+ var actual = resultScrollTop;
246
+ expect(actual).toBe(expected);
247
+ });
248
+ (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_VirtualList["default"], {
249
+ cbScrollTo: getScrollTo,
250
+ clientSize: clientSize,
251
+ dataSize: dataSize,
252
+ itemRenderer: renderItem,
253
+ itemSize: itemSize,
254
+ onScrollStop: onScrollStop
255
+ }));
256
+ (0, _react.act)(function () {
257
+ return myScrollTo({
258
+ index: 30,
259
+ animate: false,
260
+ stickTo: 'center'
261
+ });
262
+ });
263
+ });
264
+ test('should scroll to make the specific item of a given index stick to \'end\' position with scrollTo', function (done) {
265
+ var onScrollStop = handlerOnScrollStop(done, function () {
266
+ var expected = 210;
267
+ var actual = resultScrollTop;
268
+ expect(actual).toBe(expected);
269
+ });
270
+ (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_VirtualList["default"], {
271
+ cbScrollTo: getScrollTo,
272
+ clientSize: clientSize,
273
+ dataSize: dataSize,
274
+ itemRenderer: renderItem,
275
+ itemSize: itemSize,
276
+ onScrollStop: onScrollStop
277
+ }));
278
+ (0, _react.act)(function () {
279
+ return myScrollTo({
280
+ index: 30,
281
+ animate: false,
282
+ stickTo: 'end'
283
+ });
284
+ });
285
+ });
220
286
  test('should scroll to the given \'x\' position with scrollTo', function (done) {
221
287
  var onScrollStop = handlerOnScrollStop(done, function () {
222
288
  var expected = 1;
@@ -21,7 +21,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
21
21
  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); }; }
22
22
  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); }
23
23
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
25
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
26
26
  * Exports the {@link ui/internal/Pure.Pure} higher-order component (HOC).
27
27
  *
@@ -20,7 +20,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
20
20
  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); }; }
21
21
  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); }
22
22
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  var defaultConfig = {
26
26
  propComparators: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui",
3
- "version": "4.7.10",
3
+ "version": "4.9.0-alpha.1",
4
4
  "description": "A collection of simplified unstyled cross-platform UI components for Enact",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,7 @@
11
11
  "main": "index.js",
12
12
  "scripts": {
13
13
  "clean": "enact clean",
14
+ "interlink": "npm link ../core",
14
15
  "lint": "enact lint --strict",
15
16
  "test": "enact test",
16
17
  "test-json": "enact test --json",
@@ -31,8 +32,8 @@
31
32
  }
32
33
  },
33
34
  "dependencies": {
34
- "@enact/core": "^4.7.10",
35
- "classnames": "^2.3.2",
35
+ "@enact/core": "^4.9.0-alpha.1",
36
+ "classnames": "^2.5.1",
36
37
  "direction": "^1.0.4",
37
38
  "invariant": "^2.2.4",
38
39
  "prop-types": "^15.8.1",
@@ -24,7 +24,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
24
24
  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); }; }
25
25
  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); }
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
28
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
29
29
  * Exports the {@link ui/resolution.ResolutionDecorator} higher-order component (HOC).
30
30
  *
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.ScrollbarTrackBase = exports.ScrollbarTrack = void 0;
6
+ exports["default"] = exports.ScrollbarTrackBase = exports.MemoizedScrollbarTrack = void 0;
7
7
  var _classnames = _interopRequireDefault(require("classnames"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _react = require("react");
@@ -26,7 +26,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
26
26
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
27
  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; }
28
28
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
- var ScrollbarTrack = exports.ScrollbarTrackBase = exports.ScrollbarTrack = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
29
+ var ScrollbarTrack = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
30
  var vertical = props.vertical,
31
31
  rest = _objectWithoutProperties(props, _excluded),
32
32
  className = (0, _classnames["default"])(_ScrollbarTrackModule["default"].scrollbarTrack, vertical ? _ScrollbarTrackModule["default"].vertical : null);
@@ -35,7 +35,6 @@ var ScrollbarTrack = exports.ScrollbarTrackBase = exports.ScrollbarTrack = /*#__
35
35
  ref: ref
36
36
  }));
37
37
  });
38
- ScrollbarTrack.displayName = 'ui:ScrollbarTrack';
39
38
  ScrollbarTrack.propTypes = /** @lends ui/useScroll.ScrollbarTrack.prototype */{
40
39
  /**
41
40
  * If `true`, the scrollbar will be oriented vertically.
@@ -49,4 +48,6 @@ ScrollbarTrack.propTypes = /** @lends ui/useScroll.ScrollbarTrack.prototype */{
49
48
  ScrollbarTrack.defaultProps = {
50
49
  vertical: true
51
50
  };
52
- var _default = exports["default"] = ScrollbarTrack;
51
+ var MemoizedScrollbarTrack = exports.ScrollbarTrackBase = exports.MemoizedScrollbarTrack = /*#__PURE__*/(0, _react.memo)(ScrollbarTrack);
52
+ MemoizedScrollbarTrack.displayName = 'ui:ScrollbarTrack';
53
+ var _default = exports["default"] = MemoizedScrollbarTrack;
@@ -791,7 +791,7 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
791
791
  scrollStartOnScroll();
792
792
  }
793
793
  if (rtl && canScrollH) {
794
- scrollLeft = _platform.platform.ios || _platform.platform.safari || _platform.platform.chrome >= 85 || _platform.platform.androidChrome >= 85 ? -scrollLeft : bounds.maxLeft - scrollLeft;
794
+ scrollLeft = _platform.platform.chrome < 85 ? bounds.maxLeft - scrollLeft : -scrollLeft;
795
795
  }
796
796
  if (scrollLeft !== mutableRef.current.scrollLeft) {
797
797
  setScrollLeft(scrollLeft);
@@ -1255,7 +1255,7 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
1255
1255
  }
1256
1256
  } else {
1257
1257
  if (typeof opt.index === 'number' && typeof scrollContentHandle.current.getItemPosition === 'function') {
1258
- itemPos = scrollContentHandle.current.getItemPosition(opt.index, opt.stickTo, opt.offset);
1258
+ itemPos = scrollContentHandle.current.getItemPosition(opt.index, opt.stickTo, opt.offset, opt.disallowNegativeOffset);
1259
1259
  } else if (opt.node instanceof Object) {
1260
1260
  if (opt.node.nodeType === 1 && typeof scrollContentHandle.current.getNodePosition === 'function') {
1261
1261
  itemPos = scrollContentHandle.current.getNodePosition(opt.node);