@micromag/screen-quiz 0.2.405 → 0.2.406
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 +7 -3
- package/lib/index.js +7 -3
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var propTypes = {
|
|
|
41
41
|
background: PropTypes$1.backgroundElement,
|
|
42
42
|
callToAction: PropTypes$1.callToAction,
|
|
43
43
|
current: PropTypes.bool,
|
|
44
|
+
active: PropTypes.bool,
|
|
44
45
|
transitions: PropTypes$1.transitions,
|
|
45
46
|
transitionStagger: PropTypes.number,
|
|
46
47
|
resultsTransitionDuration: PropTypes.number,
|
|
@@ -61,6 +62,7 @@ var defaultProps = {
|
|
|
61
62
|
background: null,
|
|
62
63
|
callToAction: null,
|
|
63
64
|
current: true,
|
|
65
|
+
active: true,
|
|
64
66
|
transitions: null,
|
|
65
67
|
transitionStagger: 100,
|
|
66
68
|
resultsTransitionDuration: 500,
|
|
@@ -84,6 +86,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
84
86
|
background = _ref.background,
|
|
85
87
|
callToAction = _ref.callToAction,
|
|
86
88
|
current = _ref.current,
|
|
89
|
+
active = _ref.active,
|
|
87
90
|
transitions = _ref.transitions,
|
|
88
91
|
transitionStagger = _ref.transitionStagger,
|
|
89
92
|
resultsTransitionDuration = _ref.resultsTransitionDuration,
|
|
@@ -377,7 +380,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
377
380
|
}) : null,
|
|
378
381
|
isEmpty: answered && !hasResult,
|
|
379
382
|
emptyClassName: styles.emptyResult
|
|
380
|
-
}, hasResult && answers !== null ? /*#__PURE__*/React.createElement(
|
|
383
|
+
}, hasResult && answers !== null ? /*#__PURE__*/React.createElement(Transitions, {
|
|
381
384
|
transitions: transitions,
|
|
382
385
|
playing: transitionPlaying,
|
|
383
386
|
delay: (1 + answers.length) * transitionStagger,
|
|
@@ -388,7 +391,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
388
391
|
style: {
|
|
389
392
|
height: callToActionHeight
|
|
390
393
|
}
|
|
391
|
-
}) : null)
|
|
394
|
+
}) : null) : null)))));
|
|
392
395
|
return /*#__PURE__*/React.createElement("div", {
|
|
393
396
|
className: classNames([styles.container, (_ref13 = {}, _defineProperty(_ref13, className, className !== null), _defineProperty(_ref13, styles.isPlaceholder, isPlaceholder), _defineProperty(_ref13, styles.answered, answered), _defineProperty(_ref13, styles.showResults, showResults), _defineProperty(_ref13, styles.answerTransitionComplete, answerTransitionComplete), _ref13)]),
|
|
394
397
|
"data-screen-ready": true
|
|
@@ -396,7 +399,8 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
396
399
|
background: background,
|
|
397
400
|
width: width,
|
|
398
401
|
height: height,
|
|
399
|
-
playing: backgroundPlaying
|
|
402
|
+
playing: backgroundPlaying,
|
|
403
|
+
shouldLoad: current || active
|
|
400
404
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
401
405
|
width: width,
|
|
402
406
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -62,6 +62,7 @@ var propTypes = {
|
|
|
62
62
|
background: core.PropTypes.backgroundElement,
|
|
63
63
|
callToAction: core.PropTypes.callToAction,
|
|
64
64
|
current: PropTypes__default["default"].bool,
|
|
65
|
+
active: PropTypes__default["default"].bool,
|
|
65
66
|
transitions: core.PropTypes.transitions,
|
|
66
67
|
transitionStagger: PropTypes__default["default"].number,
|
|
67
68
|
resultsTransitionDuration: PropTypes__default["default"].number,
|
|
@@ -82,6 +83,7 @@ var defaultProps = {
|
|
|
82
83
|
background: null,
|
|
83
84
|
callToAction: null,
|
|
84
85
|
current: true,
|
|
86
|
+
active: true,
|
|
85
87
|
transitions: null,
|
|
86
88
|
transitionStagger: 100,
|
|
87
89
|
resultsTransitionDuration: 500,
|
|
@@ -105,6 +107,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
105
107
|
background = _ref.background,
|
|
106
108
|
callToAction = _ref.callToAction,
|
|
107
109
|
current = _ref.current,
|
|
110
|
+
active = _ref.active,
|
|
108
111
|
transitions = _ref.transitions,
|
|
109
112
|
transitionStagger = _ref.transitionStagger,
|
|
110
113
|
resultsTransitionDuration = _ref.resultsTransitionDuration,
|
|
@@ -398,7 +401,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
398
401
|
}) : null,
|
|
399
402
|
isEmpty: answered && !hasResult,
|
|
400
403
|
emptyClassName: styles.emptyResult
|
|
401
|
-
}, hasResult && answers !== null ? /*#__PURE__*/React__default["default"].createElement(
|
|
404
|
+
}, hasResult && answers !== null ? /*#__PURE__*/React__default["default"].createElement(components.Transitions, {
|
|
402
405
|
transitions: transitions,
|
|
403
406
|
playing: transitionPlaying,
|
|
404
407
|
delay: (1 + answers.length) * transitionStagger,
|
|
@@ -409,7 +412,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
409
412
|
style: {
|
|
410
413
|
height: callToActionHeight
|
|
411
414
|
}
|
|
412
|
-
}) : null)
|
|
415
|
+
}) : null) : null)))));
|
|
413
416
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
414
417
|
className: classNames__default["default"]([styles.container, (_ref13 = {}, _defineProperty__default["default"](_ref13, className, className !== null), _defineProperty__default["default"](_ref13, styles.isPlaceholder, isPlaceholder), _defineProperty__default["default"](_ref13, styles.answered, answered), _defineProperty__default["default"](_ref13, styles.showResults, showResults), _defineProperty__default["default"](_ref13, styles.answerTransitionComplete, answerTransitionComplete), _ref13)]),
|
|
415
418
|
"data-screen-ready": true
|
|
@@ -417,7 +420,8 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
417
420
|
background: background,
|
|
418
421
|
width: width,
|
|
419
422
|
height: height,
|
|
420
|
-
playing: backgroundPlaying
|
|
423
|
+
playing: backgroundPlaying,
|
|
424
|
+
shouldLoad: current || active
|
|
421
425
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
422
426
|
width: width,
|
|
423
427
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quiz",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.406",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
55
|
"@micromag/core": "^0.2.405",
|
|
56
56
|
"@micromag/data": "^0.2.405",
|
|
57
|
-
"@micromag/element-background": "^0.2.
|
|
57
|
+
"@micromag/element-background": "^0.2.406",
|
|
58
58
|
"@micromag/element-button": "^0.2.405",
|
|
59
59
|
"@micromag/element-call-to-action": "^0.2.405",
|
|
60
60
|
"@micromag/element-container": "^0.2.405",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "5e1a6de73674624b0cb3f9701140ea8850e6f35e"
|
|
75
75
|
}
|