@pie-element/multi-trait-rubric 8.1.2-next.2 → 8.1.2

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.
Files changed (100) hide show
  1. package/CHANGELOG.json +1 -0
  2. package/CHANGELOG.md +1590 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +55 -0
  5. package/configure/CHANGELOG.json +1 -0
  6. package/configure/CHANGELOG.md +1485 -0
  7. package/configure/lib/common.js +424 -0
  8. package/configure/lib/common.js.map +1 -0
  9. package/configure/lib/defaults.js +184 -0
  10. package/configure/lib/defaults.js.map +1 -0
  11. package/configure/lib/index.js +157 -0
  12. package/configure/lib/index.js.map +1 -0
  13. package/configure/lib/main.js +454 -0
  14. package/configure/lib/main.js.map +1 -0
  15. package/configure/lib/modals.js +206 -0
  16. package/configure/lib/modals.js.map +1 -0
  17. package/configure/lib/scale.js +478 -0
  18. package/configure/lib/scale.js.map +1 -0
  19. package/configure/lib/trait.js +275 -0
  20. package/configure/lib/trait.js.map +1 -0
  21. package/configure/lib/traitsHeader.js +235 -0
  22. package/configure/lib/traitsHeader.js.map +1 -0
  23. package/configure/lib/utils.js +87 -0
  24. package/configure/lib/utils.js.map +1 -0
  25. package/configure/package.json +24 -0
  26. package/controller/CHANGELOG.json +1 -0
  27. package/controller/CHANGELOG.md +911 -0
  28. package/controller/lib/defaults.js +18 -0
  29. package/controller/lib/defaults.js.map +1 -0
  30. package/controller/lib/index.js +158 -0
  31. package/controller/lib/index.js.map +1 -0
  32. package/controller/lib/utils.js +11 -0
  33. package/controller/lib/utils.js.map +1 -0
  34. package/controller/package.json +14 -0
  35. package/docs/config-schema.json +1628 -0
  36. package/docs/config-schema.json.md +1202 -0
  37. package/docs/demo/config.js +8 -0
  38. package/docs/demo/generate.js +117 -0
  39. package/docs/demo/index.html +1 -0
  40. package/docs/demo/session.js +6 -0
  41. package/docs/pie-schema.json +861 -0
  42. package/docs/pie-schema.json.md +614 -0
  43. package/lib/index.js +54 -0
  44. package/lib/index.js.map +1 -0
  45. package/lib/main.js +123 -0
  46. package/lib/main.js.map +1 -0
  47. package/lib/scale.js +248 -0
  48. package/lib/scale.js.map +1 -0
  49. package/lib/trait.js +83 -0
  50. package/lib/trait.js.map +1 -0
  51. package/package.json +15 -84
  52. package/configure.js +0 -2
  53. package/controller.js +0 -1
  54. package/dist/author/common.d.ts +0 -90
  55. package/dist/author/common.js +0 -275
  56. package/dist/author/defaults.d.ts +0 -153
  57. package/dist/author/defaults.js +0 -113
  58. package/dist/author/index.d.ts +0 -22
  59. package/dist/author/index.js +0 -89
  60. package/dist/author/main.d.ts +0 -43
  61. package/dist/author/main.js +0 -247
  62. package/dist/author/modals.d.ts +0 -94
  63. package/dist/author/modals.js +0 -171
  64. package/dist/author/scale.d.ts +0 -46
  65. package/dist/author/scale.js +0 -280
  66. package/dist/author/trait.d.ts +0 -70
  67. package/dist/author/trait.js +0 -202
  68. package/dist/author/traitsHeader.d.ts +0 -28
  69. package/dist/author/traitsHeader.js +0 -172
  70. package/dist/author/utils.d.ts +0 -10
  71. package/dist/author/utils.js +0 -41
  72. package/dist/browser/Typography-CGQjcqGj.js +0 -9000
  73. package/dist/browser/Typography-CGQjcqGj.js.map +0 -1
  74. package/dist/browser/author/index.js +0 -41731
  75. package/dist/browser/author/index.js.map +0 -1
  76. package/dist/browser/controller/index.js +0 -70
  77. package/dist/browser/controller/index.js.map +0 -1
  78. package/dist/browser/delivery/index.js +0 -523
  79. package/dist/browser/delivery/index.js.map +0 -1
  80. package/dist/browser/multi-trait-rubric.css +0 -2
  81. package/dist/controller/defaults.d.ts +0 -20
  82. package/dist/controller/defaults.js +0 -14
  83. package/dist/controller/index.d.ts +0 -26
  84. package/dist/controller/index.js +0 -57
  85. package/dist/controller/utils.d.ts +0 -9
  86. package/dist/controller/utils.js +0 -4
  87. package/dist/delivery/index.d.ts +0 -17
  88. package/dist/delivery/index.js +0 -37
  89. package/dist/delivery/main.d.ts +0 -15
  90. package/dist/delivery/main.js +0 -95
  91. package/dist/delivery/scale.d.ts +0 -17
  92. package/dist/delivery/scale.js +0 -175
  93. package/dist/delivery/trait.d.ts +0 -27
  94. package/dist/delivery/trait.js +0 -44
  95. package/dist/index.d.ts +0 -1
  96. package/dist/index.iife.d.ts +0 -8
  97. package/dist/index.iife.js +0 -145
  98. package/dist/index.js +0 -2
  99. package/dist/runtime-support.d.ts +0 -12
  100. package/dist/runtime-support.js +0 -12
