@pie-element/match 13.0.2-next.20261007003844 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Typography-80i6nIWE.js → Typography-DTh3V6l1.js} +3525 -2599
- package/dist/browser/Typography-DTh3V6l1.js.map +1 -0
- package/dist/browser/author/index.js +1382 -1382
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +85 -85
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{Typography-Dbijy3Wq.js → Typography-DrUWMCh4.js} +3525 -2599
- package/dist/browser/editor-runtime/Typography-DrUWMCh4.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +4141 -4141
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +85 -85
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BN-HNiDQ.js → mathjax-BKrHE4xs-DTPPGzax.js} +2 -2
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BN-HNiDQ.js.map → mathjax-BKrHE4xs-DTPPGzax.js.map} +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-B6VhspKa.js → mathjax-BKrHE4xs-qFUhPPLT.js} +2 -2
- package/dist/browser/{mathjax-BKrHE4xs-B6VhspKa.js.map → mathjax-BKrHE4xs-qFUhPPLT.js.map} +1 -1
- package/dist/delivery/answer-grid.js +23 -22
- package/dist/index.iife.js +51 -49
- package/package.json +15 -14
- package/dist/browser/Typography-80i6nIWE.js.map +0 -1
- package/dist/browser/editor-runtime/Typography-Dbijy3Wq.js.map +0 -1
|
@@ -6,26 +6,27 @@ import o from "@mui/material/Radio";
|
|
|
6
6
|
import s from "@mui/material/Checkbox";
|
|
7
7
|
import c from "@mui/material/Typography";
|
|
8
8
|
import { styled as l } from "@mui/material/styles";
|
|
9
|
+
import { sanitizeModelHtml as u } from "@pie-element/shared-utils";
|
|
9
10
|
//#region src/delivery/answer-grid.tsx
|
|
10
|
-
var
|
|
11
|
+
var d = l("div")(({ theme: e }) => ({
|
|
11
12
|
marginLeft: "auto",
|
|
12
13
|
marginRight: "auto",
|
|
13
14
|
marginTop: e.spacing(1),
|
|
14
15
|
marginBottom: e.spacing(1)
|
|
15
|
-
})),
|
|
16
|
+
})), f = l("td")({ padding: "5px 0" }), p = l(c)(({ theme: e }) => ({ margin: e.spacing(2) })), m = l("th")({ padding: 0 }), h = l("div")(({ theme: e, isQuestionText: t }) => ({
|
|
16
17
|
padding: e.spacing(1.5),
|
|
17
18
|
textAlign: t ? "left" : "center"
|
|
18
|
-
})),
|
|
19
|
+
})), g = l("tr")({
|
|
19
20
|
border: 0,
|
|
20
21
|
borderTop: `2.5px solid ${n.primaryLight()}`,
|
|
21
22
|
width: "100%"
|
|
22
|
-
}),
|
|
23
|
+
}), _ = l("table")({
|
|
23
24
|
color: n.text(),
|
|
24
25
|
backgroundColor: n.background(),
|
|
25
26
|
borderCollapse: "collapse",
|
|
26
27
|
borderSpacing: 0,
|
|
27
28
|
marginBottom: 0
|
|
28
|
-
}),
|
|
29
|
+
}), v = class extends e.Component {
|
|
29
30
|
static propTypes = {
|
|
30
31
|
correctAnswers: t.object,
|
|
31
32
|
view: t.bool.isRequired,
|
|
@@ -56,36 +57,36 @@ var u = l("div")(({ theme: e }) => ({
|
|
|
56
57
|
return i && t === !0 || s && this.answerIsCorrect(e, t, r) ? n.correct() : s && this.answerIsIncorrect(e, t, r) ? n.incorrect() : t === !0 && !s ? n.primary() : a ? n.disabled() : n.text();
|
|
57
58
|
};
|
|
58
59
|
render() {
|
|
59
|
-
let { headers: e, rows: t, choiceMode: r, answers: c, disabled: l } = this.props,
|
|
60
|
-
return !t || t.length === 0 ? /* @__PURE__ */ i(
|
|
60
|
+
let { headers: e, rows: t, choiceMode: r, answers: c, disabled: l } = this.props, v = r === "radio" ? o : s, y = (e) => `${this.instanceId}-header-${e}`, b = (e) => `${this.instanceId}-row-${e}`, x = (e) => r === "radio" ? `${this.instanceId}-row-${e}-choice` : void 0;
|
|
61
|
+
return !t || t.length === 0 ? /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(p, {
|
|
61
62
|
component: "div",
|
|
62
63
|
children: "There are currently no questions to show."
|
|
63
|
-
}) }) : /* @__PURE__ */ i(
|
|
64
|
+
}) }) : /* @__PURE__ */ i(d, { children: /* @__PURE__ */ a(_, { children: [
|
|
64
65
|
/* @__PURE__ */ i("colgroup", { children: (e || []).map((e, t) => /* @__PURE__ */ i("col", {}, `col-${t}`)) }),
|
|
65
|
-
/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: (e || []).map((e, t) => /* @__PURE__ */ i(
|
|
66
|
-
id:
|
|
66
|
+
/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: (e || []).map((e, t) => /* @__PURE__ */ i(m, {
|
|
67
|
+
id: y(t),
|
|
67
68
|
"data-colno": `${t}`,
|
|
68
69
|
scope: "col",
|
|
69
|
-
children: /* @__PURE__ */ i(
|
|
70
|
+
children: /* @__PURE__ */ i(h, {
|
|
70
71
|
isQuestionText: t === 0,
|
|
71
|
-
dangerouslySetInnerHTML: { __html: e }
|
|
72
|
+
dangerouslySetInnerHTML: { __html: u(e) }
|
|
72
73
|
})
|
|
73
74
|
}, `th-${t}`)) }) }),
|
|
74
75
|
(t || []).map((e, t) => /* @__PURE__ */ i("tbody", {
|
|
75
76
|
role: r === "radio" ? "radiogroup" : "group",
|
|
76
|
-
"aria-labelledby":
|
|
77
|
-
children: /* @__PURE__ */ a(
|
|
78
|
-
id:
|
|
77
|
+
"aria-labelledby": b(t),
|
|
78
|
+
children: /* @__PURE__ */ a(g, { children: [/* @__PURE__ */ i("td", {
|
|
79
|
+
id: b(t),
|
|
79
80
|
"data-colno": "0",
|
|
80
|
-
children: /* @__PURE__ */ i(
|
|
81
|
+
children: /* @__PURE__ */ i(h, {
|
|
81
82
|
isQuestionText: !0,
|
|
82
|
-
dangerouslySetInnerHTML: { __html: e.title }
|
|
83
|
+
dangerouslySetInnerHTML: { __html: u(e.title) }
|
|
83
84
|
})
|
|
84
85
|
}, `td-title-${t}`), (c[e.id] || []).map((r, a) => {
|
|
85
86
|
let o = this.controlColor(e.id, r, a);
|
|
86
|
-
return /* @__PURE__ */ i(
|
|
87
|
+
return /* @__PURE__ */ i(f, {
|
|
87
88
|
"data-colno": `${a + 1}`,
|
|
88
|
-
children: /* @__PURE__ */ i(
|
|
89
|
+
children: /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(v, {
|
|
89
90
|
sx: {
|
|
90
91
|
padding: "6px",
|
|
91
92
|
color: o,
|
|
@@ -97,8 +98,8 @@ var u = l("div")(({ theme: e }) => ({
|
|
|
97
98
|
"& input": { width: "100% !important" },
|
|
98
99
|
"&&:hover:not(.Mui-disabled)": { color: n.primaryLight() }
|
|
99
100
|
},
|
|
100
|
-
slotProps: { input: { "aria-labelledby": `${
|
|
101
|
-
name:
|
|
101
|
+
slotProps: { input: { "aria-labelledby": `${b(t)} ${y(a + 1)}` } },
|
|
102
|
+
name: x(t),
|
|
102
103
|
disabled: l,
|
|
103
104
|
onChange: this.onRowValueChange(e.id, a),
|
|
104
105
|
checked: r === !0
|
|
@@ -110,4 +111,4 @@ var u = l("div")(({ theme: e }) => ({
|
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
//#endregion
|
|
113
|
-
export {
|
|
114
|
+
export { v as AnswerGrid, v as default };
|