@gamelearn/arcade-components 2.37.0 → 2.37.2
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
|
@@ -97,7 +97,7 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
97
97
|
});
|
|
98
98
|
}, [emitEvent]);
|
|
99
99
|
var endPuzzle = (0, _react.useCallback)(function () {
|
|
100
|
-
var _info$solution
|
|
100
|
+
var _info$solution;
|
|
101
101
|
emitEvent({
|
|
102
102
|
type: 'hidePuzzleButtons',
|
|
103
103
|
payload: true
|
|
@@ -105,20 +105,21 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
105
105
|
setFeedbackResult(true);
|
|
106
106
|
var _info$solution$right = info === null || info === void 0 ? void 0 : (_info$solution = info.solution) === null || _info$solution === void 0 ? void 0 : _info$solution.right,
|
|
107
107
|
rewards = _info$solution$right.rewards;
|
|
108
|
-
var specificRewards = (specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) === null || _specificFeedbacks$co === void 0 ? void 0 : _specificFeedbacks$co.map(function (spReward) {
|
|
109
|
-
return spReward.rewards;
|
|
110
|
-
}).flat()) || [];
|
|
111
108
|
var rewardsData = [];
|
|
112
109
|
playSound('score');
|
|
113
110
|
if (resolveWithAnyCard) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var _specificRewards$corr;
|
|
117
|
-
var cardFeedback = (specificRewards === null || specificRewards === void 0 ? void 0 : (_specificRewards$corr = specificRewards.correctFeedbacks) === null || _specificRewards$corr === void 0 ? void 0 : _specificRewards$corr.find(function (feedback) {
|
|
111
|
+
var _specificFeedbacks$co;
|
|
112
|
+
var cardFeedback = (specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) === null || _specificFeedbacks$co === void 0 ? void 0 : _specificFeedbacks$co.find(function (feedback) {
|
|
118
113
|
return cardSelected.id === feedback.id;
|
|
119
114
|
})) || {};
|
|
120
115
|
var cardReward = cardFeedback && cardFeedback.rewards ? cardFeedback.rewards : [];
|
|
121
116
|
rewardsData = [].concat(_toConsumableArray(accRewards), _toConsumableArray(rewards), _toConsumableArray(cardReward));
|
|
117
|
+
} else {
|
|
118
|
+
var _specificFeedbacks$co2;
|
|
119
|
+
var specificRewards = (specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : (_specificFeedbacks$co2 = specificFeedbacks.correctFeedbacks) === null || _specificFeedbacks$co2 === void 0 ? void 0 : _specificFeedbacks$co2.map(function (spReward) {
|
|
120
|
+
return spReward.rewards;
|
|
121
|
+
}).flat()) || [];
|
|
122
|
+
rewardsData = [].concat(_toConsumableArray(accRewards), _toConsumableArray(rewards), _toConsumableArray(specificRewards));
|
|
122
123
|
}
|
|
123
124
|
closeFeedbackAndShowPoints(rewardsData);
|
|
124
125
|
}, [accRewards, closeFeedbackAndShowPoints, emitEvent, info === null || info === void 0 ? void 0 : (_info$solution2 = info.solution) === null || _info$solution2 === void 0 ? void 0 : _info$solution2.right, playSound, specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : specificFeedbacks.correctFeedbacks, resolveWithAnyCard, cardSelected]);
|
|
@@ -539,6 +539,12 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
539
539
|
isLeft: isLeft
|
|
540
540
|
};
|
|
541
541
|
};
|
|
542
|
+
var setUIContainerToItsDefaultZIndex = function setUIContainerToItsDefaultZIndex(value) {
|
|
543
|
+
emitEvent({
|
|
544
|
+
type: 'resetZIndexUIContainer',
|
|
545
|
+
payload: value
|
|
546
|
+
});
|
|
547
|
+
};
|
|
542
548
|
|
|
543
549
|
// Position bubble over talking character/and switch emotions
|
|
544
550
|
(0, _react.useEffect)(function () {
|
|
@@ -721,9 +727,11 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
721
727
|
keyboardControl: keyboardControl,
|
|
722
728
|
onMount: function onMount() {
|
|
723
729
|
resetCameraView();
|
|
730
|
+
setUIContainerToItsDefaultZIndex(true);
|
|
724
731
|
},
|
|
725
732
|
onUnMount: function onUnMount() {
|
|
726
733
|
zoomStarted.current = false;
|
|
734
|
+
setUIContainerToItsDefaultZIndex(false);
|
|
727
735
|
}
|
|
728
736
|
});
|
|
729
737
|
return /*#__PURE__*/_react.default.createElement(_DialogDecision.default, decisionPayload);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gamelearn/arcade-components",
|
|
3
3
|
"author": "Gamelearn",
|
|
4
4
|
"license": "unlicense",
|
|
5
|
-
"version": "2.37.
|
|
5
|
+
"version": "2.37.2",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@babel/runtime": "^7.18.6",
|
|
17
|
-
"@gamelearn/arcade-styles": "2.20.
|
|
17
|
+
"@gamelearn/arcade-styles": "2.20.1",
|
|
18
18
|
"@gamelearn/arcade-three-core": "1.24.3",
|
|
19
19
|
"@react-three/a11y": "^3.0.0",
|
|
20
20
|
"@react-three/drei": "9.4.3",
|