@gamelearn/arcade-components 0.21.1 → 0.21.3
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/auto-evaluation-component/mocks/mockForStory.js +1 -1
- package/dist/components/test-component/components/Results.js +4 -2
- package/dist/components/test-component/components/TestComponent.js +2 -1
- package/dist/components/text-click-puzzle-component/utils/index.js +16 -2
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ var emitEvent = function emitEvent(_ref) {
|
|
|
18
18
|
|
|
19
19
|
var mockProps = {
|
|
20
20
|
emitEvent: emitEvent,
|
|
21
|
-
soundActions: [],
|
|
21
|
+
soundActions: [function () {}, function () {}],
|
|
22
22
|
slug: 'auto-pre-component',
|
|
23
23
|
description: 'A while back I needed to count the amount of letters that a piece of text in an email template had (to avoid passing any character limits). Unfortunately, I could not think of a quick way to do so on my macbook and I therefore turned to the Internet. Character Count Online is a free online character',
|
|
24
24
|
questions: [{
|
|
@@ -49,7 +49,8 @@ var ResultsComponent = function ResultsComponent(_ref) {
|
|
|
49
49
|
restartTest = _ref.restartTest,
|
|
50
50
|
timeOver = _ref.timeOver,
|
|
51
51
|
timeOverText = _ref.timeOverText,
|
|
52
|
-
emitEvent = _ref.emitEvent
|
|
52
|
+
emitEvent = _ref.emitEvent,
|
|
53
|
+
soundActions = _ref.soundActions;
|
|
53
54
|
|
|
54
55
|
var _useState = (0, _react.useState)(0),
|
|
55
56
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -133,7 +134,8 @@ var ResultsComponent = function ResultsComponent(_ref) {
|
|
|
133
134
|
className: "test--results__chart--label"
|
|
134
135
|
}, /*#__PURE__*/_react.default.createElement("span", null, translate('tests.success'))))), haveRewards ? /*#__PURE__*/_react.default.createElement(_rewardsComponent.default, {
|
|
135
136
|
rewards: rewards,
|
|
136
|
-
emitEvent: emitEvent
|
|
137
|
+
emitEvent: emitEvent,
|
|
138
|
+
soundActions: soundActions
|
|
137
139
|
}) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
138
140
|
className: "test--buttons"
|
|
139
141
|
}, !timeOver ? /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -11,6 +11,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
13
|
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
+
|
|
22
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
+
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
+
|
|
14
26
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
27
|
|
|
16
28
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -37,8 +49,10 @@ var getRecursiveJSX = function getRecursiveJSX(jsx) {
|
|
|
37
49
|
};
|
|
38
50
|
|
|
39
51
|
if (slide !== null && slide !== void 0 && slide.hasHighlights) {
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
var clickabledIds = [].concat(_toConsumableArray(slide.correctTexts), _toConsumableArray(slide.wrongTexts));
|
|
53
|
+
|
|
54
|
+
for (var _i = 0; _i < clickabledIds.length; _i++) {
|
|
55
|
+
if (props['data-text-id'] === clickabledIds[_i].id) {
|
|
42
56
|
props.className = 'text-click__hover-correct';
|
|
43
57
|
}
|
|
44
58
|
}
|