@gamelearn/arcade-components 0.22.7 → 0.22.8

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.
@@ -17,6 +17,7 @@ var mockProps = {
17
17
  description: 'Dale al arma',
18
18
  showFrames: true,
19
19
  setInfo: function setInfo() {},
20
+ setShowPoints: function setShowPoints() {},
20
21
  emitEvent: emitEvent,
21
22
  soundActions: soundActions,
22
23
  disableExit: function disableExit() {},
@@ -69,10 +69,6 @@ var FrameImageClickComponent = function FrameImageClickComponent(_ref) {
69
69
  var _soundActions = _slicedToArray(soundActions, 1),
70
70
  playSound = _soundActions[0];
71
71
 
72
- var totalCorrects = list.reduce(function (acc, current) {
73
- return acc + current.areas.length;
74
- }, 0);
75
-
76
72
  var setRewards = function setRewards(rw) {
77
73
  accRewards.current = [].concat(_toConsumableArray(accRewards.current), _toConsumableArray(rw));
78
74
  };
@@ -166,7 +162,7 @@ var FrameImageClickComponent = function FrameImageClickComponent(_ref) {
166
162
  className: "puzzle-frame__info"
167
163
  }, /*#__PURE__*/_react.default.createElement(_Counter.default, {
168
164
  current: Object.values(framesCompleted).length,
169
- total: totalCorrects,
165
+ total: list.length,
170
166
  tooltip: !hideTooltipRef.current,
171
167
  emitEvent: emitEvent
172
168
  })) : null));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mockProps = void 0;
6
+ exports.mockPropsOnce = exports.mockProps = void 0;
7
7
 
8
8
  var emitEvent = function emitEvent(type) {
9
9
  console.log('Emit event called', type);
@@ -158,7 +158,159 @@ var mockProps = {
158
158
  closed: true
159
159
  }],
160
160
  hasClickOrder: true,
