@pie-element/drag-in-the-blank 10.1.1 → 10.1.2-next.1

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 (85) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/choice.d.ts +22 -0
  4. package/dist/author/choice.js +88 -0
  5. package/dist/author/choices.d.ts +41 -0
  6. package/dist/author/choices.js +172 -0
  7. package/dist/author/defaults.d.ts +171 -0
  8. package/dist/author/defaults.js +123 -0
  9. package/dist/author/index.d.ts +42 -0
  10. package/dist/author/index.js +92 -0
  11. package/dist/author/main.d.ts +36 -0
  12. package/dist/author/main.js +301 -0
  13. package/dist/author/markupUtils.d.ts +17 -0
  14. package/dist/author/markupUtils.js +38 -0
  15. package/dist/author/utils.d.ts +9 -0
  16. package/dist/author/utils.js +7 -0
  17. package/dist/browser/author/index.js +39603 -0
  18. package/dist/browser/author/index.js.map +1 -0
  19. package/dist/browser/controller/index.js +176 -0
  20. package/dist/browser/controller/index.js.map +1 -0
  21. package/dist/browser/delivery/index.js +3414 -0
  22. package/dist/browser/delivery/index.js.map +1 -0
  23. package/dist/browser/dist-BkH5WSi5.js +121 -0
  24. package/dist/browser/dist-BkH5WSi5.js.map +1 -0
  25. package/dist/browser/drag-in-the-blank.css +2 -0
  26. package/dist/browser/drag-provider-C0AvrbNE.js +10939 -0
  27. package/dist/browser/drag-provider-C0AvrbNE.js.map +1 -0
  28. package/dist/controller/defaults.d.ts +26 -0
  29. package/dist/controller/defaults.js +20 -0
  30. package/dist/controller/index.d.ts +41 -0
  31. package/dist/controller/index.js +104 -0
  32. package/dist/controller/utils.d.ts +16 -0
  33. package/dist/controller/utils.js +14 -0
  34. package/dist/delivery/index.d.ts +21 -0
  35. package/dist/delivery/index.js +105 -0
  36. package/dist/delivery/main.d.ts +28 -0
  37. package/dist/delivery/main.js +83 -0
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.iife.d.ts +8 -0
  40. package/dist/index.iife.js +152 -0
  41. package/dist/index.js +2 -0
  42. package/dist/runtime-support.d.ts +12 -0
  43. package/dist/runtime-support.js +12 -0
  44. package/package.json +89 -23
  45. package/CHANGELOG.json +0 -1042
  46. package/CHANGELOG.md +0 -2177
  47. package/LICENSE.md +0 -5
  48. package/README.md +0 -1
  49. package/configure/CHANGELOG.json +0 -652
  50. package/configure/CHANGELOG.md +0 -1877
  51. package/configure/lib/choice.js +0 -137
  52. package/configure/lib/choice.js.map +0 -1
  53. package/configure/lib/choices.js +0 -319
  54. package/configure/lib/choices.js.map +0 -1
  55. package/configure/lib/defaults.js +0 -169
  56. package/configure/lib/defaults.js.map +0 -1
  57. package/configure/lib/index.js +0 -144
  58. package/configure/lib/index.js.map +0 -1
  59. package/configure/lib/main.js +0 -440
  60. package/configure/lib/main.js.map +0 -1
  61. package/configure/lib/markupUtils.js +0 -83
  62. package/configure/lib/markupUtils.js.map +0 -1
  63. package/configure/package.json +0 -25
  64. package/configure/utils.js +0 -17
  65. package/controller/CHANGELOG.json +0 -457
  66. package/controller/CHANGELOG.md +0 -1284
  67. package/controller/lib/defaults.js +0 -24
  68. package/controller/lib/defaults.js.map +0 -1
  69. package/controller/lib/index.js +0 -251
  70. package/controller/lib/index.js.map +0 -1
  71. package/controller/lib/utils.js +0 -39
  72. package/controller/lib/utils.js.map +0 -1
  73. package/controller/package.json +0 -16
  74. package/docs/config-schema.json +0 -2580
  75. package/docs/config-schema.json.md +0 -1905
  76. package/docs/demo/config.js +0 -8
  77. package/docs/demo/generate.js +0 -41
  78. package/docs/demo/index.html +0 -1
  79. package/docs/demo/session.js +0 -10
  80. package/docs/pie-schema.json +0 -1181
  81. package/docs/pie-schema.json.md +0 -853
  82. package/lib/index.js +0 -206
  83. package/lib/index.js.map +0 -1
  84. package/lib/main.js +0 -126
  85. package/lib/main.js.map +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,22 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/drag-in-the-blank/configure/src/choice.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 const BlankContent: {
12
+ (props: any): React.JSX.Element;
13
+ propTypes: {
14
+ choice: PropTypes.Validator<object>;
15
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
16
+ onRemoveChoice: PropTypes.Validator<(...args: any[]) => any>;
17
+ error: PropTypes.Requireable<boolean>;
18
+ instanceId: PropTypes.Requireable<string>;
19
+ disabled: PropTypes.Requireable<boolean>;
20
+ };
21
+ };
22
+ export default BlankContent;
@@ -0,0 +1,88 @@
1
+ import { choiceIsEmpty as e } from "./markupUtils.js";
2
+ import "react";
3
+ import t from "prop-types";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import { useDraggable as a } from "@dnd-kit/core";
7
+ import o from "@mui/icons-material/MoreVert";
8
+ import s from "@mui/icons-material/Delete";
9
+ //#region src/author/choice.tsx
10
+ var c = ({ style: e }) => /* @__PURE__ */ r("span", {
11
+ style: e,
12
+ children: [/* @__PURE__ */ n(o, { style: { margin: "0 -16px" } }), /* @__PURE__ */ n(o, {})]
13
+ });
14
+ c.propTypes = { style: t.object };
15
+ var l = i("div", { shouldForwardProp: (e) => !["error", "isDragging"].includes(e) })(({ theme: e, error: t }) => ({
16
+ display: "inline-flex",
17
+ minWidth: "178px",
18
+ minHeight: "36px",
19
+ background: e.palette.common.white,
20
+ boxSizing: "border-box",
21
+ borderRadius: "3px",
22
+ overflow: "hidden",
23
+ position: "relative",
24
+ padding: "8px 35px 8px 35px",
25
+ cursor: "grab",
26
+ border: `1px solid ${t ? "#f44336" : "#C0C3CF"}`,
27
+ "& img": { display: "flex" },
28
+ "& p": { margin: 0 },
29
+ "& mjx-frac": { fontSize: "120% !important" }
30
+ })), u = i(s)(({ theme: e }) => ({
31
+ position: "absolute",
32
+ top: "6px",
33
+ right: "0",
34
+ color: e.palette.grey[500],
35
+ zIndex: 2,
36
+ "&:hover": {
37
+ cursor: "pointer",
38
+ color: e.palette.common.black
39
+ }
40
+ })), d = (t) => {
41
+ let { choice: i, onClick: o, onRemoveChoice: s, error: d, instanceId: f, disabled: p } = t, { attributes: m, listeners: h, setNodeRef: g, isDragging: _ } = a({
42
+ id: `choice-${i.id}-${f || "default"}`,
43
+ data: {
44
+ type: "drag-in-the-blank-choice",
45
+ id: i.id,
46
+ value: i,
47
+ instanceId: f
48
+ },
49
+ disabled: p || e(i)
50
+ }), v = (t) => {
51
+ if (e(i)) {
52
+ t.preventDefault(), alert("You need to define a value for an answer choice before it can be associated with a response area.");
53
+ return;
54
+ }
55
+ };
56
+ return /* @__PURE__ */ r(l, {
57
+ ref: g,
58
+ error: d,
59
+ isDragging: _,
60
+ onClick: o,
61
+ ...m,
62
+ ...h,
63
+ onDragStart: v,
64
+ children: [
65
+ /* @__PURE__ */ n(c, { style: {
66
+ position: "absolute",
67
+ top: "6px",
68
+ left: "15px",
69
+ color: "#9e9e9e",
70
+ zIndex: 2
71
+ } }),
72
+ /* @__PURE__ */ n("span", { dangerouslySetInnerHTML: { __html: i.value } }),
73
+ /* @__PURE__ */ n(u, { onClick: (e) => {
74
+ e.preventDefault(), e.stopPropagation(), s(e);
75
+ } })
76
+ ]
77
+ });
78
+ };
79
+ d.propTypes = {
80
+ choice: t.object.isRequired,
81
+ onClick: t.func,
82
+ onRemoveChoice: t.func.isRequired,
83
+ error: t.bool,
84
+ instanceId: t.string,
85
+ disabled: t.bool
86
+ };
87
+ //#endregion
88
+ export { d as default };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/drag-in-the-blank/configure/src/choices.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 Choices extends React.Component {
12
+ static propTypes: {
13
+ duplicates: PropTypes.Requireable<boolean>;
14
+ error: PropTypes.Requireable<string>;
15
+ model: PropTypes.Validator<object>;
16
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
17
+ toolbarOpts: PropTypes.Requireable<object>;
18
+ pluginProps: PropTypes.Requireable<object>;
19
+ maxChoices: PropTypes.Requireable<number>;
20
+ uploadSoundSupport: PropTypes.Requireable<object>;
21
+ maxImageWidth: PropTypes.Requireable<number>;
22
+ maxImageHeight: PropTypes.Requireable<number>;
23
+ maxLength: PropTypes.Requireable<number>;
24
+ };
25
+ state: {
26
+ warning: {
27
+ open: boolean;
28
+ };
29
+ };
30
+ preventDone: boolean;
31
+ wrapperRef: React.RefObject<unknown>;
32
+ componentDidUpdate(): void;
33
+ onChoiceChanged: any;
34
+ onChoiceDone: any;
35
+ onChoiceFocus: (id: any) => void;
36
+ onAddChoice: any;
37
+ onChoiceRemove: any;
38
+ getVisibleChoices: any;
39
+ render(): React.JSX.Element;
40
+ }
41
+ export default Choices;
@@ -0,0 +1,172 @@
1
+ import { choiceIsEmpty as e } from "./markupUtils.js";
2
+ import t from "./choice.js";
3
+ import n from "react";
4
+ import { renderMath as r } from "@pie-element/shared-math-rendering-mathjax";
5
+ import i from "prop-types";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import { styled as s } from "@mui/material/styles";
8
+ import c from "@pie-lib/editable-html-tip-tap";
9
+ import { AlertDialog as l } from "@pie-lib/config-ui";
10
+ import u from "@mui/material/Button";
11
+ //#region src/author/choices.tsx
12
+ var d = s("div")(({ theme: e }) => ({
13
+ display: "flex",
14
+ flexDirection: "column",
15
+ marginBottom: e.spacing(1.5)
16
+ })), f = s(u)({ marginLeft: "auto" }), p = s("div")(({ theme: e }) => ({
17
+ alignItems: "flex-start",
18
+ display: "flex",
19
+ flexWrap: "wrap",
20
+ justifyContent: "space-evenly",
21
+ marginTop: e.spacing(1),
22
+ "& > *": { margin: e.spacing(1) }
23
+ })), m = s("div")(({ theme: e }) => ({
24
+ fontSize: e.typography.fontSize - 2,
25
+ color: e.palette.error.main,
26
+ paddingBottom: e.spacing(2)
27
+ })), h = class extends n.Component {
28
+ static propTypes = {
29
+ duplicates: i.bool,
30
+ error: i.string,
31
+ model: i.object.isRequired,
32
+ onChange: i.func.isRequired,
33
+ toolbarOpts: i.object,
34
+ pluginProps: i.object,
35
+ maxChoices: i.number,
36
+ uploadSoundSupport: i.object,
37
+ maxImageWidth: i.number,
38
+ maxImageHeight: i.number,
39
+ maxLength: i.number
40
+ };
41
+ state = { warning: { open: !1 } };
42
+ preventDone = !1;
43
+ wrapperRef = n.createRef(null);
44
+ componentDidUpdate() {
45
+ this.focusedNodeRef && this.focusedNodeRef.focus("end"), r(this.wrapperRef.current);
46
+ }
47
+ onChoiceChanged = (t, n, r) => {
48
+ let { onChange: i, model: a } = this.props, { choices: o, correctResponse: s, alternateResponses: c } = a;
49
+ if (e({ value: t }) && e({ value: n })) return;
50
+ if ((o || []).find((e) => e.value === n && e.id !== r)) {
51
+ t === "" && i((o || []).filter((e) => e.id !== r)), this.setState({ warning: {
52
+ open: !0,
53
+ text: "Identical answer choices are not allowed and the changes will be discarded."
54
+ } });
55
+ return;
56
+ }
57
+ let l = o?.map((e) => e.id === r ? {
58
+ ...e,
59
+ value: n
60
+ } : e) || [];
61
+ if (!e({ value: n })) {
62
+ i(l);
63
+ return;
64
+ }
65
+ let u = !1;
66
+ if (s && Object.keys(s).forEach((e) => {
67
+ s[e] === r && (u = !0);
68
+ }), c && !u && Object.values(c).forEach((e) => {
69
+ e.indexOf(r) >= 0 && (u = !0);
70
+ }), u) {
71
+ this.setState({ warning: {
72
+ open: !0,
73
+ text: "Answer choices cannot be blank and the changes will be discarded."
74
+ } });
75
+ return;
76
+ }
77
+ i(l);
78
+ };
79
+ onChoiceDone = (t) => {
80
+ let { onChange: n, model: r } = this.props, { choices: i } = r, a = (i || []).find((e) => e.id === t);
81
+ if (!a || !e(a)) {
82
+ this.setState({ focusedEl: void 0 });
83
+ return;
84
+ }
85
+ n((i || []).filter((e) => e.id !== t)), this.setState({
86
+ focusedEl: void 0,
87
+ warning: {
88
+ open: !0,
89
+ text: "Answer choices cannot be blank."
90
+ }
91
+ });
92
+ };
93
+ onChoiceFocus = (e) => this.setState({ focusedEl: e });
94
+ onAddChoice = () => {
95
+ let { model: { choices: e }, onChange: t } = this.props, n = `${(e.length > 0 ? Math.max(...e.map((e) => parseInt(e.id, 10) || 0)) : -1) + 1}`;
96
+ this.setState({ focusedEl: n }, () => {
97
+ t([...e, {
98
+ id: n,
99
+ value: ""
100
+ }]);
101
+ });
102
+ };
103
+ onChoiceRemove = (e) => {
104
+ let { onChange: t, model: { choices: n } } = this.props;
105
+ t((n || []).filter((t) => t.id !== e));
106
+ };
107
+ getVisibleChoices = () => {
108
+ let { duplicates: e, model: { choices: t, correctResponse: n } } = this.props;
109
+ return t ? e ? t : t.filter((e) => !(n && Object.values(n).includes(e.id))) : [];
110
+ };
111
+ render() {
112
+ let { focusedEl: e, warning: n } = this.state, { duplicates: r, error: i, mathMlOptions: s = {}, maxChoices: u, model: { choices: h }, toolbarOpts: g, uploadSoundSupport: _, imageSupport: v = {}, pluginProps: y = {}, maxImageWidth: b, maxImageHeight: x, maxLength: S } = this.props, C = this.getVisibleChoices() || [];
113
+ return /* @__PURE__ */ o(d, {
114
+ ref: this.wrapperRef,
115
+ children: [
116
+ /* @__PURE__ */ a(f, {
117
+ variant: "contained",
118
+ color: "primary",
119
+ onClick: this.onAddChoice,
120
+ disabled: u && h && u === h.length,
121
+ children: "Add Choice"
122
+ }),
123
+ /* @__PURE__ */ a(p, { children: C.map((n, o) => !n || !n.id ? null : e === n.id ? /* @__PURE__ */ a("div", {
124
+ style: {
125
+ minWidth: "100%",
126
+ zIndex: "100"
127
+ },
128
+ children: /* @__PURE__ */ a(c, {
129
+ ref: (e) => this.focusedNodeRef = e,
130
+ autoFocus: !0,
131
+ imageSupport: v,
132
+ markup: n.value,
133
+ pluginProps: y,
134
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
135
+ onChange: (e) => {
136
+ this.preventDone || this.onChoiceChanged(n.value, e, n.id);
137
+ },
138
+ onDone: () => {
139
+ this.preventDone || this.onChoiceDone(n.id);
140
+ },
141
+ onBlur: (e) => {
142
+ let t = e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog");
143
+ this.preventDone = t;
144
+ },
145
+ disableUnderline: !0,
146
+ toolbarOpts: g,
147
+ uploadSoundSupport: _,
148
+ mathMlOptions: s,
149
+ maxImageHeight: x,
150
+ maxImageWidth: b,
151
+ charactersLimit: S
152
+ })
153
+ }, o) : /* @__PURE__ */ a(t, {
154
+ duplicates: r,
155
+ choice: n,
156
+ error: i,
157
+ onClick: () => this.onChoiceFocus(n.id),
158
+ onRemoveChoice: () => this.onChoiceRemove(n.id)
159
+ }, o)) }),
160
+ i && /* @__PURE__ */ a(m, { children: i }),
161
+ /* @__PURE__ */ a(l, {
162
+ open: n.open,
163
+ title: "Warning",
164
+ text: n.text,
165
+ onConfirm: () => this.setState({ warning: { open: !1 } })
166
+ })
167
+ ]
168
+ });
169
+ }
170
+ };
171
+ //#endregion
172
+ export { h as default };
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/drag-in-the-blank/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
+ choices: never[];
12
+ choicesPosition: string;
13
+ correctResponse: {};
14
+ disabled: boolean;
15
+ duplicates: boolean;
16
+ markup: string;
17
+ mode: string;
18
+ prompt: string;
19
+ promptEnabled: boolean;
20
+ rationale: string;
21
+ rationaleEnabled: boolean;
22
+ studentInstructionsEnabled: boolean;
23
+ teacherInstructions: string;
24
+ teacherInstructionsEnabled: boolean;
25
+ toolbarEditorPosition: string;
26
+ };
27
+ configuration: {
28
+ baseInputConfiguration: {
29
+ audio: {
30
+ disabled: boolean;
31
+ };
32
+ video: {
33
+ disabled: boolean;
34
+ };
35
+ image: {
36
+ disabled: boolean;
37
+ };
38
+ h3: {
39
+ disabled: boolean;
40
+ };
41
+ blockquote: {
42
+ disabled: boolean;
43
+ };
44
+ textAlign: {
45
+ disabled: boolean;
46
+ };
47
+ showParagraphs: {
48
+ disabled: boolean;
49
+ };
50
+ separateParagraphs: {
51
+ disabled: boolean;
52
+ };
53
+ };
54
+ spellCheck: {
55
+ label: string;
56
+ settings: boolean;
57
+ enabled: boolean;
58
+ };
59
+ choicesPosition: {
60
+ settings: boolean;
61
+ label: string;
62
+ };
63
+ prompt: {
64
+ settings: boolean;
65
+ label: string;
66
+ inputConfiguration: {
67
+ audio: {
68
+ disabled: boolean;
69
+ };
70
+ video: {
71
+ disabled: boolean;
72
+ };
73
+ image: {
74
+ disabled: boolean;
75
+ };
76
+ };
77
+ required: boolean;
78
+ };
79
+ addChoice: {
80
+ inputConfiguration: {
81
+ audio: {
82
+ disabled: boolean;
83
+ };
84
+ video: {
85
+ disabled: boolean;
86
+ };
87
+ image: {
88
+ disabled: boolean;
89
+ };
90
+ };
91
+ };
92
+ duplicates: {
93
+ settings: boolean;
94
+ label: string;
95
+ };
96
+ lockChoiceOrder: {
97
+ settings: boolean;
98
+ label: string;
99
+ };
100
+ partialScoring: {
101
+ settings: boolean;
102
+ label: string;
103
+ };
104
+ rationale: {
105
+ settings: boolean;
106
+ label: string;
107
+ inputConfiguration: {
108
+ audio: {
109
+ disabled: boolean;
110
+ };
111
+ video: {
112
+ disabled: boolean;
113
+ };
114
+ image: {
115
+ disabled: boolean;
116
+ };
117
+ };
118
+ required: boolean;
119
+ };
120
+ settingsPanelDisabled: boolean;
121
+ teacherInstructions: {
122
+ settings: boolean;
123
+ label: string;
124
+ inputConfiguration: {
125
+ audio: {
126
+ disabled: boolean;
127
+ };
128
+ video: {
129
+ disabled: boolean;
130
+ };
131
+ image: {
132
+ disabled: boolean;
133
+ };
134
+ };
135
+ required: boolean;
136
+ };
137
+ minChoices: number;
138
+ maxResponseAreas: number;
139
+ maxImageWidth: {
140
+ teacherInstructions: number;
141
+ prompt: number;
142
+ rationale: number;
143
+ choice: number;
144
+ };
145
+ maxImageHeight: {
146
+ teacherInstructions: number;
147
+ prompt: number;
148
+ rationale: number;
149
+ choice: number;
150
+ };
151
+ withRubric: {
152
+ settings: boolean;
153
+ label: string;
154
+ };
155
+ mathMlOptions: {
156
+ mmlOutput: boolean;
157
+ mmlEditing: boolean;
158
+ };
159
+ language: {
160
+ settings: boolean;
161
+ label: string;
162
+ enabled: boolean;
163
+ };
164
+ languageChoices: {
165
+ label: string;
166
+ options: never[];
167
+ };
168
+ maxLength: number;
169
+ };
170
+ };
171
+ export default _default;
@@ -0,0 +1,123 @@
1
+ //#region src/author/defaults.ts
2
+ var e = {
3
+ model: {
4
+ choices: [],
5
+ choicesPosition: "below",
6
+ correctResponse: {},
7
+ disabled: !1,
8
+ duplicates: !0,
9
+ markup: "",
10
+ mode: "gather",
11
+ prompt: "",
12
+ promptEnabled: !0,
13
+ rationale: "",
14
+ rationaleEnabled: !0,
15
+ studentInstructionsEnabled: !0,
16
+ teacherInstructions: "",
17
+ teacherInstructionsEnabled: !0,
18
+ toolbarEditorPosition: "bottom"
19
+ },
20
+ configuration: {
21
+ baseInputConfiguration: {
22
+ audio: { disabled: !1 },
23
+ video: { disabled: !1 },
24
+ image: { disabled: !1 },
25
+ h3: { disabled: !0 },
26
+ blockquote: { disabled: !0 },
27
+ textAlign: { disabled: !0 },
28
+ showParagraphs: { disabled: !1 },
29
+ separateParagraphs: { disabled: !0 }
30
+ },
31
+ spellCheck: {
32
+ label: "Spellcheck",
33
+ settings: !1,
34
+ enabled: !0
35
+ },
36
+ choicesPosition: {
37
+ settings: !0,
38
+ label: "Choices Position"
39
+ },
40
+ prompt: {
41
+ settings: !0,
42
+ label: "Prompt",
43
+ inputConfiguration: {
44
+ audio: { disabled: !1 },
45
+ video: { disabled: !1 },
46
+ image: { disabled: !1 }
47
+ },
48
+ required: !1
49
+ },
50
+ addChoice: { inputConfiguration: {
51
+ audio: { disabled: !0 },
52
+ video: { disabled: !0 },
53
+ image: { disabled: !1 }
54
+ } },
55
+ duplicates: {
56
+ settings: !0,
57
+ label: "Duplicates"
58
+ },
59
+ lockChoiceOrder: {
60
+ settings: !0,
61
+ label: "Lock Choice Order"
62
+ },
63
+ partialScoring: {
64
+ settings: !1,
65
+ label: "Allow Partial Scoring"
66
+ },
67
+ rationale: {
68
+ settings: !0,
69
+ label: "Rationale",
70
+ inputConfiguration: {
71
+ audio: { disabled: !1 },
72
+ video: { disabled: !1 },
73
+ image: { disabled: !1 }
74
+ },
75
+ required: !1
76
+ },
77
+ settingsPanelDisabled: !1,
78
+ teacherInstructions: {
79
+ settings: !0,
80
+ label: "Teacher Instructions",
81
+ inputConfiguration: {
82
+ audio: { disabled: !1 },
83
+ video: { disabled: !1 },
84
+ image: { disabled: !1 }
85
+ },
86
+ required: !1
87
+ },
88
+ minChoices: 2,
89
+ maxResponseAreas: 10,
90
+ maxImageWidth: {
91
+ teacherInstructions: 300,
92
+ prompt: 300,
93
+ rationale: 300,
94
+ choice: 300
95
+ },
96
+ maxImageHeight: {
97
+ teacherInstructions: 300,
98
+ prompt: 300,
99
+ rationale: 300,
100
+ choice: 300
101
+ },
102
+ withRubric: {
103
+ settings: !1,
104
+ label: "Add Rubric"
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
+ maxLength: 200
120
+ }
121
+ };
122
+ //#endregion
123
+ export { e as default };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/drag-in-the-blank/configure/src/index.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
+ export default class DragInTheBlank extends HTMLElement {
10
+ static prepareModel: (model?: {}) => {
11
+ slateMarkup: any;
12
+ markup: string;
13
+ correctResponse: any;
14
+ choices: never[];
15
+ choicesPosition: string;
16
+ disabled: boolean;
17
+ duplicates: boolean;
18
+ mode: string;
19
+ prompt: string;
20
+ promptEnabled: boolean;
21
+ rationale: string;
22
+ rationaleEnabled: boolean;
23
+ studentInstructionsEnabled: boolean;
24
+ teacherInstructions: string;
25
+ teacherInstructionsEnabled: boolean;
26
+ toolbarEditorPosition: string;
27
+ };
28
+ constructor();
29
+ set model(m: any);
30
+ set configuration(c: any);
31
+ set disableSidePanel(s: any);
32
+ dispatchModelUpdated(reset: any): void;
33
+ onModelChanged(m: any, reset: any): void;
34
+ onConfigurationChanged(c: any): void;
35
+ /** @param {done, progress, file} handler */
36
+ insertImage(handler: any): void;
37
+ onDeleteImage(src: any, done: any): void;
38
+ insertSound(handler: any): void;
39
+ onDeleteSound(src: any, done: any): void;
40
+ _render(): void;
41
+ disconnectedCallback(): void;
42
+ }