@gamelearn/arcade-components 0.19.6 → 0.19.8
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/pdf-component/components/PdfVisor.js +1 -1
- package/dist/components/terminal-puzzle-component/components/Visor/index.js +2 -0
- package/dist/components/text-click-puzzle-component/components/TextClickPuzzleComponent.js +2 -12
- package/dist/components/text-click-puzzle-component/utils/index.js +5 -3
- package/package.json +2 -2
|
@@ -71,6 +71,7 @@ var Visor = function Visor(_ref) {
|
|
|
71
71
|
props: _objectSpread(_objectSpread({}, file), {}, {
|
|
72
72
|
url: url,
|
|
73
73
|
translate: translate,
|
|
74
|
+
emitNumberOfPages: function emitNumberOfPages() {},
|
|
74
75
|
endPdf: function endPdf() {}
|
|
75
76
|
})
|
|
76
77
|
},
|
|
@@ -79,6 +80,7 @@ var Visor = function Visor(_ref) {
|
|
|
79
80
|
props: _objectSpread(_objectSpread({}, file), {}, {
|
|
80
81
|
url: url,
|
|
81
82
|
translate: translate,
|
|
83
|
+
emitNumberOfPages: function emitNumberOfPages() {},
|
|
82
84
|
endPdf: function endPdf() {}
|
|
83
85
|
})
|
|
84
86
|
}
|
|
@@ -105,16 +105,6 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
105
105
|
});
|
|
106
106
|
}, [emitEvent]);
|
|
107
107
|
var parsedText = (0, _react.useRef)(null);
|
|
108
|
-
var onHoverMark = (0, _react.useCallback)(function (id) {
|
|
109
|
-
for (var i = 0; i < list[currentSlide].correctTexts.length; i++) {
|
|
110
|
-
if (id === list[currentSlide].correctTexts[i].id) {
|
|
111
|
-
var allDataTextIds = document.querySelectorAll("[data-text-id=\"".concat(id, "\"]"));
|
|
112
|
-
allDataTextIds.forEach(function (el) {
|
|
113
|
-
return el.classList.add('text-click__hover-correct');
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, [currentSlide, list]);
|
|
118
108
|
var goForward = (0, _react.useCallback)(function () {
|
|
119
109
|
if (correctTextFragmentsPartial.current === list[currentSlide].correctTexts.length) {
|
|
120
110
|
setFeedbackData(function (prevState) {
|
|
@@ -327,8 +317,8 @@ var TextClickPuzzleComponent = function TextClickPuzzleComponent(_ref) {
|
|
|
327
317
|
}
|
|
328
318
|
}, [list, currentSlide, orderCounter, handleCorrectClick, emitEvent, translate, handleIncorrectClick]);
|
|
329
319
|
var recursiveStuff = (0, _react.useCallback)(function (jsx) {
|
|
330
|
-
return (0, _utils.getRecursiveJSX)(jsx, 0, list[currentSlide], onClickMark
|
|
331
|
-
}, [currentSlide, list, onClickMark
|
|
320
|
+
return (0, _utils.getRecursiveJSX)(jsx, 0, list[currentSlide], onClickMark);
|
|
321
|
+
}, [currentSlide, list, onClickMark]);
|
|
332
322
|
var getnumberAllCorrectFragments = (0, _react.useCallback)(function () {
|
|
333
323
|
var counter = 0;
|
|
334
324
|
|
|
@@ -37,9 +37,11 @@ var getRecursiveJSX = function getRecursiveJSX(jsx) {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
if (slide !== null && slide !== void 0 && slide.hasHighlights) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
for (var _i = 0; _i < slide.correctTexts.length; _i++) {
|
|
41
|
+
if (props['data-text-id'] === slide.correctTexts[_i].id) {
|
|
42
|
+
props.className = 'text-click__hover-correct';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
} else if (slide !== null && slide !== void 0 && slide.allWrong && !jsx.props['data-text-id']) {
|
|
45
47
|
props.onClick = function (e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamelearn/arcade-components",
|
|
3
3
|
"license": "Gamelearn",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.8",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@babel/cli": "7.12.10",
|
|
56
56
|
"@babel/preset-env": "7.12.11",
|
|
57
57
|
"@babel/preset-react": "7.12.10",
|
|
58
|
-
"@gamelearn/ui-components-core": "5.
|
|
58
|
+
"@gamelearn/ui-components-core": "5.40.0",
|
|
59
59
|
"@react-three/test-renderer": "6.0.6",
|
|
60
60
|
"@storybook/addon-actions": "6.1.11",
|
|
61
61
|
"@storybook/addon-essentials": "6.1.11",
|