@enact/ui 5.0.0-alpha.1 → 5.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnnounceDecorator/Announce.js +19 -21
- package/AnnounceDecorator/AnnounceDecorator.js +4 -4
- package/AnnounceDecorator/tests/Announce-specs.js +1 -1
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +1 -1
- package/AnnounceDecorator/tests/useAnnounce-specs.js +1 -1
- package/AnnounceDecorator/useAnnounce.js +1 -1
- package/BodyText/BodyText.js +4 -4
- package/Button/Button.js +4 -4
- package/Button/tests/Button-specs.js +3 -3
- package/CHANGELOG.md +51 -4
- package/Cancelable/Cancelable.d.ts +1 -1
- package/Cancelable/Cancelable.js +23 -25
- package/Cancelable/cancelHandler.js +1 -1
- package/Cancelable/tests/Cancelable-specs.js +3 -3
- package/Changeable/Changeable.js +21 -23
- package/Changeable/tests/Changeable-specs.js +1 -1
- package/ComponentOverride/ComponentOverride.js +3 -3
- package/FloatingLayer/FloatingLayer.js +20 -22
- package/FloatingLayer/FloatingLayerContainer.js +5 -6
- package/FloatingLayer/FloatingLayerDecorator.js +4 -4
- package/FloatingLayer/Scrim.js +17 -19
- package/FloatingLayer/tests/FloatingLayer-specs.js +2 -2
- package/FloatingLayer/tests/Scrim-specs.js +1 -1
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +1 -1
- package/FloatingLayer/useFloatingLayer.js +4 -4
- package/FloatingLayer/useFloatingLayerDecorator.js +1 -1
- package/ForwardRef/ForwardRef.js +2 -2
- package/Group/Group.js +4 -4
- package/Group/GroupItem.js +4 -4
- package/Group/tests/Group-specs.js +3 -3
- package/Heading/Heading.d.ts +1 -1
- package/Heading/Heading.js +5 -5
- package/Heading/tests/Heading-specs.js +1 -1
- package/Icon/Icon.js +4 -4
- package/Image/Image.js +4 -4
- package/ImageItem/ImageItem.js +4 -4
- package/ImageItem/tests/ImageItem-specs.js +1 -1
- package/Item/Item.js +4 -4
- package/Item/tests/Item-specs.js +3 -3
- package/LabeledIcon/LabeledIcon.js +4 -4
- package/LabeledIcon/tests/LabeledIcon-specs.js +1 -1
- package/Layout/Cell.js +6 -6
- package/Layout/Layout.d.ts +1 -1
- package/Layout/Layout.js +6 -6
- package/Layout/tests/Layout-specs.js +5 -5
- package/Marquee/MarqueeBase.js +4 -4
- package/Marquee/MarqueeController.js +2 -2
- package/Marquee/MarqueeDecorator.js +27 -29
- package/Marquee/index.js +1 -1
- package/Marquee/tests/Marquee-specs.js +4 -5
- package/Marquee/useMarqueeController.js +2 -2
- package/Measurable/Measurable.js +7 -7
- package/Measurable/tests/Measurable-specs.js +6 -8
- package/Media/Media.js +16 -18
- package/Placeholder/PlaceholderControllerDecorator.js +22 -24
- package/Placeholder/PlaceholderDecorator.js +19 -21
- package/Placeholder/index.js +1 -1
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +1 -1
- package/Placeholder/tests/PlaceholderDecorator-specs.js +1 -1
- package/ProgressBar/ProgressBar.js +4 -4
- package/ProgressBar/tests/ProgressBar-specs.js +1 -1
- package/Repeater/Repeater.d.ts +1 -1
- package/Repeater/Repeater.js +5 -5
- package/Repeater/tests/Repeater-specs.js +1 -1
- package/Resizable/Resizable.js +2 -2
- package/Resizable/tests/Resizable-specs.js +1 -1
- package/Resizable/tests/useResize-specs.js +2 -2
- package/Resizable/useResize.js +2 -2
- package/Routable/Link.js +16 -18
- package/Routable/Routable.js +4 -4
- package/Routable/Route.js +1 -1
- package/Routable/Router.js +22 -24
- package/Routable/tests/Routable-specs.js +8 -8
- package/Routable/tests/Router-specs.js +1 -1
- package/Routable/util.js +1 -1
- package/Scroller/Scroller.js +4 -3
- package/Scroller/ScrollerBasic.js +18 -20
- package/Scroller/tests/Scroller-specs.js +1 -1
- package/Skinnable/Skinnable.js +5 -5
- package/Skinnable/tests/Skinnable-specs.js +2 -2
- package/Skinnable/tests/useSkins-specs.js +2 -2
- package/Skinnable/util.js +2 -2
- package/Slider/Knob.js +5 -5
- package/Slider/PositionDecorator.js +24 -26
- package/Slider/Slider.d.ts +4 -4
- package/Slider/Slider.js +7 -7
- package/Slider/tests/Slider-specs.js +1 -1
- package/Slottable/Slottable.js +2 -2
- package/Slottable/tests/Slottable-specs.js +1 -1
- package/Slottable/tests/useSlots-specs.js +1 -1
- package/Slottable/useSlots.js +6 -6
- package/Spinner/Spinner.js +4 -4
- package/ToggleIcon/ToggleIcon.js +4 -4
- package/ToggleIcon/tests/ToggleIcon-specs.js +3 -3
- package/Toggleable/Toggle.js +5 -6
- package/Toggleable/Toggleable.js +4 -4
- package/Toggleable/tests/Toggleable-specs.js +1 -1
- package/Toggleable/useToggle.js +8 -8
- package/Touchable/ClickAllow.js +5 -6
- package/Touchable/Drag.js +5 -5
- package/Touchable/Flick.js +6 -7
- package/Touchable/Hold.js +6 -7
- package/Touchable/Pinch.js +5 -5
- package/Touchable/Touch.js +5 -6
- package/Touchable/Touchable.js +4 -4
- package/Touchable/config.js +2 -2
- package/Touchable/tests/Touchable-specs.js +3 -3
- package/Touchable/tests/useTouch-specs.js +4 -4
- package/Touchable/useTouch.js +6 -6
- package/Transition/Transition.d.ts +3 -3
- package/Transition/Transition.js +21 -23
- package/Transition/tests/Transition-specs.js +7 -7
- package/ViewManager/Arranger.js +5 -5
- package/ViewManager/TransitionGroup.js +17 -19
- package/ViewManager/View.js +14 -16
- package/ViewManager/ViewManager.d.ts +3 -3
- package/ViewManager/ViewManager.js +23 -25
- package/ViewManager/tests/View-specs.js +1 -1
- package/ViewManager/tests/ViewManager-specs.js +15 -17
- package/VirtualList/VirtualList.js +5 -4
- package/VirtualList/VirtualListBasic.js +42 -43
- package/VirtualList/tests/VirtualGridList-native-specs.js +3 -3
- package/VirtualList/tests/VirtualGridList-specs.js +5 -5
- package/VirtualList/tests/VirtualList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualList-specs.js +6 -6
- package/internal/IdProvider/IdProvider.js +2 -2
- package/internal/IdProvider/Provider.js +4 -5
- package/internal/IdProvider/tests/IdProvider-specs.js +2 -2
- package/internal/IdProvider/tests/useId-specs.js +2 -2
- package/internal/IdProvider/useId.js +1 -1
- package/internal/Pure/Pure.js +19 -21
- package/internal/Pure/tests/Pure-specs.js +14 -16
- package/internal/localized-fonts/localized-fonts.js +4 -4
- package/internal/selection/selection.js +1 -1
- package/package.json +6 -5
- package/resolution/ResolutionDecorator.js +20 -22
- package/resolution/index.d.ts +1 -1
- package/resolution/index.js +1 -1
- package/resolution/resolution.js +1 -1
- package/resolution/tests/ResolutionDecorator-specs.js +1 -1
- package/styles/mixins.less +3 -3
- package/useControlledState/tests/useControlledState-specs.js +5 -5
- package/useControlledState/useControlledState.js +4 -4
- package/useScroll/ScrollAnimator.js +5 -6
- package/useScroll/Scrollbar.js +4 -4
- package/useScroll/ScrollbarTrack.js +4 -4
- package/useScroll/useScroll.js +8 -8
- package/useScroll/utilDOM.js +1 -1
|
@@ -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
|
|
33
|
+
var _Class;
|
|
34
34
|
/**
|
|
35
35
|
* A component that manages the transitions of views.
|
|
36
36
|
*
|
|
@@ -56,46 +56,45 @@ var _class;
|
|
|
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
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(
|
|
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(
|
|
63
|
-
function _objectWithoutProperties(
|
|
64
|
-
function _objectWithoutPropertiesLoose(
|
|
65
|
-
function _classCallCheck(
|
|
66
|
-
function _defineProperties(
|
|
67
|
-
function _createClass(
|
|
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
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
|
|
71
|
-
function
|
|
72
|
-
function
|
|
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(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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 =
|
|
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(
|
|
91
|
-
_this.handleWillTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onWillTransition', _this.makeTransitionEvent)).bindAs(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
319
|
+
}, _Class.defaultProps = {
|
|
322
320
|
component: 'div',
|
|
323
321
|
duration: 300,
|
|
324
322
|
index: 0
|
|
325
|
-
},
|
|
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(
|
|
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(
|
|
11
|
-
function asyncGeneratorStep(
|
|
12
|
-
function _asyncToGenerator(
|
|
13
|
-
function _classCallCheck(
|
|
14
|
-
function _defineProperties(
|
|
15
|
-
function _createClass(
|
|
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
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
|
|
19
|
-
function
|
|
20
|
-
function
|
|
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(
|
|
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
|
|
207
|
+
return _callSuper(this, ViewManagerTest, arguments);
|
|
210
208
|
}
|
|
211
|
-
|
|
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"
|
|
@@ -23,16 +23,17 @@ Object.defineProperty(exports, "itemSizesShape", {
|
|
|
23
23
|
return _VirtualListBasic.itemSizesShape;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
+
var _util = require("@enact/core/util");
|
|
26
27
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
28
|
var _Resizable = require("../Resizable");
|
|
28
29
|
var _useScroll3 = _interopRequireDefault(require("../useScroll"));
|
|
29
30
|
var _Scrollbar = _interopRequireDefault(require("../useScroll/Scrollbar"));
|
|
30
31
|
var _VirtualListBasic = require("./VirtualListBasic");
|
|
31
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
|
-
function _interopRequireDefault(
|
|
33
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
33
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; }
|
|
34
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; }
|
|
35
|
-
function _defineProperty(
|
|
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; }
|
|
36
37
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
37
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); } /**
|
|
38
39
|
* Unstyled virtual list components and behaviors to be customized by a theme or application.
|
|
@@ -76,7 +77,7 @@ var virtualListDefaultProps = {
|
|
|
76
77
|
var VirtualList = exports.VirtualList = function VirtualList(props) {
|
|
77
78
|
// Hooks
|
|
78
79
|
|
|
79
|
-
var virtualListProps =
|
|
80
|
+
var virtualListProps = (0, _util.setDefaultProps)(props, virtualListDefaultProps);
|
|
80
81
|
var _useScroll = (0, _useScroll3["default"])(virtualListProps),
|
|
81
82
|
scrollContentHandle = _useScroll.scrollContentHandle,
|
|
82
83
|
ScrollContentWrapper = _useScroll.scrollContentWrapper,
|
|
@@ -329,7 +330,7 @@ var virtualGridListDefaultProps = {
|
|
|
329
330
|
* @public
|
|
330
331
|
*/
|
|
331
332
|
var VirtualGridList = exports.VirtualGridList = function VirtualGridList(props) {
|
|
332
|
-
var virtualGridListProps =
|
|
333
|
+
var virtualGridListProps = (0, _util.setDefaultProps)(props, virtualGridListDefaultProps);
|
|
333
334
|
var _useScroll2 = (0, _useScroll3["default"])(virtualGridListProps),
|
|
334
335
|
scrollContentHandle = _useScroll2.scrollContentHandle,
|
|
335
336
|
ScrollContentWrapper = _useScroll2.scrollContentWrapper,
|
|
@@ -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(
|
|
19
|
-
function _objectWithoutProperties(
|
|
20
|
-
function _objectWithoutPropertiesLoose(
|
|
21
|
-
function _toConsumableArray(
|
|
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(
|
|
24
|
-
function _iterableToArray(
|
|
25
|
-
function _arrayWithoutHoles(
|
|
26
|
-
function _arrayLikeToArray(
|
|
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(
|
|
30
|
-
function _classCallCheck(
|
|
31
|
-
function _defineProperties(
|
|
32
|
-
function _createClass(
|
|
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
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
|
|
36
|
-
function
|
|
37
|
-
function
|
|
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(
|
|
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 =
|
|
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
|
|
164
|
-
isPrimaryDirectionVertical =
|
|
165
|
-
primary =
|
|
166
|
-
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
|
-
|
|
223
|
-
dimensionToExtent =
|
|
224
|
-
primary =
|
|
225
|
-
moreInfo =
|
|
226
|
-
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
|
|
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
|
-
|
|
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
|
|
327
|
-
dimensionToExtent =
|
|
328
|
-
primary =
|
|
329
|
-
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
|
|
336
|
-
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
|
-
|
|
345
|
-
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
|
-
|
|
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.
|
|
@@ -441,7 +441,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
441
441
|
this.indexToScrollIntoView = -1;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
if (prevProps.direction !== this.props.direction || prevProps.overhang !== this.props.overhang || prevProps.spacing !== this.props.spacing || !(0, _equals["default"])(prevProps.itemSize, this.props.itemSize)) {
|
|
444
|
+
if (prevProps.direction !== this.props.direction || prevProps.overhang !== this.props.overhang || prevProps.spacing !== this.props.spacing || !(0, _equals["default"])(prevProps.itemSize, this.props.itemSize) || !(0, _util.shallowEqual)(prevProps.itemSizes, this.props.itemSizes)) {
|
|
445
445
|
var _this$getXY = this.getXY(this.scrollPosition, 0),
|
|
446
446
|
x = _this$getXY.x,
|
|
447
447
|
y = _this$getXY.y;
|
|
@@ -1121,7 +1121,6 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
1123
|
}]);
|
|
1124
|
-
return VirtualListBasic;
|
|
1125
1124
|
}(_react.Component);
|
|
1126
1125
|
VirtualListBasic.propTypes = /** @lends ui/VirtualList.VirtualListBasic.prototype */{
|
|
1127
1126
|
/**
|
|
@@ -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(
|
|
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
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(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
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 () {
|
|
@@ -9,13 +9,13 @@ 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(
|
|
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
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(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
-
function asyncGeneratorStep(
|
|
18
|
-
function _asyncToGenerator(
|
|
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
|
+
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); }
|
|
18
|
+
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); }); }; }
|
|
19
19
|
var activate = function activate(list) {
|
|
20
20
|
return _react.fireEvent.keyUp(list, {
|
|
21
21
|
keyCode: 13
|
|
@@ -6,14 +6,14 @@ var _VirtualList = _interopRequireDefault(require("../VirtualList"));
|
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
var _excluded = ["index"],
|
|
8
8
|
_excluded2 = ["index"];
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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(
|
|
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
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(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
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('VirtualList with native scrollMode', function () {
|
|
18
18
|
var clientSize, dataSize, items, itemSize, renderItem;
|
|
19
19
|
beforeEach(function () {
|
|
@@ -6,16 +6,16 @@ var _VirtualList = _interopRequireDefault(require("../VirtualList"));
|
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
var _excluded = ["index"],
|
|
8
8
|
_excluded2 = ["index"];
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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(
|
|
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
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(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
-
function asyncGeneratorStep(
|
|
18
|
-
function _asyncToGenerator(
|
|
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
|
+
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); }
|
|
18
|
+
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); }); }; }
|
|
19
19
|
var activate = function activate(list) {
|
|
20
20
|
return _react.fireEvent.keyUp(list, {
|
|
21
21
|
keyCode: 13
|
|
@@ -13,10 +13,10 @@ Object.defineProperty(exports, "useId", {
|
|
|
13
13
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
14
14
|
var _useId2 = _interopRequireDefault(require("./useId"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
17
|
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; }
|
|
18
18
|
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; }
|
|
19
|
-
function _defineProperty(
|
|
19
|
+
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; }
|
|
20
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
21
21
|
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); } /**
|
|
22
22
|
* Default config for {@link ui/IdProvider.IdProvider}
|