@pie-element/passage 5.3.4-next.0 → 6.0.0-beta.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.
- package/configure/lib/common.js +58 -85
- package/configure/lib/common.js.map +1 -1
- package/configure/lib/defaults.js +2 -3
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/design.js +147 -223
- package/configure/lib/design.js.map +1 -1
- package/configure/lib/index.js +71 -123
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/passage.js +171 -260
- package/configure/lib/passage.js.map +1 -1
- package/configure/package.json +9 -6
- package/controller/lib/defaults.js +2 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +41 -94
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/lib/index.js +53 -103
- package/lib/index.js.map +1 -1
- package/lib/print.js +53 -99
- package/lib/print.js.map +1 -1
- package/lib/stimulus-tabs.js +174 -274
- package/lib/stimulus-tabs.js.map +1 -1
- package/package.json +11 -13
- package/module/configure.js +0 -1
- package/module/controller.js +0 -1068
- package/module/demo.js +0 -57
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -10
- package/module/print-demo.js +0 -95
- package/module/print.html +0 -18
- package/module/print.js +0 -1
package/configure/lib/passage.js
CHANGED
|
@@ -1,282 +1,193 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
-
|
|
7
|
+
exports.default = exports.PassageComponent = void 0;
|
|
26
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
-
|
|
28
9
|
var _react = _interopRequireDefault(require("react"));
|
|
29
|
-
|
|
30
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
31
|
-
|
|
32
|
-
var _styles = require("@material-ui/core/styles");
|
|
33
|
-
|
|
34
11
|
var _configUi = require("@pie-lib/config-ui");
|
|
35
|
-
|
|
36
12
|
var _editableHtml = _interopRequireWildcard(require("@pie-lib/editable-html"));
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
model = _this$props.model,
|
|
63
|
-
onModelChanged = _this$props.onModelChanged,
|
|
64
|
-
passageIndex = _this$props.passageIndex;
|
|
65
|
-
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
const StyledInputContainer = (0, _styles.styled)(_configUi.InputContainer)(({
|
|
16
|
+
theme
|
|
17
|
+
}) => ({
|
|
18
|
+
paddingTop: theme.spacing(2),
|
|
19
|
+
marginBottom: theme.spacing(2),
|
|
20
|
+
width: '100%'
|
|
21
|
+
}));
|
|
22
|
+
const ErrorText = (0, _styles.styled)('div')(({
|
|
23
|
+
theme
|
|
24
|
+
}) => ({
|
|
25
|
+
fontSize: theme.typography.fontSize - 2,
|
|
26
|
+
color: theme.palette.error.main,
|
|
27
|
+
paddingTop: theme.spacing(1)
|
|
28
|
+
}));
|
|
29
|
+
class PassageComponent extends _react.default.Component {
|
|
30
|
+
constructor(props) {
|
|
31
|
+
super(props);
|
|
32
|
+
(0, _defineProperty2.default)(this, "handleChange", (fieldName, value) => {
|
|
33
|
+
const {
|
|
34
|
+
model,
|
|
35
|
+
onModelChanged,
|
|
36
|
+
passageIndex
|
|
37
|
+
} = this.props;
|
|
66
38
|
if (!model.passages || passageIndex < 0 || passageIndex >= model.passages.length) {
|
|
67
39
|
return;
|
|
68
40
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
41
|
+
const updatedPassages = [...model.passages];
|
|
42
|
+
updatedPassages[passageIndex] = {
|
|
43
|
+
...updatedPassages[passageIndex],
|
|
44
|
+
[fieldName]: value
|
|
45
|
+
};
|
|
46
|
+
onModelChanged({
|
|
47
|
+
...model,
|
|
73
48
|
passages: updatedPassages
|
|
74
|
-
})
|
|
49
|
+
});
|
|
75
50
|
});
|
|
76
|
-
return _this;
|
|
77
51
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
207
|
-
markup: passages[passageIndex].author || '',
|
|
208
|
-
onChange: function onChange(value) {
|
|
209
|
-
return _this2.handleChange('author', value);
|
|
210
|
-
},
|
|
211
|
-
nonEmpty: false,
|
|
212
|
-
error: authorError,
|
|
213
|
-
mathMlOptions: mathMlOptions,
|
|
214
|
-
languageCharactersProps: [{
|
|
215
|
-
language: 'spanish'
|
|
216
|
-
}, {
|
|
217
|
-
language: 'special'
|
|
218
|
-
}],
|
|
219
|
-
pluginProps: getPluginProps(author === null || author === void 0 ? void 0 : author.inputConfiguration)
|
|
220
|
-
}), authorError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
-
className: classes.errorText
|
|
222
|
-
}, authorError)), textEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
223
|
-
label: text.label,
|
|
224
|
-
className: classes.inputContainer
|
|
225
|
-
}, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
226
|
-
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
227
|
-
markup: passages[passageIndex].text || '',
|
|
228
|
-
onChange: function onChange(value) {
|
|
229
|
-
return _this2.handleChange('text', value);
|
|
230
|
-
},
|
|
231
|
-
imageSupport: imageSupport,
|
|
232
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
233
|
-
nonEmpty: false,
|
|
234
|
-
error: textError,
|
|
235
|
-
maxImageWidth: maxImageWidth && maxImageWidth.text || defaultImageMaxWidth,
|
|
236
|
-
maxImageHeight: maxImageHeight && maxImageHeight.text || defaultImageMaxHeight,
|
|
237
|
-
mathMlOptions: mathMlOptions,
|
|
238
|
-
languageCharactersProps: [{
|
|
239
|
-
language: 'spanish'
|
|
240
|
-
}, {
|
|
241
|
-
language: 'special'
|
|
242
|
-
}],
|
|
243
|
-
pluginProps: getPluginProps(text === null || text === void 0 ? void 0 : text.inputConfiguration)
|
|
244
|
-
}), textError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
|
-
className: classes.errorText
|
|
246
|
-
}, textError)));
|
|
247
|
-
}
|
|
248
|
-
}]);
|
|
249
|
-
return PassageComponent;
|
|
250
|
-
}(_react["default"].Component);
|
|
251
|
-
|
|
52
|
+
render() {
|
|
53
|
+
const {
|
|
54
|
+
model,
|
|
55
|
+
configuration,
|
|
56
|
+
imageSupport,
|
|
57
|
+
passageIndex,
|
|
58
|
+
uploadSoundSupport
|
|
59
|
+
} = this.props;
|
|
60
|
+
const {
|
|
61
|
+
maxImageWidth = {},
|
|
62
|
+
maxImageHeight = {},
|
|
63
|
+
mathMlOptions = {},
|
|
64
|
+
baseInputConfiguration = {},
|
|
65
|
+
teacherInstructions = {},
|
|
66
|
+
title = {},
|
|
67
|
+
subtitle = {},
|
|
68
|
+
text = {},
|
|
69
|
+
author = {}
|
|
70
|
+
} = configuration || {};
|
|
71
|
+
const {
|
|
72
|
+
errors = {},
|
|
73
|
+
passages = [],
|
|
74
|
+
teacherInstructionsEnabled,
|
|
75
|
+
titleEnabled,
|
|
76
|
+
subtitleEnabled,
|
|
77
|
+
authorEnabled,
|
|
78
|
+
textEnabled
|
|
79
|
+
} = model || {};
|
|
80
|
+
const {
|
|
81
|
+
passages: passagesErrors
|
|
82
|
+
} = errors || {};
|
|
83
|
+
const {
|
|
84
|
+
teacherInstructions: teacherInstructionsError,
|
|
85
|
+
title: titleError,
|
|
86
|
+
subtitle: subtitleError,
|
|
87
|
+
author: authorError,
|
|
88
|
+
text: textError
|
|
89
|
+
} = passagesErrors && passagesErrors[passageIndex] || {};
|
|
90
|
+
const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
91
|
+
const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
|
|
92
|
+
const getPluginProps = customConfiguration => ({
|
|
93
|
+
...baseInputConfiguration,
|
|
94
|
+
...customConfiguration
|
|
95
|
+
});
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
|
|
97
|
+
label: teacherInstructions.label
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
99
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
100
|
+
markup: passages[passageIndex].teacherInstructions || '',
|
|
101
|
+
onChange: value => this.handleChange('teacherInstructions', value),
|
|
102
|
+
nonEmpty: false,
|
|
103
|
+
error: teacherInstructionsError,
|
|
104
|
+
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
105
|
+
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
106
|
+
mathMlOptions: mathMlOptions,
|
|
107
|
+
languageCharactersProps: [{
|
|
108
|
+
language: 'spanish'
|
|
109
|
+
}, {
|
|
110
|
+
language: 'special'
|
|
111
|
+
}],
|
|
112
|
+
pluginProps: getPluginProps(teacherInstructions?.inputConfiguration)
|
|
113
|
+
}), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), titleEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
|
|
114
|
+
label: title.label
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
116
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
117
|
+
markup: passages[passageIndex].title || '',
|
|
118
|
+
onChange: value => this.handleChange('title', value),
|
|
119
|
+
nonEmpty: false,
|
|
120
|
+
error: titleError,
|
|
121
|
+
mathMlOptions: mathMlOptions,
|
|
122
|
+
languageCharactersProps: [{
|
|
123
|
+
language: 'spanish'
|
|
124
|
+
}, {
|
|
125
|
+
language: 'special'
|
|
126
|
+
}],
|
|
127
|
+
pluginProps: getPluginProps(title?.inputConfiguration)
|
|
128
|
+
}), titleError && /*#__PURE__*/_react.default.createElement(ErrorText, null, titleError)), subtitleEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
|
|
129
|
+
label: subtitle.label
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
131
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
132
|
+
markup: passages[passageIndex].subtitle || '',
|
|
133
|
+
onChange: value => this.handleChange('subtitle', value),
|
|
134
|
+
nonEmpty: false,
|
|
135
|
+
error: subtitleError,
|
|
136
|
+
mathMlOptions: mathMlOptions,
|
|
137
|
+
languageCharactersProps: [{
|
|
138
|
+
language: 'spanish'
|
|
139
|
+
}, {
|
|
140
|
+
language: 'special'
|
|
141
|
+
}],
|
|
142
|
+
pluginProps: getPluginProps(subtitle?.inputConfiguration)
|
|
143
|
+
}), subtitleError && /*#__PURE__*/_react.default.createElement(ErrorText, null, subtitleError)), authorEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
|
|
144
|
+
label: author.label
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
146
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
147
|
+
markup: passages[passageIndex].author || '',
|
|
148
|
+
onChange: value => this.handleChange('author', value),
|
|
149
|
+
nonEmpty: false,
|
|
150
|
+
error: authorError,
|
|
151
|
+
mathMlOptions: mathMlOptions,
|
|
152
|
+
languageCharactersProps: [{
|
|
153
|
+
language: 'spanish'
|
|
154
|
+
}, {
|
|
155
|
+
language: 'special'
|
|
156
|
+
}],
|
|
157
|
+
pluginProps: getPluginProps(author?.inputConfiguration)
|
|
158
|
+
}), authorError && /*#__PURE__*/_react.default.createElement(ErrorText, null, authorError)), textEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
|
|
159
|
+
label: text.label
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
161
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
162
|
+
markup: passages[passageIndex].text || '',
|
|
163
|
+
onChange: value => this.handleChange('text', value),
|
|
164
|
+
imageSupport: imageSupport,
|
|
165
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
166
|
+
nonEmpty: false,
|
|
167
|
+
error: textError,
|
|
168
|
+
maxImageWidth: maxImageWidth && maxImageWidth.text || defaultImageMaxWidth,
|
|
169
|
+
maxImageHeight: maxImageHeight && maxImageHeight.text || defaultImageMaxHeight,
|
|
170
|
+
mathMlOptions: mathMlOptions,
|
|
171
|
+
languageCharactersProps: [{
|
|
172
|
+
language: 'spanish'
|
|
173
|
+
}, {
|
|
174
|
+
language: 'special'
|
|
175
|
+
}],
|
|
176
|
+
pluginProps: getPluginProps(text?.inputConfiguration)
|
|
177
|
+
}), textError && /*#__PURE__*/_react.default.createElement(ErrorText, null, textError)));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
252
180
|
exports.PassageComponent = PassageComponent;
|
|
253
|
-
(0, _defineProperty2
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
uploadSoundSupport: _propTypes["default"].object.isRequired
|
|
181
|
+
(0, _defineProperty2.default)(PassageComponent, "propTypes", {
|
|
182
|
+
onModelChanged: _propTypes.default.func.isRequired,
|
|
183
|
+
model: _propTypes.default.object.isRequired,
|
|
184
|
+
configuration: _propTypes.default.object.isRequired,
|
|
185
|
+
imageSupport: _propTypes.default.object.isRequired,
|
|
186
|
+
passageIndex: _propTypes.default.number.isRequired,
|
|
187
|
+
uploadSoundSupport: _propTypes.default.object.isRequired
|
|
261
188
|
});
|
|
262
|
-
(0, _defineProperty2
|
|
189
|
+
(0, _defineProperty2.default)(PassageComponent, "defaultProps", {
|
|
263
190
|
passageIndex: 0
|
|
264
191
|
});
|
|
265
|
-
|
|
266
|
-
var _default = (0, _styles.withStyles)(function (theme) {
|
|
267
|
-
return {
|
|
268
|
-
inputContainer: {
|
|
269
|
-
paddingTop: theme.spacing.unit * 2,
|
|
270
|
-
marginBottom: theme.spacing.unit * 2,
|
|
271
|
-
width: '100%'
|
|
272
|
-
},
|
|
273
|
-
errorText: {
|
|
274
|
-
fontSize: theme.typography.fontSize - 2,
|
|
275
|
-
color: theme.palette.error.main,
|
|
276
|
-
paddingTop: theme.spacing.unit
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
})(PassageComponent);
|
|
280
|
-
|
|
281
|
-
exports["default"] = _default;
|
|
192
|
+
var _default = exports.default = PassageComponent;
|
|
282
193
|
//# sourceMappingURL=passage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/passage.jsx"],"names":["PassageComponent","props","fieldName","value","model","onModelChanged","passageIndex","passages","length","updatedPassages","classes","configuration","imageSupport","uploadSoundSupport","maxImageWidth","maxImageHeight","mathMlOptions","baseInputConfiguration","teacherInstructions","title","subtitle","text","author","errors","teacherInstructionsEnabled","titleEnabled","subtitleEnabled","authorEnabled","textEnabled","passagesErrors","teacherInstructionsError","titleError","subtitleError","authorError","textError","defaultImageMaxWidth","prompt","defaultImageMaxHeight","getPluginProps","customConfiguration","label","inputContainer","ALL_PLUGINS","handleChange","language","inputConfiguration","errorText","React","Component","PropTypes","object","func","isRequired","number","theme","paddingTop","spacing","unit","marginBottom","width","fontSize","typography","color","palette","error","main"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;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;AAEdC,MAAAA,YAAY,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGdE,MAAAA,KAAK,EAAE;AAHO,KADoB;AAMpCb,IAAAA,SAAS,EAAE;AACTc,MAAAA,QAAQ,EAAEN,KAAK,CAACO,UAAN,CAAiBD,QAAjB,GAA4B,CAD7B;AAETE,MAAAA,KAAK,EAAER,KAAK,CAACS,OAAN,CAAcC,KAAd,CAAoBC,IAFlB;AAGTV,MAAAA,UAAU,EAAED,KAAK,CAACE,OAAN,CAAcC;AAHjB;AANyB,GAAZ;AAAA,CAAX,EAWXzD,gBAXW,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n\nexport class PassageComponent extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n onModelChanged: PropTypes.func.isRequired,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n passageIndex: PropTypes.number.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n };\n\n static defaultProps = {\n passageIndex: 0,\n };\n\n constructor(props) {\n super(props);\n }\n\n handleChange = (fieldName, value) => {\n const { model, onModelChanged, passageIndex } = this.props;\n\n if (!model.passages || passageIndex < 0 || passageIndex >= model.passages.length) {\n return;\n }\n\n const updatedPassages = [...model.passages];\n updatedPassages[passageIndex] = { ...updatedPassages[passageIndex], [fieldName]: value };\n\n onModelChanged({ ...model, passages: updatedPassages });\n };\n\n render() {\n const { model, classes, configuration, imageSupport, passageIndex, uploadSoundSupport } = this.props;\n const {\n maxImageWidth = {},\n maxImageHeight = {},\n mathMlOptions = {},\n baseInputConfiguration = {},\n teacherInstructions = {},\n title = {},\n subtitle = {},\n text = {},\n author = {},\n } = configuration || {};\n const {\n errors = {},\n passages = [],\n teacherInstructionsEnabled,\n titleEnabled,\n subtitleEnabled,\n authorEnabled,\n textEnabled,\n } = model || {};\n\n const { passages: passagesErrors } = errors || {};\n const {\n teacherInstructions: teacherInstructionsError,\n title: titleError,\n subtitle: subtitleError,\n author: authorError,\n text: textError,\n } = (passagesErrors && passagesErrors[passageIndex]) || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const getPluginProps = (customConfiguration) => ({ ...baseInputConfiguration, ...customConfiguration });\n\n return (\n <React.Fragment>\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.inputContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].teacherInstructions || ''}\n onChange={(value) => this.handleChange('teacherInstructions', value)}\n nonEmpty={false}\n error={teacherInstructionsError}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n {titleEnabled && (\n <InputContainer label={title.label} className={classes.inputContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].title || ''}\n onChange={(value) => this.handleChange('title', value)}\n nonEmpty={false}\n error={titleError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(title?.inputConfiguration)}\n />\n {titleError && <div className={classes.errorText}>{titleError}</div>}\n </InputContainer>\n )}\n\n {subtitleEnabled && (\n <InputContainer label={subtitle.label} className={classes.inputContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].subtitle || ''}\n onChange={(value) => this.handleChange('subtitle', value)}\n nonEmpty={false}\n error={subtitleError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(subtitle?.inputConfiguration)}\n />\n {subtitleError && <div className={classes.errorText}>{subtitleError}</div>}\n </InputContainer>\n )}\n\n {authorEnabled && (\n <InputContainer label={author.label} className={classes.inputContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].author || ''}\n onChange={(value) => this.handleChange('author', value)}\n nonEmpty={false}\n error={authorError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(author?.inputConfiguration)}\n />\n {authorError && <div className={classes.errorText}>{authorError}</div>}\n </InputContainer>\n )}\n\n {textEnabled && (\n <InputContainer label={text.label} className={classes.inputContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].text || ''}\n onChange={(value) => this.handleChange('text', value)}\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n nonEmpty={false}\n error={textError}\n maxImageWidth={(maxImageWidth && maxImageWidth.text) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.text) || defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(text?.inputConfiguration)}\n />\n {textError && <div className={classes.errorText}>{textError}</div>}\n </InputContainer>\n )}\n </React.Fragment>\n );\n }\n}\n\nexport default withStyles((theme) => ({\n inputContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n}))(PassageComponent);\n"],"file":"passage.js"}
|
|
1
|
+
{"version":3,"file":"passage.js","names":["_react","_interopRequireDefault","require","_propTypes","_configUi","_editableHtml","_interopRequireWildcard","_styles","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledInputContainer","styled","InputContainer","theme","paddingTop","spacing","marginBottom","width","ErrorText","fontSize","typography","color","palette","error","main","PassageComponent","React","Component","constructor","props","_defineProperty2","fieldName","value","model","onModelChanged","passageIndex","passages","length","updatedPassages","render","configuration","imageSupport","uploadSoundSupport","maxImageWidth","maxImageHeight","mathMlOptions","baseInputConfiguration","teacherInstructions","title","subtitle","text","author","errors","teacherInstructionsEnabled","titleEnabled","subtitleEnabled","authorEnabled","textEnabled","passagesErrors","teacherInstructionsError","titleError","subtitleError","authorError","textError","defaultImageMaxWidth","prompt","defaultImageMaxHeight","getPluginProps","customConfiguration","createElement","Fragment","label","activePlugins","ALL_PLUGINS","markup","onChange","handleChange","nonEmpty","languageCharactersProps","language","pluginProps","inputConfiguration","exports","PropTypes","func","isRequired","object","number","_default"],"sources":["../src/passage.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\nimport { styled } from '@mui/material/styles';\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n width: '100%',\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class PassageComponent extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n passageIndex: PropTypes.number.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n };\n\n static defaultProps = {\n passageIndex: 0,\n };\n\n constructor(props) {\n super(props);\n }\n\n handleChange = (fieldName, value) => {\n const { model, onModelChanged, passageIndex } = this.props;\n\n if (!model.passages || passageIndex < 0 || passageIndex >= model.passages.length) {\n return;\n }\n\n const updatedPassages = [...model.passages];\n updatedPassages[passageIndex] = { ...updatedPassages[passageIndex], [fieldName]: value };\n\n onModelChanged({ ...model, passages: updatedPassages });\n };\n\n render() {\n const { model, configuration, imageSupport, passageIndex, uploadSoundSupport } = this.props;\n const {\n maxImageWidth = {},\n maxImageHeight = {},\n mathMlOptions = {},\n baseInputConfiguration = {},\n teacherInstructions = {},\n title = {},\n subtitle = {},\n text = {},\n author = {},\n } = configuration || {};\n const {\n errors = {},\n passages = [],\n teacherInstructionsEnabled,\n titleEnabled,\n subtitleEnabled,\n authorEnabled,\n textEnabled,\n } = model || {};\n\n const { passages: passagesErrors } = errors || {};\n const {\n teacherInstructions: teacherInstructionsError,\n title: titleError,\n subtitle: subtitleError,\n author: authorError,\n text: textError,\n } = (passagesErrors && passagesErrors[passageIndex]) || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const getPluginProps = (customConfiguration) => ({ ...baseInputConfiguration, ...customConfiguration });\n\n return (\n <React.Fragment>\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].teacherInstructions || ''}\n onChange={(value) => this.handleChange('teacherInstructions', value)}\n nonEmpty={false}\n error={teacherInstructionsError}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {titleEnabled && (\n <StyledInputContainer label={title.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].title || ''}\n onChange={(value) => this.handleChange('title', value)}\n nonEmpty={false}\n error={titleError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(title?.inputConfiguration)}\n />\n {titleError && <ErrorText>{titleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {subtitleEnabled && (\n <StyledInputContainer label={subtitle.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].subtitle || ''}\n onChange={(value) => this.handleChange('subtitle', value)}\n nonEmpty={false}\n error={subtitleError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(subtitle?.inputConfiguration)}\n />\n {subtitleError && <ErrorText>{subtitleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {authorEnabled && (\n <StyledInputContainer label={author.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].author || ''}\n onChange={(value) => this.handleChange('author', value)}\n nonEmpty={false}\n error={authorError}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(author?.inputConfiguration)}\n />\n {authorError && <ErrorText>{authorError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {textEnabled && (\n <StyledInputContainer label={text.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n markup={passages[passageIndex].text || ''}\n onChange={(value) => this.handleChange('text', value)}\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n nonEmpty={false}\n error={textError}\n maxImageWidth={(maxImageWidth && maxImageWidth.text) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.text) || defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n pluginProps={getPluginProps(text?.inputConfiguration)}\n />\n {textError && <ErrorText>{textError}</ErrorText>}\n </StyledInputContainer>\n )}\n </React.Fragment>\n );\n }\n}\n\nexport default PassageComponent;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAA8C,SAAAI,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,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AAE,KAAM;MAChBtD,KAAK,EAAEwC,SAAU;MACjBpB,aAAa,EAAGA,aAAa,IAAIA,aAAa,CAACO,IAAI,IAAKc,oBAAqB;MAC7EpB,cAAc,EAAGA,cAAc,IAAIA,cAAc,CAACM,IAAI,IAAKgB,qBAAsB;MACjFrB,aAAa,EAAEA,aAAc;MAC7BiC,uBAAuB,EAAE,CAAC;QAAEC,QAAQ,EAAE;MAAU,CAAC,EAAE;QAAEA,QAAQ,EAAE;MAAU,CAAC,CAAE;MAC5EC,WAAW,EAAEb,cAAc,CAACjB,IAAI,EAAE+B,kBAAkB;IAAE,CACvD,CAAC,EACDlB,SAAS,iBAAIhF,MAAA,CAAAkB,OAAA,CAAAoE,aAAA,CAACnD,SAAS,QAAE6C,SAAqB,CAC3B,CAEV,CAAC;EAErB;AACF;AAACmB,OAAA,CAAAzD,gBAAA,GAAAA,gBAAA;AAAA,IAAAK,gBAAA,CAAA7B,OAAA,EA9JYwB,gBAAgB,eACR;EACjBS,cAAc,EAAEiD,kBAAS,CAACC,IAAI,CAACC,UAAU;EACzCpD,KAAK,EAAEkD,kBAAS,CAACG,MAAM,CAACD,UAAU;EAClC7C,aAAa,EAAE2C,kBAAS,CAACG,MAAM,CAACD,UAAU;EAC1C5C,YAAY,EAAE0C,kBAAS,CAACG,MAAM,CAACD,UAAU;EACzClD,YAAY,EAAEgD,kBAAS,CAACI,MAAM,CAACF,UAAU;EACzC3C,kBAAkB,EAAEyC,kBAAS,CAACG,MAAM,CAACD;AACvC,CAAC;AAAA,IAAAvD,gBAAA,CAAA7B,OAAA,EARUwB,gBAAgB,kBAUL;EACpBU,YAAY,EAAE;AAChB,CAAC;AAAA,IAAAqD,QAAA,GAAAN,OAAA,CAAAjF,OAAA,GAoJYwB,gBAAgB","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/passage-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0-beta.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"author": "pie framework developers",
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@
|
|
11
|
+
"@emotion/react": "^11.14.0",
|
|
12
|
+
"@emotion/style": "^0.8.0",
|
|
13
|
+
"@mui/icons-material": "^7.3.4",
|
|
14
|
+
"@mui/material": "^7.3.4",
|
|
12
15
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
13
|
-
"@pie-lib/config-ui": "11.30.
|
|
14
|
-
"@pie-lib/editable-html": "11.21.
|
|
16
|
+
"@pie-lib/config-ui": "11.30.4-next.0",
|
|
17
|
+
"@pie-lib/editable-html": "11.21.4-next.0",
|
|
15
18
|
"lodash": "^4.17.15",
|
|
16
19
|
"prop-types": "^15.6.2",
|
|
17
|
-
"react": "
|
|
18
|
-
"react-dom": "
|
|
20
|
+
"react": "18.2.0",
|
|
21
|
+
"react-dom": "18.2.0"
|
|
19
22
|
}
|
|
20
23
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
// TODO: also update '../../configure/src/defaults.js' and '../../src/print.js' when updating defaults
|
|
8
|
-
var _default = {
|
|
8
|
+
var _default = exports.default = {
|
|
9
9
|
authorEnabled: false,
|
|
10
10
|
// TODO: should be set to true when all Studio content is updated
|
|
11
11
|
passages: [{
|
|
@@ -20,5 +20,4 @@ var _default = {
|
|
|
20
20
|
textEnabled: true,
|
|
21
21
|
titleEnabled: true
|
|
22
22
|
};
|
|
23
|
-
exports["default"] = _default;
|
|
24
23
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["_default","exports","default","authorEnabled","passages","teacherInstructions","title","subtitle","author","text","subtitleEnabled","teacherInstructionsEnabled","textEnabled","titleEnabled"],"sources":["../src/defaults.js"],"sourcesContent":["// TODO: also update '../../configure/src/defaults.js' and '../../src/print.js' when updating defaults\nexport default {\n authorEnabled: false, // TODO: should be set to true when all Studio content is updated\n passages: [\n {\n teacherInstructions: '',\n title: '',\n subtitle: '',\n author: '',\n text: '',\n },\n ],\n subtitleEnabled: true,\n teacherInstructionsEnabled: true,\n textEnabled: true,\n titleEnabled: true,\n};\n"],"mappings":";;;;;;AAAA;AAAA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACe;EACbC,aAAa,EAAE,KAAK;EAAE;EACtBC,QAAQ,EAAE,CACR;IACEC,mBAAmB,EAAE,EAAE;IACvBC,KAAK,EAAE,EAAE;IACTC,QAAQ,EAAE,EAAE;IACZC,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE;EACR,CAAC,CACF;EACDC,eAAe,EAAE,IAAI;EACrBC,0BAA0B,EAAE,IAAI;EAChCC,WAAW,EAAE,IAAI;EACjBC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
|