@enact/ui 5.0.0-alpha.1 → 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.
- 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 +35 -4
- package/Cancelable/Cancelable.js +21 -23
- 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 +19 -21
- package/FloatingLayer/FloatingLayerContainer.js +5 -6
- package/FloatingLayer/FloatingLayerDecorator.js +4 -4
- package/FloatingLayer/Scrim.js +17 -19
- package/FloatingLayer/tests/FloatingLayer-specs.js +1 -1
- 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.js +4 -4
- 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 +4 -4
- package/Layout/Layout.js +4 -4
- package/Layout/tests/Layout-specs.js +5 -5
- package/Marquee/MarqueeBase.js +4 -4
- package/Marquee/MarqueeController.js +2 -2
- package/Marquee/MarqueeDecorator.js +26 -28
- 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.js +4 -4
- 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 +21 -23
- 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 +4 -4
- package/Skinnable/tests/Skinnable-specs.js +2 -2
- package/Skinnable/tests/useSkins-specs.js +2 -2
- package/Skinnable/util.js +1 -1
- package/Slider/Knob.js +4 -4
- package/Slider/PositionDecorator.js +24 -26
- package/Slider/Slider.js +4 -4
- 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 +4 -4
- 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 +4 -5
- 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 +1 -1
- 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.js +16 -18
- package/Transition/tests/Transition-specs.js +5 -5
- package/ViewManager/Arranger.js +2 -2
- package/ViewManager/TransitionGroup.js +17 -19
- package/ViewManager/View.js +14 -16
- 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 +47 -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.js +1 -1
- package/resolution/tests/ResolutionDecorator-specs.js +1 -1
- 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
|
@@ -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.
|
|
@@ -387,6 +387,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
387
387
|
}, {
|
|
388
388
|
key: "componentDidUpdate",
|
|
389
389
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
390
|
+
var _prevProps$itemSizes, _this$props$itemSizes;
|
|
390
391
|
var deferScrollTo = false;
|
|
391
392
|
var _this$state = this.state,
|
|
392
393
|
firstIndex = _this$state.firstIndex,
|
|
@@ -441,7 +442,11 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
441
442
|
this.indexToScrollIntoView = -1;
|
|
442
443
|
}
|
|
443
444
|
}
|
|
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)) {
|
|
445
|
+
if (prevProps.direction !== this.props.direction || prevProps.overhang !== this.props.overhang || prevProps.spacing !== this.props.spacing || !(0, _equals["default"])(prevProps.itemSize, this.props.itemSize) || ((_prevProps$itemSizes = prevProps.itemSizes) === null || _prevProps$itemSizes === void 0 ? void 0 : _prevProps$itemSizes.reduce(function (acc, cur) {
|
|
446
|
+
return acc + cur;
|
|
447
|
+
}, 0)) !== ((_this$props$itemSizes = this.props.itemSizes) === null || _this$props$itemSizes === void 0 ? void 0 : _this$props$itemSizes.reduce(function (acc, cur) {
|
|
448
|
+
return acc + cur;
|
|
449
|
+
}, 0))) {
|
|
445
450
|
var _this$getXY = this.getXY(this.scrollPosition, 0),
|
|
446
451
|
x = _this$getXY.x,
|
|
447
452
|
y = _this$getXY.y;
|
|
@@ -1121,7 +1126,6 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
1121
1126
|
});
|
|
1122
1127
|
}
|
|
1123
1128
|
}]);
|
|
1124
|
-
return VirtualListBasic;
|
|
1125
1129
|
}(_react.Component);
|
|
1126
1130
|
VirtualListBasic.propTypes = /** @lends ui/VirtualList.VirtualListBasic.prototype */{
|
|
1127
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(
|
|
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}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.Provider = void 0;
|
|
7
|
-
function _classCallCheck(
|
|
8
|
-
function _defineProperties(
|
|
9
|
-
function _createClass(
|
|
7
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
10
10
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
11
11
|
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); }
|
|
12
12
|
var GlobalId = 0;
|
|
@@ -35,7 +35,7 @@ var Provider = exports.Provider = /*#__PURE__*/function () {
|
|
|
35
35
|
this.prefix = prefix;
|
|
36
36
|
this.ids = {};
|
|
37
37
|
}
|
|
38
|
-
_createClass(Provider, [{
|
|
38
|
+
return _createClass(Provider, [{
|
|
39
39
|
key: "unload",
|
|
40
40
|
value: function unload() {
|
|
41
41
|
// Call the onUnmount handler for each generated id (note: not the key)
|
|
@@ -49,6 +49,5 @@ var Provider = exports.Provider = /*#__PURE__*/function () {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}]);
|
|
52
|
-
return Provider;
|
|
53
52
|
}();
|
|
54
53
|
var _default = exports["default"] = Provider;
|
|
@@ -4,10 +4,10 @@ require("@testing-library/jest-dom");
|
|
|
4
4
|
var _react = require("@testing-library/react");
|
|
5
5
|
var _IdProvider = _interopRequireDefault(require("../IdProvider"));
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
-
function _defineProperty(
|
|
10
|
+
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; }
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
12
|
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); }
|
|
13
13
|
describe('IdProvider', function () {
|
|
@@ -4,10 +4,10 @@ require("@testing-library/jest-dom");
|
|
|
4
4
|
var _react = require("@testing-library/react");
|
|
5
5
|
var _useId = _interopRequireDefault(require("../useId"));
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
-
function _defineProperty(
|
|
10
|
+
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; }
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
12
|
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); }
|
|
13
13
|
describe('useId', function () {
|
|
@@ -7,7 +7,7 @@ exports.useIdProvider = exports["default"] = void 0;
|
|
|
7
7
|
var _useClass = _interopRequireDefault(require("@enact/core/useClass"));
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _Provider = _interopRequireDefault(require("./Provider"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
/**
|
|
12
12
|
* Configuration for `useIdProvider`
|
|
13
13
|
*
|
package/internal/Pure/Pure.js
CHANGED
|
@@ -7,22 +7,22 @@ exports["default"] = exports.Pure = void 0;
|
|
|
7
7
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
13
|
-
function _defineProperty(
|
|
14
|
-
function _classCallCheck(
|
|
15
|
-
function _defineProperties(
|
|
16
|
-
function _createClass(
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
18
18
|
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); }
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
23
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
19
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
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); }
|
|
21
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
24
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
-
function _getPrototypeOf(
|
|
23
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
24
|
+
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); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
26
26
|
* Exports the {@link ui/internal/Pure.Pure} higher-order component (HOC).
|
|
27
27
|
*
|
|
28
28
|
* @module ui/internal/Pure
|
|
@@ -72,16 +72,15 @@ var defaultConfig = {
|
|
|
72
72
|
* @private
|
|
73
73
|
*/
|
|
74
74
|
var Pure = exports.Pure = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
|
|
75
|
-
var
|
|
75
|
+
var _Class;
|
|
76
76
|
var propComparators = config.propComparators;
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
_classCallCheck(this, _class);
|
|
82
|
-
return _super.apply(this, arguments);
|
|
77
|
+
return _Class = /*#__PURE__*/function (_Component) {
|
|
78
|
+
function _Class() {
|
|
79
|
+
_classCallCheck(this, _Class);
|
|
80
|
+
return _callSuper(this, _Class, arguments);
|
|
83
81
|
}
|
|
84
|
-
|
|
82
|
+
_inherits(_Class, _Component);
|
|
83
|
+
return _createClass(_Class, [{
|
|
85
84
|
key: "shouldComponentUpdate",
|
|
86
85
|
value: function shouldComponentUpdate(nextProps) {
|
|
87
86
|
return this.hasChanged(this.props, nextProps, propComparators);
|
|
@@ -112,7 +111,6 @@ var Pure = exports.Pure = (0, _hoc["default"])(defaultConfig, function (config,
|
|
|
112
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, this.props));
|
|
113
112
|
}
|
|
114
113
|
}]);
|
|
115
|
-
|
|
116
|
-
}(_react.Component), _class.displayName = 'Pure', _class.propTypes = {}, _class.defaultProps = {}, _class;
|
|
114
|
+
}(_react.Component), _Class.displayName = 'Pure', _Class.propTypes = {}, _Class.defaultProps = {}, _Class;
|
|
117
115
|
});
|
|
118
116
|
var _default = exports["default"] = Pure;
|
|
@@ -6,22 +6,22 @@ var _react2 = require("react");
|
|
|
6
6
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
7
|
var _Pure = _interopRequireDefault(require("../Pure"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
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(
|
|
13
|
-
function _classCallCheck(
|
|
14
|
-
function _defineProperties(
|
|
15
|
-
function _createClass(
|
|
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 _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
|
var defaultConfig = {
|
|
26
26
|
propComparators: {
|
|
27
27
|
'*': function _(a, b) {
|
|
@@ -31,16 +31,15 @@ var defaultConfig = {
|
|
|
31
31
|
};
|
|
32
32
|
var data = [];
|
|
33
33
|
var Base = /*#__PURE__*/function (_Component) {
|
|
34
|
-
_inherits(Base, _Component);
|
|
35
|
-
var _super = _createSuper(Base);
|
|
36
34
|
function Base(props) {
|
|
37
35
|
var _this;
|
|
38
36
|
_classCallCheck(this, Base);
|
|
39
|
-
_this =
|
|
37
|
+
_this = _callSuper(this, Base, [props]);
|
|
40
38
|
_this.countRenders = 0;
|
|
41
39
|
return _this;
|
|
42
40
|
}
|
|
43
|
-
|
|
41
|
+
_inherits(Base, _Component);
|
|
42
|
+
return _createClass(Base, [{
|
|
44
43
|
key: "render",
|
|
45
44
|
value: function render() {
|
|
46
45
|
data = this.props;
|
|
@@ -52,7 +51,6 @@ var Base = /*#__PURE__*/function (_Component) {
|
|
|
52
51
|
}));
|
|
53
52
|
}
|
|
54
53
|
}]);
|
|
55
|
-
return Base;
|
|
56
54
|
}(_react2.Component);
|
|
57
55
|
Base.propTypes = {
|
|
58
56
|
value: _propTypes["default"].number
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _slicedToArray(
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(
|
|
6
|
-
function _arrayLikeToArray(
|
|
5
|
+
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; } }
|
|
6
|
+
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; }
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
-
function _arrayWithHoles(
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
9
|
var fontMap = {};
|
|
10
10
|
var currentLocale = null;
|
|
11
11
|
|