161
+ hasHighlights: true,
162
+ hasClickOnce: false
163
+ }]
164
+ };
165
+ exports.mockProps = mockProps;
166
+ var mockPropsOnce = {
167
+ nodeId: 'xxas',
168
+ description: 'Dale al arma',
169
+ isFrame: true,
170
+ showFrames: true,
171
+ setInfo: function setInfo() {},
172
+ emitEvent: emitEvent,
173
+ soundActions: soundActions,
174
+ disableExit: function disableExit() {},
175
+ setResolveAction: function setResolveAction() {},
176
+ list: [{
177
+ info: {
178
+ hint: {
179
+ active: true,
180
+ desc: 'hint',
181
+ rewards: []
182
+ },
183
+ resolve: {
184
+ rewards: []
185
+ },
186
+ solution: {
187
+ right: {
188
+ desc: 'Estupendo',
189
+ desc_labelId: 'alfalfa01',
190
+ rewards: []
191
+ },
192
+ wrong: {
193
+ desc: 'BUUUU',
194
+ desc_labelId: 'fabada01',
195
+ rewards: [{
196
+ id: 'grade',
197
+ name: 'grade',
198
+ points: -17,
199
+ type: 'grade'
200
+ }]
201
+ }
202
+ },
203
+ instructions: 'instructions'
204
+ },
205
+ itemOrder: 1,
206
+ image: {
207
+ imgName: 'Paz-Vizla-Concept.png',
208
+ img: {
209
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609a9b30901f3e001247c031/Paz-Vizla-Concept.png',
210
+ imgName: 'Paz-Vizla-Concept.png',
211
+ resourceId: '609a9b30901f3e001247c031'
212
+ },
213
+ width: 1920,
214
+ height: 1097
215
+ },
216
+ areas: [{
217
+ name: 'Uno',
218
+ x: 0,
219
+ y: 0,
220
+ fill: 'rgba(255, 255, 255, 0.1)',
221
+ draggable: true,
222
+ points: [1150.0742574257429, 217.48228650990103, 1570.95297029703, 65.42288056930694, 1704.0049504950498, 195.7595142326733, 1576.383663366337, 421.13327660891093, 1247.8267326732675, 510.73971225247533],
223
+ stroke: 'rgb(101,154,93)',
224
+ closed: true
225
+ }],
226
+ badAreas: [{
227
+ id: 'AllArea',
228
+ name: 'BadArea',
229
+ x: 0,
230
+ y: 0,
231
+ fill: 'rgba(255, 255, 255, 0.1)',
232
+ draggable: true,
233
+ points: [0, 0, 1920, 0, 1920, 1097, 0, 1097, 0, 0],
234
+ stroke: '#ff634d',
235
+ strokeWidth: 2,
236
+ closed: true
237
+ }],
238
+ hasClickOrder: false,
161
239
  hasHighlights: true
240
+ }, {
241
+ info: {
242
+ hint: {
243
+ active: true,
244
+ desc: 'hint',
245
+ rewards: []
246
+ },
247
+ resolve: {
248
+ rewards: []
249
+ },
250
+ solution: {
251
+ right: {
252
+ desc: 'Estupendo',
253
+ desc_labelId: 'alfalfa01',
254
+ rewards: []
255
+ },
256
+ wrong: {
257
+ desc: 'BUUUU',
258
+ desc_labelId: 'fabada01',
259
+ rewards: [{
260
+ id: 'grade',
261
+ name: 'grade',
262
+ points: -17,
263
+ type: 'grade'
264
+ }]
265
+ }
266
+ },
267
+ instructions: 'instructions'
268
+ },
269
+ itemOrder: 2,
270
+ image: {
271
+ imgName: 'pablo-carpio-slave2.jpeg',
272
+ img: {
273
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609e3d358782ea00116a7eee/pablo-carpio-slave2.jpeg',
274
+ imgName: 'Paz-Vizla-Concept.png',
275
+ resourceId: '609e3d358782ea00116a7eee'
276
+ },
277
+ width: 1920,
278
+ height: 1099
279
+ },
280
+ areas: [{
281
+ name: 'Uno',
282
+ x: 0,
283
+ y: 0,
284
+ fill: 'rgba(68, 215, 171, 0.56)',
285
+ draggable: true,
286
+ points: [1305.4777227722775, 606.8812654702971, 1455.094059405941, 593.2797803217823, 1463.2549504950498, 941.4778001237626, 1346.282178217822, 1012.2055228960397, 1275.5544554455448, 906.1139387376239],
287
+ stroke: 'rgb(101,154,93)',
288
+ closed: true
289
+ }, {
290
+ name: 'Dos',
291
+ x: 0,
292
+ y: 0,
293
+ fill: 'rgba(68, 215, 171, 0.56)',
294
+ draggable: true,
295
+ points: [171.1138613861387, 506.23027537128723, 312.5693069306932, 519.8317605198021, 304.4084158415843, 593.2797803217823, 157.51237623762387, 585.1188892326734],
296
+ stroke: 'rgb(101,154,93)',
297
+ closed: true
298
+ }],
299
+ badAreas: [{
300
+ id: 'AllArea',
301
+ name: 'BadArea',
302
+ x: 0,
303
+ y: 0,
304
+ fill: 'rgba(255, 255, 255, 0.1)',
305
+ draggable: true,
306
+ points: [0, 0, 1920, 0, 1920, 1099, 0, 1099, 0, 0],
307
+ stroke: '#ff634d',
308
+ strokeWidth: 2,
309
+ closed: true
310
+ }],
311
+ hasClickOrder: false,
312
+ hasHighlights: true,
313
+ hasClickOnce: true
162
314
  }]
163
315
  };
164
- exports.mockProps = mockProps;
316
+ exports.mockPropsOnce = mockPropsOnce;
@@ -92,6 +92,7 @@ var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
92
92
  areas = props.areas,
93
93
  badAreas = props.badAreas,
94
94
  hasClickOrder = props.hasClickOrder,
