@pie-element/extended-text-entry 16.0.4-next.20261011174919 → 16.0.4

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.
@@ -1,146 +1,150 @@
1
1
  declare const _default: {
2
2
  model: {
3
- annotationsEnabled: boolean;
3
+ annotationsEnabled: false;
4
4
  dimensions: {
5
5
  height: number;
6
6
  width: number;
7
7
  };
8
- equationEditor: string;
9
- feedbackEnabled: boolean;
10
- mathInput: boolean;
11
- playerPasteFormattingDisabled: boolean;
12
- playerSpellCheckDisabled: boolean;
13
- predefinedAnnotations: {
8
+ equationEditor: "Grade 8 - HS";
9
+ feedbackEnabled: false;
10
+ mathInput: false;
11
+ playerPasteFormattingDisabled: false;
12
+ playerSpellCheckDisabled: true;
13
+ predefinedAnnotations: ({
14
14
  label: string;
15
15
  text: string;
16
- type: string;
17
- }[];
16
+ type: "positive";
17
+ } | {
18
+ label: string;
19
+ text: string;
20
+ type: "negative";
21
+ })[];
18
22
  prompt: string;
19
- promptEnabled: boolean;
23
+ promptEnabled: true;
20
24
  rationale: string;
21
- rationaleEnabled: boolean;
22
- spanishInput: boolean;
23
- specialInput: boolean;
24
- spellCheckEnabled: boolean;
25
- studentInstructionsEnabled: boolean;
25
+ rationaleEnabled: true;
26
+ spanishInput: false;
27
+ specialInput: false;
28
+ spellCheckEnabled: true;
29
+ studentInstructionsEnabled: true;
26
30
  teacherInstructions: string;
27
- teacherInstructionsEnabled: boolean;
28
- toolbarEditorPosition: string;
31
+ teacherInstructionsEnabled: true;
32
+ toolbarEditorPosition: "bottom";
29
33
  };
30
34
  configuration: {
31
35
  annotations: {
32
- settings: boolean;
36
+ settings: false;
33
37
  label: string;
34
38
  };
35
39
  baseInputConfiguration: {
36
40
  audio: {
37
- disabled: boolean;
41
+ disabled: false;
38
42
  };
39
43
  video: {
40
- disabled: boolean;
44
+ disabled: false;
41
45
  };
42
46
  image: {
43
- disabled: boolean;
47
+ disabled: false;
44
48
  };
45
49
  h3: {
46
- disabled: boolean;
50
+ disabled: true;
47
51
  };
48
52
  blockquote: {
49
- disabled: boolean;
53
+ disabled: true;
50
54
  };
51
55
  textAlign: {
52
- disabled: boolean;
56
+ disabled: true;
53
57
  };
54
58
  showParagraphs: {
55
- disabled: boolean;
59
+ disabled: false;
56
60
  };
57
61
  separateParagraphs: {
58
- disabled: boolean;
62
+ disabled: true;
59
63
  };
60
64
  };
61
65
  dimensions: {
62
- settings: boolean;
66
+ settings: true;
63
67
  label: string;
64
68
  };
65
69
  spellCheck: {
66
70
  label: string;
67
- settings: boolean;
68
- enabled: boolean;
71
+ settings: false;
72
+ enabled: true;
69
73
  };
70
74
  playerSpellCheck: {
71
75
  label: string;
72
- settings: boolean;
73
- enabled: boolean;
76
+ settings: true;
77
+ enabled: true;
74
78
  };
75
79
  playerPasteFormatting: {
76
80
  label: string;
77
- settings: boolean;
81
+ settings: true;
78
82
  };
79
83
  equationEditor: {
80
- settings: boolean;
84
+ settings: false;
81
85
  label: string;
82
- enabled: boolean;
86
+ enabled: true;
83
87
  };
84
88
  feedback: {
85
- settings: boolean;
89
+ settings: true;
86
90
  label: string;
87
91
  };
88
92
  mathInput: {
89
- settings: boolean;
93
+ settings: true;
90
94
  label: string;
91
- enabled: boolean;
95
+ enabled: false;
92
96
  };
93
- settingsPanelDisabled: boolean;
97
+ settingsPanelDisabled: false;
94
98
  spanishInput: {
95
- settings: boolean;
99
+ settings: true;
96
100
  label: string;
97
- enabled: boolean;
101
+ enabled: false;
98
102
  };
99
103
  specialInput: {
100
- settings: boolean;
104
+ settings: true;
101
105
  label: string;
102
- enabled: boolean;
106
+ enabled: false;
103
107
  };
104
108
  multiple: {
105
- settings: boolean;
109
+ settings: false;
106
110
  label: string;
107
- enabled: boolean;
111
+ enabled: false;
108
112
  };
109
113
  studentInstructions: {
110
- settings: boolean;
114
+ settings: false;
111
115
  label: string;
112
116
  };
113
117
  prompt: {
114
- settings: boolean;
118
+ settings: true;
115
119
  label: string;
116
120
  inputConfiguration: {
117
121
  audio: {
118
- disabled: boolean;
122
+ disabled: false;
119
123
  };
120
124
  video: {
121
- disabled: boolean;
125
+ disabled: false;
122
126
  };
123
127
  image: {
124
- disabled: boolean;
128
+ disabled: false;
125
129
  };
126
130
  };
127
- required: boolean;
131
+ required: false;
128
132
  };
129
133
  teacherInstructions: {
130
- settings: boolean;
134
+ settings: true;
131
135
  label: string;
132
136
  inputConfiguration: {
133
137
  audio: {
134
- disabled: boolean;
138
+ disabled: false;
135
139
  };
136
140
  video: {
137
- disabled: boolean;
141
+ disabled: false;
138
142
  };
139
143
  image: {
140
- disabled: boolean;
144
+ disabled: false;
141
145
  };
142
146
  };
143
- required: boolean;
147
+ required: false;
144
148
  };
145
149
  maxImageWidth: {
146
150
  teacherInstructions: number;
@@ -151,12 +155,12 @@ declare const _default: {
151
155
  prompt: number;
152
156
  };
153
157
  withRubric: {
154
- settings: boolean;
158
+ settings: false;
155
159
  label: string;
156
160
  };
157
161
  mathMlOptions: {
158
- mmlOutput: boolean;
159
- mmlEditing: boolean;
162
+ mmlOutput: false;
163
+ mmlEditing: false;
160
164
  };
161
165
  };
162
166
  };
@@ -1,45 +1,24 @@
1
+ import { type DeleteDone, type ImageHandler, type SoundHandler } from '@pie-element/shared-configure-events';
2
+ import { type AuthorModel } from './main.js';
3
+ import type { ExtendedTextEntryConfiguration } from '../types.js';
1
4
  export default class ExtendedTextEntry extends HTMLElement {
2
- static createDefaultModel: (model: {} | undefined, config: any) => {
3
- annotationsEnabled: boolean;
4
- dimensions: {
5
- height: number;
6
- width: number;
7
- };
8
- equationEditor: string;
9
- feedbackEnabled: boolean;
10
- mathInput: boolean;
11
- playerPasteFormattingDisabled: boolean;
12
- playerSpellCheckDisabled: boolean;
13
- predefinedAnnotations: {
14
- label: string;
15
- text: string;
16
- type: string;
17
- }[];
18
- prompt: string;
19
- promptEnabled: boolean;
20
- rationale: string;
21
- rationaleEnabled: boolean;
22
- spanishInput: boolean;
23
- specialInput: boolean;
24
- spellCheckEnabled: boolean;
25
- studentInstructionsEnabled: boolean;
26
- teacherInstructions: string;
27
- teacherInstructionsEnabled: boolean;
28
- toolbarEditorPosition: string;
29
- };
5
+ private _root;
6
+ private _model;
7
+ private _configuration;
8
+ static createDefaultModel: (model?: AuthorModel, config?: ExtendedTextEntryConfiguration) => AuthorModel;
30
9
  constructor();
31
- set model(m: any);
32
- set configuration(c: any);
33
- onModelChanged(m: any): void;
34
- onConfigurationChanged(c: any): void;
10
+ set model(m: AuthorModel);
11
+ set configuration(c: ExtendedTextEntryConfiguration);
12
+ onModelChanged(m: AuthorModel): void;
13
+ onConfigurationChanged(c: ExtendedTextEntryConfiguration): void;
35
14
  /**
36
15
  *
37
16
  * @param {done, progress, file} handler
38
17
  */
39
- insertImage(handler: any): void;
40
- onDeleteImage(src: any, done: any): void;
41
- insertSound(handler: any): void;
42
- onDeleteSound(src: any, done: any): void;
18
+ insertImage(handler: ImageHandler): void;
19
+ onDeleteImage(src: string, done: DeleteDone): void;
20
+ insertSound(handler: SoundHandler): void;
21
+ onDeleteSound(src: string, done: DeleteDone): void;
43
22
  render(): void;
44
23
  connectedCallback(): void;
45
24
  disconnectedCallback(): void;
@@ -5,6 +5,9 @@ import { createRoot as r } from "react-dom/client";
5
5
  import { DeleteImageEvent as i, DeleteSoundEvent as a, InsertImageEvent as o, InsertSoundEvent as s, ModelUpdatedEvent as c } from "@pie-element/shared-configure-events";
6
6
  //#region src/author/index.ts
7
7
  var l = class l extends HTMLElement {
8
+ _root;
9
+ _model;
10
+ _configuration;
8
11
  static createDefaultModel = (e = {}, n) => {
9
12
  let r = {
10
13
  ...t.model,
@@ -19,12 +22,13 @@ var l = class l extends HTMLElement {
19
22
  this._model = l.createDefaultModel(e, this._configuration), this.render();
20
23
  }
21
24
  set configuration(e) {
22
- this._configuration = {
25
+ let n = {
23
26
  ...t.configuration,
24
27
  ...e
25
28
  };
26
- let { withRubric: n = {} } = e || {};
27
- n?.forceEnabled && (this._configuration.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
29
+ this._configuration = n;
30
+ let { withRubric: r = {} } = e || {};
31
+ r?.forceEnabled && (n.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
28
32
  }
29
33
  onModelChanged(e) {
30
34
  this._model = e, this.render(), this.dispatchEvent(new c(this._model, !1));
@@ -1,18 +1,33 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
- export declare class Main extends React.Component {
4
- static propTypes: {
5
- onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
6
- onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
7
- model: PropTypes.Validator<object>;
8
- configuration: PropTypes.Validator<object>;
9
- imageSupport: PropTypes.Validator<object>;
10
- uploadSoundSupport: PropTypes.Validator<object>;
2
+ import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
3
+ import type { ExtendedTextEntryValidationErrors } from '../controller/index.js';
4
+ import type { ExtendedTextEntryConfiguration, ExtendedTextEntryFeedback, ExtendedTextEntryModel } from '../types.js';
5
+ /** The model the author edits; the host sets `errors` from the controller's `validate()`. */
6
+ export type AuthorModel = Partial<ExtendedTextEntryModel> & {
7
+ errors?: ExtendedTextEntryValidationErrors;
8
+ };
9
+ export type MainProps = {
10
+ model: AuthorModel;
11
+ configuration: ExtendedTextEntryConfiguration;
12
+ onModelChanged: (model: AuthorModel) => void;
13
+ onConfigurationChanged: (configuration: ExtendedTextEntryConfiguration) => void;
14
+ imageSupport: {
15
+ add: (handler: ImageHandler) => void;
16
+ delete: (src: string, done: DeleteDone) => void;
11
17
  };
12
- constructor(props: any);
13
- onPromptChange: any;
14
- changeFeedback: any;
15
- changeTeacherInstructions: any;
18
+ uploadSoundSupport: {
19
+ add: (handler: SoundHandler) => void;
20
+ delete: (src: string, done: DeleteDone) => void;
21
+ };
22
+ };
23
+ type MainState = {
24
+ setDimensions: boolean;
25
+ };
26
+ export declare class Main extends React.Component<MainProps, MainState> {
27
+ constructor(props: MainProps);
28
+ onPromptChange: (markup: string) => void;
29
+ changeFeedback: (feedback: ExtendedTextEntryFeedback) => void;
30
+ changeTeacherInstructions: (teacherInstructions: string) => void;
16
31
  render(): React.JSX.Element;
17
32
  }
18
33
  export default Main;
@@ -1,32 +1,23 @@
1
1
  import e from "react";
2
- import t from "prop-types";
3
- import n from "@mui/material/Typography";
4
- import { styled as r } from "@mui/material/styles";
5
- import i, { ALL_PLUGINS as a } from "@pie-lib/editable-html-tip-tap";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { FeedbackSelector as c, InputContainer as l, layout as u, settings as d } from "@pie-lib/config-ui";
2
+ import t from "@mui/material/Typography";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import r, { ALL_PLUGINS as i } from "@pie-lib/editable-html-tip-tap";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { FeedbackSelector as s, InputContainer as c, layout as l, settings as u } from "@pie-lib/config-ui";
8
7
  //#region src/author/main.tsx
9
- var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
8
+ var { Panel: d, toggle: f, numberFields: p, dropdown: m } = u, h = {
10
9
  type: "default",
11
10
  default: "Your answer has been submitted"
12
- }, g = r(n)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), _ = r(l)(({ theme: e }) => ({
11
+ }, g = n(t)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), _ = n(c)(({ theme: e }) => ({
13
12
  paddingTop: e.spacing(1),
14
13
  marginTop: e.spacing(2),
15
14
  marginBottom: e.spacing(2),
16
15
  width: "100%"
17
- })), v = r("div")(({ theme: e }) => ({
16
+ })), v = n("div")(({ theme: e }) => ({
18
17
  fontSize: e.typography.fontSize - 2,
19
18
  color: e.palette.error.main,
20
19
  paddingTop: e.spacing(1)
21
20
  })), y = class extends e.Component {
22
- static propTypes = {
23
- onModelChanged: t.func.isRequired,
24
- onConfigurationChanged: t.func,
25
- model: t.object.isRequired,
26
- configuration: t.object.isRequired,
27
- imageSupport: t.object.isRequired,
28
- uploadSoundSupport: t.object.isRequired
29
- };
30
21
  constructor(e) {
31
22
  super(e), this.state = { setDimensions: !0 };
32
23
  }
@@ -52,9 +43,9 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
52
43
  });
53
44
  };
54
45
  render() {
55
- let { model: t, configuration: n, imageSupport: r, onConfigurationChanged: l, onModelChanged: d, uploadSoundSupport: y } = this.props, { annotations: b = {}, contentDimensions: x = {}, dimensions: S = {}, equationEditor: C = {}, feedback: w = {}, playerPasteFormatting: T = {}, playerSpellCheck: E = {}, prompt: D = {}, settingsPanelDisabled: O, spanishInput: k = {}, specialInput: A = {}, spellCheck: j = {}, studentInstructions: M = {}, teacherInstructions: N = {}, mathInput: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, multiple: L = {}, withRubric: R = {}, mathMlOptions: z = {}, baseInputConfiguration: B = {} } = n || {}, { errors: V = {}, extraCSSRules: H, feedbackEnabled: U, promptEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, toolbarEditorPosition: q } = t || {}, { prompt: J, teacherInstructions: Y } = V, X = F && F.prompt, Z = I && I.prompt, Q = { position: q === "top" ? "top" : "bottom" }, te = {
56
- mathInput: P.settings && p(P.label),
57
- equationEditor: C.enabled && t.mathInput && h(C.label, [
46
+ let { model: t, configuration: n, imageSupport: c, onConfigurationChanged: u, onModelChanged: y, uploadSoundSupport: b } = this.props, { annotations: x = {}, contentDimensions: S = {}, dimensions: C = {}, equationEditor: w = {}, feedback: T = {}, playerPasteFormatting: E = {}, playerSpellCheck: D = {}, prompt: O = {}, settingsPanelDisabled: ee, spanishInput: k = {}, specialInput: A = {}, spellCheck: j = {}, studentInstructions: M = {}, teacherInstructions: N = {}, mathInput: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, multiple: L = {}, withRubric: R = {}, mathMlOptions: z = {}, baseInputConfiguration: B = {} } = n || {}, { errors: V = {}, extraCSSRules: H, feedbackEnabled: U, promptEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, toolbarEditorPosition: q } = t || {}, { prompt: J, teacherInstructions: Y } = V, X = F && F.prompt, Z = I && I.prompt, Q = { position: q === "top" ? "top" : "bottom" }, te = {
47
+ mathInput: P.settings && f(P.label),
48
+ equationEditor: w.enabled && t.mathInput && m(w.label, [
58
49
  "non-negative-integers",
59
50
  "integers",
60
51
  "decimals",
@@ -68,9 +59,9 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
68
59
  "statistics",
69
60
  "item-authoring"
70
61
  ]),
71
- spanishInput: k.settings && p(k.label),
72
- specialInput: A.settings && p(A.label),
73
- dimensions: S.settings && m(S.label, {
62
+ spanishInput: k.settings && f(k.label),
63
+ specialInput: A.settings && f(A.label),
64
+ dimensions: C.settings && p(C.label, {
74
65
  width: {
75
66
  label: "Width (px)",
76
67
  suffix: "px",
@@ -84,78 +75,78 @@ var { Panel: f, toggle: p, numberFields: m, dropdown: h } = d, ee = {
84
75
  max: 500
85
76
  }
86
77
  }),
87
- "multiple.enabled": L.settings && p(L.label, !0),
88
- promptEnabled: D.settings && p(D.label),
89
- feedbackEnabled: w.settings && p(w.label),
90
- annotationsEnabled: b.settings && p(b.label),
91
- spellCheckEnabled: j.settings && p(j.label),
92
- playerSpellCheckDisabled: E.settings && p(E.label),
93
- playerPasteFormattingDisabled: T.settings && p(T.label)
78
+ "multiple.enabled": L.settings && f(L.label, !0),
79
+ promptEnabled: O.settings && f(O.label),
80
+ feedbackEnabled: T.settings && f(T.label),
81
+ annotationsEnabled: x.settings && f(x.label),
82
+ spellCheckEnabled: j.settings && f(j.label),
83
+ playerSpellCheckDisabled: D.settings && f(D.label),
84
+ playerPasteFormattingDisabled: E.settings && f(E.label)
94
85
  }, ne = {
95
- teacherInstructionsEnabled: N.settings && p(N.label),
96
- studentInstructionsEnabled: M.settings && p(M.label),
97
- rubricEnabled: R?.settings && p(R?.label)
86
+ teacherInstructionsEnabled: N.settings && f(N.label),
87
+ studentInstructionsEnabled: M.settings && f(M.label),
88
+ rubricEnabled: R?.settings && f(R?.label)
98
89
  }, $ = (e) => Object.assign({ ...B }, e || {});
99
- return /* @__PURE__ */ s(u.ConfigLayout, {
90
+ return /* @__PURE__ */ o(l.ConfigLayout, {
100
91
  extraCSSRules: H,
101
- dimensions: x,
102
- hideSettings: O,
103
- settings: /* @__PURE__ */ o(f, {
92
+ dimensions: S,
93
+ hideSettings: ee,
94
+ settings: /* @__PURE__ */ a(d, {
104
95
  model: t,
105
96
  configuration: n,
106
- onChangeModel: (e) => d(e),
107
- onChangeConfiguration: (e) => l(e),
97
+ onChangeModel: (e) => y(e),
98
+ onChangeConfiguration: (e) => u(e),
108
99
  groups: {
109
100
  Settings: te,
110
101
  Properties: ne
111
102
  }
112
103
  }),
113
104
  children: [
114
- K && /* @__PURE__ */ s(_, {
105
+ K && /* @__PURE__ */ o(_, {
115
106
  label: N.label,
116
- children: [/* @__PURE__ */ o(i, {
107
+ children: [/* @__PURE__ */ a(r, {
117
108
  className: "prompt",
118
109
  markup: t.teacherInstructions || "",
119
110
  onChange: this.changeTeacherInstructions,
120
- imageSupport: r,
111
+ imageSupport: c,
121
112
  nonEmpty: !1,
122
113
  error: Y,
123
114
  toolbarOpts: Q,
124
115
  spellCheck: G,
125
116
  maxImageWidth: F && F.teacherInstructions || X,
126
117
  maxImageHeight: I && I.teacherInstructions || Z,
127
- uploadSoundSupport: y,
118
+ uploadSoundSupport: b,
128
119
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
129
120
  mathMlOptions: z,
130
121
  pluginProps: $(N?.inputConfiguration)
131
- }), Y && /* @__PURE__ */ o(v, { children: Y })]
122
+ }), Y && /* @__PURE__ */ a(v, { children: Y })]
132
123
  }),
133
- W && /* @__PURE__ */ s(_, {
134
- label: D.label,
135
- children: [/* @__PURE__ */ o(i, {
136
- activePlugins: a,
124
+ W && /* @__PURE__ */ o(_, {
125
+ label: O.label,
126
+ children: [/* @__PURE__ */ a(r, {
127
+ activePlugins: i,
137
128
  className: "prompt",
138
129
  markup: t.prompt || "",
139
130
  onChange: this.onPromptChange,
140
- imageSupport: r,
131
+ imageSupport: c,
141
132
  nonEmpty: !1,
142
133
  error: J,
143
134
  toolbarOpts: Q,
144
135
  spellCheck: G,
145
136
  maxImageWidth: X,
146
137
  maxImageHeight: Z,
147
- uploadSoundSupport: y,
138
+ uploadSoundSupport: b,
148
139
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
149
140
  mathMlOptions: z,
150
- pluginProps: $(D?.inputConfiguration)
151
- }), J && /* @__PURE__ */ o(v, { children: J })]
141
+ pluginProps: $(O?.inputConfiguration)
142
+ }), J && /* @__PURE__ */ a(v, { children: J })]
152
143
  }),
153
- U && /* @__PURE__ */ s(e.Fragment, { children: [/* @__PURE__ */ o(g, {
144
+ U && /* @__PURE__ */ o(e.Fragment, { children: [/* @__PURE__ */ a(g, {
154
145
  variant: "h6",
155
146
  children: "Feedback"
156
- }), /* @__PURE__ */ o(c, {
147
+ }), /* @__PURE__ */ a(s, {
157
148
  label: "When submitted, show",
158
- feedback: t.feedback || ee,
149
+ feedback: t.feedback || h,
159
150
  onChange: this.changeFeedback,
160
151
  toolbarOpts: Q
161
152
  })] })
@@ -2093,15 +2093,12 @@ var mr = class extends V.Component {
2093
2093
  }), vr = (e) => typeof e == "string" ? {
2094
2094
  label: e,
2095
2095
  value: e
2096
- } : e, yr = function() {
2097
- let [e, t, n = !1] = Array.prototype.slice.call(arguments);
2098
- return {
2099
- type: "radio",
2100
- label: e,
2101
- choices: t && t.map((e) => vr(e)),
2102
- isConfigProperty: n
2103
- };
2104
- }, br = (e, t, n = !1) => ({
2096
+ } : e, yr = (e, t, n = !1) => ({
2097
+ type: "radio",
2098
+ label: e,
2099
+ choices: t && t.map((e) => vr(e)),
2100
+ isConfigProperty: n
2101
+ }), br = (e, t, n = !1) => ({
2105
2102
  type: "dropdown",
2106
2103
  label: e,
2107
2104
  choices: t,
@@ -2200,14 +2197,6 @@ var mr = class extends V.Component {
2200
2197
  color: e.palette.error.main,
2201
2198
  paddingTop: e.spacing(1)
2202
2199
  })), Lr = class extends V.Component {
2203
- static propTypes = {
2204
- onModelChanged: K.default.func.isRequired,
2205
- onConfigurationChanged: K.default.func,
2206
- model: K.default.object.isRequired,
2207
- configuration: K.default.object.isRequired,
2208
- imageSupport: K.default.object.isRequired,
2209
- uploadSoundSupport: K.default.object.isRequired
2210
- };
2211
2200
  constructor(e) {
2212
2201
  super(e), this.state = { setDimensions: !0 };
2213
2202
  }
@@ -2554,6 +2543,9 @@ var mr = class extends V.Component {
2554
2543
  }
2555
2544
  }
2556
2545
  }, zr = class e extends HTMLElement {
2546
+ _root;
2547
+ _model;
2548
+ _configuration;
2557
2549
  static createDefaultModel = (e = {}, t) => {
2558
2550
  let n = {
2559
2551
  ...Rr.model,
@@ -2568,12 +2560,13 @@ var mr = class extends V.Component {
2568
2560
  this._model = e.createDefaultModel(t, this._configuration), this.render();
2569
2561
  }
2570
2562
  set configuration(e) {
2571
- this._configuration = {
2563
+ let t = {
2572
2564
  ...Rr.configuration,
2573
2565
  ...e
2574
2566
  };
2575
- let { withRubric: t = {} } = e || {};
2576
- t?.forceEnabled && (this._configuration.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
2567
+ this._configuration = t;
2568
+ let { withRubric: n = {} } = e || {};
2569
+ n?.forceEnabled && (t.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
2577
2570
  }
2578
2571
  onModelChanged(e) {
2579
2572
  this._model = e, this.render(), this.dispatchEvent(new Tr(this._model, !1));