@pie-element/multiple-choice 14.0.6 → 14.0.7-next.20261019062545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Radio-DS22zl1y.js → Radio-Dj4zrLS0.js} +865 -741
- package/dist/browser/{Radio-DS22zl1y.js.map → Radio-Dj4zrLS0.js.map} +1 -1
- package/dist/browser/author/index.js +6300 -6300
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/delivery/index.js +77 -73
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{Radio-CMqZPx3h.js → Radio-B45MfQhQ.js} +865 -741
- package/dist/browser/editor-runtime/{Radio-CMqZPx3h.js.map → Radio-B45MfQhQ.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +1640 -1640
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +77 -73
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/{main-OV2y7QCe.js → editor-runtime/main-BvJ9mP7v.js} +300 -299
- package/dist/browser/editor-runtime/main-BvJ9mP7v.js.map +1 -0
- package/dist/browser/{mathjax-DqXi3q4c-B13HrHzz.js → editor-runtime/mathjax-DqXi3q4c-Y_jZvcuO.js} +2 -2
- package/dist/browser/editor-runtime/{mathjax-DqXi3q4c-DnkUutjP.js.map → mathjax-DqXi3q4c-Y_jZvcuO.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +5 -5
- package/dist/browser/{editor-runtime/main-Cg61UvOA.js → main-DUfYqu6k.js} +299 -298
- package/dist/browser/main-DUfYqu6k.js.map +1 -0
- package/dist/browser/{editor-runtime/mathjax-DqXi3q4c-DnkUutjP.js → mathjax-DqXi3q4c-D_oxb28N.js} +2 -2
- package/dist/browser/{mathjax-DqXi3q4c-B13HrHzz.js.map → mathjax-DqXi3q4c-D_oxb28N.js.map} +1 -1
- package/dist/browser/print/index.js +5 -5
- package/dist/delivery/index.js +39 -35
- package/dist/index.iife.js +21 -21
- package/dist/schemas/configuration.schema.json +1 -1
- package/dist/schemas/model.schema.json +1 -1
- package/dist/schemas/session.schema.json +1 -1
- package/module/print.js +3338 -3322
- package/module/print.js.map +1 -1
- package/package.json +14 -14
- package/dist/browser/editor-runtime/main-Cg61UvOA.js.map +0 -1
- package/dist/browser/main-OV2y7QCe.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { Ft as e, K as t, Kt as n, Mt as r, Nt as i, Ot as a, Qt as o, W as s, en as c, g as l, h as u, i as d, j as f, n as p, o as m, p as h, q as g, rn as _, s as v, t as y, w as b } from "./Radio-Dj4zrLS0.js";
|
|
2
|
+
import x, { useRef as S } from "react";
|
|
3
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
4
4
|
//#region ../../lib-react/icons/dist/correct-response-icon.js
|
|
5
|
-
var
|
|
5
|
+
var E = /* @__PURE__ */ _(c(), 1), D = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ T("svg", {
|
|
6
6
|
"aria-hidden": "true",
|
|
7
7
|
focusable: "false",
|
|
8
8
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -10,27 +10,27 @@ var T = /* @__PURE__ */ g(i(), 1), E = ({ bgFill: e, fgFill: t }) => /* @__PURE_
|
|
|
10
10
|
viewBox: "-283 359 34 35",
|
|
11
11
|
style: { enableBackground: "new -283 359 34 35" },
|
|
12
12
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ w("circle", {
|
|
14
14
|
cx: "-266",
|
|
15
15
|
cy: "375.9",
|
|
16
16
|
r: "14",
|
|
17
17
|
fill: e
|
|
18
18
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ w("path", {
|
|
20
20
|
d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
|
|
21
21
|
fill: e
|
|
22
22
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ w("polygon", {
|
|
24
24
|
points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
|
|
25
25
|
fill: t
|
|
26
26
|
})
|
|
27
27
|
]
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
bgFill:
|
|
31
|
-
fgFill:
|
|
29
|
+
D.propTypes = {
|
|
30
|
+
bgFill: E.default.string.isRequired,
|
|
31
|
+
fgFill: E.default.string.isRequired
|
|
32
32
|
};
|
|
33
|
-
var
|
|
33
|
+
var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
|
|
34
34
|
"aria-hidden": "true",
|
|
35
35
|
focusable: "false",
|
|
36
36
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -38,7 +38,7 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
38
38
|
viewBox: "-129.5 127 34 35",
|
|
39
39
|
style: { enableBackground: "new -129.5 127 34 35" },
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ w("path", {
|
|
42
42
|
style: {
|
|
43
43
|
fill: "#D0CAC5",
|
|
44
44
|
stroke: "#E6E3E0",
|
|
@@ -47,7 +47,7 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
47
47
|
},
|
|
48
48
|
d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ w("path", {
|
|
51
51
|
style: {
|
|
52
52
|
fill: "#B3ABA4",
|
|
53
53
|
stroke: "#CDC7C2",
|
|
@@ -56,48 +56,48 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
56
56
|
},
|
|
57
57
|
d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ w("circle", {
|
|
60
60
|
cx: "-114.2",
|
|
61
61
|
cy: "143.5",
|
|
62
62
|
r: "14",
|
|
63
63
|
fill: e
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ w("path", {
|
|
66
66
|
d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
|
|
67
67
|
fill: n
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ w("polygon", {
|
|
70
70
|
points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
|
|
71
71
|
fill: t
|
|
72
72
|
})
|
|
73
73
|
]
|
|
74
74
|
});
|
|
75
|
-
|
|
76
|
-
bgFill:
|
|
77
|
-
fgFill:
|
|
78
|
-
borderFill:
|
|
75
|
+
O.propTypes = {
|
|
76
|
+
bgFill: E.default.string.isRequired,
|
|
77
|
+
fgFill: E.default.string.isRequired,
|
|
78
|
+
borderFill: E.default.string.isRequired
|
|
79
79
|
};
|
|
80
|
-
var
|
|
80
|
+
var k = e("div")(({ size: e }) => ({
|
|
81
81
|
width: e || "25px",
|
|
82
82
|
height: e || "25px"
|
|
83
|
-
})),
|
|
83
|
+
})), A = ({ open: e, size: t }) => /* @__PURE__ */ w(k, {
|
|
84
84
|
size: t,
|
|
85
|
-
children: e ? /* @__PURE__ */
|
|
85
|
+
children: e ? /* @__PURE__ */ w(D, {
|
|
86
86
|
bgFill: "#bce2ff",
|
|
87
87
|
fgFill: "#1a9cff"
|
|
88
|
-
}) : /* @__PURE__ */
|
|
88
|
+
}) : /* @__PURE__ */ w(O, {
|
|
89
89
|
bgFill: "white",
|
|
90
90
|
fgFill: "#1a9cff",
|
|
91
91
|
borderFill: "#bce2ff"
|
|
92
92
|
})
|
|
93
93
|
});
|
|
94
|
-
|
|
95
|
-
open:
|
|
96
|
-
size:
|
|
97
|
-
},
|
|
94
|
+
A.propTypes = {
|
|
95
|
+
open: E.default.bool,
|
|
96
|
+
size: E.default.string
|
|
97
|
+
}, A.defaultProps = { open: !1 };
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
100
|
-
var
|
|
100
|
+
var j = "height ease-in 300ms, opacity ease-in 300ms", M = e("div")(() => ({
|
|
101
101
|
position: "relative",
|
|
102
102
|
height: 0,
|
|
103
103
|
overflow: "hidden",
|
|
@@ -105,7 +105,7 @@ var A = "height ease-in 300ms, opacity ease-in 300ms", j = r("div")(() => ({
|
|
|
105
105
|
visibility: "hidden",
|
|
106
106
|
width: 0,
|
|
107
107
|
"&.enter": {
|
|
108
|
-
transition:
|
|
108
|
+
transition: j,
|
|
109
109
|
opacity: 1,
|
|
110
110
|
height: "auto",
|
|
111
111
|
width: "auto",
|
|
@@ -119,7 +119,7 @@ var A = "height ease-in 300ms, opacity ease-in 300ms", j = r("div")(() => ({
|
|
|
119
119
|
minHeight: "25px"
|
|
120
120
|
},
|
|
121
121
|
"&.exit": {
|
|
122
|
-
transition:
|
|
122
|
+
transition: j,
|
|
123
123
|
opacity: 0,
|
|
124
124
|
height: 0,
|
|
125
125
|
visibility: "visible",
|
|
@@ -131,10 +131,10 @@ var A = "height ease-in 300ms, opacity ease-in 300ms", j = r("div")(() => ({
|
|
|
131
131
|
height: 0,
|
|
132
132
|
width: 0
|
|
133
133
|
}
|
|
134
|
-
})),
|
|
135
|
-
let { show: t, children: n, className: r } = e,
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
nodeRef:
|
|
134
|
+
})), N = (e) => {
|
|
135
|
+
let { show: t, children: n, className: r } = e, a = S(null);
|
|
136
|
+
return /* @__PURE__ */ w(i, {
|
|
137
|
+
nodeRef: a,
|
|
138
138
|
in: t,
|
|
139
139
|
appear: !0,
|
|
140
140
|
mountOnEnter: !1,
|
|
@@ -145,21 +145,21 @@ var A = "height ease-in 300ms, opacity ease-in 300ms", j = r("div")(() => ({
|
|
|
145
145
|
exit: "exit",
|
|
146
146
|
exitDone: "exit-done"
|
|
147
147
|
},
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
ref:
|
|
148
|
+
children: /* @__PURE__ */ w(M, {
|
|
149
|
+
ref: a,
|
|
150
150
|
className: r,
|
|
151
151
|
children: n
|
|
152
152
|
})
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
|
-
|
|
156
|
-
show:
|
|
157
|
-
className:
|
|
158
|
-
children:
|
|
155
|
+
N.propTypes = {
|
|
156
|
+
show: E.default.bool.isRequired,
|
|
157
|
+
className: E.default.string,
|
|
158
|
+
children: E.default.oneOfType([E.default.arrayOf(E.default.node), E.default.node]).isRequired
|
|
159
159
|
};
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
|
|
162
|
-
var
|
|
162
|
+
var P = t({
|
|
163
163
|
packageName: "@pie-lib/correct-answer-toggle",
|
|
164
164
|
source: {
|
|
165
165
|
showCorrectAnswer: "Show correct answer",
|
|
@@ -218,23 +218,23 @@ var N = a({
|
|
|
218
218
|
});
|
|
219
219
|
//#endregion
|
|
220
220
|
//#region ../../lib-react/correct-answer-toggle/dist/index.js
|
|
221
|
-
function
|
|
221
|
+
function F(e) {
|
|
222
222
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
return !e ||
|
|
224
|
+
function I(e, t) {
|
|
225
|
+
return !e || F(e) ? e : F(e.default) ? e.default : t && F(e[t]) ? e[t] : t && F(e[t]?.default) ? e[t].default : e;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
227
|
+
var L = v, R = L.default, ee = R && typeof R == "object" ? R : L, te = I(u, "Readable") || I(ee.Readable, "Readable"), ne = {
|
|
228
228
|
WebkitTouchCallout: "none",
|
|
229
229
|
WebkitUserSelect: "none",
|
|
230
230
|
KhtmlUserSelect: "none",
|
|
231
231
|
MozUserSelect: "none",
|
|
232
232
|
msUserSelect: "none",
|
|
233
233
|
userSelect: "none"
|
|
234
|
-
},
|
|
234
|
+
}, re = e("div")(() => ({
|
|
235
235
|
width: "100%",
|
|
236
236
|
cursor: "pointer"
|
|
237
|
-
})),
|
|
237
|
+
})), ie = e("button")(() => ({
|
|
238
238
|
margin: "0 auto",
|
|
239
239
|
textAlign: "center",
|
|
240
240
|
display: "flex",
|
|
@@ -247,18 +247,18 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
247
247
|
font: "inherit",
|
|
248
248
|
cursor: "pointer",
|
|
249
249
|
"&:focus-visible": {
|
|
250
|
-
outline: `2px solid ${
|
|
250
|
+
outline: `2px solid ${o.buttonFocusOutline()}`,
|
|
251
251
|
outlineOffset: "-2px"
|
|
252
252
|
}
|
|
253
|
-
})),
|
|
253
|
+
})), ae = e("div")(() => ({
|
|
254
254
|
width: "fit-content",
|
|
255
255
|
minWidth: "140px",
|
|
256
256
|
alignSelf: "center",
|
|
257
257
|
verticalAlign: "middle",
|
|
258
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
258
|
+
color: `var(--correct-answer-toggle-label-color, ${o.text()})`,
|
|
259
259
|
fontWeight: "normal",
|
|
260
|
-
...
|
|
261
|
-
})),
|
|
260
|
+
...ne
|
|
261
|
+
})), oe = e("div")(() => ({
|
|
262
262
|
position: "absolute",
|
|
263
263
|
width: "25px",
|
|
264
264
|
"&.enter": { opacity: "0" },
|
|
@@ -271,27 +271,27 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
271
271
|
opacity: "0",
|
|
272
272
|
transition: "opacity 0.3s ease-in"
|
|
273
273
|
}
|
|
274
|
-
})),
|
|
274
|
+
})), se = e("div")(() => ({
|
|
275
275
|
width: "25px",
|
|
276
276
|
marginRight: "5px",
|
|
277
277
|
display: "flex",
|
|
278
278
|
alignItems: "center"
|
|
279
|
-
})),
|
|
279
|
+
})), ce = class extends x.Component {
|
|
280
280
|
static propTypes = {
|
|
281
|
-
onToggle:
|
|
282
|
-
toggled:
|
|
283
|
-
show:
|
|
284
|
-
hideMessage:
|
|
285
|
-
showMessage:
|
|
286
|
-
className:
|
|
287
|
-
language:
|
|
281
|
+
onToggle: E.default.func,
|
|
282
|
+
toggled: E.default.bool,
|
|
283
|
+
show: E.default.bool,
|
|
284
|
+
hideMessage: E.default.string,
|
|
285
|
+
showMessage: E.default.string,
|
|
286
|
+
className: E.default.string,
|
|
287
|
+
language: E.default.string
|
|
288
288
|
};
|
|
289
289
|
static defaultProps = {
|
|
290
290
|
show: !1,
|
|
291
291
|
toggled: !1
|
|
292
292
|
};
|
|
293
293
|
constructor(e) {
|
|
294
|
-
super(e), this.state = { show: e.show }, this.openIconRef =
|
|
294
|
+
super(e), this.state = { show: e.show }, this.openIconRef = x.createRef(), this.closedIconRef = x.createRef();
|
|
295
295
|
}
|
|
296
296
|
relabel = () => this.forceUpdate();
|
|
297
297
|
onClick() {
|
|
@@ -304,17 +304,18 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
304
304
|
this.setState({ show: e.show });
|
|
305
305
|
}
|
|
306
306
|
render() {
|
|
307
|
-
let { className: e, toggled: t, language: n } = this.props, r =
|
|
308
|
-
return /* @__PURE__ */
|
|
307
|
+
let { className: e, toggled: t, language: n } = this.props, r = P.forLocale(n, this.relabel), a = this.props.hideMessage ?? r.t("hideCorrectAnswer"), o = this.props.showMessage ?? r.t("showCorrectAnswer");
|
|
308
|
+
return /* @__PURE__ */ w(re, {
|
|
309
309
|
className: e,
|
|
310
|
-
|
|
310
|
+
...s(n),
|
|
311
|
+
children: /* @__PURE__ */ w(N, {
|
|
311
312
|
show: this.state.show,
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ T(ie, {
|
|
313
314
|
type: "button",
|
|
314
315
|
"aria-pressed": !!t,
|
|
315
316
|
onClick: this.onClick.bind(this),
|
|
316
317
|
onTouchEnd: this.onTouch.bind(this),
|
|
317
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ T(se, { children: [/* @__PURE__ */ w(i, {
|
|
318
319
|
nodeRef: this.openIconRef,
|
|
319
320
|
timeout: 400,
|
|
320
321
|
in: t,
|
|
@@ -325,11 +326,11 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
325
326
|
exit: "exit",
|
|
326
327
|
exitActive: "exit-active"
|
|
327
328
|
},
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ w(oe, {
|
|
329
330
|
ref: this.openIconRef,
|
|
330
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ w(A, { open: t }, "correct-open")
|
|
331
332
|
})
|
|
332
|
-
}), /* @__PURE__ */
|
|
333
|
+
}), /* @__PURE__ */ w(i, {
|
|
333
334
|
nodeRef: this.closedIconRef,
|
|
334
335
|
timeout: 5e3,
|
|
335
336
|
in: !t,
|
|
@@ -340,22 +341,22 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
340
341
|
exit: "exit",
|
|
341
342
|
exitActive: "exit-active"
|
|
342
343
|
},
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ w(oe, {
|
|
344
345
|
ref: this.closedIconRef,
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ w(A, { open: t }, "correct-closed")
|
|
346
347
|
})
|
|
347
|
-
})] }), /* @__PURE__ */
|
|
348
|
+
})] }), /* @__PURE__ */ w(te, {
|
|
348
349
|
false: !0,
|
|
349
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ w(ae, {
|
|
350
351
|
"aria-hidden": !this.state.show,
|
|
351
|
-
children: t ?
|
|
352
|
+
children: t ? a : o
|
|
352
353
|
})
|
|
353
354
|
})]
|
|
354
355
|
})
|
|
355
356
|
})
|
|
356
357
|
});
|
|
357
358
|
}
|
|
358
|
-
}, z =
|
|
359
|
+
}, z = t({
|
|
359
360
|
packageName: "@pie-element/multiple-choice",
|
|
360
361
|
source: {
|
|
361
362
|
multipleChoiceQuestion: "Multiple Choice Question",
|
|
@@ -421,7 +422,7 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
421
422
|
"./sv-9wAmet-v.js"
|
|
422
423
|
)
|
|
423
424
|
}
|
|
424
|
-
}),
|
|
425
|
+
}), le = e(m)({
|
|
425
426
|
width: "33px",
|
|
426
427
|
height: "33px",
|
|
427
428
|
"& svg": {
|
|
@@ -432,10 +433,10 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
432
433
|
verticalAlign: "middle",
|
|
433
434
|
"& hide": { display: "none" }
|
|
434
435
|
}
|
|
435
|
-
}),
|
|
436
|
-
"& .incorrect-fill": { fill:
|
|
437
|
-
"& .correct-fill": { fill:
|
|
438
|
-
}),
|
|
436
|
+
}), ue = e("svg")({
|
|
437
|
+
"& .incorrect-fill": { fill: o.incorrect() },
|
|
438
|
+
"& .correct-fill": { fill: o.correct() }
|
|
439
|
+
}), de = e("div")({
|
|
439
440
|
position: "relative",
|
|
440
441
|
"&.feedback-tick-enter": {
|
|
441
442
|
opacity: "0",
|
|
@@ -455,25 +456,25 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
455
456
|
left: "-50px",
|
|
456
457
|
transition: "left 300ms ease-in, opacity 300ms"
|
|
457
458
|
}
|
|
458
|
-
}),
|
|
459
|
-
static propTypes = { correctness:
|
|
459
|
+
}), fe = class extends x.Component {
|
|
460
|
+
static propTypes = { correctness: E.default.string };
|
|
460
461
|
constructor(e) {
|
|
461
|
-
super(e), this.nodeRef =
|
|
462
|
+
super(e), this.nodeRef = x.createRef();
|
|
462
463
|
}
|
|
463
|
-
getIncorrectIcon = () => /* @__PURE__ */
|
|
464
|
+
getIncorrectIcon = () => /* @__PURE__ */ w(ue, {
|
|
464
465
|
preserveAspectRatio: "xMinYMin meet",
|
|
465
466
|
x: "0px",
|
|
466
467
|
y: "0px",
|
|
467
468
|
viewBox: "0 0 44 40",
|
|
468
469
|
style: { enableBackground: "new 0 0 44 40" },
|
|
469
|
-
children: /* @__PURE__ */
|
|
470
|
+
children: /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w("rect", {
|
|
470
471
|
x: "11",
|
|
471
472
|
y: "17.3",
|
|
472
473
|
transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",
|
|
473
474
|
className: "incorrect-fill",
|
|
474
475
|
width: "16.6",
|
|
475
476
|
height: "3.7"
|
|
476
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ w("rect", {
|
|
477
478
|
x: "17.4",
|
|
478
479
|
y: "10.7",
|
|
479
480
|
transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",
|
|
@@ -482,21 +483,21 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
482
483
|
height: "16.6"
|
|
483
484
|
})] })
|
|
484
485
|
}, "1");
|
|
485
|
-
getCorrectIcon = () => /* @__PURE__ */
|
|
486
|
+
getCorrectIcon = () => /* @__PURE__ */ w(ue, {
|
|
486
487
|
preserveAspectRatio: "xMinYMin meet",
|
|
487
488
|
version: "1.1",
|
|
488
489
|
x: "0px",
|
|
489
490
|
y: "0px",
|
|
490
491
|
viewBox: "0 0 44 40",
|
|
491
492
|
style: { enableBackground: "new 0 0 44 40" },
|
|
492
|
-
children: /* @__PURE__ */
|
|
493
|
+
children: /* @__PURE__ */ w("polygon", {
|
|
493
494
|
className: "correct-fill",
|
|
494
495
|
points: "19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4"
|
|
495
496
|
})
|
|
496
497
|
}, "2");
|
|
497
498
|
render() {
|
|
498
|
-
let { correctness:
|
|
499
|
-
return /* @__PURE__ */
|
|
499
|
+
let { correctness: e } = this.props, t = e === "incorrect" ? this.getIncorrectIcon() : e === "correct" ? this.getCorrectIcon() : null;
|
|
500
|
+
return /* @__PURE__ */ w(le, { children: /* @__PURE__ */ w(r, { children: e && /* @__PURE__ */ w(i, {
|
|
500
501
|
nodeRef: this.nodeRef,
|
|
501
502
|
classNames: {
|
|
502
503
|
enter: "feedback-tick-enter",
|
|
@@ -508,93 +509,93 @@ var I = _, L = I.default, R = L && typeof L == "object" ? L : I, ee = F(l, "Read
|
|
|
508
509
|
enter: 700,
|
|
509
510
|
exit: 300
|
|
510
511
|
},
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ w(de, {
|
|
512
513
|
ref: this.nodeRef,
|
|
513
|
-
children:
|
|
514
|
+
children: t
|
|
514
515
|
})
|
|
515
516
|
}) }) });
|
|
516
517
|
}
|
|
517
518
|
};
|
|
518
519
|
//#endregion
|
|
519
520
|
//#region src/delivery/choice-input.tsx
|
|
520
|
-
function
|
|
521
|
+
function B(e) {
|
|
521
522
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
-
return !e ||
|
|
524
|
+
function V(e, t) {
|
|
525
|
+
return !e || B(e) ? e : B(e.default) ? e.default : t && B(e[t]) ? e[t] : t && B(e[t]?.default) ? e[t].default : e;
|
|
525
526
|
}
|
|
526
|
-
var
|
|
527
|
+
var H = v, U = H.default, W = U && typeof U == "object" ? U : H, G = V(l, "PreviewPrompt") || V(W.PreviewPrompt, "PreviewPrompt"), pe = V(a, "Feedback") || V(W.Feedback, "Feedback"), K = "multiple-choice-component", me = e(m)({
|
|
527
528
|
display: "flex",
|
|
528
529
|
alignItems: "center",
|
|
529
|
-
backgroundColor:
|
|
530
|
-
}),
|
|
530
|
+
backgroundColor: o.background()
|
|
531
|
+
}), he = e(m)({
|
|
531
532
|
display: "flex",
|
|
532
533
|
alignItems: "center",
|
|
533
|
-
backgroundColor:
|
|
534
|
+
backgroundColor: o.background(),
|
|
534
535
|
flex: 1,
|
|
535
536
|
"& .MuiFormControlLabel-root": { marginLeft: "-14px" },
|
|
536
537
|
"& label": {
|
|
537
|
-
color:
|
|
538
|
+
color: o.text(),
|
|
538
539
|
"& > span": { fontSize: "inherit" },
|
|
539
540
|
"& > .MuiButtonBase-root": { padding: "12px" }
|
|
540
541
|
}
|
|
541
|
-
}),
|
|
542
|
+
}), ge = e("span")(({ theme: e }) => ({
|
|
542
543
|
display: "flex",
|
|
543
544
|
alignItems: "center",
|
|
544
545
|
"& > span": { marginLeft: `-${e.spacing(1)}` }
|
|
545
|
-
})),
|
|
546
|
+
})), _e = e("span")({
|
|
546
547
|
position: "absolute",
|
|
547
548
|
left: "-10000px",
|
|
548
549
|
top: "auto",
|
|
549
550
|
width: "1px",
|
|
550
551
|
height: "1px",
|
|
551
552
|
overflow: "hidden"
|
|
552
|
-
}),
|
|
553
|
+
}), ve = e(d)({
|
|
553
554
|
"& .MuiFormControlLabel-label": {
|
|
554
|
-
color: `${
|
|
555
|
-
backgroundColor:
|
|
555
|
+
color: `${o.text()} !important`,
|
|
556
|
+
backgroundColor: o.background(),
|
|
556
557
|
letterSpacing: "normal"
|
|
557
558
|
},
|
|
558
559
|
"&.Mui-disabled *": { cursor: "not-allowed !important" }
|
|
559
|
-
}),
|
|
560
|
+
}), q = (e, t) => ({ [`&.${K}`]: { color: `var(--choice-input-${e}, ${t}) !important` } }), ye = (e) => {
|
|
560
561
|
let t = (t) => e ? `${e}-${t}` : t;
|
|
561
562
|
return {
|
|
562
563
|
[t("root")]: {
|
|
563
|
-
...
|
|
564
|
-
...e === "correct" ?
|
|
565
|
-
...e === "incorrect" ?
|
|
564
|
+
...q("color", o.text()),
|
|
565
|
+
...e === "correct" ? q("correct-color", o.text()) : {},
|
|
566
|
+
...e === "incorrect" ? q("incorrect-color", o.incorrect()) : {}
|
|
566
567
|
},
|
|
567
568
|
[t("checked")]: {
|
|
568
|
-
...e === "correct" ?
|
|
569
|
-
...e === "incorrect" ?
|
|
570
|
-
...e ? {} :
|
|
569
|
+
...e === "correct" ? q("correct-selected-color", o.correct()) : {},
|
|
570
|
+
...e === "incorrect" ? q("incorrect-checked", o.incorrect()) : {},
|
|
571
|
+
...e ? {} : q("selected-color", o.primary())
|
|
571
572
|
},
|
|
572
573
|
[t("disabled")]: {
|
|
573
|
-
...
|
|
574
|
-
...e === "correct" ?
|
|
575
|
-
...e === "incorrect" ?
|
|
574
|
+
...q("disabled-color", o.text()),
|
|
575
|
+
...e === "correct" ? q("correct-disabled-color", o.disabled()) : {},
|
|
576
|
+
...e === "incorrect" ? q("incorrect-disabled-color", o.disabled()) : {},
|
|
576
577
|
opacity: .6,
|
|
577
578
|
cursor: "not-allowed !important",
|
|
578
579
|
pointerEvents: "initial !important"
|
|
579
580
|
},
|
|
580
581
|
focusVisibleUnchecked: {
|
|
581
|
-
outline: `2px solid ${
|
|
582
|
+
outline: `2px solid ${o.focusOutline()}`,
|
|
582
583
|
backgroundColor: "transparent"
|
|
583
584
|
},
|
|
584
585
|
focusVisibleChecked: {
|
|
585
|
-
outline: `2px solid ${
|
|
586
|
+
outline: `2px solid ${o.focusOutline()}`,
|
|
586
587
|
backgroundColor: "transparent"
|
|
587
588
|
}
|
|
588
589
|
};
|
|
589
|
-
},
|
|
590
|
-
let t =
|
|
590
|
+
}, be = e(p, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
|
|
591
|
+
let t = ye(e), n = (t) => e ? `${e}-${t}` : t;
|
|
591
592
|
return {
|
|
592
|
-
[`&.${
|
|
593
|
+
[`&.${K}`]: {
|
|
593
594
|
...t[n("root")],
|
|
594
595
|
"&.Mui-checked": t[n("checked")],
|
|
595
596
|
"&.Mui-disabled": e ? {} : t[n("disabled")],
|
|
596
597
|
"@media (hover: hover)": { "&:hover:not(.Mui-disabled) svg": {
|
|
597
|
-
boxShadow: `0px 0px 0px 2px ${
|
|
598
|
+
boxShadow: `0px 0px 0px 2px ${o.focusOutline()}`,
|
|
598
599
|
borderRadius: "4px"
|
|
599
600
|
} }
|
|
600
601
|
},
|
|
@@ -603,9 +604,9 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
603
604
|
"&.Mui-checked": t.focusVisibleChecked
|
|
604
605
|
}
|
|
605
606
|
};
|
|
606
|
-
}),
|
|
607
|
+
}), xe = (e) => {
|
|
607
608
|
let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, onKeyDown: s, inputRef: c } = e;
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ w(be, {
|
|
609
610
|
id: o,
|
|
610
611
|
slotProps: { input: { ref: c } },
|
|
611
612
|
onKeyDown: s,
|
|
@@ -615,19 +616,19 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
615
616
|
disabled: i,
|
|
616
617
|
value: a,
|
|
617
618
|
correctness: t,
|
|
618
|
-
className:
|
|
619
|
+
className: K
|
|
619
620
|
});
|
|
620
|
-
},
|
|
621
|
-
let t =
|
|
621
|
+
}, Se = e(y, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: e }) => {
|
|
622
|
+
let t = ye(e), n = (t) => e ? `${e}-${t}` : t;
|
|
622
623
|
return {
|
|
623
|
-
[`&.${
|
|
624
|
+
[`&.${K}`]: {
|
|
624
625
|
...t[n("root")],
|
|
625
626
|
"&.Mui-checked": t[n("checked")],
|
|
626
627
|
"&.Mui-disabled": e ? {} : t[n("disabled")],
|
|
627
628
|
"&.Mui-focusVisible:not(.Mui-checked)": t.focusVisibleUnchecked,
|
|
628
629
|
"&.Mui-focusVisible.Mui-checked": t.focusVisibleChecked,
|
|
629
630
|
"@media (hover: hover)": { "&:hover:not(.Mui-disabled) svg": {
|
|
630
|
-
boxShadow: `0px 0px 0px 2px ${
|
|
631
|
+
boxShadow: `0px 0px 0px 2px ${o.focusOutline()}`,
|
|
631
632
|
borderRadius: "50%"
|
|
632
633
|
} }
|
|
633
634
|
},
|
|
@@ -636,9 +637,9 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
636
637
|
"& .MuiTouchRipple-root": { display: "none" }
|
|
637
638
|
}
|
|
638
639
|
};
|
|
639
|
-
}),
|
|
640
|
+
}), Ce = (e) => {
|
|
640
641
|
let { correctness: t, checked: n, onChange: r, disabled: i, value: a, id: o, tagName: s, inputRef: c } = e;
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ w(Se, {
|
|
642
643
|
id: o,
|
|
643
644
|
slotProps: { input: { ref: c } },
|
|
644
645
|
disableRipple: !0,
|
|
@@ -647,31 +648,31 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
647
648
|
disabled: i,
|
|
648
649
|
value: a,
|
|
649
650
|
correctness: t,
|
|
650
|
-
className:
|
|
651
|
+
className: K,
|
|
651
652
|
name: s
|
|
652
653
|
});
|
|
653
|
-
},
|
|
654
|
+
}, we = class extends x.Component {
|
|
654
655
|
static propTypes = {
|
|
655
|
-
choiceMode:
|
|
656
|
-
displayKey:
|
|
657
|
-
checked:
|
|
658
|
-
correctness:
|
|
659
|
-
disabled:
|
|
660
|
-
feedback:
|
|
661
|
-
label:
|
|
662
|
-
rationale:
|
|
663
|
-
onChange:
|
|
664
|
-
value:
|
|
665
|
-
className:
|
|
666
|
-
tagName:
|
|
667
|
-
hideTick:
|
|
668
|
-
isEvaluateMode:
|
|
669
|
-
choicesLayout:
|
|
656
|
+
choiceMode: E.default.oneOf(["radio", "checkbox"]),
|
|
657
|
+
displayKey: E.default.string,
|
|
658
|
+
checked: E.default.bool.isRequired,
|
|
659
|
+
correctness: E.default.string,
|
|
660
|
+
disabled: E.default.bool.isRequired,
|
|
661
|
+
feedback: E.default.string,
|
|
662
|
+
label: E.default.string.isRequired,
|
|
663
|
+
rationale: E.default.string,
|
|
664
|
+
onChange: E.default.func.isRequired,
|
|
665
|
+
value: E.default.string.isRequired,
|
|
666
|
+
className: E.default.string,
|
|
667
|
+
tagName: E.default.string,
|
|
668
|
+
hideTick: E.default.bool,
|
|
669
|
+
isEvaluateMode: E.default.bool,
|
|
670
|
+
choicesLayout: E.default.oneOf([
|
|
670
671
|
"vertical",
|
|
671
672
|
"grid",
|
|
672
673
|
"horizontal"
|
|
673
674
|
]),
|
|
674
|
-
isSelectionButtonBelow:
|
|
675
|
+
isSelectionButtonBelow: E.default.bool
|
|
675
676
|
};
|
|
676
677
|
static defaultProps = {
|
|
677
678
|
rationale: null,
|
|
@@ -679,7 +680,7 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
679
680
|
isEvaluateMode: !1
|
|
680
681
|
};
|
|
681
682
|
constructor(e) {
|
|
682
|
-
super(e), this.onToggleChoice = this.onToggleChoice.bind(this), this.choiceId =
|
|
683
|
+
super(e), this.onToggleChoice = this.onToggleChoice.bind(this), this.choiceId = g("choice"), this.descId = `${this.choiceId}-desc`;
|
|
683
684
|
}
|
|
684
685
|
onToggleChoice(e) {
|
|
685
686
|
this.props.onChange(e);
|
|
@@ -700,8 +701,8 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
700
701
|
c && c.focus();
|
|
701
702
|
};
|
|
702
703
|
render() {
|
|
703
|
-
let { choiceMode: e, disabled: t, displayKey:
|
|
704
|
-
...d === "horizontal" && { [`& .${
|
|
704
|
+
let { choiceMode: e, disabled: t, displayKey: r, feedback: i, label: a, correctness: o, className: s, rationale: c, hideTick: l, isEvaluateMode: u, choicesLayout: d, value: f, checked: p, tagName: m, isSelectionButtonBelow: h } = this.props, g = e === "checkbox" ? xe : Ce, _ = e === "checkbox" ? "checkbox" : "radio-button", v = {
|
|
705
|
+
...d === "horizontal" && { [`& .${K}`]: {
|
|
705
706
|
padding: "8px",
|
|
706
707
|
margin: "4px 0 4px 4px"
|
|
707
708
|
} },
|
|
@@ -710,55 +711,55 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
710
711
|
justifyContent: "center",
|
|
711
712
|
"& > label": { alignItems: "center" }
|
|
712
713
|
}
|
|
713
|
-
}, y = typeof
|
|
714
|
+
}, y = typeof a == "string" && (a.includes("<math") || a.includes("\\(") || a.includes("\\[") || a.includes("<img") || a.includes("data-latex") || a.includes("data-raw") || a.includes("<mjx-container")), b = r ? /* @__PURE__ */ w(_e, {
|
|
714
715
|
id: this.descId,
|
|
715
|
-
children: y ? `Pick the answer below, ${
|
|
716
|
-
}) : null, x = /* @__PURE__ */ C
|
|
716
|
+
children: y ? `Pick the answer below, ${r}` : r
|
|
717
|
+
}) : null, x = /* @__PURE__ */ w(C, { children: r && !h ? /* @__PURE__ */ T(me, {
|
|
717
718
|
component: "span",
|
|
718
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ T("span", {
|
|
719
720
|
"aria-hidden": "true",
|
|
720
721
|
children: [
|
|
721
|
-
|
|
722
|
+
r,
|
|
722
723
|
".",
|
|
723
724
|
"\xA0"
|
|
724
725
|
]
|
|
725
|
-
}), /* @__PURE__ */
|
|
726
|
+
}), /* @__PURE__ */ w(G, {
|
|
726
727
|
className: "prompt-label",
|
|
727
|
-
prompt:
|
|
728
|
+
prompt: a,
|
|
728
729
|
tagName: "span"
|
|
729
730
|
})]
|
|
730
|
-
}) : /* @__PURE__ */
|
|
731
|
+
}) : /* @__PURE__ */ w(G, {
|
|
731
732
|
className: "prompt-label",
|
|
732
|
-
prompt:
|
|
733
|
+
prompt: a,
|
|
733
734
|
tagName: "span"
|
|
734
|
-
}) }),
|
|
735
|
+
}) }), S = {
|
|
735
736
|
disabled: t,
|
|
736
737
|
checked: p,
|
|
737
|
-
correctness:
|
|
738
|
+
correctness: o,
|
|
738
739
|
tagName: m,
|
|
739
740
|
value: f,
|
|
740
741
|
id: this.choiceId,
|
|
741
742
|
onChange: this.onToggleChoice,
|
|
742
743
|
onKeyDown: this.handleKeyDown,
|
|
743
744
|
...b ? { "aria-describedby": this.descId } : {}
|
|
744
|
-
}, E = h ? /* @__PURE__ */
|
|
745
|
+
}, E = h ? /* @__PURE__ */ T(ge, { children: [
|
|
745
746
|
b,
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
...
|
|
747
|
+
/* @__PURE__ */ w(g, {
|
|
748
|
+
...S,
|
|
748
749
|
style: { padding: 0 }
|
|
749
750
|
}),
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ w("span", {
|
|
751
752
|
"aria-hidden": "true",
|
|
752
|
-
children:
|
|
753
|
+
children: r ? `${r}.` : ""
|
|
753
754
|
})
|
|
754
|
-
] }) : /* @__PURE__ */
|
|
755
|
-
return /* @__PURE__ */
|
|
756
|
-
className:
|
|
755
|
+
] }) : /* @__PURE__ */ T(C, { children: [b, /* @__PURE__ */ w(g, { ...S })] });
|
|
756
|
+
return /* @__PURE__ */ T("div", {
|
|
757
|
+
className: n(s, "corespring-" + _, "choice-input"),
|
|
757
758
|
children: [
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ T(me, { children: [!l && u && /* @__PURE__ */ w(fe, { correctness: o }), /* @__PURE__ */ w(he, {
|
|
759
760
|
className: "checkbox-holder",
|
|
760
761
|
sx: v,
|
|
761
|
-
children: /* @__PURE__ */
|
|
762
|
+
children: /* @__PURE__ */ w(ve, {
|
|
762
763
|
label: x,
|
|
763
764
|
value: f,
|
|
764
765
|
htmlFor: this.choiceId,
|
|
@@ -766,29 +767,29 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
766
767
|
control: E
|
|
767
768
|
})
|
|
768
769
|
})] }),
|
|
769
|
-
c && /* @__PURE__ */
|
|
770
|
+
c && /* @__PURE__ */ w(G, {
|
|
770
771
|
className: "rationale",
|
|
771
772
|
defaultClassName: "rationale",
|
|
772
773
|
prompt: c
|
|
773
774
|
}),
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
feedback:
|
|
776
|
-
correctness:
|
|
775
|
+
/* @__PURE__ */ w(pe, {
|
|
776
|
+
feedback: i,
|
|
777
|
+
correctness: o
|
|
777
778
|
})
|
|
778
779
|
]
|
|
779
780
|
});
|
|
780
781
|
}
|
|
781
|
-
},
|
|
782
|
+
}, Te = e(m, { shouldForwardProp: (e) => e !== "noBorder" && e !== "horizontalLayout" })(({ theme: e, noBorder: t, horizontalLayout: n }) => ({
|
|
782
783
|
paddingTop: e.spacing(2.5),
|
|
783
784
|
paddingBottom: `calc(${e.spacing(1)} + 2px)`,
|
|
784
785
|
paddingLeft: `calc(${e.spacing(1)} + 2px)`,
|
|
785
786
|
paddingRight: `calc(${e.spacing(1)} + 2px)`,
|
|
786
|
-
borderBottom: t ? "none" : `1px solid ${
|
|
787
|
+
borderBottom: t ? "none" : `1px solid ${o.border()}`,
|
|
787
788
|
...n && {
|
|
788
789
|
paddingRight: e.spacing(2.5),
|
|
789
790
|
"& label": { marginRight: e.spacing(1) }
|
|
790
791
|
}
|
|
791
|
-
})),
|
|
792
|
+
})), Ee = class extends x.Component {
|
|
792
793
|
static propTypes = {};
|
|
793
794
|
state = { isHovered: !1 };
|
|
794
795
|
handleMouseEnter = () => {
|
|
@@ -803,7 +804,7 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
803
804
|
t || n(e);
|
|
804
805
|
};
|
|
805
806
|
render() {
|
|
806
|
-
let { choice: e, index: t, choicesLength: n, showCorrect: r, isEvaluateMode: i, choiceMode: a, disabled: o, checked: s, correctness: c, displayKey: l, choicesLayout: u, gridColumns: d, isSelectionButtonBelow: f, selectedAnswerBackgroundColor: p, selectedAnswerStrokeColor: m, selectedAnswerStrokeWidth: h, hoverAnswerBackgroundColor: g, hoverAnswerStrokeColor: _, hoverAnswerStrokeWidth: v, tagName: y } = this.props, { isHovered: b } = this.state, x = "choice" + (t === n - 1 ? " last" : ""), S = !i || r ? "" : e.feedback,
|
|
807
|
+
let { choice: e, index: t, choicesLength: n, showCorrect: r, isEvaluateMode: i, choiceMode: a, disabled: o, checked: s, correctness: c, displayKey: l, choicesLayout: u, gridColumns: d, isSelectionButtonBelow: f, selectedAnswerBackgroundColor: p, selectedAnswerStrokeColor: m, selectedAnswerStrokeWidth: h, hoverAnswerBackgroundColor: g, hoverAnswerStrokeColor: _, hoverAnswerStrokeWidth: v, tagName: y } = this.props, { isHovered: b } = this.state, x = "choice" + (t === n - 1 ? " last" : ""), S = !i || r ? "" : e.feedback, C = {
|
|
807
808
|
...e,
|
|
808
809
|
checked: s,
|
|
809
810
|
choiceMode: a,
|
|
@@ -830,7 +831,7 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
830
831
|
border: `${T(k)} solid ${O}`,
|
|
831
832
|
borderRadius: "8px"
|
|
832
833
|
} : {}, N = t === n - 1 || u !== "vertical" || j, P = u === "horizontal";
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ w("div", {
|
|
834
835
|
className: x,
|
|
835
836
|
style: {
|
|
836
837
|
backgroundColor: A === "initial" ? "initial" : A,
|
|
@@ -838,143 +839,143 @@ var U = _, W = U.default, G = W && typeof W == "object" ? W : U, K = H(c, "Previ
|
|
|
838
839
|
},
|
|
839
840
|
onMouseEnter: this.handleMouseEnter,
|
|
840
841
|
onMouseLeave: this.handleMouseLeave,
|
|
841
|
-
children: /* @__PURE__ */
|
|
842
|
+
children: /* @__PURE__ */ w(Te, {
|
|
842
843
|
component: "div",
|
|
843
844
|
noBorder: N,
|
|
844
845
|
horizontalLayout: P,
|
|
845
|
-
children: /* @__PURE__ */
|
|
846
|
+
children: /* @__PURE__ */ w(we, { ...C })
|
|
846
847
|
})
|
|
847
848
|
}, t);
|
|
848
849
|
}
|
|
849
850
|
};
|
|
850
|
-
|
|
851
|
-
choiceMode:
|
|
852
|
-
choice:
|
|
853
|
-
disabled:
|
|
854
|
-
onChoiceChanged:
|
|
855
|
-
index:
|
|
856
|
-
choicesLength:
|
|
857
|
-
showCorrect:
|
|
858
|
-
isEvaluateMode:
|
|
859
|
-
checked:
|
|
860
|
-
correctness:
|
|
861
|
-
displayKey:
|
|
862
|
-
choicesLayout:
|
|
851
|
+
Ee.propTypes = {
|
|
852
|
+
choiceMode: E.default.oneOf(["radio", "checkbox"]),
|
|
853
|
+
choice: E.default.object,
|
|
854
|
+
disabled: E.default.bool.isRequired,
|
|
855
|
+
onChoiceChanged: E.default.func,
|
|
856
|
+
index: E.default.number,
|
|
857
|
+
choicesLength: E.default.number,
|
|
858
|
+
showCorrect: E.default.bool,
|
|
859
|
+
isEvaluateMode: E.default.bool,
|
|
860
|
+
checked: E.default.bool,
|
|
861
|
+
correctness: E.default.string,
|
|
862
|
+
displayKey: E.default.string,
|
|
863
|
+
choicesLayout: E.default.oneOf([
|
|
863
864
|
"vertical",
|
|
864
865
|
"grid",
|
|
865
866
|
"horizontal"
|
|
866
867
|
]),
|
|
867
|
-
gridColumns:
|
|
868
|
-
selectedAnswerBackgroundColor:
|
|
869
|
-
selectedAnswerStrokeColor:
|
|
870
|
-
selectedAnswerStrokeWidth:
|
|
871
|
-
hoverAnswerBackgroundColor:
|
|
872
|
-
hoverAnswerStrokeColor:
|
|
873
|
-
hoverAnswerStrokeWidth:
|
|
874
|
-
tagName:
|
|
875
|
-
isSelectionButtonBelow:
|
|
868
|
+
gridColumns: E.default.string,
|
|
869
|
+
selectedAnswerBackgroundColor: E.default.string,
|
|
870
|
+
selectedAnswerStrokeColor: E.default.string,
|
|
871
|
+
selectedAnswerStrokeWidth: E.default.string,
|
|
872
|
+
hoverAnswerBackgroundColor: E.default.string,
|
|
873
|
+
hoverAnswerStrokeColor: E.default.string,
|
|
874
|
+
hoverAnswerStrokeWidth: E.default.string,
|
|
875
|
+
tagName: E.default.string,
|
|
876
|
+
isSelectionButtonBelow: E.default.bool
|
|
876
877
|
};
|
|
877
878
|
//#endregion
|
|
878
879
|
//#region src/delivery/utils.ts
|
|
879
|
-
var
|
|
880
|
+
var De = (e, t) => t != null && e >= t, Oe = (e, t) => t != null && e > t;
|
|
880
881
|
//#endregion
|
|
881
882
|
//#region src/delivery/multiple-choice.tsx
|
|
882
|
-
function
|
|
883
|
+
function J(e) {
|
|
883
884
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
884
885
|
}
|
|
885
|
-
function
|
|
886
|
-
return !e ||
|
|
886
|
+
function Y(e, t) {
|
|
887
|
+
return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
|
|
887
888
|
}
|
|
888
|
-
var
|
|
889
|
-
color:
|
|
890
|
-
backgroundColor:
|
|
889
|
+
var ke = v, X = ke.default, Ae = X && typeof X == "object" ? X : ke, je = Y(l, "PreviewPrompt") || Y(Ae.PreviewPrompt, "PreviewPrompt"), Me = Y(f, "Collapsible") || Y(Ae.Collapsible, "Collapsible"), Ne = e(m)({
|
|
890
|
+
color: o.text(),
|
|
891
|
+
backgroundColor: o.background(),
|
|
891
892
|
"& *": { "-webkit-font-smoothing": "antialiased" },
|
|
892
893
|
position: "relative",
|
|
893
894
|
"& legend": { border: "none !important" }
|
|
894
|
-
}),
|
|
895
|
+
}), Pe = e("h2")(({ theme: e }) => ({
|
|
895
896
|
display: "block",
|
|
896
897
|
fontSize: "inherit",
|
|
897
898
|
margin: "0",
|
|
898
899
|
fontWeight: "normal",
|
|
899
900
|
paddingBottom: e.spacing(2)
|
|
900
|
-
})),
|
|
901
|
+
})), Fe = e(m)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ie = e(m)({
|
|
901
902
|
display: "flex",
|
|
902
903
|
flexDirection: "row",
|
|
903
904
|
flexWrap: "wrap"
|
|
904
|
-
}),
|
|
905
|
+
}), Le = e(m)({ display: "grid" }), Re = e("fieldset")({
|
|
905
906
|
border: "0px",
|
|
906
907
|
padding: "0.01em 0 0 0",
|
|
907
908
|
margin: "0px",
|
|
908
909
|
minWidth: "0px"
|
|
909
|
-
}),
|
|
910
|
+
}), ze = e("h3")({
|
|
910
911
|
position: "absolute",
|
|
911
912
|
left: "-10000px",
|
|
912
913
|
top: "auto",
|
|
913
914
|
width: "1px",
|
|
914
915
|
height: "1px",
|
|
915
916
|
overflow: "hidden"
|
|
916
|
-
}),
|
|
917
|
+
}), Be = e("div")(({ theme: e }) => ({
|
|
917
918
|
fontSize: e.typography.fontSize - 2,
|
|
918
|
-
color:
|
|
919
|
+
color: o.missing(),
|
|
919
920
|
paddingTop: e.spacing(1)
|
|
920
|
-
})),
|
|
921
|
+
})), Ve = class extends x.Component {
|
|
921
922
|
static propTypes = {
|
|
922
|
-
className:
|
|
923
|
-
mode:
|
|
923
|
+
className: E.default.string,
|
|
924
|
+
mode: E.default.oneOf([
|
|
924
925
|
"gather",
|
|
925
926
|
"view",
|
|
926
927
|
"evaluate"
|
|
927
928
|
]),
|
|
928
|
-
choiceMode:
|
|
929
|
-
keyMode:
|
|
929
|
+
choiceMode: E.default.oneOf(["radio", "checkbox"]),
|
|
930
|
+
keyMode: E.default.oneOf([
|
|
930
931
|
"numbers",
|
|
931
932
|
"letters",
|
|
932
933
|
"none"
|
|
933
934
|
]),
|
|
934
|
-
choices:
|
|
935
|
-
partLabel:
|
|
936
|
-
prompt:
|
|
937
|
-
teacherInstructions:
|
|
938
|
-
session:
|
|
939
|
-
disabled:
|
|
940
|
-
eliminatedChoices:
|
|
941
|
-
onChoiceChanged:
|
|
942
|
-
responseCorrect:
|
|
943
|
-
correctResponse:
|
|
944
|
-
choicesLayout:
|
|
935
|
+
choices: E.default.array,
|
|
936
|
+
partLabel: E.default.string,
|
|
937
|
+
prompt: E.default.string,
|
|
938
|
+
teacherInstructions: E.default.string,
|
|
939
|
+
session: E.default.object,
|
|
940
|
+
disabled: E.default.bool,
|
|
941
|
+
eliminatedChoices: E.default.arrayOf(E.default.string),
|
|
942
|
+
onChoiceChanged: E.default.func,
|
|
943
|
+
responseCorrect: E.default.bool,
|
|
944
|
+
correctResponse: E.default.array,
|
|
945
|
+
choicesLayout: E.default.oneOf([
|
|
945
946
|
"vertical",
|
|
946
947
|
"grid",
|
|
947
948
|
"horizontal"
|
|
948
949
|
]),
|
|
949
|
-
gridColumns:
|
|
950
|
-
alwaysShowCorrect:
|
|
951
|
-
animationsDisabled:
|
|
952
|
-
language:
|
|
953
|
-
selectedAnswerBackgroundColor:
|
|
954
|
-
selectedAnswerStrokeColor:
|
|
955
|
-
selectedAnswerStrokeWidth:
|
|
956
|
-
hoverAnswerBackgroundColor:
|
|
957
|
-
hoverAnswerStrokeColor:
|
|
958
|
-
hoverAnswerStrokeWidth:
|
|
959
|
-
onShowCorrectToggle:
|
|
960
|
-
isSelectionButtonBelow:
|
|
961
|
-
minSelections:
|
|
962
|
-
maxSelections:
|
|
963
|
-
autoplayAudioEnabled:
|
|
964
|
-
autoplayAudioHeld:
|
|
950
|
+
gridColumns: E.default.string,
|
|
951
|
+
alwaysShowCorrect: E.default.bool,
|
|
952
|
+
animationsDisabled: E.default.bool,
|
|
953
|
+
language: E.default.string,
|
|
954
|
+
selectedAnswerBackgroundColor: E.default.string,
|
|
955
|
+
selectedAnswerStrokeColor: E.default.string,
|
|
956
|
+
selectedAnswerStrokeWidth: E.default.string,
|
|
957
|
+
hoverAnswerBackgroundColor: E.default.string,
|
|
958
|
+
hoverAnswerStrokeColor: E.default.string,
|
|
959
|
+
hoverAnswerStrokeWidth: E.default.string,
|
|
960
|
+
onShowCorrectToggle: E.default.func,
|
|
961
|
+
isSelectionButtonBelow: E.default.bool,
|
|
962
|
+
minSelections: E.default.number,
|
|
963
|
+
maxSelections: E.default.number,
|
|
964
|
+
autoplayAudioEnabled: E.default.bool,
|
|
965
|
+
autoplayAudioHeld: E.default.bool,
|
|
965
966
|
customAudioButton: {
|
|
966
|
-
playImage:
|
|
967
|
-
pauseImage:
|
|
967
|
+
playImage: E.default.string,
|
|
968
|
+
pauseImage: E.default.string
|
|
968
969
|
},
|
|
969
|
-
options:
|
|
970
|
-
baseHeadingLevel:
|
|
971
|
-
includeSrHeading:
|
|
970
|
+
options: E.default.object,
|
|
971
|
+
baseHeadingLevel: E.default.number,
|
|
972
|
+
includeSrHeading: E.default.bool
|
|
972
973
|
};
|
|
973
974
|
constructor(e) {
|
|
974
975
|
super(e), this.state = {
|
|
975
976
|
showCorrect: this.props.options && this.props.alwaysShowCorrect || !1,
|
|
976
977
|
maxSelectionsErrorState: !1
|
|
977
|
-
}, this.onToggle = this.onToggle.bind(this), this.groupName = `mc-group-${Math.random().toString(36).slice(2, 10)}`, this.mainContainerId =
|
|
978
|
+
}, this.onToggle = this.onToggle.bind(this), this.groupName = `mc-group-${Math.random().toString(36).slice(2, 10)}`, this.mainContainerId = g("main-container");
|
|
978
979
|
}
|
|
979
980
|
relabel = () => this.forceUpdate();
|
|
980
981
|
isSelected(e) {
|
|
@@ -983,7 +984,7 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
983
984
|
}
|
|
984
985
|
handleChange = (e) => {
|
|
985
986
|
let { value: t, checked: n } = e.target, { choiceMode: r, maxSelections: i, onChoiceChanged: a, session: o } = this.props;
|
|
986
|
-
r !== "radio" && o.value &&
|
|
987
|
+
r !== "radio" && o.value && De(o.value.length, i) && (this.setState({ maxSelectionsErrorState: n }), n) || a({
|
|
987
988
|
value: t,
|
|
988
989
|
selected: n,
|
|
989
990
|
selector: "Mouse"
|
|
@@ -1017,14 +1018,14 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
1017
1018
|
let { mode: e, choiceMode: t, includeSrHeading: n, baseHeadingLevel: r, partLabel: i, language: a } = this.props;
|
|
1018
1019
|
if (!(!i && n !== !1) || e !== "gather") return null;
|
|
1019
1020
|
let o = r ? Math.min(6, r) : 2;
|
|
1020
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ w(ze.withComponent(`h${o}`), { children: z.forLocale(a, this.relabel).t(t === "radio" ? "multipleChoiceQuestion" : "multipleSelectQuestion") });
|
|
1021
1022
|
}
|
|
1022
1023
|
render() {
|
|
1023
|
-
let { mode: e, disabled: t, className:
|
|
1024
|
+
let { mode: e, disabled: t, className: r, choices: i = [], choiceMode: a, gridColumns: o, partLabel: s, prompt: c, responseCorrect: l, teacherInstructions: u, alwaysShowCorrect: d, animationsDisabled: f, language: p, isSelectionButtonBelow: g, minSelections: _, maxSelections: v, autoplayAudioEnabled: y, autoplayAudioHeld: b, session: x, customAudioButton: S, options: C, baseHeadingLevel: E, eliminatedChoices: D = [] } = this.props, { showCorrect: O, maxSelectionsErrorState: k } = this.state, A = e === "evaluate", j = A && !l, M = o > 1 ? { gridTemplateColumns: `repeat(${o}, 1fr)` } : void 0, N = x.value && x.value.length || 0, P = (() => {
|
|
1024
1025
|
if (!E) return;
|
|
1025
1026
|
let e = 1;
|
|
1026
1027
|
return s && (e += 1), Math.min(6, E + e);
|
|
1027
|
-
})(), F = (e) => e && P ? h(e, P) : e, I = /* @__PURE__ */
|
|
1028
|
+
})(), F = (e) => e && P ? h(e, P) : e, I = /* @__PURE__ */ w(je, {
|
|
1028
1029
|
tagName: "div",
|
|
1029
1030
|
className: "prompt",
|
|
1030
1031
|
defaultClassName: "teacher-instructions",
|
|
@@ -1032,27 +1033,27 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
1032
1033
|
}), L = z.forLocale(p, this.relabel), R = () => _ && v ? _ === v ? L.t("minmaxSelectionsEqual", { minSelections: _ }) : L.t("minmaxSelectionsRange", {
|
|
1033
1034
|
minSelections: _,
|
|
1034
1035
|
maxSelections: v
|
|
1035
|
-
}) : _ ? L.t("minSelections", { minSelections: _ }) : "", ee = this.props.choicesLayout === "grid" ?
|
|
1036
|
-
return /* @__PURE__ */
|
|
1036
|
+
}) : _ ? L.t("minSelections", { minSelections: _ }) : "", ee = this.props.choicesLayout === "grid" ? Le : this.props.choicesLayout === "horizontal" ? Ie : m;
|
|
1037
|
+
return /* @__PURE__ */ T(Ne, {
|
|
1037
1038
|
id: this.mainContainerId,
|
|
1038
|
-
className:
|
|
1039
|
+
className: n(r, "multiple-choice", "main-container"),
|
|
1039
1040
|
children: [
|
|
1040
|
-
s && /* @__PURE__ */
|
|
1041
|
+
s && /* @__PURE__ */ w(Pe, {
|
|
1041
1042
|
as: E ? `h${Math.min(6, E + 1)}` : "h2",
|
|
1042
1043
|
children: s
|
|
1043
1044
|
}),
|
|
1044
1045
|
this.renderHeading(),
|
|
1045
|
-
u && /* @__PURE__ */
|
|
1046
|
+
u && /* @__PURE__ */ w(Fe, { children: f ? I : /* @__PURE__ */ w(Me, {
|
|
1046
1047
|
labels: {
|
|
1047
1048
|
hidden: L.t("showTeacherInstructions"),
|
|
1048
1049
|
visible: L.t("hideTeacherInstructions")
|
|
1049
1050
|
},
|
|
1050
1051
|
children: I
|
|
1051
1052
|
}) }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
role:
|
|
1053
|
+
/* @__PURE__ */ T(Re, {
|
|
1054
|
+
role: a === "radio" ? "radiogroup" : "group",
|
|
1054
1055
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ w(je, {
|
|
1056
1057
|
className: "prompt",
|
|
1057
1058
|
defaultClassName: "prompt",
|
|
1058
1059
|
prompt: F(c),
|
|
@@ -1062,15 +1063,15 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
1062
1063
|
customAudioButton: S,
|
|
1063
1064
|
language: p
|
|
1064
1065
|
}),
|
|
1065
|
-
!(
|
|
1066
|
+
!(C && d) && /* @__PURE__ */ w(ce, {
|
|
1066
1067
|
show: j,
|
|
1067
1068
|
toggled: O,
|
|
1068
1069
|
onToggle: this.onToggle.bind(this),
|
|
1069
1070
|
language: p
|
|
1070
1071
|
}),
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ w(ee, {
|
|
1072
1073
|
style: M,
|
|
1073
|
-
children:
|
|
1074
|
+
children: i.map((e, n) => /* @__PURE__ */ w(Ee, {
|
|
1074
1075
|
choicesLayout: this.props.choicesLayout,
|
|
1075
1076
|
selectedAnswerBackgroundColor: this.props.selectedAnswerBackgroundColor,
|
|
1076
1077
|
selectedAnswerStrokeColor: this.props.selectedAnswerStrokeColor,
|
|
@@ -1078,13 +1079,13 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
1078
1079
|
hoverAnswerBackgroundColor: this.props.hoverAnswerBackgroundColor,
|
|
1079
1080
|
hoverAnswerStrokeColor: this.props.hoverAnswerStrokeColor,
|
|
1080
1081
|
hoverAnswerStrokeWidth: this.props.hoverAnswerStrokeWidth,
|
|
1081
|
-
gridColumns:
|
|
1082
|
+
gridColumns: o,
|
|
1082
1083
|
choice: e,
|
|
1083
1084
|
index: n,
|
|
1084
|
-
choicesLength:
|
|
1085
|
+
choicesLength: i.length,
|
|
1085
1086
|
showCorrect: O,
|
|
1086
1087
|
isEvaluateMode: A,
|
|
1087
|
-
choiceMode:
|
|
1088
|
+
choiceMode: a,
|
|
1088
1089
|
disabled: t || D.includes(String(e.value)),
|
|
1089
1090
|
tagName: this.groupName,
|
|
1090
1091
|
onChoiceChanged: this.handleChange,
|
|
@@ -1097,35 +1098,35 @@ var De = _, Z = De.default, Oe = Z && typeof Z == "object" ? Z : De, ke = X(c, "
|
|
|
1097
1098
|
})
|
|
1098
1099
|
]
|
|
1099
1100
|
}),
|
|
1100
|
-
|
|
1101
|
-
|
|
1101
|
+
a === "checkbox" && N < _ && /* @__PURE__ */ w(Be, { children: R() }),
|
|
1102
|
+
a === "checkbox" && k && /* @__PURE__ */ w(Be, { children: L.plural("maxSelections", { count: v }) })
|
|
1102
1103
|
]
|
|
1103
1104
|
});
|
|
1104
1105
|
}
|
|
1105
1106
|
};
|
|
1106
|
-
|
|
1107
|
+
Ve.defaultProps = { session: { value: [] } };
|
|
1107
1108
|
//#endregion
|
|
1108
1109
|
//#region src/delivery/main.tsx
|
|
1109
|
-
function
|
|
1110
|
+
function Z(e) {
|
|
1110
1111
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1111
1112
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return !e ||
|
|
1113
|
+
function He(e, t) {
|
|
1114
|
+
return !e || Z(e) ? e : Z(e.default) ? e.default : t && Z(e[t]) ? e[t] : t && Z(e[t]?.default) ? e[t].default : e;
|
|
1114
1115
|
}
|
|
1115
|
-
var
|
|
1116
|
+
var Q = v, $ = Q.default, Ue = $ && typeof $ == "object" ? $ : Q, We = He(b, "PreviewLayout") || He(Ue.PreviewLayout, "PreviewLayout"), Ge = class extends x.Component {
|
|
1116
1117
|
static propTypes = {
|
|
1117
|
-
model:
|
|
1118
|
-
session:
|
|
1119
|
-
options:
|
|
1120
|
-
onChoiceChanged:
|
|
1121
|
-
onShowCorrectToggle:
|
|
1122
|
-
extraCSSRules:
|
|
1123
|
-
names:
|
|
1124
|
-
rules:
|
|
1118
|
+
model: E.default.object,
|
|
1119
|
+
session: E.default.object,
|
|
1120
|
+
options: E.default.object,
|
|
1121
|
+
onChoiceChanged: E.default.func,
|
|
1122
|
+
onShowCorrectToggle: E.default.func,
|
|
1123
|
+
extraCSSRules: E.default.shape({
|
|
1124
|
+
names: E.default.arrayOf(E.default.string),
|
|
1125
|
+
rules: E.default.string
|
|
1125
1126
|
}),
|
|
1126
|
-
baseHeadingLevel:
|
|
1127
|
-
includeSrHeading:
|
|
1128
|
-
eliminatedChoices:
|
|
1127
|
+
baseHeadingLevel: E.default.number,
|
|
1128
|
+
includeSrHeading: E.default.bool,
|
|
1129
|
+
eliminatedChoices: E.default.arrayOf(E.default.string)
|
|
1129
1130
|
};
|
|
1130
1131
|
static defaultProps = {
|
|
1131
1132
|
model: {},
|
|
@@ -1133,11 +1134,11 @@ var Ve = _, $ = Ve.default, He = $ && typeof $ == "object" ? $ : Ve, Ue = Be(y,
|
|
|
1133
1134
|
};
|
|
1134
1135
|
render() {
|
|
1135
1136
|
let { model: e, onChoiceChanged: t, session: n, onShowCorrectToggle: r, options: i, baseHeadingLevel: a, includeSrHeading: o, eliminatedChoices: s } = this.props, { extraCSSRules: c, fontSizeFactor: l } = e;
|
|
1136
|
-
return /* @__PURE__ */
|
|
1137
|
+
return /* @__PURE__ */ w(We, {
|
|
1137
1138
|
extraCSSRules: c,
|
|
1138
1139
|
fontSizeFactor: l,
|
|
1139
1140
|
classes: {},
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1141
|
+
children: /* @__PURE__ */ w(Ve, {
|
|
1141
1142
|
...e,
|
|
1142
1143
|
options: i,
|
|
1143
1144
|
session: n,
|
|
@@ -1151,6 +1152,6 @@ var Ve = _, $ = Ve.default, He = $ && typeof $ == "object" ? $ : Ve, Ue = Be(y,
|
|
|
1151
1152
|
}
|
|
1152
1153
|
};
|
|
1153
1154
|
//#endregion
|
|
1154
|
-
export {
|
|
1155
|
+
export { Oe as n, z as r, Ge as t };
|
|
1155
1156
|
|
|
1156
|
-
//# sourceMappingURL=main-
|
|
1157
|
+
//# sourceMappingURL=main-DUfYqu6k.js.map
|