@gamelearn/arcade-components 2.34.2 → 2.35.1
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/chained-image-click-puzzle-component/components/CurrentImagePuzzle.js +2 -3
- package/dist/components/frame-click-puzzle-component/components/CurrentFramePuzzle.js +2 -3
- package/dist/components/writer-puzzle-component/components/ElectionComponent.js +3 -1
- package/dist/components/writer-puzzle-component/components/SingleElection.js +2 -2
- package/package.json +2 -2
package/dist/components/chained-image-click-puzzle-component/components/CurrentImagePuzzle.js
CHANGED
|
@@ -80,11 +80,10 @@ var CurrentImageClickPuzzle = function CurrentImageClickPuzzle(_ref) {
|
|
|
80
80
|
}, [index]);
|
|
81
81
|
var onComplete = (0, _react.useCallback)(function (rw) {
|
|
82
82
|
var correct = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
83
|
-
var finish = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
84
83
|
var updatedCompleted = _objectSpread({}, slidesCompleted);
|
|
85
84
|
if (correct) {
|
|
86
85
|
var _specificFeedbacks$co;
|
|
87
|
-
if (specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co !== void 0 && _specificFeedbacks$co.length && !currentImageProps.hasClickOnce
|
|
86
|
+
if (specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co !== void 0 && _specificFeedbacks$co.length && !currentImageProps.hasClickOnce) {
|
|
88
87
|
correctClicked.current += 1;
|
|
89
88
|
} else {
|
|
90
89
|
var total = selected;
|
|
@@ -148,7 +147,7 @@ var CurrentImageClickPuzzle = function CurrentImageClickPuzzle(_ref) {
|
|
|
148
147
|
}, [info, puzzleId, setInfo]);
|
|
149
148
|
(0, _react.useEffect)(function () {
|
|
150
149
|
if (loadPuzzleStatus && index !== list.length - 1) {
|
|
151
|
-
onComplete([], true
|
|
150
|
+
onComplete([], true);
|
|
152
151
|
}
|
|
153
152
|
}, [index, list.length, loadPuzzleStatus, onComplete]);
|
|
154
153
|
var checkSelectedAreas = function checkSelectedAreas() {
|
|
@@ -84,11 +84,10 @@ var CurrentFramePuzzle = function CurrentFramePuzzle(_ref) {
|
|
|
84
84
|
}, [index]);
|
|
85
85
|
var onComplete = (0, _react.useCallback)(function (rw) {
|
|
86
86
|
var correct = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
87
|
-
var finish = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
88
87
|
var updatedCompleted = _objectSpread({}, framesCompleted);
|
|
89
88
|
if (correct) {
|
|
90
89
|
var _specificFeedbacks$co;
|
|
91
|
-
if (specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co !== void 0 && _specificFeedbacks$co.length && !props.hasClickOnce
|
|
90
|
+
if (specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co !== void 0 && _specificFeedbacks$co.length && !props.hasClickOnce) {
|
|
92
91
|
correctClicked.current += 1;
|
|
93
92
|
} else {
|
|
94
93
|
var total = selected;
|
|
@@ -156,7 +155,7 @@ var CurrentFramePuzzle = function CurrentFramePuzzle(_ref) {
|
|
|
156
155
|
}, [emitResetPuzzle, setFramesCompleted]);
|
|
157
156
|
(0, _react.useEffect)(function () {
|
|
158
157
|
if (loadPuzzleStatus && index !== list.length - 1) {
|
|
159
|
-
onComplete([], true
|
|
158
|
+
onComplete([], true);
|
|
160
159
|
}
|
|
161
160
|
}, [framesCompleted, index, list.length, loadPuzzleStatus, onComplete]);
|
|
162
161
|
var checkSelectedAreas = function checkSelectedAreas() {
|
|
@@ -45,7 +45,9 @@ var ElectionComponent = function ElectionComponent(_ref2) {
|
|
|
45
45
|
printed();
|
|
46
46
|
}, [printed]);
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
-
className: "elections-box pos".concat(decisionInspected + 1)
|
|
48
|
+
className: "elections-box pos".concat(decisionInspected + 1, "-").concat(textWithOpts.filter(function (text) {
|
|
49
|
+
return !!text.fullText;
|
|
50
|
+
}).length)
|
|
49
51
|
}, textWithOpts && textWithOpts.map(function (opt, index) {
|
|
50
52
|
return /*#__PURE__*/_react.default.createElement(SingleElectionRender, {
|
|
51
53
|
opt: opt,
|
|
@@ -30,7 +30,7 @@ var SingleElection = function SingleElection(_ref) {
|
|
|
30
30
|
};
|
|
31
31
|
var fullTextIcon = function fullTextIcon(opt) {
|
|
32
32
|
if (opt.previewText !== '') {
|
|
33
|
-
return 'icon-eye'; // Icon only appears if there is fullText to show
|
|
33
|
+
return decisionInspected === index ? 'icon-eye inspected' : 'icon-eye'; // Icon only appears if there is fullText to show
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return '';
|
|
@@ -64,7 +64,7 @@ var SingleElection = function SingleElection(_ref) {
|
|
|
64
64
|
}
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
className: "single-election__btn"
|
|
67
|
-
}, useText(option)), /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, useText(option))), /*#__PURE__*/_react.default.createElement("div", {
|
|
68
68
|
onClick: onInspect,
|
|
69
69
|
onKeyDown: onKeyDownInspect,
|
|
70
70
|
className: fullTextIcon(option),
|
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.
|
|
5
|
+
"version": "2.35.1",
|
|
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.
|
|
17
|
+
"@gamelearn/arcade-styles": "2.20.0",
|
|
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",
|