@enact/ui 4.9.2 → 5.0.0-alpha.2

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 (181) hide show
  1. package/AnnounceDecorator/Announce.js +20 -22
  2. package/AnnounceDecorator/AnnounceDecorator.js +5 -5
  3. package/AnnounceDecorator/tests/Announce-specs.js +1 -1
  4. package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +1 -1
  5. package/AnnounceDecorator/tests/useAnnounce-specs.js +1 -1
  6. package/AnnounceDecorator/useAnnounce.js +1 -1
  7. package/BodyText/BodyText.js +5 -5
  8. package/BodyText/tests/BodyText-specs.js +1 -1
  9. package/Button/Button.js +5 -5
  10. package/Button/tests/Button-specs.js +3 -3
  11. package/CHANGELOG.md +33 -0
  12. package/Cancelable/Cancelable.js +22 -24
  13. package/Cancelable/tests/Cancelable-specs.js +4 -4
  14. package/Changeable/Changeable.js +22 -24
  15. package/Changeable/tests/Changeable-specs.js +1 -1
  16. package/ComponentOverride/ComponentOverride.js +4 -4
  17. package/FloatingLayer/FloatingLayer.js +20 -22
  18. package/FloatingLayer/FloatingLayerContainer.js +6 -7
  19. package/FloatingLayer/FloatingLayerDecorator.js +5 -5
  20. package/FloatingLayer/Scrim.js +18 -20
  21. package/FloatingLayer/tests/FloatingLayer-specs.js +1 -1
  22. package/FloatingLayer/tests/Scrim-specs.js +1 -1
  23. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +2 -2
  24. package/FloatingLayer/useFloatingLayer.js +4 -4
  25. package/FloatingLayer/useFloatingLayerDecorator.js +1 -1
  26. package/ForwardRef/ForwardRef.js +3 -3
  27. package/Group/Group.js +5 -5
  28. package/Group/GroupItem.js +5 -5
  29. package/Group/tests/Group-specs.js +4 -4
  30. package/Heading/Heading.js +5 -5
  31. package/Heading/tests/Heading-specs.js +1 -1
  32. package/Icon/Icon.js +5 -5
  33. package/Icon/tests/Icon-specs.js +1 -1
  34. package/Image/Image.js +5 -5
  35. package/Image/tests/Image-specs.js +1 -1
  36. package/ImageItem/ImageItem.js +5 -5
  37. package/ImageItem/tests/ImageItem-specs.js +3 -3
  38. package/Item/Item.js +5 -5
  39. package/Item/tests/Item-specs.js +3 -3
  40. package/LabeledIcon/LabeledIcon.js +5 -5
  41. package/LabeledIcon/tests/LabeledIcon-specs.js +1 -1
  42. package/Layout/Cell.js +5 -5
  43. package/Layout/Layout.js +5 -5
  44. package/Layout/tests/Layout-specs.js +7 -7
  45. package/Marquee/MarqueeBase.js +5 -5
  46. package/Marquee/MarqueeController.js +3 -3
  47. package/Marquee/MarqueeDecorator.js +30 -51
  48. package/Marquee/index.d.ts +10 -14
  49. package/Marquee/index.js +1 -1
  50. package/Marquee/tests/Marquee-specs.js +5 -6
  51. package/Marquee/useMarqueeController.js +2 -2
  52. package/Measurable/Measurable.js +8 -8
  53. package/Measurable/tests/Measurable-specs.js +8 -10
  54. package/Media/Media.js +17 -19
  55. package/Placeholder/PlaceholderControllerDecorator.js +22 -24
  56. package/Placeholder/PlaceholderDecorator.js +20 -22
  57. package/Placeholder/index.js +1 -1
  58. package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +2 -2
  59. package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
  60. package/ProgressBar/ProgressBar.js +5 -5
  61. package/ProgressBar/tests/ProgressBar-specs.js +1 -1
  62. package/Repeater/Repeater.js +5 -5
  63. package/Repeater/tests/Repeater-specs.js +3 -3
  64. package/Resizable/Resizable.js +3 -3
  65. package/Resizable/tests/Resizable-specs.js +2 -2
  66. package/Resizable/tests/useResize-specs.js +3 -3
  67. package/Resizable/useResize.js +3 -3
  68. package/Routable/Link.js +17 -19
  69. package/Routable/Routable.js +5 -5
  70. package/Routable/Route.js +1 -1
  71. package/Routable/Router.js +22 -24
  72. package/Routable/tests/Routable-specs.js +9 -9
  73. package/Routable/tests/Router-specs.js +1 -1
  74. package/Routable/util.js +1 -1
  75. package/Scroller/Scroller.d.ts +0 -120
  76. package/Scroller/Scroller.js +3 -11
  77. package/Scroller/ScrollerBasic.js +19 -21
  78. package/Scroller/tests/Scroller-specs.js +1 -1
  79. package/Skinnable/Skinnable.js +5 -5
  80. package/Skinnable/tests/Skinnable-specs.js +3 -3
  81. package/Skinnable/tests/useSkins-specs.js +3 -3
  82. package/Skinnable/util.js +1 -1
  83. package/Slider/Knob.js +5 -5
  84. package/Slider/PositionDecorator.js +25 -27
  85. package/Slider/Slider.js +5 -5
  86. package/Slider/tests/Slider-specs.js +1 -1
  87. package/Slottable/Slottable.js +3 -5
  88. package/Slottable/tests/Slottable-specs.js +1 -1
  89. package/Slottable/tests/useSlots-specs.js +1 -1
  90. package/Slottable/useSlots.js +5 -5
  91. package/Spinner/Spinner.js +5 -5
  92. package/ToggleIcon/ToggleIcon.js +5 -5
  93. package/ToggleIcon/tests/ToggleIcon-specs.js +3 -3
  94. package/Toggleable/Toggle.js +6 -7
  95. package/Toggleable/Toggleable.js +6 -6
  96. package/Toggleable/tests/Toggleable-specs.js +1 -1
  97. package/Toggleable/useToggle.js +8 -8
  98. package/Touchable/ClickAllow.js +5 -6
  99. package/Touchable/Drag.js +6 -6
  100. package/Touchable/Flick.js +7 -8
  101. package/Touchable/Hold.js +7 -8
  102. package/Touchable/Pinch.js +6 -6
  103. package/Touchable/Touch.js +6 -7
  104. package/Touchable/Touchable.js +5 -5
  105. package/Touchable/config.js +2 -2
  106. package/Touchable/tests/Touchable-specs.js +3 -3
  107. package/Touchable/tests/useTouch-specs.js +5 -5
  108. package/Touchable/useTouch.js +7 -7
  109. package/Transition/Transition.js +17 -19
  110. package/Transition/tests/Transition-specs.js +7 -7
  111. package/ViewManager/Arranger.js +3 -3
  112. package/ViewManager/TransitionGroup.js +18 -20
  113. package/ViewManager/View.js +15 -17
  114. package/ViewManager/ViewManager.js +25 -27
  115. package/ViewManager/tests/View-specs.js +1 -1
  116. package/ViewManager/tests/ViewManager-specs.js +16 -18
  117. package/VirtualList/VirtualList.d.ts +0 -158
  118. package/VirtualList/VirtualList.js +3 -17
  119. package/VirtualList/VirtualListBasic.js +42 -43
  120. package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
  121. package/VirtualList/tests/VirtualGridList-specs.js +6 -6
  122. package/VirtualList/tests/VirtualList-native-specs.js +5 -5
  123. package/VirtualList/tests/VirtualList-specs.js +7 -7
  124. package/internal/IdProvider/IdProvider.js +3 -3
  125. package/internal/IdProvider/Provider.js +5 -6
  126. package/internal/IdProvider/tests/IdProvider-specs.js +3 -3
  127. package/internal/IdProvider/tests/useId-specs.js +3 -3
  128. package/internal/IdProvider/useId.js +1 -1
  129. package/internal/Pure/Pure.js +20 -22
  130. package/internal/Pure/tests/Pure-specs.js +15 -17
  131. package/internal/localized-fonts/localized-fonts.js +4 -4
  132. package/internal/selection/selection.js +1 -1
  133. package/package.json +5 -4
  134. package/resolution/ResolutionDecorator.js +21 -23
  135. package/resolution/index.js +2 -2
  136. package/resolution/tests/ResolutionDecorator-specs.js +1 -1
  137. package/useControlledState/tests/useControlledState-specs.js +5 -5
  138. package/useControlledState/useControlledState.js +4 -4
  139. package/useScroll/ScrollAnimator.js +6 -7
  140. package/useScroll/Scrollbar.js +5 -5
  141. package/useScroll/ScrollbarTrack.js +5 -5
  142. package/useScroll/useScroll.js +9 -9
  143. package/useScroll/utilDOM.js +1 -1
  144. package/GridListImageItem/GridListImageItem.d.ts +0 -85
  145. package/GridListImageItem/GridListImageItem.js +0 -250
  146. package/GridListImageItem/GridListImageItem.module.css +0 -28
  147. package/GridListImageItem/package.json +0 -3
  148. package/IconButton/IconButton.d.ts +0 -115
  149. package/IconButton/IconButton.js +0 -253
  150. package/IconButton/IconButton.module.css +0 -11
  151. package/IconButton/package.json +0 -3
  152. package/IconButton/tests/IconButton-specs.js +0 -29
  153. package/RadioDecorator/RadioControllerDecorator.js +0 -101
  154. package/RadioDecorator/RadioDecorator.d.ts +0 -35
  155. package/RadioDecorator/RadioDecorator.js +0 -177
  156. package/RadioDecorator/package.json +0 -3
  157. package/RadioDecorator/tests/RadioDecorator-specs.js +0 -247
  158. package/Scrollable/ScrollAnimator.js +0 -130
  159. package/Scrollable/ScrollThumb.js +0 -57
  160. package/Scrollable/ScrollThumb.module.css +0 -34
  161. package/Scrollable/Scrollable.js +0 -1430
  162. package/Scrollable/Scrollable.module.css +0 -36
  163. package/Scrollable/ScrollableNative.js +0 -1429
  164. package/Scrollable/Scrollbar.js +0 -281
  165. package/Scrollable/Scrollbar.module.css +0 -24
  166. package/Scrollable/package.json +0 -3
  167. package/Scroller/UiScroller.module.css +0 -10
  168. package/Scroller/UiScrollerBase.js +0 -372
  169. package/SlotItem/SlotItem.d.ts +0 -118
  170. package/SlotItem/SlotItem.js +0 -248
  171. package/SlotItem/SlotItem.module.css +0 -12
  172. package/SlotItem/package.json +0 -3
  173. package/SlotItem/tests/SlotItem-specs.js +0 -24
  174. package/ToggleItem/ToggleItem.d.ts +0 -132
  175. package/ToggleItem/ToggleItem.js +0 -301
  176. package/ToggleItem/ToggleItem.module.css +0 -9
  177. package/ToggleItem/package.json +0 -3
  178. package/ToggleItem/tests/ToggleItem-specs.js +0 -120
  179. package/VirtualList/UiVirtualList.module.css +0 -26
  180. package/VirtualList/UiVirtualListBase.js +0 -1410
  181. package/VirtualList/VirtualListBase.js +0 -33
