@gamelearn/arcade-components 0.16.0 → 0.16.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 +2 -2
- package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/components/AutoEvaluation.js +4 -4
- package/dist/components/index.js +8 -0
- package/package.json +1 -1
- /package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/components/EndScreen.js +0 -0
- /package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/components/StartScreen.js +0 -0
- /package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/index.js +0 -0
- /package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/mocks/mockForStory.js +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
yarn add
|
|
9
|
+
yarn add @gamelearn/arcade-components
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
@@ -82,4 +82,4 @@ yalc remove --all
|
|
|
82
82
|
|
|
83
83
|
## License
|
|
84
84
|
|
|
85
|
-
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
85
|
+
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
@@ -54,7 +54,7 @@ var AutoEvaluation = function AutoEvaluation(_ref) {
|
|
|
54
54
|
currentQuestion = _useState6[0],
|
|
55
55
|
setCurrentQuestion = _useState6[1];
|
|
56
56
|
|
|
57
|
-
var _useState7 = (0, _react.useState)(),
|
|
57
|
+
var _useState7 = (0, _react.useState)(null),
|
|
58
58
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
59
59
|
optionSelected = _useState8[0],
|
|
60
60
|
selectOption = _useState8[1];
|
|
@@ -94,7 +94,7 @@ var AutoEvaluation = function AutoEvaluation(_ref) {
|
|
|
94
94
|
if (currentQuestion === questions.length - 1) {
|
|
95
95
|
setFinish(true);
|
|
96
96
|
} else {
|
|
97
|
-
selectOption();
|
|
97
|
+
selectOption(null);
|
|
98
98
|
setCurrentQuestion(currentQuestion + 1);
|
|
99
99
|
}
|
|
100
100
|
};
|
|
@@ -140,8 +140,8 @@ var AutoEvaluation = function AutoEvaluation(_ref) {
|
|
|
140
140
|
}, /*#__PURE__*/_react.default.createElement("span", null, translate('auto-evaluation.end'))) : /*#__PURE__*/_react.default.createElement("button", {
|
|
141
141
|
onClick: handleNextQuestion,
|
|
142
142
|
type: "button",
|
|
143
|
-
disabled:
|
|
144
|
-
className: "gat--btn__navigation ".concat(
|
|
143
|
+
disabled: optionSelected === null,
|
|
144
|
+
className: "gat--btn__navigation ".concat(optionSelected === null ? 'disabled' : '')
|
|
145
145
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
146
146
|
className: "icon-next"
|
|
147
147
|
})))), phase === 'end' && /*#__PURE__*/_react.default.createElement(_EndScreen.default, {
|
package/dist/components/index.js
CHANGED
|
@@ -191,6 +191,12 @@ Object.defineProperty(exports, "MediaVisor", {
|
|
|
191
191
|
return _mediaVisor.default;
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
+
Object.defineProperty(exports, "AutoEvaluationComponent", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function get() {
|
|
197
|
+
return _autoEvaluationComponent.default;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
194
200
|
|
|
195
201
|
var _scene = _interopRequireDefault(require("./arcade-render/scene"));
|
|
196
202
|
|
|
@@ -252,6 +258,8 @@ var _surveyComponent = _interopRequireDefault(require("./survey-component"));
|
|
|
252
258
|
|
|
253
259
|
var _mediaVisor = _interopRequireDefault(require("./media-visor"));
|
|
254
260
|
|
|
261
|
+
var _autoEvaluationComponent = _interopRequireDefault(require("./auto-evaluation-component"));
|
|
262
|
+
|
|
255
263
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
256
264
|
|
|
257
265
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
/package/dist/components/{auto-evaluation-component-game → auto-evaluation-component}/index.js
RENAMED
|
File without changes
|
|
File without changes
|