@gamelearn/arcade-components 1.11.5 → 1.11.7

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.
@@ -74,7 +74,7 @@ var ComicComponent = function ComicComponent(_ref) {
74
74
  } else {
75
75
  close();
76
76
  }
77
- }, [close, slideCount, slides.length]);
77
+ }, [close, slideCount, slides === null || slides === void 0 ? void 0 : slides.length]);
78
78
  var goToPreviousSlide = (0, _react.useCallback)(function () {
79
79
  if (slideCount - 1 >= 0) {
80
80
  setTransition('slide-animation');
@@ -30,7 +30,9 @@ var Vignette = function Vignette(_ref) {
30
30
 
31
31
  var vignette = _ref.vignette,
32
32
  alias = _ref.alias;
33
- var resource = vignette.img || {};
33
+ var resource = vignette.img || {
34
+ url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/conversation.jpg'
35
+ };
34
36
  var resolvedIdImg = resource.url;
35
37
 
36
38
  var _useState = (0, _react.useState)(false),
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.comicWithTTS = exports.comicWithAlias = exports.comicProps = void 0;
6
+ exports.comicWithTTS = exports.comicWithAlias = exports.comicProps = exports.comicNoImageProps = void 0;
7
7
 
8
8
  var _mocker = require("helpers/mocker");
9
9
 
@@ -38,56 +38,136 @@ var comicProps = {
38
38
  }, {
39
39
  slideOrder: 2,
40
40
  transitionEffects: null,
41
- audioType: 'file',
42
41
  audio: {
43
- url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/audio/5f646497f6d21e001139b0ed/coin.wav'
42
+ url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/documents/Cat-sound.mp3'
44
43
  },
45
44
  vignettes: [{
46
45
  vignetteOrder: 1,
47
46
  img: {
48
- url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/60507fb0901f3e00123a05db/14b936c651869bf50fdfb8071e719c47.png',
49
- imgName: 'holamundo.jpg',
50
- resourceId: '60508f84901f3e00123a0796'
47
+ url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/60508f84901f3e00123a0796/holamundo.jpg',
48
+ imgName: 'prueba6.png',
49
+ resourceId: '6007f80eac41ad001120f135'
51
50
  },
52
- imgName: 'holamundo.jpg',
51
+ imgName: 'prueba6.png',
53
52
  sytle: null,
54
53
  transitionEffects: null,
55
54
  textData: {
56
- text: 'he si sido yo, hablando idiomas',
55
+ text: 'hola soy el hombre barbudo',
57
56
  style: null,
58
- text_labelId: 'text_1_0_E1Xynyri'
57
+ text_labelId: 'text_0_0_E1XylCXz'
59
58
  },
60
- imgId_labelId: 'imgId_1_0_E1Xynq2k'
61
- }, {
62
- alias: 'alias_1_4GML5nt5',
63
- alias_labelId: 'alias_1_4GML5nt5',
64
- audioId: '',
65
- audioId_labelId: 'audioId_1_3obtyOdQ',
66
- audioType: 'voice',
67
- slideOrder: 2,
68
- transitionEffects: null,
69
- vignettes: [{
70
- imgId: 'imgId_1_0_3obtxgTc',
71
- imgId_labelId: 'imgId_1_0_3obtxgTc',
72
- imgName: 'perro_grande.jpg',
73
- sytle: null,
74
- textData: {
75
- style: null,
76
- text: 'text_1_0_3obtxuj4',
77
- text_labelId: 'text_1_0_3obtxuj4'
78
- },
79
- transitionEffects: null,
80
- vignetteOrder: 1
81
- }],
82
- voice: {
83
- id: 'URoAYO',
84
- type: 'character'
85
- }
59
+ imgId_labelId: 'imgId_0_0_E1XymubP'
86
60
  }],
87
- audioId_labelId: 'audioId_1_E1XynHal'
61
+ audioId_labelId: 'audioId_0_E1XymRPE'
62
+ }, {
63
+ alias_labelId: 'alias_2_WXmSEMDK',
64
+ audioId: '',
65
+ audioId_labelId: 'audioId_2_WXmSDwbu',
66
+ audioType: 'none',
67
+ slideOrder: 3,
68
+ transitionEffects: null,
69
+ vignettes: [{
70
+ imgId: null,
71
+ imgId_labelId: 'imgId_0_0_WU81OZBa',
72
+ imgName: '',
73
+ sytle: null,
74
+ textData: {
75
+ style: null,
76
+ text: '',
77
+ text_labelId: 'text_0_0_WU81N07T'
78
+ },
79
+ transitionEffects: null,
80
+ vignetteOrder: 1
81
+ }]
88
82
  }]
89
83
  };
90
84
  exports.comicProps = comicProps;
85
+ var comicNoImageProps = {
86
+ emitEvent: _mocker.emitEvent,
87
+ soundActions: _mocker.soundActions,
88
+ slides: [{
89
+ alias_labelId: 'alias_0_WU81OYcP',
90
+ audioId: '',
91
+ audioId_labelId: 'audioId_0_WU81OsXF',
92
+ audioType: 'none',
93
+ slideOrder: 1,
94
+ transitionEffects: null,
95
+ vignettes: [{
96
+ imgId: null,
97
+ imgId_labelId: 'imgId_0_0_WU81OZBa',
98
+ imgName: '',
99
+ sytle: null,
100
+ textData: {
101
+ style: null,
102
+ text: '',
103
+ text_labelId: 'text_0_0_WU81N07T'
104
+ },
105
+ transitionEffects: null,
106
+ vignetteOrder: 1
107
+ }]
108
+ }, {
109
+ alias_labelId: 'alias_1_WXmSDej5',
110
+ audioId: '',
111
+ audioId_labelId: 'audioId_1_WXmSDDTo',
112
+ audioType: 'none',
113
+ slideOrder: 2,
114
+ transitionEffects: null,
115
+ vignettes: [{
116
+ imgId: null,
117
+ imgId_labelId: 'imgId_1_0_WXmSDqG2',
118
+ imgName: '',
119
+ sytle: null,
120
+ textData: {
121
+ style: null,
122
+ text: '',
123
+ text_labelId: 'text_1_0_WXmSDqd6'
124
+ },
125
+ transitionEffects: null,
126
+ vignetteOrder: 1
127
+ }]
128
+ }, {
129
+ alias_labelId: 'alias_2_WXmSEMDK',
130
+ audioId: '',
131
+ audioId_labelId: 'audioId_2_WXmSDwbu',
132
+ audioType: 'none',
133
+ slideOrder: 3,
134
+ transitionEffects: null,
135
+ vignettes: [{
136
+ imgId: '621e5ed51c1b380012958609',
137
+ imgId_labelId: 'imgId_2_0_WXmSDWSh',
138
+ imgName: 'perro_pequeno.jpg',
139
+ sytle: null,
140
+ textData: {
141
+ style: null,
142
+ text: 'asd',
143
+ text_labelId: 'text_2_0_WXmSDdBS'
144
+ },
145
+ transitionEffects: null,
146
+ vignetteOrder: 1
147
+ }]
148
+ }, {
149
+ alias_labelId: 'alias_3_WXmSEL7F',
150
+ audioId: '',
151
+ audioId_labelId: 'audioId_3_WXmSEwlM',
152
+ audioType: 'none',
153
+ slideOrder: 4,
154
+ transitionEffects: null,
155
+ vignettes: [{
156
+ imgId: null,
157
+ imgId_labelId: 'imgId_3_0_WXmSEgvQ',
158
+ imgName: '',
159
+ sytle: null,
160
+ textData: {
161
+ style: null,
162
+ text: '',
163
+ text_labelId: 'text_3_0_WXmSEhrM'
164
+ },
165
+ transitionEffects: null,
166
+ vignetteOrder: 1
167
+ }]
168
+ }]
169
+ };
170
+ exports.comicNoImageProps = comicNoImageProps;
91
171
  var comicWithTTS = {
92
172
  emitEvent: _mocker.emitEvent,
93
173
  soundActions: _mocker.soundActions,
@@ -59,6 +59,8 @@ var ImageReview = function ImageReview() {
59
59
  };
60
60
 
61
61
  var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
62
+ var _info$timerFeedback3, _info$timerFeedback4;
63
+
62
64
  // Common config
63
65
  var soundActions = props.soundActions,
64
66
  emitEvent = props.emitEvent,
@@ -374,18 +376,20 @@ var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
374
376
 
375
377
  if (actualDate.current > finalDate.current) {
376
378
  setFeedbackData(function () {
379
+ var _info$timerFeedback, _info$timerFeedback2;
380
+
377
381
  return {
378
382
  show: true,
379
383
  success: false,
380
- text: info.timerFeedback.desc ? info.timerFeedback.desc : '',
381
- rewards: info.timerFeedback.rewards
384
+ text: info !== null && info !== void 0 && (_info$timerFeedback = info.timerFeedback) !== null && _info$timerFeedback !== void 0 && _info$timerFeedback.desc ? info.timerFeedback.desc : '',
385
+ rewards: info === null || info === void 0 ? void 0 : (_info$timerFeedback2 = info.timerFeedback) === null || _info$timerFeedback2 === void 0 ? void 0 : _info$timerFeedback2.rewards
382
386
  };
383
387
  });
384
388
  setTimeExpired(true);
385
389
  clearListenerForActualDate();
386
390
  }
387
391
  }, 0);
388
- }, [clearListenerForActualDate, info.timerFeedback.desc, info.timerFeedback.rewards]);
392
+ }, [clearListenerForActualDate, info === null || info === void 0 ? void 0 : (_info$timerFeedback3 = info.timerFeedback) === null || _info$timerFeedback3 === void 0 ? void 0 : _info$timerFeedback3.desc, info === null || info === void 0 ? void 0 : (_info$timerFeedback4 = info.timerFeedback) === null || _info$timerFeedback4 === void 0 ? void 0 : _info$timerFeedback4.rewards]);
389
393
  var createStartAndEndDate = (0, _react.useCallback)(function () {
390
394
  setDialogForTimer(false);
391
395
  startDate.current = Date.now();
@@ -394,14 +398,14 @@ var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
394
398
  }, [listenerForActualDate, timer]);
395
399
  (0, _react.useEffect)(function () {
396
400
  // start automatically the time
397
- if (slideNumber > 0) {
401
+ if (timer && slideNumber > 0) {
398
402
  if (puzzlesAutoCompleted[slideNumber - 1]) {
399
403
  setDialogForTimer(true);
400
404
  } else {
401
405
  createStartAndEndDate();
402
406
  }
403
407
  }
404
- }, [createStartAndEndDate, puzzlesAutoCompleted, slideNumber]);
408
+ }, [createStartAndEndDate, puzzlesAutoCompleted, slideNumber, timer]);
405
409
  return /*#__PURE__*/_react.default.createElement("div", {
406
410
  className: className
407
411
  }, feedbackData.show ? /*#__PURE__*/_react.default.createElement(_FeedbackComponent.default, {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "1.11.5",
5
+ "version": "1.11.7",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",