@micromag/screen-survey 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.
Files changed (3) hide show
  1. package/es/index.js +27 -23
  2. package/lib/index.js +27 -23
  3. package/package.json +12 -12
package/es/index.js CHANGED
@@ -37,6 +37,7 @@ var propTypes = {
37
37
  callToAction: PropTypes$1.callToAction,
38
38
  withPercentLabels: PropTypes.bool,
39
39
  current: PropTypes.bool,
40
+ active: PropTypes.bool,
40
41
  transitions: PropTypes$1.transitions,
41
42
  transitionStagger: PropTypes.number,
42
43
  resultTransitionDuration: PropTypes.number,
@@ -55,6 +56,7 @@ var defaultProps = {
55
56
  callToAction: null,
56
57
  withPercentLabels: true,
57
58
  current: true,
59
+ active: true,
58
60
  transitions: null,
59
61
  transitionStagger: 100,
60
62
  resultTransitionDuration: 500,
@@ -76,6 +78,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
76
78
  callToAction = _ref.callToAction,
77
79
  withPercentLabels = _ref.withPercentLabels,
78
80
  current = _ref.current,
81
+ active = _ref.active,
79
82
  transitions = _ref.transitions,
80
83
  transitionStagger = _ref.transitionStagger,
81
84
  resultTransitionDuration = _ref.resultTransitionDuration,
@@ -402,7 +405,8 @@ var SurveyScreen = function SurveyScreen(_ref) {
402
405
  background: background,
403
406
  width: width,
404
407
  height: height,
405
- playing: backgroundPlaying
408
+ playing: backgroundPlaying,
409
+ shouldLoad: current || active
406
410
  }) : null, /*#__PURE__*/React.createElement(Container, {
407
411
  width: width,
408
412
  height: height
@@ -425,8 +429,8 @@ var definition = {
425
429
  type: 'screen',
426
430
  group: {
427
431
  label: defineMessage({
428
- "id": "ZqwBOx",
429
- "defaultMessage": [{
432
+ id: "ZqwBOx",
433
+ defaultMessage: [{
430
434
  "type": 0,
431
435
  "value": "Questions"
432
436
  }]
@@ -434,8 +438,8 @@ var definition = {
434
438
  order: 7
435
439
  },
436
440
  title: defineMessage({
437
- "id": "650XRF",
438
- "defaultMessage": [{
441
+ id: "650XRF",
442
+ defaultMessage: [{
439
443
  "type": 0,
440
444
  "value": "Survey"
441
445
  }]
@@ -447,8 +451,8 @@ var definition = {
447
451
  type: 'screen-layout',
448
452
  defaultValue: 'top',
449
453
  label: defineMessage({
450
- "id": "4iBXj2",
451
- "defaultMessage": [{
454
+ id: "4iBXj2",
455
+ defaultMessage: [{
452
456
  "type": 0,
453
457
  "value": "Layout"
454
458
  }]
@@ -460,8 +464,8 @@ var definition = {
460
464
  textStyle: 'heading2'
461
465
  },
462
466
  label: defineMessage({
463
- "id": "hVE7TA",
464
- "defaultMessage": [{
467
+ id: "hVE7TA",
468
+ defaultMessage: [{
465
469
  "type": 0,
466
470
  "value": "Question"
467
471
  }]
@@ -475,8 +479,8 @@ var definition = {
475
479
  }
476
480
  },
477
481
  label: defineMessage({
478
- "id": "KHWeV7",
479
- "defaultMessage": [{
482
+ id: "KHWeV7",
483
+ defaultMessage: [{
480
484
  "type": 0,
481
485
  "value": "Answers"
482
486
  }]
@@ -485,8 +489,8 @@ var definition = {
485
489
  type: 'fields',
486
490
  isList: true,
487
491
  label: defineMessage({
488
- "id": "R9DB4a",
489
- "defaultMessage": [{
492
+ id: "R9DB4a",
493
+ defaultMessage: [{
490
494
  "type": 0,
491
495
  "value": "Styles"
492
496
  }]
@@ -495,15 +499,15 @@ var definition = {
495
499
  name: 'buttonsStyle',
496
500
  type: 'field-with-form',
497
501
  label: defineMessage({
498
- "id": "l5uLMd",
499
- "defaultMessage": [{
502
+ id: "l5uLMd",
503
+ defaultMessage: [{
500
504
  "type": 0,
501
505
  "value": "Buttons"
502
506
  }]
503
507
  }),
504
508
  noValueLabel: defineMessage({
505
- "id": "65rc70",
506
- "defaultMessage": [{
509
+ id: "65rc70",
510
+ defaultMessage: [{
507
511
  "type": 0,
508
512
  "value": "Edit style..."
509
513
  }]
@@ -515,15 +519,15 @@ var definition = {
515
519
  name: 'resultsStyle',
516
520
  type: 'field-with-form',
517
521
  label: defineMessage({
518
- "id": "e4UTx9",
519
- "defaultMessage": [{
522
+ id: "e4UTx9",
523
+ defaultMessage: [{
520
524
  "type": 0,
521
525
  "value": "Results"
522
526
  }]
523
527
  }),
524
528
  noValueLabel: defineMessage({
525
- "id": "65rc70",
526
- "defaultMessage": [{
529
+ id: "65rc70",
530
+ defaultMessage: [{
527
531
  "type": 0,
528
532
  "value": "Edit style..."
529
533
  }]
@@ -536,8 +540,8 @@ var definition = {
536
540
  name: 'background',
537
541
  type: 'background',
538
542
  label: defineMessage({
539
- "id": "+MPZRu",
540
- "defaultMessage": [{
543
+ id: "+MPZRu",
544
+ defaultMessage: [{
541
545
  "type": 0,
542
546
  "value": "Background"
543
547
  }]
package/lib/index.js CHANGED
@@ -58,6 +58,7 @@ var propTypes = {
58
58
  callToAction: core.PropTypes.callToAction,
59
59
  withPercentLabels: PropTypes__default["default"].bool,
60
60
  current: PropTypes__default["default"].bool,
61
+ active: PropTypes__default["default"].bool,
61
62
  transitions: core.PropTypes.transitions,
62
63
  transitionStagger: PropTypes__default["default"].number,
63
64
  resultTransitionDuration: PropTypes__default["default"].number,
@@ -76,6 +77,7 @@ var defaultProps = {
76
77
  callToAction: null,
77
78
  withPercentLabels: true,
78
79
  current: true,
80
+ active: true,
79
81
  transitions: null,
80
82
  transitionStagger: 100,
81
83
  resultTransitionDuration: 500,
@@ -97,6 +99,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
97
99
  callToAction = _ref.callToAction,
98
100
  withPercentLabels = _ref.withPercentLabels,
99
101
  current = _ref.current,
102
+ active = _ref.active,
100
103
  transitions = _ref.transitions,
101
104
  transitionStagger = _ref.transitionStagger,
102
105
  resultTransitionDuration = _ref.resultTransitionDuration,
@@ -423,7 +426,8 @@ var SurveyScreen = function SurveyScreen(_ref) {
423
426
  background: background,
424
427
  width: width,
425
428
  height: height,
426
- playing: backgroundPlaying
429
+ playing: backgroundPlaying,
430
+ shouldLoad: current || active
427
431
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
428
432
  width: width,
429
433
  height: height
@@ -446,8 +450,8 @@ var definition = {
446
450
  type: 'screen',
447
451
  group: {
448
452
  label: reactIntl.defineMessage({
449
- "id": "ZqwBOx",
450
- "defaultMessage": [{
453
+ id: "ZqwBOx",
454
+ defaultMessage: [{
451
455
  "type": 0,
452
456
  "value": "Questions"
453
457
  }]
@@ -455,8 +459,8 @@ var definition = {
455
459
  order: 7
456
460
  },
457
461
  title: reactIntl.defineMessage({
458
- "id": "650XRF",
459
- "defaultMessage": [{
462
+ id: "650XRF",
463
+ defaultMessage: [{
460
464
  "type": 0,
461
465
  "value": "Survey"
462
466
  }]
@@ -468,8 +472,8 @@ var definition = {
468
472
  type: 'screen-layout',
469
473
  defaultValue: 'top',
470
474
  label: reactIntl.defineMessage({
471
- "id": "4iBXj2",
472
- "defaultMessage": [{
475
+ id: "4iBXj2",
476
+ defaultMessage: [{
473
477
  "type": 0,
474
478
  "value": "Layout"
475
479
  }]
@@ -481,8 +485,8 @@ var definition = {
481
485
  textStyle: 'heading2'
482
486
  },
483
487
  label: reactIntl.defineMessage({
484
- "id": "hVE7TA",
485
- "defaultMessage": [{
488
+ id: "hVE7TA",
489
+ defaultMessage: [{
486
490
  "type": 0,
487
491
  "value": "Question"
488
492
  }]
@@ -496,8 +500,8 @@ var definition = {
496
500
  }
497
501
  },
498
502
  label: reactIntl.defineMessage({
499
- "id": "KHWeV7",
500
- "defaultMessage": [{
503
+ id: "KHWeV7",
504
+ defaultMessage: [{
501
505
  "type": 0,
502
506
  "value": "Answers"
503
507
  }]
@@ -506,8 +510,8 @@ var definition = {
506
510
  type: 'fields',
507
511
  isList: true,
508
512
  label: reactIntl.defineMessage({
509
- "id": "R9DB4a",
510
- "defaultMessage": [{
513
+ id: "R9DB4a",
514
+ defaultMessage: [{
511
515
  "type": 0,
512
516
  "value": "Styles"
513
517
  }]
@@ -516,15 +520,15 @@ var definition = {
516
520
  name: 'buttonsStyle',
517
521
  type: 'field-with-form',
518
522
  label: reactIntl.defineMessage({
519
- "id": "l5uLMd",
520
- "defaultMessage": [{
523
+ id: "l5uLMd",
524
+ defaultMessage: [{
521
525
  "type": 0,
522
526
  "value": "Buttons"
523
527
  }]
524
528
  }),
525
529
  noValueLabel: reactIntl.defineMessage({
526
- "id": "65rc70",
527
- "defaultMessage": [{
530
+ id: "65rc70",
531
+ defaultMessage: [{
528
532
  "type": 0,
529
533
  "value": "Edit style..."
530
534
  }]
@@ -536,15 +540,15 @@ var definition = {
536
540
  name: 'resultsStyle',
537
541
  type: 'field-with-form',
538
542
  label: reactIntl.defineMessage({
539
- "id": "e4UTx9",
540
- "defaultMessage": [{
543
+ id: "e4UTx9",
544
+ defaultMessage: [{
541
545
  "type": 0,
542
546
  "value": "Results"
543
547
  }]
544
548
  }),
545
549
  noValueLabel: reactIntl.defineMessage({
546
- "id": "65rc70",
547
- "defaultMessage": [{
550
+ id: "65rc70",
551
+ defaultMessage: [{
548
552
  "type": 0,
549
553
  "value": "Edit style..."
550
554
  }]
@@ -557,8 +561,8 @@ var definition = {
557
561
  name: 'background',
558
562
  type: 'background',
559
563
  label: reactIntl.defineMessage({
560
- "id": "+MPZRu",
561
- "defaultMessage": [{
564
+ id: "+MPZRu",
565
+ defaultMessage: [{
562
566
  "type": 0,
563
567
  "value": "Background"
564
568
  }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-survey",
3
- "version": "0.2.401",
3
+ "version": "0.2.406",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,16 +49,16 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.2.401",
53
- "@micromag/data": "^0.2.401",
54
- "@micromag/element-background": "^0.2.401",
55
- "@micromag/element-button": "^0.2.401",
56
- "@micromag/element-call-to-action": "^0.2.401",
57
- "@micromag/element-container": "^0.2.401",
58
- "@micromag/element-heading": "^0.2.401",
59
- "@micromag/element-layout": "^0.2.401",
60
- "@micromag/element-text": "^0.2.401",
61
- "@micromag/transforms": "^0.2.401",
52
+ "@micromag/core": "^0.2.405",
53
+ "@micromag/data": "^0.2.405",
54
+ "@micromag/element-background": "^0.2.406",
55
+ "@micromag/element-button": "^0.2.405",
56
+ "@micromag/element-call-to-action": "^0.2.405",
57
+ "@micromag/element-container": "^0.2.405",
58
+ "@micromag/element-heading": "^0.2.405",
59
+ "@micromag/element-layout": "^0.2.405",
60
+ "@micromag/element-text": "^0.2.405",
61
+ "@micromag/transforms": "^0.2.405",
62
62
  "classnames": "^2.2.6",
63
63
  "lodash": "^4.17.21",
64
64
  "prop-types": "^15.7.2",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "fd03ec6d9decc9e18d6088a36e47c7b1e0e72b4c"
71
+ "gitHead": "5e1a6de73674624b0cb3f9701140ea8850e6f35e"
72
72
  }