95
+ hasClickOnce = props.hasClickOnce,
95
96
  hasHighlights = props.hasHighlights,
96
97
  hasImageReview = props.hasImageReview,
97
98
  defaultCompleted = props.defaultCompleted,
@@ -152,12 +153,12 @@ var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
152
153
  setCompleted(defaultCompleted);
153
154
  }, [defaultCompleted]);
154
155
  (0, _react.useEffect)(function () {
155
- if (areas.length === clickedZones.length && !completed) {
156
+ if (areas.length === clickedZones.length && !completed || hasClickOnce && clickedZones.length > 0) {
156
157
  setCompleted(true);
157
158
  setDisableClick(true);
158
159
  setResolveClass('success');
159
160
  }
160
- }, [clickedZones, areas.length, handleFinish, completed, info.solution.right.desc, emitEvent]);
161
+ }, [clickedZones, areas.length, completed, info.solution.right.desc, emitEvent, hasClickOnce]);
161
162
  (0, _react.useEffect)(function () {
162
163
  setResolveAction(function (resolve) {
163
164
  setCompleted(true);
@@ -272,6 +273,7 @@ ImageClickWrapperComponent.defaultProps = {
272
273
  badAreas: [],
273
274
  className: 'puzzle--image__click',
274
275
  hasClickOrder: false,
276
+ hasClickOnce: false,
275
277
  hasHighlights: false,
276
278
  hasImageReview: false,
277
279
  defaultCompleted: false,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mockProps4 = exports.mockProps3 = exports.mockProps2 = exports.mockProps = void 0;
6
+ exports.mockPropsOnce = exports.mockProps4 = exports.mockProps3 = exports.mockProps2 = exports.mockProps = void 0;
7
7
 
8
8
  var emitEvent = function emitEvent(_ref) {
9
9
  var type = _ref.type,
@@ -346,4 +346,79 @@ var mockProps4 = {
346
346
  hasClickOrder: false,
347
347
  hasHighlights: false
348
348
  };
349
- exports.mockProps4 = mockProps4;
349
+ exports.mockProps4 = mockProps4;
350
+ var mockPropsOnce = {
351
+ emitEvent: emitEvent,
352
+ soundActions: soundActions,
353
+ disableExit: function disableExit() {},
354
+ setResolveAction: function setResolveAction() {},
355
+ transitionEffects: null,
356
+ audioId: '',
357
+ itemOrder: 1,
358
+ info: {
359
+ hint: {
360
+ active: true,
361
+ desc: 'hint',
362
+ rewards: []
363
+ },
364
+ resolve: {
365
+ rewards: []
366
+ },
367
+ solution: {
368
+ right: {
369
+ desc: 'correctSolution',
370
+ desc_labelId: 'alfalfa01',
371
+ rewards: []
372
+ },
373
+ wrong: {
374
+ desc: 'wrongSolution',
375
+ desc_labelId: 'fabada01',
376
+ rewards: [{
377
+ id: 'grade',
378
+ name: 'grade',
379
+ points: -17,
380
+ type: 'grade'
381
+ }]
382
+ }
383
+ },
384
+ instructions: 'instructions'
385
+ },
386
+ image: {
387
+ imgName: 'gato5.jpg',
388
+ img: {
389
+ url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg',
390
+ imgName: 'gato5.jpg',
391
+ resourceId: '6007f80eac41ad001120f135'
392
+ },
393
+ width: 1280,
394
+ height: 720
395
+ },
396
+ areas: [{
397
+ id: '1601910616179',
398
+ name: 'a',
399
+ x: 0,
400
+ y: 0,
401
+ draggable: true,
402
+ points: [74.1584158415841, 423.99133663366337, 229.20792079207916, 366.96163366336634, 516.1386138613861, 482.8032178217822, 644.4554455445544, 710.9220297029703, 56.33663366336629, 712.7042079207921],
403
+ strokeWidth: 2,
404
+ stroke: '#44d7ab',
405
+ fill: 'rgba(68, 215, 171, 0.56)',
406
+ closed: true
407
+ }, {
408
+ id: '1601910626254',
409
+ name: 'b',
410
+ x: 0,
411
+ y: 0,
412
+ draggable: true,
413
+ points: [607.0297029702971, 343.79331683168317, 783.4653465346535, 388.3477722772277, 865.4455445544554, 539.8329207920792, 1138.118811881188, 593.2982673267327, 1262.871287128713, 358.0507425742574, 1262.871287128713, 46.16955445544554, 1193.3663366336634, 12.308168316831683, 1018.7128712871288, 19.43688118811881, 746.0396039603961, 213.69430693069307, 555.3465346534654, 268.94183168316835],
414
+ strokeWidth: 2,
415
+ stroke: '#44d7ab',
416
+ fill: 'rgba(68, 215, 171, 0.56)',
417
+ closed: true
418
+ }],
419
+ badAreas: [],
420
+ hasClickOrder: false,
421
+ hasClickOnce: true,
422
+ hasHighlights: true
423
+ };
424
+ exports.mockPropsOnce = mockPropsOnce;
@@ -107,8 +107,11 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
107
107
  });
108
108
  }, [emitEvent]);
109
109
  var parsedText = (0, _react.useRef)(null);
110
+ var isCompleted = (0, _react.useCallback)(function () {
111
+ return correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length || list[currentSlide].hasClickOnce && correctTextFragmentsPartial.current >= 1;
112
+ }, [currentSlide, list]);
110
113
  var goForward = (0, _react.useCallback)(function () {
111
- if (correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length) {
114
+ if (isCompleted()) {
112
115
  setFeedbackData(function (prevState) {
113
116
  return _objectSpread(_objectSpread({}, prevState), {}, {
114
117
  result: false
@@ -140,7 +143,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
140
143
  }, 1200);
141
144
  }
142
145
  }
143
- }, [list, currentSlide, correctTextFragmentsAccumulated, numberAllCorrectFragments, setShowPoints]);
146
+ }, [isCompleted, correctTextFragmentsAccumulated, numberAllCorrectFragments, setShowPoints, currentSlide]);
144
147
  var handleFeedbackFuncionOnClose = (0, _react.useCallback)(function () {
145
148
  emitEvent({
146
149
  type: 'hidePuzzleButtons',
@@ -174,7 +177,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
174
177
 
175
178
  if ((_list$currentSlide$in = list[currentSlide].info.solution.right) !== null && _list$currentSlide$in !== void 0 && _list$currentSlide$in.desc) {
176
179
  //solo muestra la caja verde y suma puntos cuando resuelves todos los fragmentos correctos
177
- if (correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length) {
180
+ if (isCompleted()) {
178
181
  accRewards.current = [].concat(_toConsumableArray(accRewards.current), _toConsumableArray(list[currentSlide].info.solution.right.rewards));
179
182
  setFeedbackData(function (prevState) {
180
183
  return _objectSpread(_objectSpread({}, prevState), {}, {
@@ -205,7 +208,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
205
208
  if (list[currentSlide].specificFeedbacks.specificCorrectFeedbacks) {
206
209
  accRewards.current = [].concat(_toConsumableArray(accRewards.current), _toConsumableArray(specificFeedback === null || specificFeedback === void 0 ? void 0 : specificFeedback.rewards));
207
210
 
208
- if (correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length) {
211
+ if (isCompleted()) {
209
212
  setFeedbackData(function (prevState) {
210
213
  return _objectSpread(_objectSpread({}, prevState), {}, {
211
214
  show: true,
@@ -216,7 +219,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
216
219
  }
217
220
  } // si tiene puntos generales
218
221
  else {
219
- if (correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length) {
222
+ if (isCompleted()) {
220
223
  accRewards.current = [].concat(_toConsumableArray(accRewards.current), _toConsumableArray(list[currentSlide].info.solution.right.rewards));
221
224
  setFeedbackData(function (prevState) {
222
225
  return _objectSpread(_objectSpread({}, prevState), {}, {
@@ -228,7 +231,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
228
231
  }
229
232
  }
230
233
  }
231
- }, [correctTextFragmentsAccumulated, emitEvent, playSound, list, currentSlide]);
234
+ }, [correctTextFragmentsAccumulated, emitEvent, playSound, list, currentSlide, isCompleted]);
232
235
  var handleIncorrectClick = (0, _react.useCallback)(function (allDataTextIds, specificFeedback) {
233
236
  allDataTextIds.forEach(function (el) {
234
237
  return el.classList.add('text-click__failed');
@@ -368,18 +371,25 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
368
371
  var counter = 0;
369
372
 
370
373
  for (var i = 0; i < list.length; i++) {
371
- for (var j = 0; j < list[i].correctTexts.length; j++) {
374
+ if (list[i].hasClickOnce) {
372
375
  counter++;
373
376
  setNumberAllCorrectFragments(counter);
377
+ } else {
378
+ for (var j = 0; j < list[i].correctTexts.length; j++) {
379
+ counter++;
380
+ setNumberAllCorrectFragments(counter);
381
+ }
374
382
  }
375
383
  }
376
384
  }, [list]);
377
385
  (0, _react.useEffect)(function () {
378
- setInfo(_objectSpread(_objectSpread({}, list[currentSlide].info), {}, {
386
+ var _list$currentSlide3;
387
+
388
+ (list === null || list === void 0 ? void 0 : list[currentSlide]) && setInfo(_objectSpread(_objectSpread({}, list[currentSlide].info), {}, {
379
389
  description: description
380
390
  }));
381
391
 
382
- if (list[currentSlide].text) {
392
+ if ((_list$currentSlide3 = list[currentSlide]) !== null && _list$currentSlide3 !== void 0 && _list$currentSlide3.text) {
383
393
  var jsx = (0, _htmlReactParser.default)(list[currentSlide].text);
384
394
  parsedText.current = recursiveStuff(jsx);
385
395
  getnumberAllCorrectFragments();
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mockProps = exports.messages = void 0;
6
+ exports.mockPropsOnce = exports.mockProps = exports.messages = void 0;
7
7
 
8
8
  var emitEvent = function emitEvent(_ref) {
9
9
  var type = _ref.type,
@@ -25,6 +25,7 @@ exports.messages = messages;
25
25
  var mockProps = {
26
26
  emitEvent: emitEvent,
27
27
  setResolveAction: function setResolveAction() {},
28
+ setShowPoints: function setShowPoints() {},
28
29
  showFrames: true,
29
30
  soundActions: [function () {}, function () {}],
30
31
  styles: 'chalkboard',
@@ -39,6 +40,7 @@ var mockProps = {
39
40
  }],
40
41
  hasClickOrder: false,
41
42
  hasHighlights: true,
43
+ hasClickOnce: false,
42
44
  info: {
43
45
  solution: {
44
46
  right: {
@@ -103,8 +105,8 @@ var mockProps = {
103
105
  },
104
106
  text: messages.fullText1,
105
107
  wrongTexts: [{
106
- id: "text-click-2",
107
- value: "este value no le hace falta a arcade"
108
+ id: 'text-click-2',
109
+ value: 'este value no le hace falta a arcade'
108
110
  }]
109
111
  }, {
110
112
  allWrong: false,
@@ -117,6 +119,7 @@ var mockProps = {
117
119
  }],
118
120
  hasClickOrder: false,
119
121
  hasHighlights: true,
122
+ hasClickOnce: false,
120
123
  info: {
121
124
  solution: {
122
125
  right: {
@@ -191,10 +194,245 @@ var mockProps = {
191
194
  text: messages.fullText2,
192
195
  wrongTexts: [{
193
196
  id: 'text-click-5',
194
- value: "este value no le hace falta a arcade"
197
+ value: 'este value no le hace falta a arcade'
195
198
  }, {
196
199
  id: 'text-click-6',
197
- value: "este value no le hace falta a arcade"
200
+ value: 'este value no le hace falta a arcade'
201
+ }]
202
+ }, {
203
+ allWrong: true,
204
+ correctTexts: [{
205
+ id: 'text-click-8',
206
+ value: 'este value no le hace falta a arcade'
207
+ }],
208
+ hasClickOrder: false,
209
+ hasHighlights: false,
210
+ hasClickOnce: false,
211
+ info: {
212
+ solution: {
213
+ right: {
214
+ desc: '',
215
+ rewards: [{
216
+ id: 'k2koxnkq',
217
+ name: 'Power',
218
+ points: 10,
219
+ type: 'score'
220
+ }]
221
+ },
222
+ wrong: {
223
+ desc: '',
224
+ rewards: [{
225
+ id: 'k2koxnkq',
226
+ name: 'Power',
227
+ points: -10,
228
+ type: 'score'
229
+ }]
230
+ }
231
+ },
232
+ hint: {
233
+ active: false,
234
+ desc: '',
235
+ rewards: []
236
+ },
237
+ resolve: {
238
+ rewards: []
239
+ }
240
+ },
241
+ itemOrder: 3,
242
+ specificFeedbacks: {
243
+ correctFeedbacks: [{
244
+ id: 'text-click-8',
245
+ desc: 'text-click-8',
246
+ rewards: [{
247
+ id: 'k2koxnkq',
248
+ name: 'Power',
249
+ points: 10,
250
+ type: 'score'
251
+ }]
252
+ }],
253
+ wrongFeedbacks: []
254
+ },
255
+ text: messages.fullText3,
256
+ wrongTexts: []
257
+ }]
258
+ };
259
+ exports.mockProps = mockProps;
260
+ var mockPropsOnce = {
261
+ emitEvent: emitEvent,
262
+ setResolveAction: function setResolveAction() {},
263
+ setShowPoints: function setShowPoints() {},
264
+ showFrames: true,
265
+ soundActions: [function () {}, function () {}],
266
+ styles: 'chalkboard',
267
+ list: [{
268
+ allWrong: true,
269
+ correctTexts: [{
270
+ id: 'text-click-0',
271
+ value: 'este value no le hace falta a arcade'
272
+ }, {
273
+ id: 'text-click-1',
274
+ value: 'este value no le hace falta a arcade'
275
+ }],
276
+ hasClickOrder: false,
277
+ hasHighlights: true,
278
+ hasClickOnce: true,
279
+ info: {
280
+ solution: {
281
+ right: {
282
+ desc: '',
283
+ rewards: [{
284
+ id: 'k2koxnkq',
285
+ name: 'Power',
286
+ points: 10,
287
+ type: 'score'
288
+ }]
289
+ },
290
+ wrong: {
291
+ desc: '',
292
+ rewards: [{
293
+ id: 'k2koxnkq',
294
+ name: 'Power',
295
+ points: -10,
296
+ type: 'score'
297
+ }]
298
+ }
299
+ },
300
+ hint: {
301
+ active: false,
302
+ desc: '',
303
+ rewards: []
304
+ },
305
+ resolve: {
306
+ rewards: []
307
+ }
308
+ },
309
+ itemOrder: 1,
310
+ specificFeedbacks: {
311
+ correctFeedbacks: [{
312
+ id: 'text-click-0',
313
+ desc: '',
314
+ rewards: [{
315
+ id: 'k2koxnkq',
316
+ name: 'Power',
317
+ points: 10,
318
+ type: 'score'
319
+ }]
320
+ }, {
321
+ id: 'text-click-1',
322
+ desc: 'specificFeedbacks text-click-1 correcto',
323
+ rewards: [{
324
+ id: 'k2koxnkq',
325
+ name: 'Power',
326
+ points: 10,
327
+ type: 'score'
328
+ }]
329
+ }],
330
+ wrongFeedbacks: [{
331
+ id: 'text-click-2',
332
+ desc: 'specificFeedbacks text-click-2 incorrecto',
333
+ rewards: [{
334
+ id: 'k2koxnkq',
335
+ name: 'Power',
336
+ points: -10,
337
+ type: 'score'
338
+ }]
339
+ }]
340
+ },
341
+ text: messages.fullText1,
342
+ wrongTexts: [{
343
+ id: 'text-click-2',
344
+ value: 'este value no le hace falta a arcade'
345
+ }]
346
+ }, {
347
+ allWrong: false,
348
+ correctTexts: [{
349
+ id: 'text-click-4',
350
+ value: 'este value no le hace falta a arcade'
351
+ }, {
352
+ id: 'text-click-7',
353
+ value: 'este value no le hace falta a arcade'
354
+ }],
355
+ hasClickOrder: false,
356
+ hasHighlights: true,
357
+ hasClickOnce: true,
358
+ info: {
359
+ solution: {
360
+ right: {
361
+ desc: '',
362
+ rewards: [{
363
+ id: 'k2koxnkq',
364
+ name: 'Power',
365
+ points: 10,
366
+ type: 'score'
367
+ }]
368
+ },
369
+ wrong: {
370
+ desc: '',
371
+ rewards: [{
372
+ id: 'k2koxnkq',
373
+ name: 'Power',
374
+ points: 10,
375
+ type: 'score'
376
+ }]
377
+ }
378
+ },
379
+ hint: {
380
+ active: false,
381
+ desc: '',
382
+ rewards: []
383
+ },
384
+ resolve: {
385
+ rewards: []
386
+ }
387
+ },
388
+ itemOrder: 2,
389
+ specificFeedbacks: {
390
+ correctFeedbacks: [{
391
+ id: 'text-click-4',
392
+ desc: 'item 2 specificFeedbacks correctFeedbacks 4 (1)',
393
+ rewards: [{
394
+ id: 'k2koxnkq',
395
+ name: 'Power',
396
+ points: 10,
397
+ type: 'score'
398
+ }]
399
+ }, {
400
+ id: 'text-click-7',
401
+ desc: '',
402
+ rewards: [{
403
+ id: 'k2koxnkq',
404
+ name: 'Power',
405
+ points: -10,
406
+ type: 'score'
407
+ }]
408
+ }],
409
+ wrongFeedbacks: [{
410
+ id: 'text-click-6',
411
+ desc: 'item 6 specificFeedbacks wrongFeedbacks 6 (1)',
412
+ rewards: [{
413
+ id: 'k2koxnkq',
414
+ name: 'Power',
415
+ points: -10,
416
+ type: 'score'
417
+ }]
418
+ }, {
419
+ id: 'text-click-5',
420
+ desc: 'item 5 specificFeedbacks wrongFeedbacks 5 (1)',
421
+ rewards: [{
422
+ id: 'k2koxnkq',
423
+ name: 'Power',
424
+ points: -10,
425
+ type: 'score'
426
+ }]
427
+ }]
428
+ },
429
+ text: messages.fullText2,
430
+ wrongTexts: [{
431
+ id: 'text-click-5',
432
+ value: 'este value no le hace falta a arcade'
433
+ }, {
434
+ id: 'text-click-6',
435
+ value: 'este value no le hace falta a arcade'
198
436
  }]
199
437
  }, {
200
438
  allWrong: true,
@@ -204,6 +442,7 @@ var mockProps = {
204
442
  }],
205
443
  hasClickOrder: false,
206
444
  hasHighlights: false,
445
+ hasClickOnce: true,
207
446
  info: {
208
447
  solution: {
209
448
  right: {
@@ -252,4 +491,4 @@ var mockProps = {
252
491
  wrongTexts: []
253
492
  }]
254
493
  };
255
- exports.mockProps = mockProps;
494
+ exports.mockPropsOnce = mockPropsOnce;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "license": "Gamelearn",
4
- "version": "0.22.7",
4
+ "version": "0.22.8",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist",