@micromag/screen-quiz 0.4.71 → 0.4.74
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.d.ts +3 -3
- package/es/index.js +1903 -1330
- package/package.json +21 -20
package/es/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { FormattedMessage, defineMessage } from 'react-intl';
|
|
2
|
-
import
|
|
3
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import { c } from 'react/compiler-runtime';
|
|
5
3
|
import { faRedo } from '@fortawesome/free-solid-svg-icons/faRedo';
|
|
6
4
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
5
|
import classNames from 'classnames';
|
|
@@ -20,7 +18,6 @@ import Heading from '@micromag/element-heading';
|
|
|
20
18
|
import Layout, { Spacer } from '@micromag/element-layout';
|
|
21
19
|
import Text from '@micromag/element-text';
|
|
22
20
|
import Visual from '@micromag/element-visual';
|
|
23
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
24
21
|
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
|
|
25
22
|
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
|
|
26
23
|
import Button$1, { RichButton } from '@micromag/element-button';
|
|
@@ -31,88 +28,59 @@ import isArray from 'lodash/isArray';
|
|
|
31
28
|
|
|
32
29
|
var styles$4 = {"container":"micromag-screen-quiz-answers-container","items":"micromag-screen-quiz-answers-items","emptyAnswer":"micromag-screen-quiz-answers-emptyAnswer","item":"micromag-screen-quiz-answers-item","isPlaceholder":"micromag-screen-quiz-answers-isPlaceholder","userAnswer":"micromag-screen-quiz-answers-userAnswer","otherAnswer":"micromag-screen-quiz-answers-otherAnswer","withoutOpacity":"micromag-screen-quiz-answers-withoutOpacity","button":"micromag-screen-quiz-answers-button","withIcon":"micromag-screen-quiz-answers-withIcon","withSquareItems":"micromag-screen-quiz-answers-withSquareItems","resultIcon":"micromag-screen-quiz-answers-resultIcon","answered":"micromag-screen-quiz-answers-answered","rightAnswer":"micromag-screen-quiz-answers-rightAnswer","faIcon":"micromag-screen-quiz-answers-faIcon","itemContent":"micromag-screen-quiz-answers-itemContent"};
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_ref$withoutCollapse = _ref.withoutCollapse,
|
|
77
|
-
withoutCollapse = _ref$withoutCollapse === void 0 ? false : _ref$withoutCollapse,
|
|
78
|
-
_ref$className = _ref.className,
|
|
79
|
-
className = _ref$className === void 0 ? null : _ref$className;
|
|
80
|
-
var _useScreenRenderConte = useScreenRenderContext(),
|
|
81
|
-
isView = _useScreenRenderConte.isView,
|
|
82
|
-
isPreview = _useScreenRenderConte.isPreview,
|
|
83
|
-
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
84
|
-
isEdit = _useScreenRenderConte.isEdit;
|
|
85
|
-
var answered = answeredIndex !== null;
|
|
86
|
-
var _ref2 = answeredIndex !== null ? items[answeredIndex] : {},
|
|
87
|
-
_ref2$good = _ref2.good,
|
|
88
|
-
hasAnsweredRight = _ref2$good === void 0 ? false : _ref2$good;
|
|
89
|
-
var _useState = useState(true),
|
|
90
|
-
_useState2 = _slicedToArray(_useState, 1),
|
|
91
|
-
visible = _useState2[0];
|
|
92
|
-
var hasRightAnswer = items !== null && !isPlaceholder ? items.reduce(function (hasGood, answer) {
|
|
93
|
-
var _ref3 = answer || {},
|
|
94
|
-
_ref3$good = _ref3.good,
|
|
95
|
-
good = _ref3$good === void 0 ? false : _ref3$good;
|
|
31
|
+
/* eslint-disable react/no-array-index-key */
|
|
32
|
+
|
|
33
|
+
function Answers({
|
|
34
|
+
items,
|
|
35
|
+
keypadLayout = null,
|
|
36
|
+
answeredIndex = null,
|
|
37
|
+
answersCollapseDelay = 1000,
|
|
38
|
+
buttonsStyle = null,
|
|
39
|
+
buttonsLayout = null,
|
|
40
|
+
inactiveButtonsStyle = null,
|
|
41
|
+
buttonsTextStyle = null,
|
|
42
|
+
inactiveButtonsTextStyle = null,
|
|
43
|
+
goodAnswerColor = null,
|
|
44
|
+
badAnswerColor = null,
|
|
45
|
+
showUserAnswer = false,
|
|
46
|
+
withoutGoodAnswer = false,
|
|
47
|
+
withoutIcon = false,
|
|
48
|
+
focusable = false,
|
|
49
|
+
animated: collapseAnimated = false,
|
|
50
|
+
collapsed: initialCollapsed = false,
|
|
51
|
+
onClick = null,
|
|
52
|
+
onCollapse = null,
|
|
53
|
+
onCollapsed = null,
|
|
54
|
+
onTransitionEnd = null,
|
|
55
|
+
withoutCollapse = false,
|
|
56
|
+
className = null
|
|
57
|
+
}) {
|
|
58
|
+
const {
|
|
59
|
+
isView,
|
|
60
|
+
isPreview,
|
|
61
|
+
isPlaceholder,
|
|
62
|
+
isEdit
|
|
63
|
+
} = useScreenRenderContext();
|
|
64
|
+
const answered = answeredIndex !== null;
|
|
65
|
+
const {
|
|
66
|
+
good: hasAnsweredRight = false
|
|
67
|
+
} = answeredIndex !== null ? items[answeredIndex] : {};
|
|
68
|
+
const [visible] = useState(true);
|
|
69
|
+
const hasRightAnswer = items !== null && !isPlaceholder ? items.reduce((hasGood, answer) => {
|
|
70
|
+
const {
|
|
71
|
+
good = false
|
|
72
|
+
} = answer || {};
|
|
96
73
|
return hasGood || good;
|
|
97
74
|
}, false) : false;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
106
|
-
answersDidCollapse = _useState6[0];
|
|
107
|
-
_useState6[1];
|
|
108
|
-
var _useState7 = useState(initialCollapsed || answeredIndex !== null),
|
|
109
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
110
|
-
answersFinalCollapse = _useState8[0],
|
|
111
|
-
setAnswersFinalCollapse = _useState8[1];
|
|
112
|
-
useEffect(function () {
|
|
113
|
-
var timeout = null;
|
|
75
|
+
const finalShowUserAnswer = showUserAnswer || !hasRightAnswer;
|
|
76
|
+
const shouldCollapse = !withoutGoodAnswer || finalShowUserAnswer && answeredIndex !== null && !withoutCollapse;
|
|
77
|
+
const [answersCollapsed, setAnswersCollapsed] = useState(answeredIndex !== null);
|
|
78
|
+
const [answersDidCollapse, setAnswersDidCollapse] = useState(initialCollapsed || answeredIndex !== null);
|
|
79
|
+
const [answersFinalCollapse, setAnswersFinalCollapse] = useState(initialCollapsed || answeredIndex !== null);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
let timeout = null;
|
|
114
82
|
if (answeredIndex !== null && shouldCollapse) {
|
|
115
|
-
timeout = setTimeout(
|
|
83
|
+
timeout = setTimeout(() => {
|
|
116
84
|
// console.log('ok should collapse whatever');
|
|
117
85
|
setAnswersCollapsed(true);
|
|
118
86
|
if (onCollapse !== null) {
|
|
@@ -120,7 +88,7 @@ function Answers(_ref) {
|
|
|
120
88
|
}
|
|
121
89
|
}, hasAnsweredRight || finalShowUserAnswer ? 500 : answersCollapseDelay);
|
|
122
90
|
} else if (answeredIndex !== null && !shouldCollapse) {
|
|
123
|
-
timeout = setTimeout(
|
|
91
|
+
timeout = setTimeout(() => {
|
|
124
92
|
// console.log('ok no collapse');
|
|
125
93
|
if (onCollapse !== null) {
|
|
126
94
|
onCollapse();
|
|
@@ -135,29 +103,29 @@ function Answers(_ref) {
|
|
|
135
103
|
} else if (answeredIndex === null && shouldCollapse) {
|
|
136
104
|
setAnswersCollapsed(false);
|
|
137
105
|
}
|
|
138
|
-
return
|
|
106
|
+
return () => {
|
|
139
107
|
if (timeout !== null) {
|
|
140
108
|
clearTimeout(timeout);
|
|
141
109
|
}
|
|
142
110
|
};
|
|
143
111
|
}, [answeredIndex, withoutGoodAnswer, setAnswersCollapsed, onCollapse, onCollapsed, onTransitionEnd, answersCollapseDelay, hasAnsweredRight, finalShowUserAnswer, shouldCollapse]);
|
|
144
|
-
useEffect(
|
|
145
|
-
|
|
146
|
-
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
let timeout_0 = null;
|
|
114
|
+
let endTimeout = null;
|
|
147
115
|
if (answersCollapsed) {
|
|
148
|
-
|
|
116
|
+
timeout_0 = setTimeout(() => {
|
|
149
117
|
setAnswersFinalCollapse(true);
|
|
150
118
|
}, 300);
|
|
151
|
-
endTimeout = setTimeout(
|
|
119
|
+
endTimeout = setTimeout(() => {
|
|
152
120
|
// Failsafe cause collapse transition is not always active
|
|
153
121
|
if (onTransitionEnd !== null) {
|
|
154
122
|
onTransitionEnd();
|
|
155
123
|
}
|
|
156
124
|
}, 500);
|
|
157
125
|
}
|
|
158
|
-
return
|
|
159
|
-
if (
|
|
160
|
-
clearTimeout(
|
|
126
|
+
return () => {
|
|
127
|
+
if (timeout_0 !== null) {
|
|
128
|
+
clearTimeout(timeout_0);
|
|
161
129
|
}
|
|
162
130
|
if (endTimeout !== null) {
|
|
163
131
|
clearTimeout(endTimeout);
|
|
@@ -183,15 +151,15 @@ function Answers(_ref) {
|
|
|
183
151
|
// onTransitionEnd,
|
|
184
152
|
// ]);
|
|
185
153
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
154
|
+
const itemsRefs = useRef([]);
|
|
155
|
+
const listOfItems = isPlaceholder || isEdit && items.length === 0 ? [...new Array(2)] : items;
|
|
156
|
+
const heights = useMemo(() => {
|
|
189
157
|
if (collapseAnimated) {
|
|
190
|
-
|
|
158
|
+
const allHeights = listOfItems.reduce((acc, it, i) => {
|
|
191
159
|
if (itemsRefs.current[i] && collapseAnimated) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
160
|
+
const {
|
|
161
|
+
height = 0
|
|
162
|
+
} = itemsRefs.current[i].getBoundingClientRect() || {};
|
|
195
163
|
acc.push(height);
|
|
196
164
|
}
|
|
197
165
|
return acc;
|
|
@@ -200,31 +168,32 @@ function Answers(_ref) {
|
|
|
200
168
|
}
|
|
201
169
|
return [];
|
|
202
170
|
}, [collapseAnimated, answeredIndex, shouldCollapse, collapseAnimated, listOfItems]);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
171
|
+
const showAnimation = isView || isEdit;
|
|
172
|
+
const filteredListOfItems = listOfItems.map((answer_0, answerI) => {
|
|
173
|
+
const height_0 = heights[answerI] ? heights[answerI] : 0;
|
|
174
|
+
const userAnswer = answerI === answeredIndex;
|
|
175
|
+
const {
|
|
176
|
+
good: rightAnswer = false
|
|
177
|
+
} = answer_0 || {};
|
|
178
|
+
let hidden = false;
|
|
211
179
|
if (answeredIndex !== null && showAnimation && answersDidCollapse && !rightAnswer && (hasRightAnswer || !userAnswer)) {
|
|
212
180
|
hidden = true;
|
|
213
181
|
}
|
|
214
182
|
if (answeredIndex !== null && showAnimation && answersCollapsed && !rightAnswer) {
|
|
215
183
|
hidden = true;
|
|
216
184
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return
|
|
222
|
-
|
|
223
|
-
|
|
185
|
+
const {
|
|
186
|
+
label = null
|
|
187
|
+
} = answer_0 || {};
|
|
188
|
+
const key = `key-${answerI}-${label?.body || null}`;
|
|
189
|
+
return {
|
|
190
|
+
...answer_0,
|
|
191
|
+
hidden,
|
|
192
|
+
userAnswer,
|
|
224
193
|
index: answerI,
|
|
225
|
-
maxHeight:
|
|
226
|
-
key
|
|
227
|
-
}
|
|
194
|
+
maxHeight: height_0,
|
|
195
|
+
key
|
|
196
|
+
};
|
|
228
197
|
});
|
|
229
198
|
|
|
230
199
|
// const transitions = useTransition(filteredListOfItems, {
|
|
@@ -262,128 +231,135 @@ function Answers(_ref) {
|
|
|
262
231
|
// }
|
|
263
232
|
// }, [transitioned, onTransitionEnd]);
|
|
264
233
|
|
|
265
|
-
|
|
234
|
+
const hasGoodOrBadAnswerInList = useMemo(() => {
|
|
266
235
|
if (filteredListOfItems !== null) {
|
|
267
|
-
return filteredListOfItems.reduce(
|
|
268
|
-
return hasGoodOrBad || answer.good === true && !withoutGoodAnswer || answer.good === false && !withoutIcon;
|
|
269
|
-
}, false);
|
|
236
|
+
return filteredListOfItems.reduce((hasGoodOrBad, answer_1) => hasGoodOrBad || answer_1.good === true && !withoutGoodAnswer || answer_1.good === false && !withoutIcon, false);
|
|
270
237
|
}
|
|
271
238
|
return false;
|
|
272
239
|
}, [filteredListOfItems, withoutGoodAnswer, withoutIcon]);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
240
|
+
const hasOpacity = useMemo(() => {
|
|
241
|
+
const {
|
|
242
|
+
backgroundColor = null
|
|
243
|
+
} = inactiveButtonsStyle || {};
|
|
277
244
|
return backgroundColor === null;
|
|
278
245
|
}, [inactiveButtonsStyle]);
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
hidden
|
|
282
|
-
maxHeight
|
|
283
|
-
|
|
284
|
-
|
|
246
|
+
const itemsWithStyle = filteredListOfItems.map(answer_2 => {
|
|
247
|
+
const {
|
|
248
|
+
hidden: hidden_0,
|
|
249
|
+
maxHeight
|
|
250
|
+
} = answer_2 || {};
|
|
251
|
+
const style = {
|
|
252
|
+
opacity: hidden_0 && showAnimation && !withoutGoodAnswer ? 0 : 1,
|
|
285
253
|
// Animate this, not height
|
|
286
254
|
maxHeight:
|
|
287
255
|
// eslint-disable-next-line no-nested-ternary
|
|
288
|
-
|
|
289
|
-
height:
|
|
256
|
+
hidden_0 && showAnimation && !withoutGoodAnswer && collapseAnimated && answersFinalCollapse ? 0 : maxHeight > 0 ? maxHeight : null,
|
|
257
|
+
height: hidden_0 && showAnimation && !withoutGoodAnswer && !collapseAnimated && answersFinalCollapse ? 0 : 'auto'
|
|
258
|
+
};
|
|
259
|
+
return {
|
|
260
|
+
...answer_2,
|
|
261
|
+
style
|
|
290
262
|
};
|
|
291
|
-
return _objectSpread(_objectSpread({}, answer), {}, {
|
|
292
|
-
style: style
|
|
293
|
-
});
|
|
294
263
|
});
|
|
295
264
|
|
|
296
265
|
// const keypadItems = transitions((style, answer, t, answerI) => {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
266
|
+
const keypadItems = (itemsWithStyle || []).map((answer_3, answerI_0) => {
|
|
267
|
+
const userAnswer_0 = answerI_0 === answeredIndex;
|
|
268
|
+
const {
|
|
269
|
+
good: rightAnswer_0 = null,
|
|
270
|
+
label: label_0 = null,
|
|
271
|
+
visual = null,
|
|
272
|
+
buttonLayout = null,
|
|
273
|
+
buttonStyle: answerButtonStyle = null,
|
|
274
|
+
textStyle: answerButtonTextStyle = null,
|
|
275
|
+
style: style_0 = null
|
|
276
|
+
} = answer_3 || {};
|
|
277
|
+
const {
|
|
278
|
+
textStyle = null
|
|
279
|
+
} = label_0 || {};
|
|
280
|
+
const hasText = isTextFilled(label_0);
|
|
281
|
+
const hasVisual = isImageFilled(visual);
|
|
282
|
+
const hasAnswer = hasText || hasVisual;
|
|
283
|
+
const isUserAnswer = withoutGoodAnswer && userAnswer_0;
|
|
284
|
+
const isOtherAnswer = withoutGoodAnswer && !userAnswer_0;
|
|
285
|
+
const isInactive = isOtherAnswer && answeredIndex !== null;
|
|
286
|
+
const inactiveButtonStyle = isInactive ? inactiveButtonsStyle : null;
|
|
287
|
+
const inactiveButtonTextStyle = isInactive ? inactiveButtonsTextStyle : null;
|
|
288
|
+
const finalButtonStyle = {
|
|
289
|
+
...buttonsStyle,
|
|
290
|
+
...inactiveButtonStyle,
|
|
291
|
+
...answerButtonStyle
|
|
292
|
+
};
|
|
293
|
+
const finalTextStyle = {
|
|
294
|
+
...Object.keys(buttonsTextStyle || {}).reduce((acc_0, key_0) => {
|
|
295
|
+
const value = buttonsTextStyle[key_0];
|
|
296
|
+
if (value !== null && value !== '') {
|
|
297
|
+
acc_0[key_0] = value;
|
|
298
|
+
}
|
|
299
|
+
return acc_0;
|
|
300
|
+
}, {}),
|
|
301
|
+
...Object.keys(textStyle || {}).reduce((acc_1, key_1) => {
|
|
302
|
+
const value_0 = textStyle[key_1];
|
|
303
|
+
if (value_0 !== null && value_0 !== '') {
|
|
304
|
+
acc_1[key_1] = value_0;
|
|
305
|
+
}
|
|
306
|
+
return acc_1;
|
|
307
|
+
}, {}),
|
|
308
|
+
...inactiveButtonTextStyle,
|
|
309
|
+
...answerButtonTextStyle
|
|
310
|
+
};
|
|
339
311
|
return /*#__PURE__*/jsx("div", {
|
|
340
|
-
className: classNames([styles$4.item,
|
|
312
|
+
className: classNames([styles$4.item, {
|
|
313
|
+
[styles$4.rightAnswer]: !withoutGoodAnswer && rightAnswer_0 === true,
|
|
314
|
+
[styles$4.userAnswer]: isUserAnswer,
|
|
315
|
+
[styles$4.otherAnswer]: isOtherAnswer,
|
|
316
|
+
[styles$4.withoutOpacity]: !hasOpacity
|
|
317
|
+
}])
|
|
341
318
|
// onTransitionEnd={onAnswerTransitionEnd}
|
|
342
319
|
,
|
|
343
|
-
style:
|
|
320
|
+
style: {
|
|
321
|
+
...style_0
|
|
322
|
+
},
|
|
344
323
|
children: /*#__PURE__*/jsx("div", {
|
|
345
324
|
className: styles$4.itemContent,
|
|
346
|
-
ref:
|
|
347
|
-
itemsRefs.current[
|
|
325
|
+
ref: el => {
|
|
326
|
+
itemsRefs.current[answerI_0] = el;
|
|
348
327
|
},
|
|
349
328
|
children: /*#__PURE__*/jsx(ScreenElement, {
|
|
350
329
|
placeholder: "quizAnswer",
|
|
351
330
|
placeholderProps: {
|
|
352
|
-
good:
|
|
331
|
+
good: answerI_0 === 0
|
|
353
332
|
},
|
|
354
333
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
355
334
|
id: "+Ok+7S",
|
|
356
|
-
defaultMessage:
|
|
357
|
-
"type": 0,
|
|
358
|
-
"value": "Answer"
|
|
359
|
-
}]
|
|
335
|
+
defaultMessage: "Answer"
|
|
360
336
|
}),
|
|
361
337
|
emptyClassName: styles$4.emptyAnswer,
|
|
362
338
|
isEmpty: !hasAnswer,
|
|
363
339
|
children: hasAnswer ? /*#__PURE__*/jsxs(RichButton, {
|
|
364
340
|
className: styles$4.button,
|
|
365
|
-
onPointerUp:
|
|
341
|
+
onPointerUp: e => {
|
|
366
342
|
if (e.pointerType !== 'mouse' || e.button === 0) {
|
|
367
|
-
onClick(
|
|
343
|
+
onClick(answer_3, answerI_0);
|
|
368
344
|
}
|
|
369
345
|
},
|
|
370
346
|
disabled: !visible || isPreview || answered,
|
|
371
347
|
focusable: focusable,
|
|
372
348
|
buttonStyle: finalButtonStyle,
|
|
373
349
|
textStyle: finalTextStyle,
|
|
374
|
-
label:
|
|
350
|
+
label: label_0,
|
|
375
351
|
visual: visual,
|
|
376
352
|
visualClassName: styles$4.optionVisual,
|
|
377
353
|
imageClassName: styles$4.optionImage,
|
|
378
354
|
layout: buttonLayout || buttonsLayout || (hasVisual ? 'label-right' : null),
|
|
379
|
-
children: [answered && !withoutIcon &&
|
|
355
|
+
children: [answered && !withoutIcon && rightAnswer_0 === true ? /*#__PURE__*/jsx("span", {
|
|
380
356
|
className: styles$4.resultIcon,
|
|
381
357
|
style: getStyleFromColor(goodAnswerColor, 'backgroundColor'),
|
|
382
358
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
383
359
|
className: styles$4.faIcon,
|
|
384
360
|
icon: faCheck
|
|
385
361
|
})
|
|
386
|
-
}) : null, !withoutIcon && answered &&
|
|
362
|
+
}) : null, !withoutIcon && answered && rightAnswer_0 === false ? /*#__PURE__*/jsx("span", {
|
|
387
363
|
className: styles$4.resultIcon,
|
|
388
364
|
style: getStyleFromColor(badAnswerColor, 'backgroundColor'),
|
|
389
365
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
@@ -394,19 +370,21 @@ function Answers(_ref) {
|
|
|
394
370
|
}) : null
|
|
395
371
|
})
|
|
396
372
|
})
|
|
397
|
-
},
|
|
373
|
+
}, `answer-${answerI_0}`);
|
|
398
374
|
});
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
spacing = _ref10$spacing === void 0 ? null : _ref10$spacing,
|
|
406
|
-
_ref10$withSquareItem = _ref10.withSquareItems,
|
|
407
|
-
withSquareItems = _ref10$withSquareItem === void 0 ? false : _ref10$withSquareItem;
|
|
375
|
+
const {
|
|
376
|
+
columnAlign: align = null,
|
|
377
|
+
columns = 1,
|
|
378
|
+
spacing = null,
|
|
379
|
+
withSquareItems = false
|
|
380
|
+
} = keypadLayout || {};
|
|
408
381
|
return /*#__PURE__*/jsx("div", {
|
|
409
|
-
className: classNames([styles$4.container, className,
|
|
382
|
+
className: classNames([styles$4.container, className, {
|
|
383
|
+
[styles$4.answered]: answered,
|
|
384
|
+
[styles$4.withIcon]: !withoutIcon && hasGoodOrBadAnswerInList,
|
|
385
|
+
[styles$4.withSquareItems]: withSquareItems === true,
|
|
386
|
+
[styles$4.isPlaceholder]: isPlaceholder
|
|
387
|
+
}]),
|
|
410
388
|
children: filteredListOfItems !== null || isPlaceholder ? /*#__PURE__*/jsx(Keypad, {
|
|
411
389
|
className: styles$4.items,
|
|
412
390
|
items: keypadItems,
|
|
@@ -419,113 +397,204 @@ function Answers(_ref) {
|
|
|
419
397
|
|
|
420
398
|
var styles$3 = {"container":"micromag-screen-quiz-question-container","question":"micromag-screen-quiz-question-question","index":"micromag-screen-quiz-question-index","resultContent":"micromag-screen-quiz-question-resultContent","result":"micromag-screen-quiz-question-result","emptyQuestion":"micromag-screen-quiz-question-emptyQuestion","emptyResult":"micromag-screen-quiz-question-emptyResult","resultVisible":"micromag-screen-quiz-question-resultVisible","resultHidden":"micromag-screen-quiz-question-resultHidden","isPlaceholder":"micromag-screen-quiz-question-isPlaceholder"};
|
|
421
399
|
|
|
422
|
-
function Question(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
answers
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
400
|
+
function Question(t0) {
|
|
401
|
+
const $ = c(97);
|
|
402
|
+
const {
|
|
403
|
+
question: t1,
|
|
404
|
+
answers: t2,
|
|
405
|
+
keypadLayout: t3,
|
|
406
|
+
result: t4,
|
|
407
|
+
resultImage: t5,
|
|
408
|
+
index: t6,
|
|
409
|
+
totalCount: t7,
|
|
410
|
+
answeredIndex: t8,
|
|
411
|
+
buttonsLayout: t9,
|
|
412
|
+
buttonsStyle: t10,
|
|
413
|
+
inactiveButtonsStyle: t11,
|
|
414
|
+
buttonsTextStyle: t12,
|
|
415
|
+
inactiveButtonsTextStyle: t13,
|
|
416
|
+
questionsHeadingStyle: t14,
|
|
417
|
+
feedbackTextStyle: t15,
|
|
418
|
+
numbersTextStyle: t16,
|
|
419
|
+
goodAnswerColor: t17,
|
|
420
|
+
badAnswerColor: t18,
|
|
421
|
+
focusable: t19,
|
|
422
|
+
animated: t20,
|
|
423
|
+
showInstantAnswer: t21,
|
|
424
|
+
withResult: t22,
|
|
425
|
+
withoutGoodAnswer: t23,
|
|
426
|
+
withoutTrueFalse: t24,
|
|
427
|
+
withoutIndex: t25,
|
|
428
|
+
layout: t26,
|
|
429
|
+
transitions: t27,
|
|
430
|
+
transitionPlaying: t28,
|
|
431
|
+
transitionStagger: t29,
|
|
432
|
+
transitionDisabled: t30,
|
|
433
|
+
onAnswerClick: t31,
|
|
434
|
+
onAnswerTransitionEnd: t32,
|
|
435
|
+
withoutCollapse: t33,
|
|
436
|
+
className: t34,
|
|
437
|
+
style: t35
|
|
438
|
+
} = t0;
|
|
439
|
+
const question = t1 === undefined ? null : t1;
|
|
440
|
+
const answers = t2 === undefined ? null : t2;
|
|
441
|
+
const keypadLayout = t3 === undefined ? null : t3;
|
|
442
|
+
const result = t4 === undefined ? null : t4;
|
|
443
|
+
const resultImage = t5 === undefined ? null : t5;
|
|
444
|
+
const index = t6 === undefined ? null : t6;
|
|
445
|
+
const totalCount = t7 === undefined ? null : t7;
|
|
446
|
+
const answeredIndex = t8 === undefined ? null : t8;
|
|
447
|
+
const buttonsLayout = t9 === undefined ? null : t9;
|
|
448
|
+
const buttonsStyle = t10 === undefined ? null : t10;
|
|
449
|
+
const inactiveButtonsStyle = t11 === undefined ? null : t11;
|
|
450
|
+
const buttonsTextStyle = t12 === undefined ? null : t12;
|
|
451
|
+
const inactiveButtonsTextStyle = t13 === undefined ? null : t13;
|
|
452
|
+
const questionsHeadingStyle = t14 === undefined ? null : t14;
|
|
453
|
+
const feedbackTextStyle = t15 === undefined ? null : t15;
|
|
454
|
+
const numbersTextStyle = t16 === undefined ? null : t16;
|
|
455
|
+
const goodAnswerColor = t17 === undefined ? null : t17;
|
|
456
|
+
const badAnswerColor = t18 === undefined ? null : t18;
|
|
457
|
+
const focusable = t19 === undefined ? false : t19;
|
|
458
|
+
const animated = t20 === undefined ? false : t20;
|
|
459
|
+
const showInstantAnswer = t21 === undefined ? false : t21;
|
|
460
|
+
const withResult = t22 === undefined ? false : t22;
|
|
461
|
+
const withoutGoodAnswer = t23 === undefined ? false : t23;
|
|
462
|
+
const withoutTrueFalse = t24 === undefined ? false : t24;
|
|
463
|
+
const withoutIndex = t25 === undefined ? false : t25;
|
|
464
|
+
const layout = t26 === undefined ? null : t26;
|
|
465
|
+
const transitions = t27 === undefined ? null : t27;
|
|
466
|
+
const transitionPlaying = t28 === undefined ? false : t28;
|
|
467
|
+
const transitionStagger = t29 === undefined ? 100 : t29;
|
|
468
|
+
const transitionDisabled = t30 === undefined ? false : t30;
|
|
469
|
+
const onAnswerClick = t31 === undefined ? null : t31;
|
|
470
|
+
const onAnswerTransitionEnd = t32 === undefined ? null : t32;
|
|
471
|
+
const withoutCollapse = t33 === undefined ? false : t33;
|
|
472
|
+
const className = t34 === undefined ? null : t34;
|
|
473
|
+
const style = t35 === undefined ? null : t35;
|
|
474
|
+
const {
|
|
475
|
+
isPlaceholder
|
|
476
|
+
} = useScreenRenderContext();
|
|
477
|
+
const isSplitted = layout === "split";
|
|
478
|
+
const verticalAlign = isSplitted ? null : layout;
|
|
479
|
+
let t36;
|
|
480
|
+
if ($[0] !== question) {
|
|
481
|
+
t36 = isTextFilled(question);
|
|
482
|
+
$[0] = question;
|
|
483
|
+
$[1] = t36;
|
|
484
|
+
} else {
|
|
485
|
+
t36 = $[1];
|
|
486
|
+
}
|
|
487
|
+
const hasQuestion = t36;
|
|
488
|
+
let t37;
|
|
489
|
+
if ($[2] !== question) {
|
|
490
|
+
t37 = question || {};
|
|
491
|
+
$[2] = question;
|
|
492
|
+
$[3] = t37;
|
|
493
|
+
} else {
|
|
494
|
+
t37 = $[3];
|
|
495
|
+
}
|
|
496
|
+
const {
|
|
497
|
+
textStyle: t38
|
|
498
|
+
} = t37;
|
|
499
|
+
const questionTextStyle = t38 === undefined ? null : t38;
|
|
500
|
+
const [resultVisible, setResultVisible] = useState(showInstantAnswer);
|
|
501
|
+
const answered = answeredIndex !== null;
|
|
502
|
+
const answer = answeredIndex !== null && answers[answeredIndex] ? answers[answeredIndex] : null;
|
|
503
|
+
let t39;
|
|
504
|
+
if ($[4] !== answer) {
|
|
505
|
+
t39 = answer || {};
|
|
506
|
+
$[4] = answer;
|
|
507
|
+
$[5] = t39;
|
|
508
|
+
} else {
|
|
509
|
+
t39 = $[5];
|
|
510
|
+
}
|
|
511
|
+
const {
|
|
512
|
+
result: t40,
|
|
513
|
+
answerImage: t41
|
|
514
|
+
} = t39;
|
|
515
|
+
const answerResult = t40 === undefined ? null : t40;
|
|
516
|
+
const answerImage = t41 === undefined ? null : t41;
|
|
517
|
+
let t42;
|
|
518
|
+
if ($[6] !== answerResult || $[7] !== result) {
|
|
519
|
+
t42 = isTextFilled(answerResult) || isTextFilled(result);
|
|
520
|
+
$[6] = answerResult;
|
|
521
|
+
$[7] = result;
|
|
522
|
+
$[8] = t42;
|
|
523
|
+
} else {
|
|
524
|
+
t42 = $[8];
|
|
525
|
+
}
|
|
526
|
+
const hasResult = t42;
|
|
527
|
+
let t43;
|
|
528
|
+
if ($[9] !== answerImage || $[10] !== resultImage) {
|
|
529
|
+
t43 = isImageFilled(answerImage) || isImageFilled(resultImage);
|
|
530
|
+
$[9] = answerImage;
|
|
531
|
+
$[10] = resultImage;
|
|
532
|
+
$[11] = t43;
|
|
533
|
+
} else {
|
|
534
|
+
t43 = $[11];
|
|
535
|
+
}
|
|
536
|
+
const hasResultVisual = t43;
|
|
537
|
+
let t44;
|
|
538
|
+
if ($[12] !== result) {
|
|
539
|
+
t44 = isTextFilled(result) ? result : null;
|
|
540
|
+
$[12] = result;
|
|
541
|
+
$[13] = t44;
|
|
542
|
+
} else {
|
|
543
|
+
t44 = $[13];
|
|
544
|
+
}
|
|
545
|
+
const defaultResult = t44;
|
|
546
|
+
let t45;
|
|
547
|
+
if ($[14] !== answerResult) {
|
|
548
|
+
t45 = isTextFilled(answerResult) ? answerResult : null;
|
|
549
|
+
$[14] = answerResult;
|
|
550
|
+
$[15] = t45;
|
|
551
|
+
} else {
|
|
552
|
+
t45 = $[15];
|
|
553
|
+
}
|
|
554
|
+
const customResult = t45;
|
|
555
|
+
const finalResult = customResult || defaultResult;
|
|
556
|
+
let t46;
|
|
557
|
+
if ($[16] !== finalResult) {
|
|
558
|
+
t46 = finalResult || {};
|
|
559
|
+
$[16] = finalResult;
|
|
560
|
+
$[17] = t46;
|
|
561
|
+
} else {
|
|
562
|
+
t46 = $[17];
|
|
563
|
+
}
|
|
564
|
+
const {
|
|
565
|
+
textStyle: t47
|
|
566
|
+
} = t46;
|
|
567
|
+
const resultTextStyle = t47 === undefined ? null : t47;
|
|
568
|
+
let t48;
|
|
569
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
570
|
+
t48 = () => {
|
|
571
|
+
setResultVisible(true);
|
|
572
|
+
};
|
|
573
|
+
$[18] = t48;
|
|
574
|
+
} else {
|
|
575
|
+
t48 = $[18];
|
|
576
|
+
}
|
|
577
|
+
const onAnswersCollapse = t48;
|
|
578
|
+
const hasIndex = index !== null && totalCount !== null;
|
|
579
|
+
const t49 = !hasResult;
|
|
580
|
+
let t50;
|
|
581
|
+
if ($[19] !== className || $[20] !== isPlaceholder || $[21] !== resultVisible || $[22] !== t49) {
|
|
582
|
+
t50 = classNames([styles$3.container, className, {
|
|
583
|
+
[styles$3.isPlaceholder]: isPlaceholder,
|
|
584
|
+
[styles$3.resultVisible]: resultVisible,
|
|
585
|
+
[styles$3.resultHidden]: t49
|
|
586
|
+
}]);
|
|
587
|
+
$[19] = className;
|
|
588
|
+
$[20] = isPlaceholder;
|
|
589
|
+
$[21] = resultVisible;
|
|
590
|
+
$[22] = t49;
|
|
591
|
+
$[23] = t50;
|
|
592
|
+
} else {
|
|
593
|
+
t50 = $[23];
|
|
594
|
+
}
|
|
595
|
+
let t51;
|
|
596
|
+
if ($[24] !== hasIndex || $[25] !== index || $[26] !== numbersTextStyle || $[27] !== totalCount || $[28] !== transitionDisabled || $[29] !== transitionPlaying || $[30] !== transitions || $[31] !== withoutIndex) {
|
|
597
|
+
t51 = !withoutIndex && hasIndex ? /*#__PURE__*/jsx(ScreenElement, {
|
|
529
598
|
placeholder: /*#__PURE__*/jsx("div", {
|
|
530
599
|
className: styles$3.index,
|
|
531
600
|
children: "1 / 10"
|
|
@@ -536,32 +605,95 @@ function Question(_ref) {
|
|
|
536
605
|
disabled: transitionDisabled,
|
|
537
606
|
children: /*#__PURE__*/jsx(Text, {
|
|
538
607
|
className: styles$3.index,
|
|
539
|
-
body:
|
|
608
|
+
body: `${index + 1} / ${totalCount}`,
|
|
540
609
|
textStyle: numbersTextStyle
|
|
541
610
|
})
|
|
542
611
|
}) : null
|
|
543
|
-
}, "stats") : null
|
|
612
|
+
}, "stats") : null;
|
|
613
|
+
$[24] = hasIndex;
|
|
614
|
+
$[25] = index;
|
|
615
|
+
$[26] = numbersTextStyle;
|
|
616
|
+
$[27] = totalCount;
|
|
617
|
+
$[28] = transitionDisabled;
|
|
618
|
+
$[29] = transitionPlaying;
|
|
619
|
+
$[30] = transitions;
|
|
620
|
+
$[31] = withoutIndex;
|
|
621
|
+
$[32] = t51;
|
|
622
|
+
} else {
|
|
623
|
+
t51 = $[32];
|
|
624
|
+
}
|
|
625
|
+
let t52;
|
|
626
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
627
|
+
t52 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
628
|
+
id: "FOmgqv",
|
|
629
|
+
defaultMessage: "Question"
|
|
630
|
+
});
|
|
631
|
+
$[33] = t52;
|
|
632
|
+
} else {
|
|
633
|
+
t52 = $[33];
|
|
634
|
+
}
|
|
635
|
+
const t53 = !hasQuestion;
|
|
636
|
+
let t54;
|
|
637
|
+
if ($[34] !== hasQuestion || $[35] !== question || $[36] !== questionTextStyle || $[37] !== questionsHeadingStyle || $[38] !== transitionDisabled || $[39] !== transitionPlaying || $[40] !== transitions) {
|
|
638
|
+
t54 = hasQuestion ? /*#__PURE__*/jsx(Transitions, {
|
|
639
|
+
transitions: transitions,
|
|
640
|
+
playing: transitionPlaying,
|
|
641
|
+
disabled: transitionDisabled,
|
|
642
|
+
children: /*#__PURE__*/jsx(Heading, {
|
|
643
|
+
...question,
|
|
644
|
+
className: styles$3.question,
|
|
645
|
+
textStyle: {
|
|
646
|
+
...questionsHeadingStyle,
|
|
647
|
+
...questionTextStyle
|
|
648
|
+
}
|
|
649
|
+
})
|
|
650
|
+
}) : null;
|
|
651
|
+
$[34] = hasQuestion;
|
|
652
|
+
$[35] = question;
|
|
653
|
+
$[36] = questionTextStyle;
|
|
654
|
+
$[37] = questionsHeadingStyle;
|
|
655
|
+
$[38] = transitionDisabled;
|
|
656
|
+
$[39] = transitionPlaying;
|
|
657
|
+
$[40] = transitions;
|
|
658
|
+
$[41] = t54;
|
|
659
|
+
} else {
|
|
660
|
+
t54 = $[41];
|
|
661
|
+
}
|
|
662
|
+
let t55;
|
|
663
|
+
if ($[42] !== t53 || $[43] !== t54) {
|
|
664
|
+
t55 = /*#__PURE__*/jsx(ScreenElement, {
|
|
544
665
|
placeholder: "title",
|
|
545
|
-
emptyLabel:
|
|
546
|
-
id: "FOmgqv",
|
|
547
|
-
defaultMessage: [{
|
|
548
|
-
"type": 0,
|
|
549
|
-
"value": "Question"
|
|
550
|
-
}]
|
|
551
|
-
}),
|
|
666
|
+
emptyLabel: t52,
|
|
552
667
|
emptyClassName: styles$3.emptyQuestion,
|
|
553
|
-
isEmpty:
|
|
554
|
-
children:
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
668
|
+
isEmpty: t53,
|
|
669
|
+
children: t54
|
|
670
|
+
}, "question");
|
|
671
|
+
$[42] = t53;
|
|
672
|
+
$[43] = t54;
|
|
673
|
+
$[44] = t55;
|
|
674
|
+
} else {
|
|
675
|
+
t55 = $[44];
|
|
676
|
+
}
|
|
677
|
+
let t56;
|
|
678
|
+
if ($[45] !== isSplitted) {
|
|
679
|
+
t56 = isSplitted ? /*#__PURE__*/jsx(Spacer, {}, "spacer") : null;
|
|
680
|
+
$[45] = isSplitted;
|
|
681
|
+
$[46] = t56;
|
|
682
|
+
} else {
|
|
683
|
+
t56 = $[46];
|
|
684
|
+
}
|
|
685
|
+
let t57;
|
|
686
|
+
if ($[47] !== answers) {
|
|
687
|
+
t57 = answers || [];
|
|
688
|
+
$[47] = answers;
|
|
689
|
+
$[48] = t57;
|
|
690
|
+
} else {
|
|
691
|
+
t57 = $[48];
|
|
692
|
+
}
|
|
693
|
+
let t58;
|
|
694
|
+
if ($[49] !== animated || $[50] !== answeredIndex || $[51] !== badAnswerColor || $[52] !== buttonsLayout || $[53] !== buttonsStyle || $[54] !== buttonsTextStyle || $[55] !== focusable || $[56] !== goodAnswerColor || $[57] !== inactiveButtonsStyle || $[58] !== inactiveButtonsTextStyle || $[59] !== keypadLayout || $[60] !== onAnswerClick || $[61] !== onAnswerTransitionEnd || $[62] !== t57 || $[63] !== transitionDisabled || $[64] !== transitionPlaying || $[65] !== transitionStagger || $[66] !== transitions || $[67] !== withoutCollapse || $[68] !== withoutGoodAnswer || $[69] !== withoutTrueFalse) {
|
|
695
|
+
t58 = /*#__PURE__*/jsx(Answers, {
|
|
696
|
+
items: t57,
|
|
565
697
|
keypadLayout: keypadLayout,
|
|
566
698
|
answeredIndex: answeredIndex,
|
|
567
699
|
goodAnswerColor: goodAnswerColor,
|
|
@@ -584,17 +716,42 @@ function Question(_ref) {
|
|
|
584
716
|
onCollapse: onAnswersCollapse,
|
|
585
717
|
onTransitionEnd: onAnswerTransitionEnd,
|
|
586
718
|
withoutCollapse: withoutCollapse
|
|
587
|
-
}, "answers")
|
|
719
|
+
}, "answers");
|
|
720
|
+
$[49] = animated;
|
|
721
|
+
$[50] = answeredIndex;
|
|
722
|
+
$[51] = badAnswerColor;
|
|
723
|
+
$[52] = buttonsLayout;
|
|
724
|
+
$[53] = buttonsStyle;
|
|
725
|
+
$[54] = buttonsTextStyle;
|
|
726
|
+
$[55] = focusable;
|
|
727
|
+
$[56] = goodAnswerColor;
|
|
728
|
+
$[57] = inactiveButtonsStyle;
|
|
729
|
+
$[58] = inactiveButtonsTextStyle;
|
|
730
|
+
$[59] = keypadLayout;
|
|
731
|
+
$[60] = onAnswerClick;
|
|
732
|
+
$[61] = onAnswerTransitionEnd;
|
|
733
|
+
$[62] = t57;
|
|
734
|
+
$[63] = transitionDisabled;
|
|
735
|
+
$[64] = transitionPlaying;
|
|
736
|
+
$[65] = transitionStagger;
|
|
737
|
+
$[66] = transitions;
|
|
738
|
+
$[67] = withoutCollapse;
|
|
739
|
+
$[68] = withoutGoodAnswer;
|
|
740
|
+
$[69] = withoutTrueFalse;
|
|
741
|
+
$[70] = t58;
|
|
742
|
+
} else {
|
|
743
|
+
t58 = $[70];
|
|
744
|
+
}
|
|
745
|
+
let t59;
|
|
746
|
+
if ($[71] !== answerImage || $[72] !== answered || $[73] !== answers || $[74] !== feedbackTextStyle || $[75] !== finalResult || $[76] !== hasResult || $[77] !== hasResultVisual || $[78] !== resultImage || $[79] !== resultTextStyle || $[80] !== transitionDisabled || $[81] !== transitionPlaying || $[82] !== transitionStagger || $[83] !== transitions || $[84] !== withResult) {
|
|
747
|
+
t59 = withResult ? /*#__PURE__*/jsx("div", {
|
|
588
748
|
className: styles$3.result,
|
|
589
749
|
children: /*#__PURE__*/jsx("div", {
|
|
590
750
|
className: styles$3.resultContent,
|
|
591
751
|
children: /*#__PURE__*/jsx(ScreenElement, {
|
|
592
752
|
emptyLabel: answered ? /*#__PURE__*/jsx(FormattedMessage, {
|
|
593
753
|
id: "li7ADr",
|
|
594
|
-
defaultMessage:
|
|
595
|
-
"type": 0,
|
|
596
|
-
"value": "Result"
|
|
597
|
-
}]
|
|
754
|
+
defaultMessage: "Result"
|
|
598
755
|
}) : null,
|
|
599
756
|
isEmpty: answered && !hasResult,
|
|
600
757
|
emptyClassName: styles$3.emptyResult,
|
|
@@ -603,10 +760,14 @@ function Question(_ref) {
|
|
|
603
760
|
playing: transitionPlaying,
|
|
604
761
|
delay: (1 + answers.length) * transitionStagger,
|
|
605
762
|
disabled: transitionDisabled,
|
|
606
|
-
children: [hasResult ? /*#__PURE__*/jsx(Text,
|
|
763
|
+
children: [hasResult ? /*#__PURE__*/jsx(Text, {
|
|
764
|
+
...(finalResult || {}),
|
|
607
765
|
className: styles$3.resultText,
|
|
608
|
-
textStyle:
|
|
609
|
-
|
|
766
|
+
textStyle: {
|
|
767
|
+
...(feedbackTextStyle || null),
|
|
768
|
+
...(resultTextStyle || null)
|
|
769
|
+
}
|
|
770
|
+
}) : null, hasResultVisual ? /*#__PURE__*/jsx(Visual, {
|
|
610
771
|
media: answerImage || resultImage,
|
|
611
772
|
width: "100%",
|
|
612
773
|
height: "auto"
|
|
@@ -614,293 +775,623 @@ function Question(_ref) {
|
|
|
614
775
|
}) : null
|
|
615
776
|
})
|
|
616
777
|
})
|
|
617
|
-
}, "results") : null
|
|
618
|
-
|
|
778
|
+
}, "results") : null;
|
|
779
|
+
$[71] = answerImage;
|
|
780
|
+
$[72] = answered;
|
|
781
|
+
$[73] = answers;
|
|
782
|
+
$[74] = feedbackTextStyle;
|
|
783
|
+
$[75] = finalResult;
|
|
784
|
+
$[76] = hasResult;
|
|
785
|
+
$[77] = hasResultVisual;
|
|
786
|
+
$[78] = resultImage;
|
|
787
|
+
$[79] = resultTextStyle;
|
|
788
|
+
$[80] = transitionDisabled;
|
|
789
|
+
$[81] = transitionPlaying;
|
|
790
|
+
$[82] = transitionStagger;
|
|
791
|
+
$[83] = transitions;
|
|
792
|
+
$[84] = withResult;
|
|
793
|
+
$[85] = t59;
|
|
794
|
+
} else {
|
|
795
|
+
t59 = $[85];
|
|
796
|
+
}
|
|
797
|
+
let t60;
|
|
798
|
+
if ($[86] !== t51 || $[87] !== t55 || $[88] !== t56 || $[89] !== t58 || $[90] !== t59) {
|
|
799
|
+
t60 = [t51, t55, t56, t58, t59];
|
|
800
|
+
$[86] = t51;
|
|
801
|
+
$[87] = t55;
|
|
802
|
+
$[88] = t56;
|
|
803
|
+
$[89] = t58;
|
|
804
|
+
$[90] = t59;
|
|
805
|
+
$[91] = t60;
|
|
806
|
+
} else {
|
|
807
|
+
t60 = $[91];
|
|
808
|
+
}
|
|
809
|
+
let t61;
|
|
810
|
+
if ($[92] !== style || $[93] !== t50 || $[94] !== t60 || $[95] !== verticalAlign) {
|
|
811
|
+
t61 = /*#__PURE__*/jsx(Layout, {
|
|
812
|
+
className: t50,
|
|
813
|
+
verticalAlign: verticalAlign,
|
|
814
|
+
style: style,
|
|
815
|
+
children: t60
|
|
816
|
+
});
|
|
817
|
+
$[92] = style;
|
|
818
|
+
$[93] = t50;
|
|
819
|
+
$[94] = t60;
|
|
820
|
+
$[95] = verticalAlign;
|
|
821
|
+
$[96] = t61;
|
|
822
|
+
} else {
|
|
823
|
+
t61 = $[96];
|
|
824
|
+
}
|
|
825
|
+
return t61;
|
|
619
826
|
}
|
|
620
827
|
|
|
621
828
|
var styles$2 = {"container":"micromag-screen-quiz-container","background":"micromag-screen-quiz-background","content":"micromag-screen-quiz-content","disabled":"micromag-screen-quiz-disabled","reset":"micromag-screen-quiz-reset","points":"micromag-screen-quiz-points","header":"micromag-screen-quiz-header","footer":"micromag-screen-quiz-footer","nextButton":"micromag-screen-quiz-nextButton","question":"micromag-screen-quiz-question","results":"micromag-screen-quiz-results","intro":"micromag-screen-quiz-intro"};
|
|
622
829
|
|
|
623
|
-
function QuizScreen(
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
layout
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
trackScreenEvent('click_answer', "".concat(userAnswerIndex + 1, ": ").concat(answer.label.body), {
|
|
747
|
-
linkType: 'quiz_answer',
|
|
748
|
-
answer: answer,
|
|
749
|
-
answerIndex: answerI,
|
|
750
|
-
isGood: answer.good || false
|
|
830
|
+
function QuizScreen(t0) {
|
|
831
|
+
const $ = c(135);
|
|
832
|
+
const {
|
|
833
|
+
id: t1,
|
|
834
|
+
layout: t2,
|
|
835
|
+
keypadLayout: t3,
|
|
836
|
+
question: t4,
|
|
837
|
+
answers: t5,
|
|
838
|
+
result: t6,
|
|
839
|
+
resultImage: t7,
|
|
840
|
+
buttonsLayout: t8,
|
|
841
|
+
buttonsStyle: t9,
|
|
842
|
+
inactiveButtonsStyle: t10,
|
|
843
|
+
buttonsTextStyle: t11,
|
|
844
|
+
inactiveButtonsTextStyle: t12,
|
|
845
|
+
feedbackTextStyle: t13,
|
|
846
|
+
numbersTextStyle: t14,
|
|
847
|
+
goodAnswerColor: t15,
|
|
848
|
+
badAnswerColor: t16,
|
|
849
|
+
withoutTrueFalse: t17,
|
|
850
|
+
spacing: t18,
|
|
851
|
+
header: t19,
|
|
852
|
+
footer: t20,
|
|
853
|
+
background: t21,
|
|
854
|
+
current: t22,
|
|
855
|
+
preload: t23,
|
|
856
|
+
ready: t24,
|
|
857
|
+
transitions: t25,
|
|
858
|
+
transitionStagger: t26,
|
|
859
|
+
type: t27,
|
|
860
|
+
mediaRef: t28,
|
|
861
|
+
className: t29
|
|
862
|
+
} = t0;
|
|
863
|
+
const id = t1 === undefined ? null : t1;
|
|
864
|
+
const layout = t2 === undefined ? "middle" : t2;
|
|
865
|
+
const keypadLayout = t3 === undefined ? null : t3;
|
|
866
|
+
const question = t4 === undefined ? null : t4;
|
|
867
|
+
const answers = t5 === undefined ? null : t5;
|
|
868
|
+
const result = t6 === undefined ? null : t6;
|
|
869
|
+
const resultImage = t7 === undefined ? null : t7;
|
|
870
|
+
const buttonsLayout = t8 === undefined ? null : t8;
|
|
871
|
+
const buttonsStyle = t9 === undefined ? null : t9;
|
|
872
|
+
const inactiveButtonsStyle = t10 === undefined ? null : t10;
|
|
873
|
+
const buttonsTextStyle = t11 === undefined ? null : t11;
|
|
874
|
+
const inactiveButtonsTextStyle = t12 === undefined ? null : t12;
|
|
875
|
+
const feedbackTextStyle = t13 === undefined ? null : t13;
|
|
876
|
+
const numbersTextStyle = t14 === undefined ? null : t14;
|
|
877
|
+
const goodAnswerColor = t15 === undefined ? null : t15;
|
|
878
|
+
const badAnswerColor = t16 === undefined ? null : t16;
|
|
879
|
+
const withoutTrueFalse = t17 === undefined ? false : t17;
|
|
880
|
+
const spacing = t18 === undefined ? 20 : t18;
|
|
881
|
+
const header = t19 === undefined ? null : t19;
|
|
882
|
+
const footer = t20 === undefined ? null : t20;
|
|
883
|
+
const background = t21 === undefined ? null : t21;
|
|
884
|
+
const current = t22 === undefined ? true : t22;
|
|
885
|
+
const preload = t23 === undefined ? true : t23;
|
|
886
|
+
const ready = t24 === undefined ? true : t24;
|
|
887
|
+
const transitions = t25 === undefined ? null : t25;
|
|
888
|
+
const transitionStagger = t26 === undefined ? 100 : t26;
|
|
889
|
+
const type = t27 === undefined ? null : t27;
|
|
890
|
+
const customMediaRef = t28 === undefined ? null : t28;
|
|
891
|
+
const className = t29 === undefined ? null : t29;
|
|
892
|
+
const screenId = id || "screen-id";
|
|
893
|
+
const trackScreenEvent = useTrackScreenEvent(type);
|
|
894
|
+
const {
|
|
895
|
+
width,
|
|
896
|
+
height,
|
|
897
|
+
resolution
|
|
898
|
+
} = useScreenSize();
|
|
899
|
+
const {
|
|
900
|
+
isView,
|
|
901
|
+
isPreview,
|
|
902
|
+
isPlaceholder,
|
|
903
|
+
isEdit,
|
|
904
|
+
isStatic,
|
|
905
|
+
isCapture
|
|
906
|
+
} = useScreenRenderContext();
|
|
907
|
+
const clickDisabled = !ready;
|
|
908
|
+
const {
|
|
909
|
+
topHeight: viewerTopHeight,
|
|
910
|
+
bottomHeight: viewerBottomHeight,
|
|
911
|
+
bottomSidesWidth: viewerBottomSidesWidth
|
|
912
|
+
} = useViewerContext();
|
|
913
|
+
const {
|
|
914
|
+
open: openWebView
|
|
915
|
+
} = useViewerWebView();
|
|
916
|
+
const {
|
|
917
|
+
muted
|
|
918
|
+
} = usePlaybackContext();
|
|
919
|
+
const {
|
|
920
|
+
ref: mediaRef,
|
|
921
|
+
isCurrent: t30
|
|
922
|
+
} = usePlaybackMediaRef(current, true);
|
|
923
|
+
const isCurrentMedia = t30 === undefined ? false : t30;
|
|
924
|
+
const transitionPlaying = current && ready;
|
|
925
|
+
const transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
926
|
+
const backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
927
|
+
const mediaShouldLoad = current || preload;
|
|
928
|
+
let t31;
|
|
929
|
+
if ($[0] !== header) {
|
|
930
|
+
t31 = isHeaderFilled(header);
|
|
931
|
+
$[0] = header;
|
|
932
|
+
$[1] = t31;
|
|
933
|
+
} else {
|
|
934
|
+
t31 = $[1];
|
|
935
|
+
}
|
|
936
|
+
const hasHeader = t31;
|
|
937
|
+
let t32;
|
|
938
|
+
if ($[2] !== footer) {
|
|
939
|
+
t32 = isFooterFilled(footer);
|
|
940
|
+
$[2] = footer;
|
|
941
|
+
$[3] = t32;
|
|
942
|
+
} else {
|
|
943
|
+
t32 = $[3];
|
|
944
|
+
}
|
|
945
|
+
const hasFooter = t32;
|
|
946
|
+
let t33;
|
|
947
|
+
if ($[4] !== current || $[5] !== footer || $[6] !== isPreview || $[7] !== isView || $[8] !== openWebView) {
|
|
948
|
+
t33 = getFooterProps(footer, {
|
|
949
|
+
isView,
|
|
950
|
+
current,
|
|
951
|
+
openWebView,
|
|
952
|
+
isPreview
|
|
751
953
|
});
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
954
|
+
$[4] = current;
|
|
955
|
+
$[5] = footer;
|
|
956
|
+
$[6] = isPreview;
|
|
957
|
+
$[7] = isView;
|
|
958
|
+
$[8] = openWebView;
|
|
959
|
+
$[9] = t33;
|
|
960
|
+
} else {
|
|
961
|
+
t33 = $[9];
|
|
962
|
+
}
|
|
963
|
+
const footerProps = t33;
|
|
964
|
+
const {
|
|
965
|
+
ref: headerRef,
|
|
966
|
+
height: t34
|
|
967
|
+
} = useDimensionObserver();
|
|
968
|
+
const headerHeight = t34 === undefined ? 0 : t34;
|
|
969
|
+
const {
|
|
970
|
+
ref: footerRef,
|
|
971
|
+
height: t35
|
|
972
|
+
} = useDimensionObserver();
|
|
973
|
+
const footerHeight = t35 === undefined ? 0 : t35;
|
|
974
|
+
const showInstantAnswer = isStatic || isCapture;
|
|
975
|
+
let t36;
|
|
976
|
+
if ($[10] !== answers) {
|
|
977
|
+
t36 = answers !== null ? answers.findIndex(_temp) : null;
|
|
978
|
+
$[10] = answers;
|
|
979
|
+
$[11] = t36;
|
|
980
|
+
} else {
|
|
981
|
+
t36 = $[11];
|
|
982
|
+
}
|
|
983
|
+
const goodAnswerIndex = t36;
|
|
984
|
+
const withoutGoodAnswer = goodAnswerIndex === null || goodAnswerIndex === -1;
|
|
985
|
+
const [userAnswerIndex, setUserAnswerIndex] = useState(showInstantAnswer ? goodAnswerIndex : null);
|
|
986
|
+
let t37;
|
|
987
|
+
if ($[12] !== screenId) {
|
|
988
|
+
t37 = {
|
|
989
|
+
screenId
|
|
990
|
+
};
|
|
991
|
+
$[12] = screenId;
|
|
992
|
+
$[13] = t37;
|
|
993
|
+
} else {
|
|
994
|
+
t37 = $[13];
|
|
995
|
+
}
|
|
996
|
+
const {
|
|
997
|
+
create: submitQuiz
|
|
998
|
+
} = useQuizCreate(t37);
|
|
999
|
+
let t38;
|
|
1000
|
+
if ($[14] !== trackScreenEvent || $[15] !== userAnswerIndex) {
|
|
1001
|
+
t38 = (answer_0, answerI) => {
|
|
1002
|
+
if (userAnswerIndex !== null) {
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
setUserAnswerIndex(answerI);
|
|
1006
|
+
trackScreenEvent("click_answer", `${userAnswerIndex + 1}: ${answer_0.label.body}`, {
|
|
1007
|
+
linkType: "quiz_answer",
|
|
1008
|
+
answer: answer_0,
|
|
1009
|
+
answerIndex: answerI,
|
|
1010
|
+
isGood: answer_0.good || false
|
|
798
1011
|
});
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1012
|
+
};
|
|
1013
|
+
$[14] = trackScreenEvent;
|
|
1014
|
+
$[15] = userAnswerIndex;
|
|
1015
|
+
$[16] = t38;
|
|
1016
|
+
} else {
|
|
1017
|
+
t38 = $[16];
|
|
1018
|
+
}
|
|
1019
|
+
const onAnswerClick = t38;
|
|
1020
|
+
let t39;
|
|
1021
|
+
let t40;
|
|
1022
|
+
if ($[17] !== current || $[18] !== isEdit || $[19] !== userAnswerIndex) {
|
|
1023
|
+
t39 = () => {
|
|
1024
|
+
if (!current && isEdit && userAnswerIndex !== null) {
|
|
1025
|
+
setUserAnswerIndex(null);
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
t40 = [isEdit, current, userAnswerIndex, setUserAnswerIndex];
|
|
1029
|
+
$[17] = current;
|
|
1030
|
+
$[18] = isEdit;
|
|
1031
|
+
$[19] = userAnswerIndex;
|
|
1032
|
+
$[20] = t39;
|
|
1033
|
+
$[21] = t40;
|
|
1034
|
+
} else {
|
|
1035
|
+
t39 = $[20];
|
|
1036
|
+
t40 = $[21];
|
|
1037
|
+
}
|
|
1038
|
+
useEffect(t39, t40);
|
|
1039
|
+
let t41;
|
|
1040
|
+
let t42;
|
|
1041
|
+
if ($[22] !== answers || $[23] !== isView || $[24] !== submitQuiz || $[25] !== userAnswerIndex) {
|
|
1042
|
+
t41 = () => {
|
|
1043
|
+
if (!isView) {
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
if (userAnswerIndex !== null) {
|
|
1047
|
+
const {
|
|
1048
|
+
good: t43,
|
|
1049
|
+
label: t44
|
|
1050
|
+
} = userAnswerIndex !== null && answers ? answers[userAnswerIndex] : {};
|
|
1051
|
+
const isGood = t43 === undefined ? false : t43;
|
|
1052
|
+
const label = t44 === undefined ? {} : t44;
|
|
1053
|
+
const {
|
|
1054
|
+
body: t45
|
|
1055
|
+
} = label || {};
|
|
1056
|
+
const body = t45 === undefined ? "" : t45;
|
|
1057
|
+
submitQuiz({
|
|
1058
|
+
choice: body || userAnswerIndex,
|
|
1059
|
+
value: isGood ? 1 : 0
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
t42 = [isView, userAnswerIndex, answers, submitQuiz];
|
|
1064
|
+
$[22] = answers;
|
|
1065
|
+
$[23] = isView;
|
|
1066
|
+
$[24] = submitQuiz;
|
|
1067
|
+
$[25] = userAnswerIndex;
|
|
1068
|
+
$[26] = t41;
|
|
1069
|
+
$[27] = t42;
|
|
1070
|
+
} else {
|
|
1071
|
+
t41 = $[26];
|
|
1072
|
+
t42 = $[27];
|
|
1073
|
+
}
|
|
1074
|
+
useEffect(t41, t42);
|
|
1075
|
+
const scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
1076
|
+
const [scrolledBottom, setScrolledBottom] = useState(false);
|
|
1077
|
+
let t43;
|
|
1078
|
+
if ($[28] !== trackScreenEvent) {
|
|
1079
|
+
t43 = t44 => {
|
|
1080
|
+
const {
|
|
1081
|
+
initial
|
|
1082
|
+
} = t44;
|
|
1083
|
+
if (initial) {
|
|
1084
|
+
trackScreenEvent("scroll", "Screen");
|
|
1085
|
+
}
|
|
1086
|
+
setScrolledBottom(true);
|
|
1087
|
+
};
|
|
1088
|
+
$[28] = trackScreenEvent;
|
|
1089
|
+
$[29] = t43;
|
|
1090
|
+
} else {
|
|
1091
|
+
t43 = $[29];
|
|
1092
|
+
}
|
|
1093
|
+
const onScrolledBottom = t43;
|
|
1094
|
+
let t44;
|
|
1095
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1096
|
+
t44 = () => {
|
|
1097
|
+
setScrolledBottom(false);
|
|
1098
|
+
};
|
|
1099
|
+
$[30] = t44;
|
|
1100
|
+
} else {
|
|
1101
|
+
t44 = $[30];
|
|
1102
|
+
}
|
|
1103
|
+
const onScrolledNotBottom = t44;
|
|
1104
|
+
let t45;
|
|
1105
|
+
if ($[31] !== trackScreenEvent) {
|
|
1106
|
+
t45 = t46 => {
|
|
1107
|
+
const trigger = t46 === undefined ? null : t46;
|
|
1108
|
+
if (trigger !== null) {
|
|
1109
|
+
const scrollPercent = Math.round(trigger * 100);
|
|
1110
|
+
trackScreenEvent("scroll", scrollPercent, {
|
|
1111
|
+
scrollPercent
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
$[31] = trackScreenEvent;
|
|
1116
|
+
$[32] = t45;
|
|
1117
|
+
} else {
|
|
1118
|
+
t45 = $[32];
|
|
1119
|
+
}
|
|
1120
|
+
const onScrolledTrigger = t45;
|
|
1121
|
+
const [hasScroll, setHasScroll] = useState(false);
|
|
1122
|
+
let t46;
|
|
1123
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1124
|
+
t46 = t47 => {
|
|
1125
|
+
const {
|
|
1126
|
+
canScroll: t48
|
|
1127
|
+
} = t47;
|
|
1128
|
+
const canScroll = t48 === undefined ? false : t48;
|
|
1129
|
+
setHasScroll(canScroll);
|
|
1130
|
+
};
|
|
1131
|
+
$[33] = t46;
|
|
1132
|
+
} else {
|
|
1133
|
+
t46 = $[33];
|
|
1134
|
+
}
|
|
1135
|
+
const onScrollHeightChange = t46;
|
|
1136
|
+
let t47;
|
|
1137
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1138
|
+
t47 = () => {
|
|
1139
|
+
setUserAnswerIndex(null);
|
|
1140
|
+
};
|
|
1141
|
+
$[34] = t47;
|
|
1142
|
+
} else {
|
|
1143
|
+
t47 = $[34];
|
|
1144
|
+
}
|
|
1145
|
+
const onQuizReset = t47;
|
|
1146
|
+
let t48;
|
|
1147
|
+
if ($[35] !== answers) {
|
|
1148
|
+
t48 = answers || [];
|
|
1149
|
+
$[35] = answers;
|
|
1150
|
+
$[36] = t48;
|
|
1151
|
+
} else {
|
|
1152
|
+
t48 = $[36];
|
|
1153
|
+
}
|
|
1154
|
+
const numberOfAnswers = t48.length;
|
|
1155
|
+
let t49;
|
|
1156
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1157
|
+
t49 = () => {
|
|
1158
|
+
onQuizReset();
|
|
1159
|
+
};
|
|
1160
|
+
$[37] = t49;
|
|
1161
|
+
} else {
|
|
1162
|
+
t49 = $[37];
|
|
1163
|
+
}
|
|
1164
|
+
let t50;
|
|
1165
|
+
if ($[38] !== numberOfAnswers) {
|
|
1166
|
+
t50 = [numberOfAnswers, onQuizReset];
|
|
1167
|
+
$[38] = numberOfAnswers;
|
|
1168
|
+
$[39] = t50;
|
|
1169
|
+
} else {
|
|
1170
|
+
t50 = $[39];
|
|
1171
|
+
}
|
|
1172
|
+
useEffect(t49, t50);
|
|
1173
|
+
const isSplitted = layout === "split";
|
|
1174
|
+
const verticalAlign = isSplitted ? null : layout;
|
|
1175
|
+
const showReset = isEdit && userAnswerIndex !== null;
|
|
1176
|
+
let t51;
|
|
1177
|
+
if ($[40] !== className || $[41] !== clickDisabled) {
|
|
1178
|
+
t51 = classNames([styles$2.container, className, {
|
|
1179
|
+
[styles$2.disabled]: clickDisabled
|
|
1180
|
+
}]);
|
|
1181
|
+
$[40] = className;
|
|
1182
|
+
$[41] = clickDisabled;
|
|
1183
|
+
$[42] = t51;
|
|
1184
|
+
} else {
|
|
1185
|
+
t51 = $[42];
|
|
1186
|
+
}
|
|
1187
|
+
let t52;
|
|
1188
|
+
if ($[43] !== showReset) {
|
|
1189
|
+
t52 = showReset ? /*#__PURE__*/jsx(Button, {
|
|
1190
|
+
className: styles$2.reset,
|
|
1191
|
+
icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
1192
|
+
icon: faRedo,
|
|
1193
|
+
size: "md"
|
|
1194
|
+
}),
|
|
1195
|
+
onClick: onQuizReset
|
|
1196
|
+
}) : null;
|
|
1197
|
+
$[43] = showReset;
|
|
1198
|
+
$[44] = t52;
|
|
1199
|
+
} else {
|
|
1200
|
+
t52 = $[44];
|
|
1201
|
+
}
|
|
1202
|
+
let t53;
|
|
1203
|
+
if ($[45] !== hasHeader || $[46] !== hasScroll || $[47] !== header || $[48] !== headerRef || $[49] !== isPlaceholder || $[50] !== isPreview || $[51] !== scrolledBottom || $[52] !== scrollingDisabled || $[53] !== spacing || $[54] !== userAnswerIndex || $[55] !== viewerTopHeight) {
|
|
1204
|
+
t53 = !isPlaceholder && hasHeader ? /*#__PURE__*/jsx("div", {
|
|
1205
|
+
className: classNames([styles$2.header, {
|
|
1206
|
+
[styles$2.disabled]: userAnswerIndex !== null || scrolledBottom && !scrollingDisabled && hasScroll
|
|
1207
|
+
}]),
|
|
1208
|
+
ref: headerRef,
|
|
1209
|
+
style: {
|
|
1210
|
+
paddingTop: spacing / 2,
|
|
1211
|
+
paddingLeft: spacing,
|
|
1212
|
+
paddingRight: spacing,
|
|
1213
|
+
paddingBottom: spacing,
|
|
1214
|
+
transform: !isPreview ? `translate(0, ${viewerTopHeight}px)` : null
|
|
1215
|
+
},
|
|
1216
|
+
children: /*#__PURE__*/jsx(Header, {
|
|
1217
|
+
...header
|
|
1218
|
+
})
|
|
1219
|
+
}) : null;
|
|
1220
|
+
$[45] = hasHeader;
|
|
1221
|
+
$[46] = hasScroll;
|
|
1222
|
+
$[47] = header;
|
|
1223
|
+
$[48] = headerRef;
|
|
1224
|
+
$[49] = isPlaceholder;
|
|
1225
|
+
$[50] = isPreview;
|
|
1226
|
+
$[51] = scrolledBottom;
|
|
1227
|
+
$[52] = scrollingDisabled;
|
|
1228
|
+
$[53] = spacing;
|
|
1229
|
+
$[54] = userAnswerIndex;
|
|
1230
|
+
$[55] = viewerTopHeight;
|
|
1231
|
+
$[56] = t53;
|
|
1232
|
+
} else {
|
|
1233
|
+
t53 = $[56];
|
|
1234
|
+
}
|
|
1235
|
+
const t54 = current && isView;
|
|
1236
|
+
let t55;
|
|
1237
|
+
if ($[57] !== current || $[58] !== footerHeight || $[59] !== headerHeight || $[60] !== isPlaceholder || $[61] !== isPreview || $[62] !== spacing || $[63] !== viewerBottomHeight || $[64] !== viewerTopHeight) {
|
|
1238
|
+
t55 = !isPlaceholder ? {
|
|
1239
|
+
paddingLeft: spacing,
|
|
1240
|
+
paddingRight: spacing,
|
|
1241
|
+
paddingTop: (!isPreview ? viewerTopHeight : 0) + (headerHeight || spacing),
|
|
1242
|
+
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (footerHeight || spacing)
|
|
1243
|
+
} : null;
|
|
1244
|
+
$[57] = current;
|
|
1245
|
+
$[58] = footerHeight;
|
|
1246
|
+
$[59] = headerHeight;
|
|
1247
|
+
$[60] = isPlaceholder;
|
|
1248
|
+
$[61] = isPreview;
|
|
1249
|
+
$[62] = spacing;
|
|
1250
|
+
$[63] = viewerBottomHeight;
|
|
1251
|
+
$[64] = viewerTopHeight;
|
|
1252
|
+
$[65] = t55;
|
|
1253
|
+
} else {
|
|
1254
|
+
t55 = $[65];
|
|
1255
|
+
}
|
|
1256
|
+
let t56;
|
|
1257
|
+
if ($[66] !== answers || $[67] !== badAnswerColor || $[68] !== buttonsLayout || $[69] !== buttonsStyle || $[70] !== buttonsTextStyle || $[71] !== feedbackTextStyle || $[72] !== goodAnswerColor || $[73] !== inactiveButtonsStyle || $[74] !== inactiveButtonsTextStyle || $[75] !== isView || $[76] !== keypadLayout || $[77] !== layout || $[78] !== numbersTextStyle || $[79] !== onAnswerClick || $[80] !== question || $[81] !== result || $[82] !== resultImage || $[83] !== showInstantAnswer || $[84] !== t54 || $[85] !== t55 || $[86] !== transitionDisabled || $[87] !== transitionPlaying || $[88] !== transitionStagger || $[89] !== transitions || $[90] !== userAnswerIndex || $[91] !== withoutGoodAnswer || $[92] !== withoutTrueFalse) {
|
|
1258
|
+
t56 = /*#__PURE__*/jsx(Question, {
|
|
1259
|
+
question: question,
|
|
1260
|
+
answers: answers,
|
|
1261
|
+
keypadLayout: keypadLayout,
|
|
1262
|
+
result: result,
|
|
1263
|
+
resultImage: resultImage,
|
|
1264
|
+
answeredIndex: userAnswerIndex,
|
|
1265
|
+
buttonsLayout: buttonsLayout,
|
|
1266
|
+
buttonsStyle: buttonsStyle,
|
|
1267
|
+
buttonsTextStyle: buttonsTextStyle,
|
|
1268
|
+
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
1269
|
+
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
1270
|
+
feedbackTextStyle: feedbackTextStyle,
|
|
1271
|
+
numbersTextStyle: numbersTextStyle,
|
|
1272
|
+
goodAnswerColor: goodAnswerColor,
|
|
1273
|
+
badAnswerColor: badAnswerColor,
|
|
1274
|
+
withoutTrueFalse: withoutTrueFalse,
|
|
1275
|
+
withoutGoodAnswer: withoutGoodAnswer,
|
|
1276
|
+
focusable: t54,
|
|
1277
|
+
animated: isView,
|
|
1278
|
+
showInstantAnswer: showInstantAnswer,
|
|
1279
|
+
withResult: true,
|
|
1280
|
+
layout: layout,
|
|
1281
|
+
transitions: transitions,
|
|
1282
|
+
transitionPlaying: transitionPlaying,
|
|
1283
|
+
transitionStagger: transitionStagger,
|
|
1284
|
+
transitionDisabled: transitionDisabled,
|
|
1285
|
+
onAnswerClick: onAnswerClick,
|
|
1286
|
+
className: styles$2.question,
|
|
1287
|
+
style: t55
|
|
1288
|
+
});
|
|
1289
|
+
$[66] = answers;
|
|
1290
|
+
$[67] = badAnswerColor;
|
|
1291
|
+
$[68] = buttonsLayout;
|
|
1292
|
+
$[69] = buttonsStyle;
|
|
1293
|
+
$[70] = buttonsTextStyle;
|
|
1294
|
+
$[71] = feedbackTextStyle;
|
|
1295
|
+
$[72] = goodAnswerColor;
|
|
1296
|
+
$[73] = inactiveButtonsStyle;
|
|
1297
|
+
$[74] = inactiveButtonsTextStyle;
|
|
1298
|
+
$[75] = isView;
|
|
1299
|
+
$[76] = keypadLayout;
|
|
1300
|
+
$[77] = layout;
|
|
1301
|
+
$[78] = numbersTextStyle;
|
|
1302
|
+
$[79] = onAnswerClick;
|
|
1303
|
+
$[80] = question;
|
|
1304
|
+
$[81] = result;
|
|
1305
|
+
$[82] = resultImage;
|
|
1306
|
+
$[83] = showInstantAnswer;
|
|
1307
|
+
$[84] = t54;
|
|
1308
|
+
$[85] = t55;
|
|
1309
|
+
$[86] = transitionDisabled;
|
|
1310
|
+
$[87] = transitionPlaying;
|
|
1311
|
+
$[88] = transitionStagger;
|
|
1312
|
+
$[89] = transitions;
|
|
1313
|
+
$[90] = userAnswerIndex;
|
|
1314
|
+
$[91] = withoutGoodAnswer;
|
|
1315
|
+
$[92] = withoutTrueFalse;
|
|
1316
|
+
$[93] = t56;
|
|
1317
|
+
} else {
|
|
1318
|
+
t56 = $[93];
|
|
1319
|
+
}
|
|
1320
|
+
let t57;
|
|
1321
|
+
if ($[94] !== onScrolledBottom || $[95] !== onScrolledTrigger || $[96] !== scrollingDisabled || $[97] !== t53 || $[98] !== t56 || $[99] !== verticalAlign) {
|
|
1322
|
+
t57 = /*#__PURE__*/jsxs(Scroll, {
|
|
1323
|
+
verticalAlign: verticalAlign,
|
|
1324
|
+
disabled: scrollingDisabled,
|
|
1325
|
+
onScrolledTrigger: onScrolledTrigger,
|
|
1326
|
+
onScrolledBottom: onScrolledBottom,
|
|
1327
|
+
onScrolledNotBottom: onScrolledNotBottom,
|
|
1328
|
+
onScrollHeightChange: onScrollHeightChange,
|
|
1329
|
+
withShadow: true,
|
|
1330
|
+
children: [t53, t56]
|
|
1331
|
+
});
|
|
1332
|
+
$[94] = onScrolledBottom;
|
|
1333
|
+
$[95] = onScrolledTrigger;
|
|
1334
|
+
$[96] = scrollingDisabled;
|
|
1335
|
+
$[97] = t53;
|
|
1336
|
+
$[98] = t56;
|
|
1337
|
+
$[99] = verticalAlign;
|
|
1338
|
+
$[100] = t57;
|
|
1339
|
+
} else {
|
|
1340
|
+
t57 = $[100];
|
|
1341
|
+
}
|
|
1342
|
+
let t58;
|
|
1343
|
+
if ($[101] !== current || $[102] !== footerProps || $[103] !== footerRef || $[104] !== hasFooter || $[105] !== hasScroll || $[106] !== isPlaceholder || $[107] !== isPreview || $[108] !== scrolledBottom || $[109] !== spacing || $[110] !== viewerBottomHeight || $[111] !== viewerBottomSidesWidth) {
|
|
1344
|
+
t58 = !isPlaceholder && hasFooter ? /*#__PURE__*/jsx("div", {
|
|
1345
|
+
ref: footerRef,
|
|
1346
|
+
className: classNames([styles$2.footer, {
|
|
1347
|
+
[styles$2.disabled]: !scrolledBottom && hasScroll
|
|
1348
|
+
}]),
|
|
1349
|
+
style: {
|
|
1350
|
+
transform: current && !isPreview ? `translate(0, -${viewerBottomHeight}px)` : null,
|
|
1351
|
+
paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
1352
|
+
paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
1353
|
+
paddingTop: spacing / 2,
|
|
1354
|
+
paddingBottom: spacing / 2
|
|
1355
|
+
},
|
|
1356
|
+
children: /*#__PURE__*/jsx(Footer, {
|
|
1357
|
+
...footerProps
|
|
1358
|
+
})
|
|
1359
|
+
}) : null;
|
|
1360
|
+
$[101] = current;
|
|
1361
|
+
$[102] = footerProps;
|
|
1362
|
+
$[103] = footerRef;
|
|
1363
|
+
$[104] = hasFooter;
|
|
1364
|
+
$[105] = hasScroll;
|
|
1365
|
+
$[106] = isPlaceholder;
|
|
1366
|
+
$[107] = isPreview;
|
|
1367
|
+
$[108] = scrolledBottom;
|
|
1368
|
+
$[109] = spacing;
|
|
1369
|
+
$[110] = viewerBottomHeight;
|
|
1370
|
+
$[111] = viewerBottomSidesWidth;
|
|
1371
|
+
$[112] = t58;
|
|
1372
|
+
} else {
|
|
1373
|
+
t58 = $[112];
|
|
1374
|
+
}
|
|
1375
|
+
let t59;
|
|
1376
|
+
if ($[113] !== height || $[114] !== t52 || $[115] !== t57 || $[116] !== t58 || $[117] !== width) {
|
|
1377
|
+
t59 = /*#__PURE__*/jsxs(Container, {
|
|
824
1378
|
width: width,
|
|
825
1379
|
height: height,
|
|
826
1380
|
className: styles$2.content,
|
|
827
|
-
children: [
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
onScrolledNotBottom: onScrolledNotBottom,
|
|
842
|
-
onScrollHeightChange: onScrollHeightChange,
|
|
843
|
-
withShadow: true,
|
|
844
|
-
children: [!isPlaceholder && hasHeader ? /*#__PURE__*/jsx("div", {
|
|
845
|
-
className: classNames([styles$2.header, _defineProperty({}, styles$2.disabled, userAnswerIndex !== null || scrolledBottom && !scrollingDisabled && hasScroll)]),
|
|
846
|
-
ref: headerRef,
|
|
847
|
-
style: {
|
|
848
|
-
paddingTop: spacing / 2,
|
|
849
|
-
paddingLeft: spacing,
|
|
850
|
-
paddingRight: spacing,
|
|
851
|
-
paddingBottom: spacing,
|
|
852
|
-
transform: !isPreview ? "translate(0, ".concat(viewerTopHeight, "px)") : null
|
|
853
|
-
},
|
|
854
|
-
children: /*#__PURE__*/jsx(Header, _objectSpread({}, header))
|
|
855
|
-
}) : null, /*#__PURE__*/jsx(Question, {
|
|
856
|
-
question: question,
|
|
857
|
-
answers: answers,
|
|
858
|
-
keypadLayout: keypadLayout,
|
|
859
|
-
result: result,
|
|
860
|
-
resultImage: resultImage,
|
|
861
|
-
answeredIndex: userAnswerIndex,
|
|
862
|
-
buttonsLayout: buttonsLayout,
|
|
863
|
-
buttonsStyle: buttonsStyle,
|
|
864
|
-
buttonsTextStyle: buttonsTextStyle,
|
|
865
|
-
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
866
|
-
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
867
|
-
feedbackTextStyle: feedbackTextStyle,
|
|
868
|
-
numbersTextStyle: numbersTextStyle,
|
|
869
|
-
goodAnswerColor: goodAnswerColor,
|
|
870
|
-
badAnswerColor: badAnswerColor,
|
|
871
|
-
withoutTrueFalse: withoutTrueFalse,
|
|
872
|
-
withoutGoodAnswer: withoutGoodAnswer,
|
|
873
|
-
focusable: current && isView,
|
|
874
|
-
animated: isView,
|
|
875
|
-
showInstantAnswer: showInstantAnswer,
|
|
876
|
-
withResult: true,
|
|
877
|
-
layout: layout,
|
|
878
|
-
transitions: transitions,
|
|
879
|
-
transitionPlaying: transitionPlaying,
|
|
880
|
-
transitionStagger: transitionStagger,
|
|
881
|
-
transitionDisabled: transitionDisabled,
|
|
882
|
-
onAnswerClick: onAnswerClick,
|
|
883
|
-
className: styles$2.question,
|
|
884
|
-
style: !isPlaceholder ? {
|
|
885
|
-
paddingLeft: spacing,
|
|
886
|
-
paddingRight: spacing,
|
|
887
|
-
paddingTop: (!isPreview ? viewerTopHeight : 0) + (headerHeight || spacing),
|
|
888
|
-
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (footerHeight || spacing)
|
|
889
|
-
} : null
|
|
890
|
-
})]
|
|
891
|
-
}), !isPlaceholder && hasFooter ? /*#__PURE__*/jsx("div", {
|
|
892
|
-
ref: footerRef,
|
|
893
|
-
className: classNames([styles$2.footer, _defineProperty({}, styles$2.disabled, !scrolledBottom && hasScroll)]),
|
|
894
|
-
style: {
|
|
895
|
-
transform: current && !isPreview ? "translate(0, -".concat(viewerBottomHeight, "px)") : null,
|
|
896
|
-
paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
897
|
-
paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
898
|
-
paddingTop: spacing / 2,
|
|
899
|
-
paddingBottom: spacing / 2
|
|
900
|
-
},
|
|
901
|
-
children: /*#__PURE__*/jsx(Footer, _objectSpread({}, footerProps))
|
|
902
|
-
}) : null]
|
|
903
|
-
}), !isPlaceholder ? /*#__PURE__*/jsx(Background, {
|
|
1381
|
+
children: [t52, t57, t58]
|
|
1382
|
+
});
|
|
1383
|
+
$[113] = height;
|
|
1384
|
+
$[114] = t52;
|
|
1385
|
+
$[115] = t57;
|
|
1386
|
+
$[116] = t58;
|
|
1387
|
+
$[117] = width;
|
|
1388
|
+
$[118] = t59;
|
|
1389
|
+
} else {
|
|
1390
|
+
t59 = $[118];
|
|
1391
|
+
}
|
|
1392
|
+
let t60;
|
|
1393
|
+
if ($[119] !== background || $[120] !== backgroundPlaying || $[121] !== customMediaRef || $[122] !== height || $[123] !== isPlaceholder || $[124] !== isPreview || $[125] !== mediaRef || $[126] !== mediaShouldLoad || $[127] !== muted || $[128] !== resolution || $[129] !== width) {
|
|
1394
|
+
t60 = !isPlaceholder ? /*#__PURE__*/jsx(Background, {
|
|
904
1395
|
background: background,
|
|
905
1396
|
width: width,
|
|
906
1397
|
height: height,
|
|
@@ -911,447 +1402,703 @@ function QuizScreen(_ref) {
|
|
|
911
1402
|
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
912
1403
|
withoutVideo: isPreview,
|
|
913
1404
|
className: styles$2.background
|
|
914
|
-
}) : null
|
|
915
|
-
|
|
1405
|
+
}) : null;
|
|
1406
|
+
$[119] = background;
|
|
1407
|
+
$[120] = backgroundPlaying;
|
|
1408
|
+
$[121] = customMediaRef;
|
|
1409
|
+
$[122] = height;
|
|
1410
|
+
$[123] = isPlaceholder;
|
|
1411
|
+
$[124] = isPreview;
|
|
1412
|
+
$[125] = mediaRef;
|
|
1413
|
+
$[126] = mediaShouldLoad;
|
|
1414
|
+
$[127] = muted;
|
|
1415
|
+
$[128] = resolution;
|
|
1416
|
+
$[129] = width;
|
|
1417
|
+
$[130] = t60;
|
|
1418
|
+
} else {
|
|
1419
|
+
t60 = $[130];
|
|
1420
|
+
}
|
|
1421
|
+
let t61;
|
|
1422
|
+
if ($[131] !== t51 || $[132] !== t59 || $[133] !== t60) {
|
|
1423
|
+
t61 = /*#__PURE__*/jsxs("div", {
|
|
1424
|
+
className: t51,
|
|
1425
|
+
"data-screen-ready": true,
|
|
1426
|
+
children: [t59, t60]
|
|
1427
|
+
});
|
|
1428
|
+
$[131] = t51;
|
|
1429
|
+
$[132] = t59;
|
|
1430
|
+
$[133] = t60;
|
|
1431
|
+
$[134] = t61;
|
|
1432
|
+
} else {
|
|
1433
|
+
t61 = $[134];
|
|
1434
|
+
}
|
|
1435
|
+
return t61;
|
|
1436
|
+
}
|
|
1437
|
+
function _temp(answer) {
|
|
1438
|
+
return answer !== null && answer.good;
|
|
916
1439
|
}
|
|
917
1440
|
|
|
918
1441
|
var styles$1 = {"container":"micromag-screen-quiz-results-container","title":"micromag-screen-quiz-results-title","emptyTitle":"micromag-screen-quiz-results-emptyTitle","emptyDescription":"micromag-screen-quiz-results-emptyDescription"};
|
|
919
1442
|
|
|
920
|
-
function Results(
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
title
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1443
|
+
function Results(t0) {
|
|
1444
|
+
const $ = c(46);
|
|
1445
|
+
const {
|
|
1446
|
+
layout: t1,
|
|
1447
|
+
title: t2,
|
|
1448
|
+
description: t3,
|
|
1449
|
+
resultsHeadingStyle: t4,
|
|
1450
|
+
resultsTextStyle: t5,
|
|
1451
|
+
transitions: t6,
|
|
1452
|
+
transitionPlaying: t7,
|
|
1453
|
+
transitionStagger: t8,
|
|
1454
|
+
transitionDisabled: t9,
|
|
1455
|
+
className: t10,
|
|
1456
|
+
style: t11
|
|
1457
|
+
} = t0;
|
|
1458
|
+
const layout = t1 === undefined ? null : t1;
|
|
1459
|
+
const title = t2 === undefined ? null : t2;
|
|
1460
|
+
const description = t3 === undefined ? null : t3;
|
|
1461
|
+
const resultsHeadingStyle = t4 === undefined ? null : t4;
|
|
1462
|
+
const resultsTextStyle = t5 === undefined ? null : t5;
|
|
1463
|
+
const transitions = t6 === undefined ? null : t6;
|
|
1464
|
+
const transitionPlaying = t7 === undefined ? false : t7;
|
|
1465
|
+
const transitionStagger = t8 === undefined ? 100 : t8;
|
|
1466
|
+
const transitionDisabled = t9 === undefined ? false : t9;
|
|
1467
|
+
const className = t10 === undefined ? null : t10;
|
|
1468
|
+
const style = t11 === undefined ? null : t11;
|
|
1469
|
+
const isSplitted = layout === "split";
|
|
1470
|
+
const verticalAlign = isSplitted ? null : layout;
|
|
1471
|
+
let t12;
|
|
1472
|
+
if ($[0] !== title) {
|
|
1473
|
+
t12 = isTextFilled(title);
|
|
1474
|
+
$[0] = title;
|
|
1475
|
+
$[1] = t12;
|
|
1476
|
+
} else {
|
|
1477
|
+
t12 = $[1];
|
|
1478
|
+
}
|
|
1479
|
+
const hasTitle = t12;
|
|
1480
|
+
let t13;
|
|
1481
|
+
if ($[2] !== title) {
|
|
1482
|
+
t13 = title || {};
|
|
1483
|
+
$[2] = title;
|
|
1484
|
+
$[3] = t13;
|
|
1485
|
+
} else {
|
|
1486
|
+
t13 = $[3];
|
|
1487
|
+
}
|
|
1488
|
+
const {
|
|
1489
|
+
textStyle: t14
|
|
1490
|
+
} = t13;
|
|
1491
|
+
const titleTextStyle = t14 === undefined ? null : t14;
|
|
1492
|
+
let t15;
|
|
1493
|
+
if ($[4] !== description) {
|
|
1494
|
+
t15 = isTextFilled(description);
|
|
1495
|
+
$[4] = description;
|
|
1496
|
+
$[5] = t15;
|
|
1497
|
+
} else {
|
|
1498
|
+
t15 = $[5];
|
|
1499
|
+
}
|
|
1500
|
+
const hasDescription = t15;
|
|
1501
|
+
let t16;
|
|
1502
|
+
if ($[6] !== description) {
|
|
1503
|
+
t16 = description || {};
|
|
1504
|
+
$[6] = description;
|
|
1505
|
+
$[7] = t16;
|
|
1506
|
+
} else {
|
|
1507
|
+
t16 = $[7];
|
|
1508
|
+
}
|
|
1509
|
+
const {
|
|
1510
|
+
textStyle: t17
|
|
1511
|
+
} = t16;
|
|
1512
|
+
const descriptionTextStyle = t17 === undefined ? null : t17;
|
|
1513
|
+
let t18;
|
|
1514
|
+
if ($[8] !== className) {
|
|
1515
|
+
t18 = classNames([styles$1.container, className]);
|
|
1516
|
+
$[8] = className;
|
|
1517
|
+
$[9] = t18;
|
|
1518
|
+
} else {
|
|
1519
|
+
t18 = $[9];
|
|
1520
|
+
}
|
|
1521
|
+
let t19;
|
|
1522
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1523
|
+
t19 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1524
|
+
id: "BSTWf8",
|
|
1525
|
+
defaultMessage: "Title"
|
|
1526
|
+
});
|
|
1527
|
+
$[10] = t19;
|
|
1528
|
+
} else {
|
|
1529
|
+
t19 = $[10];
|
|
1530
|
+
}
|
|
1531
|
+
const t20 = !hasTitle;
|
|
1532
|
+
let t21;
|
|
1533
|
+
if ($[11] !== hasTitle || $[12] !== resultsHeadingStyle || $[13] !== title || $[14] !== titleTextStyle || $[15] !== transitionDisabled || $[16] !== transitionPlaying || $[17] !== transitions) {
|
|
1534
|
+
t21 = hasTitle ? /*#__PURE__*/jsx(Transitions, {
|
|
1535
|
+
transitions: transitions,
|
|
1536
|
+
playing: transitionPlaying,
|
|
1537
|
+
disabled: transitionDisabled,
|
|
1538
|
+
children: /*#__PURE__*/jsx(Heading, {
|
|
1539
|
+
...title,
|
|
1540
|
+
className: styles$1.title,
|
|
1541
|
+
textStyle: {
|
|
1542
|
+
...resultsHeadingStyle,
|
|
1543
|
+
...titleTextStyle
|
|
1544
|
+
}
|
|
1545
|
+
})
|
|
1546
|
+
}) : null;
|
|
1547
|
+
$[11] = hasTitle;
|
|
1548
|
+
$[12] = resultsHeadingStyle;
|
|
1549
|
+
$[13] = title;
|
|
1550
|
+
$[14] = titleTextStyle;
|
|
1551
|
+
$[15] = transitionDisabled;
|
|
1552
|
+
$[16] = transitionPlaying;
|
|
1553
|
+
$[17] = transitions;
|
|
1554
|
+
$[18] = t21;
|
|
1555
|
+
} else {
|
|
1556
|
+
t21 = $[18];
|
|
1557
|
+
}
|
|
1558
|
+
let t22;
|
|
1559
|
+
if ($[19] !== t20 || $[20] !== t21) {
|
|
1560
|
+
t22 = /*#__PURE__*/jsx(ScreenElement, {
|
|
959
1561
|
placeholder: "title",
|
|
960
|
-
emptyLabel:
|
|
961
|
-
id: "BSTWf8",
|
|
962
|
-
defaultMessage: [{
|
|
963
|
-
"type": 0,
|
|
964
|
-
"value": "Title"
|
|
965
|
-
}]
|
|
966
|
-
}),
|
|
1562
|
+
emptyLabel: t19,
|
|
967
1563
|
emptyClassName: styles$1.emptyTitle,
|
|
968
|
-
isEmpty:
|
|
969
|
-
children:
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1564
|
+
isEmpty: t20,
|
|
1565
|
+
children: t21
|
|
1566
|
+
}, "title");
|
|
1567
|
+
$[19] = t20;
|
|
1568
|
+
$[20] = t21;
|
|
1569
|
+
$[21] = t22;
|
|
1570
|
+
} else {
|
|
1571
|
+
t22 = $[21];
|
|
1572
|
+
}
|
|
1573
|
+
let t23;
|
|
1574
|
+
if ($[22] !== isSplitted) {
|
|
1575
|
+
t23 = isSplitted ? /*#__PURE__*/jsx(Spacer, {}, "spacer") : null;
|
|
1576
|
+
$[22] = isSplitted;
|
|
1577
|
+
$[23] = t23;
|
|
1578
|
+
} else {
|
|
1579
|
+
t23 = $[23];
|
|
1580
|
+
}
|
|
1581
|
+
let t24;
|
|
1582
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1583
|
+
t24 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1584
|
+
id: "hoDz0O",
|
|
1585
|
+
defaultMessage: "Description"
|
|
1586
|
+
});
|
|
1587
|
+
$[24] = t24;
|
|
1588
|
+
} else {
|
|
1589
|
+
t24 = $[24];
|
|
1590
|
+
}
|
|
1591
|
+
const t25 = !hasDescription;
|
|
1592
|
+
let t26;
|
|
1593
|
+
if ($[25] !== description || $[26] !== descriptionTextStyle || $[27] !== hasTitle || $[28] !== resultsTextStyle || $[29] !== transitionDisabled || $[30] !== transitionPlaying || $[31] !== transitionStagger || $[32] !== transitions) {
|
|
1594
|
+
t26 = hasTitle ? /*#__PURE__*/jsx(Transitions, {
|
|
1595
|
+
transitions: transitions,
|
|
1596
|
+
playing: transitionPlaying,
|
|
1597
|
+
disabled: transitionDisabled,
|
|
1598
|
+
delay: transitionStagger,
|
|
1599
|
+
children: /*#__PURE__*/jsx(Text, {
|
|
1600
|
+
...description,
|
|
1601
|
+
className: styles$1.description,
|
|
1602
|
+
textStyle: {
|
|
1603
|
+
...resultsTextStyle,
|
|
1604
|
+
...descriptionTextStyle
|
|
1605
|
+
}
|
|
1606
|
+
})
|
|
1607
|
+
}) : null;
|
|
1608
|
+
$[25] = description;
|
|
1609
|
+
$[26] = descriptionTextStyle;
|
|
1610
|
+
$[27] = hasTitle;
|
|
1611
|
+
$[28] = resultsTextStyle;
|
|
1612
|
+
$[29] = transitionDisabled;
|
|
1613
|
+
$[30] = transitionPlaying;
|
|
1614
|
+
$[31] = transitionStagger;
|
|
1615
|
+
$[32] = transitions;
|
|
1616
|
+
$[33] = t26;
|
|
1617
|
+
} else {
|
|
1618
|
+
t26 = $[33];
|
|
1619
|
+
}
|
|
1620
|
+
let t27;
|
|
1621
|
+
if ($[34] !== t25 || $[35] !== t26) {
|
|
1622
|
+
t27 = /*#__PURE__*/jsx(ScreenElement, {
|
|
979
1623
|
placeholder: "text",
|
|
980
|
-
emptyLabel:
|
|
981
|
-
id: "hoDz0O",
|
|
982
|
-
defaultMessage: [{
|
|
983
|
-
"type": 0,
|
|
984
|
-
"value": "Description"
|
|
985
|
-
}]
|
|
986
|
-
}),
|
|
1624
|
+
emptyLabel: t24,
|
|
987
1625
|
emptyClassName: styles$1.emptyDescription,
|
|
988
|
-
isEmpty:
|
|
989
|
-
children:
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1626
|
+
isEmpty: t25,
|
|
1627
|
+
children: t26
|
|
1628
|
+
}, "description");
|
|
1629
|
+
$[34] = t25;
|
|
1630
|
+
$[35] = t26;
|
|
1631
|
+
$[36] = t27;
|
|
1632
|
+
} else {
|
|
1633
|
+
t27 = $[36];
|
|
1634
|
+
}
|
|
1635
|
+
let t28;
|
|
1636
|
+
if ($[37] !== t22 || $[38] !== t23 || $[39] !== t27) {
|
|
1637
|
+
t28 = [t22, t23, t27];
|
|
1638
|
+
$[37] = t22;
|
|
1639
|
+
$[38] = t23;
|
|
1640
|
+
$[39] = t27;
|
|
1641
|
+
$[40] = t28;
|
|
1642
|
+
} else {
|
|
1643
|
+
t28 = $[40];
|
|
1644
|
+
}
|
|
1645
|
+
let t29;
|
|
1646
|
+
if ($[41] !== style || $[42] !== t18 || $[43] !== t28 || $[44] !== verticalAlign) {
|
|
1647
|
+
t29 = /*#__PURE__*/jsx(Layout, {
|
|
1648
|
+
className: t18,
|
|
1649
|
+
fullscreen: true,
|
|
1650
|
+
verticalAlign: verticalAlign,
|
|
1651
|
+
style: style,
|
|
1652
|
+
children: t28
|
|
1653
|
+
});
|
|
1654
|
+
$[41] = style;
|
|
1655
|
+
$[42] = t18;
|
|
1656
|
+
$[43] = t28;
|
|
1657
|
+
$[44] = verticalAlign;
|
|
1658
|
+
$[45] = t29;
|
|
1659
|
+
} else {
|
|
1660
|
+
t29 = $[45];
|
|
1661
|
+
}
|
|
1662
|
+
return t29;
|
|
1001
1663
|
}
|
|
1002
1664
|
|
|
1003
1665
|
var styles = {"container":"micromag-screen-quiz-title-container","title":"micromag-screen-quiz-title-title","description":"micromag-screen-quiz-title-description","emptyTitle":"micromag-screen-quiz-title-emptyTitle","emptyDescription":"micromag-screen-quiz-title-emptyDescription"};
|
|
1004
1666
|
|
|
1005
|
-
function Title(
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
title
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1667
|
+
function Title(t0) {
|
|
1668
|
+
const $ = c(43);
|
|
1669
|
+
const {
|
|
1670
|
+
layout: t1,
|
|
1671
|
+
title: t2,
|
|
1672
|
+
description: t3,
|
|
1673
|
+
button: t4,
|
|
1674
|
+
buttonDisabled: t5,
|
|
1675
|
+
focusable: t6,
|
|
1676
|
+
className: t7,
|
|
1677
|
+
style: t8,
|
|
1678
|
+
onClickButton: t9
|
|
1679
|
+
} = t0;
|
|
1680
|
+
const layout = t1 === undefined ? null : t1;
|
|
1681
|
+
const title = t2 === undefined ? null : t2;
|
|
1682
|
+
const description = t3 === undefined ? null : t3;
|
|
1683
|
+
const button = t4 === undefined ? null : t4;
|
|
1684
|
+
const buttonDisabled = t5 === undefined ? false : t5;
|
|
1685
|
+
const focusable = t6 === undefined ? false : t6;
|
|
1686
|
+
const className = t7 === undefined ? null : t7;
|
|
1687
|
+
const style = t8 === undefined ? null : t8;
|
|
1688
|
+
const onClickButton = t9 === undefined ? null : t9;
|
|
1689
|
+
const isSplitted = layout === "split";
|
|
1690
|
+
const verticalAlign = isSplitted ? null : layout;
|
|
1691
|
+
let t10;
|
|
1692
|
+
if ($[0] !== title) {
|
|
1693
|
+
t10 = isTextFilled(title);
|
|
1694
|
+
$[0] = title;
|
|
1695
|
+
$[1] = t10;
|
|
1696
|
+
} else {
|
|
1697
|
+
t10 = $[1];
|
|
1698
|
+
}
|
|
1699
|
+
const hasTitle = t10;
|
|
1700
|
+
let t11;
|
|
1701
|
+
if ($[2] !== description) {
|
|
1702
|
+
t11 = isTextFilled(description);
|
|
1703
|
+
$[2] = description;
|
|
1704
|
+
$[3] = t11;
|
|
1705
|
+
} else {
|
|
1706
|
+
t11 = $[3];
|
|
1707
|
+
}
|
|
1708
|
+
const hasDescription = t11;
|
|
1709
|
+
let t12;
|
|
1710
|
+
if ($[4] !== button) {
|
|
1711
|
+
t12 = isTextFilled(button);
|
|
1712
|
+
$[4] = button;
|
|
1713
|
+
$[5] = t12;
|
|
1714
|
+
} else {
|
|
1715
|
+
t12 = $[5];
|
|
1716
|
+
}
|
|
1717
|
+
const hasButton = t12;
|
|
1718
|
+
let t13;
|
|
1719
|
+
if ($[6] !== className) {
|
|
1720
|
+
t13 = classNames([styles.container, className]);
|
|
1721
|
+
$[6] = className;
|
|
1722
|
+
$[7] = t13;
|
|
1723
|
+
} else {
|
|
1724
|
+
t13 = $[7];
|
|
1725
|
+
}
|
|
1726
|
+
let t14;
|
|
1727
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1728
|
+
t14 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1729
|
+
id: "BSTWf8",
|
|
1730
|
+
defaultMessage: "Title"
|
|
1731
|
+
});
|
|
1732
|
+
$[8] = t14;
|
|
1733
|
+
} else {
|
|
1734
|
+
t14 = $[8];
|
|
1735
|
+
}
|
|
1736
|
+
const t15 = !hasTitle;
|
|
1737
|
+
let t16;
|
|
1738
|
+
if ($[9] !== hasTitle || $[10] !== title) {
|
|
1739
|
+
t16 = hasTitle ? /*#__PURE__*/jsx(Heading, {
|
|
1740
|
+
...title,
|
|
1741
|
+
className: styles.title
|
|
1742
|
+
}) : null;
|
|
1743
|
+
$[9] = hasTitle;
|
|
1744
|
+
$[10] = title;
|
|
1745
|
+
$[11] = t16;
|
|
1746
|
+
} else {
|
|
1747
|
+
t16 = $[11];
|
|
1748
|
+
}
|
|
1749
|
+
let t17;
|
|
1750
|
+
if ($[12] !== t15 || $[13] !== t16) {
|
|
1751
|
+
t17 = /*#__PURE__*/jsx(ScreenElement, {
|
|
1036
1752
|
placeholder: "title",
|
|
1037
|
-
emptyLabel:
|
|
1038
|
-
id: "BSTWf8",
|
|
1039
|
-
defaultMessage: [{
|
|
1040
|
-
"type": 0,
|
|
1041
|
-
"value": "Title"
|
|
1042
|
-
}]
|
|
1043
|
-
}),
|
|
1753
|
+
emptyLabel: t14,
|
|
1044
1754
|
emptyClassName: styles.emptyTitle,
|
|
1045
|
-
isEmpty:
|
|
1046
|
-
children:
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1755
|
+
isEmpty: t15,
|
|
1756
|
+
children: t16
|
|
1757
|
+
}, "title");
|
|
1758
|
+
$[12] = t15;
|
|
1759
|
+
$[13] = t16;
|
|
1760
|
+
$[14] = t17;
|
|
1761
|
+
} else {
|
|
1762
|
+
t17 = $[14];
|
|
1763
|
+
}
|
|
1764
|
+
let t18;
|
|
1765
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1766
|
+
t18 = /*#__PURE__*/jsx(FormattedMessage, {
|
|
1767
|
+
id: "hoDz0O",
|
|
1768
|
+
defaultMessage: "Description"
|
|
1769
|
+
});
|
|
1770
|
+
$[15] = t18;
|
|
1771
|
+
} else {
|
|
1772
|
+
t18 = $[15];
|
|
1773
|
+
}
|
|
1774
|
+
const t19 = !hasDescription;
|
|
1775
|
+
let t20;
|
|
1776
|
+
if ($[16] !== description || $[17] !== hasDescription) {
|
|
1777
|
+
t20 = hasDescription ? /*#__PURE__*/jsx(Text, {
|
|
1778
|
+
...description,
|
|
1779
|
+
className: styles.description
|
|
1780
|
+
}) : null;
|
|
1781
|
+
$[16] = description;
|
|
1782
|
+
$[17] = hasDescription;
|
|
1783
|
+
$[18] = t20;
|
|
1784
|
+
} else {
|
|
1785
|
+
t20 = $[18];
|
|
1786
|
+
}
|
|
1787
|
+
let t21;
|
|
1788
|
+
if ($[19] !== t19 || $[20] !== t20) {
|
|
1789
|
+
t21 = /*#__PURE__*/jsx(ScreenElement, {
|
|
1050
1790
|
placeholder: "text",
|
|
1051
|
-
emptyLabel:
|
|
1052
|
-
id: "hoDz0O",
|
|
1053
|
-
defaultMessage: [{
|
|
1054
|
-
"type": 0,
|
|
1055
|
-
"value": "Description"
|
|
1056
|
-
}]
|
|
1057
|
-
}),
|
|
1791
|
+
emptyLabel: t18,
|
|
1058
1792
|
emptyClassName: styles.emptyDescription,
|
|
1059
|
-
isEmpty:
|
|
1060
|
-
children:
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1793
|
+
isEmpty: t19,
|
|
1794
|
+
children: t20
|
|
1795
|
+
}, "description");
|
|
1796
|
+
$[19] = t19;
|
|
1797
|
+
$[20] = t20;
|
|
1798
|
+
$[21] = t21;
|
|
1799
|
+
} else {
|
|
1800
|
+
t21 = $[21];
|
|
1801
|
+
}
|
|
1802
|
+
let t22;
|
|
1803
|
+
if ($[22] !== isSplitted) {
|
|
1804
|
+
t22 = isSplitted ? /*#__PURE__*/jsx(Spacer, {}, "spacer") : null;
|
|
1805
|
+
$[22] = isSplitted;
|
|
1806
|
+
$[23] = t22;
|
|
1807
|
+
} else {
|
|
1808
|
+
t22 = $[23];
|
|
1809
|
+
}
|
|
1810
|
+
const t23 = button !== null ? button.buttonStyle : null;
|
|
1811
|
+
let t24;
|
|
1812
|
+
if ($[24] !== button || $[25] !== hasButton) {
|
|
1813
|
+
t24 = hasButton ? /*#__PURE__*/jsx(Text, {
|
|
1814
|
+
...button,
|
|
1815
|
+
className: styles.label
|
|
1816
|
+
}) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
1817
|
+
id: "D7LIZQ",
|
|
1818
|
+
defaultMessage: "Start"
|
|
1819
|
+
});
|
|
1820
|
+
$[24] = button;
|
|
1821
|
+
$[25] = hasButton;
|
|
1822
|
+
$[26] = t24;
|
|
1823
|
+
} else {
|
|
1824
|
+
t24 = $[26];
|
|
1825
|
+
}
|
|
1826
|
+
let t25;
|
|
1827
|
+
if ($[27] !== buttonDisabled || $[28] !== focusable || $[29] !== onClickButton || $[30] !== t23 || $[31] !== t24) {
|
|
1828
|
+
t25 = /*#__PURE__*/jsx(ScreenElement, {
|
|
1064
1829
|
placeholder: "button",
|
|
1065
1830
|
children: /*#__PURE__*/jsx(Button$1, {
|
|
1066
1831
|
disabled: buttonDisabled,
|
|
1067
1832
|
focusable: focusable,
|
|
1068
|
-
buttonStyle:
|
|
1833
|
+
buttonStyle: t23,
|
|
1069
1834
|
className: styles.button,
|
|
1070
1835
|
onClick: onClickButton,
|
|
1071
|
-
children:
|
|
1072
|
-
className: styles.label
|
|
1073
|
-
})) : /*#__PURE__*/jsx(FormattedMessage, {
|
|
1074
|
-
id: "D7LIZQ",
|
|
1075
|
-
defaultMessage: [{
|
|
1076
|
-
"type": 0,
|
|
1077
|
-
"value": "Start"
|
|
1078
|
-
}]
|
|
1079
|
-
})
|
|
1836
|
+
children: t24
|
|
1080
1837
|
})
|
|
1081
|
-
}, "button")
|
|
1082
|
-
|
|
1838
|
+
}, "button");
|
|
1839
|
+
$[27] = buttonDisabled;
|
|
1840
|
+
$[28] = focusable;
|
|
1841
|
+
$[29] = onClickButton;
|
|
1842
|
+
$[30] = t23;
|
|
1843
|
+
$[31] = t24;
|
|
1844
|
+
$[32] = t25;
|
|
1845
|
+
} else {
|
|
1846
|
+
t25 = $[32];
|
|
1847
|
+
}
|
|
1848
|
+
let t26;
|
|
1849
|
+
if ($[33] !== t17 || $[34] !== t21 || $[35] !== t22 || $[36] !== t25) {
|
|
1850
|
+
t26 = [t17, t21, t22, t25];
|
|
1851
|
+
$[33] = t17;
|
|
1852
|
+
$[34] = t21;
|
|
1853
|
+
$[35] = t22;
|
|
1854
|
+
$[36] = t25;
|
|
1855
|
+
$[37] = t26;
|
|
1856
|
+
} else {
|
|
1857
|
+
t26 = $[37];
|
|
1858
|
+
}
|
|
1859
|
+
let t27;
|
|
1860
|
+
if ($[38] !== style || $[39] !== t13 || $[40] !== t26 || $[41] !== verticalAlign) {
|
|
1861
|
+
t27 = /*#__PURE__*/jsx(Layout, {
|
|
1862
|
+
className: t13,
|
|
1863
|
+
fullscreen: true,
|
|
1864
|
+
verticalAlign: verticalAlign,
|
|
1865
|
+
style: style,
|
|
1866
|
+
children: t26
|
|
1867
|
+
});
|
|
1868
|
+
$[38] = style;
|
|
1869
|
+
$[39] = t13;
|
|
1870
|
+
$[40] = t26;
|
|
1871
|
+
$[41] = verticalAlign;
|
|
1872
|
+
$[42] = t27;
|
|
1873
|
+
} else {
|
|
1874
|
+
t27 = $[42];
|
|
1875
|
+
}
|
|
1876
|
+
return t27;
|
|
1083
1877
|
}
|
|
1084
1878
|
|
|
1085
|
-
function QuizMultipleScreen(
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
_ref$transitionStagge = _ref.transitionStagger,
|
|
1143
|
-
transitionStagger = _ref$transitionStagge === void 0 ? 100 : _ref$transitionStagge,
|
|
1144
|
-
_ref$type = _ref.type,
|
|
1145
|
-
type = _ref$type === void 0 ? null : _ref$type,
|
|
1146
|
-
_ref$mediaRef = _ref.mediaRef,
|
|
1147
|
-
customMediaRef = _ref$mediaRef === void 0 ? null : _ref$mediaRef,
|
|
1148
|
-
_ref$className = _ref.className,
|
|
1149
|
-
className = _ref$className === void 0 ? null : _ref$className;
|
|
1150
|
-
var screenId = id || 'screen-id';
|
|
1151
|
-
var trackScreenEvent = useTrackScreenEvent(type);
|
|
1152
|
-
var _useScreenSize = useScreenSize(),
|
|
1153
|
-
width = _useScreenSize.width,
|
|
1154
|
-
height = _useScreenSize.height,
|
|
1155
|
-
resolution = _useScreenSize.resolution;
|
|
1156
|
-
var _useViewerContext = useViewerContext(),
|
|
1157
|
-
viewerTopHeight = _useViewerContext.topHeight,
|
|
1158
|
-
viewerBottomHeight = _useViewerContext.bottomHeight,
|
|
1159
|
-
viewerBottomSidesWidth = _useViewerContext.bottomSidesWidth;
|
|
1160
|
-
var _useScreenRenderConte = useScreenRenderContext(),
|
|
1161
|
-
isView = _useScreenRenderConte.isView,
|
|
1162
|
-
isPreview = _useScreenRenderConte.isPreview,
|
|
1163
|
-
isPlaceholder = _useScreenRenderConte.isPlaceholder,
|
|
1164
|
-
isEdit = _useScreenRenderConte.isEdit,
|
|
1165
|
-
isStatic = _useScreenRenderConte.isStatic,
|
|
1166
|
-
isCapture = _useScreenRenderConte.isCapture;
|
|
1167
|
-
var _usePlaybackContext = usePlaybackContext(),
|
|
1168
|
-
muted = _usePlaybackContext.muted;
|
|
1879
|
+
function QuizMultipleScreen({
|
|
1880
|
+
id = null,
|
|
1881
|
+
layout = 'middle',
|
|
1882
|
+
introLayout = null,
|
|
1883
|
+
title = null,
|
|
1884
|
+
description = null,
|
|
1885
|
+
questions = null,
|
|
1886
|
+
results = null,
|
|
1887
|
+
buttonsStyle = null,
|
|
1888
|
+
inactiveButtonsStyle = null,
|
|
1889
|
+
buttonsTextStyle = null,
|
|
1890
|
+
inactiveButtonsTextStyle = null,
|
|
1891
|
+
questionsHeadingStyle = null,
|
|
1892
|
+
resultsHeadingStyle = null,
|
|
1893
|
+
resultsTextStyle = null,
|
|
1894
|
+
feedbackTextStyle = null,
|
|
1895
|
+
numbersTextStyle = null,
|
|
1896
|
+
goodAnswerColor = null,
|
|
1897
|
+
badAnswerColor = null,
|
|
1898
|
+
spacing = 20,
|
|
1899
|
+
background = null,
|
|
1900
|
+
introBackground = null,
|
|
1901
|
+
introButton = null,
|
|
1902
|
+
nextButton = null,
|
|
1903
|
+
header = null,
|
|
1904
|
+
footer = null,
|
|
1905
|
+
current = true,
|
|
1906
|
+
active = true,
|
|
1907
|
+
transitions = null,
|
|
1908
|
+
transitionStagger = 100,
|
|
1909
|
+
type = null,
|
|
1910
|
+
mediaRef: customMediaRef = null,
|
|
1911
|
+
className = null
|
|
1912
|
+
}) {
|
|
1913
|
+
const screenId = id || 'screen-id';
|
|
1914
|
+
const trackScreenEvent = useTrackScreenEvent(type);
|
|
1915
|
+
const {
|
|
1916
|
+
width,
|
|
1917
|
+
height,
|
|
1918
|
+
resolution
|
|
1919
|
+
} = useScreenSize();
|
|
1920
|
+
const {
|
|
1921
|
+
topHeight: viewerTopHeight,
|
|
1922
|
+
bottomHeight: viewerBottomHeight,
|
|
1923
|
+
bottomSidesWidth: viewerBottomSidesWidth
|
|
1924
|
+
} = useViewerContext();
|
|
1925
|
+
const {
|
|
1926
|
+
isView,
|
|
1927
|
+
isPreview,
|
|
1928
|
+
isPlaceholder,
|
|
1929
|
+
isEdit,
|
|
1930
|
+
isStatic,
|
|
1931
|
+
isCapture
|
|
1932
|
+
} = useScreenRenderContext();
|
|
1933
|
+
const {
|
|
1934
|
+
muted
|
|
1935
|
+
} = usePlaybackContext();
|
|
1169
1936
|
|
|
1170
1937
|
// console.log('isCurrentMedia', isCurrentMedia, mediaRef);
|
|
1171
1938
|
|
|
1172
|
-
|
|
1173
|
-
openWebView
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
stateIndex = _ref3$2 === void 0 ? 0 : _ref3$2;
|
|
1181
|
-
var transitionPlaying = current;
|
|
1182
|
-
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
1183
|
-
var hasButtonText = isTextFilled(nextButton);
|
|
1939
|
+
const {
|
|
1940
|
+
open: openWebView
|
|
1941
|
+
} = useViewerWebView();
|
|
1942
|
+
const screenState = useScreenState();
|
|
1943
|
+
const [stateId = null, stateIndex = 0] = screenState !== null ? screenState.split('.') : [];
|
|
1944
|
+
const transitionPlaying = current;
|
|
1945
|
+
const transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
1946
|
+
const hasButtonText = isTextFilled(nextButton);
|
|
1184
1947
|
|
|
1185
1948
|
// Call to Action
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
isView
|
|
1190
|
-
current
|
|
1191
|
-
openWebView
|
|
1192
|
-
isPreview
|
|
1949
|
+
const hasHeader = isHeaderFilled(header);
|
|
1950
|
+
const hasFooter = isFooterFilled(footer);
|
|
1951
|
+
const footerProps = getFooterProps(footer, {
|
|
1952
|
+
isView,
|
|
1953
|
+
current,
|
|
1954
|
+
openWebView,
|
|
1955
|
+
isPreview
|
|
1193
1956
|
});
|
|
1194
|
-
|
|
1195
|
-
headerRef
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
footerRef
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
userAnswers = _useState2[0],
|
|
1207
|
-
setUserAnswers = _useState2[1];
|
|
1208
|
-
var initialQuestionIndex = 'intro';
|
|
1957
|
+
const {
|
|
1958
|
+
ref: headerRef,
|
|
1959
|
+
height: headerHeight = 0
|
|
1960
|
+
} = useDimensionObserver();
|
|
1961
|
+
const {
|
|
1962
|
+
ref: footerRef,
|
|
1963
|
+
height: callToActionHeight = 0
|
|
1964
|
+
} = useDimensionObserver();
|
|
1965
|
+
const showInstantAnswer = isStatic || isCapture;
|
|
1966
|
+
const hasIntro = title !== null || description !== null || isEdit || stateId === 'intro';
|
|
1967
|
+
const [userAnswers, setUserAnswers] = useState(null);
|
|
1968
|
+
let initialQuestionIndex = 'intro';
|
|
1209
1969
|
if (stateId !== null) {
|
|
1210
1970
|
initialQuestionIndex = stateId === 'questions' ? parseInt(stateIndex, 10) : stateId;
|
|
1211
1971
|
} else if (isPlaceholder || !hasIntro) {
|
|
1212
1972
|
initialQuestionIndex = 0;
|
|
1213
1973
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
questionIndex = _useState4[0],
|
|
1217
|
-
setQuestionIndex = _useState4[1];
|
|
1218
|
-
useEffect(function () {
|
|
1974
|
+
const [questionIndex, setQuestionIndex] = useState(initialQuestionIndex);
|
|
1975
|
+
useEffect(() => {
|
|
1219
1976
|
if (isPreview && hasIntro && questionIndex !== 'intro') {
|
|
1220
1977
|
setQuestionIndex('intro');
|
|
1221
1978
|
}
|
|
1222
1979
|
}, [isPreview, hasIntro, questionIndex, setQuestionIndex]);
|
|
1223
|
-
|
|
1224
|
-
setUserAnswers(
|
|
1225
|
-
|
|
1980
|
+
const onAnswerClick = useCallback((answer, answerIndex) => {
|
|
1981
|
+
setUserAnswers({
|
|
1982
|
+
...userAnswers,
|
|
1983
|
+
[questionIndex]: answerIndex
|
|
1984
|
+
});
|
|
1985
|
+
trackScreenEvent('click_answer', `Question #${questionIndex + 1} ${answerIndex + 1}: ${answer.label.body}`, {
|
|
1226
1986
|
linkType: 'quiz_answer',
|
|
1227
1987
|
question: questions[questionIndex],
|
|
1228
|
-
questionIndex
|
|
1229
|
-
answer
|
|
1230
|
-
answerIndex
|
|
1988
|
+
questionIndex,
|
|
1989
|
+
answer,
|
|
1990
|
+
answerIndex
|
|
1231
1991
|
});
|
|
1232
1992
|
}, [userAnswers, setUserAnswers, trackScreenEvent, questions, questionIndex]);
|
|
1233
|
-
|
|
1993
|
+
const onClickIntroButton = useCallback(() => {
|
|
1234
1994
|
setQuestionIndex(0);
|
|
1235
1995
|
}, [setQuestionIndex]);
|
|
1236
|
-
useEffect(
|
|
1996
|
+
useEffect(() => {
|
|
1237
1997
|
if (!current && isEdit && userAnswers !== null) {
|
|
1238
1998
|
setUserAnswers(null);
|
|
1239
1999
|
}
|
|
1240
2000
|
}, [isEdit, current, userAnswers, setUserAnswers]);
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
}) !== undefined : false;
|
|
1266
|
-
var goodAnswerIndex = answers !== null ? answers.findIndex(function (ans) {
|
|
1267
|
-
return ans !== null && ans.good === true;
|
|
1268
|
-
}) : null;
|
|
1269
|
-
var withoutGoodAnswer = goodAnswerIndex === null || goodAnswerIndex === -1;
|
|
1270
|
-
var questionResultHasText = isTextFilled(questionResult);
|
|
1271
|
-
var questionResultHasImage = isImageFilled(questionResultImage);
|
|
1272
|
-
var answerResultHasText = isTextFilled(answerResult);
|
|
1273
|
-
var hasResult = questionResultHasText || questionResultHasImage || answerResultHasText;
|
|
1274
|
-
var onNextSlide = useCallback(function () {
|
|
2001
|
+
const hasQuestions = questions !== null && questions.length > 0;
|
|
2002
|
+
const currentQuestion = hasQuestions ? questions[questionIndex] || {} : {};
|
|
2003
|
+
const {
|
|
2004
|
+
text = null,
|
|
2005
|
+
answers = [],
|
|
2006
|
+
background: questionBackground = null,
|
|
2007
|
+
layout: questionLayout = null,
|
|
2008
|
+
keypadLayout = null,
|
|
2009
|
+
result: questionResult = null,
|
|
2010
|
+
resultImage: questionResultImage = null
|
|
2011
|
+
} = currentQuestion || {};
|
|
2012
|
+
const currentAnsweredIndex = userAnswers !== null && typeof userAnswers[questionIndex] !== 'undefined' ? userAnswers[questionIndex] : null;
|
|
2013
|
+
const answer_0 = currentAnsweredIndex !== null && typeof answers[currentAnsweredIndex] !== 'undefined' ? answers[currentAnsweredIndex] : null;
|
|
2014
|
+
const {
|
|
2015
|
+
result: answerResult = null
|
|
2016
|
+
} = answer_0 || {};
|
|
2017
|
+
const hasTrueFalse = answers !== null ? (answers || []).find(ans => ans?.good === true || ans?.good === false) !== undefined : false;
|
|
2018
|
+
const goodAnswerIndex = answers !== null ? answers.findIndex(ans_0 => ans_0 !== null && ans_0.good === true) : null;
|
|
2019
|
+
const withoutGoodAnswer = goodAnswerIndex === null || goodAnswerIndex === -1;
|
|
2020
|
+
const questionResultHasText = isTextFilled(questionResult);
|
|
2021
|
+
const questionResultHasImage = isImageFilled(questionResultImage);
|
|
2022
|
+
const answerResultHasText = isTextFilled(answerResult);
|
|
2023
|
+
const hasResult = questionResultHasText || questionResultHasImage || answerResultHasText;
|
|
2024
|
+
const onNextSlide = useCallback(() => {
|
|
1275
2025
|
// console.log('onNextSlide', isEdit, isPreview);
|
|
1276
2026
|
if (isEdit || isPreview) {
|
|
1277
2027
|
return;
|
|
1278
2028
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
2029
|
+
const nextIndex = questionIndex + 1;
|
|
2030
|
+
const questionsCount = questions.length;
|
|
1281
2031
|
if (nextIndex < questionsCount) {
|
|
1282
2032
|
setQuestionIndex(nextIndex);
|
|
1283
2033
|
} else if (nextIndex === questionsCount) {
|
|
1284
2034
|
setQuestionIndex('results');
|
|
1285
2035
|
}
|
|
1286
2036
|
}, [questions, questionIndex, setQuestionIndex, isEdit, isPreview]);
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
var isQuestion = !isIntro && !isResults;
|
|
1302
|
-
var currentResult = useMemo(function () {
|
|
2037
|
+
const currentPoints = useMemo(() => userAnswers !== null ? Object.keys(userAnswers).reduce((totalPoints, answerQuestionIndex) => {
|
|
2038
|
+
const {
|
|
2039
|
+
answers: questionAnswers = []
|
|
2040
|
+
} = questions !== null ? questions[answerQuestionIndex] || {} : {};
|
|
2041
|
+
const answerIndex_0 = userAnswers[answerQuestionIndex];
|
|
2042
|
+
const {
|
|
2043
|
+
points = 0
|
|
2044
|
+
} = questionAnswers[answerIndex_0] || {};
|
|
2045
|
+
return points + totalPoints;
|
|
2046
|
+
}, 0) : 0, [userAnswers, questions]);
|
|
2047
|
+
const isIntro = hasIntro && questionIndex === 'intro';
|
|
2048
|
+
const isResults = questionIndex === 'results';
|
|
2049
|
+
const isQuestion = !isIntro && !isResults;
|
|
2050
|
+
const currentResult = useMemo(() => {
|
|
1303
2051
|
if (!isResults) {
|
|
1304
2052
|
return null;
|
|
1305
2053
|
}
|
|
1306
2054
|
if (stateId === 'results') {
|
|
1307
2055
|
return (results || [])[parseInt(stateIndex, 10)] || null;
|
|
1308
2056
|
}
|
|
1309
|
-
return (results || []).sort(
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
2057
|
+
return (results || []).sort(({
|
|
2058
|
+
points: pointsA = 0
|
|
2059
|
+
}, {
|
|
2060
|
+
points: pointsB = 0
|
|
2061
|
+
}) => {
|
|
1314
2062
|
if (pointsA === pointsB) {
|
|
1315
2063
|
return 0;
|
|
1316
2064
|
}
|
|
1317
2065
|
return pointsA > pointsB ? 1 : -1;
|
|
1318
|
-
}).reduce(
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
return currentPoints >= (lastPoints || 0) && currentPoints >=
|
|
2066
|
+
}).reduce((lastResult, result) => {
|
|
2067
|
+
const {
|
|
2068
|
+
points: lastPoints = 0
|
|
2069
|
+
} = lastResult || {};
|
|
2070
|
+
const {
|
|
2071
|
+
points: points_0 = 0
|
|
2072
|
+
} = result || {};
|
|
2073
|
+
return currentPoints >= (lastPoints || 0) && currentPoints >= points_0 ? result : lastResult;
|
|
1326
2074
|
}, null);
|
|
1327
2075
|
}, [isResults, results, currentPoints, stateId, stateIndex]);
|
|
1328
|
-
useEffect(
|
|
2076
|
+
useEffect(() => {
|
|
1329
2077
|
if (currentResult !== null && isResults) {
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
resultPoints: points || null,
|
|
2078
|
+
const {
|
|
2079
|
+
title: resultTitle = null,
|
|
2080
|
+
points: points_1 = null
|
|
2081
|
+
} = currentResult || {};
|
|
2082
|
+
trackScreenEvent('view_result', `Result: ${resultTitle?.body || 'No title'}`, {
|
|
2083
|
+
resultPoints: points_1 || null,
|
|
1337
2084
|
userPoints: currentPoints || null
|
|
1338
2085
|
});
|
|
1339
2086
|
}
|
|
1340
2087
|
}, [currentResult, currentPoints, isResults, trackScreenEvent]);
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
useEffect(
|
|
2088
|
+
const {
|
|
2089
|
+
background: resultBackground = null,
|
|
2090
|
+
layout: resultLayout = null
|
|
2091
|
+
} = currentResult || {};
|
|
2092
|
+
const {
|
|
2093
|
+
create: submitQuiz
|
|
2094
|
+
} = useQuizCreate({
|
|
2095
|
+
screenId
|
|
2096
|
+
});
|
|
2097
|
+
useEffect(() => {
|
|
1351
2098
|
if (!isResults || !isView) {
|
|
1352
2099
|
return;
|
|
1353
2100
|
}
|
|
1354
|
-
|
|
2101
|
+
const finalUserAnswers = isArray(userAnswers) ? JSON.stringify(userAnswers) : userAnswers;
|
|
1355
2102
|
submitQuiz({
|
|
1356
2103
|
choice: finalUserAnswers,
|
|
1357
2104
|
value: currentPoints
|
|
@@ -1359,7 +2106,7 @@ function QuizMultipleScreen(_ref) {
|
|
|
1359
2106
|
}, [isView, isResults, userAnswers, submitQuiz]);
|
|
1360
2107
|
|
|
1361
2108
|
// Switch state
|
|
1362
|
-
useEffect(
|
|
2109
|
+
useEffect(() => {
|
|
1363
2110
|
if (!isEdit && !isPreview) {
|
|
1364
2111
|
return;
|
|
1365
2112
|
}
|
|
@@ -1371,8 +2118,8 @@ function QuizMultipleScreen(_ref) {
|
|
|
1371
2118
|
setQuestionIndex('intro');
|
|
1372
2119
|
}
|
|
1373
2120
|
}, [stateId, stateIndex, isEdit, isPreview, setQuestionIndex]);
|
|
1374
|
-
|
|
1375
|
-
|
|
2121
|
+
let finalBackground = background;
|
|
2122
|
+
let backgroundKey = 'background';
|
|
1376
2123
|
if (isIntro && introBackground !== null) {
|
|
1377
2124
|
finalBackground = introBackground;
|
|
1378
2125
|
backgroundKey = 'results';
|
|
@@ -1381,22 +2128,24 @@ function QuizMultipleScreen(_ref) {
|
|
|
1381
2128
|
backgroundKey = 'results';
|
|
1382
2129
|
} else if (isQuestion && questionBackground !== null) {
|
|
1383
2130
|
finalBackground = questionBackground;
|
|
1384
|
-
backgroundKey =
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
mediaRef
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
2131
|
+
backgroundKey = `question_${questionIndex}`;
|
|
2132
|
+
}
|
|
2133
|
+
const {
|
|
2134
|
+
ref: mediaRef,
|
|
2135
|
+
isCurrent: isCurrentMedia = false
|
|
2136
|
+
} = usePlaybackMediaRef(current, finalBackground !== null, backgroundKey);
|
|
2137
|
+
const backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
2138
|
+
const backgroundShouldLoad = current || active;
|
|
1392
2139
|
|
|
1393
2140
|
// Transition direction
|
|
1394
|
-
|
|
1395
|
-
|
|
2141
|
+
const lastQuestionIndexRef = useRef(questionIndex);
|
|
2142
|
+
const direction = useMemo(() => {
|
|
1396
2143
|
if (questionIndex === lastQuestionIndexRef.current) {
|
|
1397
2144
|
return null;
|
|
1398
2145
|
}
|
|
1399
|
-
|
|
2146
|
+
const {
|
|
2147
|
+
current: lastQuestionIndex
|
|
2148
|
+
} = lastQuestionIndexRef;
|
|
1400
2149
|
lastQuestionIndexRef.current = questionIndex;
|
|
1401
2150
|
if (questionIndex === 'intro' || lastQuestionIndex === 'results' || lastQuestionIndex > questionIndex) {
|
|
1402
2151
|
return 'left';
|
|
@@ -1404,43 +2153,37 @@ function QuizMultipleScreen(_ref) {
|
|
|
1404
2153
|
lastQuestionIndexRef.current = questionIndex;
|
|
1405
2154
|
return 'right';
|
|
1406
2155
|
}, [questionIndex]);
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
var onScrolledBottom = useCallback(function (_ref12) {
|
|
1413
|
-
var initial = _ref12.initial;
|
|
2156
|
+
const scrollingDisabled = !isEdit && transitionDisabled || !current || isIntro;
|
|
2157
|
+
const [scrolledBottom, setScrolledBottom] = useState(false);
|
|
2158
|
+
const onScrolledBottom = useCallback(({
|
|
2159
|
+
initial
|
|
2160
|
+
}) => {
|
|
1414
2161
|
if (initial) {
|
|
1415
2162
|
trackScreenEvent('scroll', 'Screen');
|
|
1416
2163
|
}
|
|
1417
2164
|
setScrolledBottom(true);
|
|
1418
2165
|
}, [trackScreenEvent]);
|
|
1419
|
-
|
|
2166
|
+
const onScrolledNotBottom = useCallback(() => {
|
|
1420
2167
|
setScrolledBottom(false);
|
|
1421
2168
|
}, [setScrolledBottom]);
|
|
1422
|
-
|
|
1423
|
-
var trigger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
2169
|
+
const onScrolledTrigger = useCallback((trigger = null) => {
|
|
1424
2170
|
if (trigger !== null) {
|
|
1425
|
-
|
|
2171
|
+
const scrollPercent = Math.round(trigger * 100);
|
|
1426
2172
|
trackScreenEvent('scroll', scrollPercent, {
|
|
1427
|
-
scrollPercent
|
|
2173
|
+
scrollPercent
|
|
1428
2174
|
});
|
|
1429
2175
|
}
|
|
1430
2176
|
}, [trackScreenEvent]);
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
var onScrollHeightChange = useCallback(function (_ref13) {
|
|
1436
|
-
var _ref13$canScroll = _ref13.canScroll,
|
|
1437
|
-
canScroll = _ref13$canScroll === void 0 ? false : _ref13$canScroll;
|
|
2177
|
+
const [hasScroll, setHasScroll] = useState(false);
|
|
2178
|
+
const onScrollHeightChange = useCallback(({
|
|
2179
|
+
canScroll = false
|
|
2180
|
+
}) => {
|
|
1438
2181
|
setHasScroll(canScroll);
|
|
1439
2182
|
}, [setHasScroll]);
|
|
1440
|
-
|
|
2183
|
+
const onQuizReset = useCallback(() => {
|
|
1441
2184
|
setUserAnswers(null);
|
|
1442
2185
|
}, [setUserAnswers]);
|
|
1443
|
-
|
|
2186
|
+
let verticalAlign = layout;
|
|
1444
2187
|
if (isIntro && introLayout !== null) {
|
|
1445
2188
|
verticalAlign = introLayout;
|
|
1446
2189
|
} else if (isQuestion && questionLayout !== null) {
|
|
@@ -1448,11 +2191,11 @@ function QuizMultipleScreen(_ref) {
|
|
|
1448
2191
|
} else if (isResults && resultLayout !== null) {
|
|
1449
2192
|
verticalAlign = questionLayout;
|
|
1450
2193
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
2194
|
+
const showPoints = isEdit;
|
|
2195
|
+
const showReset = isEdit && currentAnsweredIndex !== null;
|
|
1453
2196
|
|
|
1454
2197
|
// Content transition items (captured for leaving animations)
|
|
1455
|
-
|
|
2198
|
+
const contentItems = [];
|
|
1456
2199
|
if (isIntro) {
|
|
1457
2200
|
contentItems.push({
|
|
1458
2201
|
key: 'intro',
|
|
@@ -1480,7 +2223,7 @@ function QuizMultipleScreen(_ref) {
|
|
|
1480
2223
|
}
|
|
1481
2224
|
if (isQuestion) {
|
|
1482
2225
|
contentItems.push({
|
|
1483
|
-
key:
|
|
2226
|
+
key: `question-${questionIndex}`,
|
|
1484
2227
|
element: /*#__PURE__*/jsx(Question, {
|
|
1485
2228
|
index: questionIndex,
|
|
1486
2229
|
totalCount: (questions || []).length,
|
|
@@ -1539,16 +2282,14 @@ function QuizMultipleScreen(_ref) {
|
|
|
1539
2282
|
buttonStyle: nextButton !== null ? nextButton.buttonStyle : null,
|
|
1540
2283
|
className: styles$2.nextButton,
|
|
1541
2284
|
onClick: onNextSlide,
|
|
1542
|
-
children: hasButtonText ? /*#__PURE__*/jsx(Text,
|
|
2285
|
+
children: hasButtonText ? /*#__PURE__*/jsx(Text, {
|
|
2286
|
+
...nextButton,
|
|
1543
2287
|
className: styles$2.label
|
|
1544
|
-
})
|
|
2288
|
+
}) : /*#__PURE__*/jsx("span", {
|
|
1545
2289
|
className: styles$2.label,
|
|
1546
2290
|
children: /*#__PURE__*/jsx(FormattedMessage, {
|
|
1547
2291
|
id: "SVLGTA",
|
|
1548
|
-
defaultMessage:
|
|
1549
|
-
"type": 0,
|
|
1550
|
-
"value": "Next"
|
|
1551
|
-
}]
|
|
2292
|
+
defaultMessage: "Next"
|
|
1552
2293
|
})
|
|
1553
2294
|
})
|
|
1554
2295
|
})
|
|
@@ -1558,7 +2299,8 @@ function QuizMultipleScreen(_ref) {
|
|
|
1558
2299
|
if (isResults) {
|
|
1559
2300
|
contentItems.push({
|
|
1560
2301
|
key: 'results',
|
|
1561
|
-
element: /*#__PURE__*/jsx(Results,
|
|
2302
|
+
element: /*#__PURE__*/jsx(Results, {
|
|
2303
|
+
...currentResult,
|
|
1562
2304
|
resultsHeadingStyle: resultsHeadingStyle,
|
|
1563
2305
|
resultsTextStyle: resultsTextStyle,
|
|
1564
2306
|
layout: resultLayout || layout,
|
|
@@ -1573,51 +2315,39 @@ function QuizMultipleScreen(_ref) {
|
|
|
1573
2315
|
paddingTop: (current && !isPreview ? viewerTopHeight : 0) + (headerHeight || spacing),
|
|
1574
2316
|
paddingBottom: (current && !isPreview ? viewerBottomHeight : 0) + (callToActionHeight || spacing)
|
|
1575
2317
|
} : null
|
|
1576
|
-
})
|
|
2318
|
+
})
|
|
1577
2319
|
});
|
|
1578
2320
|
}
|
|
1579
|
-
|
|
1580
|
-
keys:
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
transform: 'translateX(0%)'
|
|
1586
|
-
} : {
|
|
1587
|
-
transform: direction === 'left' ? 'translateX(-100%)' : 'translateX(100%)'
|
|
1588
|
-
};
|
|
2321
|
+
const contentTransitions = useTransition(contentItems, {
|
|
2322
|
+
keys: item => item.key,
|
|
2323
|
+
from: item_0 => item_0.key === 'next' ? {
|
|
2324
|
+
transform: 'translateX(0%)'
|
|
2325
|
+
} : {
|
|
2326
|
+
transform: direction === 'left' ? 'translateX(-100%)' : 'translateX(100%)'
|
|
1589
2327
|
},
|
|
1590
2328
|
enter: {
|
|
1591
2329
|
transform: 'translateX(0%)'
|
|
1592
2330
|
},
|
|
1593
|
-
leave:
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
transform: direction === 'left' ? 'translateX(100%)' : 'translateX(-100%)'
|
|
1598
|
-
};
|
|
2331
|
+
leave: item_1 => item_1.key === 'next' ? {
|
|
2332
|
+
transform: 'translateX(0%)'
|
|
2333
|
+
} : {
|
|
2334
|
+
transform: direction === 'left' ? 'translateX(100%)' : 'translateX(-100%)'
|
|
1599
2335
|
},
|
|
1600
|
-
config:
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
easing: easings.easeInOutSine
|
|
1606
|
-
};
|
|
2336
|
+
config: item_2 => item_2.key === 'next' ? {
|
|
2337
|
+
duration: 0
|
|
2338
|
+
} : {
|
|
2339
|
+
duration: 1000,
|
|
2340
|
+
easing: easings.easeInOutSine
|
|
1607
2341
|
}
|
|
1608
2342
|
});
|
|
1609
2343
|
|
|
1610
2344
|
// Background transition
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
var bgTransitions = useTransition(bgItem, {
|
|
1618
|
-
keys: function keys(item) {
|
|
1619
|
-
return item.key;
|
|
1620
|
-
},
|
|
2345
|
+
const bgItem = useMemo(() => ({
|
|
2346
|
+
key: backgroundKey,
|
|
2347
|
+
background: finalBackground || null
|
|
2348
|
+
}), [backgroundKey, finalBackground]);
|
|
2349
|
+
const bgTransitions = useTransition(bgItem, {
|
|
2350
|
+
keys: item_3 => item_3.key,
|
|
1621
2351
|
from: {
|
|
1622
2352
|
opacity: 0
|
|
1623
2353
|
},
|
|
@@ -1641,12 +2371,9 @@ function QuizMultipleScreen(_ref) {
|
|
|
1641
2371
|
className: styles$2.content,
|
|
1642
2372
|
children: [showPoints && currentPoints !== null && currentPoints > 0 ? /*#__PURE__*/jsxs("div", {
|
|
1643
2373
|
className: styles$2.points,
|
|
1644
|
-
children: [
|
|
2374
|
+
children: [`${currentPoints} `, /*#__PURE__*/jsx(FormattedMessage, {
|
|
1645
2375
|
id: "Xr1v8l",
|
|
1646
|
-
defaultMessage:
|
|
1647
|
-
"type": 0,
|
|
1648
|
-
"value": "points gained"
|
|
1649
|
-
}]
|
|
2376
|
+
defaultMessage: "points gained"
|
|
1650
2377
|
})]
|
|
1651
2378
|
}) : null, showReset ? /*#__PURE__*/jsx(Button$1, {
|
|
1652
2379
|
className: styles$2.reset,
|
|
@@ -1656,16 +2383,20 @@ function QuizMultipleScreen(_ref) {
|
|
|
1656
2383
|
}),
|
|
1657
2384
|
onClick: onQuizReset
|
|
1658
2385
|
}) : null, !isPlaceholder && hasHeader ? /*#__PURE__*/jsx("div", {
|
|
1659
|
-
className: classNames([styles$2.header,
|
|
2386
|
+
className: classNames([styles$2.header, {
|
|
2387
|
+
[styles$2.disabled]: scrolledBottom && !scrollingDisabled && hasScroll
|
|
2388
|
+
}]),
|
|
1660
2389
|
ref: headerRef,
|
|
1661
2390
|
style: {
|
|
1662
2391
|
paddingTop: spacing / 2,
|
|
1663
2392
|
paddingLeft: spacing,
|
|
1664
2393
|
paddingRight: spacing,
|
|
1665
2394
|
paddingBottom: spacing,
|
|
1666
|
-
transform: !isPreview ?
|
|
2395
|
+
transform: !isPreview ? `translate(0, ${viewerTopHeight}px)` : null
|
|
1667
2396
|
},
|
|
1668
|
-
children: /*#__PURE__*/jsx(Header,
|
|
2397
|
+
children: /*#__PURE__*/jsx(Header, {
|
|
2398
|
+
...header
|
|
2399
|
+
})
|
|
1669
2400
|
}) : null, /*#__PURE__*/jsx(Scroll, {
|
|
1670
2401
|
verticalAlign: verticalAlign,
|
|
1671
2402
|
disabled: scrollingDisabled,
|
|
@@ -1679,66 +2410,70 @@ function QuizMultipleScreen(_ref) {
|
|
|
1679
2410
|
position: 'absolute',
|
|
1680
2411
|
inset: '0'
|
|
1681
2412
|
},
|
|
1682
|
-
children: contentTransitions(
|
|
1683
|
-
|
|
1684
|
-
return ci.key === item.key;
|
|
1685
|
-
});
|
|
2413
|
+
children: contentTransitions((springStyle, item_4) => {
|
|
2414
|
+
const isActive = contentItems.some(ci => ci.key === item_4.key);
|
|
1686
2415
|
return /*#__PURE__*/jsx(animated.div, {
|
|
1687
|
-
style:
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
2416
|
+
style: {
|
|
2417
|
+
...springStyle,
|
|
2418
|
+
...(!isActive ? {
|
|
2419
|
+
position: 'absolute',
|
|
2420
|
+
top: 0,
|
|
2421
|
+
left: 0,
|
|
2422
|
+
width: '100%',
|
|
2423
|
+
minHeight: '100%',
|
|
2424
|
+
zIndex: 0
|
|
2425
|
+
} : {
|
|
2426
|
+
position: 'relative',
|
|
2427
|
+
zIndex: 1,
|
|
2428
|
+
top: 0,
|
|
2429
|
+
left: 0,
|
|
2430
|
+
width: '100%',
|
|
2431
|
+
minHeight: hasResult && currentAnsweredIndex !== null ? 0 : '100%'
|
|
2432
|
+
})
|
|
2433
|
+
},
|
|
2434
|
+
children: item_4.element
|
|
1703
2435
|
});
|
|
1704
2436
|
})
|
|
1705
2437
|
})
|
|
1706
2438
|
}), !isPlaceholder && hasFooter ? /*#__PURE__*/jsx("div", {
|
|
1707
2439
|
ref: footerRef,
|
|
1708
|
-
className: classNames([styles$2.footer,
|
|
2440
|
+
className: classNames([styles$2.footer, {
|
|
2441
|
+
[styles$2.disabled]: !scrolledBottom
|
|
2442
|
+
}]),
|
|
1709
2443
|
style: {
|
|
1710
2444
|
paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
1711
2445
|
paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
1712
2446
|
paddingTop: spacing / 2,
|
|
1713
2447
|
paddingBottom: spacing / 2,
|
|
1714
|
-
transform: !isPreview ?
|
|
2448
|
+
transform: !isPreview ? `translate(0, -${viewerBottomHeight}px)` : null
|
|
1715
2449
|
},
|
|
1716
|
-
children: /*#__PURE__*/jsx(Footer,
|
|
1717
|
-
|
|
1718
|
-
}), !isPlaceholder ? bgTransitions(function (springStyle, item) {
|
|
1719
|
-
return /*#__PURE__*/jsx(animated.div, {
|
|
1720
|
-
style: _objectSpread(_objectSpread({}, springStyle), {}, {
|
|
1721
|
-
position: 'absolute',
|
|
1722
|
-
top: 0,
|
|
1723
|
-
left: 0,
|
|
1724
|
-
width: '100%',
|
|
1725
|
-
height: '100%',
|
|
1726
|
-
zIndex: item.key === bgItem.key ? 1 : 0
|
|
1727
|
-
}),
|
|
1728
|
-
children: /*#__PURE__*/jsx(Background, {
|
|
1729
|
-
background: item.background,
|
|
1730
|
-
width: width,
|
|
1731
|
-
height: height,
|
|
1732
|
-
resolution: resolution,
|
|
1733
|
-
playing: item.key === bgItem.key && backgroundPlaying,
|
|
1734
|
-
muted: muted,
|
|
1735
|
-
shouldLoad: backgroundShouldLoad,
|
|
1736
|
-
mediaRef: item.key === bgItem.key ? mergeRefs(mediaRef, customMediaRef) : null,
|
|
1737
|
-
className: styles$2.background,
|
|
1738
|
-
withoutVideo: isPreview
|
|
2450
|
+
children: /*#__PURE__*/jsx(Footer, {
|
|
2451
|
+
...footerProps
|
|
1739
2452
|
})
|
|
1740
|
-
})
|
|
1741
|
-
})
|
|
2453
|
+
}) : null]
|
|
2454
|
+
}), !isPlaceholder ? bgTransitions((springStyle_0, item_5) => /*#__PURE__*/jsx(animated.div, {
|
|
2455
|
+
style: {
|
|
2456
|
+
...springStyle_0,
|
|
2457
|
+
position: 'absolute',
|
|
2458
|
+
top: 0,
|
|
2459
|
+
left: 0,
|
|
2460
|
+
width: '100%',
|
|
2461
|
+
height: '100%',
|
|
2462
|
+
zIndex: item_5.key === bgItem.key ? 1 : 0
|
|
2463
|
+
},
|
|
2464
|
+
children: /*#__PURE__*/jsx(Background, {
|
|
2465
|
+
background: item_5.background,
|
|
2466
|
+
width: width,
|
|
2467
|
+
height: height,
|
|
2468
|
+
resolution: resolution,
|
|
2469
|
+
playing: item_5.key === bgItem.key && backgroundPlaying,
|
|
2470
|
+
muted: muted,
|
|
2471
|
+
shouldLoad: backgroundShouldLoad,
|
|
2472
|
+
mediaRef: item_5.key === bgItem.key ? mergeRefs(mediaRef, customMediaRef) : null,
|
|
2473
|
+
className: styles$2.background,
|
|
2474
|
+
withoutVideo: isPreview
|
|
2475
|
+
})
|
|
2476
|
+
})) : null]
|
|
1742
2477
|
});
|
|
1743
2478
|
}
|
|
1744
2479
|
|
|
@@ -1748,19 +2483,13 @@ var definition = [{
|
|
|
1748
2483
|
group: {
|
|
1749
2484
|
label: defineMessage({
|
|
1750
2485
|
id: "ZiWlL6",
|
|
1751
|
-
defaultMessage:
|
|
1752
|
-
"type": 0,
|
|
1753
|
-
"value": "Questions"
|
|
1754
|
-
}]
|
|
2486
|
+
defaultMessage: "Questions"
|
|
1755
2487
|
}),
|
|
1756
2488
|
order: 7
|
|
1757
2489
|
},
|
|
1758
2490
|
title: defineMessage({
|
|
1759
2491
|
id: "zW7IVm",
|
|
1760
|
-
defaultMessage:
|
|
1761
|
-
"type": 0,
|
|
1762
|
-
"value": "Quiz"
|
|
1763
|
-
}]
|
|
2492
|
+
defaultMessage: "Quiz"
|
|
1764
2493
|
}),
|
|
1765
2494
|
component: QuizScreen,
|
|
1766
2495
|
layouts: ['top', 'middle', 'bottom', 'split'],
|
|
@@ -1782,10 +2511,7 @@ var definition = [{
|
|
|
1782
2511
|
},
|
|
1783
2512
|
label: defineMessage({
|
|
1784
2513
|
id: "hVE7TA",
|
|
1785
|
-
defaultMessage:
|
|
1786
|
-
"type": 0,
|
|
1787
|
-
"value": "Question"
|
|
1788
|
-
}]
|
|
2514
|
+
defaultMessage: "Question"
|
|
1789
2515
|
})
|
|
1790
2516
|
}, {
|
|
1791
2517
|
name: 'answers',
|
|
@@ -1797,10 +2523,7 @@ var definition = [{
|
|
|
1797
2523
|
},
|
|
1798
2524
|
label: defineMessage({
|
|
1799
2525
|
id: "KHWeV7",
|
|
1800
|
-
defaultMessage:
|
|
1801
|
-
"type": 0,
|
|
1802
|
-
"value": "Answers"
|
|
1803
|
-
}]
|
|
2526
|
+
defaultMessage: "Answers"
|
|
1804
2527
|
})
|
|
1805
2528
|
}, {
|
|
1806
2529
|
name: 'keypadLayout',
|
|
@@ -1815,20 +2538,14 @@ var definition = [{
|
|
|
1815
2538
|
},
|
|
1816
2539
|
label: defineMessage({
|
|
1817
2540
|
id: "FjuRaw",
|
|
1818
|
-
defaultMessage:
|
|
1819
|
-
"type": 0,
|
|
1820
|
-
"value": "Keypad settings"
|
|
1821
|
-
}]
|
|
2541
|
+
defaultMessage: "Keypad settings"
|
|
1822
2542
|
})
|
|
1823
2543
|
}, {
|
|
1824
2544
|
name: 'withoutTrueFalse',
|
|
1825
2545
|
type: 'toggle',
|
|
1826
2546
|
label: defineMessage({
|
|
1827
2547
|
id: "LFziCV",
|
|
1828
|
-
defaultMessage:
|
|
1829
|
-
"type": 0,
|
|
1830
|
-
"value": "Without right/wrong icon"
|
|
1831
|
-
}]
|
|
2548
|
+
defaultMessage: "Without right/wrong icon"
|
|
1832
2549
|
})
|
|
1833
2550
|
}, {
|
|
1834
2551
|
name: 'result',
|
|
@@ -1838,110 +2555,77 @@ var definition = [{
|
|
|
1838
2555
|
},
|
|
1839
2556
|
label: defineMessage({
|
|
1840
2557
|
id: "iQ5Uf7",
|
|
1841
|
-
defaultMessage:
|
|
1842
|
-
"type": 0,
|
|
1843
|
-
"value": "Default feedback"
|
|
1844
|
-
}]
|
|
2558
|
+
defaultMessage: "Default feedback"
|
|
1845
2559
|
})
|
|
1846
2560
|
}, {
|
|
1847
2561
|
name: 'resultImage',
|
|
1848
2562
|
type: 'visual',
|
|
1849
2563
|
label: defineMessage({
|
|
1850
2564
|
id: "yA4B6h",
|
|
1851
|
-
defaultMessage:
|
|
1852
|
-
"type": 0,
|
|
1853
|
-
"value": "Result feedback image"
|
|
1854
|
-
}]
|
|
2565
|
+
defaultMessage: "Result feedback image"
|
|
1855
2566
|
})
|
|
1856
2567
|
}, {
|
|
1857
2568
|
type: 'fields',
|
|
1858
2569
|
isList: true,
|
|
1859
2570
|
label: defineMessage({
|
|
1860
2571
|
id: "R9DB4a",
|
|
1861
|
-
defaultMessage:
|
|
1862
|
-
"type": 0,
|
|
1863
|
-
"value": "Styles"
|
|
1864
|
-
}]
|
|
2572
|
+
defaultMessage: "Styles"
|
|
1865
2573
|
}),
|
|
1866
2574
|
fields: [{
|
|
1867
2575
|
name: 'buttonsLayout',
|
|
1868
2576
|
type: 'button-layout',
|
|
1869
2577
|
label: defineMessage({
|
|
1870
2578
|
id: "8Dmlwh",
|
|
1871
|
-
defaultMessage:
|
|
1872
|
-
"type": 0,
|
|
1873
|
-
"value": "Answer button layout"
|
|
1874
|
-
}]
|
|
2579
|
+
defaultMessage: "Answer button layout"
|
|
1875
2580
|
})
|
|
1876
2581
|
}, {
|
|
1877
2582
|
name: 'buttonsTextStyle',
|
|
1878
2583
|
type: 'text-style-form',
|
|
1879
2584
|
label: defineMessage({
|
|
1880
2585
|
id: "gwPu/I",
|
|
1881
|
-
defaultMessage:
|
|
1882
|
-
"type": 0,
|
|
1883
|
-
"value": "Buttons text"
|
|
1884
|
-
}]
|
|
2586
|
+
defaultMessage: "Buttons text"
|
|
1885
2587
|
})
|
|
1886
2588
|
}, {
|
|
1887
2589
|
name: 'buttonsStyle',
|
|
1888
2590
|
type: 'box-style-form',
|
|
1889
2591
|
label: defineMessage({
|
|
1890
2592
|
id: "l5uLMd",
|
|
1891
|
-
defaultMessage:
|
|
1892
|
-
"type": 0,
|
|
1893
|
-
"value": "Buttons"
|
|
1894
|
-
}]
|
|
2593
|
+
defaultMessage: "Buttons"
|
|
1895
2594
|
})
|
|
1896
2595
|
}, {
|
|
1897
2596
|
name: 'inactiveButtonsTextStyle',
|
|
1898
2597
|
type: 'text-style-form',
|
|
1899
2598
|
label: defineMessage({
|
|
1900
2599
|
id: "my7Kox",
|
|
1901
|
-
defaultMessage:
|
|
1902
|
-
"type": 0,
|
|
1903
|
-
"value": "Inactive buttons text"
|
|
1904
|
-
}]
|
|
2600
|
+
defaultMessage: "Inactive buttons text"
|
|
1905
2601
|
})
|
|
1906
2602
|
}, {
|
|
1907
2603
|
name: 'inactiveButtonsStyle',
|
|
1908
2604
|
type: 'box-style-form',
|
|
1909
2605
|
label: defineMessage({
|
|
1910
2606
|
id: "xlFOg3",
|
|
1911
|
-
defaultMessage:
|
|
1912
|
-
"type": 0,
|
|
1913
|
-
"value": "Inactive buttons"
|
|
1914
|
-
}]
|
|
2607
|
+
defaultMessage: "Inactive buttons"
|
|
1915
2608
|
})
|
|
1916
2609
|
}, {
|
|
1917
2610
|
name: 'feedbackTextStyle',
|
|
1918
2611
|
type: 'text-style-form',
|
|
1919
2612
|
label: defineMessage({
|
|
1920
2613
|
id: "4w7K2K",
|
|
1921
|
-
defaultMessage:
|
|
1922
|
-
"type": 0,
|
|
1923
|
-
"value": "Feedback text"
|
|
1924
|
-
}]
|
|
2614
|
+
defaultMessage: "Feedback text"
|
|
1925
2615
|
})
|
|
1926
2616
|
}, {
|
|
1927
2617
|
name: 'goodAnswerColor',
|
|
1928
2618
|
type: 'color',
|
|
1929
2619
|
label: defineMessage({
|
|
1930
2620
|
id: "hZcXoa",
|
|
1931
|
-
defaultMessage:
|
|
1932
|
-
"type": 0,
|
|
1933
|
-
"value": "Good answer icon color"
|
|
1934
|
-
}]
|
|
2621
|
+
defaultMessage: "Good answer icon color"
|
|
1935
2622
|
})
|
|
1936
2623
|
}, {
|
|
1937
2624
|
name: 'badAnswerColor',
|
|
1938
2625
|
type: 'color',
|
|
1939
2626
|
label: defineMessage({
|
|
1940
2627
|
id: "NbTtNk",
|
|
1941
|
-
defaultMessage:
|
|
1942
|
-
"type": 0,
|
|
1943
|
-
"value": "Bad answer icon color"
|
|
1944
|
-
}]
|
|
2628
|
+
defaultMessage: "Bad answer icon color"
|
|
1945
2629
|
})
|
|
1946
2630
|
}]
|
|
1947
2631
|
}, {
|
|
@@ -1949,20 +2633,14 @@ var definition = [{
|
|
|
1949
2633
|
type: 'background',
|
|
1950
2634
|
label: defineMessage({
|
|
1951
2635
|
id: "+MPZRu",
|
|
1952
|
-
defaultMessage:
|
|
1953
|
-
"type": 0,
|
|
1954
|
-
"value": "Background"
|
|
1955
|
-
}]
|
|
2636
|
+
defaultMessage: "Background"
|
|
1956
2637
|
})
|
|
1957
2638
|
}, {
|
|
1958
2639
|
name: 'header',
|
|
1959
2640
|
type: 'header',
|
|
1960
2641
|
label: defineMessage({
|
|
1961
2642
|
id: "rhuDxI",
|
|
1962
|
-
defaultMessage:
|
|
1963
|
-
"type": 0,
|
|
1964
|
-
"value": "Header"
|
|
1965
|
-
}]
|
|
2643
|
+
defaultMessage: "Header"
|
|
1966
2644
|
}),
|
|
1967
2645
|
theme: {
|
|
1968
2646
|
badge: {
|
|
@@ -1977,10 +2655,7 @@ var definition = [{
|
|
|
1977
2655
|
type: 'footer',
|
|
1978
2656
|
label: defineMessage({
|
|
1979
2657
|
id: "g4nybp",
|
|
1980
|
-
defaultMessage:
|
|
1981
|
-
"type": 0,
|
|
1982
|
-
"value": "Footer"
|
|
1983
|
-
}]
|
|
2658
|
+
defaultMessage: "Footer"
|
|
1984
2659
|
}),
|
|
1985
2660
|
theme: {
|
|
1986
2661
|
callToAction: {
|
|
@@ -1997,19 +2672,13 @@ var definition = [{
|
|
|
1997
2672
|
group: {
|
|
1998
2673
|
label: defineMessage({
|
|
1999
2674
|
id: "ZiWlL6",
|
|
2000
|
-
defaultMessage:
|
|
2001
|
-
"type": 0,
|
|
2002
|
-
"value": "Questions"
|
|
2003
|
-
}]
|
|
2675
|
+
defaultMessage: "Questions"
|
|
2004
2676
|
}),
|
|
2005
2677
|
order: 7
|
|
2006
2678
|
},
|
|
2007
2679
|
title: defineMessage({
|
|
2008
2680
|
id: "ACkeH6",
|
|
2009
|
-
defaultMessage:
|
|
2010
|
-
"type": 0,
|
|
2011
|
-
"value": "Quiz with multiple questions"
|
|
2012
|
-
}]
|
|
2681
|
+
defaultMessage: "Quiz with multiple questions"
|
|
2013
2682
|
}),
|
|
2014
2683
|
component: QuizMultipleScreen,
|
|
2015
2684
|
layouts: ['top', 'middle', 'bottom', 'split'],
|
|
@@ -2017,10 +2686,7 @@ var definition = [{
|
|
|
2017
2686
|
id: 'intro',
|
|
2018
2687
|
label: defineMessage({
|
|
2019
2688
|
id: "BgrRxZ",
|
|
2020
|
-
defaultMessage:
|
|
2021
|
-
"type": 0,
|
|
2022
|
-
"value": "Intro"
|
|
2023
|
-
}]
|
|
2689
|
+
defaultMessage: "Intro"
|
|
2024
2690
|
}),
|
|
2025
2691
|
fields: [{
|
|
2026
2692
|
name: 'introLayout',
|
|
@@ -2029,10 +2695,7 @@ var definition = [{
|
|
|
2029
2695
|
screenState: 'intro',
|
|
2030
2696
|
label: defineMessage({
|
|
2031
2697
|
id: "4iBXj2",
|
|
2032
|
-
defaultMessage:
|
|
2033
|
-
"type": 0,
|
|
2034
|
-
"value": "Layout"
|
|
2035
|
-
}]
|
|
2698
|
+
defaultMessage: "Layout"
|
|
2036
2699
|
})
|
|
2037
2700
|
}, {
|
|
2038
2701
|
name: 'title',
|
|
@@ -2042,10 +2705,7 @@ var definition = [{
|
|
|
2042
2705
|
},
|
|
2043
2706
|
label: defineMessage({
|
|
2044
2707
|
id: "+AEVbJ",
|
|
2045
|
-
defaultMessage:
|
|
2046
|
-
"type": 0,
|
|
2047
|
-
"value": "Title"
|
|
2048
|
-
}]
|
|
2708
|
+
defaultMessage: "Title"
|
|
2049
2709
|
})
|
|
2050
2710
|
}, {
|
|
2051
2711
|
name: 'description',
|
|
@@ -2055,10 +2715,7 @@ var definition = [{
|
|
|
2055
2715
|
},
|
|
2056
2716
|
label: defineMessage({
|
|
2057
2717
|
id: "ZCe0r4",
|
|
2058
|
-
defaultMessage:
|
|
2059
|
-
"type": 0,
|
|
2060
|
-
"value": "Description"
|
|
2061
|
-
}]
|
|
2718
|
+
defaultMessage: "Description"
|
|
2062
2719
|
})
|
|
2063
2720
|
}, {
|
|
2064
2721
|
name: 'introButton',
|
|
@@ -2068,30 +2725,21 @@ var definition = [{
|
|
|
2068
2725
|
},
|
|
2069
2726
|
label: defineMessage({
|
|
2070
2727
|
id: "i6bmbD",
|
|
2071
|
-
defaultMessage:
|
|
2072
|
-
"type": 0,
|
|
2073
|
-
"value": "Button"
|
|
2074
|
-
}]
|
|
2728
|
+
defaultMessage: "Button"
|
|
2075
2729
|
})
|
|
2076
2730
|
}, {
|
|
2077
2731
|
name: 'introBackground',
|
|
2078
2732
|
type: 'background',
|
|
2079
2733
|
label: defineMessage({
|
|
2080
2734
|
id: "cDj1mZ",
|
|
2081
|
-
defaultMessage:
|
|
2082
|
-
"type": 0,
|
|
2083
|
-
"value": "Background"
|
|
2084
|
-
}]
|
|
2735
|
+
defaultMessage: "Background"
|
|
2085
2736
|
})
|
|
2086
2737
|
}]
|
|
2087
2738
|
}, {
|
|
2088
2739
|
id: 'questions',
|
|
2089
2740
|
label: defineMessage({
|
|
2090
2741
|
id: "VMd1oG",
|
|
2091
|
-
defaultMessage:
|
|
2092
|
-
"type": 0,
|
|
2093
|
-
"value": "Questions"
|
|
2094
|
-
}]
|
|
2742
|
+
defaultMessage: "Questions"
|
|
2095
2743
|
}),
|
|
2096
2744
|
repeatable: true,
|
|
2097
2745
|
fieldName: 'questions',
|
|
@@ -2103,10 +2751,7 @@ var definition = [{
|
|
|
2103
2751
|
},
|
|
2104
2752
|
label: defineMessage({
|
|
2105
2753
|
id: "hVE7TA",
|
|
2106
|
-
defaultMessage:
|
|
2107
|
-
"type": 0,
|
|
2108
|
-
"value": "Question"
|
|
2109
|
-
}]
|
|
2754
|
+
defaultMessage: "Question"
|
|
2110
2755
|
})
|
|
2111
2756
|
}, {
|
|
2112
2757
|
name: 'answers',
|
|
@@ -2118,10 +2763,7 @@ var definition = [{
|
|
|
2118
2763
|
},
|
|
2119
2764
|
label: defineMessage({
|
|
2120
2765
|
id: "KHWeV7",
|
|
2121
|
-
defaultMessage:
|
|
2122
|
-
"type": 0,
|
|
2123
|
-
"value": "Answers"
|
|
2124
|
-
}]
|
|
2766
|
+
defaultMessage: "Answers"
|
|
2125
2767
|
})
|
|
2126
2768
|
}, {
|
|
2127
2769
|
name: 'keypadLayout',
|
|
@@ -2136,10 +2778,7 @@ var definition = [{
|
|
|
2136
2778
|
},
|
|
2137
2779
|
label: defineMessage({
|
|
2138
2780
|
id: "FjuRaw",
|
|
2139
|
-
defaultMessage:
|
|
2140
|
-
"type": 0,
|
|
2141
|
-
"value": "Keypad settings"
|
|
2142
|
-
}]
|
|
2781
|
+
defaultMessage: "Keypad settings"
|
|
2143
2782
|
})
|
|
2144
2783
|
},
|
|
2145
2784
|
// {
|
|
@@ -2166,20 +2805,14 @@ var definition = [{
|
|
|
2166
2805
|
type: 'background',
|
|
2167
2806
|
label: defineMessage({
|
|
2168
2807
|
id: "cDj1mZ",
|
|
2169
|
-
defaultMessage:
|
|
2170
|
-
"type": 0,
|
|
2171
|
-
"value": "Background"
|
|
2172
|
-
}]
|
|
2808
|
+
defaultMessage: "Background"
|
|
2173
2809
|
})
|
|
2174
2810
|
}]
|
|
2175
2811
|
}, {
|
|
2176
2812
|
id: 'results',
|
|
2177
2813
|
label: defineMessage({
|
|
2178
2814
|
id: "uiTxd7",
|
|
2179
|
-
defaultMessage:
|
|
2180
|
-
"type": 0,
|
|
2181
|
-
"value": "Results"
|
|
2182
|
-
}]
|
|
2815
|
+
defaultMessage: "Results"
|
|
2183
2816
|
}),
|
|
2184
2817
|
repeatable: true,
|
|
2185
2818
|
fields: [{
|
|
@@ -2189,10 +2822,7 @@ var definition = [{
|
|
|
2189
2822
|
screenState: 'results',
|
|
2190
2823
|
label: defineMessage({
|
|
2191
2824
|
id: "4iBXj2",
|
|
2192
|
-
defaultMessage:
|
|
2193
|
-
"type": 0,
|
|
2194
|
-
"value": "Layout"
|
|
2195
|
-
}]
|
|
2825
|
+
defaultMessage: "Layout"
|
|
2196
2826
|
})
|
|
2197
2827
|
}, {
|
|
2198
2828
|
name: 'title',
|
|
@@ -2202,10 +2832,7 @@ var definition = [{
|
|
|
2202
2832
|
},
|
|
2203
2833
|
label: defineMessage({
|
|
2204
2834
|
id: "+AEVbJ",
|
|
2205
|
-
defaultMessage:
|
|
2206
|
-
"type": 0,
|
|
2207
|
-
"value": "Title"
|
|
2208
|
-
}]
|
|
2835
|
+
defaultMessage: "Title"
|
|
2209
2836
|
})
|
|
2210
2837
|
}, {
|
|
2211
2838
|
name: 'description',
|
|
@@ -2215,10 +2842,7 @@ var definition = [{
|
|
|
2215
2842
|
},
|
|
2216
2843
|
label: defineMessage({
|
|
2217
2844
|
id: "ZCe0r4",
|
|
2218
|
-
defaultMessage:
|
|
2219
|
-
"type": 0,
|
|
2220
|
-
"value": "Description"
|
|
2221
|
-
}]
|
|
2845
|
+
defaultMessage: "Description"
|
|
2222
2846
|
})
|
|
2223
2847
|
}, {
|
|
2224
2848
|
name: 'points',
|
|
@@ -2226,27 +2850,18 @@ var definition = [{
|
|
|
2226
2850
|
isHorizontal: true,
|
|
2227
2851
|
label: defineMessage({
|
|
2228
2852
|
id: "jWAJW4",
|
|
2229
|
-
defaultMessage:
|
|
2230
|
-
"type": 0,
|
|
2231
|
-
"value": "Points"
|
|
2232
|
-
}]
|
|
2853
|
+
defaultMessage: "Points"
|
|
2233
2854
|
}),
|
|
2234
2855
|
help: defineMessage({
|
|
2235
2856
|
id: "JoyIgA",
|
|
2236
|
-
defaultMessage:
|
|
2237
|
-
"type": 0,
|
|
2238
|
-
"value": "Minimum points for this result"
|
|
2239
|
-
}]
|
|
2857
|
+
defaultMessage: "Minimum points for this result"
|
|
2240
2858
|
})
|
|
2241
2859
|
}, {
|
|
2242
2860
|
name: 'background',
|
|
2243
2861
|
type: 'background',
|
|
2244
2862
|
label: defineMessage({
|
|
2245
2863
|
id: "cDj1mZ",
|
|
2246
|
-
defaultMessage:
|
|
2247
|
-
"type": 0,
|
|
2248
|
-
"value": "Background"
|
|
2249
|
-
}]
|
|
2864
|
+
defaultMessage: "Background"
|
|
2250
2865
|
})
|
|
2251
2866
|
}]
|
|
2252
2867
|
}],
|
|
@@ -2256,19 +2871,13 @@ var definition = [{
|
|
|
2256
2871
|
defaultValue: 'top',
|
|
2257
2872
|
label: defineMessage({
|
|
2258
2873
|
id: "OPxJx/",
|
|
2259
|
-
defaultMessage:
|
|
2260
|
-
"type": 0,
|
|
2261
|
-
"value": "Layout"
|
|
2262
|
-
}]
|
|
2874
|
+
defaultMessage: "Layout"
|
|
2263
2875
|
})
|
|
2264
2876
|
}, {
|
|
2265
2877
|
type: 'fields',
|
|
2266
2878
|
label: defineMessage({
|
|
2267
2879
|
id: "LOknw0",
|
|
2268
|
-
defaultMessage:
|
|
2269
|
-
"type": 0,
|
|
2270
|
-
"value": "Styles"
|
|
2271
|
-
}]
|
|
2880
|
+
defaultMessage: "Styles"
|
|
2272
2881
|
}),
|
|
2273
2882
|
isList: true,
|
|
2274
2883
|
fields: [{
|
|
@@ -2276,80 +2885,56 @@ var definition = [{
|
|
|
2276
2885
|
type: 'box-style-form',
|
|
2277
2886
|
label: defineMessage({
|
|
2278
2887
|
id: "l5uLMd",
|
|
2279
|
-
defaultMessage:
|
|
2280
|
-
"type": 0,
|
|
2281
|
-
"value": "Buttons"
|
|
2282
|
-
}]
|
|
2888
|
+
defaultMessage: "Buttons"
|
|
2283
2889
|
})
|
|
2284
2890
|
}, {
|
|
2285
2891
|
name: 'buttonsTextStyle',
|
|
2286
2892
|
type: 'text-style-form',
|
|
2287
2893
|
label: defineMessage({
|
|
2288
2894
|
id: "gwPu/I",
|
|
2289
|
-
defaultMessage:
|
|
2290
|
-
"type": 0,
|
|
2291
|
-
"value": "Buttons text"
|
|
2292
|
-
}]
|
|
2895
|
+
defaultMessage: "Buttons text"
|
|
2293
2896
|
})
|
|
2294
2897
|
}, {
|
|
2295
2898
|
name: 'inactiveButtonsTextStyle',
|
|
2296
2899
|
type: 'text-style-form',
|
|
2297
2900
|
label: defineMessage({
|
|
2298
2901
|
id: "my7Kox",
|
|
2299
|
-
defaultMessage:
|
|
2300
|
-
"type": 0,
|
|
2301
|
-
"value": "Inactive buttons text"
|
|
2302
|
-
}]
|
|
2902
|
+
defaultMessage: "Inactive buttons text"
|
|
2303
2903
|
})
|
|
2304
2904
|
}, {
|
|
2305
2905
|
name: 'inactiveButtonsStyle',
|
|
2306
2906
|
type: 'box-style-form',
|
|
2307
2907
|
label: defineMessage({
|
|
2308
2908
|
id: "xlFOg3",
|
|
2309
|
-
defaultMessage:
|
|
2310
|
-
"type": 0,
|
|
2311
|
-
"value": "Inactive buttons"
|
|
2312
|
-
}]
|
|
2909
|
+
defaultMessage: "Inactive buttons"
|
|
2313
2910
|
})
|
|
2314
2911
|
}, {
|
|
2315
2912
|
name: 'questionsHeadingStyle',
|
|
2316
2913
|
type: 'text-style-form',
|
|
2317
2914
|
label: defineMessage({
|
|
2318
2915
|
id: "+FHxPO",
|
|
2319
|
-
defaultMessage:
|
|
2320
|
-
"type": 0,
|
|
2321
|
-
"value": "Questions title"
|
|
2322
|
-
}]
|
|
2916
|
+
defaultMessage: "Questions title"
|
|
2323
2917
|
})
|
|
2324
2918
|
}, {
|
|
2325
2919
|
name: 'resultsHeadingStyle',
|
|
2326
2920
|
type: 'text-style-form',
|
|
2327
2921
|
label: defineMessage({
|
|
2328
2922
|
id: "BnRW4y",
|
|
2329
|
-
defaultMessage:
|
|
2330
|
-
"type": 0,
|
|
2331
|
-
"value": "Results title"
|
|
2332
|
-
}]
|
|
2923
|
+
defaultMessage: "Results title"
|
|
2333
2924
|
})
|
|
2334
2925
|
}, {
|
|
2335
2926
|
name: 'resultsTextStyle',
|
|
2336
2927
|
type: 'text-style-form',
|
|
2337
2928
|
label: defineMessage({
|
|
2338
2929
|
id: "uDHTZn",
|
|
2339
|
-
defaultMessage:
|
|
2340
|
-
"type": 0,
|
|
2341
|
-
"value": "Results description"
|
|
2342
|
-
}]
|
|
2930
|
+
defaultMessage: "Results description"
|
|
2343
2931
|
})
|
|
2344
2932
|
}, {
|
|
2345
2933
|
name: 'numbersTextStyle',
|
|
2346
2934
|
type: 'text-style-form',
|
|
2347
2935
|
label: defineMessage({
|
|
2348
2936
|
id: "iltluX",
|
|
2349
|
-
defaultMessage:
|
|
2350
|
-
"type": 0,
|
|
2351
|
-
"value": "Numbers text"
|
|
2352
|
-
}]
|
|
2937
|
+
defaultMessage: "Numbers text"
|
|
2353
2938
|
})
|
|
2354
2939
|
}]
|
|
2355
2940
|
}, {
|
|
@@ -2360,30 +2945,21 @@ var definition = [{
|
|
|
2360
2945
|
},
|
|
2361
2946
|
label: defineMessage({
|
|
2362
2947
|
id: "Yu/PB5",
|
|
2363
|
-
defaultMessage:
|
|
2364
|
-
"type": 0,
|
|
2365
|
-
"value": "Next button"
|
|
2366
|
-
}]
|
|
2948
|
+
defaultMessage: "Next button"
|
|
2367
2949
|
})
|
|
2368
2950
|
}, {
|
|
2369
2951
|
name: 'background',
|
|
2370
2952
|
type: 'background',
|
|
2371
2953
|
label: defineMessage({
|
|
2372
2954
|
id: "cDj1mZ",
|
|
2373
|
-
defaultMessage:
|
|
2374
|
-
"type": 0,
|
|
2375
|
-
"value": "Background"
|
|
2376
|
-
}]
|
|
2955
|
+
defaultMessage: "Background"
|
|
2377
2956
|
})
|
|
2378
2957
|
}, {
|
|
2379
2958
|
name: 'header',
|
|
2380
2959
|
type: 'header',
|
|
2381
2960
|
label: defineMessage({
|
|
2382
2961
|
id: "rhuDxI",
|
|
2383
|
-
defaultMessage:
|
|
2384
|
-
"type": 0,
|
|
2385
|
-
"value": "Header"
|
|
2386
|
-
}]
|
|
2962
|
+
defaultMessage: "Header"
|
|
2387
2963
|
}),
|
|
2388
2964
|
theme: {
|
|
2389
2965
|
badge: {
|
|
@@ -2398,10 +2974,7 @@ var definition = [{
|
|
|
2398
2974
|
type: 'footer',
|
|
2399
2975
|
label: defineMessage({
|
|
2400
2976
|
id: "g4nybp",
|
|
2401
|
-
defaultMessage:
|
|
2402
|
-
"type": 0,
|
|
2403
|
-
"value": "Footer"
|
|
2404
|
-
}]
|
|
2977
|
+
defaultMessage: "Footer"
|
|
2405
2978
|
}),
|
|
2406
2979
|
theme: {
|
|
2407
2980
|
callToAction: {
|