@micromag/screen-quote 0.2.404 → 0.2.408
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/es/index.js +6 -1
- package/lib/index.js +6 -1
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -27,6 +27,7 @@ var propTypes = {
|
|
|
27
27
|
background: PropTypes$1.backgroundElement,
|
|
28
28
|
callToAction: PropTypes$1.callToAction,
|
|
29
29
|
current: PropTypes.bool,
|
|
30
|
+
active: PropTypes.bool,
|
|
30
31
|
transitions: PropTypes$1.transitions,
|
|
31
32
|
transitionStagger: PropTypes.number,
|
|
32
33
|
className: PropTypes.string
|
|
@@ -39,6 +40,7 @@ var defaultProps = {
|
|
|
39
40
|
background: null,
|
|
40
41
|
callToAction: null,
|
|
41
42
|
current: true,
|
|
43
|
+
active: true,
|
|
42
44
|
transitions: null,
|
|
43
45
|
transitionStagger: 100,
|
|
44
46
|
className: null
|
|
@@ -54,6 +56,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
54
56
|
background = _ref.background,
|
|
55
57
|
callToAction = _ref.callToAction,
|
|
56
58
|
current = _ref.current,
|
|
59
|
+
active = _ref.active,
|
|
57
60
|
transitions = _ref.transitions,
|
|
58
61
|
transitionStagger = _ref.transitionStagger,
|
|
59
62
|
className = _ref.className;
|
|
@@ -84,6 +87,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
84
87
|
var transitionPlaying = current;
|
|
85
88
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
86
89
|
var backgroundPlaying = current && (isView || isEdit);
|
|
90
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
87
91
|
var hasCallToAction = callToAction !== null && callToAction.active === true;
|
|
88
92
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React.createElement(Spacer, {
|
|
89
93
|
key: "spacer-cta-top"
|
|
@@ -139,7 +143,8 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
139
143
|
background: background,
|
|
140
144
|
width: width,
|
|
141
145
|
height: height,
|
|
142
|
-
playing: backgroundPlaying
|
|
146
|
+
playing: backgroundPlaying,
|
|
147
|
+
shouldLoad: backgroundShouldLoad
|
|
143
148
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
144
149
|
width: width,
|
|
145
150
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -46,6 +46,7 @@ var propTypes = {
|
|
|
46
46
|
background: core.PropTypes.backgroundElement,
|
|
47
47
|
callToAction: core.PropTypes.callToAction,
|
|
48
48
|
current: PropTypes__default["default"].bool,
|
|
49
|
+
active: PropTypes__default["default"].bool,
|
|
49
50
|
transitions: core.PropTypes.transitions,
|
|
50
51
|
transitionStagger: PropTypes__default["default"].number,
|
|
51
52
|
className: PropTypes__default["default"].string
|
|
@@ -58,6 +59,7 @@ var defaultProps = {
|
|
|
58
59
|
background: null,
|
|
59
60
|
callToAction: null,
|
|
60
61
|
current: true,
|
|
62
|
+
active: true,
|
|
61
63
|
transitions: null,
|
|
62
64
|
transitionStagger: 100,
|
|
63
65
|
className: null
|
|
@@ -73,6 +75,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
73
75
|
background = _ref.background,
|
|
74
76
|
callToAction = _ref.callToAction,
|
|
75
77
|
current = _ref.current,
|
|
78
|
+
active = _ref.active,
|
|
76
79
|
transitions = _ref.transitions,
|
|
77
80
|
transitionStagger = _ref.transitionStagger,
|
|
78
81
|
className = _ref.className;
|
|
@@ -103,6 +106,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
103
106
|
var transitionPlaying = current;
|
|
104
107
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
105
108
|
var backgroundPlaying = current && (isView || isEdit);
|
|
109
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
106
110
|
var hasCallToAction = callToAction !== null && callToAction.active === true;
|
|
107
111
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
108
112
|
key: "spacer-cta-top"
|
|
@@ -158,7 +162,8 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
158
162
|
background: background,
|
|
159
163
|
width: width,
|
|
160
164
|
height: height,
|
|
161
|
-
playing: backgroundPlaying
|
|
165
|
+
playing: backgroundPlaying,
|
|
166
|
+
shouldLoad: backgroundShouldLoad
|
|
162
167
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
163
168
|
width: width,
|
|
164
169
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quote",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.408",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.2.
|
|
53
|
-
"@micromag/element-background": "^0.2.
|
|
54
|
-
"@micromag/element-call-to-action": "^0.2.
|
|
55
|
-
"@micromag/element-container": "^0.2.
|
|
56
|
-
"@micromag/element-layout": "^0.2.
|
|
57
|
-
"@micromag/element-quote": "^0.2.
|
|
58
|
-
"@micromag/element-text": "^0.2.
|
|
59
|
-
"@micromag/transforms": "^0.2.
|
|
52
|
+
"@micromag/core": "^0.2.405",
|
|
53
|
+
"@micromag/element-background": "^0.2.407",
|
|
54
|
+
"@micromag/element-call-to-action": "^0.2.405",
|
|
55
|
+
"@micromag/element-container": "^0.2.405",
|
|
56
|
+
"@micromag/element-layout": "^0.2.405",
|
|
57
|
+
"@micromag/element-quote": "^0.2.405",
|
|
58
|
+
"@micromag/element-text": "^0.2.405",
|
|
59
|
+
"@micromag/transforms": "^0.2.405",
|
|
60
60
|
"classnames": "^2.2.6",
|
|
61
61
|
"lodash": "^4.17.21",
|
|
62
62
|
"prop-types": "^15.7.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "4bc2ba99622adef74bd0da42cb52d1a575c1a544"
|
|
70
70
|
}
|