@pie-element/multi-trait-rubric 6.3.4-next.3 → 7.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 +374 -533
- package/configure/lib/common.js.map +1 -1
- package/configure/lib/defaults.js +35 -6
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +96 -162
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +346 -437
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/modals.js +178 -333
- package/configure/lib/modals.js.map +1 -1
- package/configure/lib/scale.js +358 -463
- package/configure/lib/scale.js.map +1 -1
- package/configure/lib/trait.js +253 -358
- package/configure/lib/trait.js.map +1 -1
- package/configure/lib/traitsHeader.js +199 -264
- package/configure/lib/traitsHeader.js.map +1 -1
- package/configure/lib/utils.js +42 -73
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +12 -9
- package/controller/lib/defaults.js +2 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +66 -123
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +1 -3
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +1 -1
- package/lib/index.js +40 -77
- package/lib/index.js.map +1 -1
- package/lib/main.js +99 -140
- package/lib/main.js.map +1 -1
- package/lib/scale.js +217 -299
- package/lib/scale.js.map +1 -1
- package/lib/trait.js +51 -71
- package/lib/trait.js.map +1 -1
- package/package.json +10 -8
- package/esm/configure.js +0 -30404
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -176
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -11204
- package/esm/element.js.map +0 -1
- package/esm/package.json +0 -3
package/configure/lib/common.js
CHANGED
|
@@ -1,274 +1,178 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.UnderlinedInput = exports.SimpleInput = exports.SecondaryBlock = exports.ScorePoint = exports.ScaleSettings = exports.Row = exports.PrimaryBlockWidth = exports.PrimaryBlock = exports.MultiTraitButton = exports.MaxPointsPicker = exports.HeaderHeightLarge = exports.HeaderHeight = exports.ExpandedInput = exports.DragHandleSpace = exports.BlockWidth = exports.Block = exports.Arrow = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
9
|
+
var _styles = require("@mui/material/styles");
|
|
16
10
|
var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _InputLabel = _interopRequireDefault(require("@material-ui/core/InputLabel"));
|
|
21
|
-
|
|
22
|
-
var _Select = _interopRequireDefault(require("@material-ui/core/Select"));
|
|
23
|
-
|
|
24
|
-
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
25
|
-
|
|
26
|
-
var _InputBase = _interopRequireDefault(require("@material-ui/core/InputBase"));
|
|
27
|
-
|
|
11
|
+
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
12
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
13
|
+
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
|
|
28
14
|
var _renderUi = require("@pie-lib/render-ui");
|
|
29
|
-
|
|
30
|
-
var _grey = _interopRequireDefault(require("@material-ui/core/colors/grey"));
|
|
31
|
-
|
|
15
|
+
var _colors = require("@mui/material/colors");
|
|
32
16
|
var _utils = require("./utils");
|
|
17
|
+
const InputHeight = '120px';
|
|
18
|
+
const BlockWidth = exports.BlockWidth = 200;
|
|
19
|
+
const PrimaryBlockWidth = exports.PrimaryBlockWidth = 200;
|
|
20
|
+
const DragHandleSpace = exports.DragHandleSpace = 32;
|
|
21
|
+
const HeaderHeight = exports.HeaderHeight = '100px';
|
|
22
|
+
const HeaderHeightLarge = exports.HeaderHeightLarge = '160px';
|
|
23
|
+
const greyBorder = `solid 1px ${_colors.grey[400]}`;
|
|
24
|
+
const Padding = '8px 4px';
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
fontSize: theme.typography.fontSize + 2,
|
|
51
|
-
textAlign: 'right',
|
|
52
|
-
display: 'flex',
|
|
53
|
-
flexDirection: 'row',
|
|
54
|
-
alignItems: 'flex-start',
|
|
55
|
-
padding: "".concat(theme.spacing.unit * 1.5, "px ").concat(theme.spacing.unit * 2, "px"),
|
|
56
|
-
width: '114px',
|
|
57
|
-
background: _renderUi.color.secondaryBackground(),
|
|
58
|
-
borderRadius: '4px',
|
|
59
|
-
justifyContent: 'space-around',
|
|
60
|
-
color: _renderUi.color.text(),
|
|
61
|
-
cursor: 'pointer'
|
|
26
|
+
// global styles for EditableHtml components
|
|
27
|
+
const GlobalStyles = (0, _styles.styled)('div')(({
|
|
28
|
+
theme
|
|
29
|
+
}) => ({
|
|
30
|
+
'& .editable-label': {
|
|
31
|
+
textAlign: 'left',
|
|
32
|
+
flex: 1,
|
|
33
|
+
border: 'none',
|
|
34
|
+
'& div': {
|
|
35
|
+
padding: 0,
|
|
36
|
+
border: 'none'
|
|
37
|
+
},
|
|
38
|
+
'& > div': {
|
|
39
|
+
borderLeft: greyBorder,
|
|
40
|
+
borderRadius: 0,
|
|
41
|
+
padding: Padding
|
|
62
42
|
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
padding: '0 10px',
|
|
80
|
-
boxSizing: 'border-box'
|
|
81
|
-
}
|
|
82
|
-
})(function (_ref2) {
|
|
83
|
-
var classes = _ref2.classes,
|
|
84
|
-
children = _ref2.children,
|
|
85
|
-
className = _ref2.className;
|
|
86
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
|
-
className: (0, _classnames["default"])(classes.primaryBlock, className)
|
|
88
|
-
}, children);
|
|
89
|
-
});
|
|
90
|
-
exports.PrimaryBlock = PrimaryBlock;
|
|
91
|
-
var Block = (0, _styles.withStyles)(function (theme) {
|
|
92
|
-
return {
|
|
93
|
-
block: {
|
|
94
|
-
width: "".concat(BlockWidth, "px"),
|
|
95
|
-
minWidth: "".concat(BlockWidth, "px"),
|
|
96
|
-
'& ul, ol': {
|
|
97
|
-
marginBlockStart: 0,
|
|
98
|
-
paddingInlineStart: theme.spacing.unit * 2
|
|
99
|
-
}
|
|
43
|
+
},
|
|
44
|
+
'& .editable-level': {
|
|
45
|
+
background: theme.palette.common.white,
|
|
46
|
+
width: '60%'
|
|
47
|
+
},
|
|
48
|
+
'& .underlined-editable-level': {
|
|
49
|
+
background: theme.palette.common.white,
|
|
50
|
+
width: '100%',
|
|
51
|
+
'& div': {
|
|
52
|
+
padding: 0,
|
|
53
|
+
border: 'none'
|
|
54
|
+
},
|
|
55
|
+
'& > div': {
|
|
56
|
+
borderBottom: greyBorder,
|
|
57
|
+
borderRadius: 0,
|
|
58
|
+
padding: Padding
|
|
100
59
|
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
60
|
+
},
|
|
61
|
+
'& .expanded-input-prompt': {
|
|
62
|
+
border: 'none',
|
|
63
|
+
margin: '10px',
|
|
64
|
+
marginTop: 0
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
const StyledButton = (0, _styles.styled)('div')(({
|
|
68
|
+
theme
|
|
69
|
+
}) => ({
|
|
70
|
+
fontSize: theme.typography.fontSize + 2,
|
|
71
|
+
textAlign: 'right',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
flexDirection: 'row',
|
|
74
|
+
alignItems: 'flex-start',
|
|
75
|
+
padding: `${theme.spacing(1.5)} ${theme.spacing(2)}`,
|
|
76
|
+
width: '114px',
|
|
77
|
+
background: _renderUi.color.secondaryBackground(),
|
|
78
|
+
borderRadius: '4px',
|
|
79
|
+
justifyContent: 'space-around',
|
|
80
|
+
color: _renderUi.color.text(),
|
|
81
|
+
cursor: 'pointer'
|
|
82
|
+
}));
|
|
83
|
+
const MultiTraitButton = ({
|
|
84
|
+
children,
|
|
85
|
+
onClick
|
|
86
|
+
}) => /*#__PURE__*/_react.default.createElement(StyledButton, {
|
|
87
|
+
onClick: onClick
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, "+"), /*#__PURE__*/_react.default.createElement("div", null, children));
|
|
89
|
+
exports.MultiTraitButton = MultiTraitButton;
|
|
90
|
+
const PrimaryBlock = exports.PrimaryBlock = (0, _styles.styled)('div')({
|
|
91
|
+
width: `${PrimaryBlockWidth}px`,
|
|
92
|
+
minWidth: `${PrimaryBlockWidth}px`,
|
|
93
|
+
position: 'relative',
|
|
94
|
+
padding: '0 10px',
|
|
95
|
+
boxSizing: 'border-box'
|
|
108
96
|
});
|
|
109
|
-
exports.Block =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
97
|
+
const Block = exports.Block = (0, _styles.styled)('div')(({
|
|
98
|
+
theme
|
|
99
|
+
}) => ({
|
|
100
|
+
width: `${BlockWidth}px`,
|
|
101
|
+
minWidth: `${BlockWidth}px`,
|
|
102
|
+
'& ul, ol': {
|
|
103
|
+
marginBlockStart: 0,
|
|
104
|
+
paddingInlineStart: theme.spacing(2)
|
|
117
105
|
}
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
style: {
|
|
126
|
-
width: width
|
|
127
|
-
},
|
|
128
|
-
ref: setRef
|
|
129
|
-
}, children);
|
|
106
|
+
}));
|
|
107
|
+
const StyledSecondaryBlock = (0, _styles.styled)('div')({
|
|
108
|
+
display: 'flex',
|
|
109
|
+
overflowX: 'hidden',
|
|
110
|
+
alignItems: 'flex-end',
|
|
111
|
+
// this is needed to show the editor toolbar!!!
|
|
112
|
+
paddingBottom: '30px'
|
|
130
113
|
});
|
|
114
|
+
const SecondaryBlock = ({
|
|
115
|
+
children,
|
|
116
|
+
setRef,
|
|
117
|
+
width
|
|
118
|
+
}) => /*#__PURE__*/_react.default.createElement(StyledSecondaryBlock, {
|
|
119
|
+
style: {
|
|
120
|
+
width: width
|
|
121
|
+
},
|
|
122
|
+
ref: setRef
|
|
123
|
+
}, children);
|
|
131
124
|
exports.SecondaryBlock = SecondaryBlock;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
const Row = ({
|
|
126
|
+
children,
|
|
127
|
+
height
|
|
128
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
+
style: {
|
|
130
|
+
display: 'flex',
|
|
131
|
+
height
|
|
135
132
|
}
|
|
136
|
-
}
|
|
137
|
-
var classes = _ref5.classes,
|
|
138
|
-
children = _ref5.children,
|
|
139
|
-
className = _ref5.className,
|
|
140
|
-
height = _ref5.height;
|
|
141
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
|
-
className: (0, _classnames["default"])(classes.row, className),
|
|
143
|
-
style: {
|
|
144
|
-
height: height
|
|
145
|
-
}
|
|
146
|
-
}, children);
|
|
147
|
-
});
|
|
133
|
+
}, children);
|
|
148
134
|
exports.Row = Row;
|
|
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
|
-
errorText: {
|
|
191
|
-
fontSize: theme.typography.fontSize - 2,
|
|
192
|
-
color: theme.palette.error.main,
|
|
193
|
-
paddingBottom: theme.spacing.unit
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
var ScorePoint = (0, _styles.withStyles)(function (theme) {
|
|
199
|
-
return {
|
|
200
|
-
scorePointBoxWrapper: {
|
|
201
|
-
padding: '0 10px'
|
|
202
|
-
},
|
|
203
|
-
scorePointBox: {
|
|
204
|
-
display: 'flex',
|
|
205
|
-
borderRadius: '4px',
|
|
206
|
-
background: 'white',
|
|
207
|
-
flexDirection: 'row',
|
|
208
|
-
alignItems: 'center',
|
|
209
|
-
justifyContent: 'space-between',
|
|
210
|
-
border: greyBorder
|
|
211
|
-
},
|
|
212
|
-
scorePointBoxDisabled: {
|
|
213
|
-
background: 'none',
|
|
214
|
-
justifyContent: 'center',
|
|
215
|
-
border: '0'
|
|
216
|
-
},
|
|
217
|
-
subLabel: {
|
|
218
|
-
width: '24px',
|
|
219
|
-
textAlign: 'center'
|
|
220
|
-
},
|
|
221
|
-
editableLabel: {
|
|
222
|
-
textAlign: 'left',
|
|
223
|
-
flex: 1,
|
|
224
|
-
border: 'none',
|
|
225
|
-
'& div': {
|
|
226
|
-
padding: 0
|
|
227
|
-
},
|
|
228
|
-
'& > div': {
|
|
229
|
-
border: 'none',
|
|
230
|
-
borderLeft: greyBorder,
|
|
231
|
-
borderRadius: 0,
|
|
232
|
-
padding: Padding
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
slateEditor: {
|
|
236
|
-
fontFamily: 'Cerebri'
|
|
237
|
-
},
|
|
238
|
-
errorText: {
|
|
239
|
-
fontSize: theme.typography.fontSize - 2,
|
|
240
|
-
color: theme.palette.error.main,
|
|
241
|
-
paddingBottom: theme.spacing.unit
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
})(function (_ref6) {
|
|
245
|
-
var classes = _ref6.classes,
|
|
246
|
-
_ref6$error = _ref6.error,
|
|
247
|
-
error = _ref6$error === void 0 ? '' : _ref6$error,
|
|
248
|
-
scorePointsValue = _ref6.scorePointsValue,
|
|
249
|
-
scoreDescriptor = _ref6.scoreDescriptor,
|
|
250
|
-
pluginProps = _ref6.pluginProps,
|
|
251
|
-
onChange = _ref6.onChange,
|
|
252
|
-
showScorePointLabels = _ref6.showScorePointLabels,
|
|
253
|
-
alignToRight = _ref6.alignToRight,
|
|
254
|
-
spellCheck = _ref6.spellCheck,
|
|
255
|
-
uploadSoundSupport = _ref6.uploadSoundSupport,
|
|
256
|
-
_ref6$imageSupport = _ref6.imageSupport,
|
|
257
|
-
imageSupport = _ref6$imageSupport === void 0 ? {} : _ref6$imageSupport,
|
|
258
|
-
_ref6$mathMlOptions = _ref6.mathMlOptions,
|
|
259
|
-
mathMlOptions = _ref6$mathMlOptions === void 0 ? {} : _ref6$mathMlOptions;
|
|
260
|
-
var scoreBoxClasses = showScorePointLabels ? classes.scorePointBox : "".concat(classes.scorePointBox, " ").concat(classes.scorePointBoxDisabled);
|
|
261
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
262
|
-
className: classes.scorePointBoxWrapper
|
|
263
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
264
|
-
className: scoreBoxClasses
|
|
265
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
266
|
-
className: classes.subLabel
|
|
267
|
-
}, scorePointsValue), showScorePointLabels ? /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
268
|
-
className: classes.editableLabel,
|
|
269
|
-
classes: {
|
|
270
|
-
slateEditor: classes.slateEditor
|
|
271
|
-
},
|
|
135
|
+
const ScorePointBoxWrapper = (0, _styles.styled)('div')({
|
|
136
|
+
padding: '0 10px'
|
|
137
|
+
});
|
|
138
|
+
const ScorePointBox = (0, _styles.styled)('div')({
|
|
139
|
+
display: 'flex',
|
|
140
|
+
borderRadius: '4px',
|
|
141
|
+
background: 'white',
|
|
142
|
+
flexDirection: 'row',
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
justifyContent: 'space-between',
|
|
145
|
+
border: greyBorder
|
|
146
|
+
});
|
|
147
|
+
const ScorePointBoxDisabled = (0, _styles.styled)('div')({
|
|
148
|
+
display: 'flex',
|
|
149
|
+
borderRadius: '4px',
|
|
150
|
+
background: 'none',
|
|
151
|
+
flexDirection: 'row',
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
justifyContent: 'center',
|
|
154
|
+
border: '0'
|
|
155
|
+
});
|
|
156
|
+
const SubLabel = (0, _styles.styled)('div')({
|
|
157
|
+
width: '24px',
|
|
158
|
+
textAlign: 'center'
|
|
159
|
+
});
|
|
160
|
+
const ScorePoint = ({
|
|
161
|
+
error = '',
|
|
162
|
+
scorePointsValue,
|
|
163
|
+
scoreDescriptor,
|
|
164
|
+
pluginProps,
|
|
165
|
+
onChange,
|
|
166
|
+
showScorePointLabels,
|
|
167
|
+
alignToRight,
|
|
168
|
+
spellCheck,
|
|
169
|
+
uploadSoundSupport,
|
|
170
|
+
imageSupport = {},
|
|
171
|
+
mathMlOptions = {}
|
|
172
|
+
}) => {
|
|
173
|
+
const ScorePointBoxComponent = showScorePointLabels ? ScorePointBox : ScorePointBoxDisabled;
|
|
174
|
+
return /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxWrapper, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxComponent, null, /*#__PURE__*/_react.default.createElement(SubLabel, null, scorePointsValue), showScorePointLabels ? /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
175
|
+
className: "editable-label",
|
|
272
176
|
error: error,
|
|
273
177
|
markup: scoreDescriptor,
|
|
274
178
|
placeholder: " Enter Label",
|
|
@@ -286,299 +190,236 @@ var ScorePoint = (0, _styles.withStyles)(function (theme) {
|
|
|
286
190
|
language: 'special'
|
|
287
191
|
}],
|
|
288
192
|
mathMlOptions: mathMlOptions,
|
|
289
|
-
imageSupport: imageSupport
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
exports.ScorePoint = ScorePoint;
|
|
293
|
-
|
|
294
|
-
var inputStyles = function inputStyles(theme) {
|
|
295
|
-
return {
|
|
296
|
-
root: {
|
|
297
|
-
background: theme.palette.common.white,
|
|
298
|
-
'label + &': {
|
|
299
|
-
marginTop: theme.spacing.unit * 2.5,
|
|
300
|
-
marginBottom: 0,
|
|
301
|
-
width: '80px'
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
input: {
|
|
305
|
-
borderRadius: '4px',
|
|
306
|
-
position: 'relative',
|
|
307
|
-
border: greyBorder,
|
|
308
|
-
fontSize: theme.typography.fontSize,
|
|
309
|
-
fontFamily: 'Cerebri Sans',
|
|
310
|
-
padding: "".concat(theme.spacing.unit, "px ").concat(theme.spacing.unit * 1.5, "px"),
|
|
311
|
-
'&:focus': {
|
|
312
|
-
borderRadius: '4px'
|
|
313
|
-
}
|
|
193
|
+
imageSupport: imageSupport,
|
|
194
|
+
slateEditorExtraStyles: {
|
|
195
|
+
fontFamily: 'Cerebri'
|
|
314
196
|
}
|
|
315
|
-
};
|
|
197
|
+
}) : null)));
|
|
316
198
|
};
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
var MaxPointsPicker = (0, _styles.withStyles)({})(function (_ref7) {
|
|
329
|
-
var maxPoints = _ref7.maxPoints,
|
|
330
|
-
onChange = _ref7.onChange,
|
|
331
|
-
maxMaxPoints = _ref7.maxMaxPoints;
|
|
332
|
-
return /*#__PURE__*/_react["default"].createElement(_FormControl["default"], null, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], null, "Max Points"), /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
333
|
-
value: maxPoints,
|
|
334
|
-
onChange: onChange,
|
|
335
|
-
input: /*#__PURE__*/_react["default"].createElement(BootstrapInput, null)
|
|
336
|
-
}, createMaxScoreOptions(maxMaxPoints).map(function (maxScore) {
|
|
337
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
338
|
-
key: "menu-item-".concat(maxScore),
|
|
339
|
-
value: maxScore
|
|
340
|
-
}, maxScore);
|
|
341
|
-
})));
|
|
342
|
-
});
|
|
343
|
-
exports.MaxPointsPicker = MaxPointsPicker;
|
|
344
|
-
var SimpleInput = (0, _styles.withStyles)(function (theme) {
|
|
345
|
-
return {
|
|
346
|
-
simpleInput: {
|
|
347
|
-
display: 'flex',
|
|
348
|
-
justifyContent: 'space-between',
|
|
349
|
-
alignItems: 'center',
|
|
350
|
-
margin: "".concat(theme.spacing.unit * 1.5, "px 0")
|
|
351
|
-
},
|
|
352
|
-
editableLevel: {
|
|
353
|
-
background: theme.palette.common.white,
|
|
354
|
-
width: '60%'
|
|
355
|
-
},
|
|
356
|
-
slateEditor: {
|
|
357
|
-
fontFamily: 'Cerebri'
|
|
199
|
+
exports.ScorePoint = ScorePoint;
|
|
200
|
+
const StyledBootstrapInput = (0, _styles.styled)(_InputBase.default)(({
|
|
201
|
+
theme
|
|
202
|
+
}) => ({
|
|
203
|
+
'&.MuiInputBase-root': {
|
|
204
|
+
background: theme.palette.common.white,
|
|
205
|
+
marginTop: theme.spacing(1),
|
|
206
|
+
'label + &': {
|
|
207
|
+
width: '80px'
|
|
358
208
|
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
mathMlOptions = _ref8$mathMlOptions === void 0 ? {} : _ref8$mathMlOptions,
|
|
370
|
-
_ref8$imageSupport = _ref8.imageSupport,
|
|
371
|
-
imageSupport = _ref8$imageSupport === void 0 ? {} : _ref8$imageSupport;
|
|
372
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
373
|
-
className: classes.simpleInput
|
|
374
|
-
}, label && /*#__PURE__*/_react["default"].createElement("div", null, label), /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
375
|
-
className: classes.editableLevel,
|
|
376
|
-
classes: {
|
|
377
|
-
slateEditor: classes.slateEditor
|
|
378
|
-
},
|
|
379
|
-
markup: markup,
|
|
380
|
-
onChange: onChange,
|
|
381
|
-
placeholder: "Trait Label",
|
|
382
|
-
pluginProps: pluginProps,
|
|
383
|
-
activePlugins: _utils.filteredDefaultPlugins,
|
|
384
|
-
spellCheck: spellCheck,
|
|
385
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
386
|
-
languageCharactersProps: [{
|
|
387
|
-
language: 'spanish'
|
|
388
|
-
}, {
|
|
389
|
-
language: 'special'
|
|
390
|
-
}],
|
|
391
|
-
mathMlOptions: mathMlOptions,
|
|
392
|
-
imageSupport: imageSupport
|
|
393
|
-
}));
|
|
394
|
-
});
|
|
395
|
-
exports.SimpleInput = SimpleInput;
|
|
396
|
-
var UnderlinedInput = (0, _styles.withStyles)(function (theme) {
|
|
397
|
-
return {
|
|
398
|
-
underlinedInputWrapper: {
|
|
399
|
-
width: '100%',
|
|
400
|
-
display: 'flex',
|
|
401
|
-
justifyContent: 'center',
|
|
402
|
-
alignItems: 'center'
|
|
403
|
-
},
|
|
404
|
-
editableLevel: {
|
|
405
|
-
background: theme.palette.common.white,
|
|
406
|
-
width: '100%',
|
|
407
|
-
'& div': {
|
|
408
|
-
padding: 0
|
|
409
|
-
},
|
|
410
|
-
'& > div': {
|
|
411
|
-
border: 'none',
|
|
412
|
-
borderBottom: greyBorder,
|
|
413
|
-
borderRadius: 0,
|
|
414
|
-
padding: Padding
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
slateEditor: {
|
|
418
|
-
fontFamily: 'Cerebri'
|
|
209
|
+
},
|
|
210
|
+
'& .MuiInputBase-input': {
|
|
211
|
+
borderRadius: '4px',
|
|
212
|
+
position: 'relative',
|
|
213
|
+
border: greyBorder,
|
|
214
|
+
fontSize: theme.typography.fontSize,
|
|
215
|
+
fontFamily: 'Cerebri Sans',
|
|
216
|
+
padding: `${theme.spacing(1)} ${theme.spacing(1.5)}`,
|
|
217
|
+
'&:focus': {
|
|
218
|
+
borderRadius: '4px'
|
|
419
219
|
}
|
|
420
|
-
}
|
|
421
|
-
})
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
const createMaxScoreOptions = maxMaxPoints => Array.from({
|
|
223
|
+
length: maxMaxPoints
|
|
224
|
+
}, (_, i) => i + 1);
|
|
225
|
+
const MaxPointsPicker = ({
|
|
226
|
+
maxPoints,
|
|
227
|
+
onChange,
|
|
228
|
+
maxMaxPoints
|
|
229
|
+
}) => /*#__PURE__*/_react.default.createElement(_renderUi.InputContainer, {
|
|
230
|
+
label: "Max Points"
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_Select.default, {
|
|
232
|
+
value: maxPoints,
|
|
233
|
+
onChange: onChange,
|
|
234
|
+
input: /*#__PURE__*/_react.default.createElement(StyledBootstrapInput, null),
|
|
235
|
+
MenuProps: {
|
|
236
|
+
transitionDuration: {
|
|
237
|
+
enter: 225,
|
|
238
|
+
exit: 195
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}, createMaxScoreOptions(maxMaxPoints).map(maxScore => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
242
|
+
key: `menu-item-${maxScore}`,
|
|
243
|
+
value: maxScore
|
|
244
|
+
}, maxScore))));
|
|
245
|
+
exports.MaxPointsPicker = MaxPointsPicker;
|
|
246
|
+
const SimpleInputWrapper = (0, _styles.styled)('div')(({
|
|
247
|
+
theme
|
|
248
|
+
}) => ({
|
|
249
|
+
display: 'flex',
|
|
250
|
+
justifyContent: 'space-between',
|
|
251
|
+
alignItems: 'center',
|
|
252
|
+
margin: `${theme.spacing(1.5)} 0`
|
|
253
|
+
}));
|
|
254
|
+
const SimpleInput = ({
|
|
255
|
+
markup,
|
|
256
|
+
onChange,
|
|
257
|
+
pluginProps,
|
|
258
|
+
label,
|
|
259
|
+
spellCheck,
|
|
260
|
+
uploadSoundSupport,
|
|
261
|
+
mathMlOptions = {},
|
|
262
|
+
imageSupport = {}
|
|
263
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(SimpleInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
264
|
+
className: "editable-level",
|
|
265
|
+
markup: markup,
|
|
266
|
+
onChange: onChange,
|
|
267
|
+
placeholder: "Trait Label",
|
|
268
|
+
pluginProps: pluginProps,
|
|
269
|
+
activePlugins: _utils.filteredDefaultPlugins,
|
|
270
|
+
spellCheck: spellCheck,
|
|
271
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
272
|
+
languageCharactersProps: [{
|
|
273
|
+
language: 'spanish'
|
|
274
|
+
}, {
|
|
275
|
+
language: 'special'
|
|
276
|
+
}],
|
|
277
|
+
mathMlOptions: mathMlOptions,
|
|
278
|
+
imageSupport: imageSupport,
|
|
279
|
+
slateEditorExtraStyles: {
|
|
280
|
+
fontFamily: 'Cerebri'
|
|
281
|
+
}
|
|
282
|
+
})));
|
|
283
|
+
exports.SimpleInput = SimpleInput;
|
|
284
|
+
const UnderlinedInputWrapper = (0, _styles.styled)('div')({
|
|
285
|
+
width: '100%',
|
|
286
|
+
display: 'flex',
|
|
287
|
+
justifyContent: 'center',
|
|
288
|
+
alignItems: 'center'
|
|
458
289
|
});
|
|
290
|
+
const UnderlinedInput = ({
|
|
291
|
+
error,
|
|
292
|
+
markup,
|
|
293
|
+
onChange,
|
|
294
|
+
pluginProps,
|
|
295
|
+
label,
|
|
296
|
+
placeholder,
|
|
297
|
+
spellCheck,
|
|
298
|
+
uploadSoundSupport,
|
|
299
|
+
imageSupport = {},
|
|
300
|
+
mathMlOptions = {}
|
|
301
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(UnderlinedInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
302
|
+
className: "underlined-editable-level",
|
|
303
|
+
error: error,
|
|
304
|
+
markup: markup,
|
|
305
|
+
onChange: onChange,
|
|
306
|
+
placeholder: placeholder,
|
|
307
|
+
pluginProps: pluginProps,
|
|
308
|
+
activePlugins: _utils.filteredDefaultPlugins,
|
|
309
|
+
spellCheck: spellCheck,
|
|
310
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
311
|
+
languageCharactersProps: [{
|
|
312
|
+
language: 'spanish'
|
|
313
|
+
}, {
|
|
314
|
+
language: 'special'
|
|
315
|
+
}],
|
|
316
|
+
mathMlOptions: mathMlOptions,
|
|
317
|
+
imageSupport: imageSupport,
|
|
318
|
+
slateEditorExtraStyles: {
|
|
319
|
+
fontFamily: 'Cerebri'
|
|
320
|
+
}
|
|
321
|
+
})));
|
|
459
322
|
exports.UnderlinedInput = UnderlinedInput;
|
|
460
|
-
|
|
461
|
-
|
|
323
|
+
const ExpandedInput = ({
|
|
324
|
+
error,
|
|
325
|
+
markup,
|
|
326
|
+
onChange,
|
|
327
|
+
pluginProps,
|
|
328
|
+
placeholder,
|
|
329
|
+
alignToRight,
|
|
330
|
+
spellCheck,
|
|
331
|
+
uploadSoundSupport,
|
|
332
|
+
mathMlOptions = {},
|
|
333
|
+
imageSupport = {}
|
|
334
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
|
|
335
|
+
className: "expanded-input-prompt",
|
|
336
|
+
error: error,
|
|
337
|
+
markup: markup,
|
|
338
|
+
onChange: onChange,
|
|
339
|
+
placeholder: placeholder,
|
|
340
|
+
pluginProps: pluginProps,
|
|
341
|
+
toolbarOpts: alignToRight ? {
|
|
342
|
+
alignment: 'right'
|
|
343
|
+
} : {},
|
|
344
|
+
spellCheck: spellCheck,
|
|
345
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
346
|
+
languageCharactersProps: [{
|
|
347
|
+
language: 'spanish'
|
|
348
|
+
}, {
|
|
349
|
+
language: 'special'
|
|
350
|
+
}],
|
|
351
|
+
autoWidthToolbar: true,
|
|
352
|
+
mathMlOptions: mathMlOptions,
|
|
353
|
+
imageSupport: imageSupport,
|
|
354
|
+
slateEditorExtraStyles: {
|
|
462
355
|
fontFamily: 'Cerebri',
|
|
463
356
|
height: InputHeight,
|
|
464
357
|
padding: 0
|
|
465
|
-
},
|
|
466
|
-
prompt: {
|
|
467
|
-
border: 'none',
|
|
468
|
-
margin: '10px',
|
|
469
|
-
marginTop: 0
|
|
470
358
|
}
|
|
471
|
-
})
|
|
472
|
-
var classes = _ref10.classes,
|
|
473
|
-
error = _ref10.error,
|
|
474
|
-
markup = _ref10.markup,
|
|
475
|
-
onChange = _ref10.onChange,
|
|
476
|
-
pluginProps = _ref10.pluginProps,
|
|
477
|
-
placeholder = _ref10.placeholder,
|
|
478
|
-
alignToRight = _ref10.alignToRight,
|
|
479
|
-
spellCheck = _ref10.spellCheck,
|
|
480
|
-
uploadSoundSupport = _ref10.uploadSoundSupport,
|
|
481
|
-
_ref10$mathMlOptions = _ref10.mathMlOptions,
|
|
482
|
-
mathMlOptions = _ref10$mathMlOptions === void 0 ? {} : _ref10$mathMlOptions,
|
|
483
|
-
_ref10$imageSupport = _ref10.imageSupport,
|
|
484
|
-
imageSupport = _ref10$imageSupport === void 0 ? {} : _ref10$imageSupport;
|
|
485
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
|
|
486
|
-
className: classes.prompt,
|
|
487
|
-
classes: {
|
|
488
|
-
slateEditor: classes.slateEditor
|
|
489
|
-
},
|
|
490
|
-
error: error,
|
|
491
|
-
markup: markup,
|
|
492
|
-
onChange: onChange,
|
|
493
|
-
placeholder: placeholder,
|
|
494
|
-
pluginProps: pluginProps,
|
|
495
|
-
toolbarOpts: alignToRight ? {
|
|
496
|
-
alignment: 'right'
|
|
497
|
-
} : {},
|
|
498
|
-
spellCheck: spellCheck,
|
|
499
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
500
|
-
languageCharactersProps: [{
|
|
501
|
-
language: 'spanish'
|
|
502
|
-
}, {
|
|
503
|
-
language: 'special'
|
|
504
|
-
}],
|
|
505
|
-
autoWidthToolbar: true,
|
|
506
|
-
mathMlOptions: mathMlOptions,
|
|
507
|
-
imageSupport: imageSupport
|
|
508
|
-
}));
|
|
509
|
-
});
|
|
359
|
+
}));
|
|
510
360
|
exports.ExpandedInput = ExpandedInput;
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
361
|
+
const ScaleSettings = exports.ScaleSettings = (0, _styles.styled)('div')(({
|
|
362
|
+
theme
|
|
363
|
+
}) => ({
|
|
364
|
+
display: 'flex',
|
|
365
|
+
justifyContent: 'space-between',
|
|
366
|
+
alignItems: 'flex-end',
|
|
367
|
+
paddingBottom: '18px',
|
|
368
|
+
gap: theme.spacing(0.25)
|
|
369
|
+
}));
|
|
370
|
+
const StyledArrow = (0, _styles.styled)('div')(({
|
|
371
|
+
theme
|
|
372
|
+
}) => ({
|
|
373
|
+
position: 'absolute',
|
|
374
|
+
zIndex: 10,
|
|
375
|
+
cursor: 'pointer',
|
|
376
|
+
right: 0,
|
|
377
|
+
alignItems: 'flex-start',
|
|
378
|
+
justifyContent: 'center',
|
|
379
|
+
background: `linear-gradient(to left, ${theme.palette.common.white}, ${_renderUi.color.background()})`,
|
|
380
|
+
boxSizing: 'border-box'
|
|
381
|
+
}));
|
|
382
|
+
const StyledInnerGrey = (0, _styles.styled)('div')(({
|
|
383
|
+
theme
|
|
384
|
+
}) => ({
|
|
385
|
+
position: 'absolute',
|
|
386
|
+
zIndex: 11,
|
|
387
|
+
cursor: 'pointer',
|
|
388
|
+
right: 0,
|
|
389
|
+
alignItems: 'flex-start',
|
|
390
|
+
justifyContent: 'center',
|
|
391
|
+
background: `linear-gradient(to left, ${theme.palette.common.white}, ${_renderUi.color.background()})`,
|
|
392
|
+
boxSizing: 'border-box',
|
|
393
|
+
'& svg': {
|
|
394
|
+
position: 'absolute',
|
|
395
|
+
bottom: '-24px'
|
|
516
396
|
}
|
|
517
|
-
})
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
background: "linear-gradient(to left, ".concat(theme.palette.common.white, ", ").concat(_renderUi.color.background(), ")"),
|
|
545
|
-
boxSizing: 'border-box',
|
|
546
|
-
'& svg': {
|
|
547
|
-
position: 'absolute',
|
|
548
|
-
bottom: '-24px'
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
})(function (_ref12) {
|
|
553
|
-
var classes = _ref12.classes,
|
|
554
|
-
children = _ref12.children,
|
|
555
|
-
className = _ref12.className,
|
|
556
|
-
show = _ref12.show,
|
|
557
|
-
width = _ref12.width,
|
|
558
|
-
onClick = _ref12.onClick,
|
|
559
|
-
left = _ref12.left,
|
|
560
|
-
showLevelTagInput = _ref12.showLevelTagInput;
|
|
561
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
562
|
-
className: (0, _classnames["default"])(classes.arrow, className),
|
|
563
|
-
style: {
|
|
564
|
-
height: '-webkit-fill-available',
|
|
565
|
-
display: show ? 'flex' : 'none',
|
|
566
|
-
width: width,
|
|
567
|
-
left: left,
|
|
568
|
-
background: left ? "linear-gradient(to right, white, ".concat(_renderUi.color.background(), ")") : undefined
|
|
569
|
-
},
|
|
570
|
-
onClick: onClick
|
|
571
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
572
|
-
className: (0, _classnames["default"])(classes.innerGrey, className),
|
|
573
|
-
style: {
|
|
574
|
-
display: show ? 'flex' : 'none',
|
|
575
|
-
width: width,
|
|
576
|
-
height: showLevelTagInput ? HeaderHeightLarge : HeaderHeight,
|
|
577
|
-
left: 0,
|
|
578
|
-
background: left ? "linear-gradient(to right, ".concat(_renderUi.color.secondaryBackground(), ", ").concat(_renderUi.color.background(), ")") : undefined
|
|
579
|
-
},
|
|
580
|
-
onClick: onClick
|
|
581
|
-
}, children));
|
|
582
|
-
});
|
|
397
|
+
}));
|
|
398
|
+
const Arrow = ({
|
|
399
|
+
children,
|
|
400
|
+
show,
|
|
401
|
+
width,
|
|
402
|
+
onClick,
|
|
403
|
+
left,
|
|
404
|
+
showLevelTagInput
|
|
405
|
+
}) => /*#__PURE__*/_react.default.createElement(StyledArrow, {
|
|
406
|
+
style: {
|
|
407
|
+
height: '-webkit-fill-available',
|
|
408
|
+
display: show ? 'flex' : 'none',
|
|
409
|
+
width: width,
|
|
410
|
+
left: left,
|
|
411
|
+
background: left ? `linear-gradient(to right, white, ${_renderUi.color.background()})` : undefined
|
|
412
|
+
},
|
|
413
|
+
onClick: onClick
|
|
414
|
+
}, /*#__PURE__*/_react.default.createElement(StyledInnerGrey, {
|
|
415
|
+
style: {
|
|
416
|
+
display: show ? 'flex' : 'none',
|
|
417
|
+
width: width,
|
|
418
|
+
height: showLevelTagInput ? HeaderHeightLarge : HeaderHeight,
|
|
419
|
+
left: 0,
|
|
420
|
+
background: left ? `linear-gradient(to right, ${_renderUi.color.secondaryBackground()}, ${_renderUi.color.background()})` : undefined
|
|
421
|
+
},
|
|
422
|
+
onClick: onClick
|
|
423
|
+
}, children));
|
|
583
424
|
exports.Arrow = Arrow;
|
|
584
425
|
//# sourceMappingURL=common.js.map
|