@@ -30,7 +30,7 @@ var _TransitionGroup = _interopRequireDefault(require("./TransitionGroup"));
30
30
  var _View = require("./View");
31
31
  var _jsxRuntime = require("react/jsx-runtime");
32
32
  var _excluded = ["arranger", "childProps", "children", "duration", "index", "noAnimation", "enteringDelay", "enteringProp", "rtl"];
33
- var _class;
33
+ var _Class;
34
34
  /**
35
35
  * A component that manages the transitions of views.
36
36
  *
@@ -55,47 +55,46 @@ var _class;
55
55
  * @public
56
56
  */
57
57
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
58
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
59
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
58
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
59
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
60
60
  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; }
61
61
  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; }
62
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
63
- 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; }
64
- 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; }
65
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66
- 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, _toPropertyKey(descriptor.key), descriptor); } }
67
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
68
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
62
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
63
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
64
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
65
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
66
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
67
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
68
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
69
69
  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); }
70
- 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); }
71
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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
- 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
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
70
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
71
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
72
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
75
73
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
76
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
77
- var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
78
- _inherits(ViewManagerBase, _Component);
79
- var _super = _createSuper(ViewManagerBase);
74
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
75
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
76
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
77
+ var ViewManagerBase = exports.ViewManagerBase = (_Class = /*#__PURE__*/function (_Component) {
80
78
  function ViewManagerBase(props) {
81
79
  var _this;
82
80
  _classCallCheck(this, ViewManagerBase);
83
- _this = _super.call(this, props);
81
+ _this = _callSuper(this, ViewManagerBase, [props]);
84
82
  _this.makeTransitionEvent = function () {
85
83
  return {
86
84
  index: _this.props.index,
87
85
  previousIndex: _this.state.prevIndex
88
86
  };
89
87
  };
90
- _this.handleTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleTransition');
91
- _this.handleWillTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onWillTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleWillTransition');
88
+ _this.handleTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onTransition', _this.makeTransitionEvent)).bindAs(_this, 'handleTransition');
89
+ _this.handleWillTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onWillTransition', _this.makeTransitionEvent)).bindAs(_this, 'handleWillTransition');
92
90
  _this.state = {
93
91
  prevIndex: null,
94
92
  reverseTransition: null
95
93
  };
96
94
  return _this;
97
95
  }
98
- _createClass(ViewManagerBase, [{
96
+ _inherits(ViewManagerBase, _Component);
97
+ return _createClass(ViewManagerBase, [{
99
98
  key: "render",
100
99
  value: function render() {
101
100
  var _this$props = this.props,
@@ -166,8 +165,7 @@ var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function
166
165
  return null;
167
166
  }
168
167
  }]);
169
- return ViewManagerBase;
170
- }(_react.Component), _class.displayName = 'ViewManager', _class.propTypes = /** @lends ui/ViewManager.ViewManagerBase.prototype */{
168
+ }(_react.Component), _Class.displayName = 'ViewManager', _Class.propTypes = /** @lends ui/ViewManager.ViewManagerBase.prototype */{
171
169
  /**
172
170
  * Arranger to control the animation
173
171
  *
@@ -318,11 +316,11 @@ var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function
318
316
  * @default value of index
319
317
  */
320
318
  start: _propTypes2["default"].number
321
- }, _class.defaultProps = {
319
+ }, _Class.defaultProps = {
322
320
  component: 'div',
323
321
  duration: 300,
324
322
  index: 0
325
- }, _class);
323
+ }, _Class);
326
324
 
327
325
  /**
328
326
  * Applies ViewManager behaviors.
@@ -6,7 +6,7 @@ var _react2 = require("react");
6
6
  var _testUtils = require("./test-utils");
7
7
  var _View = _interopRequireDefault(require("../View"));
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  describe('View', function () {
11
11
  test('should render its child when neither enteringProp or childProps is specified', function () {
12
12
  (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_View["default"], {
@@ -7,21 +7,21 @@ var _ = _interopRequireDefault(require("../"));
7
7
  var _Arranger = require("../Arranger");
8
8
  var _testUtils = require("./test-utils");
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- 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, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
12
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
17
  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); }
18
- 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); }
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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
- 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
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
23
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
22
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
25
  describe('ViewManager', function () {
26
26
  // Suite-wide setup
27
27
  beforeEach(function () {
@@ -202,13 +202,12 @@ describe('ViewManager', function () {
202
202
  test('should allow child props to update', function () {
203
203
  var content = 'updated';
204
204
  var ViewManagerTest = /*#__PURE__*/function (_Component) {
205
- _inherits(ViewManagerTest, _Component);
206
- var _super = _createSuper(ViewManagerTest);
207
205
  function ViewManagerTest() {
208
206
  _classCallCheck(this, ViewManagerTest);
209
- return _super.apply(this, arguments);
207
+ return _callSuper(this, ViewManagerTest, arguments);
210
208
  }
211
- _createClass(ViewManagerTest, [{
209
+ _inherits(ViewManagerTest, _Component);
210
+ return _createClass(ViewManagerTest, [{
212
211
  key: "render",
213
212
  value: function render() {
214
213
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_["default"], {
@@ -219,7 +218,6 @@ describe('ViewManager', function () {
219
218
  });
220
219
  }
221
220
  }]);
222
- return ViewManagerTest;
223
221
  }(_react2.Component);
224
222
  var _render4 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewManagerTest, {
225
223
  content: "original"
@@ -230,164 +230,6 @@ export class VirtualListBasic extends React.Component<
230
230
  Merge<React.HTMLProps<HTMLElement>, VirtualListBasicProps>
231
231
  > {}
232
232
 
233
- export interface VirtualListBaseProps {
234
- /**
235
- * The rendering function called for each item in the list.
236
- *
237
- * Note : The list does not always render a component whenever its render function is called
238
- due to performance optimization.
239
- *
240
- * Example:
241
- * ```
242
- renderItem = ({index, ...rest}) => {
243
- delete rest.data;
244
-
245
- return (
246
- <MyComponent index={index} {...rest} />
247
- );
248
- }
249
- ```
250
- */
251
- itemRenderer: Function;
252
- /**
253
- * A callback function that receives a reference to the `scrollTo` feature.
254
- *
255
- * Once received, the `scrollTo` method can be called as an imperative interface.
256
- *
257
- * The `scrollTo` function accepts the following parameters:
258
- * * {position: {x, y}} - Pixel value for x and/or y position
259
- * * {align} - Where the scroll area should be aligned. Values are:
260
- `'left'` , `'right'` , `'top'` , `'bottom'` ,
261
- `'topleft'` , `'topright'` , `'bottomleft'` , and `'bottomright'` .
262
- * * {index} - Index of specific item. ( `0` or positive integer)
263
- This option is available for only `VirtualList` kind.
264
- * * {node} - Node to scroll into view
265
- * * {animate} - When `true` , scroll occurs with animation. When `false` , no
266
- animation occurs.
267
- * * {focus} - When `true` , attempts to focus item after scroll. Only valid when scrolling
268
- by `index` or `node` .
269
- *
270
- * Note: Only specify one of: `position` , `align` , `index` or `node`
271
- *
272
- * Example:
273
- * ```
274
- // If you set cbScrollTo prop like below;
275
- cbScrollTo: (fn) => {this.scrollTo = fn;}
276
- // You can simply call like below;
277
- this.scrollTo({align: 'top'}); // scroll to the top
278
- ```
279
- */
280
- cbScrollTo?: Function;
281
- /**
282
- * Additional props included in the object passed to the `itemsRenderer` callback.
283
- */
284
- childProps?: object;
285
- /**
286
- * Client size of the list; valid values are an object that has `clientWidth` and `clientHeight` .
287
- */
288
- clientSize?: object;
289
- /**
290
- * The number of items of data the list contains.
291
- */
292
- dataSize?: number;
293
- /**
294
- * The layout direction of the list.
295
- *
296
- * Valid values are:
297
- * * `'horizontal'` , and
298
- * * `'vertical'` .
299
- */
300
- direction?: string;
301
- /**
302
- * The spacing between items.
303
- */
304
- spacing?: number;
305
- /**
306
- * Specifies how to show horizontal scrollbar.
307
- *
308
- * Valid values are:
309
- * * `'auto'` ,
310
- * * `'visible'` , and
311
- * * `'hidden'` .
312
- */
313
- horizontalScrollbar?: string;
314
- /**
315
- * Prevents scroll by wheeling on the list.
316
- */
317
- noScrollByWheel?: boolean;
318
- /**
319
- * Called when scrolling.
320
- *
321
- * Passes `scrollLeft` , `scrollTop` , and `moreInfo` .
322
- It is not recommended to set this prop since it can cause performance degradation.
323
- Use `onScrollStart` or `onScrollStop` instead.
324
- */
325
- onScroll?: Function;
326
- /**
327
- * Called when scroll starts.
328
- *
329
- * Passes `scrollLeft` , `scrollTop` , and `moreInfo` .
330
- You can get firstVisibleIndex and lastVisibleIndex from VirtualList with `moreInfo` .
331
- *
332
- * Example:
333
- * ```
334
- onScrollStart = ({scrollLeft, scrollTop, moreInfo}) => {
335
- const {firstVisibleIndex, lastVisibleIndex} = moreInfo;
336
- // do something with firstVisibleIndex and lastVisibleIndex
337
- }
338
-
339
- render = () => (
340
- <VirtualList
341
- ...
342
- onScrollStart={this.onScrollStart}
343
- ...
344
- />
345
- )
346
- ```
347
- */
348
- onScrollStart?: Function;
349
- /**
350
- * Called when scroll stops.
351
- *
352
- * Passes `scrollLeft` , `scrollTop` , and `moreInfo` .
353
- You can get firstVisibleIndex and lastVisibleIndex from VirtualList with `moreInfo` .
354
- *
355
- * Example:
356
- * ```
357
- onScrollStop = ({scrollLeft, scrollTop, moreInfo}) => {
358
- const {firstVisibleIndex, lastVisibleIndex} = moreInfo;
359
- // do something with firstVisibleIndex and lastVisibleIndex
360
- }
361
-
362
- render = () => (
363
- <VirtualList
364
- ...
365
- onScrollStop={this.onScrollStop}
366
- ...
367
- />
368
- )
369
- ```
370
- */
371
- onScrollStop?: Function;
372
- /**
373
- * Specifies how to show vertical scrollbar.
374
- *
375
- * Valid values are:
376
- * * `'auto'` ,
377
- * * `'visible'` , and
378
- * * `'hidden'` .
379
- */
380
- verticalScrollbar?: string;
381
- }
382
- /**
383
- * A basic base component for
384
- and .
385
- */
386
-
387
- export class VirtualListBase extends React.Component<
388
- Merge<React.HTMLProps<HTMLElement>, VirtualListBaseProps>
389
- > {}
390
-
391
233
  export interface VirtualGridListProps extends VirtualListBasicProps {
392
234
  /**
393
235
  * A callback function that receives a reference to the `scrollTo` feature.
@@ -4,18 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VirtualList = exports.VirtualGridList = void 0;
7
- Object.defineProperty(exports, "VirtualListBase", {
8
- enumerable: true,
9
- get: function get() {
10
- return _UiVirtualListBase.UiVirtualListBase;
11
- }
12
- });
13
- Object.defineProperty(exports, "VirtualListBaseNative", {
14
- enumerable: true,
15
- get: function get() {
16
- return _UiVirtualListBase.UiVirtualListBaseNative;
17
- }
18
- });
19
7
  Object.defineProperty(exports, "VirtualListBasic", {
20
8
  enumerable: true,
21
9
  get: function get() {
@@ -40,14 +28,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
40
28
  var _Resizable = require("../Resizable");
41
29
  var _useScroll3 = _interopRequireDefault(require("../useScroll"));
42
30
  var _Scrollbar = _interopRequireDefault(require("../useScroll/Scrollbar"));
43
- var _UiVirtualListBase = require("./UiVirtualListBase");
44
31
  var _VirtualListBasic = require("./VirtualListBasic");
45
32
  var _jsxRuntime = require("react/jsx-runtime");
46
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
47
34
  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; }
48
35
  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; }
49
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
50
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
36
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
37
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
51
38
  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); } /**
52
39
  * Unstyled virtual list components and behaviors to be customized by a theme or application.
53
40
  *
@@ -56,7 +43,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
56
43
  * @exports itemSizesShape
57
44
  * @exports VirtualGridList
58
45
  * @exports VirtualList
59
- * @exports VirtualListBase
60
46
  * @exports VirtualListBasic
61
47
  */
62
48
  var nop = function nop() {};
@@ -15,30 +15,30 @@ var _react = require("react");
15
15
  var _VirtualListModule = _interopRequireDefault(require("./VirtualList.module.css"));
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  var _excluded = ["className", "containerProps", "placeholderRenderer", "role", "style", "scrollMode"];
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- 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; }
20
- 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; }
21
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
20
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
21
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
22
22
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
25
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
26
- 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; }
23
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
24
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
25
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
26
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
27
27
  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; }
28
28
  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; }
29
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
30
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31
- 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, _toPropertyKey(descriptor.key), descriptor); } }
32
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
29
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
30
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
31
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
32
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
33
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
34
34
  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); }
