@gamelearn/arcade-components 0.22.7 → 0.22.9

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.
@@ -3,15 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mockProps = void 0;
6
+ exports.mockProps2 = exports.mockPropsOnce = exports.mockProps = void 0;
7
+
8
+ var emitEvent = function emitEvent(_ref) {
9
+ var type = _ref.type,
10
+ payload = _ref.payload;
11
+
12
+ if (type === 'translate') {
13
+ return payload;
14
+ }
7
15
 
8
- var emitEvent = function emitEvent(type) {
9
16
  console.log('Emit event called', type);
10
17
  };
11
18
 
12
- var soundActions = [function (sound) {
13
- console.log('PlaySound called :', sound);
14
- }, function () {}];
19
+ var soundActions = [function () {}, function () {}];
15
20
  var mockProps = {
16
21
  nodeId: 'xxas',
17
22
  description: 'Dale al arma',
@@ -63,6 +68,7 @@ var mockProps = {
63
68
  height: 1097
64
69
  },
65
70
  areas: [{
71
+ id: 'Uno',
66
72
  name: 'Uno',
67
73
  x: 0,
68
74
  y: 0,
@@ -127,6 +133,7 @@ var mockProps = {
127
133
  height: 1099
128
134
  },
129
135
  areas: [{
136
+ id: 'Dos',
130
137
  name: 'Uno',
131
138
  x: 0,
132
139
  y: 0,
@@ -136,6 +143,7 @@ var mockProps = {
136
143
  stroke: 'rgb(101,154,93)',
137
144
  closed: true
138
145
  }, {
146
+ id: 'Tres',
139
147
  name: 'Dos',
140
148
  x: 0,
141
149
  y: 0,
@@ -158,7 +166,410 @@ var mockProps = {
158
166
  closed: true
159
167
  }],
160
168
  hasClickOrder: true,
169
+ hasHighlights: true,
170
+ hasClickOnce: false
171
+ }]
172
+ };
173
+ exports.mockProps = mockProps;
174
+ var mockPropsOnce = {
175
+ nodeId: 'xxas',
176
+ description: 'Dale al arma',
177
+ isFrame: true,
178
+ showFrames: true,
179
+ setInfo: function setInfo() {},
180
+ emitEvent: emitEvent,
181
+ soundActions: soundActions,
182
+ disableExit: function disableExit() {},
183
+ setResolveAction: function setResolveAction() {},
184
+ list: [{
185
+ info: {
186
+ hint: {
187
+ active: true,
188
+ desc: 'hint',
189
+ rewards: []
190
+ },
191
+ resolve: {
192
+ rewards: []
193
+ },
194
+ solution: {
195
+ right: {
196
+ desc: 'Estupendo',
197
+ desc_labelId: 'alfalfa01',
198
+ rewards: []
199
+ },
200
+ wrong: {
201
+ desc: 'BUUUU',
202
+ desc_labelId: 'fabada01',
203
+ rewards: [{
204
+ id: 'grade',
205
+ name: 'grade',
206
+ points: -17,
207
+ type: 'grade'
208
+ }]
209
+ }
210
+ },
211
+ instructions: 'instructions'
212
+ },
213
+ itemOrder: 1,
214
+ image: {
215
+ imgName: 'Paz-Vizla-Concept.png',
216
+ img: {
217
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609a9b30901f3e001247c031/Paz-Vizla-Concept.png',
218
+ imgName: 'Paz-Vizla-Concept.png',
219
+ resourceId: '609a9b30901f3e001247c031'
220
+ },
221
+ width: 1920,
222
+ height: 1097
223
+ },
224
+ areas: [{
225
+ name: 'Uno',
226
+ x: 0,
227
+ y: 0,
228
+ fill: 'rgba(255, 255, 255, 0.1)',
229
+ draggable: true,
230
+ points: [1150.0742574257429, 217.48228650990103, 1570.95297029703, 65.42288056930694, 1704.0049504950498, 195.7595142326733, 1576.383663366337, 421.13327660891093, 1247.8267326732675, 510.73971225247533],
231
+ stroke: 'rgb(101,154,93)',
232
+ closed: true
233
+ }],
234
+ badAreas: [{
235
+ id: 'AllArea',
236
+ name: 'BadArea',
237
+ x: 0,
238
+ y: 0,
239
+ fill: 'rgba(255, 255, 255, 0.1)',
240
+ draggable: true,
241
+ points: [0, 0, 1920, 0, 1920, 1097, 0, 1097, 0, 0],
242
+ stroke: '#ff634d',
243
+ strokeWidth: 2,
244
+ closed: true
245
+ }],
246
+ hasClickOrder: false,
161
247
  hasHighlights: true
248
+ }, {
249
+ info: {
250
+ hint: {
251
+ active: true,
252
+ desc: 'hint',
253
+ rewards: []
254
+ },
255
+ resolve: {
256
+ rewards: []
257
+ },
258
+ solution: {
259
+ right: {
260
+ desc: 'Estupendo',
261
+ desc_labelId: 'alfalfa01',
262
+ rewards: []
263
+ },
264
+ wrong: {
265
+ desc: 'BUUUU',
266
+ desc_labelId: 'fabada01',
267
+ rewards: [{
268
+ id: 'grade',
269
+ name: 'grade',
270
+ points: -17,
271
+ type: 'grade'
272
+ }]
273
+ }
274
+ },
275
+ instructions: 'instructions'
276
+ },
277
+ itemOrder: 2,
278
+ image: {
279
+ imgName: 'pablo-carpio-slave2.jpeg',
280
+ img: {
281
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609e3d358782ea00116a7eee/pablo-carpio-slave2.jpeg',
282
+ imgName: 'Paz-Vizla-Concept.png',
283
+ resourceId: '609e3d358782ea00116a7eee'
284
+ },
285
+ width: 1920,
286
+ height: 1099
287
+ },
288
+ areas: [{
289
+ name: 'Uno',
290
+ x: 0,
291
+ y: 0,
292
+ fill: 'rgba(68, 215, 171, 0.56)',
293
+ draggable: true,
294
+ points: [1305.4777227722775, 606.8812654702971, 1455.094059405941, 593.2797803217823, 1463.2549504950498, 941.4778001237626, 1346.282178217822, 1012.2055228960397, 1275.5544554455448, 906.1139387376239],
295
+ stroke: 'rgb(101,154,93)',
296
+ closed: true
297
+ }, {
298
+ name: 'Dos',
299
+ x: 0,
300
+ y: 0,
301
+ fill: 'rgba(68, 215, 171, 0.56)',
302
+ draggable: true,
303
+ points: [171.1138613861387, 506.23027537128723, 312.5693069306932, 519.8317605198021, 304.4084158415843, 593.2797803217823, 157.51237623762387, 585.1188892326734],
304
+ stroke: 'rgb(101,154,93)',
305
+ closed: true
306
+ }],
307
+ badAreas: [{
308
+ id: 'AllArea',
309
+ name: 'BadArea',
310
+ x: 0,
311
+ y: 0,
312
+ fill: 'rgba(255, 255, 255, 0.1)',
313
+ draggable: true,
314
+ points: [0, 0, 1920, 0, 1920, 1099, 0, 1099, 0, 0],
315
+ stroke: '#ff634d',
316
+ strokeWidth: 2,
317
+ closed: true
318
+ }],
319
+ hasClickOrder: false,
320
+ hasHighlights: true,
321
+ hasClickOnce: true
322
+ }]
323
+ };
324
+ exports.mockPropsOnce = mockPropsOnce;
325
+ var mockProps2 = {
326
+ nodeId: 'xxas',
327
+ description: 'Dale al arma',
328
+ isFrame: true,
329
+ showFrames: true,
330
+ setInfo: function setInfo() {},
331
+ emitEvent: emitEvent,
332
+ soundActions: soundActions,
333
+ disableExit: function disableExit() {},
334
+ setResolveAction: function setResolveAction() {},
335
+ list: [{
336
+ info: {
337
+ hint: {
338
+ active: true,
339
+ desc: 'hint',
340
+ rewards: []
341
+ },
342
+ resolve: {
343
+ rewards: []
344
+ },
345
+ solution: {
346
+ right: {
347
+ desc: 'Estupendo',
348
+ desc_labelId: 'alfalfa01',
349
+ rewards: []
350
+ },
351
+ wrong: {
352
+ desc: 'BUUUU',
353
+ desc_labelId: 'fabada01',
354
+ rewards: [{
355
+ id: 'grade',
356
+ name: 'grade',
357
+ points: -17,
358
+ type: 'grade'
359
+ }]
360
+ }
361
+ },
362
+ instructions: 'instructions'
363
+ },
364
+ itemOrder: 1,
365
+ image: {
366
+ imgName: 'Paz-Vizla-Concept.png',
367
+ img: {
368
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609a9b30901f3e001247c031/Paz-Vizla-Concept.png',
369
+ imgName: 'Paz-Vizla-Concept.png',
370
+ resourceId: '609a9b30901f3e001247c031'
371
+ },
372
+ width: 1920,
373
+ height: 1097
374
+ },
375
+ areas: [{
376
+ id: 'Uno',
377
+ name: 'Uno',
378
+ x: 0,
379
+ y: 0,
380
+ fill: 'rgba(255, 255, 255, 0.1)',
381
+ draggable: true,
382
+ points: [1150.0742574257429, 217.48228650990103, 1570.95297029703, 65.42288056930694, 1704.0049504950498, 195.7595142326733, 1576.383663366337, 421.13327660891093, 1247.8267326732675, 510.73971225247533],
383
+ stroke: 'rgb(101,154,93)',
384
+ closed: true
385
+ }],
386
+ badAreas: [{
387
+ id: 'AllArea',
388
+ name: 'BadArea',
389
+ x: 0,
390
+ y: 0,
391
+ fill: 'rgba(255, 255, 255, 0.1)',
392
+ draggable: true,
393
+ points: [0, 0, 1920, 0, 1920, 1097, 0, 1097, 0, 0],
394
+ stroke: '#ff634d',
395
+ strokeWidth: 2,
396
+ closed: true
397
+ }],
398
+ hasClickOrder: false,
399
+ hasHighlights: true,
400
+ specificFeedbacks: {
401
+ correctFeedbacks: [{
402
+ id: 'Uno',
403
+ desc: 'specificFeedbacks 1 correcto',
404
+ rewards: [{
405
+ id: 'k2koxnkq',
406
+ name: 'Power',
407
+ points: 10,
408
+ type: 'score'
409
+ }]
410
+ }, {
411
+ id: 'Dos',
412
+ desc: 'specificFeedbacks 2 correcto',
413
+ rewards: [{
414
+ id: 'k2koxnkq',
415
+ name: 'Power',
416
+ points: 10,
417
+ type: 'score'
418
+ }]
419
+ }, {
420
+ id: 'Tres',
421
+ desc: 'specificFeedbacks 3 correcto',
422
+ rewards: [{
423
+ id: 'k2koxnkq',
424
+ name: 'Power',
425
+ points: 10,
426
+ type: 'score'
427
+ }]
428
+ }],
429
+ wrongFeedbacks: [{
430
+ id: 'Uno_bad',
431
+ desc: 'specificFeedbacks 1 incorrecto',
432
+ rewards: [{
433
+ id: 'k2koxnkq',
434
+ name: 'Power',
435
+ points: -10,
436
+ type: 'score'
437
+ }]
438
+ }, {
439
+ id: 'Dos_bad',
440
+ desc: 'specificFeedbacks 2 incorrecto',
441
+ rewards: [{
442
+ id: 'k2koxnkq',
443
+ name: 'Power',
444
+ points: -10,
445
+ type: 'score'
446
+ }]
447
+ }]
448
+ }
449
+ }, {
450
+ info: {
451
+ hint: {
452
+ active: true,
453
+ desc: 'hint',
454
+ rewards: []
455
+ },
456
+ resolve: {
457
+ rewards: []
458
+ },
459
+ solution: {
460
+ right: {
461
+ desc: 'Estupendo',
462
+ desc_labelId: 'alfalfa01',
463
+ rewards: []
464
+ },
465
+ wrong: {
466
+ desc: 'BUUUU',
467
+ desc_labelId: 'fabada01',
468
+ rewards: [{
469
+ id: 'grade',
470
+ name: 'grade',
471
+ points: -17,
472
+ type: 'grade'
473
+ }]
474
+ }
475
+ },
476
+ instructions: 'instructions'
477
+ },
478
+ itemOrder: 2,
479
+ image: {
480
+ imgName: 'pablo-carpio-slave2.jpeg',
481
+ img: {
482
+ url: 'https://gl-lms-storage.s3-eu-west-1.amazonaws.com/development/clients/58dccfba26561500117caf53/image/609e3d358782ea00116a7eee/pablo-carpio-slave2.jpeg',
483
+ imgName: 'Paz-Vizla-Concept.png',
484
+ resourceId: '609e3d358782ea00116a7eee'
485
+ },
486
+ width: 1920,
487
+ height: 1099
488
+ },
489
+ areas: [{
490
+ id: 'Dos',
491
+ name: 'Uno',
492
+ x: 0,
493
+ y: 0,
494
+ fill: 'rgba(68, 215, 171, 0.56)',
495
+ draggable: true,
496
+ points: [1305.4777227722775, 606.8812654702971, 1455.094059405941, 593.2797803217823, 1463.2549504950498, 941.4778001237626, 1346.282178217822, 1012.2055228960397, 1275.5544554455448, 906.1139387376239],
497
+ stroke: 'rgb(101,154,93)',
498
+ closed: true
499
+ }, {
500
+ id: 'Tres',
501
+ name: 'Dos',
502
+ x: 0,
503
+ y: 0,
504
+ fill: 'rgba(68, 215, 171, 0.56)',
505
+ draggable: true,
506
+ points: [171.1138613861387, 506.23027537128723, 312.5693069306932, 519.8317605198021, 304.4084158415843, 593.2797803217823, 157.51237623762387, 585.1188892326734],
507
+ stroke: 'rgb(101,154,93)',
508
+ closed: true
509
+ }],
510
+ badAreas: [{
511
+ id: 'AllArea',
512
+ name: 'BadArea',
513
+ x: 0,
514
+ y: 0,
515
+ fill: 'rgba(255, 255, 255, 0.1)',
516
+ draggable: true,
517
+ points: [0, 0, 1920, 0, 1920, 1099, 0, 1099, 0, 0],
518
+ stroke: '#ff634d',
519
+ strokeWidth: 2,
520
+ closed: true
521
+ }],
522
+ hasClickOrder: true,
523
+ hasHighlights: true,
524
+ specificFeedbacks: {
525
+ correctFeedbacks: [{
526
+ id: 'Uno',
527
+ desc: 'specificFeedbacks 1 correcto',
528
+ rewards: [{
529
+ id: 'k2koxnkq',
530
+ name: 'Power',
531
+ points: 10,
532
+ type: 'score'
533
+ }]
534
+ }, {
535
+ id: 'Dos',
536
+ desc: 'specificFeedbacks 2 correcto',
537
+ rewards: [{
538
+ id: 'k2koxnkq',
539
+ name: 'Power',
540
+ points: 10,
541
+ type: 'score'
542
+ }]
543
+ }, {
544
+ id: 'Tres',
545
+ desc: 'specificFeedbacks 3 correcto',
546
+ rewards: [{
547
+ id: 'k2koxnkq',
548
+ name: 'Power',
549
+ points: 10,
550
+ type: 'score'
551
+ }]
552
+ }],
553
+ wrongFeedbacks: [{
554
+ id: 'Uno_bad',
555
+ desc: 'specificFeedbacks 1 incorrecto',
556
+ rewards: [{
557
+ id: 'k2koxnkq',
558
+ name: 'Power',
559
+ points: -10,
560
+ type: 'score'
561
+ }]
562
+ }, {
563
+ id: 'Dos_bad',
564
+ desc: 'specificFeedbacks 2 incorrecto',
565
+ rewards: [{
566
+ id: 'k2koxnkq',
567
+ name: 'Power',
568
+ points: -10,
569
+ type: 'score'
570
+ }]
571
+ }]
572
+ }
162
573
  }]
163
574
  };
164
- exports.mockProps = mockProps;
575
+ exports.mockProps2 = mockProps2;
@@ -8,7 +8,7 @@ exports.mockProps4 = exports.mockProps3 = exports.mockProps2 = exports.mockProps
8
8
  var emitEvent = function emitEvent(_ref) {
9
9
  var type = _ref.type,
10
10
  payload = _ref.payload;
11
- console.log('Emit event called');
11
+ console.log('Emit event called', type);
12
12
 
13
13
  if (type === 'translate') {
14
14
  return payload;