@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.
@@ -73,7 +73,7 @@ var PdfVisor = function PdfVisor(_ref) {
73
73
  };
74
74
 
75
75
  timeOut();
76
- }, []);
76
+ }, [emitNumberOfPages]);
77
77
  (0, _react.useEffect)(function () {
78
78
  setCurrentPage(1);
79
79
  }, []);
@@ -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, onHoverMark);
331
- }, [currentSlide, list, onClickMark, onHoverMark]);
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
- props.onMouseEnter = function () {
41
- return onHover(props['data-text-id'] || -1);
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.6",
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.38.0",
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",