35
- 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); }
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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
- 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
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
36
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
37
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
40
38
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
41
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
40
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
41
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
42
42
  var nop = function nop() {};
43
43
 
44
44
  /**
@@ -81,12 +81,10 @@ var itemSizesShape = exports.itemSizesShape = _propTypes2["default"].shape({
81
81
  * @public
82
82
  */
83
83
  var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Component) {
84
- _inherits(VirtualListBasic, _Component);
85
- var _super = _createSuper(VirtualListBasic);
86
84
  function VirtualListBasic(_props) {
87
85
  var _this;
88
86
  _classCallCheck(this, VirtualListBasic);
89
- _this = _super.call(this, _props);
87
+ _this = _callSuper(this, VirtualListBasic, [_props]);
90
88
  _this.displayName = 'ui:VirtualListBasic';
91
89
  _this.scrollBounds = {
92
90
  clientWidth: 0,
@@ -160,10 +158,10 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
160
158
  var stickTo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'start';
161
159
  var optionalOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
162
160
  var disallowNegativeOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
163
- var _assertThisInitialize = _assertThisInitialized(_this),
164
- isPrimaryDirectionVertical = _assertThisInitialize.isPrimaryDirectionVertical,
165
- primary = _assertThisInitialize.primary,
166
- scrollBounds = _assertThisInitialize.scrollBounds;
161
+ var _this2 = _this,
162
+ isPrimaryDirectionVertical = _this2.isPrimaryDirectionVertical,
163
+ primary = _this2.primary,
164
+ scrollBounds = _this2.scrollBounds;
167
165
  var maxPos = isPrimaryDirectionVertical ? scrollBounds.maxTop : scrollBounds.maxLeft;
168
166
  var position = _this.getGridPosition(index);
169
167
  var offset = 0;
@@ -219,11 +217,11 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
219
217
  var dataSize = props.dataSize,
220
218
  overhang = props.overhang,
221
219
  updateStatesAndBounds = props.updateStatesAndBounds,
222
- _assertThisInitialize2 = _assertThisInitialized(_this),
223
- dimensionToExtent = _assertThisInitialize2.dimensionToExtent,
224
- primary = _assertThisInitialize2.primary,
225
- moreInfo = _assertThisInitialize2.moreInfo,
226
- scrollPosition = _assertThisInitialize2.scrollPosition,
220
+ _this3 = _this,
221
+ dimensionToExtent = _this3.dimensionToExtent,
222
+ primary = _this3.primary,
223
+ moreInfo = _this3.moreInfo,
224
+ scrollPosition = _this3.scrollPosition,
227
225
  numOfItems = Math.min(dataSize, dimensionToExtent * (Math.ceil(primary.clientSize / primary.gridSize) + overhang)),
228
226
  wasFirstIndexMax = _this.maxFirstIndex < moreInfo.firstVisibleIndex - dimensionToExtent && firstIndex === _this.maxFirstIndex,
229
227
  dataSizeDiff = dataSize - _this.curDataSize;
@@ -269,7 +267,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
269
267
  return x;
270
268
  };
271
269
  _this.applyStyleToNewNode = function (index) {
272
- var _this2;
270
+ var _this4;
273
271
  var _this$props = _this.props,
274
272
  childProps = _this$props.childProps,
275
273
  itemRefs = _this$props.itemRefs,
@@ -292,7 +290,8 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
292
290
  _this.cc[key] = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
293
291
  className: _VirtualListModule["default"].listItem,
294
292
  ref: itemContainerRef,
295
- style: (_this2 = _this).composeStyle.apply(_this2, rest),
293
+ role: "presentation",
294
+ style: (_this4 = _this).composeStyle.apply(_this4, rest),
296
295
  children: itemRenderer(_objectSpread(_objectSpread(_objectSpread({}, childProps), componentProps), {}, {
297
296
  index: index
298
297
  }))
@@ -323,17 +322,17 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
323
322
  return total + size + (index > 0 ? _this.props.spacing : 0);
324
323
  }, 0);
325
324
  } else {
326
- var _assertThisInitialize3 = _assertThisInitialized(_this),
327
- dimensionToExtent = _assertThisInitialize3.dimensionToExtent,
328
- primary = _assertThisInitialize3.primary,
329
- curDataSize = _assertThisInitialize3.curDataSize,
325
+ var _this5 = _this,
326
+ dimensionToExtent = _this5.dimensionToExtent,
327
+ primary = _this5.primary,
328
+ curDataSize = _this5.curDataSize,
330
329
  spacing = _this.props.spacing;
331
330
  return Math.ceil(curDataSize / dimensionToExtent) * primary.gridSize - spacing;
332
331
  }
