@gamelearn/arcade-components 0.19.10 → 0.20.0

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,19 +17,25 @@ var Panels = function Panels(_ref) {
17
17
  activeIndex = _ref.activeIndex,
18
18
  flex = _ref.flex,
19
19
  lodSettings = _ref.lodSettings;
20
- return characters.map(function (char, index) {
21
- var notFlexedPosition = slots.findIndex(function (s) {
22
- return s.uid === char.uid;
23
- });
24
- var currentSlot = !flex ? notFlexedPosition : index;
25
- char.index = index;
26
- char.slot = currentSlot;
27
- return /*#__PURE__*/_react.default.createElement(_Panel.default, {
28
- key: "".concat(char.uid, "_").concat(index),
29
- character: char,
30
- active: activeIndex === currentSlot,
31
- lodSettings: lodSettings
20
+ return slots.map(function (slot, slotPosition) {
21
+ var characterPos = characters.findIndex(function (c) {
22
+ return c.uid === slot.uid;
32
23
  });
24
+
25
+ if (characterPos >= 0) {
26
+ var currentPosition = !flex ? slotPosition : characterPos;
27
+ var currentCharacter = Object.assign({}, characters[characterPos]);
28
+ currentCharacter.index = characterPos;
29
+ currentCharacter.slot = slotPosition;
30
+ return /*#__PURE__*/_react.default.createElement(_Panel.default, {
31
+ key: "".concat(currentCharacter.uid, "_").concat(slotPosition, "_").concat(characterPos),
32
+ character: currentCharacter,
33
+ active: activeIndex === currentPosition,
34
+ lodSettings: lodSettings
35
+ });
36
+ }
37
+
38
+ return null;
33
39
  });
34
40
  };
35
41
 
@@ -135,9 +135,10 @@ var DecisionComponent = function DecisionComponent(_ref) {
135
135
  payload: rewards,
136
136
  finish: !onFinish
137
137
  });
138
+ setResultChoice({});
139
+ selectView('options');
138
140
 
139
141
  if (onFinish) {
140
- // audio stop
141
142
  onFinish();
142
143
  }
143
144
  } else if (Object.keys(choice).length > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "license": "Gamelearn",
4
- "version": "0.19.10",
4
+ "version": "0.20.0",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist",