@pie-element/match 12.1.2-next.3 → 12.1.2-next.30
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/author.js +2 -0
- package/dist/author/add-row.js +1 -1
- package/dist/author/answer-config-block.js +42 -41
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +4 -1
- package/dist/author/row.js +27 -23
- package/dist/browser/{Typography-BRnAIZOH.js → Typography-BX-ak3_U.js} +1764 -1638
- package/dist/browser/Typography-BX-ak3_U.js.map +1 -0
- package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/author/index.js +25945 -36497
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/browser-kkT1XVKw.js.map +1 -1
- package/dist/browser/controller/index.js +5 -5
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +164 -56
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-i687VHmY.js → dist-C4gh2n2Z.js} +6 -2
- package/dist/browser/dist-C4gh2n2Z.js.map +1 -0
- package/dist/browser/editor-runtime/Typography-l-ZVRFDi.js +9350 -0
- package/dist/browser/editor-runtime/Typography-l-ZVRFDi.js.map +1 -0
- package/dist/browser/editor-runtime/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/editor-runtime/author/index.js +20538 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/browser-jJGxjKdp.js +219 -0
- package/dist/browser/editor-runtime/browser-jJGxjKdp.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +267 -0
- package/dist/browser/editor-runtime/controller/index.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +2092 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/browser/editor-runtime/dist-C4gh2n2Z.js +104 -0
- package/dist/browser/editor-runtime/dist-C4gh2n2Z.js.map +1 -0
- package/dist/delivery/answer-grid.d.ts +1 -0
- package/dist/delivery/answer-grid.js +34 -26
- package/dist/delivery/index.js +2 -2
- package/dist/delivery/main.js +2 -2
- package/dist/index.iife.js +34 -34
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +1 -1
- package/package.json +35 -27
- package/dist/author/common.d.ts +0 -22
- package/dist/browser/Typography-BRnAIZOH.js.map +0 -1
- package/dist/browser/dist-i687VHmY.js.map +0 -1
- package/dist/browser/match.css +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as e } from "../browser-kkT1XVKw.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Nt as t, O as n, a as r, d as i, dt as a, f as o, ft as s, ht as c, k as l, n as u, p as d, pt as f, r as p, t as m, u as h, x as g } from "../Typography-BX-ak3_U.js";
|
|
3
3
|
import _, { useRef as v } from "react";
|
|
4
4
|
import { createRoot as y } from "react-dom/client";
|
|
5
5
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
6
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
7
|
-
var S = /* @__PURE__ */ e(
|
|
7
|
+
var S = /* @__PURE__ */ e(t(), 1), C = "height ease-in 300ms, opacity ease-in 300ms", w = c("div")(() => ({
|
|
8
8
|
position: "relative",
|
|
9
9
|
height: 0,
|
|
10
10
|
overflow: "hidden",
|
|
@@ -137,7 +137,7 @@ D.propTypes = {
|
|
|
137
137
|
fgFill: S.default.string.isRequired,
|
|
138
138
|
borderFill: S.default.string.isRequired
|
|
139
139
|
};
|
|
140
|
-
var ee =
|
|
140
|
+
var ee = c("div")(({ size: e }) => ({
|
|
141
141
|
width: e || "25px",
|
|
142
142
|
height: e || "25px"
|
|
143
143
|
})), O = ({ open: e, size: t }) => /* @__PURE__ */ b(ee, {
|
|
@@ -156,7 +156,7 @@ O.propTypes = {
|
|
|
156
156
|
size: S.default.string
|
|
157
157
|
}, O.defaultProps = { open: !1 };
|
|
158
158
|
//#endregion
|
|
159
|
-
//#region ../../
|
|
159
|
+
//#region ../../shared/translator/dist/en.js
|
|
160
160
|
var te = {
|
|
161
161
|
translation: {
|
|
162
162
|
categorize: {
|
|
@@ -219,6 +219,23 @@ var te = {
|
|
|
219
219
|
reset: "Reset"
|
|
220
220
|
},
|
|
221
221
|
mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
|
|
222
|
+
mcPopulatedBlank: {
|
|
223
|
+
answerChoices: "Answer choices",
|
|
224
|
+
blankLabel: "blank",
|
|
225
|
+
emptyBlank: "(blank)",
|
|
226
|
+
blankPreSelectionHint: "The answer you choose will appear on the blank line above.",
|
|
227
|
+
correctAnswerSelected: "Correct answer selected",
|
|
228
|
+
incorrectAnswerSelected: "Incorrect answer selected",
|
|
229
|
+
selectedAnswerImage: "Selected answer image",
|
|
230
|
+
choiceImage: "Choice {{id}}",
|
|
231
|
+
clickToEnableAutoplay: "Click to enable audio autoplay",
|
|
232
|
+
audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
|
|
233
|
+
listen: "Listen",
|
|
234
|
+
listenSilentAlt: "Repeat instructions",
|
|
235
|
+
listenPlayingAlt: "Instructions are playing",
|
|
236
|
+
printAudio: "Audio:",
|
|
237
|
+
printTranscript: "Transcript:"
|
|
238
|
+
},
|
|
222
239
|
multipleChoice: {
|
|
223
240
|
minSelections: "Select at least {{minSelections}}.",
|
|
224
241
|
maxSelections_one: "Only {{maxSelections}} answer is allowed.",
|
|
@@ -231,6 +248,38 @@ var te = {
|
|
|
231
248
|
correctAnswerNotSelected: "Correct Answer Not Selected",
|
|
232
249
|
incorrectSelection: "Incorrect Selection",
|
|
233
250
|
key: "Key"
|
|
251
|
+
},
|
|
252
|
+
simpleCloze: {
|
|
253
|
+
correctAnswerShown: "Correct answer",
|
|
254
|
+
correct: "Correct",
|
|
255
|
+
incorrect: "Incorrect",
|
|
256
|
+
unanswered: "No answer",
|
|
257
|
+
placeholder: "Enter your answer...",
|
|
258
|
+
answerInput: "Your answer",
|
|
259
|
+
printCorrectAnswer: "Correct answer:",
|
|
260
|
+
printAnswerBlank: "Answer blank"
|
|
261
|
+
},
|
|
262
|
+
vennClassification: {
|
|
263
|
+
tray: "Tiles to classify",
|
|
264
|
+
unknownTarget: "unknown",
|
|
265
|
+
cancelled: "Cancelled",
|
|
266
|
+
returnedToTray: "{{name}} returned to tray",
|
|
267
|
+
placedIn: "{{name}} placed in {{target}}",
|
|
268
|
+
pickedUp: "Picked up {{name}}",
|
|
269
|
+
pickedUpWithKeyboard: "Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.",
|
|
270
|
+
dropTarget: "Drop target: {{target}}",
|
|
271
|
+
unsupportedCircles_one: "This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.",
|
|
272
|
+
unsupportedCircles_other: "This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.",
|
|
273
|
+
setNumber: "Set {{number}}",
|
|
274
|
+
regionOnly: "{{set}} only",
|
|
275
|
+
regionNeither: "Neither {{first}} nor {{second}}",
|
|
276
|
+
regionNoneOf: "None of {{sets}}",
|
|
277
|
+
regionAndSeparator: " and ",
|
|
278
|
+
tileFallbackName: "Tile",
|
|
279
|
+
tileNotPlaced: "not placed",
|
|
280
|
+
tileInRegion: "in {{region}}",
|
|
281
|
+
tileCorrect: "correct",
|
|
282
|
+
tileIncorrect: "incorrect"
|
|
234
283
|
}
|
|
235
284
|
},
|
|
236
285
|
common: {
|
|
@@ -240,6 +289,8 @@ var te = {
|
|
|
240
289
|
incorrect: "Incorrect",
|
|
241
290
|
showCorrectAnswer: "Show correct answer",
|
|
242
291
|
hideCorrectAnswer: "Hide correct answer",
|
|
292
|
+
showTeacherInstructions: "Show Teacher Instructions",
|
|
293
|
+
hideTeacherInstructions: "Hide Teacher Instructions",
|
|
243
294
|
commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
|
|
244
295
|
warning: "Warning",
|
|
245
296
|
showNote: "Show Note",
|
|
@@ -308,6 +359,23 @@ var te = {
|
|
|
308
359
|
reset: "Reiniciar"
|
|
309
360
|
},
|
|
310
361
|
mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
|
|
362
|
+
mcPopulatedBlank: {
|
|
363
|
+
answerChoices: "Opciones de respuesta",
|
|
364
|
+
blankLabel: "espacio en blanco",
|
|
365
|
+
emptyBlank: "(en blanco)",
|
|
366
|
+
blankPreSelectionHint: "La respuesta que elijas aparecerá en la línea en blanco de arriba.",
|
|
367
|
+
correctAnswerSelected: "Respuesta correcta seleccionada",
|
|
368
|
+
incorrectAnswerSelected: "Respuesta incorrecta seleccionada",
|
|
369
|
+
selectedAnswerImage: "Imagen de la respuesta seleccionada",
|
|
370
|
+
choiceImage: "Opción {{id}}",
|
|
371
|
+
clickToEnableAutoplay: "Haz clic para activar la reproducción automática del audio",
|
|
372
|
+
audioResourceUnavailable: "El audio está activado, pero no hay una URL de audio reproducible configurada.",
|
|
373
|
+
listen: "Escuchar",
|
|
374
|
+
listenSilentAlt: "Escuchar. Repetir las instrucciones.",
|
|
375
|
+
listenPlayingAlt: "Escuchar. Estas son las instrucciones.",
|
|
376
|
+
printAudio: "Audio:",
|
|
377
|
+
printTranscript: "Transcripción:"
|
|
378
|
+
},
|
|
311
379
|
multipleChoice: {
|
|
312
380
|
minSelections: "Seleccione al menos {{minSelections}}.",
|
|
313
381
|
maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
|
|
@@ -320,15 +388,49 @@ var te = {
|
|
|
320
388
|
correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
|
|
321
389
|
incorrectSelection: "Selección Incorrecta",
|
|
322
390
|
key: "Clave"
|
|
391
|
+
},
|
|
392
|
+
simpleCloze: {
|
|
393
|
+
correctAnswerShown: "Respuesta correcta",
|
|
394
|
+
correct: "Correcto",
|
|
395
|
+
incorrect: "Incorrecto",
|
|
396
|
+
unanswered: "Sin respuesta",
|
|
397
|
+
placeholder: "Escribe tu respuesta...",
|
|
398
|
+
answerInput: "Tu respuesta",
|
|
399
|
+
printCorrectAnswer: "Respuesta correcta:",
|
|
400
|
+
printAnswerBlank: "Espacio para la respuesta"
|
|
401
|
+
},
|
|
402
|
+
vennClassification: {
|
|
403
|
+
tray: "Fichas para clasificar",
|
|
404
|
+
unknownTarget: "desconocido",
|
|
405
|
+
cancelled: "Cancelado",
|
|
406
|
+
returnedToTray: "Se devolvió {{name}} a la bandeja",
|
|
407
|
+
placedIn: "Se colocó {{name}} en {{target}}",
|
|
408
|
+
pickedUp: "Se tomó {{name}}",
|
|
409
|
+
pickedUpWithKeyboard: "Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.",
|
|
410
|
+
dropTarget: "Destino: {{target}}",
|
|
411
|
+
unsupportedCircles_one: "No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.",
|
|
412
|
+
unsupportedCircles_other: "No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.",
|
|
413
|
+
setNumber: "Conjunto {{number}}",
|
|
414
|
+
regionOnly: "Solo {{set}}",
|
|
415
|
+
regionNeither: "Ni {{first}} ni {{second}}",
|
|
416
|
+
regionNoneOf: "Ninguno de {{sets}}",
|
|
417
|
+
regionAndSeparator: " y ",
|
|
418
|
+
tileFallbackName: "Ficha",
|
|
419
|
+
tileNotPlaced: "sin colocar",
|
|
420
|
+
tileInRegion: "en {{region}}",
|
|
421
|
+
tileCorrect: "correcta",
|
|
422
|
+
tileIncorrect: "incorrecta"
|
|
323
423
|
}
|
|
324
424
|
},
|
|
325
425
|
common: {
|
|
326
426
|
undo: "Deshacer",
|
|
327
427
|
clearAll: "Borrar todo",
|
|
328
|
-
correct: "
|
|
329
|
-
incorrect: "
|
|
428
|
+
correct: "Correcto",
|
|
429
|
+
incorrect: "Incorrecto",
|
|
330
430
|
showCorrectAnswer: "Mostrar respuesta correcta",
|
|
331
431
|
hideCorrectAnswer: "Ocultar respuesta correcta",
|
|
432
|
+
showTeacherInstructions: "Mostrar instrucciones para el maestro",
|
|
433
|
+
hideTeacherInstructions: "Ocultar instrucciones para el maestro",
|
|
332
434
|
commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
|
|
333
435
|
warning: "Advertencia",
|
|
334
436
|
showNote: "Mostrar Nota",
|
|
@@ -947,7 +1049,7 @@ var Ce = {}, z = (e) => !k(e) && typeof e != "boolean" && typeof e != "number",
|
|
|
947
1049
|
init(e = {}) {
|
|
948
1050
|
e.interpolation ||= { escapeValue: !0 };
|
|
949
1051
|
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
|
|
950
|
-
this.escape = t === void 0 ? pe : t, this.escapeValue = n === void 0
|
|
1052
|
+
this.escape = t === void 0 ? pe : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? N(i) : a || "{{", this.suffix = o ? N(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? N(d) : f || N("$t("), this.nestingSuffix = p ? N(p) : m || N(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
|
|
951
1053
|
}
|
|
952
1054
|
reset() {
|
|
953
1055
|
this.options && this.init(this.options);
|
|
@@ -1536,11 +1638,11 @@ var Ce = {}, z = (e) => !k(e) && typeof e != "boolean" && typeof e != "number",
|
|
|
1536
1638
|
}
|
|
1537
1639
|
}.createInstance();
|
|
1538
1640
|
//#endregion
|
|
1539
|
-
//#region ../../
|
|
1641
|
+
//#region ../../shared/translator/dist/index.js
|
|
1540
1642
|
W.createInstance, W.dir, W.init, W.loadResources, W.reloadResources, W.use, W.changeLanguage, W.getFixedT, W.t, W.exists, W.setDefaultNamespace, W.hasLoadedNamespace, W.loadNamespaces, W.loadLanguages, W.init({
|
|
1541
1643
|
fallbackLng: "en",
|
|
1542
1644
|
lng: "en",
|
|
1543
|
-
|
|
1645
|
+
showSupportNotice: !1,
|
|
1544
1646
|
resources: {
|
|
1545
1647
|
en: te,
|
|
1546
1648
|
es: ne
|
|
@@ -1586,29 +1688,29 @@ function G(e) {
|
|
|
1586
1688
|
function Ue(e, t) {
|
|
1587
1689
|
return !e || G(e) ? e : G(e.default) ? e.default : t && G(e[t]) ? e[t] : t && G(e[t]?.default) ? e[t].default : e;
|
|
1588
1690
|
}
|
|
1589
|
-
var We = Ue(
|
|
1691
|
+
var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.default, Ke = K && typeof K == "object" ? K : Ge, { translator: q } = He, qe = {
|
|
1590
1692
|
WebkitTouchCallout: "none",
|
|
1591
1693
|
WebkitUserSelect: "none",
|
|
1592
1694
|
KhtmlUserSelect: "none",
|
|
1593
1695
|
MozUserSelect: "none",
|
|
1594
1696
|
msUserSelect: "none",
|
|
1595
1697
|
userSelect: "none"
|
|
1596
|
-
}, Je =
|
|
1698
|
+
}, Je = c("div")(() => ({
|
|
1597
1699
|
width: "100%",
|
|
1598
1700
|
cursor: "pointer"
|
|
1599
|
-
})), Ye =
|
|
1701
|
+
})), Ye = c("div")(() => ({
|
|
1600
1702
|
margin: "0 auto",
|
|
1601
1703
|
textAlign: "center",
|
|
1602
1704
|
display: "flex"
|
|
1603
|
-
})), Xe =
|
|
1705
|
+
})), Xe = c("div")(() => ({
|
|
1604
1706
|
width: "fit-content",
|
|
1605
1707
|
minWidth: "140px",
|
|
1606
1708
|
alignSelf: "center",
|
|
1607
1709
|
verticalAlign: "middle",
|
|
1608
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
1710
|
+
color: `var(--correct-answer-toggle-label-color, ${s.text()})`,
|
|
1609
1711
|
fontWeight: "normal",
|
|
1610
1712
|
...qe
|
|
1611
|
-
})), Ze =
|
|
1713
|
+
})), Ze = c("div")(() => ({
|
|
1612
1714
|
position: "absolute",
|
|
1613
1715
|
width: "25px",
|
|
1614
1716
|
"&.enter": { opacity: "0" },
|
|
@@ -1621,7 +1723,7 @@ var We = Ue(s, "Readable") || Ue(Ke.Readable, "Readable"), Ge = i, K = Ge.defaul
|
|
|
1621
1723
|
opacity: "0",
|
|
1622
1724
|
transition: "opacity 0.3s ease-in"
|
|
1623
1725
|
}
|
|
1624
|
-
})), Qe =
|
|
1726
|
+
})), Qe = c("div")(() => ({
|
|
1625
1727
|
width: "25px",
|
|
1626
1728
|
marginRight: "5px",
|
|
1627
1729
|
display: "flex",
|
|
@@ -1712,21 +1814,21 @@ var We = Ue(s, "Readable") || Ue(Ke.Readable, "Readable"), Ge = i, K = Ge.defaul
|
|
|
1712
1814
|
})
|
|
1713
1815
|
});
|
|
1714
1816
|
}
|
|
1715
|
-
}, et =
|
|
1817
|
+
}, et = c("div")(({ theme: e }) => ({
|
|
1716
1818
|
marginLeft: "auto",
|
|
1717
1819
|
marginRight: "auto",
|
|
1718
1820
|
marginTop: e.spacing(1),
|
|
1719
1821
|
marginBottom: e.spacing(1)
|
|
1720
|
-
})), tt =
|
|
1822
|
+
})), tt = c("td")({ padding: "5px 0" }), nt = c(m)(({ theme: e }) => ({ margin: e.spacing(2) })), rt = c("th")({ padding: 0 }), J = c("div")(({ theme: e, isQuestionText: t }) => ({
|
|
1721
1823
|
padding: e.spacing(1.5),
|
|
1722
1824
|
textAlign: t ? "left" : "center"
|
|
1723
|
-
})), it =
|
|
1825
|
+
})), it = c("tr")({
|
|
1724
1826
|
border: 0,
|
|
1725
|
-
borderTop: `2.5px solid ${
|
|
1827
|
+
borderTop: `2.5px solid ${s.primaryLight()}`,
|
|
1726
1828
|
width: "100%"
|
|
1727
|
-
}), at =
|
|
1728
|
-
color:
|
|
1729
|
-
backgroundColor:
|
|
1829
|
+
}), at = c("table")({
|
|
1830
|
+
color: s.text(),
|
|
1831
|
+
backgroundColor: s.background(),
|
|
1730
1832
|
borderCollapse: "collapse",
|
|
1731
1833
|
borderSpacing: 0,
|
|
1732
1834
|
marginBottom: 0
|
|
@@ -1755,14 +1857,18 @@ var We = Ue(s, "Readable") || Ue(Ke.Readable, "Readable"), Ge = i, K = Ge.defaul
|
|
|
1755
1857
|
let { correctAnswers: r } = this.props;
|
|
1756
1858
|
return r[e][n] === !0 && t === !1 || r[e][n] === !1 && t === !0;
|
|
1757
1859
|
};
|
|
1860
|
+
controlColor = (e, t, n) => {
|
|
1861
|
+
let { showCorrect: r, disabled: i, view: a } = this.props, o = i && !a;
|
|
1862
|
+
return r && t === !0 || o && this.answerIsCorrect(e, t, n) ? s.correct() : o && this.answerIsIncorrect(e, t, n) ? s.incorrect() : t === !0 && !o ? s.primary() : i ? s.disabled() : s.text();
|
|
1863
|
+
};
|
|
1758
1864
|
render() {
|
|
1759
|
-
let {
|
|
1760
|
-
return !
|
|
1865
|
+
let { headers: e, rows: t, choiceMode: n, answers: r, disabled: i } = this.props, a = n === "radio" ? p : u;
|
|
1866
|
+
return !t || t.length === 0 ? /* @__PURE__ */ b(et, { children: /* @__PURE__ */ b(nt, {
|
|
1761
1867
|
component: "div",
|
|
1762
1868
|
children: "There are currently no questions to show."
|
|
1763
1869
|
}) }) : /* @__PURE__ */ b(et, { children: /* @__PURE__ */ x(at, { children: [
|
|
1764
|
-
/* @__PURE__ */ b("colgroup", { children: (
|
|
1765
|
-
/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ b("tr", { children: (
|
|
1870
|
+
/* @__PURE__ */ b("colgroup", { children: (e || []).map((e, t) => /* @__PURE__ */ b("col", {}, `col-${t}`)) }),
|
|
1871
|
+
/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ b("tr", { children: (e || []).map((e, t) => /* @__PURE__ */ b(rt, {
|
|
1766
1872
|
"data-colno": `${t}`,
|
|
1767
1873
|
scope: "row",
|
|
1768
1874
|
children: /* @__PURE__ */ b(J, {
|
|
@@ -1770,33 +1876,37 @@ var We = Ue(s, "Readable") || Ue(Ke.Readable, "Readable"), Ge = i, K = Ge.defaul
|
|
|
1770
1876
|
dangerouslySetInnerHTML: { __html: e }
|
|
1771
1877
|
})
|
|
1772
1878
|
}, `th-${t}`)) }) }),
|
|
1773
|
-
(
|
|
1879
|
+
(t || []).map((e, t) => /* @__PURE__ */ b("tbody", {
|
|
1774
1880
|
role: "group",
|
|
1775
1881
|
children: /* @__PURE__ */ x(it, { children: [/* @__PURE__ */ b("td", {
|
|
1776
1882
|
"data-colno": "0",
|
|
1777
1883
|
children: /* @__PURE__ */ b(J, {
|
|
1778
1884
|
isQuestionText: !0,
|
|
1779
|
-
dangerouslySetInnerHTML: { __html:
|
|
1885
|
+
dangerouslySetInnerHTML: { __html: e.title }
|
|
1780
1886
|
})
|
|
1781
|
-
}, `td-title-${
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1887
|
+
}, `td-title-${t}`), (r[e.id] || []).map((n, r) => {
|
|
1888
|
+
let o = this.controlColor(e.id, n, r);
|
|
1889
|
+
return /* @__PURE__ */ b(tt, {
|
|
1890
|
+
"data-colno": `${r + 1}`,
|
|
1891
|
+
children: /* @__PURE__ */ b(J, { children: /* @__PURE__ */ b(a, {
|
|
1892
|
+
sx: {
|
|
1893
|
+
padding: "6px",
|
|
1894
|
+
color: o,
|
|
1895
|
+
"&&.Mui-checked": { color: o },
|
|
1896
|
+
"&&.Mui-disabled": { color: o },
|
|
1897
|
+
cursor: i ? "not-allowed" : "pointer",
|
|
1898
|
+
pointerEvents: i ? "initial" : "auto",
|
|
1899
|
+
opacity: i ? .7 : 1,
|
|
1900
|
+
"& input": { width: "100% !important" },
|
|
1901
|
+
"&&:hover:not(.Mui-disabled)": { color: s.primaryLight() }
|
|
1902
|
+
},
|
|
1903
|
+
disabled: i,
|
|
1904
|
+
onChange: this.onRowValueChange(e.id, r),
|
|
1905
|
+
checked: n === !0
|
|
1906
|
+
}) })
|
|
1907
|
+
}, `td-${t}-${r}`);
|
|
1908
|
+
})] })
|
|
1909
|
+
}, `row-${t}`))
|
|
1800
1910
|
] }) });
|
|
1801
1911
|
}
|
|
1802
1912
|
};
|
|
@@ -1808,7 +1918,7 @@ function Y(e) {
|
|
|
1808
1918
|
function X(e, t) {
|
|
1809
1919
|
return !e || Y(e) ? e : Y(e.default) ? e.default : t && Y(e[t]) ? e[t] : t && Y(e[t]?.default) ? e[t].default : e;
|
|
1810
1920
|
}
|
|
1811
|
-
var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt") || X($.PreviewPrompt, "PreviewPrompt"), ct = X(
|
|
1921
|
+
var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt") || X($.PreviewPrompt, "PreviewPrompt"), ct = X(a, "Feedback") || X($.Feedback, "Feedback"), lt = X(n, "Collapsible") || X($.Collapsible, "Collapsible"), ut = r, Q = ut.default, $ = Q && typeof Q == "object" ? Q : ut, dt = c("div")({ verticalAlign: "middle" }), ft = c(lt)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), pt = class extends _.Component {
|
|
1812
1922
|
static propTypes = {
|
|
1813
1923
|
session: S.default.object.isRequired,
|
|
1814
1924
|
onSessionChange: S.default.func,
|
|
@@ -1859,11 +1969,11 @@ var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt"
|
|
|
1859
1969
|
} }), this.callOnSessionChange);
|
|
1860
1970
|
};
|
|
1861
1971
|
render() {
|
|
1862
|
-
let { model: e } = this.props, { showCorrect: t, session: n } = this.state, { correctness: r = {}, extraCSSRules:
|
|
1972
|
+
let { model: e } = this.props, { showCorrect: t, session: n } = this.state, { correctness: r = {}, extraCSSRules: a, language: o } = e, s = r.correctness && r.correctness !== "correct", c = e.rationale && (i(e.rationale) || h(e.rationale));
|
|
1863
1973
|
return /* @__PURE__ */ x(st, {
|
|
1864
|
-
extraCSSRules:
|
|
1974
|
+
extraCSSRules: a,
|
|
1865
1975
|
children: [
|
|
1866
|
-
e.teacherInstructions && (
|
|
1976
|
+
e.teacherInstructions && (i(e.teacherInstructions) || h(e.teacherInstructions)) && /* @__PURE__ */ b(ft, {
|
|
1867
1977
|
labels: {
|
|
1868
1978
|
hidden: "Show Teacher Instructions",
|
|
1869
1979
|
visible: "Hide Teacher Instructions"
|
|
@@ -1919,8 +2029,6 @@ var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt"
|
|
|
1919
2029
|
}), this.component = t, this.complete = n;
|
|
1920
2030
|
}
|
|
1921
2031
|
});
|
|
1922
|
-
//#endregion
|
|
1923
|
-
//#region ../../shared/player-events/dist/index.js
|
|
1924
2032
|
var mt = class e extends CustomEvent {
|
|
1925
2033
|
static {
|
|
1926
2034
|
this.TYPE = "session-changed";
|
|
@@ -1971,11 +2079,11 @@ var mt = class e extends CustomEvent {
|
|
|
1971
2079
|
onSessionChange: this.sessionChanged.bind(this)
|
|
1972
2080
|
});
|
|
1973
2081
|
this._root ||= y(this), this._root.render(e), queueMicrotask(() => {
|
|
1974
|
-
|
|
2082
|
+
l(this);
|
|
1975
2083
|
});
|
|
1976
2084
|
}
|
|
1977
2085
|
disconnectedCallback() {
|
|
1978
|
-
this._root
|
|
2086
|
+
this._root &&= (this._root.unmount(), null);
|
|
1979
2087
|
}
|
|
1980
2088
|
};
|
|
1981
2089
|
//#endregion
|