333
332
  };
334
333
  _this.syncClientSize = function () {
335
- var _assertThisInitialize4 = _assertThisInitialized(_this),
336
- props = _assertThisInitialize4.props,
334
+ var _this6 = _this,
335
+ props = _this6.props,
337
336
  node = _this.props.scrollContentRef.current;
338
337
  if (!props.clientSize && !node) {
339
338
  return false;
@@ -341,8 +340,8 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
341
340
  var _ref3 = props.clientSize || _this.getClientSize(node),
342
341
  clientWidth = _ref3.clientWidth,
343
342
  clientHeight = _ref3.clientHeight,
344
- _assertThisInitialize5 = _assertThisInitialized(_this),
345
- scrollBounds = _assertThisInitialize5.scrollBounds;
343
+ _this7 = _this,
344
+ scrollBounds = _this7.scrollBounds;
346
345
  if (clientWidth !== scrollBounds.clientWidth || clientHeight !== scrollBounds.clientHeight) {
347
346
  _this.calculateMetrics(props);
348
347
  _this.setState(_this.getStatesAndUpdateBounds(props));
@@ -367,7 +366,8 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
367
366
  }
368
367
  return _this;
369
368
  }
370
- _createClass(VirtualListBasic, [{
369
+ _inherits(VirtualListBasic, _Component);
370
+ return _createClass(VirtualListBasic, [{
371
371
  key: "componentDidMount",
372
372
  value:
373
373
  // Calculate metrics for VirtualList after the 1st render to know client W/H.
@@ -1126,7 +1126,6 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
1126
1126
  });
1127
1127
  }
1128
1128
  }]);
1129
- return VirtualListBasic;
1130
1129
  }(_react.Component);
1131
1130
  VirtualListBasic.propTypes = /** @lends ui/VirtualList.VirtualListBasic.prototype */{
1132
1131
  /**
@@ -9,11 +9,11 @@ var _excluded = ["index"],
9
9
  _excluded2 = ["index"];
10
10
  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; }
11
11
  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; }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
14
  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); }
15
- 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; }
16
- 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; }
15
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
16
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
17
17
  describe('VirtualGridList with native scrollMode', function () {
18
18
  var clientSize, dataSize, items, itemSize, renderItem, svgGenerator;
19
19
  beforeEach(function () {