@pie-element/multiple-choice 13.4.0-next.28 → 13.4.0-next.29
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-DD6UDOZ_.js → Radio-CfqdhvRH.js} +678 -639
- package/dist/browser/{Radio-DD6UDOZ_.js.map → Radio-CfqdhvRH.js.map} +1 -1
- package/dist/browser/author/index.js +7905 -7904
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +5 -5
- package/dist/browser/editor-runtime/{Radio-DiH4cqzG.js → Radio-D3ynJgVj.js} +432 -393
- package/dist/browser/editor-runtime/{Radio-DiH4cqzG.js.map → Radio-D3ynJgVj.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +4054 -4053
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/{main-DbK4bklz.js → editor-runtime/main-BzlfiDu3.js} +108 -108
- package/dist/browser/editor-runtime/{main-DenzIgyo.js.map → main-BzlfiDu3.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{editor-runtime/main-DenzIgyo.js → main-0JQfvG0B.js} +72 -72
- package/dist/browser/{main-DbK4bklz.js.map → main-0JQfvG0B.js.map} +1 -1
- package/dist/browser/print/index.js +6 -6
- package/dist/index.iife.js +21 -21
- package/module/print.js +654 -647
- package/module/print.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as i, t as a } from "../main-
|
|
1
|
+
import { I as e, N as t, Wt as n, s as r } from "../Radio-D3ynJgVj.js";
|
|
2
|
+
import { n as i, t as a } from "../main-BzlfiDu3.js";
|
|
3
3
|
import { c as o } from "../dist-CHbLnyuX.js";
|
|
4
4
|
import s from "react";
|
|
5
5
|
import { createRoot as c } from "react-dom/client";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Lt as e, Wt as t, _t as n, bt as r, g as i, gt as a, h as o, i as s, j as c, jt as l, n as u, o as d, p as f, s as p, t as m, vt as h, w as g, zt as _ } from "./Radio-D3ynJgVj.js";
|
|
2
2
|
import v, { useRef as y } from "react";
|
|
3
3
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
4
4
|
//#region ../../lib-react/icons/dist/correct-response-icon.js
|
|
5
|
-
var C = /* @__PURE__ */
|
|
5
|
+
var C = /* @__PURE__ */ t(_(), 1), w = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ S("svg", {
|
|
6
6
|
preserveAspectRatio: "xMinYMin meet",
|
|
7
7
|
version: "1.1",
|
|
8
8
|
viewBox: "-283 359 34 35",
|
|
@@ -73,7 +73,7 @@ T.propTypes = {
|
|
|
73
73
|
fgFill: C.default.string.isRequired,
|
|
74
74
|
borderFill: C.default.string.isRequired
|
|
75
75
|
};
|
|
76
|
-
var E =
|
|
76
|
+
var E = r("div")(({ size: e }) => ({
|
|
77
77
|
width: e || "25px",
|
|
78
78
|
height: e || "25px"
|
|
79
79
|
})), D = ({ open: e, size: t }) => /* @__PURE__ */ x(E, {
|
|
@@ -93,7 +93,7 @@ D.propTypes = {
|
|
|
93
93
|
}, D.defaultProps = { open: !1 };
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
96
|
-
var O = "height ease-in 300ms, opacity ease-in 300ms", k =
|
|
96
|
+
var O = "height ease-in 300ms, opacity ease-in 300ms", k = r("div")(() => ({
|
|
97
97
|
position: "relative",
|
|
98
98
|
height: 0,
|
|
99
99
|
overflow: "hidden",
|
|
@@ -128,9 +128,9 @@ var O = "height ease-in 300ms, opacity ease-in 300ms", k = _("div")(() => ({
|
|
|
128
128
|
width: 0
|
|
129
129
|
}
|
|
130
130
|
})), A = (e) => {
|
|
131
|
-
let { show: t, children: n, className: r } = e,
|
|
132
|
-
return /* @__PURE__ */ x(
|
|
133
|
-
nodeRef:
|
|
131
|
+
let { show: t, children: n, className: r } = e, i = y(null);
|
|
132
|
+
return /* @__PURE__ */ x(h, {
|
|
133
|
+
nodeRef: i,
|
|
134
134
|
in: t,
|
|
135
135
|
appear: !0,
|
|
136
136
|
mountOnEnter: !1,
|
|
@@ -142,7 +142,7 @@ var O = "height ease-in 300ms, opacity ease-in 300ms", k = _("div")(() => ({
|
|
|
142
142
|
exitDone: "exit-done"
|
|
143
143
|
},
|
|
144
144
|
children: /* @__PURE__ */ x(k, {
|
|
145
|
-
ref:
|
|
145
|
+
ref: i,
|
|
146
146
|
className: r,
|
|
147
147
|
children: n
|
|
148
148
|
})
|
|
@@ -1686,29 +1686,29 @@ function W(e) {
|
|
|
1686
1686
|
function Ge(e, t) {
|
|
1687
1687
|
return !e || W(e) ? e : W(e.default) ? e.default : t && W(e[t]) ? e[t] : t && W(e[t]?.default) ? e[t].default : e;
|
|
1688
1688
|
}
|
|
1689
|
-
var Ke = Ge(
|
|
1689
|
+
var Ke = Ge(o, "Readable") || Ge(Ye.Readable, "Readable"), qe = p, Je = qe.default, Ye = Je && typeof Je == "object" ? Je : qe, { translator: G } = We, Xe = {
|
|
1690
1690
|
WebkitTouchCallout: "none",
|
|
1691
1691
|
WebkitUserSelect: "none",
|
|
1692
1692
|
KhtmlUserSelect: "none",
|
|
1693
1693
|
MozUserSelect: "none",
|
|
1694
1694
|
msUserSelect: "none",
|
|
1695
1695
|
userSelect: "none"
|
|
1696
|
-
}, Ze =
|
|
1696
|
+
}, Ze = r("div")(() => ({
|
|
1697
1697
|
width: "100%",
|
|
1698
1698
|
cursor: "pointer"
|
|
1699
|
-
})), Qe =
|
|
1699
|
+
})), Qe = r("div")(() => ({
|
|
1700
1700
|
margin: "0 auto",
|
|
1701
1701
|
textAlign: "center",
|
|
1702
1702
|
display: "flex"
|
|
1703
|
-
})), $e =
|
|
1703
|
+
})), $e = r("div")(() => ({
|
|
1704
1704
|
width: "fit-content",
|
|
1705
1705
|
minWidth: "140px",
|
|
1706
1706
|
alignSelf: "center",
|
|
1707
1707
|
verticalAlign: "middle",
|
|
1708
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
1708
|
+
color: `var(--correct-answer-toggle-label-color, ${e.text()})`,
|
|
1709
1709
|
fontWeight: "normal",
|
|
1710
1710
|
...Xe
|
|
1711
|
-
})), et =
|
|
1711
|
+
})), et = r("div")(() => ({
|
|
1712
1712
|
position: "absolute",
|
|
1713
1713
|
width: "25px",
|
|
1714
1714
|
"&.enter": { opacity: "0" },
|
|
@@ -1721,7 +1721,7 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1721
1721
|
opacity: "0",
|
|
1722
1722
|
transition: "opacity 0.3s ease-in"
|
|
1723
1723
|
}
|
|
1724
|
-
})), tt =
|
|
1724
|
+
})), tt = r("div")(() => ({
|
|
1725
1725
|
width: "25px",
|
|
1726
1726
|
marginRight: "5px",
|
|
1727
1727
|
display: "flex",
|
|
@@ -1771,7 +1771,7 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1771
1771
|
children: /* @__PURE__ */ S(Qe, {
|
|
1772
1772
|
onClick: this.onClick.bind(this),
|
|
1773
1773
|
onTouchEnd: this.onTouch.bind(this),
|
|
1774
|
-
children: [/* @__PURE__ */ S(tt, { children: [/* @__PURE__ */ x(
|
|
1774
|
+
children: [/* @__PURE__ */ S(tt, { children: [/* @__PURE__ */ x(h, {
|
|
1775
1775
|
nodeRef: this.openIconRef,
|
|
1776
1776
|
timeout: 400,
|
|
1777
1777
|
in: t,
|
|
@@ -1786,7 +1786,7 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1786
1786
|
ref: this.openIconRef,
|
|
1787
1787
|
children: /* @__PURE__ */ x(D, { open: t }, "correct-open")
|
|
1788
1788
|
})
|
|
1789
|
-
}), /* @__PURE__ */ x(
|
|
1789
|
+
}), /* @__PURE__ */ x(h, {
|
|
1790
1790
|
nodeRef: this.closedIconRef,
|
|
1791
1791
|
timeout: 5e3,
|
|
1792
1792
|
in: !t,
|
|
@@ -1812,7 +1812,7 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1812
1812
|
})
|
|
1813
1813
|
});
|
|
1814
1814
|
}
|
|
1815
|
-
}, rt =
|
|
1815
|
+
}, rt = r(d)({
|
|
1816
1816
|
width: "33px",
|
|
1817
1817
|
height: "33px",
|
|
1818
1818
|
"& svg": {
|
|
@@ -1823,10 +1823,10 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1823
1823
|
verticalAlign: "middle",
|
|
1824
1824
|
"& hide": { display: "none" }
|
|
1825
1825
|
}
|
|
1826
|
-
}), it =
|
|
1827
|
-
"& .incorrect-fill": { fill: `var(--feedback-incorrect-bg-color, ${
|
|
1828
|
-
"& .correct-fill": { fill: `var(--feedback-correct-bg-color, ${
|
|
1829
|
-
}), at =
|
|
1826
|
+
}), it = r("svg")({
|
|
1827
|
+
"& .incorrect-fill": { fill: `var(--feedback-incorrect-bg-color, ${e.incorrect()})` },
|
|
1828
|
+
"& .correct-fill": { fill: `var(--feedback-correct-bg-color, ${e.correct()})` }
|
|
1829
|
+
}), at = r("div")({
|
|
1830
1830
|
position: "relative",
|
|
1831
1831
|
"&.feedback-tick-enter": {
|
|
1832
1832
|
opacity: "0",
|
|
@@ -1887,7 +1887,7 @@ var Ke = Ge(s, "Readable") || Ge(Ye.Readable, "Readable"), qe = m, Je = qe.defau
|
|
|
1887
1887
|
}, "2");
|
|
1888
1888
|
render() {
|
|
1889
1889
|
let { correctness: e } = this.props, t = e === "incorrect" ? this.getIncorrectIcon() : e === "correct" ? this.getCorrectIcon() : null;
|
|
1890
|
-
return /* @__PURE__ */ x(rt, { children: /* @__PURE__ */ x(
|
|
1890
|
+
return /* @__PURE__ */ x(rt, { children: /* @__PURE__ */ x(n, { children: e && /* @__PURE__ */ x(h, {
|
|
1891
1891
|
nodeRef: this.nodeRef,
|
|
1892
1892
|
classNames: {
|
|
1893
1893
|
enter: "feedback-tick-enter",
|
|
@@ -1914,78 +1914,78 @@ function K(e) {
|
|
|
1914
1914
|
function q(e, t) {
|
|
1915
1915
|
return !e || K(e) ? e : K(e.default) ? e.default : t && K(e[t]) ? e[t] : t && K(e[t]?.default) ? e[t].default : e;
|
|
1916
1916
|
}
|
|
1917
|
-
var st = q(
|
|
1917
|
+
var st = q(i, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(a, "Feedback") || q(dt.Feedback, "Feedback"), lt = p, ut = lt.default, dt = ut && typeof ut == "object" ? ut : lt, J = "multiple-choice-component", ft = r(d)({
|
|
1918
1918
|
display: "flex",
|
|
1919
1919
|
alignItems: "center",
|
|
1920
|
-
backgroundColor:
|
|
1921
|
-
}), pt =
|
|
1920
|
+
backgroundColor: e.background()
|
|
1921
|
+
}), pt = r(d)({
|
|
1922
1922
|
display: "flex",
|
|
1923
1923
|
alignItems: "center",
|
|
1924
|
-
backgroundColor:
|
|
1924
|
+
backgroundColor: e.background(),
|
|
1925
1925
|
flex: 1,
|
|
1926
1926
|
"& .MuiFormControlLabel-root": { marginLeft: "-14px" },
|
|
1927
1927
|
"& label": {
|
|
1928
|
-
color:
|
|
1928
|
+
color: e.text(),
|
|
1929
1929
|
"& > span": { fontSize: "inherit" },
|
|
1930
1930
|
"& > .MuiButtonBase-root": { padding: "12px" }
|
|
1931
1931
|
}
|
|
1932
|
-
}), mt =
|
|
1932
|
+
}), mt = r("span")(({ theme: e }) => ({
|
|
1933
1933
|
display: "flex",
|
|
1934
1934
|
alignItems: "center",
|
|
1935
1935
|
"& > span": { marginLeft: `-${e.spacing(1)}` }
|
|
1936
|
-
})), ht =
|
|
1936
|
+
})), ht = r("span")({
|
|
1937
1937
|
position: "absolute",
|
|
1938
1938
|
left: "-10000px",
|
|
1939
1939
|
top: "auto",
|
|
1940
1940
|
width: "1px",
|
|
1941
1941
|
height: "1px",
|
|
1942
1942
|
overflow: "hidden"
|
|
1943
|
-
}), gt =
|
|
1943
|
+
}), gt = r(s)({
|
|
1944
1944
|
"& .MuiFormControlLabel-label": {
|
|
1945
|
-
color: `${
|
|
1946
|
-
backgroundColor:
|
|
1945
|
+
color: `${e.text()} !important`,
|
|
1946
|
+
backgroundColor: e.background(),
|
|
1947
1947
|
letterSpacing: "normal"
|
|
1948
1948
|
},
|
|
1949
1949
|
"&.Mui-disabled *": { cursor: "not-allowed !important" }
|
|
1950
|
-
}), Y = (e, t) => ({ [`&.${J}`]: { color: `var(--choice-input-${e}, ${t}) !important` } }), _t = (
|
|
1951
|
-
let n = (
|
|
1950
|
+
}), Y = (e, t) => ({ [`&.${J}`]: { color: `var(--choice-input-${e}, ${t}) !important` } }), _t = (t) => {
|
|
1951
|
+
let n = (e) => t ? `${t}-${e}` : e;
|
|
1952
1952
|
return {
|
|
1953
1953
|
[n("root")]: {
|
|
1954
|
-
...Y("color",
|
|
1955
|
-
...
|
|
1956
|
-
...
|
|
1954
|
+
...Y("color", e.text()),
|
|
1955
|
+
...t === "correct" ? Y("correct-color", e.text()) : {},
|
|
1956
|
+
...t === "incorrect" ? Y("incorrect-color", e.incorrect()) : {}
|
|
1957
1957
|
},
|
|
1958
1958
|
[n("checked")]: {
|
|
1959
|
-
...
|
|
1960
|
-
...
|
|
1961
|
-
...
|
|
1959
|
+
...t === "correct" ? Y("correct-selected-color", e.correct()) : {},
|
|
1960
|
+
...t === "incorrect" ? Y("incorrect-checked", e.incorrect()) : {},
|
|
1961
|
+
...t ? {} : Y("selected-color", e.primary())
|
|
1962
1962
|
},
|
|
1963
1963
|
[n("disabled")]: {
|
|
1964
|
-
...Y("disabled-color",
|
|
1965
|
-
...
|
|
1966
|
-
...
|
|
1964
|
+
...Y("disabled-color", e.text()),
|
|
1965
|
+
...t === "correct" ? Y("correct-disabled-color", e.disabled()) : {},
|
|
1966
|
+
...t === "incorrect" ? Y("incorrect-disabled-color", e.disabled()) : {},
|
|
1967
1967
|
opacity: .6,
|
|
1968
1968
|
cursor: "not-allowed !important",
|
|
1969
1969
|
pointerEvents: "initial !important"
|
|
1970
1970
|
},
|
|
1971
1971
|
focusVisibleUnchecked: {
|
|
1972
|
-
outline: `2px solid ${
|
|
1972
|
+
outline: `2px solid ${e.keyBoardFocusIndicator()}`,
|
|
1973
1973
|
backgroundColor: "transparent"
|
|
1974
1974
|
},
|
|
1975
1975
|
focusVisibleChecked: {
|
|
1976
|
-
outline: `2px solid ${
|
|
1976
|
+
outline: `2px solid ${e.keyBoardFocusIndicator()}`,
|
|
1977
1977
|
backgroundColor: "transparent"
|
|
1978
1978
|
}
|
|
1979
1979
|
};
|
|
1980
|
-
}, vt =
|
|
1981
|
-
let n = _t(
|
|
1980
|
+
}, vt = r(u, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: t }) => {
|
|
1981
|
+
let n = _t(t), r = (e) => t ? `${t}-${e}` : e;
|
|
1982
1982
|
return {
|
|
1983
1983
|
[`&.${J}`]: {
|
|
1984
1984
|
...n[r("root")],
|
|
1985
1985
|
"&.Mui-checked": n[r("checked")],
|
|
1986
|
-
"&.Mui-disabled":
|
|
1986
|
+
"&.Mui-disabled": t ? {} : n[r("disabled")],
|
|
1987
1987
|
"&:hover:not(.Mui-disabled) svg": {
|
|
1988
|
-
boxShadow: `0px 0px 0px 2px ${
|
|
1988
|
+
boxShadow: `0px 0px 0px 2px ${e.keyBoardFocusIndicator()}`,
|
|
1989
1989
|
borderRadius: "4px"
|
|
1990
1990
|
}
|
|
1991
1991
|
},
|
|
@@ -2008,17 +2008,17 @@ var st = q(a, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(c
|
|
|
2008
2008
|
correctness: t,
|
|
2009
2009
|
className: J
|
|
2010
2010
|
});
|
|
2011
|
-
}, bt =
|
|
2012
|
-
let n = _t(
|
|
2011
|
+
}, bt = r(m, { shouldForwardProp: (e) => e !== "correctness" })(({ correctness: t }) => {
|
|
2012
|
+
let n = _t(t), r = (e) => t ? `${t}-${e}` : e;
|
|
2013
2013
|
return {
|
|
2014
2014
|
[`&.${J}`]: {
|
|
2015
2015
|
...n[r("root")],
|
|
2016
2016
|
"&.Mui-checked": n[r("checked")],
|
|
2017
|
-
"&.Mui-disabled":
|
|
2017
|
+
"&.Mui-disabled": t ? {} : n[r("disabled")],
|
|
2018
2018
|
"&.Mui-focusVisible:not(.Mui-checked)": n.focusVisibleUnchecked,
|
|
2019
2019
|
"&.Mui-focusVisible.Mui-checked": n.focusVisibleChecked,
|
|
2020
2020
|
"&:hover:not(.Mui-disabled) svg": {
|
|
2021
|
-
boxShadow: `0px 0px 0px 2px ${
|
|
2021
|
+
boxShadow: `0px 0px 0px 2px ${e.keyBoardFocusIndicator()}`,
|
|
2022
2022
|
borderRadius: "50%"
|
|
2023
2023
|
}
|
|
2024
2024
|
},
|
|
@@ -2094,7 +2094,7 @@ var st = q(a, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(c
|
|
|
2094
2094
|
c && c.focus();
|
|
2095
2095
|
};
|
|
2096
2096
|
render() {
|
|
2097
|
-
let { choiceMode:
|
|
2097
|
+
let { choiceMode: e, disabled: t, displayKey: n, feedback: r, label: i, correctness: a, className: o, rationale: s, hideTick: c, isEvaluateMode: u, choicesLayout: d, value: f, checked: p, tagName: m, isSelectionButtonBelow: h } = this.props, g = e === "checkbox" ? yt : xt, _ = e === "checkbox" ? "checkbox" : "radio-button", v = {
|
|
2098
2098
|
...d === "horizontal" && { [`& .${J}`]: {
|
|
2099
2099
|
padding: "8px",
|
|
2100
2100
|
margin: "4px 0 4px 4px"
|
|
@@ -2104,31 +2104,31 @@ var st = q(a, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(c
|
|
|
2104
2104
|
justifyContent: "center",
|
|
2105
2105
|
"& > label": { alignItems: "center" }
|
|
2106
2106
|
}
|
|
2107
|
-
}, y = typeof
|
|
2107
|
+
}, y = typeof i == "string" && (i.includes("<math") || i.includes("\\(") || i.includes("\\[") || i.includes("<img") || i.includes("data-latex") || i.includes("data-raw") || i.includes("<mjx-container")), C = n ? /* @__PURE__ */ x(ht, {
|
|
2108
2108
|
id: this.descId,
|
|
2109
|
-
children: y ? `Pick the answer below, ${
|
|
2110
|
-
}) : null, w = /* @__PURE__ */ x(b, { children:
|
|
2109
|
+
children: y ? `Pick the answer below, ${n}` : n
|
|
2110
|
+
}) : null, w = /* @__PURE__ */ x(b, { children: n && !h ? /* @__PURE__ */ S(ft, {
|
|
2111
2111
|
component: "span",
|
|
2112
2112
|
children: [/* @__PURE__ */ S("span", {
|
|
2113
2113
|
"aria-hidden": "true",
|
|
2114
2114
|
children: [
|
|
2115
|
-
|
|
2115
|
+
n,
|
|
2116
2116
|
".",
|
|
2117
2117
|
"\xA0"
|
|
2118
2118
|
]
|
|
2119
2119
|
}), /* @__PURE__ */ x(st, {
|
|
2120
2120
|
className: "prompt-label",
|
|
2121
|
-
prompt:
|
|
2121
|
+
prompt: i,
|
|
2122
2122
|
tagName: "span"
|
|
2123
2123
|
})]
|
|
2124
2124
|
}) : /* @__PURE__ */ x(st, {
|
|
2125
2125
|
className: "prompt-label",
|
|
2126
|
-
prompt:
|
|
2126
|
+
prompt: i,
|
|
2127
2127
|
tagName: "span"
|
|
2128
2128
|
}) }), T = {
|
|
2129
|
-
disabled:
|
|
2129
|
+
disabled: t,
|
|
2130
2130
|
checked: p,
|
|
2131
|
-
correctness:
|
|
2131
|
+
correctness: a,
|
|
2132
2132
|
tagName: m,
|
|
2133
2133
|
value: f,
|
|
2134
2134
|
id: this.choiceId,
|
|
@@ -2143,13 +2143,13 @@ var st = q(a, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(c
|
|
|
2143
2143
|
}),
|
|
2144
2144
|
/* @__PURE__ */ x("span", {
|
|
2145
2145
|
"aria-hidden": "true",
|
|
2146
|
-
children:
|
|
2146
|
+
children: n ? `${n}.` : ""
|
|
2147
2147
|
})
|
|
2148
2148
|
] }) : /* @__PURE__ */ S(b, { children: [C, /* @__PURE__ */ x(g, { ...T })] });
|
|
2149
2149
|
return /* @__PURE__ */ S("div", {
|
|
2150
|
-
className:
|
|
2150
|
+
className: l(o, "corespring-" + _, "choice-input"),
|
|
2151
2151
|
children: [
|
|
2152
|
-
/* @__PURE__ */ S(ft, { children: [!
|
|
2152
|
+
/* @__PURE__ */ S(ft, { children: [!c && u && /* @__PURE__ */ x(ot, { correctness: a }), /* @__PURE__ */ x(pt, {
|
|
2153
2153
|
className: "checkbox-holder",
|
|
2154
2154
|
sx: v,
|
|
2155
2155
|
children: /* @__PURE__ */ x(gt, {
|
|
@@ -2160,27 +2160,27 @@ var st = q(a, "PreviewPrompt") || q(dt.PreviewPrompt, "PreviewPrompt"), ct = q(c
|
|
|
2160
2160
|
control: E
|
|
2161
2161
|
})
|
|
2162
2162
|
})] }),
|
|
2163
|
-
|
|
2163
|
+
s && /* @__PURE__ */ x(st, {
|
|
2164
2164
|
className: "rationale",
|
|
2165
2165
|
defaultClassName: "rationale",
|
|
2166
|
-
prompt:
|
|
2166
|
+
prompt: s
|
|
2167
2167
|
}),
|
|
2168
2168
|
/* @__PURE__ */ x(ct, {
|
|
2169
|
-
feedback:
|
|
2170
|
-
correctness:
|
|
2169
|
+
feedback: r,
|
|
2170
|
+
correctness: a
|
|
2171
2171
|
})
|
|
2172
2172
|
]
|
|
2173
2173
|
});
|
|
2174
2174
|
}
|
|
2175
|
-
}, Ct =
|
|
2176
|
-
paddingTop:
|
|
2177
|
-
paddingBottom: `calc(${
|
|
2178
|
-
paddingLeft: `calc(${
|
|
2179
|
-
paddingRight: `calc(${
|
|
2180
|
-
borderBottom: n ? "none" : `1px solid ${
|
|
2175
|
+
}, Ct = r(d, { shouldForwardProp: (e) => e !== "noBorder" && e !== "horizontalLayout" })(({ theme: t, noBorder: n, horizontalLayout: r }) => ({
|
|
2176
|
+
paddingTop: t.spacing(2.5),
|
|
2177
|
+
paddingBottom: `calc(${t.spacing(1)} + 2px)`,
|
|
2178
|
+
paddingLeft: `calc(${t.spacing(1)} + 2px)`,
|
|
2179
|
+
paddingRight: `calc(${t.spacing(1)} + 2px)`,
|
|
2180
|
+
borderBottom: n ? "none" : `1px solid ${e.border()}`,
|
|
2181
2181
|
...r && {
|
|
2182
|
-
paddingRight:
|
|
2183
|
-
"& label": { marginRight:
|
|
2182
|
+
paddingRight: t.spacing(2.5),
|
|
2183
|
+
"& label": { marginRight: t.spacing(1) }
|
|
2184
2184
|
}
|
|
2185
2185
|
})), wt = class extends v.Component {
|
|
2186
2186
|
static propTypes = {};
|
|
@@ -2279,35 +2279,35 @@ function X(e) {
|
|
|
2279
2279
|
function Z(e, t) {
|
|
2280
2280
|
return !e || X(e) ? e : X(e.default) ? e.default : t && X(e[t]) ? e[t] : t && X(e[t]?.default) ? e[t].default : e;
|
|
2281
2281
|
}
|
|
2282
|
-
var Dt = Z(
|
|
2283
|
-
color:
|
|
2284
|
-
backgroundColor:
|
|
2282
|
+
var Dt = Z(i, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(c, "Collapsible") || Z(jt.Collapsible, "Collapsible"), kt = p, At = kt.default, jt = At && typeof At == "object" ? At : kt, { translator: Q } = We, Mt = r(d)({
|
|
2283
|
+
color: e.text(),
|
|
2284
|
+
backgroundColor: e.background(),
|
|
2285
2285
|
"& *": { "-webkit-font-smoothing": "antialiased" },
|
|
2286
2286
|
position: "relative",
|
|
2287
2287
|
"& legend": { border: "none !important" }
|
|
2288
|
-
}), Nt =
|
|
2288
|
+
}), Nt = r("h2")(({ theme: e }) => ({
|
|
2289
2289
|
display: "block",
|
|
2290
2290
|
fontSize: "inherit",
|
|
2291
2291
|
margin: "0",
|
|
2292
2292
|
fontWeight: "normal",
|
|
2293
2293
|
paddingBottom: e.spacing(2)
|
|
2294
|
-
})), Pt =
|
|
2294
|
+
})), Pt = r(d)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ft = r(d)({
|
|
2295
2295
|
display: "flex",
|
|
2296
2296
|
flexDirection: "row",
|
|
2297
2297
|
flexWrap: "wrap"
|
|
2298
|
-
}), It =
|
|
2298
|
+
}), It = r(d)({ display: "grid" }), Lt = r("fieldset")({
|
|
2299
2299
|
border: "0px",
|
|
2300
2300
|
padding: "0.01em 0 0 0",
|
|
2301
2301
|
margin: "0px",
|
|
2302
2302
|
minWidth: "0px"
|
|
2303
|
-
}), Rt =
|
|
2303
|
+
}), Rt = r("h3")({
|
|
2304
2304
|
position: "absolute",
|
|
2305
2305
|
left: "-10000px",
|
|
2306
2306
|
top: "auto",
|
|
2307
2307
|
width: "1px",
|
|
2308
2308
|
height: "1px",
|
|
2309
2309
|
overflow: "hidden"
|
|
2310
|
-
}), zt =
|
|
2310
|
+
}), zt = r("div")(({ theme: e }) => ({
|
|
2311
2311
|
fontSize: e.typography.fontSize - 2,
|
|
2312
2312
|
color: e.palette.error.main,
|
|
2313
2313
|
paddingTop: e.spacing(1)
|
|
@@ -2411,11 +2411,11 @@ var Dt = Z(a, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(u
|
|
|
2411
2411
|
return /* @__PURE__ */ x(Rt.withComponent(`h${a}`), { children: t === "radio" ? "Multiple Choice Question" : "Multiple Select Question" });
|
|
2412
2412
|
}
|
|
2413
2413
|
render() {
|
|
2414
|
-
let { mode:
|
|
2414
|
+
let { mode: e, disabled: t, className: n, choices: r = [], choiceMode: i, gridColumns: a, partLabel: o, prompt: s, responseCorrect: c, teacherInstructions: u, alwaysShowCorrect: p, animationsDisabled: m, language: h, isSelectionButtonBelow: g, minSelections: _, maxSelections: v, autoplayAudioEnabled: y, session: b, customAudioButton: C, options: w, baseHeadingLevel: T } = this.props, { showCorrect: E, maxSelectionsErrorState: D } = this.state, O = e === "evaluate", k = O && !c, A = a > 1 ? { gridTemplateColumns: `repeat(${a}, 1fr)` } : void 0, j = b.value && b.value.length || 0, M = (() => {
|
|
2415
2415
|
if (!T) return;
|
|
2416
2416
|
let e = 1;
|
|
2417
|
-
return
|
|
2418
|
-
})(), N = (e) => e && M ?
|
|
2417
|
+
return o && (e += 1), Math.min(6, T + e);
|
|
2418
|
+
})(), N = (e) => e && M ? f(e, M) : e, P = /* @__PURE__ */ x(Dt, {
|
|
2419
2419
|
tagName: "div",
|
|
2420
2420
|
className: "prompt",
|
|
2421
2421
|
defaultClassName: "teacher-instructions",
|
|
@@ -2430,14 +2430,14 @@ var Dt = Z(a, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(u
|
|
|
2430
2430
|
}) : _ ? Q.t("translation:multipleChoice:minSelections", {
|
|
2431
2431
|
lng: h,
|
|
2432
2432
|
minSelections: _
|
|
2433
|
-
}) : "", te = this.props.choicesLayout === "grid" ? It : this.props.choicesLayout === "horizontal" ? Ft :
|
|
2433
|
+
}) : "", te = this.props.choicesLayout === "grid" ? It : this.props.choicesLayout === "horizontal" ? Ft : d;
|
|
2434
2434
|
return /* @__PURE__ */ S(Mt, {
|
|
2435
2435
|
id: "main-container",
|
|
2436
|
-
className:
|
|
2436
|
+
className: l(n, "multiple-choice"),
|
|
2437
2437
|
children: [
|
|
2438
|
-
|
|
2438
|
+
o && /* @__PURE__ */ x(Nt, {
|
|
2439
2439
|
as: T ? `h${Math.min(6, T + 1)}` : "h2",
|
|
2440
|
-
children:
|
|
2440
|
+
children: o
|
|
2441
2441
|
}),
|
|
2442
2442
|
this.renderHeading(),
|
|
2443
2443
|
u && /* @__PURE__ */ x(Pt, { children: m ? P : /* @__PURE__ */ x(Ot, {
|
|
@@ -2448,17 +2448,17 @@ var Dt = Z(a, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(u
|
|
|
2448
2448
|
children: P
|
|
2449
2449
|
}) }),
|
|
2450
2450
|
/* @__PURE__ */ S(Lt, {
|
|
2451
|
-
role:
|
|
2451
|
+
role: i === "radio" ? "radiogroup" : "group",
|
|
2452
2452
|
children: [
|
|
2453
2453
|
/* @__PURE__ */ x(Dt, {
|
|
2454
2454
|
className: "prompt",
|
|
2455
2455
|
defaultClassName: "prompt",
|
|
2456
|
-
prompt: N(
|
|
2456
|
+
prompt: N(s),
|
|
2457
2457
|
tagName: "legend",
|
|
2458
2458
|
autoplayAudioEnabled: y,
|
|
2459
2459
|
customAudioButton: C
|
|
2460
2460
|
}),
|
|
2461
|
-
!(w &&
|
|
2461
|
+
!(w && p) && /* @__PURE__ */ x(nt, {
|
|
2462
2462
|
show: k,
|
|
2463
2463
|
toggled: E,
|
|
2464
2464
|
onToggle: this.onToggle.bind(this),
|
|
@@ -2466,7 +2466,7 @@ var Dt = Z(a, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(u
|
|
|
2466
2466
|
}),
|
|
2467
2467
|
/* @__PURE__ */ x(te, {
|
|
2468
2468
|
style: A,
|
|
2469
|
-
children:
|
|
2469
|
+
children: r.map((e, n) => /* @__PURE__ */ x(wt, {
|
|
2470
2470
|
choicesLayout: this.props.choicesLayout,
|
|
2471
2471
|
selectedAnswerBackgroundColor: this.props.selectedAnswerBackgroundColor,
|
|
2472
2472
|
selectedAnswerStrokeColor: this.props.selectedAnswerStrokeColor,
|
|
@@ -2474,27 +2474,27 @@ var Dt = Z(a, "PreviewPrompt") || Z(jt.PreviewPrompt, "PreviewPrompt"), Ot = Z(u
|
|
|
2474
2474
|
hoverAnswerBackgroundColor: this.props.hoverAnswerBackgroundColor,
|
|
2475
2475
|
hoverAnswerStrokeColor: this.props.hoverAnswerStrokeColor,
|
|
2476
2476
|
hoverAnswerStrokeWidth: this.props.hoverAnswerStrokeWidth,
|
|
2477
|
-
gridColumns:
|
|
2477
|
+
gridColumns: a,
|
|
2478
2478
|
choice: e,
|
|
2479
|
-
index:
|
|
2480
|
-
choicesLength:
|
|
2479
|
+
index: n,
|
|
2480
|
+
choicesLength: r.length,
|
|
2481
2481
|
showCorrect: E,
|
|
2482
2482
|
isEvaluateMode: O,
|
|
2483
|
-
choiceMode:
|
|
2484
|
-
disabled:
|
|
2483
|
+
choiceMode: i,
|
|
2484
|
+
disabled: t,
|
|
2485
2485
|
tagName: this.groupName,
|
|
2486
2486
|
onChoiceChanged: this.handleChange,
|
|
2487
2487
|
hideTick: e.hideTick,
|
|
2488
2488
|
checked: this.getChecked(e),
|
|
2489
2489
|
correctness: O ? this.getCorrectness(e) : void 0,
|
|
2490
|
-
displayKey: this.indexToSymbol(
|
|
2490
|
+
displayKey: this.indexToSymbol(n),
|
|
2491
2491
|
isSelectionButtonBelow: g
|
|
2492
|
-
}, `choice-${
|
|
2492
|
+
}, `choice-${n}`))
|
|
2493
2493
|
})
|
|
2494
2494
|
]
|
|
2495
2495
|
}),
|
|
2496
|
-
|
|
2497
|
-
|
|
2496
|
+
i === "checkbox" && j < _ && /* @__PURE__ */ x(zt, { children: ee() }),
|
|
2497
|
+
i === "checkbox" && D && /* @__PURE__ */ x(zt, { children: Q.t(`translation:multipleChoice:maxSelections_${v === 1 ? "one" : "other"}`, {
|
|
2498
2498
|
lng: h,
|
|
2499
2499
|
maxSelections: v
|
|
2500
2500
|
}) })
|
|
@@ -2511,7 +2511,7 @@ function $(e) {
|
|
|
2511
2511
|
function Vt(e, t) {
|
|
2512
2512
|
return !e || $(e) ? e : $(e.default) ? e.default : t && $(e[t]) ? e[t] : t && $(e[t]?.default) ? e[t].default : e;
|
|
2513
2513
|
}
|
|
2514
|
-
var Ht = Vt(g, "PreviewLayout") || Vt(Gt.PreviewLayout, "PreviewLayout"), Ut =
|
|
2514
|
+
var Ht = Vt(g, "PreviewLayout") || Vt(Gt.PreviewLayout, "PreviewLayout"), Ut = p, Wt = Ut.default, Gt = Wt && typeof Wt == "object" ? Wt : Ut, Kt = class extends v.Component {
|
|
2515
2515
|
static propTypes = {
|
|
2516
2516
|
model: C.default.object,
|
|
2517
2517
|
session: C.default.object,
|
|
@@ -2550,4 +2550,4 @@ var Ht = Vt(g, "PreviewLayout") || Vt(Gt.PreviewLayout, "PreviewLayout"), Ut = m
|
|
|
2550
2550
|
//#endregion
|
|
2551
2551
|
export { Et as n, Kt as t };
|
|
2552
2552
|
|
|
2553
|
-
//# sourceMappingURL=main-
|
|
2553
|
+
//# sourceMappingURL=main-BzlfiDu3.js.map
|