@pie-element/math-templated 7.1.0-next.28 → 7.1.1-next.0

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.
Files changed (98) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +173 -0
  4. package/dist/author/defaults.js +123 -0
  5. package/dist/author/design.d.ts +35 -0
  6. package/dist/author/design.js +360 -0
  7. package/dist/author/index.d.ts +42 -0
  8. package/dist/author/index.js +97 -0
  9. package/dist/author/markupUtils.d.ts +11 -0
  10. package/dist/author/markupUtils.js +10 -0
  11. package/dist/author/response.d.ts +41 -0
  12. package/dist/author/response.js +238 -0
  13. package/dist/author/utils.d.ts +9 -0
  14. package/dist/author/utils.js +7 -0
  15. package/dist/browser/author/index.js +31954 -0
  16. package/dist/browser/author/index.js.map +1 -0
  17. package/dist/browser/browser-DJA4OL8j.js +331 -0
  18. package/dist/browser/browser-DJA4OL8j.js.map +1 -0
  19. package/dist/browser/controller/index.js +37731 -0
  20. package/dist/browser/controller/index.js.map +1 -0
  21. package/dist/browser/delivery/index.js +81 -0
  22. package/dist/browser/delivery/index.js.map +1 -0
  23. package/dist/browser/dist-CGHr_3dl.js +17039 -0
  24. package/dist/browser/dist-CGHr_3dl.js.map +1 -0
  25. package/dist/browser/dist-D9ARZhQk.js +1426 -0
  26. package/dist/browser/dist-D9ARZhQk.js.map +1 -0
  27. package/dist/browser/main-DjRQVdyL.js +1274 -0
  28. package/dist/browser/main-DjRQVdyL.js.map +1 -0
  29. package/dist/browser/math-templated.css +2 -0
  30. package/dist/browser/print/index.js +47 -0
  31. package/dist/browser/print/index.js.map +1 -0
  32. package/dist/controller/defaults.d.ts +29 -0
  33. package/dist/controller/defaults.js +23 -0
  34. package/dist/controller/index.d.ts +45 -0
  35. package/dist/controller/index.js +154 -0
  36. package/dist/delivery/index.d.ts +20 -0
  37. package/dist/delivery/index.js +51 -0
  38. package/dist/delivery/main.d.ts +40 -0
  39. package/dist/delivery/main.js +492 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.iife.d.ts +8 -0
  42. package/dist/index.iife.js +205 -0
  43. package/dist/index.js +2 -0
  44. package/dist/math-templated.css +2 -0
  45. package/dist/print/index.d.ts +15 -0
  46. package/dist/print/index.js +47 -0
  47. package/dist/runtime-support.d.ts +12 -0
  48. package/dist/runtime-support.js +12 -0
  49. package/package.json +94 -22
  50. package/CHANGELOG.json +0 -1
  51. package/CHANGELOG.md +0 -1125
  52. package/LICENSE.md +0 -5
  53. package/README.md +0 -0
  54. package/configure/CHANGELOG.json +0 -1
  55. package/configure/CHANGELOG.md +0 -1002
  56. package/configure/lib/defaults.js +0 -172
  57. package/configure/lib/defaults.js.map +0 -1
  58. package/configure/lib/design.js +0 -546
  59. package/configure/lib/design.js.map +0 -1
  60. package/configure/lib/index.js +0 -169
  61. package/configure/lib/index.js.map +0 -1
  62. package/configure/lib/markupUtils.js +0 -39
  63. package/configure/lib/markupUtils.js.map +0 -1
  64. package/configure/lib/response.js +0 -394
  65. package/configure/lib/response.js.map +0 -1
  66. package/configure/lib/utils.js +0 -15
  67. package/configure/lib/utils.js.map +0 -1
  68. package/configure/package.json +0 -26
  69. package/controller/CHANGELOG.json +0 -1
  70. package/controller/CHANGELOG.md +0 -863
  71. package/controller/lib/defaults.js +0 -28
  72. package/controller/lib/defaults.js.map +0 -1
  73. package/controller/lib/index.js +0 -360
  74. package/controller/lib/index.js.map +0 -1
  75. package/controller/package.json +0 -17
  76. package/docs/config-schema.json +0 -2251
  77. package/docs/config-schema.json.md +0 -1658
  78. package/docs/demo/config.js +0 -8
  79. package/docs/demo/generate.js +0 -42
  80. package/docs/demo/index.html +0 -1
  81. package/docs/demo/session.js +0 -14
  82. package/docs/pie-schema.json +0 -1231
  83. package/docs/pie-schema.json.md +0 -894
  84. package/lib/index.js +0 -76
  85. package/lib/index.js.map +0 -1
  86. package/lib/main.js +0 -877
  87. package/lib/main.js.map +0 -1
  88. package/lib/print.js +0 -88
  89. package/lib/print.js.map +0 -1
  90. package/module/configure.js +0 -1
  91. package/module/controller.js +0 -3711
  92. package/module/demo.js +0 -67
  93. package/module/element.js +0 -1
  94. package/module/index.html +0 -21
  95. package/module/manifest.json +0 -22
  96. package/module/print-demo.js +0 -105
  97. package/module/print.html +0 -18
  98. package/module/print.js +0 -1
