@micromag/screen-quiz 0.3.668 → 0.3.670
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/es/index.js +11 -13
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -1307,7 +1307,7 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
|
|
|
1307
1307
|
var answerResultHasText = isTextFilled(answerResult);
|
|
1308
1308
|
var hasResult = questionResultHasText || questionResultHasImage || answerResultHasText;
|
|
1309
1309
|
var onNextSlide = useCallback(function () {
|
|
1310
|
-
if (isEdit) {
|
|
1310
|
+
if (isEdit || isPreview) {
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
1313
1313
|
var nextIndex = questionIndex + 1;
|
|
@@ -1317,7 +1317,7 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
|
|
|
1317
1317
|
} else if (nextIndex === questionsCount) {
|
|
1318
1318
|
setQuestionIndex('results');
|
|
1319
1319
|
}
|
|
1320
|
-
}, [questions, questionIndex, setQuestionIndex, isEdit]);
|
|
1320
|
+
}, [questions, questionIndex, setQuestionIndex, isEdit, isPreview]);
|
|
1321
1321
|
var currentPoints = useMemo(function () {
|
|
1322
1322
|
return userAnswers !== null ? Object.keys(userAnswers).reduce(function (totalPoints, answerQuestionIndex) {
|
|
1323
1323
|
var _ref6 = questions !== null ? questions[answerQuestionIndex] || {} : {},
|
|
@@ -1390,7 +1390,7 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
|
|
|
1390
1390
|
} else if (stateId === 'intro') {
|
|
1391
1391
|
setQuestionIndex('intro');
|
|
1392
1392
|
}
|
|
1393
|
-
}, [stateId, stateIndex, isEdit, setQuestionIndex]);
|
|
1393
|
+
}, [stateId, stateIndex, isEdit, isPreview, setQuestionIndex]);
|
|
1394
1394
|
var finalBackground = background;
|
|
1395
1395
|
var backgroundKey = 'background';
|
|
1396
1396
|
if (isIntro && introBackground !== null) {
|
|
@@ -1998,17 +1998,15 @@ var definition = [{
|
|
|
1998
1998
|
// description: 'Field label',
|
|
1999
1999
|
// }),
|
|
2000
2000
|
// },
|
|
2001
|
+
// {
|
|
2002
|
+
// name: 'resultImage',
|
|
2003
|
+
// type: 'visual',
|
|
2004
|
+
// label: defineMessage({
|
|
2005
|
+
// defaultMessage: 'Result feedback image',
|
|
2006
|
+
// description: 'Visual field label',
|
|
2007
|
+
// }),
|
|
2008
|
+
// },
|
|
2001
2009
|
{
|
|
2002
|
-
name: 'resultImage',
|
|
2003
|
-
type: 'visual',
|
|
2004
|
-
label: defineMessage({
|
|
2005
|
-
id: "yA4B6h",
|
|
2006
|
-
defaultMessage: [{
|
|
2007
|
-
"type": 0,
|
|
2008
|
-
"value": "Result feedback image"
|
|
2009
|
-
}]
|
|
2010
|
-
})
|
|
2011
|
-
}, {
|
|
2012
2010
|
name: 'background',
|
|
2013
2011
|
type: 'background',
|
|
2014
2012
|
label: defineMessage({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quiz",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.670",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"access": "public",
|
|
90
90
|
"registry": "https://registry.npmjs.org/"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "8ee4d77ea24c265bfb0624e11c12b3be0d8c5caf"
|
|
93
93
|
}
|