@enact/ui 4.5.0-alpha.1 → 4.5.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnnounceDecorator/Announce.js +2 -2
- package/AnnounceDecorator/tests/useAnnounce-specs.js +7 -5
- package/CHANGELOG.md +28 -4
- package/Cancelable/Cancelable.js +2 -2
- package/Changeable/Changeable.js +2 -2
- package/FloatingLayer/FloatingLayer.js +21 -4
- package/FloatingLayer/Scrim.js +2 -2
- package/FloatingLayer/tests/FloatingLayer-specs.js +5 -2
- package/GridListImageItem/GridListImageItem.js +1 -1
- package/Marquee/MarqueeController.js +2 -2
- package/Marquee/MarqueeDecorator.js +37 -5
- package/Marquee/index.d.ts +12 -0
- package/Media/Media.js +2 -2
- package/Placeholder/PlaceholderControllerDecorator.js +2 -2
- package/Placeholder/PlaceholderDecorator.js +2 -2
- package/RadioDecorator/RadioControllerDecorator.js +2 -2
- package/RadioDecorator/RadioDecorator.js +2 -2
- package/Resizable/Resizable.js +2 -2
- package/Routable/Link.js +2 -2
- package/Routable/Router.js +2 -2
- package/Scrollable/Scrollable.js +2 -2
- package/Scrollable/ScrollableNative.js +2 -2
- package/Scrollable/Scrollbar.js +2 -2
- package/Scroller/ScrollerBasic.js +2 -2
- package/Scroller/UiScrollerBase.js +2 -2
- package/Skinnable/tests/Skinnable-specs.js +24 -13
- package/Slider/PositionDecorator.js +2 -2
- package/Touchable/tests/Touchable-specs.js +17 -13
- package/Transition/Transition.js +2 -2
- package/Transition/tests/Transition-specs.js +2 -2
- package/ViewManager/TransitionGroup.js +2 -2
- package/ViewManager/View.js +2 -2
- package/ViewManager/ViewManager.js +2 -2
- package/ViewManager/tests/ViewManager-specs.js +5 -3
- package/VirtualList/UiVirtualListBase.js +2 -2
- package/VirtualList/VirtualListBasic.js +2 -2
- package/internal/Pure/Pure.js +2 -2
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +2 -2
- package/useScroll/useScroll.js +14 -14
|
@@ -29,7 +29,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
34
|
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); }; }
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* An unstyled component with an imperative API to alert the user.
|
|
@@ -50,16 +50,18 @@ describe('useAnnounce', function () {
|
|
|
50
50
|
|
|
51
51
|
test.skip('should set the value passed to announce into the ARIA role="alert" node', function () {
|
|
52
52
|
var text = '__NOTIFY__';
|
|
53
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
54
|
+
"data-testid": "announce-test"
|
|
55
|
+
}));
|
|
53
56
|
|
|
54
|
-
var
|
|
55
|
-
container = _render.container;
|
|
57
|
+
var component = _react.screen.getByTestId('announce-test');
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
component.find(Base).invoke('announce')(text);
|
|
60
|
+
component.update();
|
|
59
61
|
var expected = text; // Have to get the actual DOM node here since Announce updates the DOM directly so the
|
|
60
62
|
// change isn't represented in either the React or Enzyme views
|
|
61
63
|
|
|
62
|
-
var actual =
|
|
64
|
+
var actual = component.find({
|
|
63
65
|
role: 'alert'
|
|
64
66
|
}).instance().getAttribute('aria-label');
|
|
65
67
|
expect(actual).toBe(expected);
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact ui module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [4.5.0-rc.1] - 2022-06-23
|
|
6
|
+
|
|
7
|
+
No significant changes.
|
|
8
|
+
|
|
9
|
+
## [4.5.0-beta.1] - 2022-05-31
|
|
10
|
+
|
|
11
|
+
### Deprecated
|
|
12
|
+
|
|
13
|
+
- `ui/GridListImageItem`, to be removed in 5.0.0. Use `ui/ImageItem` instead
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `ui/FloatingLayer` to add `detail` property containing `inputType` in `onDismiss` event payload
|
|
18
|
+
|
|
19
|
+
## [4.5.0-alpha.2] - 2022-05-09
|
|
20
|
+
|
|
21
|
+
### Deprecated
|
|
22
|
+
|
|
23
|
+
- `ui/Marquee.MarqueeDecorator` config `className` to be removed in 5.0.0
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- `ui/Marquee.MarqueeDecorator` config `css` to support customizing the marquee styles
|
|
28
|
+
|
|
5
29
|
## [4.5.0-alpha.1] - 2022-04-15
|
|
6
30
|
|
|
7
31
|
### Fixed
|
|
@@ -16,7 +40,7 @@ The following is a curated list of changes in the Enact ui module, newest change
|
|
|
16
40
|
|
|
17
41
|
### Added
|
|
18
42
|
|
|
19
|
-
- `ui/MarqueeDecorator` `locale` type for `forceDirection` prop not to override the direction depending on contents
|
|
43
|
+
- `ui/Marquee.MarqueeDecorator` `locale` type for `forceDirection` prop not to override the direction depending on contents
|
|
20
44
|
|
|
21
45
|
### Fixed
|
|
22
46
|
|
|
@@ -42,13 +66,13 @@ No significant changes.
|
|
|
42
66
|
|
|
43
67
|
### Fixed
|
|
44
68
|
|
|
45
|
-
- `ui/MarqueeDecorator` to restart animation when text changed while focus retained
|
|
69
|
+
- `ui/Marquee.MarqueeDecorator` to restart animation when text changed while focus retained
|
|
46
70
|
|
|
47
71
|
## [4.0.8] - 2021-10-21
|
|
48
72
|
|
|
49
73
|
### Fixed
|
|
50
74
|
|
|
51
|
-
- `ui/MarqueeDecorator` style to render text properly when starting animation
|
|
75
|
+
- `ui/Marquee.MarqueeDecorator` style to render text properly when starting animation
|
|
52
76
|
|
|
53
77
|
## [4.0.7] - 2021-09-28
|
|
54
78
|
|
|
@@ -66,7 +90,7 @@ No significant changes.
|
|
|
66
90
|
|
|
67
91
|
### Fixed
|
|
68
92
|
|
|
69
|
-
- `ui/MarqueeDecorator` to stop marquee properly after hiding pointer when `marqueeOn` is `hover`
|
|
93
|
+
- `ui/Marquee.MarqueeDecorator` to stop marquee properly after hiding pointer when `marqueeOn` is `hover`
|
|
70
94
|
|
|
71
95
|
## [4.0.3] - 2021-06-18
|
|
72
96
|
|
package/Cancelable/Cancelable.js
CHANGED
|
@@ -52,7 +52,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
52
52
|
|
|
53
53
|
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); }
|
|
54
54
|
|
|
55
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
55
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
56
56
|
|
|
57
57
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
62
62
|
|
|
63
63
|
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; } }
|
|
64
64
|
|
|
65
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Default config for {@link ui/Cancelable.Cancelable}
|
package/Changeable/Changeable.js
CHANGED
|
@@ -35,7 +35,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
35
35
|
|
|
36
36
|
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); }
|
|
37
37
|
|
|
38
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
39
|
|
|
40
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
45
45
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Default config for {@link ui/Changeable.Changeable}.
|
|
@@ -51,7 +51,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
51
51
|
|
|
52
52
|
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); }
|
|
53
53
|
|
|
54
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
54
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
55
55
|
|
|
56
56
|
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); }; }
|
|
57
57
|
|
|
@@ -61,7 +61,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
61
61
|
|
|
62
62
|
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; } }
|
|
63
63
|
|
|
64
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
64
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* A component that creates an entry point to the new render tree.
|
|
@@ -86,7 +86,13 @@ var FloatingLayerBase = /*#__PURE__*/function (_Component) {
|
|
|
86
86
|
_this = _super.call(this, props);
|
|
87
87
|
_this.handleNotify = (0, _handle.oneOf)([(0, _handle.forEventProp)('action', 'close'), (0, _handle.call)('handleClose')], [(0, _handle.forEventProp)('action', 'mount'), (0, _handle.call)('setFloatingLayer')]).bind(_assertThisInitialized(_this));
|
|
88
88
|
_this.handleClose = (0, _handle.handle)((0, _handle.forProp)('open', true), (0, _handle.forwardCustom)('onDismiss')).bind(_assertThisInitialized(_this));
|
|
89
|
-
_this.handleClick = (0, _handle.handle)((0, _handle.forProp)('noAutoDismiss', false), (0, _handle.forProp)('open', true), (0, _handle.forwardCustom)('onDismiss'
|
|
89
|
+
_this.handleClick = (0, _handle.handle)((0, _handle.forProp)('noAutoDismiss', false), (0, _handle.forProp)('open', true), (0, _handle.forwardCustom)('onDismiss', function () {
|
|
90
|
+
return {
|
|
91
|
+
detail: {
|
|
92
|
+
inputType: 'click'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
})).bind(_assertThisInitialized(_this));
|
|
90
96
|
|
|
91
97
|
_this.handleScroll = function (ev) {
|
|
92
98
|
var currentTarget = ev.currentTarget;
|
|
@@ -270,6 +276,11 @@ FloatingLayerBase.propTypes =
|
|
|
270
276
|
* by `FloatingLayerDecorator`. When cancel key is pressed, the function will only invoke if
|
|
271
277
|
* `noAutoDismiss` is set to `false`.
|
|
272
278
|
*
|
|
279
|
+
* When pressing `ESC` key, event payload carries `detail` property containing `inputType`
|
|
280
|
+
* value of `'key'`.
|
|
281
|
+
* When clicking outside the boundary of the popup, event payload carries `detail` property
|
|
282
|
+
* containing `inputType` value of `'click'`.
|
|
283
|
+
*
|
|
273
284
|
* @type {Function}
|
|
274
285
|
* @public
|
|
275
286
|
*/
|
|
@@ -317,7 +328,13 @@ function (ev, _ref2) {
|
|
|
317
328
|
noAutoDismiss = _ref2.noAutoDismiss,
|
|
318
329
|
onDismiss = _ref2.onDismiss;
|
|
319
330
|
return open && !noAutoDismiss && onDismiss;
|
|
320
|
-
}, (0, _handle.forwardCustom)('onDismiss'
|
|
331
|
+
}, (0, _handle.forwardCustom)('onDismiss', function () {
|
|
332
|
+
return {
|
|
333
|
+
detail: {
|
|
334
|
+
inputType: 'key'
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
}), _handle.stop);
|
|
321
338
|
/**
|
|
322
339
|
* FloatingLayer that mixes {@link ui/Cancelable.Cancelable} to handle FloatingLayer dismissal.
|
|
323
340
|
*
|
package/FloatingLayer/Scrim.js
CHANGED
|
@@ -35,7 +35,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
35
35
|
|
|
36
36
|
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); }
|
|
37
37
|
|
|
38
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
39
|
|
|
40
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
45
45
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
49
|
|
|
50
50
|
var transparentClassName = _ScrimModule["default"].scrim + ' enact-fit ' + _ScrimModule["default"].transparent;
|
|
51
51
|
var translucentClassName = _ScrimModule["default"].scrim + ' enact-fit ' + _ScrimModule["default"].translucent; // Stores references to any Scrim instances whose type is translucent to ensure that only the top-
|
|
@@ -90,7 +90,7 @@ describe('FloatingLayer Specs', function () {
|
|
|
90
90
|
var actual = handleClose.mock.calls.length && handleClose.mock.calls[0][0];
|
|
91
91
|
expect(actual).toMatchObject(expectedType);
|
|
92
92
|
});
|
|
93
|
-
test('should fire onDimiss event with type when FloatingLayer is closed', function () {
|
|
93
|
+
test('should fire onDimiss event with type and detail info when FloatingLayer is closed', function () {
|
|
94
94
|
var handleDismiss = jest.fn();
|
|
95
95
|
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
96
96
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FloatingLayer.FloatingLayer, {
|
|
@@ -107,7 +107,10 @@ describe('FloatingLayer Specs', function () {
|
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
var expectedType = {
|
|
110
|
-
type: 'onDismiss'
|
|
110
|
+
type: 'onDismiss',
|
|
111
|
+
detail: {
|
|
112
|
+
inputType: 'key'
|
|
113
|
+
}
|
|
111
114
|
};
|
|
112
115
|
var actual = handleDismiss.mock.calls.length && handleDismiss.mock.calls[0][0];
|
|
113
116
|
expect(actual).toMatchObject(expectedType);
|
|
@@ -31,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
31
31
|
|
|
32
32
|
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); }
|
|
33
33
|
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
35
|
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
41
41
|
|
|
42
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
45
|
|
|
46
46
|
var STATE = {
|
|
47
47
|
inactive: 0,
|
|
@@ -13,6 +13,8 @@ var _handle = require("@enact/core/handle");
|
|
|
13
13
|
|
|
14
14
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
15
15
|
|
|
16
|
+
var _deprecate = _interopRequireDefault(require("@enact/core/internal/deprecate"));
|
|
17
|
+
|
|
16
18
|
var _keymap = require("@enact/core/keymap");
|
|
17
19
|
|
|
18
20
|
var _util = require("@enact/core/util");
|
|
@@ -57,7 +59,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
57
59
|
|
|
58
60
|
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); }
|
|
59
61
|
|
|
60
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
62
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
63
|
|
|
62
64
|
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); }; }
|
|
63
65
|
|
|
@@ -67,7 +69,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
67
69
|
|
|
68
70
|
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; } }
|
|
69
71
|
|
|
70
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
72
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* Default configuration parameters for {@link ui/Marquee.MarqueeDecorator}
|
|
@@ -92,6 +94,7 @@ var defaultConfig = {
|
|
|
92
94
|
* @type {String}
|
|
93
95
|
* @default null
|
|
94
96
|
* @memberof ui/Marquee.MarqueeDecorator.defaultConfig
|
|
97
|
+
* @deprecated Will be removed in 5.0.0. Use {@link ui/Marquee.MarqueeDecorator.defaultConfig.css} instead.
|
|
95
98
|
*/
|
|
96
99
|
className: null,
|
|
97
100
|
|
|
@@ -104,6 +107,24 @@ var defaultConfig = {
|
|
|
104
107
|
*/
|
|
105
108
|
component: _MarqueeBase["default"],
|
|
106
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
112
|
+
* corresponding internal elements and states of this component.
|
|
113
|
+
*
|
|
114
|
+
* The following classes are supported:
|
|
115
|
+
*
|
|
116
|
+
* * `marquee` - The root component class
|
|
117
|
+
* * `animate` - Applied to the inner content node when the text is animating
|
|
118
|
+
* * `spacing` - The spacing node used between the repeated content
|
|
119
|
+
* * `text` - The inner content node
|
|
120
|
+
* * `willAnimate` - Applied to the inner content node shortly before animation
|
|
121
|
+
*
|
|
122
|
+
* @type {Object}
|
|
123
|
+
* @default null
|
|
124
|
+
* @memberof ui/Marquee.MarqueeDecorator.defaultConfig
|
|
125
|
+
*/
|
|
126
|
+
css: null,
|
|
127
|
+
|
|
107
128
|
/**
|
|
108
129
|
* Property containing the callback to start the animation when `marqueeOn` is `'hover'`
|
|
109
130
|
*
|
|
@@ -204,13 +225,24 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
204
225
|
var _class;
|
|
205
226
|
|
|
206
227
|
var blur = config.blur,
|
|
207
|
-
configClassName = config.className,
|
|
208
228
|
MarqueeComponent = config.component,
|
|
209
229
|
enter = config.enter,
|
|
210
230
|
focus = config.focus,
|
|
211
231
|
invalidateProps = config.invalidateProps,
|
|
212
232
|
leave = config.leave,
|
|
213
|
-
marqueeDirection = config.marqueeDirection;
|
|
233
|
+
marqueeDirection = config.marqueeDirection;
|
|
234
|
+
|
|
235
|
+
if (config.className) {
|
|
236
|
+
(0, _deprecate["default"])({
|
|
237
|
+
name: 'ui/MarqueeDecorator.config.className',
|
|
238
|
+
replacedBy: 'ui/MarqueeDecorator.config.css',
|
|
239
|
+
until: '5.0.0'
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var css = typeof config.css === 'object' && config.css || {
|
|
244
|
+
marquee: config.className
|
|
245
|
+
}; // Generate functions to forward events to containers
|
|
214
246
|
|
|
215
247
|
var forwardBlur = (0, _handle.forward)(blur);
|
|
216
248
|
var forwardFocus = (0, _handle.forward)(focus);
|
|
@@ -830,8 +862,8 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
830
862
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MarqueeComponent, {
|
|
831
863
|
alignment: alignment,
|
|
832
864
|
animating: this.state.animating,
|
|
833
|
-
className: configClassName,
|
|
834
865
|
clientRef: this.cacheNode,
|
|
866
|
+
css: css,
|
|
835
867
|
distance: this.distance,
|
|
836
868
|
onMarqueeComplete: this.handleMarqueeComplete,
|
|
837
869
|
overflow: this.state.overflow,
|
package/Marquee/index.d.ts
CHANGED
|
@@ -120,6 +120,18 @@ export interface MarqueeDecoratorConfig extends Object {
|
|
|
120
120
|
* The base marquee component wrapping the content.
|
|
121
121
|
*/
|
|
122
122
|
component?: React.ComponentType;
|
|
123
|
+
/**
|
|
124
|
+
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
125
|
+
corresponding internal elements and states of this component.
|
|
126
|
+
*
|
|
127
|
+
* The following classes are supported:
|
|
128
|
+
* * `marquee` - The root component class
|
|
129
|
+
* * `animate` - Applied to the inner content node when the text is animating
|
|
130
|
+
* * `spacing` - The spacing node used between the repeated content
|
|
131
|
+
* * `text` - The inner content node
|
|
132
|
+
* * `willAnimate` - Applied to the inner content node shortly before animation
|
|
133
|
+
*/
|
|
134
|
+
css?: object;
|
|
123
135
|
/**
|
|
124
136
|
* Property containing the callback to start the animation when `marqueeOn` is `'hover'`
|
|
125
137
|
*/
|
package/Media/Media.js
CHANGED
|
@@ -39,7 +39,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
39
39
|
|
|
40
40
|
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); }
|
|
41
41
|
|
|
42
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
42
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
43
|
|
|
44
44
|
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); }; }
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
49
49
|
|
|
50
50
|
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; } }
|
|
51
51
|
|
|
52
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
52
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Generates a key representing the source node or nodes provided
|
|
@@ -35,7 +35,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
35
35
|
|
|
36
36
|
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); }
|
|
37
37
|
|
|
38
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
39
|
|
|
40
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
45
45
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Default config for `PlaceholderControllerDecorator`.
|
|
@@ -29,7 +29,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
34
|
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); }; }
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Default config for PlaceholderDecorator.
|
|
@@ -29,7 +29,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
34
|
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); }; }
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
44
|
var RadioContext = /*#__PURE__*/(0, _react.createContext)();
|
|
45
45
|
/**
|
|
@@ -37,7 +37,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
37
37
|
|
|
38
38
|
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); }
|
|
39
39
|
|
|
40
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
41
|
|
|
42
42
|
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); }; }
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
47
47
|
|
|
48
48
|
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; } }
|
|
49
49
|
|
|
50
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Default config for `RadioDecorator`.
|
package/Resizable/Resizable.js
CHANGED
|
@@ -31,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
31
31
|
|
|
32
32
|
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); }
|
|
33
33
|
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
35
|
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
41
41
|
|
|
42
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Used internally for things to notify children that they need to resize because of a parent
|
package/Routable/Link.js
CHANGED
|
@@ -33,7 +33,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
33
33
|
|
|
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
|
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
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
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
43
43
|
|
|
44
44
|
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; } }
|
|
45
45
|
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
47
|
|
|
48
48
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
49
49
|
|
package/Routable/Router.js
CHANGED
|
@@ -44,7 +44,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
44
44
|
|
|
45
45
|
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); }
|
|
46
46
|
|
|
47
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
47
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
48
48
|
|
|
49
49
|
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); }; }
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
54
54
|
|
|
55
55
|
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; } }
|
|
56
56
|
|
|
57
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* A Router component for use with [`ViewManager`]{@link ui/ViewManager.ViewManager}
|
package/Scrollable/Scrollable.js
CHANGED
|
@@ -64,7 +64,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
64
64
|
|
|
65
65
|
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); }
|
|
66
66
|
|
|
67
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
67
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
68
68
|
|
|
69
69
|
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); }; }
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
74
74
|
|
|
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
|
|
|
77
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
78
78
|
|
|
79
79
|
var constants = {
|
|
80
80
|
animationDuration: 1000,
|
|
@@ -64,7 +64,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
64
64
|
|
|
65
65
|
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); }
|
|
66
66
|
|
|
67
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
67
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
68
68
|
|
|
69
69
|
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); }; }
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
74
74
|
|
|
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
|
|
|
77
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
78
78
|
|
|
79
79
|
var constants = {
|
|
80
80
|
epsilon: 1,
|
package/Scrollable/Scrollbar.js
CHANGED
|
@@ -51,7 +51,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
51
51
|
|
|
52
52
|
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); }
|
|
53
53
|
|
|
54
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
54
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
55
55
|
|
|
56
56
|
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); }; }
|
|
57
57
|
|
|
@@ -61,7 +61,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
61
61
|
|
|
62
62
|
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; } }
|
|
63
63
|
|
|
64
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
64
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
65
|
|
|
66
66
|
var minThumbSize = 18,
|
|
67
67
|
// Size in pixels
|
|
@@ -41,7 +41,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
41
41
|
|
|
42
42
|
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); }
|
|
43
43
|
|
|
44
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
44
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
45
45
|
|
|
46
46
|
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); }; }
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
51
51
|
|
|
52
52
|
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; } }
|
|
53
53
|
|
|
54
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
54
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* An unstyled base scroller component.
|
|
@@ -39,7 +39,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
39
39
|
|
|
40
40
|
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); }
|
|
41
41
|
|
|
42
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
42
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
43
|
|
|
44
44
|
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); }; }
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
49
49
|
|
|
50
50
|
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; } }
|
|
51
51
|
|
|
52
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
52
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* An unstyled base scroller component.
|
|
@@ -411,7 +411,7 @@ describe('Skinnable Specs', function () {
|
|
|
411
411
|
|
|
412
412
|
expect(component).toHaveClass(expected);
|
|
413
413
|
});
|
|
414
|
-
test
|
|
414
|
+
test('should not force re-render of child if child unaffected', function () {
|
|
415
415
|
var config = {
|
|
416
416
|
defaultSkin: 'dark',
|
|
417
417
|
defaultVariants: 'normal',
|
|
@@ -435,17 +435,28 @@ describe('Skinnable Specs', function () {
|
|
|
435
435
|
};
|
|
436
436
|
|
|
437
437
|
var SkinnableParent = (0, _Skinnable["default"])(config, Component);
|
|
438
|
-
var SkinnableChild = (0, _Skinnable["default"])(config, ChildComponent);
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
438
|
+
var SkinnableChild = (0, _Skinnable["default"])(config, ChildComponent);
|
|
439
|
+
var childrenProp = /*#__PURE__*/(0, _jsxRuntime.jsx)(SkinnableChild, {});
|
|
440
|
+
|
|
441
|
+
var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(SkinnableParent, {
|
|
442
|
+
children: childrenProp
|
|
443
|
+
})),
|
|
444
|
+
rerender = _render.rerender;
|
|
445
|
+
|
|
446
|
+
rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(SkinnableParent, {
|
|
447
|
+
className: "foo",
|
|
448
|
+
children: childrenProp
|
|
449
|
+
}));
|
|
450
|
+
var expected1 = 1;
|
|
451
|
+
var actual1 = wasRendered.mock.calls.length;
|
|
452
|
+
rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(SkinnableParent, {
|
|
453
|
+
className: "foo",
|
|
454
|
+
skin: "light",
|
|
455
|
+
children: childrenProp
|
|
456
|
+
}));
|
|
457
|
+
var expected2 = 2;
|
|
458
|
+
var actual2 = wasRendered.mock.calls.length;
|
|
459
|
+
expect(actual1).toEqual(expected1);
|
|
460
|
+
expect(actual2).toEqual(expected2);
|
|
450
461
|
});
|
|
451
462
|
});
|
|
@@ -37,7 +37,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
37
37
|
|
|
38
38
|
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); }
|
|
39
39
|
|
|
40
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
41
|
|
|
42
42
|
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); }; }
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
47
47
|
|
|
48
48
|
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; } }
|
|
49
49
|
|
|
50
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
51
|
|
|
52
52
|
var validateRange = (0, _validators.validateRangeOnce)(function (props) {
|
|
53
53
|
return props;
|
|
@@ -17,6 +17,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
|
|
19
19
|
describe('Touchable', function () {
|
|
20
|
+
beforeEach(function () {
|
|
21
|
+
jest.useFakeTimers();
|
|
22
|
+
});
|
|
23
|
+
afterEach(function () {
|
|
24
|
+
jest.useRealTimers();
|
|
25
|
+
});
|
|
20
26
|
var data;
|
|
21
27
|
|
|
22
28
|
var DivComponent = function DivComponent(_ref) {
|
|
@@ -88,10 +94,9 @@ describe('Touchable', function () {
|
|
|
88
94
|
onHold: handler,
|
|
89
95
|
onHoldStart: function onHoldStart() {}
|
|
90
96
|
}));
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, 20);
|
|
97
|
+
jest.runOnlyPendingTimers();
|
|
98
|
+
expect(handler).toHaveBeenCalled();
|
|
99
|
+
done();
|
|
95
100
|
});
|
|
96
101
|
test('should update state configurations onHoldStart events', function (done) {
|
|
97
102
|
var holdConfig = {
|
|
@@ -121,10 +126,9 @@ describe('Touchable', function () {
|
|
|
121
126
|
onHold: function onHold() {},
|
|
122
127
|
onHoldStart: handler
|
|
123
128
|
}));
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, 20);
|
|
129
|
+
jest.runOnlyPendingTimers();
|
|
130
|
+
expect(handler).toHaveBeenCalled();
|
|
131
|
+
done();
|
|
128
132
|
});
|
|
129
133
|
test('should update state configurations onHoldEnd events', function (done) {
|
|
130
134
|
var holdConfig = {
|
|
@@ -156,12 +160,12 @@ describe('Touchable', function () {
|
|
|
156
160
|
onHold: function onHold() {},
|
|
157
161
|
onHoldEnd: handler
|
|
158
162
|
}));
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
jest.runOnlyPendingTimers();
|
|
164
|
+
|
|
165
|
+
_react.fireEvent.mouseUp(component, ev);
|
|
161
166
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}, 30);
|
|
167
|
+
expect(handler).toHaveBeenCalled();
|
|
168
|
+
done();
|
|
165
169
|
});
|
|
166
170
|
test('should merge configurations', function () {
|
|
167
171
|
(0, _config.configure)({
|
package/Transition/Transition.js
CHANGED
|
@@ -36,7 +36,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
36
36
|
|
|
37
37
|
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); }
|
|
38
38
|
|
|
39
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
39
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
40
40
|
|
|
41
41
|
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); }; }
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
46
46
|
|
|
47
47
|
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; } }
|
|
48
48
|
|
|
49
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
50
50
|
|
|
51
51
|
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; }
|
|
52
52
|
|
|
@@ -118,7 +118,7 @@ describe('Transition Specs', function () {
|
|
|
118
118
|
|
|
119
119
|
expect(actual).toHaveClass(expected);
|
|
120
120
|
});
|
|
121
|
-
test('should fire \'onShow\' event with type when \'visible\' prop bacomes true
|
|
121
|
+
test('should fire \'onShow\' event with type when \'visible\' prop bacomes true', function () {
|
|
122
122
|
var handleShow = jest.fn();
|
|
123
123
|
|
|
124
124
|
var ChildNode = function ChildNode(props) {
|
|
@@ -149,7 +149,7 @@ describe('Transition Specs', function () {
|
|
|
149
149
|
expect(handleShow).toBeCalledTimes(expected);
|
|
150
150
|
expect(actual).toMatchObject(expectedType);
|
|
151
151
|
});
|
|
152
|
-
test('should fire \'onHide\' event with type when \'visible\' prop bacomes false
|
|
152
|
+
test('should fire \'onHide\' event with type when \'visible\' prop bacomes false', function () {
|
|
153
153
|
var handleHide = jest.fn();
|
|
154
154
|
|
|
155
155
|
var ChildNode = function ChildNode(props) {
|
|
@@ -39,7 +39,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
39
39
|
|
|
40
40
|
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); }
|
|
41
41
|
|
|
42
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
42
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
43
|
|
|
44
44
|
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); }; }
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
49
49
|
|
|
50
50
|
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; } }
|
|
51
51
|
|
|
52
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
52
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Returns the index of a child in an array found by `key` matching
|
package/ViewManager/View.js
CHANGED
|
@@ -33,7 +33,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
33
33
|
|
|
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
|
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
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
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
43
43
|
|
|
44
44
|
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; } }
|
|
45
45
|
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
47
|
|
|
48
48
|
// If the View was "appearing", then entering will always be false and this will not result in a
|
|
49
49
|
// re-render. If the view should enter, state.enter will be true and this will toggle it to false
|
|
@@ -68,7 +68,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
68
68
|
|
|
69
69
|
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); }
|
|
70
70
|
|
|
71
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
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
|
|
|
73
73
|
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
74
|
|
|
@@ -78,7 +78,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
78
78
|
|
|
79
79
|
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; } }
|
|
80
80
|
|
|
81
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
81
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* The base `ViewManager` component, without
|
|
@@ -26,7 +26,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
26
26
|
|
|
27
27
|
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); }
|
|
28
28
|
|
|
29
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
29
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
30
30
|
|
|
31
31
|
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); }; }
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
36
36
|
|
|
37
37
|
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; } }
|
|
38
38
|
|
|
39
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
40
40
|
|
|
41
41
|
describe('ViewManager', function () {
|
|
42
42
|
// Suite-wide setup
|
|
@@ -693,11 +693,13 @@ describe('ViewManager', function () {
|
|
|
693
693
|
}));
|
|
694
694
|
yield (0, _react.waitFor)(function () {
|
|
695
695
|
var expected = 1;
|
|
696
|
+
expect(spy).toHaveBeenCalledTimes(expected);
|
|
697
|
+
});
|
|
698
|
+
yield (0, _react.waitFor)(function () {
|
|
696
699
|
var expectedType = {
|
|
697
700
|
type: 'onAppear'
|
|
698
701
|
};
|
|
699
702
|
var actual = spy.mock.calls.length && spy.mock.calls[0][0];
|
|
700
|
-
expect(spy).toHaveBeenCalledTimes(expected);
|
|
701
703
|
expect(actual).toMatchObject(expectedType);
|
|
702
704
|
});
|
|
703
705
|
}));
|
|
@@ -55,7 +55,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
55
55
|
|
|
56
56
|
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); }
|
|
57
57
|
|
|
58
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
58
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
59
|
|
|
60
60
|
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); }; }
|
|
61
61
|
|
|
@@ -65,7 +65,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
65
65
|
|
|
66
66
|
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; } }
|
|
67
67
|
|
|
68
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
68
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
69
|
|
|
70
70
|
var nop = function nop() {},
|
|
71
71
|
JS = 'JS',
|
|
@@ -59,7 +59,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
59
59
|
|
|
60
60
|
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); }
|
|
61
61
|
|
|
62
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
62
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
63
63
|
|
|
64
64
|
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); }; }
|
|
65
65
|
|
|
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
69
69
|
|
|
70
70
|
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; } }
|
|
71
71
|
|
|
72
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
72
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
73
73
|
|
|
74
74
|
var nop = function nop() {};
|
|
75
75
|
/**
|
package/internal/Pure/Pure.js
CHANGED
|
@@ -27,7 +27,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
27
27
|
|
|
28
28
|
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); }
|
|
29
29
|
|
|
30
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
|
|
32
32
|
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); }; }
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
37
37
|
|
|
38
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
39
|
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Default config for {@link ui/internal/Pure.Pure}.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "4.5.0-
|
|
3
|
+
"version": "4.5.0-rc.1",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@enact/core": "^4.5.0-
|
|
28
|
+
"@enact/core": "^4.5.0-rc.1",
|
|
29
29
|
"classnames": "^2.3.1",
|
|
30
30
|
"direction": "^1.0.4",
|
|
31
31
|
"invariant": "^2.2.4",
|
|
@@ -33,7 +33,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
33
33
|
|
|
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
|
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
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
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
43
43
|
|
|
44
44
|
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; } }
|
|
45
45
|
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Default config for `ResolutionDecorator`.
|
package/useScroll/useScroll.js
CHANGED
|
@@ -436,20 +436,20 @@ var useScrollBase = function useScrollBase(props) {
|
|
|
436
436
|
var propsHandleResizeWindow = props.handleResizeWindow; // `handleSize` in `ui/resolution.ResolutionDecorator` should be executed first.
|
|
437
437
|
|
|
438
438
|
setTimeout(function () {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
439
|
+
var handleResizeResult = propsHandleResizeWindow === null || propsHandleResizeWindow === void 0 ? void 0 : propsHandleResizeWindow();
|
|
440
|
+
|
|
441
|
+
if (handleResizeResult) {
|
|
442
|
+
if (scrollMode === 'translate') {
|
|
443
|
+
scrollTo({
|
|
444
|
+
position: {
|
|
445
|
+
x: 0,
|
|
446
|
+
y: 0
|
|
447
|
+
},
|
|
448
|
+
animate: false
|
|
449
|
+
});
|
|
450
|
+
} else {
|
|
451
|
+
scrollContentHandle.current.scrollToPosition(0, 0, 'instant');
|
|
452
|
+
}
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
enqueueForceUpdate();
|