package/configure.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './dist/author/index.js';
2
+ export * from './dist/author/index.js';
package/controller.js ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/controller/index.js';
@@ -0,0 +1,173 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/math-templated/configure/src/defaults.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ declare const _default: {
10
+ model: {
11
+ allowTrailingZerosDefault: boolean;
12
+ equationEditor: string;
13
+ ignoreOrderDefault: boolean;
14
+ markup: string;
15
+ playerSpellCheckEnabled: boolean;
16
+ prompt: string;
17
+ promptEnabled: boolean;
18
+ rationale: string;
19
+ rationaleEnabled: boolean;
20
+ responses: {};
21
+ spellCheckEnabled: boolean;
22
+ teacherInstructions: string;
23
+ teacherInstructionsEnabled: boolean;
24
+ toolbarEditorPosition: string;
25
+ validationDefault: string;
26
+ };
27
+ configuration: {
28
+ ignoreOrder: {
29
+ settings: boolean;
30
+ label: string;
31
+ enabled: boolean;
32
+ };
33
+ allowTrailingZeros: {
34
+ settings: boolean;
35
+ label: string;
36
+ enabled: boolean;
37
+ };
38
+ partialScoring: {
39
+ settings: boolean;
40
+ label: string;
41
+ };
42
+ baseInputConfiguration: {
43
+ html: {
44
+ disabled: boolean;
45
+ };
46
+ audio: {
47
+ disabled: boolean;
48
+ };
49
+ video: {
50
+ disabled: boolean;
51
+ };
52
+ image: {
53
+ disabled: boolean;
54
+ };
55
+ h3: {
56
+ disabled: boolean;
57
+ };
58
+ blockquote: {
59
+ disabled: boolean;
60
+ };
61
+ textAlign: {
62
+ disabled: boolean;
63
+ };
64
+ showParagraphs: {
65
+ disabled: boolean;
66
+ };
67
+ separateParagraphs: {
68
+ disabled: boolean;
69
+ };
70
+ };
71
+ prompt: {
72
+ label: string;
73
+ settings: boolean;
74
+ inputConfiguration: {
75
+ audio: {
76
+ disabled: boolean;
77
+ };
78
+ video: {
79
+ disabled: boolean;
80
+ };
81
+ image: {
82
+ disabled: boolean;
83
+ };
84
+ };
85
+ required: boolean;
86
+ };
87
+ spellCheck: {
88
+ label: string;
89
+ settings: boolean;
90
+ enabled: boolean;
91
+ };
92
+ editSource: {
93
+ label: string;
94
+ settings: boolean;
95
+ enabled: boolean;
96
+ };
97
+ playerSpellCheck: {
98
+ label: string;
99
+ settings: boolean;
100
+ enabled: boolean;
101
+ };
102
+ teacherInstructions: {
103
+ settings: boolean;
104
+ label: string;
105
+ inputConfiguration: {
106
+ audio: {
107
+ disabled: boolean;
108
+ };
109
+ video: {
110
+ disabled: boolean;
111
+ };
112
+ image: {
113
+ disabled: boolean;
114
+ };
115
+ };
116
+ required: boolean;
117
+ };
118
+ rationale: {
119
+ settings: boolean;
120
+ label: string;
121
+ inputConfiguration: {
122
+ audio: {
123
+ disabled: boolean;
124
+ };
125
+ video: {
126
+ disabled: boolean;
127
+ };
128
+ image: {
129
+ disabled: boolean;
130
+ };
131
+ };
132
+ required: boolean;
133
+ };
134
+ template: {
135
+ inputConfiguration: {
136
+ audio: {
137
+ disabled: boolean;
138
+ };
139
+ video: {
140
+ disabled: boolean;
141
+ };
142
+ image: {
143
+ disabled: boolean;
144
+ };
145
+ };
146
+ };
147
+ maxImageWidth: {
148
+ teacherInstructions: number;
149
+ prompt: number;
150
+ rationale: number;
151
+ };
152
+ maxImageHeight: {
153
+ teacherInstructions: number;
154
+ prompt: number;
155
+ rationale: number;
156
+ };
157
+ mathMlOptions: {
158
+ mmlOutput: boolean;
159
+ mmlEditing: boolean;
160
+ };
161
+ language: {
162
+ settings: boolean;
163
+ label: string;
164
+ enabled: boolean;
165
+ };
166
+ languageChoices: {
167
+ label: string;
168
+ options: never[];
169
+ };
170
+ maxResponseAreas: number;
171
+ };
172
+ };
173
+ export default _default;
@@ -0,0 +1,123 @@
1
+ //#region src/author/defaults.ts
2
+ var e = {
3
+ model: {
4
+ allowTrailingZerosDefault: !1,
5
+ equationEditor: "8",
6
+ ignoreOrderDefault: !1,
7
+ markup: "",
8
+ playerSpellCheckEnabled: !0,
9
+ prompt: "",
10
+ promptEnabled: !0,
11
+ rationale: "",
12
+ rationaleEnabled: !0,
13
+ responses: {},
14
+ spellCheckEnabled: !0,
15
+ teacherInstructions: "",
16
+ teacherInstructionsEnabled: !0,
17
+ toolbarEditorPosition: "bottom",
18
+ validationDefault: "literal"
19
+ },
20
+ configuration: {
21
+ ignoreOrder: {
22
+ settings: !0,
23
+ label: "Ignore Order",
24
+ enabled: !0
25
+ },
26
+ allowTrailingZeros: {
27
+ settings: !0,
28
+ label: "Allow Trailing Zeros",
29
+ enabled: !0
30
+ },
31
+ partialScoring: {
32
+ settings: !0,
33
+ label: "Allow Partial Scoring"
34
+ },
35
+ baseInputConfiguration: {
36
+ html: { disabled: !0 },
37
+ audio: { disabled: !1 },
38
+ video: { disabled: !1 },
39
+ image: { disabled: !1 },
40
+ h3: { disabled: !0 },
41
+ blockquote: { disabled: !0 },
42
+ textAlign: { disabled: !0 },
43
+ showParagraphs: { disabled: !1 },
44
+ separateParagraphs: { disabled: !0 }
45
+ },
46
+ prompt: {
47
+ label: "Prompt",
48
+ settings: !0,
49
+ inputConfiguration: {
50
+ audio: { disabled: !1 },
51
+ video: { disabled: !1 },
52
+ image: { disabled: !1 }
53
+ },
54
+ required: !1
55
+ },
56
+ spellCheck: {
57
+ label: "Spellcheck",
58
+ settings: !1,
59
+ enabled: !0
60
+ },
61
+ editSource: {
62
+ label: "Edit Source",
63
+ settings: !1,
64
+ enabled: !1
65
+ },
66
+ playerSpellCheck: {
67
+ label: "Student Spellcheck",
68
+ settings: !0,
69
+ enabled: !0
70
+ },
71
+ teacherInstructions: {
72
+ settings: !0,
73
+ label: "Teacher Instructions",
74
+ inputConfiguration: {
75
+ audio: { disabled: !1 },
76
+ video: { disabled: !1 },
77
+ image: { disabled: !1 }
78
+ },
79
+ required: !1
80
+ },
81
+ rationale: {
82
+ settings: !0,
83
+ label: "Rationale",
84
+ inputConfiguration: {
85
+ audio: { disabled: !1 },
86
+ video: { disabled: !1 },
87
+ image: { disabled: !1 }
88
+ },
89
+ required: !1
90
+ },
91
+ template: { inputConfiguration: {
92
+ audio: { disabled: !1 },
93
+ video: { disabled: !1 },
94
+ image: { disabled: !1 }
95
+ } },
96
+ maxImageWidth: {
97
+ teacherInstructions: 300,
98
+ prompt: 300,
99
+ rationale: 300
100
+ },
101
+ maxImageHeight: {
102
+ teacherInstructions: 300,
103
+ prompt: 300,
104
+ rationale: 300
105
+ },
106
+ mathMlOptions: {
107
+ mmlOutput: !1,
108
+ mmlEditing: !1
109
+ },
110
+ language: {
111
+ settings: !1,
112
+ label: "Specify Language",
113
+ enabled: !1
114
+ },
115
+ languageChoices: {
116
+ label: "Language Choices",
117
+ options: []
118
+ },
119
+ maxResponseAreas: 10
120
+ }
121
+ };
122
+ //#endregion
123
+ export { e as default };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/math-templated/configure/src/design.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Design extends React.Component {
12
+ static propTypes: {
13
+ model: PropTypes.Validator<object>;
14
+ configuration: PropTypes.Validator<object>;
15
+ onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
16
+ onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
17
+ imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
18
+ add: PropTypes.Validator<(...args: any[]) => any>;
19
+ delete: PropTypes.Validator<(...args: any[]) => any>;
20
+ }>>;
21
+ uploadSoundSupport: PropTypes.Requireable<object>;
22
+ };
23
+ state: {};
24
+ componentDidMount(): void;
25
+ handleChange: any;
26
+ onResponseChange: any;
27
+ onResponseDone: any;
28
+ onChangeResponse: any;
29
+ onResponsesChanged: any;
30
+ onChange: any;
31
+ onHandleAreaChange: import("@pie-element/shared-lodash").CancelableFunction<(nodes: any) => void>;
32
+ onBlur: any;
33
+ render(): React.JSX.Element;
34
+ }
35
+ export default Design;
@@ -0,0 +1,360 @@
1
+ import e from "./response.js";
2
+ import { createSlateMarkup as t, processMarkup as n } from "./markupUtils.js";
3
+ import { generateValidationMessage as r } from "./utils.js";
4
+ import i from "react";
5
+ import a from "prop-types";
6
+ import { cloneDeep as o, pick as s, throttle as c } from "@pie-element/shared-lodash";
7
+ import { styled as l } from "@mui/material/styles";
8
+ import u from "@mui/material/Tooltip";
9
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
10
+ import p from "@mui/material/Typography";
11
+ import m from "@mui/material/Select";
12
+ import h from "@mui/material/MenuItem";
13
+ import ee from "@mui/icons-material/Info";
14
+ import { InputContainer as g, layout as te, settings as _ } from "@pie-lib/config-ui";
15
+ import v, { ALL_PLUGINS as ne } from "@pie-lib/editable-html-tip-tap";
16
+ //#region src/author/design.tsx
17
+ var { dropdown: y } = _, { Panel: re, toggle: b } = _, x = l(g)(({ theme: e }) => ({
18
+ width: "100%",
19
+ paddingTop: e.spacing(2),
20
+ marginBottom: e.spacing(2)
21
+ })), S = l(v)({ width: "100%" }), C = l("div")(({ theme: e }) => ({
22
+ color: e.palette.error.main,
23
+ fontSize: "0.75rem",
24
+ marginTop: e.spacing(1)
25
+ })), ie = l("div")(({ theme: e }) => ({
26
+ color: e.palette.error.main,
27
+ fontSize: "0.75rem",
28
+ marginBottom: e.spacing(1)
29
+ })), ae = l(v)(({ theme: e }) => ({
30
+ width: "100%",
31
+ marginTop: e.spacing(2),
32
+ marginBottom: e.spacing(3)
33
+ })), oe = l(g)(({ theme: e }) => ({
34
+ width: "100%",
35
+ marginTop: e.spacing(2),
36
+ "& > *:not(label)": { marginTop: e.spacing(1) },
37
+ marginBottom: e.spacing(2)
38
+ })), se = l(m)({ width: "100%" }), w = l(p)(({ theme: e }) => ({
39
+ fontSize: e.typography.fontSize * 1.25,
40
+ fontWeight: "bold"
41
+ })), T = l("div")({
42
+ display: "flex",
43
+ alignItems: "center",
44
+ gap: "8px"
45
+ }), E = l(u)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
46
+ fontSize: e.typography.fontSize - 2,
47
+ whiteSpace: "pre",
48
+ maxWidth: "500px"
49
+ } })), D = (e) => {
50
+ let t = document.createElement("div");
51
+ return t.innerHTML = e.trim(), t;
52
+ }, O = class extends i.Component {
53
+ static propTypes = {
54
+ model: a.object.isRequired,
55
+ configuration: a.object.isRequired,
56
+ onModelChanged: a.func.isRequired,
57
+ onConfigurationChanged: a.func.isRequired,
58
+ imageSupport: a.shape({
59
+ add: a.func.isRequired,
60
+ delete: a.func.isRequired
61
+ }),
62
+ uploadSoundSupport: a.object
63
+ };
64
+ state = {};
65
+ componentDidMount() {
66
+ let { model: { slateMarkup: e } } = this.props;
67
+ this.setState({ markup: e });
68
+ }
69
+ handleChange = (e, t) => {
70
+ let { onModelChanged: n, model: r } = this.props, i = o(r);
71
+ i[e] = t, n(i);
72
+ };
73
+ onResponseChange = (e, t) => {
74
+ let { model: n, onModelChanged: r } = this.props, i = { ...n };
75
+ i.responses[t] = e, r(i);
76
+ };
77
+ onResponseDone = () => {
78
+ let { model: e, onModelChanged: n } = this.props;
79
+ n({
80
+ ...e,
81
+ slateMarkup: t(e.markup, e.responses)
82
+ });
83
+ };
84
+ onChangeResponse = (e, t) => {
85
+ let { model: n, onModelChanged: r } = this.props, { responses: i } = n;
86
+ i[e] ? i[e][0].answer = t || "" : i[e] = [{
87
+ answer: t || "",
88
+ id: "response" + e,
89
+ allowSpaces: !0
90
+ }], r({
91
+ ...n,
92
+ responses: i
93
+ });
94
+ };
95
+ onResponsesChanged = (e) => {
96
+ this.props.onModelChanged({
97
+ ...this.props.model,
98
+ responses: e
99
+ });
100
+ };
101
+ onChange = (e) => {
102
+ let { model: { responses: t, validationDefault: r, allowTrailingZerosDefault: i, ignoreOrderDefault: a }, onModelChanged: o } = this.props, s = {}, c = D(e);
103
+ c.querySelectorAll("[data-type=\"math_templated\"]").forEach((e, n) => {
104
+ let { value: o, index: c } = e.dataset;
105
+ o || (e.dataset.value = ""), s[n] = t[c] || {
106
+ allowSpaces: !0,
107
+ validation: r || "symbolic",
108
+ allowTrailingZeros: i || !1,
109
+ ignoreOrder: a || !1,
110
+ answer: "",
111
+ alternates: {}
112
+ }, e.dataset.index = n.toString();
113
+ });
114
+ let l = n(e);
115
+ this.setState({ cachedResponses: void 0 }, () => o({
116
+ ...this.props.model,
117
+ slateMarkup: c.innerHTML,
118
+ responses: s,
119
+ markup: l
120
+ }));
121
+ };
122
+ onHandleAreaChange = c((e) => {
123
+ let { model: { responses: t }, onModelChanged: n } = this.props, { cachedResponses: r } = this.state;
124
+ if (!e) return;
125
+ let i = t ? o(t) : {}, a = r ? o(r) : {};
126
+ e.forEach((e) => {
127
+ let t = e.index;
128
+ !i[t] && a[t] ? (Object.assign(i, s(a, t)), Object.prototype.hasOwnProperty.call(a, t) && delete a[t]) : (Object.assign(a, s(i, t)), Object.prototype.hasOwnProperty.call(i, t) && delete i[t]);
129
+ }), this.setState({ cachedResponses: a }, () => n({
130
+ ...this.props.model,
131
+ responses: i
132
+ }));
133
+ }, 500, {
134
+ trailing: !1,
135
+ leading: !0
136
+ });
137
+ onBlur = (e) => {
138
+ let { relatedTarget: t, currentTarget: n } = e || {};
139
+ function r(e, t = 0) {
140
+ if (!e || t >= 16) return null;
141
+ let n = e.offsetParent;
142
+ return n ? n.getAttribute("role") === "tooltip" ? n : r(n, t + 1) : null;
143
+ }
144
+ function i(e, t = 0) {
145
+ if (!e || t >= 4) return null;
146
+ let n = e?.children?.[0];
147
+ return n ? n.attributes && n.attributes["data-keypad"] ? n : i(n, t + 1) : null;
148
+ }
149
+ let a = r(t), o = a ? i(a) : null;
150
+ (!t || !n || !o?.attributes["data-keypad"]) && this.setState({ activeAnswerBlock: "" });
151
+ };
152
+ render() {
153
+ let { configuration: t, imageSupport: n, model: i, onConfigurationChanged: a, onModelChanged: o, uploadSoundSupport: s } = this.props, { baseInputConfiguration: c = {}, contentDimensions: l = {}, prompt: u = {}, rationale: p = {}, settingsPanelDisabled: m, teacherInstructions: g = {}, language: _ = {}, languageChoices: v = {}, spellCheck: D = {}, playerSpellCheck: O = {}, maxImageWidth: k = {}, maxImageHeight: A = {}, mathMlOptions: j = {}, template: ce = {}, editSource: M = {}, ignoreOrder: le = {}, allowTrailingZeros: ue = {}, partialScoring: N = {}, maxResponseAreas: P } = t || {}, { errors: F, extraCSSRules: I, promptEnabled: L, rationaleEnabled: R, spellCheckEnabled: z, teacherInstructionsEnabled: B, toolbarEditorPosition: V, responses: H, equationEditor: U } = i || {}, { prompt: W, rationale: G, responseAreas: K, teacherInstructions: q, responses: J = {} } = F || {}, Y = r(t), de = {
154
+ "language.enabled": _.settings && b(_.label, !0),
155
+ language: _.settings && _.enabled && y(v.label, v.options)
156
+ }, fe = {
157
+ teacherInstructionsEnabled: g.settings && b(g.label),
158
+ rationaleEnabled: p.settings && b(p.label),
159
+ promptEnabled: u.settings && b(u.label),
160
+ spellCheckEnabled: D.settings && b(D.label),
161
+ playerSpellCheckEnabled: O.settings && b(O.label),
162
+ "editSource.enabled": M?.settings && b(M.label, !0),
163
+ partialScoring: N.settings && b(N.label)
164
+ }, X = k && k.prompt, Z = A && A.prompt, Q = { position: V === "top" ? "top" : "bottom" }, $ = (e = {}, t = {}) => ({
165
+ ...t,
166
+ ...e
167
+ });
168
+ return /* @__PURE__ */ f(te.ConfigLayout, {
169
+ extraCSSRules: I,
170
+ dimensions: l,
171
+ hideSettings: m,
172
+ settings: /* @__PURE__ */ d(re, {
173
+ model: i,
174
+ configuration: t,
175
+ onChangeModel: (e) => o(e),
176
+ onChangeConfiguration: a,
177
+ groups: {
178
+ Settings: de,
179
+ Properties: fe
180
+ }
181
+ }),
182
+ children: [
183
+ B && /* @__PURE__ */ f(x, {
184
+ label: g.label,
185
+ children: [/* @__PURE__ */ d(S, {
186
+ markup: i.teacherInstructions || "",
187
+ onChange: (e) => this.handleChange("teacherInstructions", e),
188
+ imageSupport: n,
189
+ nonEmpty: !1,
190
+ error: q,
191
+ toolbarOpts: Q,
192
+ pluginProps: $(g?.inputConfiguration, c),
193
+ spellCheck: z,
194
+ maxImageWidth: k && k.teacherInstructions || X,
195
+ maxImageHeight: A && A.teacherInstructions || Z,
196
+ uploadSoundSupport: s,
197
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
198
+ mathMlOptions: j
199
+ }), q && /* @__PURE__ */ d(C, { children: q })]
200
+ }),
201
+ L && /* @__PURE__ */ f(x, {
202
+ label: u.label,
203
+ children: [/* @__PURE__ */ d(S, {
204
+ markup: i.prompt,
205
+ onChange: (e) => this.handleChange("prompt", e),
206
+ imageSupport: n,
207
+ nonEmpty: !1,
208
+ disableUnderline: !0,
209
+ error: W,
210
+ toolbarOpts: Q,
211
+ pluginProps: $(g?.inputConfiguration, c),
212
+ spellCheck: z,
213
+ maxImageWidth: X,
214
+ maxImageHeight: Z,
215
+ uploadSoundSupport: s,
216
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
217
+ mathMlOptions: j
218
+ }), W && /* @__PURE__ */ d(C, { children: W })]
219
+ }),
220
+ /* @__PURE__ */ f(T, { children: [/* @__PURE__ */ d(w, {
221
+ component: "div",
222
+ children: "Response Template"
223
+ }), /* @__PURE__ */ d(E, {
224
+ disableFocusListener: !0,
225
+ disableTouchListener: !0,
226
+ placement: "right",
227
+ title: Y,
228
+ children: /* @__PURE__ */ d(ee, {
229
+ fontSize: "small",
230
+ color: "primary"
231
+ })
232
+ })] }),
233
+ /* @__PURE__ */ d(ae, {
234
+ activePlugins: ne,
235
+ toolbarOpts: { position: "top" },
236
+ spellCheck: z,
237
+ pluginProps: $(ce?.inputConfiguration, c),
238
+ responseAreaProps: {
239
+ type: "math-templated",
240
+ respAreaToolbar: null,
241
+ error: () => J,
242
+ onHandleAreaChange: this.onHandleAreaChange,
243
+ maxResponseAreas: P
244
+ },
245
+ markup: i.slateMarkup,
246
+ onChange: this.onChange,
247
+ imageSupport: n,
248
+ disableImageAlignmentButtons: !0,
249
+ onBlur: this.onBlur,
250
+ disabled: !1,
251
+ highlightShape: !1,
252
+ error: K,
253
+ uploadSoundSupport: s,
254
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
255
+ mathMlOptions: j
256
+ }),
257
+ K && /* @__PURE__ */ d(ie, { children: K }),
258
+ /* @__PURE__ */ d(w, { children: "Define Response" }),
259
+ /* @__PURE__ */ d(oe, {
260
+ label: "Response Template Equation Editor",
261
+ children: /* @__PURE__ */ f(se, {
262
+ MenuProps: { transitionDuration: {
263
+ enter: 225,
264
+ exit: 195
265
+ } },
266
+ onChange: (e) => this.handleChange("equationEditor", e.target.value),
267
+ value: U,
268
+ children: [
269
+ /* @__PURE__ */ d(h, {
270
+ value: "non-negative-integers",
271
+ children: "Numeric - Non-Negative Integers"
272
+ }),
273
+ /* @__PURE__ */ d(h, {
274
+ value: "integers",
275
+ children: "Numeric - Integers"
276
+ }),
277
+ /* @__PURE__ */ d(h, {
278
+ value: "decimals",
279
+ children: "Numeric - Decimals"
280
+ }),
281
+ /* @__PURE__ */ d(h, {
282
+ value: "fractions",
283
+ children: "Numeric - Fractions"
284
+ }),
285
+ /* @__PURE__ */ d(h, {
286
+ value: 1,
287
+ children: "Grade 1 - 2"
288
+ }),
289
+ /* @__PURE__ */ d(h, {
290
+ value: 3,
291
+ children: "Grade 3 - 5"
292
+ }),
293
+ /* @__PURE__ */ d(h, {
294
+ value: 6,
295
+ children: "Grade 6 - 7"
296
+ }),
297
+ /* @__PURE__ */ d(h, {
298
+ value: 8,
299
+ children: "Grade 8 - HS"
300
+ }),
301
+ /* @__PURE__ */ d(h, {
302
+ value: "geometry",
303
+ children: "Geometry"
304
+ }),
305
+ /* @__PURE__ */ d(h, {
306
+ value: "advanced-algebra",
307
+ children: "Advanced Algebra"
308
+ }),
309
+ /* @__PURE__ */ d(h, {
310
+ value: "statistics",
311
+ children: "Statistics"
312
+ }),
313
+ /* @__PURE__ */ d(h, {
314
+ value: "item-authoring",
315
+ children: "Item Authoring"
316
+ })
317
+ ]
318
+ })
319
+ }),
320
+ Object.keys(H || {}).map((t, n) => {
321
+ let r = H[n];
322
+ return r ? /* @__PURE__ */ d(e, {
323
+ responseKey: n,
324
+ mode: U,
325
+ response: r,
326
+ onResponseChange: this.onResponseChange,
327
+ onResponseDone: this.onResponseDone,
328
+ index: n,
329
+ cIgnoreOrder: le,
330
+ cAllowTrailingZeros: ue,
331
+ error: J && J[n]
332
+ }, n) : null;
333
+ }),
334
+ R && /* @__PURE__ */ f(x, {
335
+ label: p.label,
336
+ children: [/* @__PURE__ */ d(S, {
337
+ markup: i.rationale || "",
338
+ onChange: (e) => this.handleChange("rationale", e),
339
+ imageSupport: n,
340
+ nonEmpty: !1,
341
+ error: G,
342
+ toolbarOpts: Q,
343
+ pluginProps: $(p?.inputConfiguration, {
344
+ ...c,
345
+ math: { controlledKeypadMode: !1 }
346
+ }),
347
+ spellCheck: z,
348
+ maxImageWidth: k && k.rationale || X,
349
+ maxImageHeight: A && A.rationale || Z,
350
+ uploadSoundSupport: s,
351
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
352
+ mathMlOptions: j
353
+ }), G && /* @__PURE__ */ d(C, { children: G })]
354
+ })
355
+ ]
356
+ });
357
+ }
358
+ };
359
+ //#endregion
360
+ export { O as default };