@enact/ui 4.5.2 → 4.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnnounceDecorator/Announce.js +1 -40
- package/AnnounceDecorator/AnnounceDecorator.js +3 -21
- package/AnnounceDecorator/tests/Announce-specs.js +2 -7
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -6
- package/AnnounceDecorator/tests/useAnnounce-specs.js +8 -19
- package/AnnounceDecorator/useAnnounce.js +0 -6
- package/BodyText/BodyText.js +6 -26
- package/BodyText/tests/BodyText-specs.js +0 -19
- package/Button/Button.js +26 -56
- package/Button/tests/Button-specs.js +0 -26
- package/CHANGELOG.md +4 -0
- package/Cancelable/Cancelable.js +8 -47
- package/Cancelable/cancelHandler.js +5 -12
- package/Cancelable/modalHandler.js +3 -11
- package/Cancelable/tests/Cancelable-specs.js +3 -57
- package/Changeable/Changeable.js +2 -34
- package/Changeable/tests/Changeable-specs.js +20 -66
- package/ComponentOverride/ComponentOverride.js +1 -13
- package/FloatingLayer/FloatingLayer.js +17 -73
- package/FloatingLayer/FloatingLayerContainer.js +0 -15
- package/FloatingLayer/FloatingLayerDecorator.js +4 -17
- package/FloatingLayer/Scrim.js +9 -53
- package/FloatingLayer/index.js +0 -4
- package/FloatingLayer/tests/FloatingLayer-specs.js +8 -22
- package/FloatingLayer/tests/Scrim-specs.js +0 -9
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +0 -13
- package/FloatingLayer/useFloatingLayer.js +3 -14
- package/FloatingLayer/useFloatingLayerDecorator.js +3 -11
- package/ForwardRef/ForwardRef.js +1 -10
- package/GridListImageItem/GridListImageItem.js +17 -50
- package/Group/Group.js +4 -35
- package/Group/GroupItem.js +15 -32
- package/Group/tests/Group-specs.js +0 -32
- package/Heading/Heading.js +7 -35
- package/Heading/tests/Heading-specs.js +81 -14
- package/Icon/Icon.js +14 -48
- package/Icon/tests/Icon-specs.js +0 -22
- package/IconButton/IconButton.js +12 -50
- package/IconButton/tests/IconButton-specs.js +0 -7
- package/Image/Image.js +16 -45
- package/Image/tests/Image-specs.js +0 -14
- package/ImageItem/ImageItem.js +17 -46
- package/ImageItem/tests/ImageItem-specs.js +0 -25
- package/Item/Item.js +8 -32
- package/Item/tests/Item-specs.js +0 -24
- package/LabeledIcon/LabeledIcon.js +19 -50
- package/LabeledIcon/tests/LabeledIcon-specs.js +0 -14
- package/Layout/Cell.js +11 -37
- package/Layout/Layout.js +14 -37
- package/Layout/tests/Layout-specs.js +10 -39
- package/Marquee/MarqueeBase.js +29 -63
- package/Marquee/MarqueeController.js +11 -72
- package/Marquee/MarqueeDecorator.js +62 -196
- package/Marquee/index.js +1 -5
- package/Marquee/tests/Marquee-specs.js +258 -87
- package/Measurable/Measurable.js +12 -34
- package/Measurable/tests/Measurable-specs.js +115 -0
- package/Media/Media.js +15 -65
- package/Media/tests/Media-specs.js +168 -0
- package/Placeholder/PlaceholderControllerDecorator.js +7 -43
- package/Placeholder/PlaceholderDecorator.js +7 -38
- package/Placeholder/index.js +0 -4
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +25 -0
- package/Placeholder/tests/PlaceholderDecorator-specs.js +28 -0
- package/ProgressBar/ProgressBar.js +13 -44
- package/ProgressBar/tests/ProgressBar-specs.js +0 -17
- package/RadioDecorator/RadioControllerDecorator.js +1 -29
- package/RadioDecorator/RadioDecorator.js +4 -42
- package/RadioDecorator/tests/RadioDecorator-specs.js +12 -49
- package/Repeater/Repeater.js +9 -33
- package/Repeater/tests/Repeater-specs.js +0 -38
- package/Resizable/Resizable.js +7 -35
- package/Resizable/tests/Resizable-specs.js +34 -0
- package/Routable/Link.js +8 -44
- package/Routable/Routable.js +10 -33
- package/Routable/Route.js +0 -6
- package/Routable/Router.js +13 -56
- package/Routable/tests/Routable-specs.js +7 -33
- package/Routable/tests/Router-specs.js +18 -44
- package/Routable/useLink.js +4 -8
- package/Routable/util.js +18 -24
- package/Scrollable/ScrollAnimator.js +49 -65
- package/Scrollable/ScrollThumb.js +2 -13
- package/Scrollable/Scrollable.js +179 -386
- package/Scrollable/ScrollableNative.js +188 -391
- package/Scrollable/Scrollbar.js +28 -100
- package/Scroller/Scroller.js +15 -39
- package/Scroller/ScrollerBasic.js +34 -89
- package/Scroller/UiScrollerBase.js +31 -84
- package/Skinnable/Skinnable.js +11 -38
- package/Skinnable/tests/Skinnable-specs.js +3 -74
- package/Skinnable/tests/useSkins-specs.js +1 -13
- package/Skinnable/tests/util-specs.js +0 -14
- package/Skinnable/useSkins.js +8 -15
- package/Skinnable/util.js +9 -20
- package/Slider/Knob.js +5 -24
- package/Slider/PositionDecorator.js +16 -54
- package/Slider/Slider.js +26 -64
- package/Slider/tests/Slider-specs.js +94 -7
- package/Slider/utils.js +0 -2
- package/SlotItem/SlotItem.js +15 -41
- package/SlotItem/tests/SlotItem-specs.js +0 -5
- package/Slottable/Slottable.js +4 -12
- package/Slottable/tests/Slottable-specs.js +19 -46
- package/Slottable/tests/useSlots-specs.js +27 -65
- package/Slottable/useSlots.js +8 -33
- package/Spinner/Spinner.js +15 -42
- package/Spinner/tests/Spinner-specs.js +0 -15
- package/ToggleIcon/ToggleIcon.js +10 -36
- package/ToggleIcon/tests/ToggleIcon-specs.js +0 -16
- package/ToggleItem/ToggleItem.js +15 -52
- package/ToggleItem/tests/ToggleItem-specs.js +0 -30
- package/Toggleable/Toggle.js +1 -15
- package/Toggleable/Toggleable.js +12 -45
- package/Toggleable/tests/Toggleable-specs.js +28 -96
- package/Toggleable/useToggle.js +3 -19
- package/Touchable/ClickAllow.js +5 -14
- package/Touchable/Drag.js +16 -54
- package/Touchable/Flick.js +11 -42
- package/Touchable/Hold.js +21 -68
- package/Touchable/Touch.js +37 -65
- package/Touchable/Touchable.js +32 -71
- package/Touchable/config.js +8 -22
- package/Touchable/tests/Touchable-specs.js +270 -119
- package/Touchable/tests/useTouch-specs.js +6 -80
- package/Touchable/useTouch.js +17 -34
- package/Transition/Transition.js +37 -118
- package/Transition/tests/Transition-specs.js +20 -60
- package/ViewManager/Arranger.js +10 -22
- package/ViewManager/TransitionGroup.js +31 -106
- package/ViewManager/View.js +35 -91
- package/ViewManager/ViewManager.js +19 -83
- package/ViewManager/tests/View-specs.js +0 -17
- package/ViewManager/tests/ViewManager-specs.js +236 -305
- package/ViewManager/tests/test-utils.js +0 -8
- package/VirtualList/UiVirtualListBase.js +256 -406
- package/VirtualList/VirtualList.js +29 -69
- package/VirtualList/VirtualListBase.js +0 -3
- package/VirtualList/VirtualListBasic.js +270 -428
- package/VirtualList/tests/VirtualList-specs.js +9 -37
- package/internal/IdProvider/IdProvider.js +7 -21
- package/internal/IdProvider/Provider.js +4 -17
- package/internal/IdProvider/tests/IdProvider-specs.js +44 -0
- package/internal/IdProvider/tests/useId-specs.js +7 -22
- package/internal/IdProvider/useId.js +0 -6
- package/internal/Pure/Pure.js +3 -30
- package/internal/Pure/tests/Pure-specs.js +88 -0
- package/internal/localized-fonts/localized-fonts.js +33 -62
- package/internal/localized-fonts/tests/localized-fonts-specs.js +33 -0
- package/internal/selection/selection.js +1 -6
- package/internal/selection/tests/selection-specs.js +6 -4
- package/internal/validators/tests/validators-specs.js +80 -0
- package/internal/validators/validators.js +14 -34
- package/package.json +8 -2
- package/resolution/ResolutionDecorator.js +4 -40
- package/resolution/index.js +0 -7
- package/resolution/resolution.js +42 -80
- package/resolution/tests/ResolutionDecorator-specs.js +4 -11
- package/resolution/tests/resolution-specs.js +2 -2
- package/useControlledState/tests/useControlledState-specs.js +15 -46
- package/useControlledState/useControlledState.js +11 -22
- package/useScroll/ScrollAnimator.js +49 -65
- package/useScroll/Scrollbar.js +22 -58
- package/useScroll/ScrollbarTrack.js +3 -19
- package/useScroll/useScroll.js +267 -454
- package/useScroll/utilDOM.js +8 -14
- package/useScroll/utilEvent.js +0 -4
|
@@ -4,54 +4,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.MarqueeControllerContext = exports.MarqueeController = void 0;
|
|
7
|
-
|
|
8
7
|
var _handle = require("@enact/core/handle");
|
|
9
|
-
|
|
10
8
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
11
|
-
|
|
12
9
|
var _util = require("@enact/core/util");
|
|
13
|
-
|
|
14
10
|
var _react = require("react");
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
13
|
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; }
|
|
21
|
-
|
|
22
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
|
|
24
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
-
|
|
26
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
|
|
28
17
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
-
|
|
30
18
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
-
|
|
32
19
|
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
|
-
|
|
34
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
21
|
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
|
-
|
|
38
22
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
39
|
-
|
|
40
23
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
24
|
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
|
-
|
|
44
25
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
-
|
|
46
26
|
var STATE = {
|
|
47
27
|
inactive: 0,
|
|
48
28
|
// Marquee is not necessary (render or focus not happened)
|
|
49
29
|
active: 1,
|
|
50
30
|
// Marquee in progress, awaiting complete
|
|
51
31
|
ready: 2 // Marquee completed or not needed, but state is active
|
|
52
|
-
|
|
53
32
|
};
|
|
33
|
+
|
|
54
34
|
var MarqueeControllerContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
35
|
+
|
|
55
36
|
/**
|
|
56
37
|
* Default configuration parameters for {@link ui/Marquee.MarqueeController}.
|
|
57
38
|
*
|
|
@@ -59,7 +40,6 @@ var MarqueeControllerContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
|
59
40
|
* @memberof ui/Marquee.MarqueeController
|
|
60
41
|
* @hocconfig
|
|
61
42
|
*/
|
|
62
|
-
|
|
63
43
|
exports.MarqueeControllerContext = MarqueeControllerContext;
|
|
64
44
|
var defaultConfig = {
|
|
65
45
|
/**
|
|
@@ -73,6 +53,7 @@ var defaultConfig = {
|
|
|
73
53
|
*/
|
|
74
54
|
marqueeOnFocus: false
|
|
75
55
|
};
|
|
56
|
+
|
|
76
57
|
/**
|
|
77
58
|
* A higher-order component that synchronizes contained `Marquee`s.
|
|
78
59
|
*
|
|
@@ -80,133 +61,96 @@ var defaultConfig = {
|
|
|
80
61
|
* @hoc
|
|
81
62
|
* @public
|
|
82
63
|
*/
|
|
83
|
-
|
|
84
64
|
var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
|
|
85
65
|
var _class;
|
|
86
|
-
|
|
87
66
|
var marqueeOnFocus = config.marqueeOnFocus;
|
|
88
67
|
var forwardBlur = (0, _handle.forward)('onBlur');
|
|
89
68
|
var forwardFocus = (0, _handle.forward)('onFocus');
|
|
90
69
|
return _class = /*#__PURE__*/function (_Component) {
|
|
91
70
|
_inherits(_class, _Component);
|
|
92
|
-
|
|
93
71
|
var _super = _createSuper(_class);
|
|
94
|
-
|
|
95
72
|
function _class(props) {
|
|
96
73
|
var _this;
|
|
97
|
-
|
|
98
74
|
_classCallCheck(this, _class);
|
|
99
|
-
|
|
100
75
|
_this = _super.call(this, props);
|
|
101
76
|
_this.cancelJob = new _util.Job(function () {
|
|
102
77
|
return _this.doCancel();
|
|
103
78
|
}, 30);
|
|
104
|
-
|
|
105
79
|
_this.handleRegister = function (component, handlers) {
|
|
106
80
|
var needsStart = !_this.allInactive() || _this.isFocused;
|
|
107
|
-
|
|
108
81
|
_this.controlled.push(_objectSpread(_objectSpread({}, handlers), {}, {
|
|
109
82
|
state: STATE.inactive,
|
|
110
83
|
component: component
|
|
111
84
|
}));
|
|
112
|
-
|
|
113
85
|
if (needsStart) {
|
|
114
86
|
_this.dispatch('start');
|
|
115
87
|
}
|
|
116
88
|
};
|
|
117
|
-
|
|
118
89
|
_this.handleUnregister = function (component) {
|
|
119
90
|
var wasRunning = false;
|
|
120
|
-
|
|
121
91
|
for (var i = 0; i < _this.controlled.length; i++) {
|
|
122
92
|
if (_this.controlled[i].component === component) {
|
|
123
93
|
wasRunning = _this.controlled[i].state === STATE.active;
|
|
124
|
-
|
|
125
94
|
_this.controlled.splice(i, 1);
|
|
126
|
-
|
|
127
95
|
break;
|
|
128
96
|
}
|
|
129
97
|
}
|
|
130
|
-
|
|
131
98
|
if (wasRunning && !_this.anyRunning()) {
|
|
132
99
|
_this.dispatch('start');
|
|
133
100
|
}
|
|
134
101
|
};
|
|
135
|
-
|
|
136
102
|
_this.handleStart = function (component) {
|
|
137
103
|
_this.cancelJob.stop();
|
|
138
|
-
|
|
139
104
|
if (!_this.anyRunning()) {
|
|
140
105
|
_this.markAll(STATE.ready);
|
|
141
|
-
|
|
142
106
|
_this.dispatch('start', component);
|
|
143
107
|
}
|
|
144
108
|
};
|
|
145
|
-
|
|
146
109
|
_this.handleCancel = function () {
|
|
147
110
|
if (_this.anyRunning()) {
|
|
148
111
|
_this.cancelJob.start();
|
|
149
112
|
}
|
|
150
113
|
};
|
|
151
|
-
|
|
152
114
|
_this.doCancel = function () {
|
|
153
115
|
if (_this.isHovered || _this.isFocused) {
|
|
154
116
|
return;
|
|
155
117
|
}
|
|
156
|
-
|
|
157
118
|
_this.markAll(STATE.inactive);
|
|
158
|
-
|
|
159
119
|
_this.dispatch('stop');
|
|
160
120
|
};
|
|
161
|
-
|
|
162
121
|
_this.handleComplete = function (component) {
|
|
163
122
|
var complete = _this.markReady(component);
|
|
164
|
-
|
|
165
123
|
if (complete) {
|
|
166
124
|
_this.markAll(STATE.ready);
|
|
167
|
-
|
|
168
125
|
_this.dispatch('start');
|
|
169
126
|
}
|
|
170
127
|
};
|
|
171
|
-
|
|
172
128
|
_this.handleEnter = function () {
|
|
173
129
|
_this.isHovered = true;
|
|
174
|
-
|
|
175
130
|
if (!_this.anyRunning()) {
|
|
176
131
|
_this.dispatch('start');
|
|
177
132
|
}
|
|
178
|
-
|
|
179
133
|
_this.cancelJob.stop();
|
|
180
134
|
};
|
|
181
|
-
|
|
182
135
|
_this.handleLeave = function () {
|
|
183
136
|
_this.isHovered = false;
|
|
184
|
-
|
|
185
137
|
_this.cancelJob.start();
|
|
186
138
|
};
|
|
187
|
-
|
|
188
139
|
_this.handleFocus = function (ev) {
|
|
189
140
|
_this.isFocused = true;
|
|
190
|
-
|
|
191
141
|
if (!_this.anyRunning()) {
|
|
192
142
|
_this.dispatch('start');
|
|
193
143
|
}
|
|
194
|
-
|
|
195
144
|
_this.cancelJob.stop();
|
|
196
|
-
|
|
197
145
|
forwardFocus(ev, _this.props);
|
|
198
146
|
};
|
|
199
|
-
|
|
200
147
|
_this.handleBlur = function (ev) {
|
|
201
148
|
_this.isFocused = false;
|
|
202
|
-
|
|
203
149
|
if (_this.anyRunning()) {
|
|
204
150
|
_this.cancelJob.start();
|
|
205
151
|
}
|
|
206
|
-
|
|
207
152
|
forwardBlur(ev, _this.props);
|
|
208
153
|
};
|
|
209
|
-
|
|
210
154
|
_this.controlled = [];
|
|
211
155
|
_this.isFocused = false;
|
|
212
156
|
_this.childContext = {
|
|
@@ -220,7 +164,6 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
220
164
|
};
|
|
221
165
|
return _this;
|
|
222
166
|
}
|
|
223
|
-
|
|
224
167
|
_createClass(_class, [{
|
|
225
168
|
key: "componentWillUnmount",
|
|
226
169
|
value: function componentWillUnmount() {
|
|
@@ -241,12 +184,12 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
241
184
|
function dispatch(action, component) {
|
|
242
185
|
this.controlled.forEach(function (controlled) {
|
|
243
186
|
var controlledComponent = controlled.component,
|
|
244
|
-
|
|
245
|
-
|
|
187
|
+
handler = controlled[action];
|
|
246
188
|
if (component !== controlledComponent && typeof handler === 'function') {
|
|
247
|
-
var complete = handler.call(controlledComponent);
|
|
248
|
-
// unnecessary and is therefore not awaiting a finish
|
|
189
|
+
var complete = handler.call(controlledComponent);
|
|
249
190
|
|
|
191
|
+
// Returning `true` from a start request means that the marqueeing is
|
|
192
|
+
// unnecessary and is therefore not awaiting a finish
|
|
250
193
|
if (action === 'start' && complete) {
|
|
251
194
|
controlled.state = STATE.ready;
|
|
252
195
|
} else if (action === 'start') {
|
|
@@ -257,6 +200,7 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
257
200
|
}
|
|
258
201
|
});
|
|
259
202
|
}
|
|
203
|
+
|
|
260
204
|
/*
|
|
261
205
|
* Marks all components with the passed-in state
|
|
262
206
|
*
|
|
@@ -264,7 +208,6 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
264
208
|
*
|
|
265
209
|
* @returns {undefined}
|
|
266
210
|
*/
|
|
267
|
-
|
|
268
211
|
}, {
|
|
269
212
|
key: "markAll",
|
|
270
213
|
value: function markAll(state) {
|
|
@@ -272,6 +215,7 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
272
215
|
c.state = state;
|
|
273
216
|
});
|
|
274
217
|
}
|
|
218
|
+
|
|
275
219
|
/*
|
|
276
220
|
* Marks `component` as ready for next marquee action
|
|
277
221
|
*
|
|
@@ -279,7 +223,6 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
279
223
|
*
|
|
280
224
|
* @returns {Boolean} `true` if no components are STATE.active
|
|
281
225
|
*/
|
|
282
|
-
|
|
283
226
|
}, {
|
|
284
227
|
key: "markReady",
|
|
285
228
|
value: function markReady(component) {
|
|
@@ -288,17 +231,16 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
288
231
|
if (c.component === component) {
|
|
289
232
|
c.state = STATE.ready;
|
|
290
233
|
}
|
|
291
|
-
|
|
292
234
|
complete = complete && c.state !== STATE.active;
|
|
293
235
|
});
|
|
294
236
|
return complete;
|
|
295
237
|
}
|
|
238
|
+
|
|
296
239
|
/*
|
|
297
240
|
* Checks that all components are inactive
|
|
298
241
|
*
|
|
299
242
|
* @returns {Boolean} `true` if any components should be running
|
|
300
243
|
*/
|
|
301
|
-
|
|
302
244
|
}, {
|
|
303
245
|
key: "allInactive",
|
|
304
246
|
value: function allInactive() {
|
|
@@ -307,12 +249,12 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
307
249
|
}, false);
|
|
308
250
|
return !activeOrReady;
|
|
309
251
|
}
|
|
252
|
+
|
|
310
253
|
/*
|
|
311
254
|
* Checks for any components currently marqueeing
|
|
312
255
|
*
|
|
313
256
|
* @returns {Boolean} `true` if any component is marqueeing
|
|
314
257
|
*/
|
|
315
|
-
|
|
316
258
|
}, {
|
|
317
259
|
key: "anyRunning",
|
|
318
260
|
value: function anyRunning() {
|
|
@@ -324,21 +266,18 @@ var MarqueeController = (0, _hoc["default"])(defaultConfig, function (config, Wr
|
|
|
324
266
|
key: "render",
|
|
325
267
|
value: function render() {
|
|
326
268
|
var props = this.props;
|
|
327
|
-
|
|
328
269
|
if (marqueeOnFocus) {
|
|
329
270
|
props = _objectSpread(_objectSpread({}, this.props), {}, {
|
|
330
271
|
onBlur: this.handleBlur,
|
|
331
272
|
onFocus: this.handleFocus
|
|
332
273
|
});
|
|
333
274
|
}
|
|
334
|
-
|
|
335
275
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarqueeControllerContext.Provider, {
|
|
336
276
|
value: this.childContext,
|
|
337
277
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapped, _objectSpread({}, props))
|
|
338
278
|
});
|
|
339
279
|
}
|
|
340
280
|
}]);
|
|
341
|
-
|
|
342
281
|
return _class;
|
|
343
282
|
}(_react.Component), _class.displayName = 'MarqueeController', _class;
|
|
344
283
|
});
|