@gamelearn/arcade-components 1.4.18 → 1.4.20
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.
package/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js
CHANGED
|
@@ -92,6 +92,8 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
92
92
|
var _soundActions = _slicedToArray(soundActions, 1),
|
|
93
93
|
playSound = _soundActions[0];
|
|
94
94
|
|
|
95
|
+
console.log('yeaaaaa');
|
|
96
|
+
|
|
95
97
|
var translate = function translate(id) {
|
|
96
98
|
return emitEvent({
|
|
97
99
|
type: 'translate',
|
|
@@ -162,7 +164,20 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
162
164
|
var pickedCard = specificFeedbacks.correctFeedbacks.find(function (greenCard) {
|
|
163
165
|
return greenCard.id === cardId;
|
|
164
166
|
});
|
|
165
|
-
|
|
167
|
+
|
|
168
|
+
if (pickedCard !== null && pickedCard !== void 0 && pickedCard.desc) {
|
|
169
|
+
setFeedBackText(pickedCard.desc);
|
|
170
|
+
} else {
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
playSound('score');
|
|
173
|
+
handleFeedbackFuncionOnClose();
|
|
174
|
+
emitEvent({
|
|
175
|
+
type: 'hidePuzzleButtons',
|
|
176
|
+
payload: false
|
|
177
|
+
});
|
|
178
|
+
}, 2000);
|
|
179
|
+
}
|
|
180
|
+
|
|
166
181
|
setRightPick(true);
|
|
167
182
|
setFeedbackIsShown(true);
|
|
168
183
|
setRewards([].concat(_toConsumableArray(accRewards), [pickedCard === null || pickedCard === void 0 ? void 0 : pickedCard.rewards]));
|
|
@@ -181,7 +196,7 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
181
196
|
});
|
|
182
197
|
setRightPick(false);
|
|
183
198
|
|
|
184
|
-
if (failedCard) {
|
|
199
|
+
if (failedCard !== null && failedCard !== void 0 && failedCard.desc) {
|
|
185
200
|
setFeedBackText(failedCard.desc);
|
|
186
201
|
setFeedbackIsShown(true);
|
|
187
202
|
setRewards([].concat(_toConsumableArray(accRewards), [failedCard === null || failedCard === void 0 ? void 0 : failedCard.rewards]));
|
|
@@ -193,7 +208,7 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
193
208
|
type: 'hidePuzzleButtons',
|
|
194
209
|
payload: false
|
|
195
210
|
});
|
|
196
|
-
},
|
|
211
|
+
}, 2000);
|
|
197
212
|
}
|
|
198
213
|
} // si hay feedback definido
|
|
199
214
|
else if (info.solution.wrong.desc) {
|