@pie-element/hotspot 12.0.4-next.20261011174919 → 12.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,3 +1,5 @@
1
+ import type { ConfigureLanguageOptionsProp } from '@pie-element/shared-types';
2
+ import type { Circle, Polygon, Rectangle } from '../types.js';
1
3
  declare const _default: {
2
4
  model: {
3
5
  dimensions: {
@@ -7,113 +9,113 @@ declare const _default: {
7
9
  hotspotColor: string;
8
10
  hotspotList: string[];
9
11
  imageUrl: string;
10
- multipleCorrect: boolean;
12
+ multipleCorrect: true;
11
13
  outlineColor: string;
12
14
  outlineList: string[];
13
- partialScoring: boolean;
15
+ partialScoring: false;
14
16
  prompt: string;
15
- promptEnabled: boolean;
16
- rationaleEnabled: boolean;
17
+ promptEnabled: true;
18
+ rationaleEnabled: true;
17
19
  shapes: {
18
- rectangles: never[];
19
- polygons: never[];
20
- circles: never[];
20
+ rectangles: Rectangle[];
21
+ polygons: Polygon[];
22
+ circles: Circle[];
21
23
  };
22
24
  strokeWidth: number;
23
- studentInstructionsEnabled: boolean;
25
+ studentInstructionsEnabled: true;
24
26
  teacherInstructions: string;
25
- teacherInstructionsEnabled: boolean;
26
- toolbarEditorPosition: string;
27
+ teacherInstructionsEnabled: true;
28
+ toolbarEditorPosition: "bottom";
27
29
  };
28
30
  configuration: {
29
31
  baseInputConfiguration: {
30
32
  h3: {
31
- disabled: boolean;
33
+ disabled: true;
32
34
  };
33
35
  audio: {
34
- disabled: boolean;
36
+ disabled: false;
35
37
  };
36
38
  video: {
37
- disabled: boolean;
39
+ disabled: false;
38
40
  };
39
41
  image: {
40
- disabled: boolean;
42
+ disabled: false;
41
43
  };
42
44
  textAlign: {
43
- disabled: boolean;
45
+ disabled: true;
44
46
  };
45
47
  showParagraphs: {
46
- disabled: boolean;
48
+ disabled: false;
47
49
  };
48
50
  separateParagraphs: {
49
- disabled: boolean;
51
+ disabled: true;
50
52
  };
51
53
  };
52
54
  multipleCorrect: {
53
- settings: boolean;
55
+ settings: true;
54
56
  label: string;
55
57
  };
56
58
  partialScoring: {
57
- settings: boolean;
59
+ settings: false;
58
60
  label: string;
59
61
  };
60
62
  rationale: {
61
- settings: boolean;
63
+ settings: true;
62
64
  label: string;
63
65
  inputConfiguration: {
64
66
  audio: {
65
- disabled: boolean;
67
+ disabled: false;
66
68
  };
67
69
  video: {
68
- disabled: boolean;
70
+ disabled: false;
69
71
  };
70
72
  image: {
71
- disabled: boolean;
73
+ disabled: false;
72
74
  };
73
75
  };
74
- required: boolean;
76
+ required: false;
75
77
  };
76
78
  prompt: {
77
- settings: boolean;
79
+ settings: true;
78
80
  label: string;
79
81
  inputConfiguration: {
80
82
  audio: {
81
- disabled: boolean;
83
+ disabled: false;
82
84
  };
83
85
  video: {
84
- disabled: boolean;
86
+ disabled: false;
85
87
  };
86
88
  image: {
87
- disabled: boolean;
89
+ disabled: false;
88
90
  };
89
91
  };
90
- required: boolean;
92
+ required: false;
91
93
  };
92
- settingsPanelDisabled: boolean;
94
+ settingsPanelDisabled: false;
93
95
  spellCheck: {
94
96
  label: string;
95
- settings: boolean;
96
- enabled: boolean;
97
+ settings: false;
98
+ enabled: true;
97
99
  };
98
100
  teacherInstructions: {
99
- settings: boolean;
101
+ settings: true;
100
102
  label: string;
101
103
  inputConfiguration: {
102
104
  audio: {
103
- disabled: boolean;
105
+ disabled: false;
104
106
  };
105
107
  video: {
106
- disabled: boolean;
108
+ disabled: false;
107
109
  };
108
110
  image: {
109
- disabled: boolean;
111
+ disabled: false;
110
112
  };
111
113
  };
112
- required: boolean;
114
+ required: false;
113
115
  };
114
116
  preserveAspectRatio: {
115
- settings: boolean;
116
- enabled: boolean;
117
+ settings: false;
118
+ enabled: true;
117
119
  label: string;
118
120
  };
119
121
  minShapes: number;
@@ -128,21 +130,21 @@ declare const _default: {
128
130
  rationale: number;
129
131
  };
130
132
  withRubric: {
131
- settings: boolean;
133
+ settings: false;
132
134
  label: string;
133
135
  };
134
136
  mathMlOptions: {
135
- mmlOutput: boolean;
136
- mmlEditing: boolean;
137
+ mmlOutput: false;
138
+ mmlEditing: false;
137
139
  };
138
140
  language: {
139
- settings: boolean;
141
+ settings: false;
140
142
  label: string;
141
- enabled: boolean;
143
+ enabled: false;
142
144
  };
143
145
  languageChoices: {
144
146
  label: string;
145
- options: never[];
147
+ options: ConfigureLanguageOptionsProp[];
146
148
  };
147
149
  };
148
150
  };
@@ -1,5 +1,24 @@
1
1
  import React, { Component } from 'react';
2
- export declare class Container extends Component {
2
+ import type { ImageHandler } from '@pie-element/shared-configure-events';
3
+ import type { Dimensions, Shapes } from '../types.js';
4
+ type ContainerProps = {
5
+ dimensions?: Dimensions;
6
+ imageUrl?: string;
7
+ hotspotColor?: string;
8
+ selectedHotspotColor?: string;
9
+ hoverOutlineColor?: string;
10
+ multipleCorrect?: boolean;
11
+ onImageUpload: (imageUrl: string) => void;
12
+ onUpdateImageDimension: (dimensions: Dimensions) => void;
13
+ insertImage?: (handler: ImageHandler) => void;
14
+ onUpdateShapes: (shapes: Shapes) => void;
15
+ outlineColor?: string;
16
+ shapes: Shapes;
17
+ strokeWidth?: number;
18
+ preserveAspectRatioEnabled?: boolean;
19
+ hasErrors?: boolean;
20
+ };
21
+ export declare class Container extends Component<ContainerProps> {
3
22
  static getDerivedStateFromProps(nextProps: any, prevState: any): any;
4
23
  constructor(props: any);
5
24
  handleFileRead: any;
@@ -1,5 +1,13 @@
1
1
  import React from 'react';
2
- declare class Palette extends React.Component {
2
+ type PaletteProps = {
3
+ hotspotColor?: string;
4
+ hotspotList?: string[];
5
+ onHotspotColorChange: (color: string) => void;
6
+ onOutlineColorChange: (color: string) => void;
7
+ outlineColor?: string;
8
+ outlineList?: string[];
9
+ };
10
+ declare class Palette extends React.Component<PaletteProps> {
3
11
  onChange: (name: any) => (event: any) => void;
4
12
  render(): React.JSX.Element;
5
13
  }
@@ -1,44 +1,29 @@
1
+ import { type DeleteDone, type ImageHandler, type SoundHandler } from '@pie-element/shared-configure-events';
2
+ import { type AuthorModel } from './root.js';
3
+ import type { Dimensions, HotspotConfiguration, HotspotModel, Shapes } from '../types.js';
1
4
  export default class HotspotConfigure extends HTMLElement {
2
- static createDefaultModel: (model?: {}) => {
3
- hotspotList: any;
4
- outlineList: any;
5
- shapes: any;
6
- dimensions: {
7
- height: number;
8
- width: number;
9
- };
10
- hotspotColor: string;
11
- imageUrl: string;
12
- multipleCorrect: boolean;
13
- outlineColor: string;
14
- partialScoring: boolean;
15
- prompt: string;
16
- promptEnabled: boolean;
17
- rationaleEnabled: boolean;
18
- strokeWidth: number;
19
- studentInstructionsEnabled: boolean;
20
- teacherInstructions: string;
21
- teacherInstructionsEnabled: boolean;
22
- toolbarEditorPosition: string;
23
- };
5
+ private _root;
6
+ private _model;
7
+ private _configuration;
8
+ static createDefaultModel: (model?: Partial<HotspotModel>) => AuthorModel;
24
9
  constructor();
25
- set model(s: any);
26
- set configuration(c: any);
27
- dispatchModelUpdated(reset: any): void;
28
- onModelChanged(m: any, reset: any): void;
29
- onConfigurationChanged: any;
30
- onModelChangedByConfig: any;
31
- onColorChanged: any;
32
- onPromptChanged: any;
33
- onRationaleChanged: any;
34
- onTeacherInstructionsChanged: any;
35
- onUpdateImageDimension: any;
36
- onUpdateShapes: any;
37
- onImageUpload: any;
38
- insertImage: any;
39
- onDeleteImage: any;
40
- insertSound(handler: any): void;
41
- onDeleteSound(src: any, done: any): void;
10
+ set model(s: Partial<HotspotModel>);
11
+ set configuration(c: HotspotConfiguration);
12
+ dispatchModelUpdated(reset?: boolean): void;
13
+ onModelChanged(m: AuthorModel, reset?: boolean): void;
14
+ onConfigurationChanged: (c: HotspotConfiguration) => void;
15
+ onModelChangedByConfig: (m: AuthorModel, propertyType?: string) => void;
16
+ onColorChanged: (colorType: "hotspotColor" | "outlineColor", color: string) => void;
17
+ onPromptChanged: (prompt: string) => void;
18
+ onRationaleChanged: (rationale: string) => void;
19
+ onTeacherInstructionsChanged: (teacherInstructions: string) => void;
20
+ onUpdateImageDimension: (dimensions: Dimensions) => void;
21
+ onUpdateShapes: (shapes: Shapes) => void;
22
+ onImageUpload: (imageUrl: string) => void;
23
+ insertImage: (handler: ImageHandler) => void;
24
+ onDeleteImage: (src: string, done: DeleteDone) => void;
25
+ insertSound(handler: SoundHandler): void;
26
+ onDeleteSound(src: string, done: DeleteDone): void;
42
27
  _render(): void;
43
28
  connectedCallback(): void;
44
29
  disconnectedCallback(): void;
@@ -6,12 +6,15 @@ import i from "debug";
6
6
  import { DeleteImageEvent as a, DeleteSoundEvent as o, InsertImageEvent as s, InsertSoundEvent as c, ModelUpdatedEvent as l } from "@pie-element/shared-configure-events";
7
7
  //#region src/author/index.ts
8
8
  var u = i("hotspot:configure"), d = class i extends HTMLElement {
9
+ _root;
10
+ _model;
11
+ _configuration;
9
12
  static createDefaultModel = (e = {}) => ({
10
13
  ...t.model,
11
14
  ...e,
12
15
  hotspotList: e.hotspotList || [e.hotspotColor],
13
16
  outlineList: e.outlineList || [e.outlineColor],
14
- shapes: e.shapes || t.model.shapes || {}
17
+ shapes: e.shapes || t.model.shapes
15
18
  });
16
19
  constructor() {
17
20
  super(), this._root = null, this._model = i.createDefaultModel(), this._configuration = t.configuration, this.onModelChanged = this.onModelChanged.bind(this);
@@ -24,7 +27,7 @@ var u = i("hotspot:configure"), d = class i extends HTMLElement {
24
27
  ...t.configuration,
25
28
  ...e
26
29
  };
27
- this._configuration = n, n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
30
+ this._configuration = n, n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.language.settings && this._model.language ? (n.language.enabled = !0, (!n.languageChoices.options || !n.languageChoices.options.length) && (n.languageChoices.options = []), n.languageChoices.options.find((e) => e.value === this._model.language) || n.languageChoices.options.push({
28
31
  value: this._model.language,
29
32
  label: this._model.language
30
33
  })) : delete this._model.language, this._render();
@@ -1,7 +1,35 @@
1
1
  import React from 'react';
2
- export declare class Root extends React.Component {
3
- handleColorChange: any;
4
- handleOnUpdateImageDimensions: any;
2
+ import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
3
+ import type { HotspotValidationErrors } from '../controller/index.js';
4
+ import type { Dimensions, HotspotConfiguration, HotspotModel, Shapes } from '../types.js';
5
+ /** The model the author edits; the host sets `errors` from the controller's `validate()`. */
6
+ export type AuthorModel = Partial<HotspotModel> & {
7
+ shapes: Shapes;
8
+ dimensions: Dimensions;
9
+ errors?: HotspotValidationErrors;
10
+ };
11
+ type MediaSupport<Handler> = {
12
+ add: (handler: Handler) => void;
13
+ delete: (src: string, done: DeleteDone) => void;
14
+ };
15
+ export type RootProps = {
16
+ configuration: HotspotConfiguration;
17
+ model: AuthorModel;
18
+ imageSupport?: MediaSupport<ImageHandler>;
19
+ uploadSoundSupport?: MediaSupport<SoundHandler>;
20
+ onImageUpload: (imageUrl: string) => void;
21
+ onColorChanged: (colorType: 'hotspotColor' | 'outlineColor', color: string) => void;
22
+ onPromptChanged: (prompt: string) => void;
23
+ onUpdateImageDimension: (dimensions: Dimensions) => void;
24
+ onUpdateShapes: (shapes: Shapes) => void;
25
+ onModelChangedByConfig: (model: AuthorModel, propertyType?: string) => void;
26
+ onRationaleChanged: (rationale: string) => void;
27
+ onConfigurationChanged: (configuration: HotspotConfiguration) => void;
28
+ onTeacherInstructionsChanged: (teacherInstructions: string) => void;
29
+ };
30
+ export declare class Root extends React.Component<RootProps> {
31
+ handleColorChange: (fieldType: "hotspot" | "outline", color: string) => void;
32
+ handleOnUpdateImageDimensions: (value: number, resizeType: "width" | "height") => void;
5
33
  render(): React.JSX.Element;
6
34
  }
7
35
  export default Root;
@@ -2,38 +2,37 @@ import e from "./hotspot-palette.js";
2
2
  import { generateValidationMessage as t, getAllShapes as n, getUpdatedShapes as r, groupShapes as i, updateImageDimensions as a } from "./utils.js";
3
3
  import { Container as o } from "./hotspot-container.js";
4
4
  import s from "react";
5
- import c from "prop-types";
6
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import { styled as d } from "@mui/material/styles";
8
- import { InputContainer as f, NumberTextField as p, layout as m, settings as h } from "@pie-lib/config-ui";
9
- import g from "@pie-lib/editable-html-tip-tap";
10
- import _ from "@mui/material/Typography";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { styled as u } from "@mui/material/styles";
7
+ import { InputContainer as d, NumberTextField as f, layout as p, settings as m } from "@pie-lib/config-ui";
8
+ import h from "@pie-lib/editable-html-tip-tap";
9
+ import g from "@mui/material/Typography";
11
10
  import ee from "@mui/icons-material/Info";
12
- import v from "@mui/material/Tooltip";
11
+ import _ from "@mui/material/Tooltip";
13
12
  //#region src/author/root.tsx
14
- var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("div")(({ theme: e }) => ({
13
+ var { Panel: te, toggle: v, dropdown: y } = m, b = (e) => e != null, ne = u("div")(({ theme: e }) => ({
15
14
  display: "flex",
16
15
  marginBottom: e.spacing(1.5)
17
- })), x = d("div")({
16
+ })), x = u("div")({
18
17
  flex: 1,
19
18
  width: "90%"
20
- }), S = d(f)(({ theme: e }) => ({
19
+ }), S = u(d)(({ theme: e }) => ({
21
20
  paddingTop: e.spacing(1),
22
21
  marginTop: e.spacing(2),
23
22
  marginBottom: e.spacing(2),
24
23
  width: "100%"
25
- })), ie = d(_)(({ theme: e }) => ({ marginRight: e.spacing(1) })), ae = d("div")({
24
+ })), C = u(g)(({ theme: e }) => ({ marginRight: e.spacing(1) })), re = u("div")({
26
25
  display: "flex",
27
26
  alignItems: "center"
28
- }), oe = d(v)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
27
+ }), ie = u(_)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
29
28
  fontSize: e.typography.fontSize - 2,
30
29
  whiteSpace: "pre",
31
30
  maxWidth: "500px"
32
- } })), C = d("div")(({ theme: e }) => ({
31
+ } })), w = u("div")(({ theme: e }) => ({
33
32
  fontSize: e.typography.fontSize - 2,
34
33
  color: e.palette.error.main,
35
34
  paddingTop: e.spacing(1)
36
- })), w = class extends s.Component {
35
+ })), T = class extends s.Component {
37
36
  handleColorChange = (e, t) => {
38
37
  let { onColorChanged: n } = this.props;
39
38
  n(`${e}Color`, t);
@@ -46,41 +45,41 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
46
45
  u(i(r(o, d, n(s)))), l(d);
47
46
  };
48
47
  render() {
49
- let { configuration: n, model: r, imageSupport: i, uploadSoundSupport: a, onConfigurationChanged: c, onImageUpload: d, onModelChangedByConfig: f, onPromptChanged: h, onRationaleChanged: v, onUpdateImageDimension: w, onTeacherInstructionsChanged: se, onUpdateShapes: ce } = this.props, { baseInputConfiguration: le = {}, contentDimensions: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, multipleCorrect: O = {}, partialScoring: k = {}, preserveAspectRatio: A = {}, prompt: j = {}, rationale: M = {}, settingsPanelDisabled: N, spellCheck: P = {}, teacherInstructions: F = {}, withRubric: I = {}, mathMlOptions: L = {}, language: R = {}, languageChoices: z = {} } = n || {}, { errors: B, extraCSSRules: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: ue, toolbarEditorPosition: de } = r || {}, { prompt: G, rationale: K, shapes: q, selections: J, teacherInstructions: Y } = B || {}, fe = t(n), X = E && E.prompt, Z = D && D.prompt, Q = { position: de === "top" ? "top" : "bottom" }, pe = {
50
- multipleCorrect: O.settings && y(O.label),
51
- partialScoring: k.settings && y(k.label),
52
- promptEnabled: j.settings && y(j.label),
53
- "language.enabled": R.settings && y(R.label, !0),
54
- language: R.settings && R.enabled && b(z.label, z.options)
48
+ let { configuration: n, model: r, imageSupport: i, uploadSoundSupport: a, onConfigurationChanged: u, onImageUpload: d, onModelChangedByConfig: m, onPromptChanged: _, onRationaleChanged: T, onUpdateImageDimension: ae, onTeacherInstructionsChanged: oe, onUpdateShapes: se } = this.props, { baseInputConfiguration: ce = {}, contentDimensions: le = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, multipleCorrect: O = {}, partialScoring: k = {}, preserveAspectRatio: A = {}, prompt: j = {}, rationale: M = {}, settingsPanelDisabled: N, spellCheck: P = {}, teacherInstructions: F = {}, withRubric: I = {}, mathMlOptions: L = {}, language: R = {}, languageChoices: z = {} } = n || {}, { errors: B, extraCSSRules: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: ue, toolbarEditorPosition: de } = r || {}, { prompt: G, rationale: K, shapes: q, selections: J, teacherInstructions: Y } = B || {}, fe = t(n), X = E && E.prompt, Z = D && D.prompt, Q = { position: de === "top" ? "top" : "bottom" }, pe = {
49
+ multipleCorrect: O.settings && v(O.label),
50
+ partialScoring: k.settings && v(k.label),
51
+ promptEnabled: j.settings && v(j.label),
52
+ "language.enabled": R.settings && v(R.label, !0),
53
+ language: R.settings && R.enabled && y(z.label, z.options)
55
54
  }, me = {
56
- teacherInstructionsEnabled: F.settings && y(F.label),
57
- rationaleEnabled: M.settings && y(M.label),
58
- spellCheckEnabled: P.settings && y(P.label),
59
- rubricEnabled: I?.settings && y(I?.label)
55
+ teacherInstructionsEnabled: F.settings && v(F.label),
56
+ rationaleEnabled: M.settings && v(M.label),
57
+ spellCheckEnabled: P.settings && v(P.label),
58
+ rubricEnabled: I?.settings && v(I?.label)
60
59
  }, $ = (e = {}) => ({
61
- ...le,
60
+ ...ce,
62
61
  ...e
63
62
  });
64
- return /* @__PURE__ */ u(m.ConfigLayout, {
63
+ return /* @__PURE__ */ l(p.ConfigLayout, {
65
64
  extraCSSRules: V,
66
- dimensions: T,
65
+ dimensions: le,
67
66
  hideSettings: N,
68
- settings: /* @__PURE__ */ l(te, {
67
+ settings: /* @__PURE__ */ c(te, {
69
68
  model: r,
70
- onChangeModel: f,
69
+ onChangeModel: m,
71
70
  configuration: n,
72
- onChangeConfiguration: c,
71
+ onChangeConfiguration: u,
73
72
  groups: {
74
73
  Settings: pe,
75
74
  Properties: me
76
75
  }
77
76
  }),
78
77
  children: [
79
- ue && /* @__PURE__ */ u(S, {
78
+ ue && /* @__PURE__ */ l(S, {
80
79
  label: F.label,
81
- children: [/* @__PURE__ */ l(g, {
80
+ children: [/* @__PURE__ */ c(h, {
82
81
  markup: r.teacherInstructions || "",
83
- onChange: se,
82
+ onChange: oe,
84
83
  imageSupport: i,
85
84
  nonEmpty: !1,
86
85
  error: Y,
@@ -92,13 +91,13 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
92
91
  uploadSoundSupport: a,
93
92
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
94
93
  mathMlOptions: L
95
- }), Y && /* @__PURE__ */ l(C, { children: Y })]
94
+ }), Y && /* @__PURE__ */ c(w, { children: Y })]
96
95
  }),
97
- H && /* @__PURE__ */ u(S, {
96
+ H && /* @__PURE__ */ l(S, {
98
97
  label: j.label,
99
- children: [/* @__PURE__ */ l(g, {
98
+ children: [/* @__PURE__ */ c(h, {
100
99
  markup: r.prompt || "",
101
- onChange: h,
100
+ onChange: _,
102
101
  imageSupport: i,
103
102
  nonEmpty: !1,
104
103
  error: G,
@@ -110,23 +109,23 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
110
109
  uploadSoundSupport: a,
111
110
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
112
111
  mathMlOptions: L
113
- }), G && /* @__PURE__ */ l(C, { children: G })]
112
+ }), G && /* @__PURE__ */ c(w, { children: G })]
114
113
  }),
115
- /* @__PURE__ */ u(ae, { children: [/* @__PURE__ */ l(ie, {
114
+ /* @__PURE__ */ l(re, { children: [/* @__PURE__ */ c(C, {
116
115
  variant: "h6",
117
116
  children: "Define Hotspot"
118
- }), /* @__PURE__ */ l(oe, {
117
+ }), /* @__PURE__ */ c(ie, {
119
118
  disableFocusListener: !0,
120
119
  disableTouchListener: !0,
121
120
  placement: "left",
122
121
  title: fe,
123
- children: /* @__PURE__ */ l(ee, {
122
+ children: /* @__PURE__ */ c(ee, {
124
123
  fontSize: "small",
125
124
  color: "primary",
126
125
  style: { float: "right" }
127
126
  })
128
127
  })] }),
129
- /* @__PURE__ */ l(e, {
128
+ /* @__PURE__ */ c(e, {
130
129
  hotspotColor: r.hotspotColor,
131
130
  hotspotList: r.hotspotList,
132
131
  outlineColor: r.outlineColor,
@@ -134,7 +133,7 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
134
133
  onHotspotColorChange: (e) => this.handleColorChange("hotspot", e),
135
134
  onOutlineColorChange: (e) => this.handleColorChange("outline", e)
136
135
  }),
137
- /* @__PURE__ */ l(o, {
136
+ /* @__PURE__ */ c(o, {
138
137
  dimensions: r.dimensions,
139
138
  imageUrl: r.imageUrl,
140
139
  multipleCorrect: r.multipleCorrect,
@@ -142,38 +141,38 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
142
141
  hotspotColor: r.hotspotColor,
143
142
  outlineColor: r.outlineColor,
144
143
  selectedHotspotColor: r.selectedHotspotColor,
145
- hoverOutlineColor: ne(r.hoverOutlineColor) ? r.hoverOutlineColor : "black",
146
- onUpdateImageDimension: w,
147
- onUpdateShapes: ce,
144
+ hoverOutlineColor: b(r.hoverOutlineColor) ? r.hoverOutlineColor : "black",
145
+ onUpdateImageDimension: ae,
146
+ onUpdateShapes: se,
148
147
  onImageUpload: d,
149
148
  shapes: r.shapes,
150
149
  strokeWidth: r.strokeWidth,
151
150
  preserveAspectRatioEnabled: A.enabled,
152
151
  insertImage: i && i.add
153
152
  }),
154
- q && /* @__PURE__ */ l(C, { children: q }),
155
- J && /* @__PURE__ */ l(C, { children: J }),
156
- r.imageUrl && /* @__PURE__ */ u(s.Fragment, { children: [/* @__PURE__ */ l(_, {
153
+ q && /* @__PURE__ */ c(w, { children: q }),
154
+ J && /* @__PURE__ */ c(w, { children: J }),
155
+ r.imageUrl && /* @__PURE__ */ l(s.Fragment, { children: [/* @__PURE__ */ c(g, {
157
156
  variant: "h6",
158
157
  children: "Image Dimensions"
159
- }), /* @__PURE__ */ u(re, { children: [/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(p, {
158
+ }), /* @__PURE__ */ l(ne, { children: [/* @__PURE__ */ c(x, { children: /* @__PURE__ */ c(f, {
160
159
  label: "Width",
161
160
  value: r.dimensions.width,
162
161
  min: 0,
163
162
  onChange: (e, t) => this.handleOnUpdateImageDimensions(t, "width"),
164
163
  showErrorWhenOutsideRange: !0
165
- }, "hotspot-manual-width") }), /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(p, {
164
+ }, "hotspot-manual-width") }), /* @__PURE__ */ c(x, { children: /* @__PURE__ */ c(f, {
166
165
  label: "Height",
167
166
  value: r.dimensions.height,
168
167
  min: 0,
169
168
  onChange: (e, t) => this.handleOnUpdateImageDimensions(t, "height"),
170
169
  showErrorWhenOutsideRange: !0
171
170
  }, "hotspot-manual-height") })] })] }),
172
- U && /* @__PURE__ */ u(S, {
171
+ U && /* @__PURE__ */ l(S, {
173
172
  label: M.label,
174
- children: [/* @__PURE__ */ l(g, {
173
+ children: [/* @__PURE__ */ c(h, {
175
174
  markup: r.rationale || "",
176
- onChange: v,
175
+ onChange: T,
177
176
  imageSupport: i,
178
177
  error: K,
179
178
  toolbarOpts: Q,
@@ -184,32 +183,11 @@ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("di
184
183
  uploadSoundSupport: a,
185
184
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
186
185
  mathMlOptions: L
187
- }), K && /* @__PURE__ */ l(C, { children: K })]
186
+ }), K && /* @__PURE__ */ c(w, { children: K })]
188
187
  })
189
188
  ]
190
189
  });
191
190
  }
192
191
  };
193
- w.propTypes = {
194
- configuration: c.object,
195
- model: c.object.isRequired,
196
- imageSupport: c.shape({
197
- add: c.func,
198
- delete: c.func
199
- }),
200
- uploadSoundSupport: c.shape({
201
- add: c.func,
202
- delete: c.func
203
- }),
204
- onImageUpload: c.func.isRequired,
205
- onColorChanged: c.func.isRequired,
206
- onPromptChanged: c.func.isRequired,
207
- onUpdateImageDimension: c.func.isRequired,
208
- onUpdateShapes: c.func.isRequired,
209
- onModelChangedByConfig: c.func.isRequired,
210
- onRationaleChanged: c.func.isRequired,
211
- onConfigurationChanged: c.func.isRequired,
212
- onTeacherInstructionsChanged: c.func.isRequired
213
- };
214
192
  //#endregion
215
- export { w as Root, w as default };
193
+ export { T as Root, T as default };