@@ -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 _lodashEs = require("lodash-es");
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
+ touchAction: 'none'
34
+ }));
35
+ const Controls = (0, _styles.styled)('div')({
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ width: '100%',
39
+ cursor: 'pointer'
40
+ });
41
+ const Options = (0, _styles.styled)(_IconButton.default)({
42
+ marginLeft: 'auto'
43
+ });
44
+ const RemoveLabel = (0, _styles.styled)('div')({
45
+ display: 'flex',
46
+ whiteSpace: 'break-spaces'
47
+ });
48
+ const ErrorText = (0, _styles.styled)('div')(({
49
+ theme
50
+ }) => ({
51
+ fontSize: theme.typography.fontSize - 2,
52
+ color: theme.palette.error.main,
53
+ paddingBottom: theme.spacing(1)
54
+ }));
55
+ function TraitTile({
56
+ error,
57
+ trait: {
58
+ name,
59
+ standards,
60
+ description,
61
+ scorePointsDescriptors
62
+ },
63
+ traitLabel,
64
+ scorePointsValues,
65
+ showStandards,
66
+ showDescription,
67
+ enableDragAndDrop,
68
+ currentPosition,
69
+ secondaryBlockWidth,
70
+ spellCheck,
71
+ maxPoints,
72
+ uploadSoundSupport,
73
+ mathMlOptions = {},
74
+ expandedPluginProps = {},
75
+ labelPluginProps = {},
76
+ imageSupport = {},
77
+ index,
78
+ onTraitChanged,
79
+ onTraitRemoved,
80
+ onTraitDropped
81
+ }) {
82
+ const [anchorEl, setAnchorEl] = _react.default.useState(null);
83
+ const secondaryBlockRef = _react.default.useRef(null);
84
+ const {
85
+ attributes,
86
+ listeners,
87
+ setNodeRef: setDragRef,
88
+ transform,
89
+ isDragging
90
+ } = (0, _core.useDraggable)({
91
+ id: `trait-${index}`,
92
+ data: {
93
+ type: 'trait',
94
+ index,
95
+ name
96
+ }
97
+ });
98
+ const {
99
+ setNodeRef: setDropRef
100
+ } = (0, _core.useDroppable)({
101
+ id: `trait-drop-${index}`,
102
+ data: {
103
+ type: 'trait',
104
+ index
105
+ }
106
+ });
107
+ _react.default.useLayoutEffect(() => {
108
+ if (currentPosition !== undefined && secondaryBlockRef.current) {
109
+ secondaryBlockRef.current.scrollTo({
110
+ left: currentPosition
111
+ });
112
+ }
113
+ }, [currentPosition]);
114
+ const onTraitChangedHandler = params => {
115
+ if ((0, _lodashEs.isEmpty)(params)) return;
116
+ const updatedTrait = {
117
+ ...{
118
+ name,
119
+ standards,
120
+ description,
121
+ scorePointsDescriptors
122
+ },
123
+ ...params
124
+ };
125
+ onTraitChanged(updatedTrait);
126
+ };
127
+ const onScorePointDescriptorChange = ({
128
+ descriptor,
129
+ value
130
+ }) => {
131
+ if (value < 0 || value >= scorePointsDescriptors.length) return;
132
+ const newDescriptors = [...scorePointsDescriptors];
133
+ newDescriptors[value] = descriptor;
134
+ onTraitChangedHandler({
135
+ scorePointsDescriptors: newDescriptors
136
+ });
137
+ };
138
+ const handleClick = event => setAnchorEl(event.currentTarget);
139
+ const handleClose = () => setAnchorEl(null);
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","_lodashEs","_core","_styles","_renderUi","_common","_IconButton","_MoreVert","_Menu","_MenuItem","_DragIndicator","log","debug","ActionsIcon","styled","DragIndicatorIcon","color","text","StyledPrimaryBlock","PrimaryBlock","theme","display","flexDirection","justifyContent","marginBottom","spacing","touchAction","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","useLayoutEffect","undefined","current","scrollTo","left","onTraitChangedHandler","params","isEmpty","updatedTrait","onScorePointDescriptorChange","descriptor","value","length","newDescriptors","handleClick","event","currentTarget","handleClose","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-es';\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 touchAction: 'none',\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 {\n attributes,\n listeners,\n setNodeRef: setDragRef,\n transform,\n isDragging,\n } = 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.useLayoutEffect(() => {\n if (\n currentPosition !== undefined &&\n secondaryBlockRef.current\n ) {\n secondaryBlockRef.current.scrollTo({ left: 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 openMenu = () => {\n onTraitRemoved();\n handleClose();\n };\n\n const dragStyle = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n opacity: isDragging ? 0.5 : 1,\n }\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 >\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 dangerouslySetInnerHTML={{ __html: `Remove ${name || traitLabel}` }} />\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 TraitTile;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAA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S,CAACM;EACzB,CAAC,CAAC;EACFvG,UAAU,EAAEiG,kBAAS,CAACM,MAAM;EAC5BtG,iBAAiB,EAAEgG,kBAAS,CAACO,OAAO,CAACP,kBAAS,CAACE,MAAM,CAAC;EACtDjG,aAAa,EAAE+F,kBAAS,CAACQ,IAAI;EAC7BtG,eAAe,EAAE8F,kBAAS,CAACQ,IAAI;EAC/BjG,SAAS,EAAEyF,kBAAS,CAACE,MAAM;EAC3B/F,iBAAiB,EAAE6F,kBAAS,CAACQ,IAAI;EACjCpG,eAAe,EAAE4F,kBAAS,CAACE,MAAM;EACjC7F,mBAAmB,EAAE2F,kBAAS,CAACE,MAAM;EACrC5F,UAAU,EAAE0F,kBAAS,CAACQ,IAAI;EAC1BhG,kBAAkB,EAAEwF,kBAAS,CAACC,MAAM;EACpCxF,aAAa,EAAEuF,kBAAS,CAACC,MAAM;EAC/BvF,mBAAmB,EAAEsF,kBAAS,CAACC,MAAM;EACrCtF,gBAAgB,EAAEqF,kBAAS,CAACC,MAAM;EAClCrF,YAAY,EAAEoF,kBAAS,CAACK,KAAK,CAAC;IAC5BI,GAAG,EAAET,kBAAS,CAACI,IAAI,CAACD,UAAU;IAC9BO,MAAM,EAAEV,kBAAS,CAACI,IAAI,CAACD;EACzB,CAAC;AACH,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEajE,SAAS","ignoreList":[]}
@@ -0,0 +1,235 @@
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
+ width: '140px',
20
+ border: 'none',
21
+ padding: '10px 0',
22
+ display: 'flex',
23
+ alignItems: 'center',
24
+ justifyContent: 'space-around'
25
+ });
26
+ const GreyHeaderRow = (0, _styles.styled)('div')(({
27
+ height,
28
+ theme
29
+ }) => ({
30
+ background: _renderUi.color.secondaryBackground(),
31
+ borderRadius: '4px',
32
+ position: 'relative',
33
+ marginBottom: theme.spacing(2),
34
+ display: 'flex',
35
+ height: height
36
+ }));
37
+ const PrimaryBlockGreyHeader = (0, _styles.styled)('div')(({
38
+ theme
39
+ }) => ({
40
+ width: `${_common.PrimaryBlockWidth}px`,
41
+ minWidth: `${_common.PrimaryBlockWidth}px`,
42
+ position: 'relative',
43
+ padding: '0 10px',
44
+ boxSizing: 'border-box',
45
+ paddingTop: theme.spacing(1.5),
46
+ alignSelf: 'center'
47
+ }));
48
+ const ScorePointErrorText = (0, _styles.styled)('div')(({
49
+ theme
50
+ }) => ({
51
+ position: 'absolute',
52
+ fontSize: theme.typography.fontSize - 2,
53
+ color: theme.palette.error.main,
54
+ paddingTop: theme.spacing(0.5)
55
+ }));
56
+ class TraitsHeaderTile extends _react.default.Component {
57
+ constructor(...args) {
58
+ super(...args);
59
+ (0, _defineProperty2.default)(this, "state", {
60
+ anchorEl: null
61
+ });
62
+ (0, _defineProperty2.default)(this, "onScorePointLabelChange", ({
63
+ scorePointLabel,
64
+ value
65
+ }) => {
66
+ const {
67
+ scorePointsLabels,
68
+ onScaleChange
69
+ } = this.props;
70
+ if (value < 0 || value >= scorePointsLabels.length) return;
71
+ scorePointsLabels[value] = scorePointLabel;
72
+ onScaleChange({
73
+ scorePointsLabels
74
+ });
75
+ });
76
+ (0, _defineProperty2.default)(this, "handleClick", event => this.setState({
77
+ anchorEl: event.currentTarget
78
+ }));
79
+ (0, _defineProperty2.default)(this, "handleClose", () => this.setState({
80
+ anchorEl: null
81
+ }));
82
+ (0, _defineProperty2.default)(this, "scrollToPosition", position => {
83
+ if (this.secondaryBlock) {
84
+ this.secondaryBlock.scrollTo({
85
+ left: position
86
+ });
87
+ }
88
+ });
89
+ (0, _defineProperty2.default)(this, "openMenu", () => {
90
+ this.props.showDeleteScaleModal();
91
+ this.handleClose();
92
+ });
93
+ }
94
+ UNSAFE_componentWillReceiveProps(nextProps) {
95
+ if (nextProps.currentPosition !== this.props.currentPosition) {
96
+ this.scrollToPosition(nextProps.currentPosition);
97
+ }
98
+ }
99
+ render() {
100
+ const {
101
+ scorePointsValues,
102
+ scorePointsLabels,
103
+ traitLabel,
104
+ currentPosition,
105
+ showStandards,
106
+ onTraitLabelChange,
107
+ showDescription,
108
+ showLevelTagInput,
109
+ maxPoints,
110
+ updateMaxPointsFieldValue,
111
+ scaleIndex,
112
+ showScorePointLabels,
113
+ secondaryBlockWidth,
114
+ setSecondaryBlockRef,
115
+ spellCheck,
116
+ uploadSoundSupport,
117
+ maxPointsEnabled,
118
+ mathMlOptions = {},
119
+ errors = {},
120
+ maxMaxPoints,
121
+ labelPluginProps = {},
122
+ imageSupport = {}
123
+ } = this.props;
124
+ const {
125
+ anchorEl
126
+ } = this.state;
127
+ return /*#__PURE__*/_react.default.createElement(GreyHeaderRow, {
128
+ height: showLevelTagInput ? _common.HeaderHeightLarge : _common.HeaderHeight
129
+ }, /*#__PURE__*/_react.default.createElement(PrimaryBlockGreyHeader, null, showLevelTagInput && /*#__PURE__*/_react.default.createElement(_common.SimpleInput, {
130
+ markup: traitLabel || 'Trait',
131
+ onChange: onTraitLabelChange,
132
+ pluginProps: labelPluginProps,
133
+ spellCheck: spellCheck,
134
+ label: "Level Label",
135
+ uploadSoundSupport: uploadSoundSupport,
136
+ mathMlOptions: mathMlOptions,
137
+ imageSupport: imageSupport
138
+ }), /*#__PURE__*/_react.default.createElement(_common.ScaleSettings, null, /*#__PURE__*/_react.default.createElement("div", null, "Scale ", scaleIndex + 1), maxPointsEnabled && /*#__PURE__*/_react.default.createElement(_common.MaxPointsPicker, {
139
+ maxPoints: maxPoints,
140
+ maxMaxPoints: maxMaxPoints,
141
+ onChange: updateMaxPointsFieldValue
142
+ }), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
143
+ "aria-label": "more",
144
+ "aria-controls": "long-menu",
145
+ "aria-haspopup": "true",
146
+ onClick: this.handleClick,
147
+ size: "large"
148
+ }, /*#__PURE__*/_react.default.createElement(_MoreVert.default, null)), /*#__PURE__*/_react.default.createElement(_Menu.default, {
149
+ id: "long-menu",
150
+ anchorEl: anchorEl,
151
+ keepMounted: true,
152
+ open: !!anchorEl,
153
+ onClose: this.handleClose,
154
+ transitionDuration: {
155
+ enter: 225,
156
+ exit: 195
157
+ }
158
+ }, ['Remove Scale'].map(option => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
159
+ key: option,
160
+ onClick: this.openMenu
161
+ }, option)))))), /*#__PURE__*/_react.default.createElement(_common.SecondaryBlock, {
162
+ setRef: ref => {
163
+ if (ref) {
164
+ this.secondaryBlock = ref;
165
+ setSecondaryBlockRef(ref);
166
+ }
167
+ },
168
+ width: `${secondaryBlockWidth}px`
169
+ }, 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) => {
170
+ const adjustedBlockWidth = _common.BlockWidth + 2 * 8; // 8 is padding
171
+ const remainingSpace = secondaryBlockWidth - adjustedBlockWidth * index + currentPosition - 128;
172
+ const value = scorePointsValues.length - index - 1;
173
+ let scoreDescriptor;
174
+ let error;
175
+ try {
176
+ scoreDescriptor = scorePointsLabels[value] || '';
177
+ error = errors[value] || '';
178
+ } catch (e) {
179
+ scoreDescriptor = '';
180
+ }
181
+ return /*#__PURE__*/_react.default.createElement(_common.Block, {
182
+ key: `secondary-block-part-${index}`
183
+ }, /*#__PURE__*/_react.default.createElement(_common.ScorePoint, {
184
+ scorePointsValue: scorePointsValue,
185
+ error: error,
186
+ scoreDescriptor: scoreDescriptor,
187
+ pluginProps: labelPluginProps,
188
+ showScorePointLabels: showScorePointLabels,
189
+ onChange: scorePointLabel => this.onScorePointLabelChange({
190
+ scorePointLabel,
191
+ value
192
+ }),
193
+ alignToRight: remainingSpace < 296 && scorePointsValue < maxPoints // 296 is the space required for the toolbar
194
+ ,
195
+ spellCheck: spellCheck,
196
+ uploadSoundSupport: uploadSoundSupport,
197
+ mathMlOptions: mathMlOptions,
198
+ imageSupport: imageSupport
199
+ }), error && /*#__PURE__*/_react.default.createElement(ScorePointErrorText, null, error));
200
+ })));
201
+ }
202
+ }
203
+ exports.TraitsHeaderTile = TraitsHeaderTile;
204
+ (0, _defineProperty2.default)(TraitsHeaderTile, "propTypes", {
205
+ maxPointsEnabled: _propTypes.default.bool,
206
+ spellCheck: _propTypes.default.bool,
207
+ errors: _propTypes.default.object
208
+ });
209
+ TraitsHeaderTile.propTypes = {
210
+ onTraitLabelChange: _propTypes.default.func,
211
+ onScaleChange: _propTypes.default.func,
212
+ scorePointsValues: _propTypes.default.arrayOf(_propTypes.default.number),
213
+ scorePointsLabels: _propTypes.default.arrayOf(_propTypes.default.string),
214
+ traitLabel: _propTypes.default.string,
215
+ showStandards: _propTypes.default.bool,
216
+ showLevelTagInput: _propTypes.default.bool,
217
+ showDescription: _propTypes.default.bool,
218
+ maxPoints: _propTypes.default.number,
219
+ updateMaxPointsFieldValue: _propTypes.default.func,
220
+ scaleIndex: _propTypes.default.number,
221
+ currentPosition: _propTypes.default.number,
222
+ secondaryBlockWidth: _propTypes.default.number,
223
+ showDeleteScaleModal: _propTypes.default.func,
224
+ showScorePointLabels: _propTypes.default.bool,
225
+ setSecondaryBlockRef: _propTypes.default.func,
226
+ uploadSoundSupport: _propTypes.default.object,
227
+ maxMaxPoints: _propTypes.default.number,
228
+ labelPluginProps: _propTypes.default.object,
229
+ imageSupport: _propTypes.default.shape({
230
+ add: _propTypes.default.func.isRequired,
231
+ delete: _propTypes.default.func.isRequired
232
+ })
233
+ };
234
+ var _default = exports.default = TraitsHeaderTile;
235
+ //# sourceMappingURL=traitsHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traitsHeader.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_IconButton","_Menu","_MenuItem","_MoreVert","_renderUi","_common","Label","styled","width","border","padding","display","alignItems","justifyContent","GreyHeaderRow","height","theme","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')({\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) => {\n if (this.secondaryBlock) {\n this.secondaryBlock.scrollTo({ left: position });\n }\n };\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.func.isRequired,\n }),\n};\n\nexport default TraitsHeaderTile;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAEA,IAAAQ,OAAA,GAAAR,OAAA;AAaA,MAAMS,KAAK,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC;EAC1BC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAE,QAAQ;EACjBC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,QAAQ;EACpBC,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,MAAMC,aAAa,GAAG,IAAAP,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEQ,MAAM;EAAEC;AAAM,CAAC,MAAM;EAC1DC,UAAU,EAAEC,eAAK,CAACC,mBAAmB,CAAC,CAAC;EACvCC,YAAY,EAAE,KAAK;EACnBC,QAAQ,EAAE,UAAU;EACpBC,YAAY,EAAEN,KAAK,CAACO,OAAO,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