@gamelearn/arcade-components 0.22.4 → 0.22.5
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,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.mockPropsNotMandatory = exports.mockPropsMandatory = void 0;
|
|
7
7
|
|
|
8
8
|
var emitEvent = function emitEvent(action) {
|
|
9
9
|
console.log('Emit event called');
|
|
@@ -13,10 +13,10 @@ var emitEvent = function emitEvent(action) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var mockPropsMandatory = {
|
|
17
17
|
emitEvent: emitEvent,
|
|
18
18
|
documentType: 'lesson',
|
|
19
|
-
soundActions: [],
|
|
19
|
+
soundActions: [function () {}, function () {}],
|
|
20
20
|
name: 'pdf',
|
|
21
21
|
required: true,
|
|
22
22
|
document: {
|
|
@@ -26,4 +26,18 @@ var mockProps = {
|
|
|
26
26
|
visible: true,
|
|
27
27
|
viewed: false
|
|
28
28
|
};
|
|
29
|
-
exports.
|
|
29
|
+
exports.mockPropsMandatory = mockPropsMandatory;
|
|
30
|
+
var mockPropsNotMandatory = {
|
|
31
|
+
emitEvent: emitEvent,
|
|
32
|
+
documentType: 'lesson',
|
|
33
|
+
soundActions: [function () {}, function () {}],
|
|
34
|
+
name: 'pdf',
|
|
35
|
+
required: true,
|
|
36
|
+
document: {
|
|
37
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/pdf/60ebe3d9ee257c0011dc1522/beginners-guide_minio_onepage-1.pdf',
|
|
38
|
+
resourceId: 'test'
|
|
39
|
+
},
|
|
40
|
+
visible: true,
|
|
41
|
+
viewed: false
|
|
42
|
+
};
|
|
43
|
+
exports.mockPropsNotMandatory = mockPropsNotMandatory;
|
|
@@ -179,7 +179,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
179
179
|
setFeedbackData(function (prevState) {
|
|
180
180
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
181
181
|
show: true,
|
|
182
|
-
result:
|
|
182
|
+
result: true,
|
|
183
183
|
text: list[currentSlide].info.solution.right.desc,
|
|
184
184
|
timeout: false
|
|
185
185
|
});
|
|
@@ -193,7 +193,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
193
193
|
setFeedbackData(function (prevState) {
|
|
194
194
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
195
195
|
show: true,
|
|
196
|
-
result:
|
|
196
|
+
result: true,
|
|
197
197
|
text: specificFeedback.desc,
|
|
198
198
|
timeout: false
|
|
199
199
|
});
|
|
@@ -209,7 +209,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
209
209
|
setFeedbackData(function (prevState) {
|
|
210
210
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
211
211
|
show: true,
|
|
212
|
-
result:
|
|
212
|
+
result: true,
|
|
213
213
|
timeout: true
|
|
214
214
|
});
|
|
215
215
|
});
|
|
@@ -221,7 +221,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
221
221
|
setFeedbackData(function (prevState) {
|
|
222
222
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
223
223
|
show: true,
|
|
224
|
-
result:
|
|
224
|
+
result: true,
|
|
225
225
|
timeout: true
|
|
226
226
|
});
|
|
227
227
|
});
|
|
@@ -244,6 +244,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
244
244
|
setFeedbackData(function (prevState) {
|
|
245
245
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
246
246
|
show: true,
|
|
247
|
+
result: false,
|
|
247
248
|
text: list[currentSlide].info.solution.wrong.desc,
|
|
248
249
|
timeout: false
|
|
249
250
|
});
|
|
@@ -256,6 +257,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
256
257
|
setFeedbackData(function (prevState) {
|
|
257
258
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
258
259
|
show: true,
|
|
260
|
+
result: false,
|
|
259
261
|
text: specificFeedback.desc,
|
|
260
262
|
timeout: false
|
|
261
263
|
});
|
|
@@ -268,6 +270,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
268
270
|
setFeedbackData(function (prevState) {
|
|
269
271
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
270
272
|
show: true,
|
|
273
|
+
result: false,
|
|
271
274
|
timeout: true
|
|
272
275
|
});
|
|
273
276
|
});
|
|
@@ -277,6 +280,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
277
280
|
setFeedbackData(function (prevState) {
|
|
278
281
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
279
282
|
show: true,
|
|
283
|
+
result: false,
|
|
280
284
|
timeout: true
|
|
281
285
|
});
|
|
282
286
|
});
|
|
@@ -318,7 +322,7 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
318
322
|
});
|
|
319
323
|
setFeedbackData(function (prevState) {
|
|
320
324
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
321
|
-
result:
|
|
325
|
+
result: false,
|
|
322
326
|
text: list[currentSlide].info.orderFeedback.desc || translate('puzzles.incorrectOrder'),
|
|
323
327
|
timeout: false
|
|
324
328
|
});
|
|
@@ -339,13 +343,15 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
339
343
|
// si tiene feedback general definido
|
|
340
344
|
setFeedbackData(function (prevState) {
|
|
341
345
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
342
|
-
timeout: true
|
|
346
|
+
timeout: true,
|
|
347
|
+
result: false
|
|
343
348
|
});
|
|
344
349
|
});
|
|
345
350
|
|
|
346
351
|
if (list[currentSlide].info.solution.wrong.desc !== '') {
|
|
347
352
|
setFeedbackData(function (prevState) {
|
|
348
353
|
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
354
|
+
result: false,
|
|
349
355
|
text: list[currentSlide].info.solution.wrong.desc,
|
|
350
356
|
timeout: false
|
|
351
357
|
});
|