@micromag/screen-quiz 0.2.401 → 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 +31 -27
- package/lib/index.js +31 -27
- package/package.json +12 -12
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
|
|
@@ -426,8 +430,8 @@ var definition = {
|
|
|
426
430
|
type: 'screen',
|
|
427
431
|
group: {
|
|
428
432
|
label: defineMessage({
|
|
429
|
-
|
|
430
|
-
|
|
433
|
+
id: "ZqwBOx",
|
|
434
|
+
defaultMessage: [{
|
|
431
435
|
"type": 0,
|
|
432
436
|
"value": "Questions"
|
|
433
437
|
}]
|
|
@@ -435,8 +439,8 @@ var definition = {
|
|
|
435
439
|
order: 7
|
|
436
440
|
},
|
|
437
441
|
title: defineMessage({
|
|
438
|
-
|
|
439
|
-
|
|
442
|
+
id: "zW7IVm",
|
|
443
|
+
defaultMessage: [{
|
|
440
444
|
"type": 0,
|
|
441
445
|
"value": "Quiz"
|
|
442
446
|
}]
|
|
@@ -448,8 +452,8 @@ var definition = {
|
|
|
448
452
|
type: 'screen-layout',
|
|
449
453
|
defaultValue: 'top',
|
|
450
454
|
label: defineMessage({
|
|
451
|
-
|
|
452
|
-
|
|
455
|
+
id: "4iBXj2",
|
|
456
|
+
defaultMessage: [{
|
|
453
457
|
"type": 0,
|
|
454
458
|
"value": "Layout"
|
|
455
459
|
}]
|
|
@@ -461,8 +465,8 @@ var definition = {
|
|
|
461
465
|
textStyle: 'heading2'
|
|
462
466
|
},
|
|
463
467
|
label: defineMessage({
|
|
464
|
-
|
|
465
|
-
|
|
468
|
+
id: "hVE7TA",
|
|
469
|
+
defaultMessage: [{
|
|
466
470
|
"type": 0,
|
|
467
471
|
"value": "Question"
|
|
468
472
|
}]
|
|
@@ -476,8 +480,8 @@ var definition = {
|
|
|
476
480
|
}
|
|
477
481
|
},
|
|
478
482
|
label: defineMessage({
|
|
479
|
-
|
|
480
|
-
|
|
483
|
+
id: "KHWeV7",
|
|
484
|
+
defaultMessage: [{
|
|
481
485
|
"type": 0,
|
|
482
486
|
"value": "Answers"
|
|
483
487
|
}]
|
|
@@ -489,8 +493,8 @@ var definition = {
|
|
|
489
493
|
textStyle: 'text'
|
|
490
494
|
},
|
|
491
495
|
label: defineMessage({
|
|
492
|
-
|
|
493
|
-
|
|
496
|
+
id: "FJygXH",
|
|
497
|
+
defaultMessage: [{
|
|
494
498
|
"type": 0,
|
|
495
499
|
"value": "Result"
|
|
496
500
|
}]
|
|
@@ -499,8 +503,8 @@ var definition = {
|
|
|
499
503
|
type: 'fields',
|
|
500
504
|
isList: true,
|
|
501
505
|
label: defineMessage({
|
|
502
|
-
|
|
503
|
-
|
|
506
|
+
id: "R9DB4a",
|
|
507
|
+
defaultMessage: [{
|
|
504
508
|
"type": 0,
|
|
505
509
|
"value": "Styles"
|
|
506
510
|
}]
|
|
@@ -509,15 +513,15 @@ var definition = {
|
|
|
509
513
|
name: 'buttonsStyle',
|
|
510
514
|
type: 'field-with-form',
|
|
511
515
|
label: defineMessage({
|
|
512
|
-
|
|
513
|
-
|
|
516
|
+
id: "l5uLMd",
|
|
517
|
+
defaultMessage: [{
|
|
514
518
|
"type": 0,
|
|
515
519
|
"value": "Buttons"
|
|
516
520
|
}]
|
|
517
521
|
}),
|
|
518
522
|
noValueLabel: defineMessage({
|
|
519
|
-
|
|
520
|
-
|
|
523
|
+
id: "65rc70",
|
|
524
|
+
defaultMessage: [{
|
|
521
525
|
"type": 0,
|
|
522
526
|
"value": "Edit style..."
|
|
523
527
|
}]
|
|
@@ -529,8 +533,8 @@ var definition = {
|
|
|
529
533
|
name: 'goodAnswerColor',
|
|
530
534
|
type: 'color',
|
|
531
535
|
label: defineMessage({
|
|
532
|
-
|
|
533
|
-
|
|
536
|
+
id: "I2bIHm",
|
|
537
|
+
defaultMessage: [{
|
|
534
538
|
"type": 0,
|
|
535
539
|
"value": "Good answer color"
|
|
536
540
|
}]
|
|
@@ -539,8 +543,8 @@ var definition = {
|
|
|
539
543
|
name: 'badAnswerColor',
|
|
540
544
|
type: 'color',
|
|
541
545
|
label: defineMessage({
|
|
542
|
-
|
|
543
|
-
|
|
546
|
+
id: "ru3tjH",
|
|
547
|
+
defaultMessage: [{
|
|
544
548
|
"type": 0,
|
|
545
549
|
"value": "Bad answer color"
|
|
546
550
|
}]
|
|
@@ -550,8 +554,8 @@ var definition = {
|
|
|
550
554
|
name: 'background',
|
|
551
555
|
type: 'background',
|
|
552
556
|
label: defineMessage({
|
|
553
|
-
|
|
554
|
-
|
|
557
|
+
id: "+MPZRu",
|
|
558
|
+
defaultMessage: [{
|
|
555
559
|
"type": 0,
|
|
556
560
|
"value": "Background"
|
|
557
561
|
}]
|
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
|
|
@@ -447,8 +451,8 @@ var definition = {
|
|
|
447
451
|
type: 'screen',
|
|
448
452
|
group: {
|
|
449
453
|
label: reactIntl.defineMessage({
|
|
450
|
-
|
|
451
|
-
|
|
454
|
+
id: "ZqwBOx",
|
|
455
|
+
defaultMessage: [{
|
|
452
456
|
"type": 0,
|
|
453
457
|
"value": "Questions"
|
|
454
458
|
}]
|
|
@@ -456,8 +460,8 @@ var definition = {
|
|
|
456
460
|
order: 7
|
|
457
461
|
},
|
|
458
462
|
title: reactIntl.defineMessage({
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
id: "zW7IVm",
|
|
464
|
+
defaultMessage: [{
|
|
461
465
|
"type": 0,
|
|
462
466
|
"value": "Quiz"
|
|
463
467
|
}]
|
|
@@ -469,8 +473,8 @@ var definition = {
|
|
|
469
473
|
type: 'screen-layout',
|
|
470
474
|
defaultValue: 'top',
|
|
471
475
|
label: reactIntl.defineMessage({
|
|
472
|
-
|
|
473
|
-
|
|
476
|
+
id: "4iBXj2",
|
|
477
|
+
defaultMessage: [{
|
|
474
478
|
"type": 0,
|
|
475
479
|
"value": "Layout"
|
|
476
480
|
}]
|
|
@@ -482,8 +486,8 @@ var definition = {
|
|
|
482
486
|
textStyle: 'heading2'
|
|
483
487
|
},
|
|
484
488
|
label: reactIntl.defineMessage({
|
|
485
|
-
|
|
486
|
-
|
|
489
|
+
id: "hVE7TA",
|
|
490
|
+
defaultMessage: [{
|
|
487
491
|
"type": 0,
|
|
488
492
|
"value": "Question"
|
|
489
493
|
}]
|
|
@@ -497,8 +501,8 @@ var definition = {
|
|
|
497
501
|
}
|
|
498
502
|
},
|
|
499
503
|
label: reactIntl.defineMessage({
|
|
500
|
-
|
|
501
|
-
|
|
504
|
+
id: "KHWeV7",
|
|
505
|
+
defaultMessage: [{
|
|
502
506
|
"type": 0,
|
|
503
507
|
"value": "Answers"
|
|
504
508
|
}]
|
|
@@ -510,8 +514,8 @@ var definition = {
|
|
|
510
514
|
textStyle: 'text'
|
|
511
515
|
},
|
|
512
516
|
label: reactIntl.defineMessage({
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
id: "FJygXH",
|
|
518
|
+
defaultMessage: [{
|
|
515
519
|
"type": 0,
|
|
516
520
|
"value": "Result"
|
|
517
521
|
}]
|
|
@@ -520,8 +524,8 @@ var definition = {
|
|
|
520
524
|
type: 'fields',
|
|
521
525
|
isList: true,
|
|
522
526
|
label: reactIntl.defineMessage({
|
|
523
|
-
|
|
524
|
-
|
|
527
|
+
id: "R9DB4a",
|
|
528
|
+
defaultMessage: [{
|
|
525
529
|
"type": 0,
|
|
526
530
|
"value": "Styles"
|
|
527
531
|
}]
|
|
@@ -530,15 +534,15 @@ var definition = {
|
|
|
530
534
|
name: 'buttonsStyle',
|
|
531
535
|
type: 'field-with-form',
|
|
532
536
|
label: reactIntl.defineMessage({
|
|
533
|
-
|
|
534
|
-
|
|
537
|
+
id: "l5uLMd",
|
|
538
|
+
defaultMessage: [{
|
|
535
539
|
"type": 0,
|
|
536
540
|
"value": "Buttons"
|
|
537
541
|
}]
|
|
538
542
|
}),
|
|
539
543
|
noValueLabel: reactIntl.defineMessage({
|
|
540
|
-
|
|
541
|
-
|
|
544
|
+
id: "65rc70",
|
|
545
|
+
defaultMessage: [{
|
|
542
546
|
"type": 0,
|
|
543
547
|
"value": "Edit style..."
|
|
544
548
|
}]
|
|
@@ -550,8 +554,8 @@ var definition = {
|
|
|
550
554
|
name: 'goodAnswerColor',
|
|
551
555
|
type: 'color',
|
|
552
556
|
label: reactIntl.defineMessage({
|
|
553
|
-
|
|
554
|
-
|
|
557
|
+
id: "I2bIHm",
|
|
558
|
+
defaultMessage: [{
|
|
555
559
|
"type": 0,
|
|
556
560
|
"value": "Good answer color"
|
|
557
561
|
}]
|
|
@@ -560,8 +564,8 @@ var definition = {
|
|
|
560
564
|
name: 'badAnswerColor',
|
|
561
565
|
type: 'color',
|
|
562
566
|
label: reactIntl.defineMessage({
|
|
563
|
-
|
|
564
|
-
|
|
567
|
+
id: "ru3tjH",
|
|
568
|
+
defaultMessage: [{
|
|
565
569
|
"type": 0,
|
|
566
570
|
"value": "Bad answer color"
|
|
567
571
|
}]
|
|
@@ -571,8 +575,8 @@ var definition = {
|
|
|
571
575
|
name: 'background',
|
|
572
576
|
type: 'background',
|
|
573
577
|
label: reactIntl.defineMessage({
|
|
574
|
-
|
|
575
|
-
|
|
578
|
+
id: "+MPZRu",
|
|
579
|
+
defaultMessage: [{
|
|
576
580
|
"type": 0,
|
|
577
581
|
"value": "Background"
|
|
578
582
|
}]
|
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"
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.2.
|
|
56
|
-
"@micromag/data": "^0.2.
|
|
57
|
-
"@micromag/element-background": "^0.2.
|
|
58
|
-
"@micromag/element-button": "^0.2.
|
|
59
|
-
"@micromag/element-call-to-action": "^0.2.
|
|
60
|
-
"@micromag/element-container": "^0.2.
|
|
61
|
-
"@micromag/element-heading": "^0.2.
|
|
62
|
-
"@micromag/element-layout": "^0.2.
|
|
63
|
-
"@micromag/element-text": "^0.2.
|
|
64
|
-
"@micromag/transforms": "^0.2.
|
|
55
|
+
"@micromag/core": "^0.2.405",
|
|
56
|
+
"@micromag/data": "^0.2.405",
|
|
57
|
+
"@micromag/element-background": "^0.2.406",
|
|
58
|
+
"@micromag/element-button": "^0.2.405",
|
|
59
|
+
"@micromag/element-call-to-action": "^0.2.405",
|
|
60
|
+
"@micromag/element-container": "^0.2.405",
|
|
61
|
+
"@micromag/element-heading": "^0.2.405",
|
|
62
|
+
"@micromag/element-layout": "^0.2.405",
|
|
63
|
+
"@micromag/element-text": "^0.2.405",
|
|
64
|
+
"@micromag/transforms": "^0.2.405",
|
|
65
65
|
"classnames": "^2.2.6",
|
|
66
66
|
"lodash": "^4.17.21",
|
|
67
67
|
"prop-types": "^15.7.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "5e1a6de73674624b0cb3f9701140ea8850e6f35e"
|
|
75
75
|
}
|