@enact/ui 3.2.3 → 3.2.7
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/A11yDecorator/A11yDecorator.js +1 -1
- package/A11yDecorator/tests/A11yDecorator-specs.js +9 -9
- package/AnnounceDecorator/Announce.js +10 -8
- package/AnnounceDecorator/AnnounceDecorator.d.ts +1 -1
- package/AnnounceDecorator/AnnounceDecorator.js +10 -8
- package/AnnounceDecorator/tests/Announce-specs.js +3 -3
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +4 -4
- package/BodyText/BodyText.d.ts +3 -3
- package/BodyText/BodyText.js +1 -1
- package/BodyText/tests/BodyText-specs.js +11 -7
- package/Button/Button.d.ts +8 -8
- package/Button/Button.js +5 -5
- package/CHANGELOG.md +24 -0
- package/Cancelable/Cancelable.js +15 -11
- package/Cancelable/tests/Cancelable-specs.js +20 -20
- package/Changeable/Changeable.js +12 -8
- package/Changeable/tests/Changeable-specs.js +24 -22
- package/ComponentOverride/ComponentOverride.d.ts +1 -1
- package/ComponentOverride/ComponentOverride.js +1 -1
- package/FloatingLayer/FloatingLayer.js +12 -8
- package/FloatingLayer/FloatingLayerDecorator.js +15 -11
- package/FloatingLayer/Scrim.js +12 -8
- package/FloatingLayer/tests/FloatingLayer-specs.js +3 -3
- package/FloatingLayer/tests/Scrim-specs.js +2 -2
- package/ForwardRef/ForwardRef.js +4 -2
- package/GridListImageItem/GridListImageItem.d.ts +2 -2
- package/GridListImageItem/GridListImageItem.js +7 -7
- package/Group/Group.d.ts +4 -4
- package/Group/Group.js +1 -1
- package/Group/GroupItem.js +1 -1
- package/Group/tests/Group-specs.js +9 -9
- package/Heading/Heading.d.ts +3 -2
- package/Heading/Heading.js +1 -1
- package/Heading/tests/Heading-specs.js +4 -4
- package/Icon/Icon.d.ts +5 -5
- package/Icon/Icon.js +2 -2
- package/Icon/tests/Icon-specs.js +8 -8
- package/IconButton/IconButton.d.ts +6 -6
- package/IconButton/IconButton.js +12 -6
- package/Image/Image.d.ts +1 -1
- package/Image/Image.js +5 -3
- package/Image/tests/Image-specs.js +4 -4
- package/Item/Item.d.ts +2 -2
- package/Item/Item.js +1 -1
- package/Item/tests/Item-specs.js +4 -4
- package/LabeledIcon/LabeledIcon.d.ts +6 -6
- package/LabeledIcon/LabeledIcon.js +4 -2
- package/LabeledIcon/tests/LabeledIcon-specs.js +6 -6
- package/Layout/Cell.js +4 -2
- package/Layout/Layout.d.ts +22 -22
- package/Layout/Layout.js +4 -2
- package/Layout/tests/Layout-specs.js +19 -11
- package/Marquee/MarqueeBase.js +71 -39
- package/Marquee/MarqueeController.js +14 -8
- package/Marquee/MarqueeDecorator.js +15 -11
- package/Marquee/index.d.ts +85 -81
- package/Marquee/tests/Marquee-specs.js +61 -22
- package/Measurable/Measurable.js +20 -20
- package/Media/Media.d.ts +1 -1
- package/Media/Media.js +10 -6
- package/Placeholder/PlaceholderControllerDecorator.js +13 -11
- package/Placeholder/PlaceholderDecorator.js +11 -7
- package/ProgressBar/ProgressBar.d.ts +1 -1
- package/ProgressBar/ProgressBar.js +8 -6
- package/ProgressBar/tests/ProgressBar-specs.js +4 -4
- package/RadioDecorator/RadioControllerDecorator.js +13 -9
- package/RadioDecorator/RadioDecorator.js +10 -8
- package/RadioDecorator/tests/RadioDecorator-specs.js +23 -19
- package/Repeater/Repeater.d.ts +4 -3
- package/Repeater/Repeater.js +7 -5
- package/Repeater/tests/Repeater-specs.js +15 -15
- package/Resizable/Resizable.js +12 -10
- package/Routable/Link.js +4 -4
- package/Routable/Routable.d.ts +2 -2
- package/Routable/Routable.js +5 -3
- package/Routable/Router.js +13 -7
- package/Routable/tests/Router-specs.js +30 -30
- package/Scrollable/ScrollAnimator.js +1 -3
- package/Scrollable/ScrollThumb.js +1 -1
- package/Scrollable/Scrollable.js +30 -24
- package/Scrollable/ScrollableNative.js +30 -24
- package/Scrollable/Scrollbar.js +21 -17
- package/Scroller/Scroller.d.ts +3 -3
- package/Scroller/Scroller.js +21 -11
- package/Skinnable/Skinnable.js +3 -3
- package/Skinnable/tests/Skinnable-specs.js +34 -34
- package/Skinnable/util.js +1 -1
- package/Slider/Knob.js +1 -1
- package/Slider/PositionDecorator.js +12 -8
- package/Slider/Slider.d.ts +6 -6
- package/Slider/Slider.js +6 -4
- package/SlotItem/SlotItem.d.ts +4 -4
- package/SlotItem/SlotItem.js +3 -3
- package/Slottable/Slottable.js +4 -2
- package/Slottable/tests/Slottable-specs.js +25 -25
- package/Spinner/Spinner.d.ts +3 -3
- package/Spinner/Spinner.js +6 -6
- package/Spinner/tests/Spinner-specs.js +5 -5
- package/ToggleIcon/ToggleIcon.d.ts +3 -3
- package/ToggleIcon/ToggleIcon.js +1 -1
- package/ToggleIcon/tests/ToggleIcon-specs.js +4 -4
- package/ToggleItem/ToggleItem.d.ts +15 -13
- package/ToggleItem/ToggleItem.js +8 -4
- package/ToggleItem/tests/ToggleItem-specs.js +12 -8
- package/Toggleable/Toggleable.js +15 -9
- package/Toggleable/tests/Toggleable-specs.js +33 -31
- package/Touchable/ClickAllow.js +1 -3
- package/Touchable/Drag.js +3 -1
- package/Touchable/Flick.js +1 -3
- package/Touchable/Hold.js +5 -5
- package/Touchable/Touchable.d.ts +3 -3
- package/Touchable/Touchable.js +15 -9
- package/Touchable/config.js +4 -2
- package/Touchable/tests/Touchable-specs.js +18 -18
- package/Transition/Transition.d.ts +31 -29
- package/Transition/Transition.js +15 -9
- package/Transition/tests/Transition-specs.js +23 -15
- package/ViewManager/Arranger.js +3 -1
- package/ViewManager/TransitionGroup.js +11 -7
- package/ViewManager/View.js +12 -8
- package/ViewManager/ViewManager.d.ts +10 -10
- package/ViewManager/ViewManager.js +10 -6
- package/ViewManager/tests/View-specs.js +24 -24
- package/ViewManager/tests/ViewManager-specs.js +93 -89
- package/VirtualList/VirtualList.d.ts +9 -8
- package/VirtualList/VirtualList.js +4 -4
- package/VirtualList/VirtualListBase.js +40 -24
- package/VirtualList/tests/VirtualList-specs.js +13 -13
- package/internal/IdProvider/IdProvider.js +10 -6
- package/internal/Pure/Pure.js +10 -6
- package/internal/localized-fonts/localized-fonts.js +7 -3
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +10 -6
- package/resolution/index.js +5 -1
- package/resolution/resolution.js +1 -1
- package/resolution/tests/ResolutionDecorator-specs.js +2 -2
|
@@ -120,7 +120,7 @@ var A11yDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrappe
|
|
|
120
120
|
render: function render(props) {
|
|
121
121
|
delete props.accessibilityPreHint;
|
|
122
122
|
delete props.accessibilityHint;
|
|
123
|
-
return _react["default"].createElement(Wrapped, props);
|
|
123
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapped, props);
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
});
|
|
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
11
11
|
describe('A11yDecorator', function () {
|
|
12
12
|
var Component = (0, _A11yDecorator["default"])('div');
|
|
13
13
|
test('should use the aria-label when set', function () {
|
|
14
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
14
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
15
15
|
"aria-label": "LABEL"
|
|
16
16
|
}, "CONTENT"));
|
|
17
17
|
var expected = 'LABEL';
|
|
@@ -19,7 +19,7 @@ describe('A11yDecorator', function () {
|
|
|
19
19
|
expect(actual).toBe(expected);
|
|
20
20
|
});
|
|
21
21
|
test('should use the accessibilityPreHint when set', function () {
|
|
22
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
22
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
23
23
|
accessibilityPreHint: "PREHINT"
|
|
24
24
|
}, "CONTENT"));
|
|
25
25
|
var expected = 'PREHINT CONTENT';
|
|
@@ -27,7 +27,7 @@ describe('A11yDecorator', function () {
|
|
|
27
27
|
expect(actual).toBe(expected);
|
|
28
28
|
});
|
|
29
29
|
test('should use the accessibilityHint when set', function () {
|
|
30
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
30
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
31
31
|
accessibilityHint: "HINT"
|
|
32
32
|
}, "CONTENT"));
|
|
33
33
|
var expected = 'CONTENT HINT';
|
|
@@ -35,7 +35,7 @@ describe('A11yDecorator', function () {
|
|
|
35
35
|
expect(actual).toBe(expected);
|
|
36
36
|
});
|
|
37
37
|
test('should use only the aria-label when set and ignore accessibilityHint', function () {
|
|
38
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
38
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
39
39
|
"aria-label": "LABEL",
|
|
40
40
|
accessibilityHint: "HINT"
|
|
41
41
|
}, "CONTENT"));
|
|
@@ -44,7 +44,7 @@ describe('A11yDecorator', function () {
|
|
|
44
44
|
expect(actual).toBe(expected);
|
|
45
45
|
});
|
|
46
46
|
test('should use only the aria-label when set and ignore accessibilityPreHint', function () {
|
|
47
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
47
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
48
48
|
"aria-label": "LABEL",
|
|
49
49
|
accessibilityPreHint: "PREHINT"
|
|
50
50
|
}, "CONTENT"));
|
|
@@ -53,7 +53,7 @@ describe('A11yDecorator', function () {
|
|
|
53
53
|
expect(actual).toBe(expected);
|
|
54
54
|
});
|
|
55
55
|
test('should use the accessibilityPreHint, accessibilityHint when set', function () {
|
|
56
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
56
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
57
57
|
accessibilityPreHint: "PREHINT",
|
|
58
58
|
accessibilityHint: "HINT"
|
|
59
59
|
}, "CONTENT"));
|
|
@@ -62,7 +62,7 @@ describe('A11yDecorator', function () {
|
|
|
62
62
|
expect(actual).toBe(expected);
|
|
63
63
|
});
|
|
64
64
|
test('should use the accessibilityPreHint, accessibilityHint, aria-label when set', function () {
|
|
65
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, {
|
|
65
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, {
|
|
66
66
|
accessibilityPreHint: "PREHINT",
|
|
67
67
|
accessibilityHint: "HINT",
|
|
68
68
|
"aria-label": "LABEL"
|
|
@@ -76,9 +76,9 @@ describe('A11yDecorator', function () {
|
|
|
76
76
|
prop: 'title'
|
|
77
77
|
}, function (_ref) {
|
|
78
78
|
var title = _ref.title;
|
|
79
|
-
return _react["default"].createElement("div", null, title);
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, title);
|
|
80
80
|
});
|
|
81
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(TestComponent, {
|
|
81
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(TestComponent, {
|
|
82
82
|
accessibilityPreHint: "PREHINT",
|
|
83
83
|
accessibilityHint: "HINT",
|
|
84
84
|
title: "TITLE"
|
|
@@ -13,7 +13,7 @@ var _class, _temp;
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
17
17
|
|
|
18
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
19
|
|
|
@@ -21,10 +21,14 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
21
21
|
|
|
22
22
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
23
23
|
|
|
24
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
25
|
+
|
|
24
26
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
25
27
|
|
|
26
28
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
29
|
|
|
30
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
|
+
|
|
28
32
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
33
|
|
|
30
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
@@ -66,14 +70,12 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
66
70
|
* @memberof ui/AnnounceDecorator
|
|
67
71
|
* @public
|
|
68
72
|
*/
|
|
69
|
-
var Announce = (_temp = _class =
|
|
70
|
-
/*#__PURE__*/
|
|
71
|
-
function (_React$Component) {
|
|
73
|
+
var Announce = (_temp = _class = /*#__PURE__*/function (_React$Component) {
|
|
72
74
|
_inherits(Announce, _React$Component);
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
var _getPrototypeOf2;
|
|
76
|
+
var _super = _createSuper(Announce);
|
|
76
77
|
|
|
78
|
+
function Announce() {
|
|
77
79
|
var _this;
|
|
78
80
|
|
|
79
81
|
_classCallCheck(this, Announce);
|
|
@@ -82,7 +84,7 @@ function (_React$Component) {
|
|
|
82
84
|
args[_key] = arguments[_key];
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
_this =
|
|
87
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
86
88
|
|
|
87
89
|
_this.resetAlert = function () {
|
|
88
90
|
_this.alertTimeout = null;
|
|
@@ -117,7 +119,7 @@ function (_React$Component) {
|
|
|
117
119
|
value: function render() {
|
|
118
120
|
var props = Object.assign({}, this.props);
|
|
119
121
|
delete props.timeout;
|
|
120
|
-
return _react["default"].createElement("span", Object.assign({
|
|
122
|
+
return /*#__PURE__*/_react["default"].createElement("span", Object.assign({
|
|
121
123
|
ref: this.setAlertRef,
|
|
122
124
|
role: "alert"
|
|
123
125
|
}, props));
|
|
@@ -21,7 +21,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
24
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
@@ -33,10 +33,14 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
33
33
|
|
|
34
34
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
35
35
|
|
|
36
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
|
+
|
|
36
38
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
37
39
|
|
|
38
40
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
41
|
|
|
42
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
+
|
|
40
44
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
45
|
|
|
42
46
|
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
@@ -102,14 +106,12 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
|
|
|
102
106
|
var _class, _temp;
|
|
103
107
|
|
|
104
108
|
var prop = _ref.prop;
|
|
105
|
-
return _temp = _class =
|
|
106
|
-
/*#__PURE__*/
|
|
107
|
-
function (_React$Component) {
|
|
109
|
+
return _temp = _class = /*#__PURE__*/function (_React$Component) {
|
|
108
110
|
_inherits(_class, _React$Component);
|
|
109
111
|
|
|
110
|
-
|
|
111
|
-
var _getPrototypeOf2;
|
|
112
|
+
var _super = _createSuper(_class);
|
|
112
113
|
|
|
114
|
+
function _class() {
|
|
113
115
|
var _this;
|
|
114
116
|
|
|
115
117
|
_classCallCheck(this, _class);
|
|
@@ -118,7 +120,7 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
|
|
|
118
120
|
args[_key] = arguments[_key];
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
_this =
|
|
123
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
122
124
|
|
|
123
125
|
_this.announce = function (message) {
|
|
124
126
|
if (_this.announceRef) {
|
|
@@ -141,7 +143,7 @@ var AnnounceDecorator = (0, _hoc["default"])(defaultConfig, function (_ref, Wrap
|
|
|
141
143
|
rest = _objectWithoutProperties(_this$props, ["children"]);
|
|
142
144
|
|
|
143
145
|
rest[prop] = this.announce;
|
|
144
|
-
return _react["default"].createElement(Wrapped, rest, children, _react["default"].createElement(_Announce["default"], {
|
|
146
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapped, rest, children, /*#__PURE__*/_react["default"].createElement(_Announce["default"], {
|
|
145
147
|
ref: this.setAnnounceRef
|
|
146
148
|
}));
|
|
147
149
|
}
|
|
@@ -8,11 +8,11 @@ var _Announce = _interopRequireDefault(require("../Announce"));
|
|
|
8
8
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
|
|
11
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
11
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
12
12
|
|
|
13
13
|
describe('Announce', function () {
|
|
14
14
|
test('should have an announce method on the component', function () {
|
|
15
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(_Announce["default"], null));
|
|
15
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Announce["default"], null));
|
|
16
16
|
var node = subject.instance();
|
|
17
17
|
var expected = 'function';
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ describe('Announce', function () {
|
|
|
22
22
|
});
|
|
23
23
|
test('should update the aria-label with the provided message', function () {
|
|
24
24
|
var message = 'message';
|
|
25
|
-
var subject = (0, _enzyme.mount)(_react["default"].createElement(_Announce["default"], null));
|
|
25
|
+
var subject = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_Announce["default"], null));
|
|
26
26
|
var node = subject.instance();
|
|
27
27
|
node.announce(message);
|
|
28
28
|
var expected = message; // since we're manually updating the node in Announce, we have to manually check the node here
|
|
@@ -8,17 +8,17 @@ var _AnnounceDecorator = _interopRequireDefault(require("../AnnounceDecorator"))
|
|
|
8
8
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
|
|
11
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
11
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
12
12
|
|
|
13
13
|
describe('AnnounceDecorator', function () {
|
|
14
14
|
// no-op wrapper
|
|
15
15
|
var Div = function Div() {
|
|
16
|
-
return _react["default"].createElement("div", null);
|
|
16
|
+
return /*#__PURE__*/_react["default"].createElement("div", null);
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
test('should pass a function in the announce prop', function () {
|
|
20
20
|
var Component = (0, _AnnounceDecorator["default"])(Div);
|
|
21
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
|
|
21
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
|
|
22
22
|
var expected = 'function';
|
|
23
23
|
|
|
24
24
|
var actual = _typeof(subject.prop('announce'));
|
|
@@ -30,7 +30,7 @@ describe('AnnounceDecorator', function () {
|
|
|
30
30
|
var Component = (0, _AnnounceDecorator["default"])({
|
|
31
31
|
prop: prop
|
|
32
32
|
}, Div);
|
|
33
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
|
|
33
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
|
|
34
34
|
var expected = 'function';
|
|
35
35
|
|
|
36
36
|
var actual = _typeof(subject.prop(prop));
|
package/BodyText/BodyText.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface BodyTextBaseProps {
|
|
|
11
11
|
* Centers the contents.
|
|
12
12
|
*
|
|
13
13
|
* Applies the `centered` CSS class which can be customized by
|
|
14
|
-
|
|
14
|
+
[theming] .
|
|
15
15
|
*/
|
|
16
16
|
centered?: boolean;
|
|
17
17
|
/**
|
|
@@ -35,7 +35,7 @@ corresponding internal Elements and states of this component.
|
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
export class BodyTextBase extends React.Component<
|
|
38
|
-
|
|
38
|
+
Merge<React.HTMLProps<HTMLElement>, BodyTextBaseProps>
|
|
39
39
|
> {}
|
|
40
40
|
|
|
41
41
|
export interface BodyTextDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
|
|
@@ -49,7 +49,7 @@ export interface BodyTextProps {}
|
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
export class BodyText extends React.Component<
|
|
52
|
-
|
|
52
|
+
Merge<React.HTMLProps<HTMLElement>, BodyTextProps>
|
|
53
53
|
> {}
|
|
54
54
|
|
|
55
55
|
export default BodyText;
|
package/BodyText/BodyText.js
CHANGED
|
@@ -104,7 +104,7 @@ var BodyTextBase = (0, _kind["default"])({
|
|
|
104
104
|
rest = _objectWithoutProperties(_ref2, ["component", "componentRef"]);
|
|
105
105
|
|
|
106
106
|
delete rest.centered;
|
|
107
|
-
return _react["default"].createElement(Component, Object.assign({
|
|
107
|
+
return /*#__PURE__*/_react["default"].createElement(Component, Object.assign({
|
|
108
108
|
ref: componentRef
|
|
109
109
|
}, rest));
|
|
110
110
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
var _react = _interopRequireDefault(require("react"));
|
|
4
6
|
|
|
5
7
|
var _enzyme = require("enzyme");
|
|
@@ -10,14 +12,16 @@ var _Layout = require("../../Layout");
|
|
|
10
12
|
|
|
11
13
|
var _BodyTextModule = _interopRequireDefault(require("../BodyText.module.css"));
|
|
12
14
|
|
|
13
|
-
function
|
|
15
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
16
|
+
|
|
17
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
18
|
|
|
15
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
20
|
|
|
17
21
|
describe('BodyText Specs', function () {
|
|
18
22
|
test('should render a single <p> tag', function () {
|
|
19
23
|
var msg = 'Hello BodyText!';
|
|
20
|
-
var bodyText = (0, _enzyme.mount)(_react["default"].createElement(_BodyText["default"], null, msg));
|
|
24
|
+
var bodyText = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_BodyText["default"], null, msg));
|
|
21
25
|
var bodyTextTag = bodyText.find('p');
|
|
22
26
|
var expected = 1;
|
|
23
27
|
var actual = bodyTextTag.length;
|
|
@@ -25,19 +29,19 @@ describe('BodyText Specs', function () {
|
|
|
25
29
|
});
|
|
26
30
|
test('should render BodyText with content', function () {
|
|
27
31
|
var content = 'Hello BodyText!';
|
|
28
|
-
var bodyTextTag = (0, _enzyme.mount)(_react["default"].createElement(_BodyText["default"], null, content));
|
|
32
|
+
var bodyTextTag = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_BodyText["default"], null, content));
|
|
29
33
|
var expected = content;
|
|
30
34
|
var actual = bodyTextTag.text();
|
|
31
35
|
expect(actual).toBe(expected);
|
|
32
36
|
});
|
|
33
37
|
test('should not include the centered class by default', function () {
|
|
34
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, null));
|
|
38
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, null));
|
|
35
39
|
var expected = false;
|
|
36
40
|
var actual = subject.hasClass(_BodyTextModule["default"].centered);
|
|
37
41
|
expect(actual).toBe(expected);
|
|
38
42
|
});
|
|
39
43
|
test('should include the centered class if `centered` is true', function () {
|
|
40
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
44
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
41
45
|
centered: true
|
|
42
46
|
}));
|
|
43
47
|
var expected = true;
|
|
@@ -46,7 +50,7 @@ describe('BodyText Specs', function () {
|
|
|
46
50
|
});
|
|
47
51
|
test('should support changing the component element to a different DOM node', function () {
|
|
48
52
|
var componentTag = 'address';
|
|
49
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
53
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
50
54
|
component: componentTag
|
|
51
55
|
}));
|
|
52
56
|
var expected = componentTag;
|
|
@@ -55,7 +59,7 @@ describe('BodyText Specs', function () {
|
|
|
55
59
|
});
|
|
56
60
|
test('should support changing the component element to a functional component', function () {
|
|
57
61
|
var component = _Layout.Cell;
|
|
58
|
-
var subject = (0, _enzyme.shallow)(_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
62
|
+
var subject = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_BodyText.BodyTextBase, {
|
|
59
63
|
component: component
|
|
60
64
|
}));
|
|
61
65
|
var expected = component;
|
package/Button/Button.d.ts
CHANGED
|
@@ -44,10 +44,10 @@ locale positioning of the custom component.
|
|
|
44
44
|
*/
|
|
45
45
|
icon?: React.ReactNode;
|
|
46
46
|
/**
|
|
47
|
-
* The component used to render the
|
|
47
|
+
* The component used to render the [icon] .
|
|
48
48
|
*
|
|
49
49
|
* This component will receive the `size` property set on the Button as well as the `icon`
|
|
50
|
-
class to customize its styling. If
|
|
50
|
+
class to customize its styling. If [icon] is not a
|
|
51
51
|
string, this property is not used.
|
|
52
52
|
*/
|
|
53
53
|
iconComponent?: React.ComponentType;
|
|
@@ -55,28 +55,28 @@ string, this property is not used.
|
|
|
55
55
|
* Enforces a minimum width for the component.
|
|
56
56
|
*
|
|
57
57
|
* Applies the `minWidth` CSS class which can be customized by
|
|
58
|
-
|
|
58
|
+
[theming] .
|
|
59
59
|
*/
|
|
60
60
|
minWidth?: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* Indicates the component is depressed.
|
|
63
63
|
*
|
|
64
64
|
* Applies the `pressed` CSS class which can be customized by
|
|
65
|
-
|
|
65
|
+
[theming] .
|
|
66
66
|
*/
|
|
67
67
|
pressed?: boolean;
|
|
68
68
|
/**
|
|
69
69
|
* Indicates the component is selected.
|
|
70
70
|
*
|
|
71
71
|
* Applies the `selected` CSS class which can be customized by
|
|
72
|
-
|
|
72
|
+
[theming] .
|
|
73
73
|
*/
|
|
74
74
|
selected?: boolean;
|
|
75
75
|
/**
|
|
76
76
|
* The size of the button.
|
|
77
77
|
*
|
|
78
78
|
* Applies either the `small` or `large` CSS class which can be customized by
|
|
79
|
-
|
|
79
|
+
[theming] .
|
|
80
80
|
*/
|
|
81
81
|
size?: "small" | "large";
|
|
82
82
|
}
|
|
@@ -85,7 +85,7 @@ string, this property is not used.
|
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
87
|
export class ButtonBase extends React.Component<
|
|
88
|
-
|
|
88
|
+
Merge<React.HTMLProps<HTMLElement>, ButtonBaseProps>
|
|
89
89
|
> {}
|
|
90
90
|
|
|
91
91
|
export interface ButtonDecoratorProps extends ui_Touchable_TouchableProps {}
|
|
@@ -100,7 +100,7 @@ export interface ButtonProps
|
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
102
|
export class Button extends React.Component<
|
|
103
|
-
|
|
103
|
+
Merge<React.HTMLProps<HTMLElement>, ButtonProps>
|
|
104
104
|
> {}
|
|
105
105
|
|
|
106
106
|
export default Button;
|
package/Button/Button.js
CHANGED
|
@@ -185,7 +185,7 @@ var ButtonBase = (0, _kind["default"])({
|
|
|
185
185
|
_icon = _ref2.icon,
|
|
186
186
|
Icon = _ref2.iconComponent,
|
|
187
187
|
size = _ref2.size;
|
|
188
|
-
return typeof _icon === 'string' && Icon ? _react["default"].createElement(Icon, {
|
|
188
|
+
return typeof _icon === 'string' && Icon ? /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
189
189
|
size: size,
|
|
190
190
|
className: css.icon
|
|
191
191
|
}, _icon) : _icon;
|
|
@@ -204,16 +204,16 @@ var ButtonBase = (0, _kind["default"])({
|
|
|
204
204
|
delete rest.pressed;
|
|
205
205
|
delete rest.selected;
|
|
206
206
|
delete rest.size;
|
|
207
|
-
return _react["default"].createElement("div", Object.assign({
|
|
207
|
+
return /*#__PURE__*/_react["default"].createElement("div", Object.assign({
|
|
208
208
|
role: "button"
|
|
209
209
|
}, rest, {
|
|
210
210
|
"aria-disabled": disabled,
|
|
211
211
|
disabled: disabled
|
|
212
|
-
}), decoration ? _react["default"].createElement("div", {
|
|
212
|
+
}), decoration ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
213
213
|
className: css.decoration
|
|
214
|
-
}, decoration) : null, _react["default"].createElement("div", {
|
|
214
|
+
}, decoration) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
215
215
|
className: css.bg
|
|
216
|
-
}), _react["default"].createElement("div", {
|
|
216
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
217
|
className: css.client
|
|
218
218
|
}, icon, children));
|
|
219
219
|
}
|
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
|
+
## [3.2.7] - 2022-01-17
|
|
6
|
+
|
|
7
|
+
No significant changes.
|
|
8
|
+
|
|
9
|
+
## [3.2.6] - 2020-03-26
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `ui/VirtualList.VirtualGridList` and `ui/VirtualList.VirtualList` to show items properly when reducing data size by updating `firstIndex` correctly
|
|
14
|
+
- `ui/VirtualList.VirtualList` and `ui/VirtualList.VirtualGridList` not to suddenly jump when pressing directional keys after wheeling
|
|
15
|
+
- `ui/VirtualList.VirtualList` and `ui/VirtualList.VirtualGridList` to show items properly when reducing data size
|
|
16
|
+
|
|
17
|
+
## [3.2.5] - 2019-11-14
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- `ui/Marquee` to not double aria readout for marqueeing contents
|
|
22
|
+
|
|
23
|
+
## [3.2.4] - 2019-11-07
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- `ui/Marquee` text alignment when content is centered
|
|
28
|
+
|
|
5
29
|
## [3.2.3] - 2019-11-01
|
|
6
30
|
|
|
7
31
|
### Fixed
|
package/Cancelable/Cancelable.js
CHANGED
|
@@ -35,7 +35,7 @@ var _modalHandler = require("./modalHandler");
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
37
|
|
|
38
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
38
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
39
39
|
|
|
40
40
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
41
41
|
|
|
@@ -43,12 +43,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
43
43
|
|
|
44
44
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
45
45
|
|
|
46
|
-
function
|
|
46
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
47
47
|
|
|
48
|
-
function
|
|
48
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
49
49
|
|
|
50
50
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
51
51
|
|
|
52
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
53
|
+
|
|
54
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
55
|
+
|
|
52
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
53
57
|
|
|
54
58
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -186,17 +190,17 @@ var Cancelable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped)
|
|
|
186
190
|
return stopped;
|
|
187
191
|
};
|
|
188
192
|
|
|
189
|
-
return _temp = _class =
|
|
190
|
-
/*#__PURE__*/
|
|
191
|
-
function (_React$Component) {
|
|
193
|
+
return _temp = _class = /*#__PURE__*/function (_React$Component) {
|
|
192
194
|
_inherits(_class, _React$Component);
|
|
193
195
|
|
|
196
|
+
var _super = _createSuper(_class);
|
|
197
|
+
|
|
194
198
|
function _class(props) {
|
|
195
199
|
var _this;
|
|
196
200
|
|
|
197
201
|
_classCallCheck(this, _class);
|
|
198
202
|
|
|
199
|
-
_this =
|
|
203
|
+
_this = _super.call(this, props);
|
|
200
204
|
_this.handle = _handle.handle.bind(_assertThisInitialized(_this));
|
|
201
205
|
_this.handleCancel = _this.handle(_cancelHandler.forCancel, (0, _handle.forward)('onCancel'), dispatchCancelToConfig, _handle.stop, _handle.stopImmediate);
|
|
202
206
|
_this.handleKeyUp = _this.handle((0, _handle.forward)('onKeyUp'), // nesting handlers for DRYness. note that if any conditions return false in
|
|
@@ -216,21 +220,21 @@ var Cancelable = (0, _hoc["default"])(defaultConfig, function (config, Wrapped)
|
|
|
216
220
|
}, {
|
|
217
221
|
key: "renderWrapped",
|
|
218
222
|
value: function renderWrapped(props) {
|
|
219
|
-
return _react["default"].createElement(Component, {
|
|
223
|
+
return /*#__PURE__*/_react["default"].createElement(Component, {
|
|
220
224
|
onKeyUp: this.handleKeyUp
|
|
221
|
-
}, _react["default"].createElement(Wrapped, props));
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement(Wrapped, props));
|
|
222
226
|
}
|
|
223
227
|
}, {
|
|
224
228
|
key: "renderUnwrapped",
|
|
225
229
|
value: function renderUnwrapped(props) {
|
|
226
|
-
return _react["default"].createElement(Wrapped, Object.assign({}, props, {
|
|
230
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapped, Object.assign({}, props, {
|
|
227
231
|
onKeyUp: this.handleKeyUp
|
|
228
232
|
}));
|
|
229
233
|
}
|
|
230
234
|
}, {
|
|
231
235
|
key: "renderModal",
|
|
232
236
|
value: function renderModal(props) {
|
|
233
|
-
return _react["default"].createElement(Wrapped, props);
|
|
237
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapped, props);
|
|
234
238
|
}
|
|
235
239
|
}, {
|
|
236
240
|
key: "render",
|