@pie-element/passage 8.0.4-next.20261011174919 → 8.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.
- package/dist/author/defaults.d.ts +52 -51
- package/dist/author/design.d.ts +31 -15
- package/dist/author/design.js +30 -40
- package/dist/author/index.d.ts +15 -22
- package/dist/author/index.js +4 -1
- package/dist/browser/author/index.js +11 -20
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +11 -20
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +5 -5
- package/dist/controller/index.d.ts +37 -10
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +301 -0
- package/dist/schemas/model.schema.json +373 -0
- package/dist/schemas/session.schema.json +17 -0
- package/dist/types.d.ts +108 -0
- package/package.json +17 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { ConfigureLanguageOptionsProp } from '@pie-element/shared-types';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
model: {
|
|
3
|
-
authorEnabled:
|
|
4
|
+
authorEnabled: true;
|
|
4
5
|
passages: {
|
|
5
6
|
teacherInstructions: string;
|
|
6
7
|
title: string;
|
|
@@ -8,133 +9,133 @@ declare const _default: {
|
|
|
8
9
|
author: string;
|
|
9
10
|
text: string;
|
|
10
11
|
}[];
|
|
11
|
-
subtitleEnabled:
|
|
12
|
-
teacherInstructionsEnabled:
|
|
13
|
-
textEnabled:
|
|
14
|
-
titleEnabled:
|
|
12
|
+
subtitleEnabled: true;
|
|
13
|
+
teacherInstructionsEnabled: true;
|
|
14
|
+
textEnabled: true;
|
|
15
|
+
titleEnabled: true;
|
|
15
16
|
};
|
|
16
17
|
configuration: {
|
|
17
18
|
baseInputConfiguration: {
|
|
18
19
|
audio: {
|
|
19
|
-
disabled:
|
|
20
|
+
disabled: false;
|
|
20
21
|
};
|
|
21
22
|
video: {
|
|
22
|
-
disabled:
|
|
23
|
+
disabled: false;
|
|
23
24
|
};
|
|
24
25
|
image: {
|
|
25
|
-
disabled:
|
|
26
|
+
disabled: false;
|
|
26
27
|
};
|
|
27
28
|
h3: {
|
|
28
|
-
disabled:
|
|
29
|
+
disabled: true;
|
|
29
30
|
};
|
|
30
31
|
blockquote: {
|
|
31
|
-
disabled:
|
|
32
|
+
disabled: true;
|
|
32
33
|
};
|
|
33
34
|
textAlign: {
|
|
34
|
-
disabled:
|
|
35
|
+
disabled: true;
|
|
35
36
|
};
|
|
36
37
|
showParagraphs: {
|
|
37
|
-
disabled:
|
|
38
|
+
disabled: false;
|
|
38
39
|
};
|
|
39
40
|
separateParagraphs: {
|
|
40
|
-
disabled:
|
|
41
|
+
disabled: true;
|
|
41
42
|
};
|
|
42
43
|
};
|
|
43
|
-
settingsPanelDisabled:
|
|
44
|
+
settingsPanelDisabled: false;
|
|
44
45
|
title: {
|
|
45
|
-
settings:
|
|
46
|
+
settings: true;
|
|
46
47
|
label: string;
|
|
47
48
|
inputConfiguration: {
|
|
48
49
|
audio: {
|
|
49
|
-
disabled:
|
|
50
|
+
disabled: true;
|
|
50
51
|
};
|
|
51
52
|
video: {
|
|
52
|
-
disabled:
|
|
53
|
+
disabled: true;
|
|
53
54
|
};
|
|
54
55
|
image: {
|
|
55
|
-
disabled:
|
|
56
|
+
disabled: true;
|
|
56
57
|
};
|
|
57
58
|
textAlign: {
|
|
58
|
-
disabled:
|
|
59
|
+
disabled: false;
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
|
-
required:
|
|
62
|
+
required: true;
|
|
62
63
|
};
|
|
63
64
|
subtitle: {
|
|
64
|
-
settings:
|
|
65
|
+
settings: true;
|
|
65
66
|
label: string;
|
|
66
67
|
inputConfiguration: {
|
|
67
68
|
audio: {
|
|
68
|
-
disabled:
|
|
69
|
+
disabled: true;
|
|
69
70
|
};
|
|
70
71
|
video: {
|
|
71
|
-
disabled:
|
|
72
|
+
disabled: true;
|
|
72
73
|
};
|
|
73
74
|
image: {
|
|
74
|
-
disabled:
|
|
75
|
+
disabled: true;
|
|
75
76
|
};
|
|
76
77
|
textAlign: {
|
|
77
|
-
disabled:
|
|
78
|
+
disabled: false;
|
|
78
79
|
};
|
|
79
80
|
};
|
|
80
|
-
required:
|
|
81
|
+
required: false;
|
|
81
82
|
};
|
|
82
83
|
author: {
|
|
83
|
-
settings:
|
|
84
|
+
settings: true;
|
|
84
85
|
label: string;
|
|
85
86
|
inputConfiguration: {
|
|
86
87
|
audio: {
|
|
87
|
-
disabled:
|
|
88
|
+
disabled: true;
|
|
88
89
|
};
|
|
89
90
|
video: {
|
|
90
|
-
disabled:
|
|
91
|
+
disabled: true;
|
|
91
92
|
};
|
|
92
93
|
image: {
|
|
93
|
-
disabled:
|
|
94
|
+
disabled: true;
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
|
-
required:
|
|
97
|
+
required: false;
|
|
97
98
|
};
|
|
98
99
|
text: {
|
|
99
|
-
settings:
|
|
100
|
+
settings: true;
|
|
100
101
|
label: string;
|
|
101
102
|
inputConfiguration: {
|
|
102
103
|
audio: {
|
|
103
|
-
disabled:
|
|
104
|
+
disabled: false;
|
|
104
105
|
};
|
|
105
106
|
video: {
|
|
106
|
-
disabled:
|
|
107
|
+
disabled: false;
|
|
107
108
|
};
|
|
108
109
|
image: {
|
|
109
|
-
disabled:
|
|
110
|
+
disabled: false;
|
|
110
111
|
};
|
|
111
112
|
h3: {
|
|
112
|
-
disabled:
|
|
113
|
+
disabled: false;
|
|
113
114
|
};
|
|
114
115
|
blockquote: {
|
|
115
|
-
disabled:
|
|
116
|
+
disabled: false;
|
|
116
117
|
};
|
|
117
118
|
textAlign: {
|
|
118
|
-
disabled:
|
|
119
|
+
disabled: false;
|
|
119
120
|
};
|
|
120
121
|
};
|
|
121
|
-
required:
|
|
122
|
+
required: true;
|
|
122
123
|
};
|
|
123
124
|
teacherInstructions: {
|
|
124
|
-
settings:
|
|
125
|
+
settings: true;
|
|
125
126
|
label: string;
|
|
126
127
|
inputConfiguration: {
|
|
127
128
|
audio: {
|
|
128
|
-
disabled:
|
|
129
|
+
disabled: false;
|
|
129
130
|
};
|
|
130
131
|
video: {
|
|
131
|
-
disabled:
|
|
132
|
+
disabled: false;
|
|
132
133
|
};
|
|
133
134
|
image: {
|
|
134
|
-
disabled:
|
|
135
|
+
disabled: false;
|
|
135
136
|
};
|
|
136
137
|
};
|
|
137
|
-
required:
|
|
138
|
+
required: false;
|
|
138
139
|
};
|
|
139
140
|
maxImageWidth: {
|
|
140
141
|
teacherInstructions: number;
|
|
@@ -145,22 +146,22 @@ declare const _default: {
|
|
|
145
146
|
text: number;
|
|
146
147
|
};
|
|
147
148
|
mathMlOptions: {
|
|
148
|
-
mmlOutput:
|
|
149
|
-
mmlEditing:
|
|
149
|
+
mmlOutput: false;
|
|
150
|
+
mmlEditing: false;
|
|
150
151
|
};
|
|
151
152
|
language: {
|
|
152
|
-
settings:
|
|
153
|
+
settings: false;
|
|
153
154
|
label: string;
|
|
154
|
-
enabled:
|
|
155
|
+
enabled: false;
|
|
155
156
|
};
|
|
156
157
|
languageChoices: {
|
|
157
158
|
label: string;
|
|
158
|
-
options:
|
|
159
|
+
options: ConfigureLanguageOptionsProp[];
|
|
159
160
|
};
|
|
160
161
|
additionalPassage: {
|
|
161
|
-
settings:
|
|
162
|
+
settings: true;
|
|
162
163
|
label: string;
|
|
163
|
-
enabled:
|
|
164
|
+
enabled: false;
|
|
164
165
|
};
|
|
165
166
|
};
|
|
166
167
|
};
|
package/dist/author/design.d.ts
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
|
|
3
|
+
import type { PassageValidationErrors } from '../controller/index.js';
|
|
4
|
+
import type { PassageConfiguration, PassageEntry, PassageModel } from '../types.js';
|
|
5
|
+
/** The model the author edits; the host sets `errors` from the controller's `validate()`. */
|
|
6
|
+
export type AuthorModel = Partial<PassageModel> & {
|
|
7
|
+
passages: PassageEntry[];
|
|
8
|
+
errors?: PassageValidationErrors;
|
|
9
|
+
};
|
|
10
|
+
export type MainProps = {
|
|
11
|
+
model: AuthorModel;
|
|
12
|
+
configuration: PassageConfiguration;
|
|
13
|
+
onModelChanged: (model: AuthorModel) => void;
|
|
14
|
+
onConfigurationChanged: (configuration: PassageConfiguration) => void;
|
|
15
|
+
imageSupport: {
|
|
16
|
+
add: (handler: ImageHandler) => void;
|
|
17
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
12
18
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
uploadSoundSupport: {
|
|
20
|
+
add: (handler: SoundHandler) => void;
|
|
21
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type MainState = {
|
|
25
|
+
showConfirmationDialog: boolean;
|
|
26
|
+
indexToRemove: number;
|
|
27
|
+
};
|
|
28
|
+
export declare class Main extends React.Component<MainProps, MainState> {
|
|
29
|
+
constructor(props: MainProps);
|
|
30
|
+
getInnerText: (html: string) => string;
|
|
31
|
+
onDelete: (model: AuthorModel, indexToRemove: number, onModelChanged: (model: AuthorModel) => void) => void;
|
|
32
|
+
removeAdditionalPassage: (indexToRemove: number) => void;
|
|
33
|
+
addAdditionalPassage: () => void;
|
|
18
34
|
render(): React.JSX.Element;
|
|
19
35
|
}
|
|
20
36
|
export default Main;
|
package/dist/author/design.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { ConfirmationDialog as e, PassageButton as t } from "./common.js";
|
|
2
2
|
import { PassageComponent as n } from "./passage.js";
|
|
3
3
|
import r from "react";
|
|
4
|
-
import i from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import u from "@mui/material/Typography";
|
|
4
|
+
import { styled as i } from "@mui/material/styles";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { layout as s, settings as c } from "@pie-lib/config-ui";
|
|
7
|
+
import l from "@mui/material/Typography";
|
|
9
8
|
//#region src/author/design.tsx
|
|
10
|
-
var { Panel:
|
|
9
|
+
var { Panel: u, toggle: d, dropdown: f } = c, p = i(l)(({ theme: e }) => ({
|
|
11
10
|
paddingTop: e.spacing(2),
|
|
12
11
|
marginBottom: e.spacing(2)
|
|
13
|
-
})),
|
|
14
|
-
static propTypes = {
|
|
15
|
-
onModelChanged: i.func.isRequired,
|
|
16
|
-
onConfigurationChanged: i.func,
|
|
17
|
-
model: i.object.isRequired,
|
|
18
|
-
configuration: i.object.isRequired,
|
|
19
|
-
imageSupport: i.object.isRequired,
|
|
20
|
-
uploadSoundSupport: i.object.isRequired,
|
|
21
|
-
classes: i.object.isRequired
|
|
22
|
-
};
|
|
12
|
+
})), m = class extends r.Component {
|
|
23
13
|
constructor(e) {
|
|
24
14
|
super(e), this.state = {
|
|
25
15
|
showConfirmationDialog: !1,
|
|
@@ -38,7 +28,7 @@ var { Panel: d, toggle: f, dropdown: p } = l, m = a(u)(({ theme: e }) => ({
|
|
|
38
28
|
});
|
|
39
29
|
};
|
|
40
30
|
removeAdditionalPassage = (e) => {
|
|
41
|
-
let { model: t
|
|
31
|
+
let { model: t, onModelChanged: n } = this.props, { passages: r = [] } = t, { teacherInstructions: i = "", title: a = "", subtitle: o = "", author: s = "", text: c = "" } = r[e];
|
|
42
32
|
this.getInnerText(i).trim() || this.getInnerText(a).trim() || this.getInnerText(o).trim() || this.getInnerText(s).trim() || this.getInnerText(c).trim() ? this.setState({
|
|
43
33
|
showConfirmationDialog: !0,
|
|
44
34
|
indexToRemove: e
|
|
@@ -58,53 +48,53 @@ var { Panel: d, toggle: f, dropdown: p } = l, m = a(u)(({ theme: e }) => ({
|
|
|
58
48
|
});
|
|
59
49
|
};
|
|
60
50
|
render() {
|
|
61
|
-
let { model: i, configuration:
|
|
62
|
-
titleEnabled: x && x.settings &&
|
|
63
|
-
subtitleEnabled: S && S.settings &&
|
|
64
|
-
authorEnabled: w && w.settings &&
|
|
65
|
-
textEnabled: C && C.settings &&
|
|
66
|
-
"additionalPassage.enabled": T && T.settings &&
|
|
51
|
+
let { model: i, configuration: c, imageSupport: l, onConfigurationChanged: m, onModelChanged: h, uploadSoundSupport: g } = this.props, { settingsPanelDisabled: _, language: v = {}, languageChoices: y = {}, teacherInstructions: b = {}, title: x = {}, subtitle: S = {}, text: C = {}, author: w = {}, additionalPassage: T = {} } = c || {}, { extraCSSRules: E, passages: D } = i || {}, O = {
|
|
52
|
+
titleEnabled: x && x.settings && d(x.label),
|
|
53
|
+
subtitleEnabled: S && S.settings && d(S.label),
|
|
54
|
+
authorEnabled: w && w.settings && d(w.label),
|
|
55
|
+
textEnabled: C && C.settings && d(C.label),
|
|
56
|
+
"additionalPassage.enabled": T && T.settings && d(T.label, !0)
|
|
67
57
|
}, k = {
|
|
68
|
-
teacherInstructionsEnabled: b && b.settings &&
|
|
69
|
-
"language.enabled": v && v.settings &&
|
|
70
|
-
language: v && v.settings && v.enabled &&
|
|
58
|
+
teacherInstructionsEnabled: b && b.settings && d(b.label),
|
|
59
|
+
"language.enabled": v && v.settings && d(v.label, !0),
|
|
60
|
+
language: v && v.settings && v.enabled && f(y.label, y.options)
|
|
71
61
|
}, A = `${T.label} will be deleted`, { indexToRemove: j, showConfirmationDialog: M } = this.state;
|
|
72
|
-
return /* @__PURE__ */ s
|
|
62
|
+
return /* @__PURE__ */ o(s.ConfigLayout, {
|
|
73
63
|
extraCSSRules: E,
|
|
74
64
|
hideSettings: _,
|
|
75
|
-
settings: /* @__PURE__ */
|
|
65
|
+
settings: /* @__PURE__ */ a(u, {
|
|
76
66
|
model: i,
|
|
77
|
-
configuration:
|
|
67
|
+
configuration: c,
|
|
78
68
|
onChangeModel: (e) => h(e),
|
|
79
|
-
onChangeConfiguration: (e) =>
|
|
69
|
+
onChangeConfiguration: (e) => m(e),
|
|
80
70
|
groups: {
|
|
81
71
|
Settings: O,
|
|
82
72
|
Properties: k
|
|
83
73
|
}
|
|
84
74
|
}),
|
|
85
|
-
children: [D.map((e,
|
|
86
|
-
|
|
75
|
+
children: [D.map((e, s) => /* @__PURE__ */ o(r.Fragment, { children: [
|
|
76
|
+
s > 0 && /* @__PURE__ */ a(p, {
|
|
87
77
|
variant: "h5",
|
|
88
78
|
children: T.label
|
|
89
79
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ a(n, {
|
|
91
81
|
imageSupport: l,
|
|
92
82
|
uploadSoundSupport: g,
|
|
93
83
|
model: i,
|
|
94
|
-
configuration:
|
|
95
|
-
passageIndex:
|
|
84
|
+
configuration: c,
|
|
85
|
+
passageIndex: s,
|
|
96
86
|
onModelChanged: h
|
|
97
87
|
}),
|
|
98
|
-
|
|
88
|
+
s > 0 && T.enabled && /* @__PURE__ */ a(t, {
|
|
99
89
|
type: "remove",
|
|
100
90
|
label: `Remove ${T.label}`,
|
|
101
|
-
onClick: () => this.removeAdditionalPassage(
|
|
91
|
+
onClick: () => this.removeAdditionalPassage(s)
|
|
102
92
|
}),
|
|
103
|
-
|
|
93
|
+
s === 0 && T.enabled && D.length < 2 && /* @__PURE__ */ a(t, {
|
|
104
94
|
label: `Add ${T.label}`,
|
|
105
95
|
onClick: this.addAdditionalPassage
|
|
106
96
|
})
|
|
107
|
-
] },
|
|
97
|
+
] }, s)), /* @__PURE__ */ a(e, {
|
|
108
98
|
open: M,
|
|
109
99
|
title: "Warning",
|
|
110
100
|
content: A,
|
|
@@ -117,4 +107,4 @@ var { Panel: d, toggle: f, dropdown: p } = l, m = a(u)(({ theme: e }) => ({
|
|
|
117
107
|
}
|
|
118
108
|
};
|
|
119
109
|
//#endregion
|
|
120
|
-
export {
|
|
110
|
+
export { m as Main, m as default };
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
|
+
import { type DeleteDone, type ImageHandler, type SoundHandler } from '@pie-element/shared-configure-events';
|
|
2
|
+
import { type AuthorModel } from './design.js';
|
|
3
|
+
import type { PassageConfiguration } from '../types.js';
|
|
1
4
|
export default class PassageConfigure extends HTMLElement {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
title: string;
|
|
7
|
-
subtitle: string;
|
|
8
|
-
author: string;
|
|
9
|
-
text: string;
|
|
10
|
-
}[];
|
|
11
|
-
subtitleEnabled: boolean;
|
|
12
|
-
teacherInstructionsEnabled: boolean;
|
|
13
|
-
textEnabled: boolean;
|
|
14
|
-
titleEnabled: boolean;
|
|
15
|
-
};
|
|
5
|
+
private _root;
|
|
6
|
+
private _model;
|
|
7
|
+
private _configuration;
|
|
8
|
+
static createDefaultModel: (model?: Partial<AuthorModel>) => AuthorModel;
|
|
16
9
|
constructor();
|
|
17
|
-
set model(m:
|
|
18
|
-
set configuration(c:
|
|
10
|
+
set model(m: Partial<AuthorModel>);
|
|
11
|
+
set configuration(c: PassageConfiguration);
|
|
19
12
|
connectedCallback(): void;
|
|
20
|
-
modelChanged(m:
|
|
21
|
-
onConfigurationChanged(c:
|
|
22
|
-
insertImage(handler:
|
|
23
|
-
onDeleteImage(src:
|
|
24
|
-
insertSound(handler:
|
|
25
|
-
onDeleteSound(src:
|
|
13
|
+
modelChanged(m: AuthorModel): void;
|
|
14
|
+
onConfigurationChanged(c: PassageConfiguration): void;
|
|
15
|
+
insertImage(handler: ImageHandler): void;
|
|
16
|
+
onDeleteImage(src: string, done: DeleteDone): void;
|
|
17
|
+
insertSound(handler: SoundHandler): void;
|
|
18
|
+
onDeleteSound(src: string, done: DeleteDone): void;
|
|
26
19
|
render(): void;
|
|
27
20
|
disconnectedCallback(): void;
|
|
28
21
|
}
|
package/dist/author/index.js
CHANGED
|
@@ -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 = {}) => ({
|
|
9
12
|
...t.model,
|
|
10
13
|
...e
|
|
@@ -22,7 +25,7 @@ var l = class l extends HTMLElement {
|
|
|
22
25
|
this.render();
|
|
23
26
|
}
|
|
24
27
|
modelChanged(e) {
|
|
25
|
-
this._model = e, this.dispatchEvent(new c(this._model)
|
|
28
|
+
this._model = e, this.dispatchEvent(new c(this._model)), this.render();
|
|
26
29
|
}
|
|
27
30
|
onConfigurationChanged(e) {
|
|
28
31
|
this._configuration = e, this.render();
|
|
@@ -34340,15 +34340,12 @@ var zU = class extends st.Component {
|
|
|
34340
34340
|
}), UU = (e) => typeof e == "string" ? {
|
|
34341
34341
|
label: e,
|
|
34342
34342
|
value: e
|
|
34343
|
-
} : e, WU =
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
|
|
34348
|
-
|
|
34349
|
-
isConfigProperty: n
|
|
34350
|
-
};
|
|
34351
|
-
}, GU = (e, t, n = !1) => ({
|
|
34343
|
+
} : e, WU = (e, t, n = !1) => ({
|
|
34344
|
+
type: "radio",
|
|
34345
|
+
label: e,
|
|
34346
|
+
choices: t && t.map((e) => UU(e)),
|
|
34347
|
+
isConfigProperty: n
|
|
34348
|
+
}), GU = (e, t, n = !1) => ({
|
|
34352
34349
|
type: "dropdown",
|
|
34353
34350
|
label: e,
|
|
34354
34351
|
choices: t,
|
|
@@ -34549,15 +34546,6 @@ var oW = A(tW)(({ theme: e }) => ({
|
|
|
34549
34546
|
paddingTop: e.spacing(2),
|
|
34550
34547
|
marginBottom: e.spacing(2)
|
|
34551
34548
|
})), pW = class extends st.Component {
|
|
34552
|
-
static propTypes = {
|
|
34553
|
-
onModelChanged: P.default.func.isRequired,
|
|
34554
|
-
onConfigurationChanged: P.default.func,
|
|
34555
|
-
model: P.default.object.isRequired,
|
|
34556
|
-
configuration: P.default.object.isRequired,
|
|
34557
|
-
imageSupport: P.default.object.isRequired,
|
|
34558
|
-
uploadSoundSupport: P.default.object.isRequired,
|
|
34559
|
-
classes: P.default.object.isRequired
|
|
34560
|
-
};
|
|
34561
34549
|
constructor(e) {
|
|
34562
34550
|
super(e), this.state = {
|
|
34563
34551
|
showConfirmationDialog: !1,
|
|
@@ -34576,7 +34564,7 @@ var oW = A(tW)(({ theme: e }) => ({
|
|
|
34576
34564
|
});
|
|
34577
34565
|
};
|
|
34578
34566
|
removeAdditionalPassage = (e) => {
|
|
34579
|
-
let { model: t
|
|
34567
|
+
let { model: t, onModelChanged: n } = this.props, { passages: r = [] } = t, { teacherInstructions: i = "", title: a = "", subtitle: o = "", author: s = "", text: c = "" } = r[e];
|
|
34580
34568
|
this.getInnerText(i).trim() || this.getInnerText(a).trim() || this.getInnerText(o).trim() || this.getInnerText(s).trim() || this.getInnerText(c).trim() ? this.setState({
|
|
34581
34569
|
showConfirmationDialog: !0,
|
|
34582
34570
|
indexToRemove: e
|
|
@@ -34763,6 +34751,9 @@ var oW = A(tW)(({ theme: e }) => ({
|
|
|
34763
34751
|
}
|
|
34764
34752
|
}
|
|
34765
34753
|
}, hW = class e extends HTMLElement {
|
|
34754
|
+
_root;
|
|
34755
|
+
_model;
|
|
34756
|
+
_configuration;
|
|
34766
34757
|
static createDefaultModel = (e = {}) => ({
|
|
34767
34758
|
...mW.model,
|
|
34768
34759
|
...e
|
|
@@ -34780,7 +34771,7 @@ var oW = A(tW)(({ theme: e }) => ({
|
|
|
34780
34771
|
this.render();
|
|
34781
34772
|
}
|
|
34782
34773
|
modelChanged(e) {
|
|
34783
|
-
this._model = e, this.dispatchEvent(new It(this._model)
|
|
34774
|
+
this._model = e, this.dispatchEvent(new It(this._model)), this.render();
|
|
34784
34775
|
}
|
|
34785
34776
|
onConfigurationChanged(e) {
|
|
34786
34777
|
this._configuration = e, this.render();
|