@pie-element/complex-rubric 5.3.4-next.3 → 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/defaults.js +52 -24
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +103 -194
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +140 -199
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +2491 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +2333 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +429 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +181 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +157 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +455 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +206 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +451 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +275 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +233 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +87 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +24 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +1571 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +158 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +11 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +14 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +1628 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +1202 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +117 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +861 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +614 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +54 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +123 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +248 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +83 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +32 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +2774 -0
- package/configure/node_modules/@pie-element/rubric/README.md +3 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +197 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +2541 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +67 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +135 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +103 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/package.json +24 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +178 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +42 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +139 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +87 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +1564 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js +15 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +46 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/package.json +12 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +33 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/defaults.js +8 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +41 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +712 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +532 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +2 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +391 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +281 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js +52 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +210 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js +71 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/package.json +30 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +2641 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +49 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +48 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +226 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +74 -0
- package/configure/node_modules/clsx/clsx.d.ts +6 -0
- package/configure/node_modules/clsx/dist/clsx.js +1 -0
- package/configure/node_modules/clsx/dist/clsx.m.js +1 -0
- package/configure/node_modules/clsx/dist/clsx.min.js +1 -0
- package/configure/node_modules/clsx/license +9 -0
- package/configure/node_modules/clsx/package.json +37 -0
- package/configure/node_modules/clsx/readme.md +88 -0
- package/configure/package.json +12 -9
- package/configure/src/__tests__/index.test.js +30 -5
- package/configure/src/__tests__/main.test.jsx +39 -23
- package/configure/src/index.js +13 -6
- package/configure/src/main.jsx +16 -15
- package/controller/lib/defaults.js +11 -15
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +117 -180
- 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 +113 -204
- package/lib/index.js.map +1 -1
- package/lib/print.js +96 -190
- package/lib/print.js.map +1 -1
- package/package.json +10 -14
- package/src/__tests__/index.test.js +25 -7
- package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +0 -193
- package/esm/configure.js +0 -15856
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -281
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -179
- package/esm/element.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/print.js +0 -163
- package/esm/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -262
- package/module/demo.js +0 -221
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -22
- package/module/print-demo.js +0 -259
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _debug = _interopRequireDefault(require("debug"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
13
|
+
var _core = require("@dnd-kit/core");
|
|
14
|
+
var _styles = require("@mui/material/styles");
|
|
15
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
16
|
+
var _common = require("./common");
|
|
17
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
18
|
+
var _MoreVert = _interopRequireDefault(require("@mui/icons-material/MoreVert"));
|
|
19
|
+
var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
|
|
20
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
21
|
+
var _DragIndicator = _interopRequireDefault(require("@mui/icons-material/DragIndicator"));
|
|
22
|
+
const log = (0, _debug.default)('@pie-element:placement-ordering:configure:trait-tile');
|
|
23
|
+
const ActionsIcon = (0, _styles.styled)(_DragIndicator.default)({
|
|
24
|
+
color: _renderUi.color.text()
|
|
25
|
+
});
|
|
26
|
+
const StyledPrimaryBlock = (0, _styles.styled)(_common.PrimaryBlock)(({
|
|
27
|
+
theme
|
|
28
|
+
}) => ({
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
marginBottom: theme.spacing(5)
|
|
33
|
+
}));
|
|
34
|
+
const Controls = (0, _styles.styled)('div')({
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
width: '100%',
|
|
38
|
+
cursor: 'pointer'
|
|
39
|
+
});
|
|
40
|
+
const Options = (0, _styles.styled)(_IconButton.default)({
|
|
41
|
+
marginLeft: 'auto'
|
|
42
|
+
});
|
|
43
|
+
const RemoveLabel = (0, _styles.styled)('div')({
|
|
44
|
+
display: 'flex',
|
|
45
|
+
whiteSpace: 'break-spaces'
|
|
46
|
+
});
|
|
47
|
+
const ErrorText = (0, _styles.styled)('div')(({
|
|
48
|
+
theme
|
|
49
|
+
}) => ({
|
|
50
|
+
fontSize: theme.typography.fontSize - 2,
|
|
51
|
+
color: theme.palette.error.main,
|
|
52
|
+
paddingBottom: theme.spacing(1)
|
|
53
|
+
}));
|
|
54
|
+
function TraitTile({
|
|
55
|
+
error,
|
|
56
|
+
trait: {
|
|
57
|
+
name,
|
|
58
|
+
standards,
|
|
59
|
+
description,
|
|
60
|
+
scorePointsDescriptors
|
|
61
|
+
},
|
|
62
|
+
traitLabel,
|
|
63
|
+
scorePointsValues,
|
|
64
|
+
showStandards,
|
|
65
|
+
showDescription,
|
|
66
|
+
enableDragAndDrop,
|
|
67
|
+
currentPosition,
|
|
68
|
+
secondaryBlockWidth,
|
|
69
|
+
spellCheck,
|
|
70
|
+
maxPoints,
|
|
71
|
+
uploadSoundSupport,
|
|
72
|
+
mathMlOptions = {},
|
|
73
|
+
expandedPluginProps = {},
|
|
74
|
+
labelPluginProps = {},
|
|
75
|
+
imageSupport = {},
|
|
76
|
+
index,
|
|
77
|
+
onTraitChanged,
|
|
78
|
+
onTraitRemoved,
|
|
79
|
+
onTraitDropped
|
|
80
|
+
}) {
|
|
81
|
+
const [anchorEl, setAnchorEl] = _react.default.useState(null);
|
|
82
|
+
const secondaryBlockRef = _react.default.useRef(null);
|
|
83
|
+
const {
|
|
84
|
+
attributes,
|
|
85
|
+
listeners,
|
|
86
|
+
setNodeRef: setDragRef,
|
|
87
|
+
transform,
|
|
88
|
+
isDragging
|
|
89
|
+
} = (0, _core.useDraggable)({
|
|
90
|
+
id: `trait-${index}`,
|
|
91
|
+
data: {
|
|
92
|
+
type: 'trait',
|
|
93
|
+
index,
|
|
94
|
+
name
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
const {
|
|
98
|
+
setNodeRef: setDropRef
|
|
99
|
+
} = (0, _core.useDroppable)({
|
|
100
|
+
id: `trait-drop-${index}`,
|
|
101
|
+
data: {
|
|
102
|
+
type: 'trait',
|
|
103
|
+
index
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
_react.default.useEffect(() => {
|
|
107
|
+
if (currentPosition !== undefined && secondaryBlockRef.current && secondaryBlockRef.current.scrollLeft !== currentPosition) {
|
|
108
|
+
scrollToPosition(currentPosition);
|
|
109
|
+
}
|
|
110
|
+
}, [currentPosition]);
|
|
111
|
+
const onTraitChangedHandler = params => {
|
|
112
|
+
if ((0, _isEmpty.default)(params)) return;
|
|
113
|
+
const updatedTrait = {
|
|
114
|
+
...{
|
|
115
|
+
name,
|
|
116
|
+
standards,
|
|
117
|
+
description,
|
|
118
|
+
scorePointsDescriptors
|
|
119
|
+
},
|
|
120
|
+
...params
|
|
121
|
+
};
|
|
122
|
+
onTraitChanged(updatedTrait);
|
|
123
|
+
};
|
|
124
|
+
const onScorePointDescriptorChange = ({
|
|
125
|
+
descriptor,
|
|
126
|
+
value
|
|
127
|
+
}) => {
|
|
128
|
+
if (value < 0 || value >= scorePointsDescriptors.length) return;
|
|
129
|
+
const newDescriptors = [...scorePointsDescriptors];
|
|
130
|
+
newDescriptors[value] = descriptor;
|
|
131
|
+
onTraitChangedHandler({
|
|
132
|
+
scorePointsDescriptors: newDescriptors
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
const handleClick = event => setAnchorEl(event.currentTarget);
|
|
136
|
+
const handleClose = () => setAnchorEl(null);
|
|
137
|
+
const scrollToPosition = position => secondaryBlockRef.current?.scrollTo({
|
|
138
|
+
left: position
|
|
139
|
+
});
|
|
140
|
+
const openMenu = () => {
|
|
141
|
+
onTraitRemoved();
|
|
142
|
+
handleClose();
|
|
143
|
+
};
|
|
144
|
+
const dragStyle = transform ? {
|
|
145
|
+
transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,
|
|
146
|
+
opacity: isDragging ? 0.5 : 1
|
|
147
|
+
} : {};
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
ref: setDropRef,
|
|
150
|
+
style: dragStyle
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_common.Row, null, /*#__PURE__*/_react.default.createElement(StyledPrimaryBlock, null, /*#__PURE__*/_react.default.createElement(Controls, null, enableDragAndDrop && /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
|
|
152
|
+
ref: setDragRef
|
|
153
|
+
}, attributes, listeners), /*#__PURE__*/_react.default.createElement(ActionsIcon, null)), /*#__PURE__*/_react.default.createElement(Options, {
|
|
154
|
+
"aria-label": "more",
|
|
155
|
+
"aria-controls": "long-menu",
|
|
156
|
+
"aria-haspopup": "true",
|
|
157
|
+
onClick: handleClick,
|
|
158
|
+
size: "large"
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement(_MoreVert.default, null)), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
160
|
+
id: "long-menu",
|
|
161
|
+
anchorEl: anchorEl,
|
|
162
|
+
keepMounted: true,
|
|
163
|
+
open: !!anchorEl,
|
|
164
|
+
onClose: handleClose,
|
|
165
|
+
transitionDuration: {
|
|
166
|
+
enter: 225,
|
|
167
|
+
exit: 195
|
|
168
|
+
}
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
170
|
+
onClick: openMenu
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement(RemoveLabel, {
|
|
172
|
+
dangerouslySetInnerHTML: {
|
|
173
|
+
__html: `Remove ${name || traitLabel}`
|
|
174
|
+
}
|
|
175
|
+
})))), /*#__PURE__*/_react.default.createElement(_common.UnderlinedInput, {
|
|
176
|
+
markup: name,
|
|
177
|
+
error: error?.name || '',
|
|
178
|
+
onChange: name => onTraitChangedHandler({
|
|
179
|
+
name
|
|
180
|
+
}),
|
|
181
|
+
pluginProps: labelPluginProps,
|
|
182
|
+
placeholder: `Enter ${traitLabel}`,
|
|
183
|
+
spellCheck: spellCheck,
|
|
184
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
185
|
+
mathMlOptions: mathMlOptions,
|
|
186
|
+
imageSupport: imageSupport
|
|
187
|
+
}), error && /*#__PURE__*/_react.default.createElement(ErrorText, null, error.name || '')), /*#__PURE__*/_react.default.createElement(_common.SecondaryBlock, {
|
|
188
|
+
setRef: ref => {
|
|
189
|
+
secondaryBlockRef.current = ref;
|
|
190
|
+
},
|
|
191
|
+
width: `${secondaryBlockWidth}px`
|
|
192
|
+
}, showStandards && standards && /*#__PURE__*/_react.default.createElement(_common.Block, null, /*#__PURE__*/_react.default.createElement(_common.ExpandedInput, {
|
|
193
|
+
placeholder: "Standards",
|
|
194
|
+
markup: standards.join(','),
|
|
195
|
+
onChange: standards => onTraitChangedHandler({
|
|
196
|
+
standards: standards.split(',')
|
|
197
|
+
}),
|
|
198
|
+
pluginProps: expandedPluginProps,
|
|
199
|
+
spellCheck: spellCheck,
|
|
200
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
201
|
+
mathMlOptions: mathMlOptions,
|
|
202
|
+
imageSupport: imageSupport
|
|
203
|
+
})), showDescription && /*#__PURE__*/_react.default.createElement(_common.Block, null, /*#__PURE__*/_react.default.createElement(_common.ExpandedInput, {
|
|
204
|
+
placeholder: "Enter Description",
|
|
205
|
+
markup: description,
|
|
206
|
+
error: error?.description || '',
|
|
207
|
+
onChange: description => onTraitChangedHandler({
|
|
208
|
+
description
|
|
209
|
+
}),
|
|
210
|
+
pluginProps: expandedPluginProps,
|
|
211
|
+
spellCheck: spellCheck,
|
|
212
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
213
|
+
mathMlOptions: mathMlOptions,
|
|
214
|
+
imageSupport: imageSupport
|
|
215
|
+
}), error && /*#__PURE__*/_react.default.createElement(ErrorText, null, error.description || '')), (scorePointsValues || []).map((scorePointsValue, scoreIndex) => {
|
|
216
|
+
const adjustedBlockWidth = _common.BlockWidth + 2 * 8; // 8 is padding
|
|
217
|
+
const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * scoreIndex + currentPosition - 98;
|
|
218
|
+
const value = scorePointsValues.length - scoreIndex - 1;
|
|
219
|
+
let scoreDescriptor;
|
|
220
|
+
try {
|
|
221
|
+
scoreDescriptor = scorePointsDescriptors[value] || '';
|
|
222
|
+
} catch (e) {
|
|
223
|
+
scoreDescriptor = '';
|
|
224
|
+
}
|
|
225
|
+
return /*#__PURE__*/_react.default.createElement(_common.Block, {
|
|
226
|
+
key: `key-key-${scoreIndex}`
|
|
227
|
+
}, /*#__PURE__*/_react.default.createElement(_common.ExpandedInput, {
|
|
228
|
+
placeholder: "Enter Descriptor",
|
|
229
|
+
markup: scoreDescriptor,
|
|
230
|
+
onChange: descriptor => onScorePointDescriptorChange({
|
|
231
|
+
descriptor,
|
|
232
|
+
value
|
|
233
|
+
}),
|
|
234
|
+
pluginProps: expandedPluginProps,
|
|
235
|
+
alignToRight: remainingSpace < 296 && scorePointsValue < maxPoints // 296 is the space required for the toolbar
|
|
236
|
+
,
|
|
237
|
+
spellCheck: spellCheck,
|
|
238
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
239
|
+
mathMlOptions: mathMlOptions,
|
|
240
|
+
imageSupport: imageSupport
|
|
241
|
+
}));
|
|
242
|
+
}))));
|
|
243
|
+
}
|
|
244
|
+
TraitTile.propTypes = {
|
|
245
|
+
error: _propTypes.default.object,
|
|
246
|
+
index: _propTypes.default.number.isRequired,
|
|
247
|
+
onTraitChanged: _propTypes.default.func.isRequired,
|
|
248
|
+
onTraitRemoved: _propTypes.default.func.isRequired,
|
|
249
|
+
onTraitDropped: _propTypes.default.func,
|
|
250
|
+
trait: _propTypes.default.shape({
|
|
251
|
+
name: _propTypes.default.string,
|
|
252
|
+
standards: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
253
|
+
scorePointsDescriptors: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
254
|
+
description: _propTypes.default.string
|
|
255
|
+
}),
|
|
256
|
+
traitLabel: _propTypes.default.string,
|
|
257
|
+
scorePointsValues: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
258
|
+
showStandards: _propTypes.default.bool,
|
|
259
|
+
showDescription: _propTypes.default.bool,
|
|
260
|
+
maxPoints: _propTypes.default.number,
|
|
261
|
+
enableDragAndDrop: _propTypes.default.bool,
|
|
262
|
+
currentPosition: _propTypes.default.number,
|
|
263
|
+
secondaryBlockWidth: _propTypes.default.number,
|
|
264
|
+
spellCheck: _propTypes.default.bool,
|
|
265
|
+
uploadSoundSupport: _propTypes.default.object,
|
|
266
|
+
mathMlOptions: _propTypes.default.object,
|
|
267
|
+
expandedPluginProps: _propTypes.default.object,
|
|
268
|
+
labelPluginProps: _propTypes.default.object,
|
|
269
|
+
imageSupport: _propTypes.default.shape({
|
|
270
|
+
add: _propTypes.default.func.isRequired,
|
|
271
|
+
delete: _propTypes.default.func.isRequired
|
|
272
|
+
})
|
|
273
|
+
};
|
|
274
|
+
var _default = exports.default = TraitTile;
|
|
275
|
+
//# sourceMappingURL=trait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trait.js","names":["_react","_interopRequireDefault","require","_debug","_propTypes","_isEmpty","_core","_styles","_renderUi","_common","_IconButton","_MoreVert","_Menu","_MenuItem","_DragIndicator","log","debug","ActionsIcon","styled","DragIndicatorIcon","color","text","StyledPrimaryBlock","PrimaryBlock","theme","display","flexDirection","justifyContent","marginBottom","spacing","Controls","alignItems","width","cursor","Options","IconButton","marginLeft","RemoveLabel","whiteSpace","ErrorText","fontSize","typography","palette","error","main","paddingBottom","TraitTile","trait","name","standards","description","scorePointsDescriptors","traitLabel","scorePointsValues","showStandards","showDescription","enableDragAndDrop","currentPosition","secondaryBlockWidth","spellCheck","maxPoints","uploadSoundSupport","mathMlOptions","expandedPluginProps","labelPluginProps","imageSupport","index","onTraitChanged","onTraitRemoved","onTraitDropped","anchorEl","setAnchorEl","React","useState","secondaryBlockRef","useRef","attributes","listeners","setNodeRef","setDragRef","transform","isDragging","useDraggable","id","data","type","setDropRef","useDroppable","useEffect","undefined","current","scrollLeft","scrollToPosition","onTraitChangedHandler","params","isEmpty","updatedTrait","onScorePointDescriptorChange","descriptor","value","length","newDescriptors","handleClick","event","currentTarget","handleClose","position","scrollTo","left","openMenu","dragStyle","x","y","opacity","default","createElement","ref","style","Row","_extends2","onClick","size","keepMounted","open","onClose","transitionDuration","enter","exit","dangerouslySetInnerHTML","__html","UnderlinedInput","markup","onChange","pluginProps","placeholder","SecondaryBlock","setRef","Block","ExpandedInput","join","split","map","scorePointsValue","scoreIndex","adjustedBlockWidth","BlockWidth","remainingSpace","scoreDescriptor","e","key","alignToRight","propTypes","PropTypes","object","number","isRequired","func","shape","string","arrayOf","bool","add","delete","_default","exports"],"sources":["../src/trait.jsx"],"sourcesContent":["import React from 'react';\nimport debug from 'debug';\nimport PropTypes from 'prop-types';\nimport isEmpty from 'lodash/isEmpty';\nimport { useDraggable, useDroppable } from '@dnd-kit/core';\n\nimport { styled } from '@mui/material/styles';\nimport { color } from '@pie-lib/render-ui';\n\nimport { Block, BlockWidth, ExpandedInput, PrimaryBlock, Row, SecondaryBlock, UnderlinedInput } from './common';\n\nimport IconButton from '@mui/material/IconButton';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport DragIndicatorIcon from '@mui/icons-material/DragIndicator';\n\nconst log = debug('@pie-element:placement-ordering:configure:trait-tile');\n\nconst ActionsIcon = styled(DragIndicatorIcon)({\n color: color.text(),\n});\n\nconst StyledPrimaryBlock = styled(PrimaryBlock)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n marginBottom: theme.spacing(5),\n}));\n\nconst Controls = styled('div')({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n cursor: 'pointer',\n});\n\nconst Options = styled(IconButton)({\n marginLeft: 'auto',\n});\n\nconst RemoveLabel = styled('div')({\n display: 'flex',\n whiteSpace: 'break-spaces',\n});\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingBottom: theme.spacing(1),\n}));\n\nfunction TraitTile({\n error,\n trait: { name, standards, description, scorePointsDescriptors },\n traitLabel,\n scorePointsValues,\n showStandards,\n showDescription,\n enableDragAndDrop,\n currentPosition,\n secondaryBlockWidth,\n spellCheck,\n maxPoints,\n uploadSoundSupport,\n mathMlOptions = {},\n expandedPluginProps = {},\n labelPluginProps = {},\n imageSupport = {},\n index,\n onTraitChanged,\n onTraitRemoved,\n onTraitDropped,\n}) {\n const [anchorEl, setAnchorEl] = React.useState(null);\n const secondaryBlockRef = React.useRef(null);\n\n const { attributes, listeners, setNodeRef: setDragRef, transform, isDragging } = useDraggable({\n id: `trait-${index}`,\n data: {\n type: 'trait',\n index,\n name,\n },\n });\n\n const { setNodeRef: setDropRef } = useDroppable({\n id: `trait-drop-${index}`,\n data: {\n type: 'trait',\n index,\n },\n });\n\n React.useEffect(() => {\n if (currentPosition !== undefined && secondaryBlockRef.current && secondaryBlockRef.current.scrollLeft !== currentPosition) {\n scrollToPosition(currentPosition);\n }\n }, [currentPosition]);\n\n const onTraitChangedHandler = (params) => {\n if (isEmpty(params)) return;\n\n const updatedTrait = { ...{ name, standards, description, scorePointsDescriptors }, ...params };\n onTraitChanged(updatedTrait);\n };\n\n const onScorePointDescriptorChange = ({ descriptor, value }) => {\n if (value < 0 || value >= scorePointsDescriptors.length) return;\n\n const newDescriptors = [...scorePointsDescriptors];\n newDescriptors[value] = descriptor;\n\n onTraitChangedHandler({ scorePointsDescriptors: newDescriptors });\n };\n\n const handleClick = (event) => setAnchorEl(event.currentTarget);\n\n const handleClose = () => setAnchorEl(null);\n\n const scrollToPosition = (position) => secondaryBlockRef.current?.scrollTo({ left: position });\n\n const openMenu = () => {\n onTraitRemoved();\n handleClose();\n };\n\n const dragStyle = transform ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n opacity: isDragging ? 0.5 : 1,\n } : {};\n\n return (\n <div ref={setDropRef} style={dragStyle}>\n <Row>\n <StyledPrimaryBlock>\n <Controls>\n {enableDragAndDrop && (\n <span ref={setDragRef} {...attributes} {...listeners}>\n <ActionsIcon />\n </span>\n )}\n\n <Options\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-haspopup=\"true\"\n onClick={handleClick}\n size=\"large\">\n <MoreVertIcon />\n </Options>\n\n <Menu\n id=\"long-menu\"\n anchorEl={anchorEl}\n keepMounted\n open={!!anchorEl}\n onClose={handleClose}\n transitionDuration={{ enter: 225, exit: 195 }}\n >\n <MenuItem onClick={openMenu}>\n <RemoveLabel\n dangerouslySetInnerHTML={{ __html: `Remove ${name || traitLabel}` }}\n />\n </MenuItem>\n </Menu>\n </Controls>\n\n <UnderlinedInput\n markup={name}\n error={error?.name || ''}\n onChange={(name) => onTraitChangedHandler({ name })}\n pluginProps={labelPluginProps}\n placeholder={`Enter ${traitLabel}`}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n {error && <ErrorText>{error.name || ''}</ErrorText>}\n </StyledPrimaryBlock>\n\n <SecondaryBlock\n setRef={(ref) => {\n secondaryBlockRef.current = ref;\n }}\n width={`${secondaryBlockWidth}px`}\n >\n {showStandards && standards && (\n <Block>\n <ExpandedInput\n placeholder=\"Standards\"\n markup={standards.join(',')}\n onChange={(standards) => onTraitChangedHandler({ standards: standards.split(',') })}\n pluginProps={expandedPluginProps}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n </Block>\n )}\n\n {showDescription && (\n <Block>\n <ExpandedInput\n placeholder=\"Enter Description\"\n markup={description}\n error={error?.description || ''}\n onChange={(description) => onTraitChangedHandler({ description })}\n pluginProps={expandedPluginProps}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n {error && <ErrorText>{error.description || ''}</ErrorText>}\n </Block>\n )}\n\n {(scorePointsValues || []).map((scorePointsValue, scoreIndex) => {\n const adjustedBlockWidth = BlockWidth + 2 * 8; // 8 is padding\n const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * scoreIndex + currentPosition - 98;\n const value = scorePointsValues.length - scoreIndex - 1;\n let scoreDescriptor;\n\n try {\n scoreDescriptor = scorePointsDescriptors[value] || '';\n } catch (e) {\n scoreDescriptor = '';\n }\n\n return (\n <Block key={`key-key-${scoreIndex}`}>\n <ExpandedInput\n placeholder=\"Enter Descriptor\"\n markup={scoreDescriptor}\n onChange={(descriptor) => onScorePointDescriptorChange({ descriptor, value })}\n pluginProps={expandedPluginProps}\n alignToRight={remainingSpace < 296 && scorePointsValue < maxPoints} // 296 is the space required for the toolbar\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n </Block>\n );\n })}\n </SecondaryBlock>\n </Row>\n </div>\n );\n}\n\nTraitTile.propTypes = {\n error: PropTypes.object,\n index: PropTypes.number.isRequired,\n onTraitChanged: PropTypes.func.isRequired,\n onTraitRemoved: PropTypes.func.isRequired,\n onTraitDropped: PropTypes.func,\n trait: PropTypes.shape({\n name: PropTypes.string,\n standards: PropTypes.arrayOf(PropTypes.string),\n scorePointsDescriptors: PropTypes.arrayOf(PropTypes.string),\n description: PropTypes.string,\n }),\n traitLabel: PropTypes.string,\n scorePointsValues: PropTypes.arrayOf(PropTypes.number),\n showStandards: PropTypes.bool,\n showDescription: PropTypes.bool,\n maxPoints: PropTypes.number,\n enableDragAndDrop: PropTypes.bool,\n currentPosition: PropTypes.number,\n secondaryBlockWidth: PropTypes.number,\n spellCheck: PropTypes.bool,\n uploadSoundSupport: PropTypes.object,\n mathMlOptions: PropTypes.object,\n expandedPluginProps: PropTypes.object,\n labelPluginProps: PropTypes.object,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default Trait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Q,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEapE,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.TraitsHeaderTile = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _styles = require("@mui/material/styles");
|
|
12
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
13
|
+
var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
|
|
14
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
15
|
+
var _MoreVert = _interopRequireDefault(require("@mui/icons-material/MoreVert"));
|
|
16
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
17
|
+
var _common = require("./common");
|
|
18
|
+
const Label = (0, _styles.styled)('div')(({
|
|
19
|
+
theme
|
|
20
|
+
}) => ({
|
|
21
|
+
width: '140px',
|
|
22
|
+
border: 'none',
|
|
23
|
+
padding: '10px 0',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'space-around'
|
|
27
|
+
}));
|
|
28
|
+
const GreyHeaderRow = (0, _styles.styled)('div')(({
|
|
29
|
+
height,
|
|
30
|
+
theme
|
|
31
|
+
}) => ({
|
|
32
|
+
background: _renderUi.color.secondaryBackground(),
|
|
33
|
+
borderRadius: '4px',
|
|
34
|
+
position: 'relative',
|
|
35
|
+
marginBottom: theme.spacing(2),
|
|
36
|
+
display: 'flex',
|
|
37
|
+
height: height
|
|
38
|
+
}));
|
|
39
|
+
const PrimaryBlockGreyHeader = (0, _styles.styled)('div')(({
|
|
40
|
+
theme
|
|
41
|
+
}) => ({
|
|
42
|
+
width: `${_common.PrimaryBlockWidth}px`,
|
|
43
|
+
minWidth: `${_common.PrimaryBlockWidth}px`,
|
|
44
|
+
position: 'relative',
|
|
45
|
+
padding: '0 10px',
|
|
46
|
+
boxSizing: 'border-box',
|
|
47
|
+
paddingTop: theme.spacing(1.5),
|
|
48
|
+
alignSelf: 'center'
|
|
49
|
+
}));
|
|
50
|
+
const ScorePointErrorText = (0, _styles.styled)('div')(({
|
|
51
|
+
theme
|
|
52
|
+
}) => ({
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
fontSize: theme.typography.fontSize - 2,
|
|
55
|
+
color: theme.palette.error.main,
|
|
56
|
+
paddingTop: theme.spacing(0.5)
|
|
57
|
+
}));
|
|
58
|
+
class TraitsHeaderTile extends _react.default.Component {
|
|
59
|
+
constructor(...args) {
|
|
60
|
+
super(...args);
|
|
61
|
+
(0, _defineProperty2.default)(this, "state", {
|
|
62
|
+
anchorEl: null
|
|
63
|
+
});
|
|
64
|
+
(0, _defineProperty2.default)(this, "onScorePointLabelChange", ({
|
|
65
|
+
scorePointLabel,
|
|
66
|
+
value
|
|
67
|
+
}) => {
|
|
68
|
+
const {
|
|
69
|
+
scorePointsLabels,
|
|
70
|
+
onScaleChange
|
|
71
|
+
} = this.props;
|
|
72
|
+
if (value < 0 || value >= scorePointsLabels.length) return;
|
|
73
|
+
scorePointsLabels[value] = scorePointLabel;
|
|
74
|
+
onScaleChange({
|
|
75
|
+
scorePointsLabels
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
(0, _defineProperty2.default)(this, "handleClick", event => this.setState({
|
|
79
|
+
anchorEl: event.currentTarget
|
|
80
|
+
}));
|
|
81
|
+
(0, _defineProperty2.default)(this, "handleClose", () => this.setState({
|
|
82
|
+
anchorEl: null
|
|
83
|
+
}));
|
|
84
|
+
(0, _defineProperty2.default)(this, "scrollToPosition", position => this.secondaryBlock.scrollTo({
|
|
85
|
+
left: position
|
|
86
|
+
}));
|
|
87
|
+
(0, _defineProperty2.default)(this, "openMenu", () => {
|
|
88
|
+
this.props.showDeleteScaleModal();
|
|
89
|
+
this.handleClose();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
93
|
+
if (nextProps.currentPosition !== this.props.currentPosition) {
|
|
94
|
+
this.scrollToPosition(nextProps.currentPosition);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
render() {
|
|
98
|
+
const {
|
|
99
|
+
scorePointsValues,
|
|
100
|
+
scorePointsLabels,
|
|
101
|
+
traitLabel,
|
|
102
|
+
currentPosition,
|
|
103
|
+
showStandards,
|
|
104
|
+
onTraitLabelChange,
|
|
105
|
+
showDescription,
|
|
106
|
+
showLevelTagInput,
|
|
107
|
+
maxPoints,
|
|
108
|
+
updateMaxPointsFieldValue,
|
|
109
|
+
scaleIndex,
|
|
110
|
+
showScorePointLabels,
|
|
111
|
+
secondaryBlockWidth,
|
|
112
|
+
setSecondaryBlockRef,
|
|
113
|
+
spellCheck,
|
|
114
|
+
uploadSoundSupport,
|
|
115
|
+
maxPointsEnabled,
|
|
116
|
+
mathMlOptions = {},
|
|
117
|
+
errors = {},
|
|
118
|
+
maxMaxPoints,
|
|
119
|
+
labelPluginProps = {},
|
|
120
|
+
imageSupport = {}
|
|
121
|
+
} = this.props;
|
|
122
|
+
const {
|
|
123
|
+
anchorEl
|
|
124
|
+
} = this.state;
|
|
125
|
+
return /*#__PURE__*/_react.default.createElement(GreyHeaderRow, {
|
|
126
|
+
height: showLevelTagInput ? _common.HeaderHeightLarge : _common.HeaderHeight
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(PrimaryBlockGreyHeader, null, showLevelTagInput && /*#__PURE__*/_react.default.createElement(_common.SimpleInput, {
|
|
128
|
+
markup: traitLabel || 'Trait',
|
|
129
|
+
onChange: onTraitLabelChange,
|
|
130
|
+
pluginProps: labelPluginProps,
|
|
131
|
+
spellCheck: spellCheck,
|
|
132
|
+
label: "Level Label",
|
|
133
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
134
|
+
mathMlOptions: mathMlOptions,
|
|
135
|
+
imageSupport: imageSupport
|
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_common.ScaleSettings, null, /*#__PURE__*/_react.default.createElement("div", null, "Scale ", scaleIndex + 1), maxPointsEnabled && /*#__PURE__*/_react.default.createElement(_common.MaxPointsPicker, {
|
|
137
|
+
maxPoints: maxPoints,
|
|
138
|
+
maxMaxPoints: maxMaxPoints,
|
|
139
|
+
onChange: updateMaxPointsFieldValue
|
|
140
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
141
|
+
"aria-label": "more",
|
|
142
|
+
"aria-controls": "long-menu",
|
|
143
|
+
"aria-haspopup": "true",
|
|
144
|
+
onClick: this.handleClick,
|
|
145
|
+
size: "large"
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement(_MoreVert.default, null)), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
147
|
+
id: "long-menu",
|
|
148
|
+
anchorEl: anchorEl,
|
|
149
|
+
keepMounted: true,
|
|
150
|
+
open: !!anchorEl,
|
|
151
|
+
onClose: this.handleClose,
|
|
152
|
+
transitionDuration: {
|
|
153
|
+
enter: 225,
|
|
154
|
+
exit: 195
|
|
155
|
+
}
|
|
156
|
+
}, ['Remove Scale'].map(option => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
157
|
+
key: option,
|
|
158
|
+
onClick: this.openMenu
|
|
159
|
+
}, option)))))), /*#__PURE__*/_react.default.createElement(_common.SecondaryBlock, {
|
|
160
|
+
setRef: ref => {
|
|
161
|
+
if (ref) {
|
|
162
|
+
this.secondaryBlock = ref;
|
|
163
|
+
setSecondaryBlockRef(ref);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
width: `${secondaryBlockWidth}px`
|
|
167
|
+
}, showStandards && /*#__PURE__*/_react.default.createElement(_common.Block, null, /*#__PURE__*/_react.default.createElement(Label, null, "Standard(s)")), showDescription && /*#__PURE__*/_react.default.createElement(_common.Block, null, /*#__PURE__*/_react.default.createElement(Label, null, "Description")), scorePointsValues.map((scorePointsValue, index) => {
|
|
168
|
+
const adjustedBlockWidth = _common.BlockWidth + 2 * 8; // 8 is padding
|
|
169
|
+
const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * index + currentPosition - 128;
|
|
170
|
+
const value = scorePointsValues.length - index - 1;
|
|
171
|
+
let scoreDescriptor;
|
|
172
|
+
let error;
|
|
173
|
+
try {
|
|
174
|
+
scoreDescriptor = scorePointsLabels[value] || '';
|
|
175
|
+
error = errors[value] || '';
|
|
176
|
+
} catch (e) {
|
|
177
|
+
scoreDescriptor = '';
|
|
178
|
+
}
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_common.Block, {
|
|
180
|
+
key: `secondary-block-part-${index}`
|
|
181
|
+
}, /*#__PURE__*/_react.default.createElement(_common.ScorePoint, {
|
|
182
|
+
scorePointsValue: scorePointsValue,
|
|
183
|
+
error: error,
|
|
184
|
+
scoreDescriptor: scoreDescriptor,
|
|
185
|
+
pluginProps: labelPluginProps,
|
|
186
|
+
showScorePointLabels: showScorePointLabels,
|
|
187
|
+
onChange: scorePointLabel => this.onScorePointLabelChange({
|
|
188
|
+
scorePointLabel,
|
|
189
|
+
value
|
|
190
|
+
}),
|
|
191
|
+
alignToRight: remainingSpace < 296 && scorePointsValue < maxPoints // 296 is the space required for the toolbar
|
|
192
|
+
,
|
|
193
|
+
spellCheck: spellCheck,
|
|
194
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
195
|
+
mathMlOptions: mathMlOptions,
|
|
196
|
+
imageSupport: imageSupport
|
|
197
|
+
}), error && /*#__PURE__*/_react.default.createElement(ScorePointErrorText, null, error));
|
|
198
|
+
})));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.TraitsHeaderTile = TraitsHeaderTile;
|
|
202
|
+
(0, _defineProperty2.default)(TraitsHeaderTile, "propTypes", {
|
|
203
|
+
maxPointsEnabled: _propTypes.default.bool,
|
|
204
|
+
spellCheck: _propTypes.default.bool,
|
|
205
|
+
errors: _propTypes.default.object
|
|
206
|
+
});
|
|
207
|
+
TraitsHeaderTile.propTypes = {
|
|
208
|
+
onTraitLabelChange: _propTypes.default.func,
|
|
209
|
+
onScaleChange: _propTypes.default.func,
|
|
210
|
+
scorePointsValues: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
211
|
+
scorePointsLabels: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
212
|
+
traitLabel: _propTypes.default.string,
|
|
213
|
+
showStandards: _propTypes.default.bool,
|
|
214
|
+
showLevelTagInput: _propTypes.default.bool,
|
|
215
|
+
showDescription: _propTypes.default.bool,
|
|
216
|
+
maxPoints: _propTypes.default.number,
|
|
217
|
+
updateMaxPointsFieldValue: _propTypes.default.func,
|
|
218
|
+
scaleIndex: _propTypes.default.number,
|
|
219
|
+
currentPosition: _propTypes.default.number,
|
|
220
|
+
secondaryBlockWidth: _propTypes.default.number,
|
|
221
|
+
showDeleteScaleModal: _propTypes.default.func,
|
|
222
|
+
showScorePointLabels: _propTypes.default.bool,
|
|
223
|
+
setSecondaryBlockRef: _propTypes.default.func,
|
|
224
|
+
uploadSoundSupport: _propTypes.default.object,
|
|
225
|
+
maxMaxPoints: _propTypes.default.number,
|
|
226
|
+
labelPluginProps: _propTypes.default.object,
|
|
227
|
+
imageSupport: _propTypes.default.shape({
|
|
228
|
+
add: _propTypes.default.func.isRequired,
|
|
229
|
+
delete: _propTypes.default.func.isRequired
|
|
230
|
+
})
|
|
231
|
+
};
|
|
232
|
+
var _default = exports.default = TraitsHeaderTile;
|
|
233
|
+
//# sourceMappingURL=traitsHeader.js.map
|
package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traitsHeader.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_IconButton","_Menu","_MenuItem","_MoreVert","_renderUi","_common","Label","styled","theme","width","border","padding","display","alignItems","justifyContent","GreyHeaderRow","height","background","color","secondaryBackground","borderRadius","position","marginBottom","spacing","PrimaryBlockGreyHeader","PrimaryBlockWidth","minWidth","boxSizing","paddingTop","alignSelf","ScorePointErrorText","fontSize","typography","palette","error","main","TraitsHeaderTile","React","Component","constructor","args","_defineProperty2","default","anchorEl","scorePointLabel","value","scorePointsLabels","onScaleChange","props","length","event","setState","currentTarget","secondaryBlock","scrollTo","left","showDeleteScaleModal","handleClose","UNSAFE_componentWillReceiveProps","nextProps","currentPosition","scrollToPosition","render","scorePointsValues","traitLabel","showStandards","onTraitLabelChange","showDescription","showLevelTagInput","maxPoints","updateMaxPointsFieldValue","scaleIndex","showScorePointLabels","secondaryBlockWidth","setSecondaryBlockRef","spellCheck","uploadSoundSupport","maxPointsEnabled","mathMlOptions","errors","maxMaxPoints","labelPluginProps","imageSupport","state","createElement","HeaderHeightLarge","HeaderHeight","SimpleInput","markup","onChange","pluginProps","label","ScaleSettings","MaxPointsPicker","onClick","handleClick","size","id","keepMounted","open","onClose","transitionDuration","enter","exit","map","option","key","openMenu","SecondaryBlock","setRef","ref","Block","scorePointsValue","index","adjustedBlockWidth","BlockWidth","remainingSpace","scoreDescriptor","e","ScorePoint","onScorePointLabelChange","alignToRight","exports","PropTypes","bool","object","propTypes","func","arrayOf","number","string","shape","add","isRequired","delete","_default"],"sources":["../src/traitsHeader.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { styled } from '@mui/material/styles';\nimport IconButton from '@mui/material/IconButton';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport { color } from '@pie-lib/render-ui';\n\nimport {\n Block,\n BlockWidth,\n PrimaryBlockWidth,\n SecondaryBlock,\n ScorePoint,\n MaxPointsPicker,\n SimpleInput,\n ScaleSettings,\n HeaderHeight,\n HeaderHeightLarge,\n} from './common';\n\nconst Label = styled('div')(({ theme }) => ({\n width: '140px',\n border: 'none',\n padding: '10px 0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-around',\n}));\n\nconst GreyHeaderRow = styled('div')(({ height, theme }) => ({\n background: color.secondaryBackground(),\n borderRadius: '4px',\n position: 'relative',\n marginBottom: theme.spacing(2),\n display: 'flex',\n height: height,\n}));\n\nconst PrimaryBlockGreyHeader = styled('div')(({ theme }) => ({\n width: `${PrimaryBlockWidth}px`,\n minWidth: `${PrimaryBlockWidth}px`,\n position: 'relative',\n padding: '0 10px',\n boxSizing: 'border-box',\n paddingTop: theme.spacing(1.5),\n alignSelf: 'center'\n}));\n\nconst ScorePointErrorText = styled('div')(({ theme }) => ({\n position: 'absolute',\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(0.5),\n}));\n\nexport class TraitsHeaderTile extends React.Component {\n static propTypes = {\n maxPointsEnabled: PropTypes.bool,\n spellCheck: PropTypes.bool,\n errors: PropTypes.object,\n };\n\n state = {\n anchorEl: null,\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.currentPosition !== this.props.currentPosition) {\n this.scrollToPosition(nextProps.currentPosition);\n }\n }\n\n onScorePointLabelChange = ({ scorePointLabel, value }) => {\n const { scorePointsLabels, onScaleChange } = this.props;\n\n if (value < 0 || value >= scorePointsLabels.length) return;\n\n scorePointsLabels[value] = scorePointLabel;\n\n onScaleChange({ scorePointsLabels });\n };\n\n handleClick = (event) => this.setState({ anchorEl: event.currentTarget });\n\n handleClose = () => this.setState({ anchorEl: null });\n\n scrollToPosition = (position) => this.secondaryBlock.scrollTo({ left: position });\n\n openMenu = () => {\n this.props.showDeleteScaleModal();\n this.handleClose();\n };\n\n render() {\n const {\n scorePointsValues,\n scorePointsLabels,\n traitLabel,\n currentPosition,\n showStandards,\n onTraitLabelChange,\n showDescription,\n showLevelTagInput,\n maxPoints,\n updateMaxPointsFieldValue,\n scaleIndex,\n showScorePointLabels,\n secondaryBlockWidth,\n setSecondaryBlockRef,\n spellCheck,\n uploadSoundSupport,\n maxPointsEnabled,\n mathMlOptions = {},\n errors = {},\n maxMaxPoints,\n labelPluginProps = {},\n imageSupport = {},\n } = this.props;\n const { anchorEl } = this.state;\n\n return (\n <GreyHeaderRow height={showLevelTagInput ? HeaderHeightLarge : HeaderHeight}>\n <PrimaryBlockGreyHeader>\n {showLevelTagInput && (\n <SimpleInput\n markup={traitLabel || 'Trait'}\n onChange={onTraitLabelChange}\n pluginProps={labelPluginProps}\n spellCheck={spellCheck}\n label=\"Level Label\"\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n )}\n\n <ScaleSettings>\n <div>Scale {scaleIndex + 1}</div>\n\n {maxPointsEnabled && (\n <MaxPointsPicker maxPoints={maxPoints} maxMaxPoints={maxMaxPoints} onChange={updateMaxPointsFieldValue} />\n )}\n\n <div>\n <IconButton\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-haspopup=\"true\"\n onClick={this.handleClick}\n size=\"large\">\n <MoreVertIcon />\n </IconButton>\n <Menu\n id=\"long-menu\"\n anchorEl={anchorEl}\n keepMounted\n open={!!anchorEl}\n onClose={this.handleClose}\n transitionDuration={{ enter: 225, exit: 195 }}\n >\n {['Remove Scale'].map((option) => (\n <MenuItem key={option} onClick={this.openMenu}>\n {option}\n </MenuItem>\n ))}\n </Menu>\n </div>\n </ScaleSettings>\n </PrimaryBlockGreyHeader>\n <SecondaryBlock\n setRef={(ref) => {\n if (ref) {\n this.secondaryBlock = ref;\n setSecondaryBlockRef(ref);\n }\n }}\n width={`${secondaryBlockWidth}px`}\n >\n {showStandards && (\n <Block>\n <Label>Standard(s)</Label>\n </Block>\n )}\n\n {showDescription && (\n <Block>\n <Label>Description</Label>\n </Block>\n )}\n\n {scorePointsValues.map((scorePointsValue, index) => {\n const adjustedBlockWidth = BlockWidth + 2 * 8; // 8 is padding\n const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * index + currentPosition - 128;\n const value = scorePointsValues.length - index - 1;\n let scoreDescriptor;\n let error;\n\n try {\n scoreDescriptor = scorePointsLabels[value] || '';\n error = errors[value] || '';\n } catch (e) {\n scoreDescriptor = '';\n }\n\n return (\n <Block key={`secondary-block-part-${index}`}>\n <ScorePoint\n scorePointsValue={scorePointsValue}\n error={error}\n scoreDescriptor={scoreDescriptor}\n pluginProps={labelPluginProps}\n showScorePointLabels={showScorePointLabels}\n onChange={(scorePointLabel) => this.onScorePointLabelChange({ scorePointLabel, value })}\n alignToRight={remainingSpace < 296 && scorePointsValue < maxPoints} // 296 is the space required for the toolbar\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n />\n {error && <ScorePointErrorText>{error}</ScorePointErrorText>}\n </Block>\n );\n })}\n </SecondaryBlock>\n </GreyHeaderRow>\n );\n }\n}\n\nTraitsHeaderTile.propTypes = {\n onTraitLabelChange: PropTypes.func,\n onScaleChange: PropTypes.func,\n scorePointsValues: PropTypes.arrayOf(PropTypes.number),\n scorePointsLabels: PropTypes.arrayOf(PropTypes.string),\n traitLabel: PropTypes.string,\n showStandards: PropTypes.bool,\n showLevelTagInput: PropTypes.bool,\n showDescription: PropTypes.bool,\n maxPoints: PropTypes.number,\n updateMaxPointsFieldValue: PropTypes.func,\n scaleIndex: PropTypes.number,\n currentPosition: PropTypes.number,\n secondaryBlockWidth: PropTypes.number,\n showDeleteScaleModal: PropTypes.func,\n showScorePointLabels: PropTypes.bool,\n setSecondaryBlockRef: PropTypes.func,\n uploadSoundSupport: PropTypes.object,\n maxMaxPoints: PropTypes.number,\n labelPluginProps: PropTypes.object,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes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