@gamelearn/arcade-components 2.41.1 → 3.0.2
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/README.md +9 -6
- package/dist/arcade-components.cjs +274 -0
- package/dist/arcade-components.js +57929 -0
- package/package.json +74 -73
- package/dist/components/animation-component/components/AnimationComponent.js +0 -98
- package/dist/components/animation-component/index.js +0 -10
- package/dist/components/animation-component/mocks/mockForStory.js +0 -26
- package/dist/components/auto-evaluation-component/components/AutoEvaluation.js +0 -215
- package/dist/components/auto-evaluation-component/components/EndScreen.js +0 -43
- package/dist/components/auto-evaluation-component/components/StartScreen.js +0 -32
- package/dist/components/auto-evaluation-component/index.js +0 -10
- package/dist/components/auto-evaluation-component/mocks/mockForStory.js +0 -38
- package/dist/components/cards-selector-puzzle-component/components/Board/index.js +0 -159
- package/dist/components/cards-selector-puzzle-component/components/Card/index.js +0 -115
- package/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js +0 -289
- package/dist/components/cards-selector-puzzle-component/index.js +0 -10
- package/dist/components/cards-selector-puzzle-component/mocks/mockForStory.js +0 -446
- package/dist/components/cartel-component/components/CartelComponent.js +0 -124
- package/dist/components/cartel-component/index.js +0 -10
- package/dist/components/chained-image-click-puzzle-component/components/ChainedImageClickPuzzleComponent.js +0 -80
- package/dist/components/chained-image-click-puzzle-component/components/CurrentImagePuzzle.js +0 -182
- package/dist/components/chained-image-click-puzzle-component/index.js +0 -10
- package/dist/components/chained-image-click-puzzle-component/mocks/mockForStory.js +0 -413
- package/dist/components/comic-component/components/ComicComponent.js +0 -201
- package/dist/components/comic-component/components/Slide.js +0 -31
- package/dist/components/comic-component/components/Vignette.js +0 -70
- package/dist/components/comic-component/index.js +0 -10
- package/dist/components/comic-component/mocks/mockForStory.js +0 -314
- package/dist/components/conversational-component/components/ConversationalComponent.js +0 -101
- package/dist/components/conversational-component/index.js +0 -10
- package/dist/components/conversational-pro-component/components/ConversationalProComponent.js +0 -543
- package/dist/components/conversational-pro-component/components/Message.js +0 -37
- package/dist/components/conversational-pro-component/components/Slot.js +0 -92
- package/dist/components/conversational-pro-component/components/SlotList.js +0 -162
- package/dist/components/conversational-pro-component/components/scene/Panel.js +0 -179
- package/dist/components/conversational-pro-component/components/scene/Panels.js +0 -46
- package/dist/components/conversational-pro-component/components/scene/index.js +0 -77
- package/dist/components/conversational-pro-component/index.js +0 -10
- package/dist/components/conversational-pro-component/mocks/mockForStory.js +0 -1529
- package/dist/components/cracker-puzzle-component/components/CrackerPuzzleComponent.js +0 -261
- package/dist/components/cracker-puzzle-component/components/DrawGrid/index.js +0 -33
- package/dist/components/cracker-puzzle-component/components/DrawItem/index.js +0 -48
- package/dist/components/cracker-puzzle-component/components/DrawRow/index.js +0 -43
- package/dist/components/cracker-puzzle-component/components/colors.js +0 -12
- package/dist/components/cracker-puzzle-component/components/helpers.js +0 -133
- package/dist/components/cracker-puzzle-component/index.js +0 -10
- package/dist/components/cracker-puzzle-component/mocks/mockForStory.js +0 -277
- package/dist/components/decision-component/components/DecisionBody.js +0 -116
- package/dist/components/decision-component/components/DecisionComponent.js +0 -248
- package/dist/components/decision-component/components/Feedback.js +0 -40
- package/dist/components/decision-component/components/Options.js +0 -74
- package/dist/components/decision-component/index.js +0 -10
- package/dist/components/decision-component/mocks/mockForStory.js +0 -166
- package/dist/components/dialog-component/components/BubbleWrapper.js +0 -39
- package/dist/components/dialog-component/components/DialogComponent.js +0 -779
- package/dist/components/dialog-component/components/DialogDecision.js +0 -44
- package/dist/components/dialog-component/components/SpeechBubbleComponent.js +0 -66
- package/dist/components/dialog-component/index.js +0 -10
- package/dist/components/dialog-component/mocks/mockForStory.js +0 -550
- package/dist/components/drag-item-puzzle-component/components/DragItemPuzzleComponent.js +0 -361
- package/dist/components/drag-item-puzzle-component/index.js +0 -10
- package/dist/components/drag-item-puzzle-component/mocks/mockForStory.js +0 -74
- package/dist/components/feedback-component/components/FeedbackComponent.js +0 -126
- package/dist/components/feedback-component/index.js +0 -10
- package/dist/components/feedback-component/mocks/mockForStory.js +0 -52
- package/dist/components/frame-click-puzzle-component/components/Counter/index.js +0 -24
- package/dist/components/frame-click-puzzle-component/components/CurrentFramePuzzle.js +0 -196
- package/dist/components/frame-click-puzzle-component/components/FrameClickPuzzleComponent.js +0 -178
- package/dist/components/frame-click-puzzle-component/components/Tooltip/index.js +0 -23
- package/dist/components/frame-click-puzzle-component/index.js +0 -10
- package/dist/components/frame-click-puzzle-component/mocks/mockForStory.js +0 -717
- package/dist/components/hacker-puzzle-component/components/HackerPuzzleComponent.js +0 -255
- package/dist/components/hacker-puzzle-component/components/languages.js +0 -13
- package/dist/components/hacker-puzzle-component/index.js +0 -10
- package/dist/components/hacker-puzzle-component/mocks/mockForStory.js +0 -103
- package/dist/components/hanged-puzzle-component/components/HangedPuzzleComponent.js +0 -488
- package/dist/components/hanged-puzzle-component/index.js +0 -10
- package/dist/components/hanged-puzzle-component/mocks/mockForStory.js +0 -61
- package/dist/components/hanged-puzzle-component/utils.js +0 -64
- package/dist/components/image-click-puzzle-component/components/ImageClickPuzzleComponent.js +0 -40
- package/dist/components/image-click-puzzle-component/index.js +0 -10
- package/dist/components/image-click-puzzle-component/mocks/mockForStory.js +0 -427
- package/dist/components/image-click-wrapper-component/components/CountDown/index.js +0 -18
- package/dist/components/image-click-wrapper-component/components/ImageClickWrapperComponent.js +0 -472
- package/dist/components/image-click-wrapper-component/components/TimerDialog/index.js +0 -26
- package/dist/components/image-click-wrapper-component/index.js +0 -10
- package/dist/components/image-click-wrapper-component/mocks/mockForStory.js +0 -432
- package/dist/components/image-component/components/ImageComponent.js +0 -83
- package/dist/components/image-component/index.js +0 -10
- package/dist/components/image-component/mocks/mockForStory.js +0 -52
- package/dist/components/index.js +0 -260
- package/dist/components/inventory-item/components/InventoryItem.js +0 -120
- package/dist/components/inventory-item/index.js +0 -10
- package/dist/components/inventory-item/mocks/mockForStory.js +0 -29
- package/dist/components/keyboard-puzzle-component/components/KeyboardPuzzleComponent.js +0 -275
- package/dist/components/keyboard-puzzle-component/index.js +0 -10
- package/dist/components/keyboard-puzzle-component/mocks/mockForStory.js +0 -40
- package/dist/components/konva-components/Area/index.js +0 -170
- package/dist/components/konva-components/KonvaMapper.js +0 -185
- package/dist/components/lectures-component/components/LectureButtons.js +0 -40
- package/dist/components/lectures-component/components/LecturesComponent.js +0 -157
- package/dist/components/lectures-component/index.js +0 -10
- package/dist/components/lectures-component/mocks/mockForStory.js +0 -39
- package/dist/components/login-puzzle-component/components/LoginPuzzleComponent.js +0 -243
- package/dist/components/login-puzzle-component/index.js +0 -10
- package/dist/components/login-puzzle-component/mocks/mockForStory.js +0 -38
- package/dist/components/notice-component/components/NoticeComponent.js +0 -96
- package/dist/components/notice-component/index.js +0 -10
- package/dist/components/notice-component/mocks/mockForStory.js +0 -20
- package/dist/components/pattern-component/components/PatternComponent.js +0 -78
- package/dist/components/pattern-component/index.js +0 -10
- package/dist/components/pattern-component/mocks/mockForStory.js +0 -35
- package/dist/components/pdf-component/components/PdfComponent.js +0 -122
- package/dist/components/pdf-component/components/PdfVisor.js +0 -187
- package/dist/components/pdf-component/index.js +0 -20
- package/dist/components/pdf-component/mocks/mockForProps.js +0 -38
- package/dist/components/referral-component/components/EmailPill.js +0 -26
- package/dist/components/referral-component/components/ReferralComponent.js +0 -115
- package/dist/components/referral-component/components/StepOne.js +0 -170
- package/dist/components/referral-component/components/StepTwo.js +0 -57
- package/dist/components/referral-component/index.js +0 -10
- package/dist/components/referral-component/mocks/mockForStory.js +0 -40
- package/dist/components/survey-component/components/ApplicableBox.js +0 -49
- package/dist/components/survey-component/components/OpinionBox.js +0 -45
- package/dist/components/survey-component/components/SurveyComponent.js +0 -150
- package/dist/components/survey-component/components/TextBox.js +0 -40
- package/dist/components/survey-component/index.js +0 -10
- package/dist/components/survey-component/mocks/mockForStory.js +0 -14
- package/dist/components/terminal-puzzle-component/components/FilesGroup/Item.js +0 -28
- package/dist/components/terminal-puzzle-component/components/FilesGroup/index.js +0 -76
- package/dist/components/terminal-puzzle-component/components/Image/index.js +0 -22
- package/dist/components/terminal-puzzle-component/components/TerminalPuzzleComponent.js +0 -216
- package/dist/components/terminal-puzzle-component/components/Visor/index.js +0 -129
- package/dist/components/terminal-puzzle-component/components/utils/index.js +0 -26
- package/dist/components/terminal-puzzle-component/index.js +0 -10
- package/dist/components/terminal-puzzle-component/mocks/mockForStory.js +0 -188
- package/dist/components/test-component/components/Container.js +0 -211
- package/dist/components/test-component/components/Feedbacks.js +0 -48
- package/dist/components/test-component/components/Questions.js +0 -145
- package/dist/components/test-component/components/Results.js +0 -208
- package/dist/components/test-component/components/TestComponent.js +0 -302
- package/dist/components/test-component/index.js +0 -10
- package/dist/components/test-component/mocks/mockForStory.js +0 -113
- package/dist/components/text-click-puzzle-component/components/TextClickPuzzleComponent.js +0 -387
- package/dist/components/text-click-puzzle-component/index.js +0 -10
- package/dist/components/text-click-puzzle-component/mocks/mockForStory.js +0 -485
- package/dist/components/text-click-puzzle-component/utils/index.js +0 -76
- package/dist/components/url-component/components/UrlComponent.js +0 -88
- package/dist/components/url-component/index.js +0 -10
- package/dist/components/url-component/mocks/mockForProps.js +0 -20
- package/dist/components/video-component/components/VideoComponent.js +0 -73
- package/dist/components/video-component/index.js +0 -10
- package/dist/components/video-component/mocks/mockForStory.js +0 -94
- package/dist/components/video-visor/components/VideoControllers/BufferBar.js +0 -108
- package/dist/components/video-visor/components/VideoControllers/ControlButtons.js +0 -31
- package/dist/components/video-visor/components/VideoControllers/FinishedVideoButtons.js +0 -32
- package/dist/components/video-visor/components/VideoControllers/PlayInitButton.js +0 -37
- package/dist/components/video-visor/components/VideoControllers/SkipButton.js +0 -37
- package/dist/components/video-visor/components/VideoControllers/Timer.js +0 -37
- package/dist/components/video-visor/components/VideoControllers/VolumeBar.js +0 -92
- package/dist/components/video-visor/components/VideoControllers/index.js +0 -122
- package/dist/components/video-visor/components/VideoVisor.js +0 -271
- package/dist/components/video-visor/index.js +0 -10
- package/dist/components/video-visor/mocks/mockForStory.js +0 -42
- package/dist/components/web-builder-puzzle-component/Popups/PopupColorComponent/index.js +0 -87
- package/dist/components/web-builder-puzzle-component/Popups/PopupImageComponent/index.js +0 -94
- package/dist/components/web-builder-puzzle-component/Popups/PopupTextComponent/index.js +0 -114
- package/dist/components/web-builder-puzzle-component/Popups/index.js +0 -27
- package/dist/components/web-builder-puzzle-component/Templates/Bank.js +0 -98
- package/dist/components/web-builder-puzzle-component/Templates/Facebook.js +0 -37
- package/dist/components/web-builder-puzzle-component/Templates/resourcePath.js +0 -9
- package/dist/components/web-builder-puzzle-component/components/EditButton/index.js +0 -28
- package/dist/components/web-builder-puzzle-component/components/Feedback/index.js +0 -41
- package/dist/components/web-builder-puzzle-component/components/PublishButton/index.js +0 -29
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/BankBody.js +0 -118
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/FacebookBody.js +0 -149
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/index.js +0 -25
- package/dist/components/web-builder-puzzle-component/components/WebBuilderFront/index.js +0 -89
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/BankHeader.js +0 -84
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/FacebookHeader.js +0 -38
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/index.js +0 -40
- package/dist/components/web-builder-puzzle-component/components/WebBuilderPuzzleComponent.js +0 -302
- package/dist/components/web-builder-puzzle-component/components/WebBuilderTopBar/index.js +0 -30
- package/dist/components/web-builder-puzzle-component/index.js +0 -10
- package/dist/components/web-builder-puzzle-component/mocks/mockForStory.js +0 -27
- package/dist/components/writer-puzzle-component/components/ElectionComponent.js +0 -69
- package/dist/components/writer-puzzle-component/components/FeedbackComponent.js +0 -97
- package/dist/components/writer-puzzle-component/components/FeedbackElement.js +0 -32
- package/dist/components/writer-puzzle-component/components/FinishedTextComponent.js +0 -25
- package/dist/components/writer-puzzle-component/components/FixedComponent.js +0 -120
- package/dist/components/writer-puzzle-component/components/SingleElection.js +0 -85
- package/dist/components/writer-puzzle-component/components/WriterPuzzleComponent.js +0 -450
- package/dist/components/writer-puzzle-component/index.js +0 -10
- package/dist/components/writer-puzzle-component/mocks/mockForStory.js +0 -1194
- package/dist/components/zoom-test/components/ZoomTest.js +0 -73
- package/dist/components/zoom-test/index.js +0 -10
- package/dist/components/zoom-test/mocks/mockForStory.js +0 -21
- package/dist/helpers/LangIsRtl.js +0 -16
- package/dist/helpers/LightSet.js +0 -35
- package/dist/helpers/LodController.js +0 -28
- package/dist/helpers/deviceDetection.js +0 -21
- package/dist/helpers/drawLOD.js +0 -310
- package/dist/helpers/index.js +0 -268
- package/dist/helpers/lodStats.js +0 -55
- package/dist/helpers/mocker.js +0 -116
- package/dist/helpers/useEkho.js +0 -172
- package/dist/helpers/useGLB.js +0 -57
- package/dist/helpers/useStateMachine.js +0 -277
- package/dist/helpers/useTimeout.js +0 -32
- package/dist/helpers/useWindowSize.js +0 -44
- package/dist/index.js +0 -16
- package/dist/test/testSceneWrapper.js +0 -31
package/dist/components/image-click-wrapper-component/components/ImageClickWrapperComponent.js
DELETED
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _KonvaMapper = _interopRequireDefault(require("../../konva-components/KonvaMapper"));
|
|
10
|
-
var _FeedbackComponent = _interopRequireDefault(require("../../feedback-component/components/FeedbackComponent"));
|
|
11
|
-
var _TimerDialog = _interopRequireDefault(require("./TimerDialog"));
|
|
12
|
-
var _CountDown = _interopRequireDefault(require("./CountDown"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
-
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."); }
|
|
18
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
-
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); }
|
|
28
|
-
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; }
|
|
29
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
30
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
var defaultImg = 'https://min.gamelearn.io/css-resources/gamelearn/resources/puzzle-login-low.png';
|
|
32
|
-
var ImageReview = function ImageReview() {
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: "puzzle--image__preview"
|
|
35
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
36
|
-
alt: "img",
|
|
37
|
-
src: "https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg"
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
40
|
-
var ImageClickWrapperComponent = function ImageClickWrapperComponent(props) {
|
|
41
|
-
var _info$timerFeedback3, _info$timerFeedback4;
|
|
42
|
-
// Common config
|
|
43
|
-
var soundActions = props.soundActions,
|
|
44
|
-
emitEvent = props.emitEvent,
|
|
45
|
-
handleClick = props.handleClick,
|
|
46
|
-
disableExit = props.disableExit,
|
|
47
|
-
setResolveAction = props.setResolveAction,
|
|
48
|
-
info = props.info,
|
|
49
|
-
image = props.image,
|
|
50
|
-
areas = props.areas,
|
|
51
|
-
badAreas = props.badAreas,
|
|
52
|
-
hasClickOrder = props.hasClickOrder,
|
|
53
|
-
timer = props.timer,
|
|
54
|
-
hasClickOnce = props.hasClickOnce,
|
|
55
|
-
hasHighlights = props.hasHighlights,
|
|
56
|
-
hasImageReview = props.hasImageReview,
|
|
57
|
-
defaultCompleted = props.defaultCompleted,
|
|
58
|
-
className = props.className,
|
|
59
|
-
emitFinish = props.emitFinish,
|
|
60
|
-
emitResolve = props.emitResolve,
|
|
61
|
-
translateFromParent = props.translateFromParent,
|
|
62
|
-
specificFeedbacks = props.specificFeedbacks,
|
|
63
|
-
slideNumber = props.slideNumber,
|
|
64
|
-
emitResetPuzzle = props.emitResetPuzzle,
|
|
65
|
-
firstTryForFrame = props.firstTryForFrame,
|
|
66
|
-
puzzlesAutoCompleted = props.puzzlesAutoCompleted,
|
|
67
|
-
emitOpenPopupCounterInfo = props.emitOpenPopupCounterInfo,
|
|
68
|
-
pause = props.pause,
|
|
69
|
-
keyboardControl = props.keyboardControl;
|
|
70
|
-
var _useState = (0, _react.useState)([]),
|
|
71
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
-
clickedZones = _useState2[0],
|
|
73
|
-
setClickedZones = _useState2[1];
|
|
74
|
-
var _useState3 = (0, _react.useState)(false),
|
|
75
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
76
|
-
completed = _useState4[0],
|
|
77
|
-
setCompleted = _useState4[1];
|
|
78
|
-
var _useState5 = (0, _react.useState)(false),
|
|
79
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
80
|
-
finished = _useState6[0],
|
|
81
|
-
setFinished = _useState6[1];
|
|
82
|
-
var _useState7 = (0, _react.useState)({
|
|
83
|
-
show: false,
|
|
84
|
-
success: false,
|
|
85
|
-
text: '',
|
|
86
|
-
rewards: []
|
|
87
|
-
}),
|
|
88
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
89
|
-
feedbackData = _useState8[0],
|
|
90
|
-
setFeedbackData = _useState8[1];
|
|
91
|
-
var popupCounterVisible = (0, _react.useRef)(false);
|
|
92
|
-
|
|
93
|
-
// timer stuffs
|
|
94
|
-
var _useState9 = (0, _react.useState)(true),
|
|
95
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
96
|
-
dialogForTimer = _useState10[0],
|
|
97
|
-
setDialogForTimer = _useState10[1];
|
|
98
|
-
var _useState11 = (0, _react.useState)(false),
|
|
99
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
100
|
-
timeExpired = _useState12[0],
|
|
101
|
-
setTimeExpired = _useState12[1];
|
|
102
|
-
var startDate = (0, _react.useRef)(null);
|
|
103
|
-
var actualDate = (0, _react.useRef)(null);
|
|
104
|
-
var intervalForActualDate = (0, _react.useRef)(null);
|
|
105
|
-
var finalDate = (0, _react.useRef)(null);
|
|
106
|
-
var pauseDate = (0, _react.useRef)(null);
|
|
107
|
-
var whenCloseFeedbackDate = (0, _react.useRef)(null);
|
|
108
|
-
var remainingTime = (0, _react.useRef)(null);
|
|
109
|
-
var cheatClue = (0, _react.useRef)(null);
|
|
110
|
-
var intervalForCountDown = (0, _react.useRef)(null);
|
|
111
|
-
var _useState13 = (0, _react.useState)(timer),
|
|
112
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
113
|
-
countDownTime = _useState14[0],
|
|
114
|
-
setCountDownTime = _useState14[1];
|
|
115
|
-
var translate = function translate(id) {
|
|
116
|
-
if (translateFromParent) return translateFromParent(id); // when there is no emitEvent pass the Translate
|
|
117
|
-
return emitEvent({
|
|
118
|
-
type: 'translate',
|
|
119
|
-
payload: id
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
var _soundActions = _slicedToArray(soundActions, 1),
|
|
123
|
-
playSound = _soundActions[0];
|
|
124
|
-
var solution = info.solution;
|
|
125
|
-
var imageUrl = image.img.url || defaultImg;
|
|
126
|
-
var areasList = areas.map(function (area, index) {
|
|
127
|
-
return _objectSpread({
|
|
128
|
-
index: index,
|
|
129
|
-
shape: 'poly'
|
|
130
|
-
}, area);
|
|
131
|
-
});
|
|
132
|
-
var badAreasList = badAreas.map(function (area, index) {
|
|
133
|
-
return _objectSpread({
|
|
134
|
-
index: index,
|
|
135
|
-
shape: 'poly'
|
|
136
|
-
}, area);
|
|
137
|
-
});
|
|
138
|
-
var startCountDown = (0, _react.useCallback)(function () {
|
|
139
|
-
if (!dialogForTimer) {
|
|
140
|
-
var timeout = setInterval(function () {
|
|
141
|
-
setCountDownTime(function (t) {
|
|
142
|
-
if (t > 1) {
|
|
143
|
-
return t - 1;
|
|
144
|
-
}
|
|
145
|
-
return 0;
|
|
146
|
-
});
|
|
147
|
-
}, 1000);
|
|
148
|
-
intervalForCountDown.current = timeout;
|
|
149
|
-
}
|
|
150
|
-
}, [dialogForTimer]);
|
|
151
|
-
var handleFinish = (0, _react.useCallback)(function (rewards, success) {
|
|
152
|
-
if (emitFinish) {
|
|
153
|
-
emitFinish(rewards, success);
|
|
154
|
-
} else {
|
|
155
|
-
emitEvent({
|
|
156
|
-
type: 'addPoints',
|
|
157
|
-
payload: rewards
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}, [emitEvent, emitFinish]);
|
|
161
|
-
(0, _react.useEffect)(function () {
|
|
162
|
-
if (completed) {
|
|
163
|
-
disableExit(true);
|
|
164
|
-
}
|
|
165
|
-
}, [completed, disableExit]);
|
|
166
|
-
(0, _react.useEffect)(function () {
|
|
167
|
-
setCompleted(defaultCompleted);
|
|
168
|
-
}, [defaultCompleted]);
|
|
169
|
-
var clearListenerForActualDate = (0, _react.useCallback)(function () {
|
|
170
|
-
clearInterval(intervalForActualDate.current);
|
|
171
|
-
}, []);
|
|
172
|
-
var clearIntervalForCountDown = (0, _react.useCallback)(function () {
|
|
173
|
-
clearInterval(intervalForCountDown.current);
|
|
174
|
-
}, []);
|
|
175
|
-
var pauseTheCounter = (0, _react.useCallback)(function (remainingTimeWhenPauseTheCounter) {
|
|
176
|
-
pauseDate.current = Date.now();
|
|
177
|
-
if (!finalDate.current) {
|
|
178
|
-
remainingTime.current = pauseDate.current - (pauseDate.current - remainingTimeWhenPauseTheCounter * 1000);
|
|
179
|
-
clearListenerForActualDate();
|
|
180
|
-
} else {
|
|
181
|
-
remainingTime.current = finalDate.current - pauseDate.current;
|
|
182
|
-
clearListenerForActualDate();
|
|
183
|
-
}
|
|
184
|
-
}, [clearListenerForActualDate]);
|
|
185
|
-
var feedbackError = (0, _react.useCallback)(function () {
|
|
186
|
-
setFeedbackData(function () {
|
|
187
|
-
var _info$timerFeedback, _info$timerFeedback2;
|
|
188
|
-
return {
|
|
189
|
-
show: true,
|
|
190
|
-
success: false,
|
|
191
|
-
text: info !== null && info !== void 0 && (_info$timerFeedback = info.timerFeedback) !== null && _info$timerFeedback !== void 0 && _info$timerFeedback.desc ? info.timerFeedback.desc : '',
|
|
192
|
-
rewards: info === null || info === void 0 ? void 0 : (_info$timerFeedback2 = info.timerFeedback) === null || _info$timerFeedback2 === void 0 ? void 0 : _info$timerFeedback2.rewards
|
|
193
|
-
};
|
|
194
|
-
});
|
|
195
|
-
setTimeExpired(true);
|
|
196
|
-
clearIntervalForCountDown();
|
|
197
|
-
clearListenerForActualDate();
|
|
198
|
-
}, [clearIntervalForCountDown, clearListenerForActualDate, (_info$timerFeedback3 = info.timerFeedback) === null || _info$timerFeedback3 === void 0 ? void 0 : _info$timerFeedback3.desc, (_info$timerFeedback4 = info.timerFeedback) === null || _info$timerFeedback4 === void 0 ? void 0 : _info$timerFeedback4.rewards]);
|
|
199
|
-
var listenerForActualDate = (0, _react.useCallback)(function () {
|
|
200
|
-
clearInterval(intervalForActualDate.current);
|
|
201
|
-
intervalForActualDate.current = setInterval(function () {
|
|
202
|
-
actualDate.current = Date.now();
|
|
203
|
-
// show timerFeedback when finish the time
|
|
204
|
-
if (actualDate.current > finalDate.current) {
|
|
205
|
-
feedbackError();
|
|
206
|
-
}
|
|
207
|
-
}, 250);
|
|
208
|
-
}, [feedbackError]);
|
|
209
|
-
(0, _react.useEffect)(function () {
|
|
210
|
-
if ((areas.length === clickedZones.length || hasClickOnce && clickedZones.length > 0) && !completed) {
|
|
211
|
-
var _specificFeedbacks$co;
|
|
212
|
-
setCompleted(true);
|
|
213
|
-
var lastClicked = clickedZones[clickedZones.length - 1];
|
|
214
|
-
var lastSpecific = specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : specificFeedbacks.correctFeedbacks.find(function (feed) {
|
|
215
|
-
return feed.id === lastClicked.id;
|
|
216
|
-
});
|
|
217
|
-
if (!(specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co !== void 0 && _specificFeedbacks$co.length) || specificFeedbacks !== null && specificFeedbacks !== void 0 && specificFeedbacks.correctFeedbacks.some(function (feed) {
|
|
218
|
-
return !feed.desc;
|
|
219
|
-
}) || hasClickOnce) {
|
|
220
|
-
setFeedbackData(function (oldState) {
|
|
221
|
-
return _objectSpread(_objectSpread({}, oldState), {}, {
|
|
222
|
-
show: true,
|
|
223
|
-
success: true,
|
|
224
|
-
text: lastSpecific ? lastSpecific.desc : info.solution.right.desc,
|
|
225
|
-
rewards: lastSpecific ? lastSpecific.rewards : info.solution.right.rewards
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
if (timer) {
|
|
229
|
-
clearIntervalForCountDown();
|
|
230
|
-
pauseTheCounter();
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}, [clickedZones, areas.length, specificFeedbacks, hasClickOnce, completed, info.solution.right, pauseTheCounter, timer, clearIntervalForCountDown]);
|
|
235
|
-
(0, _react.useEffect)(function () {
|
|
236
|
-
setResolveAction(function (resolve) {
|
|
237
|
-
if (timer) {
|
|
238
|
-
clearIntervalForCountDown();
|
|
239
|
-
setDialogForTimer(false);
|
|
240
|
-
if (feedbackData.show) {
|
|
241
|
-
setFeedbackData(function (oldState) {
|
|
242
|
-
return _objectSpread(_objectSpread({}, oldState), {}, {
|
|
243
|
-
show: false,
|
|
244
|
-
success: false,
|
|
245
|
-
text: '',
|
|
246
|
-
rewards: []
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
} else {
|
|
250
|
-
clearListenerForActualDate();
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
setCompleted(true);
|
|
254
|
-
setFinished(true);
|
|
255
|
-
setTimeout(function () {
|
|
256
|
-
if (emitResolve) {
|
|
257
|
-
emitResolve(resolve);
|
|
258
|
-
} else {
|
|
259
|
-
resolve();
|
|
260
|
-
}
|
|
261
|
-
}, 4000);
|
|
262
|
-
});
|
|
263
|
-
}, [setResolveAction, emitResolve, playSound, timer, feedbackData.show, clearListenerForActualDate, clearIntervalForCountDown]);
|
|
264
|
-
(0, _react.useEffect)(function () {
|
|
265
|
-
if (finished) {
|
|
266
|
-
disableExit(true);
|
|
267
|
-
}
|
|
268
|
-
}, [finished, disableExit]);
|
|
269
|
-
var handleIncorrectAreaClick = function handleIncorrectAreaClick(area) {
|
|
270
|
-
var notInOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
271
|
-
if (!completed) {
|
|
272
|
-
var _specificFeedbacks$wr;
|
|
273
|
-
var _solution$wrong = solution.wrong,
|
|
274
|
-
wrongRewards = _solution$wrong.rewards,
|
|
275
|
-
desc = _solution$wrong.desc;
|
|
276
|
-
var feedback = desc;
|
|
277
|
-
var rewards = wrongRewards;
|
|
278
|
-
var specific = specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : (_specificFeedbacks$wr = specificFeedbacks.wrongFeedbacks) === null || _specificFeedbacks$wr === void 0 ? void 0 : _specificFeedbacks$wr.find(function (feed) {
|
|
279
|
-
return feed.id === area.id;
|
|
280
|
-
});
|
|
281
|
-
if (specific) {
|
|
282
|
-
feedback = specific.desc;
|
|
283
|
-
rewards = specific.rewards;
|
|
284
|
-
}
|
|
285
|
-
if (hasClickOrder) {
|
|
286
|
-
setClickedZones([]);
|
|
287
|
-
if (notInOrder) {
|
|
288
|
-
var _info$orderFeedback;
|
|
289
|
-
if (info !== null && info !== void 0 && (_info$orderFeedback = info.orderFeedback) !== null && _info$orderFeedback !== void 0 && _info$orderFeedback.desc) {
|
|
290
|
-
feedback = info.orderFeedback.desc;
|
|
291
|
-
rewards = info.orderFeedback.rewards;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
if (timer) {
|
|
296
|
-
clearIntervalForCountDown();
|
|
297
|
-
pauseTheCounter();
|
|
298
|
-
}
|
|
299
|
-
setFeedbackData(function (oldState) {
|
|
300
|
-
return _objectSpread(_objectSpread({}, oldState), {}, {
|
|
301
|
-
show: true,
|
|
302
|
-
success: false,
|
|
303
|
-
text: feedback,
|
|
304
|
-
rewards: rewards
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
playSound('fail');
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
var handleOnClose = (0, _react.useCallback)(function () {
|
|
311
|
-
whenCloseFeedbackDate.current = Date.now();
|
|
312
|
-
var newFinalDate = whenCloseFeedbackDate.current + remainingTime.current;
|
|
313
|
-
actualDate.current = null;
|
|
314
|
-
finalDate.current = newFinalDate;
|
|
315
|
-
if (timer || timeExpired) {
|
|
316
|
-
if (!feedbackData.success) {
|
|
317
|
-
setClickedZones([]);
|
|
318
|
-
setDialogForTimer(true);
|
|
319
|
-
emitResetPuzzle();
|
|
320
|
-
} else if (areas.length === clickedZones.length || hasClickOnce && clickedZones.length > 0) {
|
|
321
|
-
clearIntervalForCountDown();
|
|
322
|
-
} else {
|
|
323
|
-
setCountDownTime(remainingTime.current * 0.001);
|
|
324
|
-
startCountDown();
|
|
325
|
-
listenerForActualDate();
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
handleFinish(feedbackData.rewards, feedbackData.success);
|
|
329
|
-
playSound('click-ui');
|
|
330
|
-
setFeedbackData(function (oldState) {
|
|
331
|
-
return _objectSpread(_objectSpread({}, oldState), {}, {
|
|
332
|
-
show: false,
|
|
333
|
-
success: false,
|
|
334
|
-
text: '',
|
|
335
|
-
rewards: []
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
}, [timer, timeExpired, handleFinish, feedbackData.rewards, feedbackData.success, playSound, areas.length, clickedZones.length, hasClickOnce, emitResetPuzzle, clearIntervalForCountDown, startCountDown, listenerForActualDate]);
|
|
339
|
-
var handleCorrectAreaClick = function handleCorrectAreaClick(area) {
|
|
340
|
-
if (!clickedZones.some(function (zone) {
|
|
341
|
-
return zone.index === area.index;
|
|
342
|
-
}) && !feedbackData.show && !completed) {
|
|
343
|
-
playSound('click-ui');
|
|
344
|
-
var feedback = solution.right.desc;
|
|
345
|
-
var rewards = solution.right.rewards;
|
|
346
|
-
var updatedZones = [].concat(_toConsumableArray(clickedZones), [area]);
|
|
347
|
-
if (hasClickOrder && area.index === clickedZones.length || !hasClickOrder) {
|
|
348
|
-
var _specificFeedbacks$co2;
|
|
349
|
-
if (timer) {
|
|
350
|
-
pauseTheCounter(countDownTime);
|
|
351
|
-
}
|
|
352
|
-
handleClick();
|
|
353
|
-
if (specificFeedbacks !== null && specificFeedbacks !== void 0 && (_specificFeedbacks$co2 = specificFeedbacks.correctFeedbacks) !== null && _specificFeedbacks$co2 !== void 0 && _specificFeedbacks$co2.length) {
|
|
354
|
-
var _specificFeedbacks$co3;
|
|
355
|
-
var specific = (_specificFeedbacks$co3 = specificFeedbacks.correctFeedbacks) === null || _specificFeedbacks$co3 === void 0 ? void 0 : _specificFeedbacks$co3.find(function (feed) {
|
|
356
|
-
return feed.id === area.id;
|
|
357
|
-
});
|
|
358
|
-
if (specific) {
|
|
359
|
-
feedback = specific.desc;
|
|
360
|
-
rewards = specific.rewards;
|
|
361
|
-
}
|
|
362
|
-
if (!feedback && areas.length > updatedZones.length && !hasClickOnce) {
|
|
363
|
-
handleFinish(rewards, true);
|
|
364
|
-
} else if (feedback && !hasClickOnce) {
|
|
365
|
-
setFeedbackData(function (oldState) {
|
|
366
|
-
return _objectSpread(_objectSpread({}, oldState), {}, {
|
|
367
|
-
show: true,
|
|
368
|
-
success: true,
|
|
369
|
-
text: feedback,
|
|
370
|
-
rewards: rewards
|
|
371
|
-
});
|
|
372
|
-
});
|
|
373
|
-
if (timer) {
|
|
374
|
-
clearIntervalForCountDown();
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
setClickedZones(updatedZones);
|
|
379
|
-
} else {
|
|
380
|
-
handleIncorrectAreaClick(area, true);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
var createStartAndEndDate = (0, _react.useCallback)(function () {
|
|
385
|
-
clearIntervalForCountDown();
|
|
386
|
-
setCountDownTime(timer);
|
|
387
|
-
startCountDown();
|
|
388
|
-
if (!popupCounterVisible.current && firstTryForFrame) {
|
|
389
|
-
emitOpenPopupCounterInfo();
|
|
390
|
-
}
|
|
391
|
-
setDialogForTimer(false);
|
|
392
|
-
startDate.current = Date.now();
|
|
393
|
-
finalDate.current = startDate.current + timer * 1000;
|
|
394
|
-
listenerForActualDate();
|
|
395
|
-
}, [clearIntervalForCountDown, timer, startCountDown, firstTryForFrame, listenerForActualDate, emitOpenPopupCounterInfo]);
|
|
396
|
-
(0, _react.useEffect)(function () {
|
|
397
|
-
// start automatically the time
|
|
398
|
-
if (timer && slideNumber > 0 && !cheatClue.current) {
|
|
399
|
-
if (firstTryForFrame && Object.keys(puzzlesAutoCompleted).length && puzzlesAutoCompleted[slideNumber - 1]) {
|
|
400
|
-
setDialogForTimer(true);
|
|
401
|
-
cheatClue.current = true;
|
|
402
|
-
} else {
|
|
403
|
-
setDialogForTimer(false);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}, [defaultCompleted, firstTryForFrame, puzzlesAutoCompleted, slideNumber, timer]);
|
|
407
|
-
(0, _react.useEffect)(function () {
|
|
408
|
-
if (timer && countDownTime === 0) feedbackError();
|
|
409
|
-
}, [countDownTime, feedbackError, timer]);
|
|
410
|
-
|
|
411
|
-
// only for frameclick
|
|
412
|
-
(0, _react.useEffect)(function () {
|
|
413
|
-
if (timer) {
|
|
414
|
-
if (pause) {
|
|
415
|
-
clearIntervalForCountDown();
|
|
416
|
-
pauseTheCounter();
|
|
417
|
-
} else {
|
|
418
|
-
startCountDown();
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}, [clearIntervalForCountDown, listenerForActualDate, pause, pauseTheCounter, startCountDown, timer]);
|
|
422
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
423
|
-
className: className
|
|
424
|
-
}, feedbackData.show ? /*#__PURE__*/_react.default.createElement(_FeedbackComponent.default, {
|
|
425
|
-
playSound: playSound,
|
|
426
|
-
text: feedbackData.text,
|
|
427
|
-
success: feedbackData.success,
|
|
428
|
-
translate: translate,
|
|
429
|
-
hasTimeout: !feedbackData.text,
|
|
430
|
-
delay: timer ? 1000 : 2000,
|
|
431
|
-
functionOnClose: handleOnClose,
|
|
432
|
-
timeExpired: timeExpired,
|
|
433
|
-
keyboardControl: keyboardControl
|
|
434
|
-
}) : null, /*#__PURE__*/_react.default.createElement(_KonvaMapper.default, {
|
|
435
|
-
completed: completed,
|
|
436
|
-
imageUrl: imageUrl,
|
|
437
|
-
areas: hasClickOnce && clickedZones.length ? [clickedZones[0]] : areasList,
|
|
438
|
-
badAreas: badAreasList,
|
|
439
|
-
clickedZones: clickedZones,
|
|
440
|
-
onClick: handleCorrectAreaClick,
|
|
441
|
-
onClickOutside: handleIncorrectAreaClick,
|
|
442
|
-
hasHighlights: hasHighlights,
|
|
443
|
-
emitEvent: emitEvent
|
|
444
|
-
}), hasImageReview ? /*#__PURE__*/_react.default.createElement(ImageReview, null) : null, timer && dialogForTimer ? /*#__PURE__*/_react.default.createElement(_TimerDialog.default, {
|
|
445
|
-
retry: firstTryForFrame || puzzlesAutoCompleted[slideNumber - 1],
|
|
446
|
-
translate: translate,
|
|
447
|
-
onInit: createStartAndEndDate
|
|
448
|
-
}) : null, timer ? /*#__PURE__*/_react.default.createElement(_CountDown.default, {
|
|
449
|
-
time: countDownTime
|
|
450
|
-
}) : null);
|
|
451
|
-
};
|
|
452
|
-
ImageClickWrapperComponent.defaultProps = {
|
|
453
|
-
info: {
|
|
454
|
-
instructions: '',
|
|
455
|
-
resolve: {},
|
|
456
|
-
solution: {},
|
|
457
|
-
hint: {},
|
|
458
|
-
title: ''
|
|
459
|
-
},
|
|
460
|
-
badAreas: [],
|
|
461
|
-
className: 'puzzle--image__click',
|
|
462
|
-
hasClickOrder: false,
|
|
463
|
-
hasClickOnce: false,
|
|
464
|
-
hasHighlights: false,
|
|
465
|
-
hasImageReview: false,
|
|
466
|
-
defaultCompleted: false,
|
|
467
|
-
hideContinue: false,
|
|
468
|
-
emitAreaClick: function emitAreaClick() {},
|
|
469
|
-
handleClick: function handleClick() {}
|
|
470
|
-
};
|
|
471
|
-
var _default = ImageClickWrapperComponent;
|
|
472
|
-
exports.default = _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var TimerDialog = function TimerDialog(_ref) {
|
|
10
|
-
var retry = _ref.retry,
|
|
11
|
-
translate = _ref.translate,
|
|
12
|
-
onInit = _ref.onInit;
|
|
13
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
14
|
-
className: "timer-dialog"
|
|
15
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
16
|
-
className: "timer-dialog__container"
|
|
17
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
-
className: "timer-dialog__title"
|
|
19
|
-
}, translate('storylines.misc.ready')), /*#__PURE__*/_react.default.createElement("button", {
|
|
20
|
-
type: "button",
|
|
21
|
-
className: "gat--btn gat--btn__primary",
|
|
22
|
-
onClick: onInit
|
|
23
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, !retry ? translate('storylines.misc.retry') : translate('storylines.misc.start')))));
|
|
24
|
-
};
|
|
25
|
-
var _default = TimerDialog;
|
|
26
|
-
exports.default = _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _ImageClickWrapperComponent = _interopRequireDefault(require("./components/ImageClickWrapperComponent"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var _default = _ImageClickWrapperComponent.default;
|
|
10
|
-
exports.default = _default;
|