@enact/ui 4.7.8 → 4.7.10
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 +6 -8
- package/AnnounceDecorator/AnnounceDecorator.js +6 -8
- package/AnnounceDecorator/useAnnounce.js +1 -2
- package/BodyText/BodyText.js +8 -12
- package/BodyText/tests/BodyText-specs.js +2 -2
- package/Button/Button.js +22 -26
- package/CHANGELOG.md +20 -0
- package/Cancelable/Cancelable.js +18 -20
- package/Cancelable/cancelHandler.js +4 -7
- package/Cancelable/modalHandler.js +3 -5
- package/Cancelable/tests/Cancelable-specs.js +4 -4
- package/Changeable/Changeable.js +18 -20
- package/ComponentOverride/ComponentOverride.js +7 -9
- package/FloatingLayer/FloatingLayer.js +16 -19
- package/FloatingLayer/FloatingLayerContainer.js +4 -6
- package/FloatingLayer/FloatingLayerDecorator.js +6 -8
- package/FloatingLayer/Scrim.js +6 -8
- package/FloatingLayer/index.js +1 -2
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +4 -4
- package/FloatingLayer/useFloatingLayer.js +2 -3
- package/FloatingLayer/useFloatingLayerDecorator.js +2 -4
- package/ForwardRef/ForwardRef.js +16 -18
- package/GridListImageItem/GridListImageItem.js +6 -8
- package/Group/Group.js +8 -12
- package/Group/GroupItem.js +21 -25
- package/Group/tests/Group-specs.js +2 -2
- package/Heading/Heading.js +27 -31
- package/Icon/Icon.js +8 -12
- package/Icon/tests/Icon-specs.js +2 -2
- package/IconButton/IconButton.js +8 -12
- package/Image/Image.js +8 -12
- package/Image/tests/Image-specs.js +2 -2
- package/ImageItem/ImageItem.js +8 -12
- package/ImageItem/tests/ImageItem-specs.js +6 -6
- package/Item/Item.js +8 -12
- package/LabeledIcon/LabeledIcon.js +8 -12
- package/Layout/Cell.js +9 -14
- package/Layout/Layout.js +162 -168
- package/Layout/tests/Layout-specs.js +7 -7
- package/Marquee/MarqueeBase.js +6 -8
- package/Marquee/MarqueeController.js +7 -11
- package/Marquee/MarqueeDecorator.js +6 -8
- package/Marquee/index.js +2 -4
- package/Marquee/tests/Marquee-specs.js +4 -19
- package/Measurable/Measurable.js +20 -25
- package/Measurable/tests/Measurable-specs.js +6 -6
- package/Media/Media.js +37 -41
- package/Placeholder/PlaceholderControllerDecorator.js +13 -16
- package/Placeholder/PlaceholderDecorator.js +12 -14
- package/Placeholder/index.js +1 -2
- package/ProgressBar/ProgressBar.js +20 -25
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +7 -10
- package/RadioDecorator/RadioDecorator.js +18 -20
- package/Repeater/Repeater.js +20 -23
- package/Repeater/tests/Repeater-specs.js +6 -6
- package/Resizable/Resizable.js +16 -18
- package/Resizable/ResizeContext.js +1 -2
- package/Resizable/tests/Resizable-specs.js +2 -2
- package/Resizable/tests/useResize-specs.js +4 -4
- package/Resizable/useResize.js +4 -4
- package/Routable/Link.js +8 -12
- package/Routable/Routable.js +20 -22
- package/Routable/Route.js +2 -4
- package/Routable/Router.js +8 -11
- package/Routable/tests/Routable-specs.js +5 -5
- package/Routable/useLink.js +1 -2
- package/Routable/util.js +7 -12
- package/Scrollable/ScrollAnimator.js +4 -6
- package/Scrollable/ScrollThumb.js +13 -15
- package/Scrollable/Scrollable.js +18 -22
- package/Scrollable/ScrollableNative.js +10 -15
- package/Scrollable/Scrollbar.js +7 -10
- package/Scroller/Scroller.js +13 -15
- package/Scroller/ScrollerBasic.js +13 -15
- package/Scroller/UiScrollerBase.js +16 -18
- package/Skinnable/Skinnable.js +6 -8
- package/Skinnable/tests/Skinnable-specs.js +4 -4
- package/Skinnable/tests/useSkins-specs.js +4 -4
- package/Skinnable/useSkins.js +1 -2
- package/Skinnable/util.js +2 -4
- package/Slider/Knob.js +6 -8
- package/Slider/PositionDecorator.js +6 -8
- package/Slider/Slider.js +24 -27
- package/Slider/utils.js +2 -3
- package/SlotItem/SlotItem.js +8 -12
- package/Slottable/Slottable.js +19 -21
- package/Slottable/useSlots.js +5 -6
- package/Spinner/Spinner.js +8 -12
- package/ToggleIcon/ToggleIcon.js +8 -12
- package/ToggleItem/ToggleItem.js +8 -12
- package/ToggleItem/tests/ToggleItem-specs.js +6 -6
- package/Toggleable/Toggle.js +6 -8
- package/Toggleable/Toggleable.js +19 -22
- package/Toggleable/useToggle.js +2 -2
- package/Touchable/ClickAllow.js +4 -6
- package/Touchable/Drag.js +8 -12
- package/Touchable/Flick.js +8 -12
- package/Touchable/Hold.js +8 -12
- package/Touchable/Pinch.js +8 -12
- package/Touchable/Touch.js +4 -6
- package/Touchable/Touchable.js +6 -8
- package/Touchable/config.js +9 -14
- package/Touchable/state.js +2 -3
- package/Touchable/tests/useTouch-specs.js +4 -4
- package/Touchable/useTouch.js +7 -7
- package/Transition/Transition.js +23 -26
- package/Transition/tests/Transition-specs.js +7 -7
- package/ViewManager/Arranger.js +15 -22
- package/ViewManager/TransitionGroup.js +8 -9
- package/ViewManager/View.js +9 -12
- package/ViewManager/ViewManager.js +10 -14
- package/ViewManager/tests/ViewManager-specs.js +2 -3
- package/ViewManager/tests/test-utils.js +2 -3
- package/VirtualList/UiVirtualListBase.js +7 -10
- package/VirtualList/VirtualList.js +17 -20
- package/VirtualList/VirtualListBase.js +1 -2
- package/VirtualList/VirtualListBasic.js +8 -12
- package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualGridList-specs.js +4 -4
- package/VirtualList/tests/VirtualList-native-specs.js +4 -4
- package/VirtualList/tests/VirtualList-specs.js +4 -4
- package/internal/IdProvider/IdProvider.js +11 -13
- package/internal/IdProvider/Provider.js +4 -6
- package/internal/IdProvider/tests/IdProvider-specs.js +4 -4
- package/internal/IdProvider/tests/useId-specs.js +4 -4
- package/internal/IdProvider/useId.js +3 -4
- package/internal/Pure/Pure.js +16 -18
- package/internal/Pure/tests/Pure-specs.js +4 -4
- package/internal/localized-fonts/localized-fonts.js +1 -1
- package/internal/localized-fonts/tests/localized-fonts-specs.js +0 -1
- package/internal/selection/selection.js +3 -5
- package/internal/validators/validators.js +6 -11
- package/package.json +3 -3
- package/resolution/ResolutionDecorator.js +15 -17
- package/resolution/index.js +3 -4
- package/resolution/resolution.js +2 -5
- package/useControlledState/tests/useControlledState-specs.js +1 -1
- package/useControlledState/useControlledState.js +2 -3
- package/useScroll/ScrollAnimator.js +4 -6
- package/useScroll/Scrollbar.js +7 -10
- package/useScroll/ScrollbarTrack.js +6 -8
- package/useScroll/useScroll.js +10 -17
- package/useScroll/utilDOM.js +2 -4
- package/useScroll/utilEvent.js +2 -4
package/ViewManager/Arranger.js
CHANGED
|
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.shape = exports.arrange = exports.SlideTopArranger = exports.SlideRightArranger = exports.SlideLeftArranger = exports.SlideBottomArranger = exports.SlideArranger = void 0;
|
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function ownKeys(
|
|
10
|
-
function _objectSpread(
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
13
|
+
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); } /*
|
|
14
|
+
* Exports a number of pre-defined arrangers for use with {@link ui/ViewManager}.
|
|
15
|
+
* note: not jsdoc on purpose
|
|
16
|
+
*/
|
|
17
17
|
var slideInOut = function slideInOut(direction, total, orientation) {
|
|
18
18
|
var p = direction === 'out' ? total : -total;
|
|
19
19
|
return orientation === 'top' && 'translateY(' + -p + '%)' || orientation === 'bottom' && 'translateY(' + p + '%)' || orientation === 'left' && 'translateX(' + -p + '%)' || orientation === 'right' && 'translateX(' + p + '%)';
|
|
20
20
|
};
|
|
21
|
-
var arrange = function arrange(_ref, keyframes, options) {
|
|
21
|
+
var arrange = exports.arrange = function arrange(_ref, keyframes, options) {
|
|
22
22
|
var duration = _ref.duration,
|
|
23
23
|
node = _ref.node,
|
|
24
24
|
reverse = _ref.reverse;
|
|
@@ -83,8 +83,7 @@ var arrange = function arrange(_ref, keyframes, options) {
|
|
|
83
83
|
* @returns {Arranger} An arranger
|
|
84
84
|
* @public
|
|
85
85
|
*/
|
|
86
|
-
exports.
|
|
87
|
-
var SlideArranger = function SlideArranger(_ref2) {
|
|
86
|
+
var SlideArranger = exports.SlideArranger = function SlideArranger(_ref2) {
|
|
88
87
|
var _ref2$amount = _ref2.amount,
|
|
89
88
|
amount = _ref2$amount === void 0 ? 100 : _ref2$amount,
|
|
90
89
|
direction = _ref2.direction;
|
|
@@ -120,8 +119,7 @@ var SlideArranger = function SlideArranger(_ref2) {
|
|
|
120
119
|
* @memberof ui/ViewManager
|
|
121
120
|
* @public
|
|
122
121
|
*/
|
|
123
|
-
exports.
|
|
124
|
-
var SlideRightArranger = SlideArranger({
|
|
122
|
+
var SlideRightArranger = exports.SlideRightArranger = SlideArranger({
|
|
125
123
|
direction: 'right'
|
|
126
124
|
});
|
|
127
125
|
|
|
@@ -132,8 +130,7 @@ var SlideRightArranger = SlideArranger({
|
|
|
132
130
|
* @memberof ui/ViewManager
|
|
133
131
|
* @public
|
|
134
132
|
*/
|
|
135
|
-
exports.
|
|
136
|
-
var SlideLeftArranger = SlideArranger({
|
|
133
|
+
var SlideLeftArranger = exports.SlideLeftArranger = SlideArranger({
|
|
137
134
|
direction: 'left'
|
|
138
135
|
});
|
|
139
136
|
|
|
@@ -144,8 +141,7 @@ var SlideLeftArranger = SlideArranger({
|
|
|
144
141
|
* @memberof ui/ViewManager
|
|
145
142
|
* @public
|
|
146
143
|
*/
|
|
147
|
-
exports.
|
|
148
|
-
var SlideTopArranger = SlideArranger({
|
|
144
|
+
var SlideTopArranger = exports.SlideTopArranger = SlideArranger({
|
|
149
145
|
direction: 'top'
|
|
150
146
|
});
|
|
151
147
|
|
|
@@ -156,8 +152,7 @@ var SlideTopArranger = SlideArranger({
|
|
|
156
152
|
* @memberof ui/ViewManager
|
|
157
153
|
* @public
|
|
158
154
|
*/
|
|
159
|
-
exports.
|
|
160
|
-
var SlideBottomArranger = SlideArranger({
|
|
155
|
+
var SlideBottomArranger = exports.SlideBottomArranger = SlideArranger({
|
|
161
156
|
direction: 'bottom'
|
|
162
157
|
});
|
|
163
158
|
|
|
@@ -166,9 +161,7 @@ var SlideBottomArranger = SlideArranger({
|
|
|
166
161
|
* @memberof ui/ViewManager
|
|
167
162
|
* @private
|
|
168
163
|
*/
|
|
169
|
-
exports.
|
|
170
|
-
var shape = _propTypes["default"].shape({
|
|
164
|
+
var shape = exports.shape = _propTypes["default"].shape({
|
|
171
165
|
enter: _propTypes["default"].func,
|
|
172
166
|
leave: _propTypes["default"].func
|
|
173
|
-
});
|
|
174
|
-
exports.shape = shape;
|
|
167
|
+
});
|
|
@@ -20,8 +20,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
20
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
21
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
22
22
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
-
function _toPropertyKey(
|
|
24
|
-
function _toPrimitive(
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
24
|
+
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); }
|
|
25
25
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
26
26
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -29,8 +29,8 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
|
|
|
29
29
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
31
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
* Exports the {@link ui/ViewManager.TransitionGroup} component.
|
|
33
|
+
*/ // Using string refs from the source code of ReactTransitionGroup
|
|
34
34
|
/**
|
|
35
35
|
* Returns the index of a child in an array found by `key` matching
|
|
36
36
|
*
|
|
@@ -39,7 +39,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
39
39
|
* @returns {Number} Index of child
|
|
40
40
|
* @method
|
|
41
41
|
* @private
|
|
42
|
-
*/
|
|
42
|
+
*/
|
|
43
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
43
44
|
var indexOfChild = (0, _useWith["default"])(_findIndex["default"], [(0, _propEq["default"])('key'), _identity["default"]]);
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -86,7 +87,7 @@ var forwardOnStay = (0, _handle.forward)('onStay');
|
|
|
86
87
|
* @memberof ui/ViewManager
|
|
87
88
|
* @private
|
|
88
89
|
*/
|
|
89
|
-
var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
90
|
+
var TransitionGroup = exports.TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
90
91
|
_inherits(TransitionGroup, _Component);
|
|
91
92
|
var _super = _createSuper(TransitionGroup);
|
|
92
93
|
function TransitionGroup(props) {
|
|
@@ -387,7 +388,6 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
387
388
|
}]);
|
|
388
389
|
return TransitionGroup;
|
|
389
390
|
}(_react.Component);
|
|
390
|
-
exports.TransitionGroup = TransitionGroup;
|
|
391
391
|
TransitionGroup.propTypes = /** @lends ui/ViewManager.TransitionGroup.prototype */{
|
|
392
392
|
children: _propTypes2["default"].node.isRequired,
|
|
393
393
|
/**
|
|
@@ -472,5 +472,4 @@ TransitionGroup.defaultProps = {
|
|
|
472
472
|
component: 'div',
|
|
473
473
|
size: 2
|
|
474
474
|
};
|
|
475
|
-
var _default = TransitionGroup;
|
|
476
|
-
exports["default"] = _default;
|
|
475
|
+
var _default = exports["default"] = TransitionGroup;
|
package/ViewManager/View.js
CHANGED
|
@@ -11,14 +11,14 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
11
11
|
var _Arranger = require("./Arranger");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
function ownKeys(
|
|
15
|
-
function _objectSpread(
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
16
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
17
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
18
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
19
19
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
-
function _toPropertyKey(
|
|
21
|
-
function _toPrimitive(
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23
23
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -26,8 +26,8 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
|
|
|
26
26
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
27
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
28
28
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /*
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* Exports the {@link ui/ViewManager.View} component.
|
|
30
|
+
*/ // If the View was "appearing", then entering will always be false and this will not result in a
|
|
31
31
|
// re-render. If the view should enter, state.enter will be true and this will toggle it to false
|
|
32
32
|
// causing a re-render.
|
|
33
33
|
var clearEntering = function clearEntering(_ref) {
|
|
@@ -45,7 +45,7 @@ var clearEntering = function clearEntering(_ref) {
|
|
|
45
45
|
* @memberof ui/ViewManager
|
|
46
46
|
* @private
|
|
47
47
|
*/
|
|
48
|
-
var View = /*#__PURE__*/function (_Component) {
|
|
48
|
+
var View = exports.View = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(View, _Component);
|
|
50
50
|
var _super = _createSuper(View);
|
|
51
51
|
function View(props) {
|
|
@@ -247,7 +247,6 @@ var View = /*#__PURE__*/function (_Component) {
|
|
|
247
247
|
// with a TransitionGroup-compatible child that supports animation
|
|
248
248
|
//
|
|
249
249
|
// eslint-disable-next-line enact/display-name
|
|
250
|
-
exports.View = View;
|
|
251
250
|
View.propTypes = /** @lends ui/ViewManager.View.prototype */{
|
|
252
251
|
children: _propTypes["default"].node.isRequired,
|
|
253
252
|
/**
|
|
@@ -349,13 +348,11 @@ View.defaultProps = {
|
|
|
349
348
|
index: 0,
|
|
350
349
|
reverseTransition: false
|
|
351
350
|
};
|
|
352
|
-
var wrapWithView = function wrapWithView(config) {
|
|
351
|
+
var wrapWithView = exports.wrapWithView = function wrapWithView(config) {
|
|
353
352
|
return function (child) {
|
|
354
353
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, _objectSpread(_objectSpread({}, config), {}, {
|
|
355
354
|
children: child
|
|
356
355
|
}));
|
|
357
356
|
};
|
|
358
357
|
};
|
|
359
|
-
exports
|
|
360
|
-
var _default = View;
|
|
361
|
-
exports["default"] = _default;
|
|
358
|
+
var _default = exports["default"] = View;
|
|
@@ -54,19 +54,19 @@ var _class;
|
|
|
54
54
|
* @ui
|
|
55
55
|
* @public
|
|
56
56
|
*/
|
|
57
|
-
function _getRequireWildcardCache(
|
|
58
|
-
function _interopRequireWildcard(
|
|
57
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
58
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
59
59
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
60
|
-
function ownKeys(
|
|
61
|
-
function _objectSpread(
|
|
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
|
+
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
62
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
63
63
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
64
64
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
65
65
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
66
66
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
67
67
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
68
|
-
function _toPropertyKey(
|
|
69
|
-
function _toPrimitive(
|
|
68
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
70
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
71
71
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
72
72
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -74,7 +74,7 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
|
|
|
74
74
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
75
75
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
76
76
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
|
-
var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
|
|
77
|
+
var ViewManagerBase = exports.ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
|
|
78
78
|
_inherits(ViewManagerBase, _Component);
|
|
79
79
|
var _super = _createSuper(ViewManagerBase);
|
|
80
80
|
function ViewManagerBase(props) {
|
|
@@ -332,8 +332,7 @@ var ViewManagerBase = (_class = /*#__PURE__*/function (_Component) {
|
|
|
332
332
|
* @mixes ui/ForwardRef.ForwardRef
|
|
333
333
|
* @public
|
|
334
334
|
*/
|
|
335
|
-
exports.
|
|
336
|
-
var ViewManagerDecorator = (0, _ForwardRef["default"])({
|
|
335
|
+
var ViewManagerDecorator = exports.ViewManagerDecorator = (0, _ForwardRef["default"])({
|
|
337
336
|
prop: 'componentRef'
|
|
338
337
|
});
|
|
339
338
|
|
|
@@ -349,8 +348,5 @@ var ViewManagerDecorator = (0, _ForwardRef["default"])({
|
|
|
349
348
|
* @ui
|
|
350
349
|
* @public
|
|
351
350
|
*/
|
|
352
|
-
exports.
|
|
353
|
-
var
|
|
354
|
-
exports.ViewManager = ViewManager;
|
|
355
|
-
var _default = ViewManager;
|
|
356
|
-
exports["default"] = _default;
|
|
351
|
+
var ViewManager = exports.ViewManager = ViewManagerDecorator(ViewManagerBase);
|
|
352
|
+
var _default = exports["default"] = ViewManager;
|
|
@@ -13,8 +13,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
18
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
19
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -421,7 +421,6 @@ describe('ViewManager', function () {
|
|
|
421
421
|
// const actual = subject.find('View').at(0).props().reverseTransition;
|
|
422
422
|
// expect(actual).toBeFalsy();
|
|
423
423
|
});
|
|
424
|
-
|
|
425
424
|
test('should update the view when children are reordered', function () {
|
|
426
425
|
var _render9 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_["default"], {
|
|
427
426
|
index: 1,
|
|
@@ -22,7 +22,7 @@ function MockAnimation(duration) {
|
|
|
22
22
|
};
|
|
23
23
|
setTimeout(this.finish, duration);
|
|
24
24
|
}
|
|
25
|
-
var MockArranger = {
|
|
25
|
+
var MockArranger = exports.MockArranger = {
|
|
26
26
|
enter: function enter(_ref) {
|
|
27
27
|
var duration = _ref.duration;
|
|
28
28
|
return new MockAnimation(duration);
|
|
@@ -35,5 +35,4 @@ var MockArranger = {
|
|
|
35
35
|
var duration = _ref3.duration;
|
|
36
36
|
return new MockAnimation(duration);
|
|
37
37
|
}
|
|
38
|
-
};
|
|
39
|
-
exports.MockArranger = MockArranger;
|
|
38
|
+
};
|
|
@@ -23,14 +23,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
23
23
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24
24
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
25
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
|
-
function ownKeys(
|
|
27
|
-
function _objectSpread(
|
|
26
|
+
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; }
|
|
27
|
+
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; }
|
|
28
28
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
29
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
31
31
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
32
|
-
function _toPropertyKey(
|
|
33
|
-
function _toPrimitive(
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
33
|
+
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); }
|
|
34
34
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
35
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -1239,8 +1239,7 @@ var VirtualListBaseFactory = function VirtualListBaseFactory(type) {
|
|
|
1239
1239
|
* @public
|
|
1240
1240
|
* @deprecated Will be removed in 5.0.0.
|
|
1241
1241
|
*/
|
|
1242
|
-
var VirtualListBase = VirtualListBaseFactory(JS);
|
|
1243
|
-
exports.UiVirtualListBase = VirtualListBase;
|
|
1242
|
+
var VirtualListBase = exports.UiVirtualListBase = VirtualListBaseFactory(JS);
|
|
1244
1243
|
VirtualListBase.displayName = 'ui:VirtualListBase';
|
|
1245
1244
|
|
|
1246
1245
|
/**
|
|
@@ -1252,8 +1251,7 @@ VirtualListBase.displayName = 'ui:VirtualListBase';
|
|
|
1252
1251
|
* @ui
|
|
1253
1252
|
* @private
|
|
1254
1253
|
*/
|
|
1255
|
-
var VirtualListBaseNative = VirtualListBaseFactory(Native);
|
|
1256
|
-
exports.UiVirtualListBaseNative = VirtualListBaseNative;
|
|
1254
|
+
var VirtualListBaseNative = exports.UiVirtualListBaseNative = VirtualListBaseFactory(Native);
|
|
1257
1255
|
VirtualListBaseNative.displayName = 'ui:VirtualListBaseNative';
|
|
1258
1256
|
|
|
1259
1257
|
/**
|
|
@@ -1409,5 +1407,4 @@ VirtualListBaseNative.displayName = 'ui:VirtualListBaseNative';
|
|
|
1409
1407
|
* @default 'auto'
|
|
1410
1408
|
* @public
|
|
1411
1409
|
*/
|
|
1412
|
-
var _default = VirtualListBase;
|
|
1413
|
-
exports["default"] = _default;
|
|
1410
|
+
var _default = exports["default"] = VirtualListBase;
|
|
@@ -43,21 +43,21 @@ var _UiVirtualListBase = require("./UiVirtualListBase");
|
|
|
43
43
|
var _VirtualListBasic = require("./VirtualListBasic");
|
|
44
44
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
45
45
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
46
|
-
function ownKeys(
|
|
47
|
-
function _objectSpread(
|
|
46
|
+
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; }
|
|
47
|
+
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; }
|
|
48
48
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
49
|
-
function _toPropertyKey(
|
|
50
|
-
function _toPrimitive(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
50
|
+
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); } /**
|
|
51
|
+
* Unstyled virtual list components and behaviors to be customized by a theme or application.
|
|
52
|
+
*
|
|
53
|
+
* @module ui/VirtualList
|
|
54
|
+
* @exports gridListImageSizeShape
|
|
55
|
+
* @exports itemSizesShape
|
|
56
|
+
* @exports VirtualGridList
|
|
57
|
+
* @exports VirtualList
|
|
58
|
+
* @exports VirtualListBase
|
|
59
|
+
* @exports VirtualListBasic
|
|
60
|
+
*/
|
|
61
61
|
var nop = function nop() {};
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -69,7 +69,7 @@ var nop = function nop() {};
|
|
|
69
69
|
* @ui
|
|
70
70
|
* @public
|
|
71
71
|
*/
|
|
72
|
-
var VirtualList = function VirtualList(props) {
|
|
72
|
+
var VirtualList = exports.VirtualList = function VirtualList(props) {
|
|
73
73
|
// Hooks
|
|
74
74
|
|
|
75
75
|
var _useScroll = (0, _useScroll3["default"])(props),
|
|
@@ -99,7 +99,6 @@ var VirtualList = function VirtualList(props) {
|
|
|
99
99
|
}))
|
|
100
100
|
}));
|
|
101
101
|
};
|
|
102
|
-
exports.VirtualList = VirtualList;
|
|
103
102
|
VirtualList.displayName = 'ui:VirtualList';
|
|
104
103
|
VirtualList.propTypes = /** @lends ui/VirtualList.VirtualList.prototype */{
|
|
105
104
|
/**
|
|
@@ -323,7 +322,7 @@ VirtualList.defaultProps = {
|
|
|
323
322
|
* @ui
|
|
324
323
|
* @public
|
|
325
324
|
*/
|
|
326
|
-
var VirtualGridList = function VirtualGridList(props) {
|
|
325
|
+
var VirtualGridList = exports.VirtualGridList = function VirtualGridList(props) {
|
|
327
326
|
var _useScroll2 = (0, _useScroll3["default"])(props),
|
|
328
327
|
scrollContentHandle = _useScroll2.scrollContentHandle,
|
|
329
328
|
ScrollContentWrapper = _useScroll2.scrollContentWrapper,
|
|
@@ -348,7 +347,6 @@ var VirtualGridList = function VirtualGridList(props) {
|
|
|
348
347
|
}))
|
|
349
348
|
}));
|
|
350
349
|
};
|
|
351
|
-
exports.VirtualGridList = VirtualGridList;
|
|
352
350
|
VirtualGridList.displayName = 'ui:VirtualGridList';
|
|
353
351
|
VirtualGridList.propTypes = /** @lends ui/VirtualList.VirtualGridList.prototype */{
|
|
354
352
|
/**
|
|
@@ -562,5 +560,4 @@ VirtualGridList.defaultProps = {
|
|
|
562
560
|
scrollMode: 'translate',
|
|
563
561
|
verticalScrollbar: 'auto'
|
|
564
562
|
};
|
|
565
|
-
var _default = VirtualList;
|
|
566
|
-
exports["default"] = _default;
|
|
563
|
+
var _default = exports["default"] = VirtualList;
|
|
@@ -30,5 +30,4 @@ Object.defineProperty(exports, "itemSizesShape", {
|
|
|
30
30
|
});
|
|
31
31
|
var _UiVirtualListBase = require("./UiVirtualListBase");
|
|
32
32
|
var _VirtualListBasic = require("./VirtualListBasic");
|
|
33
|
-
var _default = _UiVirtualListBase.UiVirtualListBase;
|
|
34
|
-
exports["default"] = _default;
|
|
33
|
+
var _default = exports["default"] = _UiVirtualListBase.UiVirtualListBase;
|
|
@@ -24,14 +24,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
24
24
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
25
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
26
26
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
27
|
-
function ownKeys(
|
|
28
|
-
function _objectSpread(
|
|
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
|
+
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
29
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
30
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
31
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
32
32
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
|
-
function _toPropertyKey(
|
|
34
|
-
function _toPrimitive(
|
|
33
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
35
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
36
36
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
37
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -51,7 +51,7 @@ var nop = function nop() {};
|
|
|
51
51
|
* @property {Number} minHeight The minimum height of the grid list item.
|
|
52
52
|
* @public
|
|
53
53
|
*/
|
|
54
|
-
var gridListItemSizeShape = _propTypes2["default"].shape({
|
|
54
|
+
var gridListItemSizeShape = exports.gridListItemSizeShape = _propTypes2["default"].shape({
|
|
55
55
|
minHeight: _propTypes2["default"].number.isRequired,
|
|
56
56
|
minWidth: _propTypes2["default"].number.isRequired
|
|
57
57
|
});
|
|
@@ -66,8 +66,7 @@ var gridListItemSizeShape = _propTypes2["default"].shape({
|
|
|
66
66
|
* @property {Number[]} size An array of the list item size. If it is not defined, the list items will render with the `minSize` size.
|
|
67
67
|
* @public
|
|
68
68
|
*/
|
|
69
|
-
exports.
|
|
70
|
-
var itemSizesShape = _propTypes2["default"].shape({
|
|
69
|
+
var itemSizesShape = exports.itemSizesShape = _propTypes2["default"].shape({
|
|
71
70
|
minSize: _propTypes2["default"].number.isRequired,
|
|
72
71
|
size: _propTypes2["default"].arrayOf(_propTypes2["default"].number)
|
|
73
72
|
});
|
|
@@ -81,8 +80,7 @@ var itemSizesShape = _propTypes2["default"].shape({
|
|
|
81
80
|
* @ui
|
|
82
81
|
* @public
|
|
83
82
|
*/
|
|
84
|
-
exports.
|
|
85
|
-
var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
83
|
+
var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
86
84
|
_inherits(VirtualListBasic, _Component);
|
|
87
85
|
var _super = _createSuper(VirtualListBasic);
|
|
88
86
|
function VirtualListBasic(_props) {
|
|
@@ -1115,7 +1113,6 @@ var VirtualListBasic = /*#__PURE__*/function (_Component) {
|
|
|
1115
1113
|
}]);
|
|
1116
1114
|
return VirtualListBasic;
|
|
1117
1115
|
}(_react.Component);
|
|
1118
|
-
exports.VirtualListBasic = VirtualListBasic;
|
|
1119
1116
|
VirtualListBasic.propTypes = /** @lends ui/VirtualList.VirtualListBasic.prototype */{
|
|
1120
1117
|
/**
|
|
1121
1118
|
* The rendering function called for each item in the list.
|
|
@@ -1330,5 +1327,4 @@ VirtualListBasic.defaultProps = {
|
|
|
1330
1327
|
scrollMode: 'translate',
|
|
1331
1328
|
spacing: 0
|
|
1332
1329
|
};
|
|
1333
|
-
var _default = VirtualListBasic;
|
|
1334
|
-
exports["default"] = _default;
|
|
1330
|
+
var _default = exports["default"] = VirtualListBasic;
|
|
@@ -7,11 +7,11 @@ var _ImageItem = require("../../ImageItem");
|
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
var _excluded = ["index"],
|
|
9
9
|
_excluded2 = ["index"];
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
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
|
+
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
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
describe('VirtualGridList with native scrollMode', function () {
|