@enact/ui 4.0.5 → 4.0.9
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/CHANGELOG.md +18 -0
- package/Marquee/Marquee.module.css +1 -1
- package/Marquee/MarqueeDecorator.js +8 -15
- package/ViewManager/View.js +2 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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.0.9] - 2021-12-15
|
|
6
|
+
|
|
7
|
+
No significant changes.
|
|
8
|
+
|
|
9
|
+
## [4.0.8] - 2021-10-21
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
`ui/MarqueeDecorator` style to render text properly when starting animation
|
|
14
|
+
|
|
15
|
+
## [4.0.7] - 2021-09-28
|
|
16
|
+
|
|
17
|
+
No significant changes.
|
|
18
|
+
|
|
19
|
+
## [4.0.6] - 2021-09-28
|
|
20
|
+
|
|
21
|
+
No significant changes.
|
|
22
|
+
|
|
5
23
|
## [4.0.5] - 2021-08-02
|
|
6
24
|
|
|
7
25
|
No significant changes.
|
|
@@ -21,8 +21,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
21
21
|
|
|
22
22
|
var _react = require("react");
|
|
23
23
|
|
|
24
|
-
var _shallowEqual = _interopRequireDefault(require("recompose/shallowEqual"));
|
|
25
|
-
|
|
26
24
|
var _warning = _interopRequireDefault(require("warning"));
|
|
27
25
|
|
|
28
26
|
var _resolution = require("../resolution");
|
|
@@ -229,8 +227,8 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
229
227
|
return rtl;
|
|
230
228
|
};
|
|
231
229
|
|
|
232
|
-
return _temp = _class = /*#__PURE__*/function (
|
|
233
|
-
_inherits(_class,
|
|
230
|
+
return _temp = _class = /*#__PURE__*/function (_PureComponent) {
|
|
231
|
+
_inherits(_class, _PureComponent);
|
|
234
232
|
|
|
235
233
|
var _super = _createSuper(_class);
|
|
236
234
|
|
|
@@ -241,7 +239,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
241
239
|
|
|
242
240
|
_this = _super.call(this, props);
|
|
243
241
|
_this.promoteJob = new _util.Job(function () {
|
|
244
|
-
if (
|
|
242
|
+
if (_this.contentFits === false) {
|
|
245
243
|
_this.setState(function (state) {
|
|
246
244
|
return state.promoted ? null : {
|
|
247
245
|
promoted: true
|
|
@@ -272,7 +270,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
272
270
|
_this.setTimeout(function () {
|
|
273
271
|
_this.calculateMetrics();
|
|
274
272
|
|
|
275
|
-
if (
|
|
273
|
+
if (_this.contentFits === false) {
|
|
276
274
|
_this.setState({
|
|
277
275
|
promoted: true,
|
|
278
276
|
animating: true
|
|
@@ -450,7 +448,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
450
448
|
_this.sync = false;
|
|
451
449
|
_this.timerState = TimerState.CLEAR;
|
|
452
450
|
_this.distance = null;
|
|
453
|
-
_this.contentFits =
|
|
451
|
+
_this.contentFits = null;
|
|
454
452
|
_this.resizeRegistry = null;
|
|
455
453
|
return _this;
|
|
456
454
|
}
|
|
@@ -474,11 +472,6 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
474
472
|
|
|
475
473
|
(0, _dispatcher.on)('keydown', this.handlePointerHide, document);
|
|
476
474
|
}
|
|
477
|
-
}, {
|
|
478
|
-
key: "shouldComponentUpdate",
|
|
479
|
-
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
480
|
-
return !(0, _shallowEqual["default"])(this.state, nextState) || !(0, _shallowEqual["default"])(this.props, nextProps);
|
|
481
|
-
}
|
|
482
475
|
}, {
|
|
483
476
|
key: "componentDidUpdate",
|
|
484
477
|
value: function componentDidUpdate(prevProps) {
|
|
@@ -494,7 +487,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
494
487
|
rtl = _this$props.rtl;
|
|
495
488
|
var forceRestartMarquee = false;
|
|
496
489
|
|
|
497
|
-
if (prevProps.locale !== locale || prevProps.rtl !== rtl || prevProps.marqueeSpacing !== marqueeSpacing || !(0,
|
|
490
|
+
if (prevProps.locale !== locale || prevProps.rtl !== rtl || prevProps.marqueeSpacing !== marqueeSpacing || !(0, _util.shallowEqual)(prevProps.children, children) || invalidateProps && didPropChange(invalidateProps, prevProps, this.props)) {
|
|
498
491
|
// restart marqueeOn="render" marquees or synced marquees that were animating
|
|
499
492
|
forceRestartMarquee = marqueeOn === 'render' || this.sync && (this.state.animating || this.timerState > TimerState.CLEAR);
|
|
500
493
|
this.invalidateMetrics();
|
|
@@ -614,7 +607,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
614
607
|
|
|
615
608
|
this.distance = null; // Assume the marquee does not fit until calculations show otherwise
|
|
616
609
|
|
|
617
|
-
this.contentFits =
|
|
610
|
+
this.contentFits = null;
|
|
618
611
|
this.setState(function (state) {
|
|
619
612
|
if (state.overflow === 'ellipsis' && state.promoted === false) return null;
|
|
620
613
|
return {
|
|
@@ -885,7 +878,7 @@ var MarqueeDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wra
|
|
|
885
878
|
}]);
|
|
886
879
|
|
|
887
880
|
return _class;
|
|
888
|
-
}(_react.
|
|
881
|
+
}(_react.PureComponent), _class.displayName = 'ui:MarqueeDecorator', _class.propTypes =
|
|
889
882
|
/** @lends ui/Marquee.MarqueeDecorator.prototype */
|
|
890
883
|
{
|
|
891
884
|
/**
|
package/ViewManager/View.js
CHANGED
|
@@ -214,6 +214,8 @@ var View = /*#__PURE__*/function (_Component) {
|
|
|
214
214
|
// FIXME: `startRafAfter` is a temporary solution using rAF. We need a better way to handle
|
|
215
215
|
// transition cycle and component life cycle to be in sync. See ENYO-4835.
|
|
216
216
|
this.enteringJob.startRafAfter(enteringDelay);
|
|
217
|
+
} else {
|
|
218
|
+
this.enteringJob.start();
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9",
|
|
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.0.
|
|
28
|
+
"@enact/core": "^4.0.9",
|
|
29
29
|
"classnames": "^2.2.5",
|
|
30
30
|
"direction": "^1.0.1",
|
|
31
31
|
"invariant": "^2.2.2",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"react": "^17.0.1",
|
|
35
35
|
"react-dom": "^17.0.1",
|
|
36
36
|
"react-is": "^17.0.1",
|
|
37
|
-
"recompose": "^0.30.0",
|
|
38
37
|
"warning": "^3.0.0"
|
|
39
38
|
}
|
|
40
39
|
}
|