@pie-element/multi-trait-rubric 7.0.0-next.42 → 7.1.0-next.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 +3 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +4 -6
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/trait.js +2 -2
- package/configure/lib/trait.js.map +1 -1
- package/configure/package.json +8 -8
- package/controller/package.json +2 -2
- package/package.json +10 -7
- package/module/configure.js +0 -1
- package/module/controller.js +0 -142
- package/module/demo.js +0 -142
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -180
- package/module/print.html +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["model","addScaleEnabled","description","excludeZero","halfScoring","maxPointsEnabled","pointLabels","scales","standards","visibleToStudent","configuration","baseInputConfiguration","
|
|
1
|
+
{"version":3,"file":"defaults.js","names":["model","addScaleEnabled","description","excludeZero","halfScoring","maxPointsEnabled","pointLabels","scales","standards","visibleToStudent","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","expandedInput","inputConfiguration","math","labelInput","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","settingsPanelDisabled","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","showStandards","showLevelTagInput","dragAndDrop","showMaxPoint","addScale","minNoOfTraits","maxNoOfTraits","minNoOfScales","maxNoOfScales","defaultTraitLabel","mathMlOptions","mmlOutput","mmlEditing","maxMaxPoints"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n addScaleEnabled: true,\n description: false,\n excludeZero: false,\n halfScoring: false,\n maxPointsEnabled: true,\n pointLabels: true,\n scales: [],\n standards: false,\n visibleToStudent: true,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n expandedInput: {\n inputConfiguration: {\n math: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n labelInput: {\n inputConfiguration: {\n math: { disabled: true },\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: true },\n },\n },\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n text: `<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>`,\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n text: `<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>`,\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?',\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n text: ` You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted.`,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n // commenting this in order to use the dynamic width if the width was not set by the client (PD-3203)\n // width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false,\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n },\n showMaxPoint: {\n settings: true,\n label: 'Show Max Points Dropdown',\n },\n addScale: {\n settings: true,\n label: 'Add Scale Available',\n },\n minNoOfTraits: 1,\n maxNoOfTraits: 10,\n minNoOfScales: 1,\n maxNoOfScales: 10,\n defaultTraitLabel: 'Trait',\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n maxMaxPoints: 10,\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,eAAe,EAAE,IAAI;IACrBC,WAAW,EAAE,KAAK;IAClBC,WAAW,EAAE,KAAK;IAClBC,WAAW,EAAE,KAAK;IAClBC,gBAAgB,EAAE,IAAI;IACtBC,WAAW,EAAE,IAAI;IACjBC,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE,KAAK;IAChBC,gBAAgB,EAAE;EACpB,CAAC;EACDC,aAAa,EAAE;IACbC,sBAAsB,EAAE;MACtBC,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAED,QAAQ,EAAE;MAAM,CAAC;MAC1BE,KAAK,EAAE;QAAEF,QAAQ,EAAE;MAAM,CAAC;MAC1BG,KAAK,EAAE;QAAEH,QAAQ,EAAE;MAAM,CAAC;MAC1BI,SAAS,EAAE;QAAEJ,QAAQ,EAAE;MAAK,CAAC;MAC7BK,cAAc,EAAE;QAAEL,QAAQ,EAAE;MAAM,CAAC;MACnCM,kBAAkB,EAAE;QAAEN,QAAQ,EAAE;MAAK;IACvC,CAAC;IACDO,aAAa,EAAE;MACbC,kBAAkB,EAAE;QAClBC,IAAI,EAAE;UAAET,QAAQ,EAAE;QAAK,CAAC;QACxBC,KAAK,EAAE;UAAED,QAAQ,EAA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,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDO,eAAe,EAAE;MACfN,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACD;IACA;IACA;IACAQ,aAAa,EAAE;MACbP,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE;IACT,CAAC;IACDS,iBAAiB,EAAE;MACjBR,QAAQ,EAAE,KAAK;MACfD,KAAK,EAAE,sBAAsB;MAC7BE,OAAO,EAAE;IACX,CAAC;IACDQ,WAAW,EAAE;MACXT,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE,sBAAsB;MAC7BE,OAAO,EAAE;IACX,CAAC;IACDS,YAAY,EAAE;MACZV,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDY,QAAQ,EAAE;MACRX,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAE;IACT,CAAC;IACDa,aAAa,EAAE,CAAC;IAChBC,aAAa,EAAE,EAAE;IACjBC,aAAa,EAAE,CAAC;IAChBC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,OAAO;IAC1BC,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;EAChB;AACF,CAAC","ignoreList":[]}
|
package/configure/lib/main.js
CHANGED
|
@@ -9,9 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var
|
|
13
|
-
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
14
|
-
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
12
|
+
var _lodashEs = require("lodash-es");
|
|
15
13
|
var _styles = require("@mui/material/styles");
|
|
16
14
|
var _configUi = require("@pie-lib/config-ui");
|
|
17
15
|
var _scale = _interopRequireDefault(require("./scale"));
|
|
@@ -71,7 +69,7 @@ class Main extends _react.default.Component {
|
|
|
71
69
|
adjustedWidth: MIN_WIDTH,
|
|
72
70
|
initialUpdateCompleted: false // flag to track the initial update of the div width
|
|
73
71
|
});
|
|
74
|
-
(0, _defineProperty2.default)(this, "updateDivWidthDebounced", (0,
|
|
72
|
+
(0, _defineProperty2.default)(this, "updateDivWidthDebounced", (0, _lodashEs.debounce)(() => this.updateDivWidth(), 50));
|
|
75
73
|
(0, _defineProperty2.default)(this, "onScaleAdded", () => {
|
|
76
74
|
const {
|
|
77
75
|
model,
|
|
@@ -117,8 +115,8 @@ class Main extends _react.default.Component {
|
|
|
117
115
|
model,
|
|
118
116
|
onModelChanged
|
|
119
117
|
} = this.props;
|
|
120
|
-
let scales = (0,
|
|
121
|
-
if (scaleIndex < 0 || scaleIndex >= scales.length || (0,
|
|
118
|
+
let scales = (0, _lodashEs.cloneDeep)((model || {}).scales);
|
|
119
|
+
if (scaleIndex < 0 || scaleIndex >= scales.length || (0, _lodashEs.isEmpty)(params)) return false;
|
|
122
120
|
Object.keys(params).forEach(key => {
|
|
123
121
|
scales[scaleIndex][key] = params[key];
|
|
124
122
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_propTypes","_cloneDeep","_isEmpty","_debounce","_styles","_configUi","_scale","_common","_modals","_utils","Panel","toggle","settings","MIN_WIDTH","StyledDiv","styled","theme","fontFamily","fontSize","typography","padding","ShowModal","showExcludeZeroDialog","excludeZero","changeExcludeZero","cancel","default","createElement","ExcludeZeroDialog","open","IncludeZeroDialog","propTypes","PropTypes","bool","func","Main","React","Component","constructor","props","_defineProperty2","showDecreaseMaxPointsDialog","showDeleteScaleDialog","showDeleteTraitDialog","showInfoDialog","infoDialogText","adjustedWidth","initialUpdateCompleted","debounce","updateDivWidth","model","onModelChanged","configuration","scales","maxNoOfScales","defaultTraitLabel","length","traitLabel","set","push","maxPoints","scorePointsLabels","traits","scaleIndex","params","cloneDeep","isEmpty","Object","keys","forEach","key","addOrRemoveScaleColumn","excludeZeroTypes","add0","minNoOfScales","slice","halfScoring","visibleToStudent","newState","setState","pointLabels","description","standards","excludeZeroType","newScales","hideToggleExcludeZeroModal","updatedModel","updatedProperty","showToggleExcludeZeroModal","divRef","createRef","bind","componentDidMount","window","addEventListener","updateDivWidthDebounced","setTimeout","componentWillUnmount","removeEventListener","componentDidUpdate","state","current","divWidth","offsetWidth","render","onConfigurationChanged","uploadSoundSupport","imageSupport","addScale","baseInputConfiguration","dragAndDrop","contentDimensions","showDescription","showExcludeZero","showLevelTagInput","showStandards","showHalfScoring","showMaxPoint","showScorePointLabels","showVisibleToStudent","spellCheck","settingsPanelDisabled","maxNoOfTraits","minNoOfTraits","width","mathMlOptions","maxMaxPoints","expandedInput","labelInput","errors","extraCSSRules","spellCheckEnabled","maxPointsEnabled","addScaleEnabled","disabledExcludeZero","some","scale","panelSettings","label","panelProperties","getPluginProps","assign","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","Settings","Properties","modal","style","ref","map","_extends2","onScaleRemoved","onScaleChanged","enabled","enableDragAndDrop","expandedPluginProps","inputConfiguration","labelPluginProps","MultiTraitButton","onClick","onScaleAdded","InfoDialog","text","onClose","exports","object","shape","add","isRequired","delete","_default"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport isEmpty from 'lodash/isEmpty';\nimport debounce from 'lodash/debounce';\n\nimport { styled } from '@mui/material/styles';\n\nimport { layout, settings } from '@pie-lib/config-ui';\n\nimport Scale from './scale';\nimport { MultiTraitButton } from './common';\nimport { ExcludeZeroDialog, excludeZeroTypes, IncludeZeroDialog, InfoDialog } from './modals';\nimport { addOrRemoveScaleColumn } from './utils';\n\nconst { Panel, toggle } = settings;\nconst MIN_WIDTH = '650px';\n\nconst StyledDiv = styled('div')(({ theme }) => ({\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n padding: '16px 0'\n}));\n\nconst ShowModal = ({ showExcludeZeroDialog, excludeZero, changeExcludeZero, cancel }) => {\n if (showExcludeZeroDialog && !excludeZero) {\n return (\n <ExcludeZeroDialog\n open={showExcludeZeroDialog && !excludeZero}\n changeExcludeZero={changeExcludeZero}\n cancel={cancel}\n />\n );\n } else if (showExcludeZeroDialog && excludeZero) {\n return (\n <IncludeZeroDialog\n open={showExcludeZeroDialog && excludeZero}\n changeExcludeZero={changeExcludeZero}\n cancel={cancel}\n />\n );\n } else {\n return null;\n }\n};\n\nShowModal.propTypes = {\n showExcludeZeroDialog: PropTypes.bool,\n excludeZero: PropTypes.bool,\n changeExcludeZero: PropTypes.func,\n cancel: PropTypes.func,\n};\n\nexport class Main extends React.Component {\n constructor(props) {\n super(props);\n this.divRef = React.createRef();\n this.updateDivWidth = this.updateDivWidth.bind(this);\n }\n\n state = {\n showDecreaseMaxPointsDialog: false,\n showDeleteScaleDialog: false,\n showDeleteTraitDialog: false,\n showExcludeZeroDialog: false,\n showInfoDialog: false,\n infoDialogText: '',\n adjustedWidth: MIN_WIDTH,\n initialUpdateCompleted: false, // flag to track the initial update of the div width\n };\n\n componentDidMount() {\n window.addEventListener('resize', this.updateDivWidthDebounced);\n window.addEventListener('load', this.updateDivWidth);\n\n // delay updateDivWidth to avoid having this.divRef.current = null at first load\n setTimeout(this.updateDivWidth, 0);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.updateDivWidthDebounced);\n window.removeEventListener('load', this.updateDivWidth);\n }\n\n componentDidUpdate() {\n if (!this.state.initialUpdateCompleted) {\n this.updateDivWidth();\n this.setState({ initialUpdateCompleted: true });\n }\n }\n\n updateDivWidth() {\n if (this.divRef && this.divRef.current) {\n const divWidth = this.divRef.current.offsetWidth;\n if (divWidth !== this.state.adjustedWidth) {\n this.set({\n adjustedWidth: divWidth,\n });\n }\n }\n }\n\n updateDivWidthDebounced = debounce(() => this.updateDivWidth(), 50);\n\n onScaleAdded = () => {\n const { model, onModelChanged, configuration } = this.props;\n let { scales, excludeZero } = model || {};\n const { maxNoOfScales } = configuration || {};\n let { defaultTraitLabel } = configuration || '';\n\n if (!scales.length) {\n scales = [];\n }\n\n // if no default trait label is defined, take the trait label of the first scale\n defaultTraitLabel = typeof defaultTraitLabel === 'string' ? defaultTraitLabel : scales[0]?.traitLabel || '';\n\n if (scales.length === maxNoOfScales) {\n this.set({\n infoDialogText: `There can't be more than ${maxNoOfScales} scales.`,\n showInfoDialog: true,\n });\n\n return false;\n }\n\n scales.push({\n maxPoints: 1,\n scorePointsLabels: excludeZero ? [''] : ['', ''],\n traitLabel: defaultTraitLabel,\n traits: [],\n });\n\n onModelChanged({ ...model, scales });\n };\n\n onScaleChanged = (scaleIndex, params) => {\n const { model, onModelChanged } = this.props;\n let scales = cloneDeep((model || {}).scales);\n\n if (scaleIndex < 0 || scaleIndex >= scales.length || isEmpty(params)) return false;\n\n Object.keys(params).forEach((key) => {\n scales[scaleIndex][key] = params[key];\n });\n\n if (model.excludeZero && params.maxPoints === 1) {\n // excludeZero should be false and disabled when maxPoints is 1 for any scale\n model.excludeZero = false;\n scales = addOrRemoveScaleColumn(scales, excludeZeroTypes.add0);\n }\n\n onModelChanged({ ...model, scales });\n };\n\n onScaleRemoved = (scaleIndex) => {\n const { model, onModelChanged, configuration } = this.props;\n let { scales } = model || {};\n const { minNoOfScales } = configuration || {};\n\n if (scaleIndex < 0 || scaleIndex >= scales.length) return false;\n\n if (scales.length === minNoOfScales) {\n this.set({\n infoDialogText: `There can't be less than ${minNoOfScales} scales.`,\n showInfoDialog: true,\n });\n\n return false;\n }\n\n scales = [...scales.slice(0, scaleIndex), ...scales.slice(scaleIndex + 1)];\n\n onModelChanged({ ...model, scales });\n };\n\n onHalfScoringChanged = () => {\n const { model, onModelChanged } = this.props;\n let { halfScoring } = model || {};\n\n onModelChanged({ ...model, halfScoring: !halfScoring });\n };\n\n onVisibleToStudentChanged = () => {\n const { model, onModelChanged } = this.props;\n let { visibleToStudent } = model || {};\n\n onModelChanged({ ...model, visibleToStudent: !visibleToStudent });\n };\n\n set = (newState) => this.setState(newState);\n\n changeShowScorePointLabels = () => {\n const { model, onModelChanged } = this.props || {};\n let { pointLabels } = model || {};\n\n pointLabels = !pointLabels;\n\n onModelChanged({ ...model, pointLabels });\n };\n\n changeShowDescription = () => {\n const { model, onModelChanged } = this.props || {};\n let { description } = model || {};\n\n description = !description;\n\n onModelChanged({ ...model, description });\n };\n\n changeShowStandards = () => {\n const { model, onModelChanged } = this.props || {};\n let { standards } = model || {};\n\n standards = !standards;\n\n onModelChanged({ ...model, standards });\n };\n\n // Exclude Zero\n showToggleExcludeZeroModal = () => this.set({ showExcludeZeroDialog: true });\n\n hideToggleExcludeZeroModal = () => {\n this.set({ showExcludeZeroDialog: false });\n };\n\n onCloseInfoDialog = () => this.set({ showInfoDialog: false });\n\n changeExcludeZero = (excludeZeroType) => {\n const { model, onModelChanged } = this.props || {};\n const { scales } = model || {};\n let { excludeZero } = model || {};\n\n if (!scales || !scales.length) return;\n\n excludeZero = !excludeZero;\n const newScales = addOrRemoveScaleColumn(scales, excludeZeroType);\n\n onModelChanged({ ...model, scales: newScales, excludeZero });\n\n this.hideToggleExcludeZeroModal();\n };\n\n onModelChanged = (updatedModel, updatedProperty) => {\n const { onModelChanged } = this.props || {};\n\n if (updatedProperty === 'excludeZero') {\n this.showToggleExcludeZeroModal();\n } else {\n onModelChanged(updatedModel);\n }\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, uploadSoundSupport, imageSupport } = this.props || {};\n const {\n addScale,\n baseInputConfiguration = {},\n dragAndDrop,\n contentDimensions = {},\n showDescription,\n showExcludeZero,\n showLevelTagInput,\n showStandards,\n showHalfScoring,\n showMaxPoint,\n showScorePointLabels,\n showVisibleToStudent,\n spellCheck = {},\n settingsPanelDisabled,\n maxNoOfTraits,\n minNoOfTraits,\n width,\n mathMlOptions = {},\n maxMaxPoints,\n expandedInput = {},\n labelInput = {},\n } = configuration || {};\n const {\n errors,\n extraCSSRules,\n scales,\n excludeZero,\n description,\n pointLabels,\n standards,\n spellCheckEnabled,\n maxPointsEnabled,\n addScaleEnabled,\n } = model || {};\n const { showExcludeZeroDialog, showInfoDialog, infoDialogText, adjustedWidth } = this.state || {};\n\n // excludeZero should be false and disabled when maxPoints is 1 for any scale\n const disabledExcludeZero = scales?.some((scale) => scale.maxPoints === 1);\n\n const panelSettings = {\n standards: showStandards.settings && toggle(showStandards.label),\n 'showLevelTagInput.enabled': showLevelTagInput.settings && toggle(showLevelTagInput.label, true),\n visibleToStudent: showVisibleToStudent.settings && toggle(showVisibleToStudent.label),\n excludeZero: showExcludeZero.settings && toggle(showExcludeZero.label, false, disabledExcludeZero),\n halfScoring: showHalfScoring.settings && toggle(showHalfScoring.label),\n 'dragAndDrop.enabled': dragAndDrop.settings && toggle(dragAndDrop.label, true),\n };\n const panelProperties = {\n description: showDescription.settings && toggle(showDescription.label),\n pointLabels: showScorePointLabels.settings && toggle(showScorePointLabels.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n addScaleEnabled: addScale.settings && toggle(addScale.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <ShowModal\n showExcludeZeroDialog={showExcludeZeroDialog}\n excludeZero={excludeZero}\n changeExcludeZero={this.changeExcludeZero}\n cancel={this.hideToggleExcludeZeroModal}\n ></ShowModal>\n }\n />\n }\n >\n <div style={{ width: '100%' }} ref={this.divRef} />\n <StyledDiv style={{ width: width || adjustedWidth }}>\n {(scales || []).map((scale, scaleIndex) => (\n <Scale\n key={`scale-${scaleIndex}`}\n scale={scale}\n scaleIndex={scaleIndex}\n errors={errors}\n onScaleRemoved={this.onScaleRemoved}\n onScaleChanged={this.onScaleChanged}\n showStandards={standards}\n showScorePointLabels={pointLabels}\n showDescription={description}\n showLevelTagInput={showLevelTagInput.enabled}\n excludeZero={excludeZero}\n enableDragAndDrop={dragAndDrop.enabled}\n spellCheck={spellCheckEnabled}\n width={adjustedWidth}\n uploadSoundSupport={uploadSoundSupport}\n maxPointsEnabled={maxPointsEnabled}\n maxNoOfTraits={maxNoOfTraits}\n minNoOfTraits={minNoOfTraits}\n imageSupport={imageSupport}\n {...this.props}\n mathMlOptions={mathMlOptions}\n maxMaxPoints={maxMaxPoints}\n expandedPluginProps={getPluginProps(expandedInput?.inputConfiguration)}\n labelPluginProps={getPluginProps(labelInput?.inputConfiguration)}\n />\n ))}\n {addScaleEnabled && <MultiTraitButton onClick={this.onScaleAdded}>Add Scale</MultiTraitButton>}\n </StyledDiv>\n\n <InfoDialog open={showInfoDialog} text={infoDialogText} onClose={() => this.set({ showInfoDialog: false })} />\n </layout.ConfigLayout>\n );\n }\n}\n\nMain.propTypes = {\n model: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n configuration: PropTypes.object,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default Main;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,SAAA,GAAAL,s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,CAAC2I,UAAU;IAC9BC,MAAM,EAAE9I,kBAAS,CAACE,IAAI,CAAC2I;EACzB,CAAC;AACH,CAAC;AAAC,IAAAE,QAAA,GAAAN,OAAA,CAAA/I,OAAA,GAEaS,IAAI","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_propTypes","_lodashEs","_styles","_configUi","_scale","_common","_modals","_utils","Panel","toggle","settings","MIN_WIDTH","StyledDiv","styled","theme","fontFamily","fontSize","typography","padding","ShowModal","showExcludeZeroDialog","excludeZero","changeExcludeZero","cancel","default","createElement","ExcludeZeroDialog","open","IncludeZeroDialog","propTypes","PropTypes","bool","func","Main","React","Component","constructor","props","_defineProperty2","showDecreaseMaxPointsDialog","showDeleteScaleDialog","showDeleteTraitDialog","showInfoDialog","infoDialogText","adjustedWidth","initialUpdateCompleted","debounce","updateDivWidth","model","onModelChanged","configuration","scales","maxNoOfScales","defaultTraitLabel","length","traitLabel","set","push","maxPoints","scorePointsLabels","traits","scaleIndex","params","cloneDeep","isEmpty","Object","keys","forEach","key","addOrRemoveScaleColumn","excludeZeroTypes","add0","minNoOfScales","slice","halfScoring","visibleToStudent","newState","setState","pointLabels","description","standards","excludeZeroType","newScales","hideToggleExcludeZeroModal","updatedModel","updatedProperty","showToggleExcludeZeroModal","divRef","createRef","bind","componentDidMount","window","addEventListener","updateDivWidthDebounced","setTimeout","componentWillUnmount","removeEventListener","componentDidUpdate","state","current","divWidth","offsetWidth","render","onConfigurationChanged","uploadSoundSupport","imageSupport","addScale","baseInputConfiguration","dragAndDrop","contentDimensions","showDescription","showExcludeZero","showLevelTagInput","showStandards","showHalfScoring","showMaxPoint","showScorePointLabels","showVisibleToStudent","spellCheck","settingsPanelDisabled","maxNoOfTraits","minNoOfTraits","width","mathMlOptions","maxMaxPoints","expandedInput","labelInput","errors","extraCSSRules","spellCheckEnabled","maxPointsEnabled","addScaleEnabled","disabledExcludeZero","some","scale","panelSettings","label","panelProperties","getPluginProps","assign","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","Settings","Properties","modal","style","ref","map","_extends2","onScaleRemoved","onScaleChanged","enabled","enableDragAndDrop","expandedPluginProps","inputConfiguration","labelPluginProps","MultiTraitButton","onClick","onScaleAdded","InfoDialog","text","onClose","exports","object","shape","add","isRequired","delete","_default"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { cloneDeep, debounce, isEmpty } from 'lodash-es';\n\nimport { styled } from '@mui/material/styles';\n\nimport { layout, settings } from '@pie-lib/config-ui';\n\nimport Scale from './scale';\nimport { MultiTraitButton } from './common';\nimport { ExcludeZeroDialog, excludeZeroTypes, IncludeZeroDialog, InfoDialog } from './modals';\nimport { addOrRemoveScaleColumn } from './utils';\n\nconst { Panel, toggle } = settings;\nconst MIN_WIDTH = '650px';\n\nconst StyledDiv = styled('div')(({ theme }) => ({\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n padding: '16px 0',\n}));\n\nconst ShowModal = ({ showExcludeZeroDialog, excludeZero, changeExcludeZero, cancel }) => {\n if (showExcludeZeroDialog && !excludeZero) {\n return (\n <ExcludeZeroDialog\n open={showExcludeZeroDialog && !excludeZero}\n changeExcludeZero={changeExcludeZero}\n cancel={cancel}\n />\n );\n } else if (showExcludeZeroDialog && excludeZero) {\n return (\n <IncludeZeroDialog\n open={showExcludeZeroDialog && excludeZero}\n changeExcludeZero={changeExcludeZero}\n cancel={cancel}\n />\n );\n } else {\n return null;\n }\n};\n\nShowModal.propTypes = {\n showExcludeZeroDialog: PropTypes.bool,\n excludeZero: PropTypes.bool,\n changeExcludeZero: PropTypes.func,\n cancel: PropTypes.func,\n};\n\nexport class Main extends React.Component {\n constructor(props) {\n super(props);\n this.divRef = React.createRef();\n this.updateDivWidth = this.updateDivWidth.bind(this);\n }\n\n state = {\n showDecreaseMaxPointsDialog: false,\n showDeleteScaleDialog: false,\n showDeleteTraitDialog: false,\n showExcludeZeroDialog: false,\n showInfoDialog: false,\n infoDialogText: '',\n adjustedWidth: MIN_WIDTH,\n initialUpdateCompleted: false, // flag to track the initial update of the div width\n };\n\n componentDidMount() {\n window.addEventListener('resize', this.updateDivWidthDebounced);\n window.addEventListener('load', this.updateDivWidth);\n\n // delay updateDivWidth to avoid having this.divRef.current = null at first load\n setTimeout(this.updateDivWidth, 0);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.updateDivWidthDebounced);\n window.removeEventListener('load', this.updateDivWidth);\n }\n\n componentDidUpdate() {\n if (!this.state.initialUpdateCompleted) {\n this.updateDivWidth();\n this.setState({ initialUpdateCompleted: true });\n }\n }\n\n updateDivWidth() {\n if (this.divRef && this.divRef.current) {\n const divWidth = this.divRef.current.offsetWidth;\n if (divWidth !== this.state.adjustedWidth) {\n this.set({\n adjustedWidth: divWidth,\n });\n }\n }\n }\n\n updateDivWidthDebounced = debounce(() => this.updateDivWidth(), 50);\n\n onScaleAdded = () => {\n const { model, onModelChanged, configuration } = this.props;\n let { scales, excludeZero } = model || {};\n const { maxNoOfScales } = configuration || {};\n let { defaultTraitLabel } = configuration || '';\n\n if (!scales.length) {\n scales = [];\n }\n\n // if no default trait label is defined, take the trait label of the first scale\n defaultTraitLabel = typeof defaultTraitLabel === 'string' ? defaultTraitLabel : scales[0]?.traitLabel || '';\n\n if (scales.length === maxNoOfScales) {\n this.set({\n infoDialogText: `There can't be more than ${maxNoOfScales} scales.`,\n showInfoDialog: true,\n });\n\n return false;\n }\n\n scales.push({\n maxPoints: 1,\n scorePointsLabels: excludeZero ? [''] : ['', ''],\n traitLabel: defaultTraitLabel,\n traits: [],\n });\n\n onModelChanged({ ...model, scales });\n };\n\n onScaleChanged = (scaleIndex, params) => {\n const { model, onModelChanged } = this.props;\n let scales = cloneDeep((model || {}).scales);\n\n if (scaleIndex < 0 || scaleIndex >= scales.length || isEmpty(params)) return false;\n\n Object.keys(params).forEach((key) => {\n scales[scaleIndex][key] = params[key];\n });\n\n if (model.excludeZero && params.maxPoints === 1) {\n // excludeZero should be false and disabled when maxPoints is 1 for any scale\n model.excludeZero = false;\n scales = addOrRemoveScaleColumn(scales, excludeZeroTypes.add0);\n }\n\n onModelChanged({ ...model, scales });\n };\n\n onScaleRemoved = (scaleIndex) => {\n const { model, onModelChanged, configuration } = this.props;\n let { scales } = model || {};\n const { minNoOfScales } = configuration || {};\n\n if (scaleIndex < 0 || scaleIndex >= scales.length) return false;\n\n if (scales.length === minNoOfScales) {\n this.set({\n infoDialogText: `There can't be less than ${minNoOfScales} scales.`,\n showInfoDialog: true,\n });\n\n return false;\n }\n\n scales = [...scales.slice(0, scaleIndex), ...scales.slice(scaleIndex + 1)];\n\n onModelChanged({ ...model, scales });\n };\n\n onHalfScoringChanged = () => {\n const { model, onModelChanged } = this.props;\n let { halfScoring } = model || {};\n\n onModelChanged({ ...model, halfScoring: !halfScoring });\n };\n\n onVisibleToStudentChanged = () => {\n const { model, onModelChanged } = this.props;\n let { visibleToStudent } = model || {};\n\n onModelChanged({ ...model, visibleToStudent: !visibleToStudent });\n };\n\n set = (newState) => this.setState(newState);\n\n changeShowScorePointLabels = () => {\n const { model, onModelChanged } = this.props || {};\n let { pointLabels } = model || {};\n\n pointLabels = !pointLabels;\n\n onModelChanged({ ...model, pointLabels });\n };\n\n changeShowDescription = () => {\n const { model, onModelChanged } = this.props || {};\n let { description } = model || {};\n\n description = !description;\n\n onModelChanged({ ...model, description });\n };\n\n changeShowStandards = () => {\n const { model, onModelChanged } = this.props || {};\n let { standards } = model || {};\n\n standards = !standards;\n\n onModelChanged({ ...model, standards });\n };\n\n // Exclude Zero\n showToggleExcludeZeroModal = () => this.set({ showExcludeZeroDialog: true });\n\n hideToggleExcludeZeroModal = () => {\n this.set({ showExcludeZeroDialog: false });\n };\n\n onCloseInfoDialog = () => this.set({ showInfoDialog: false });\n\n changeExcludeZero = (excludeZeroType) => {\n const { model, onModelChanged } = this.props || {};\n const { scales } = model || {};\n let { excludeZero } = model || {};\n\n if (!scales || !scales.length) return;\n\n excludeZero = !excludeZero;\n const newScales = addOrRemoveScaleColumn(scales, excludeZeroType);\n\n onModelChanged({ ...model, scales: newScales, excludeZero });\n\n this.hideToggleExcludeZeroModal();\n };\n\n onModelChanged = (updatedModel, updatedProperty) => {\n const { onModelChanged } = this.props || {};\n\n if (updatedProperty === 'excludeZero') {\n this.showToggleExcludeZeroModal();\n } else {\n onModelChanged(updatedModel);\n }\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, uploadSoundSupport, imageSupport } = this.props || {};\n const {\n addScale,\n baseInputConfiguration = {},\n dragAndDrop,\n contentDimensions = {},\n showDescription,\n showExcludeZero,\n showLevelTagInput,\n showStandards,\n showHalfScoring,\n showMaxPoint,\n showScorePointLabels,\n showVisibleToStudent,\n spellCheck = {},\n settingsPanelDisabled,\n maxNoOfTraits,\n minNoOfTraits,\n width,\n mathMlOptions = {},\n maxMaxPoints,\n expandedInput = {},\n labelInput = {},\n } = configuration || {};\n const {\n errors,\n extraCSSRules,\n scales,\n excludeZero,\n description,\n pointLabels,\n standards,\n spellCheckEnabled,\n maxPointsEnabled,\n addScaleEnabled,\n } = model || {};\n const { showExcludeZeroDialog, showInfoDialog, infoDialogText, adjustedWidth } = this.state || {};\n\n // excludeZero should be false and disabled when maxPoints is 1 for any scale\n const disabledExcludeZero = scales?.some((scale) => scale.maxPoints === 1);\n\n const panelSettings = {\n standards: showStandards.settings && toggle(showStandards.label),\n 'showLevelTagInput.enabled': showLevelTagInput.settings && toggle(showLevelTagInput.label, true),\n visibleToStudent: showVisibleToStudent.settings && toggle(showVisibleToStudent.label),\n excludeZero: showExcludeZero.settings && toggle(showExcludeZero.label, false, disabledExcludeZero),\n halfScoring: showHalfScoring.settings && toggle(showHalfScoring.label),\n 'dragAndDrop.enabled': dragAndDrop.settings && toggle(dragAndDrop.label, true),\n };\n const panelProperties = {\n description: showDescription.settings && toggle(showDescription.label),\n pointLabels: showScorePointLabels.settings && toggle(showScorePointLabels.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n addScaleEnabled: addScale.settings && toggle(addScale.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <ShowModal\n showExcludeZeroDialog={showExcludeZeroDialog}\n excludeZero={excludeZero}\n changeExcludeZero={this.changeExcludeZero}\n cancel={this.hideToggleExcludeZeroModal}\n ></ShowModal>\n }\n />\n }\n >\n <div style={{ width: '100%' }} ref={this.divRef} />\n <StyledDiv style={{ width: width || adjustedWidth }}>\n {(scales || []).map((scale, scaleIndex) => (\n <Scale\n key={`scale-${scaleIndex}`}\n scale={scale}\n scaleIndex={scaleIndex}\n errors={errors}\n onScaleRemoved={this.onScaleRemoved}\n onScaleChanged={this.onScaleChanged}\n showStandards={standards}\n showScorePointLabels={pointLabels}\n showDescription={description}\n showLevelTagInput={showLevelTagInput.enabled}\n excludeZero={excludeZero}\n enableDragAndDrop={dragAndDrop.enabled}\n spellCheck={spellCheckEnabled}\n width={adjustedWidth}\n uploadSoundSupport={uploadSoundSupport}\n maxPointsEnabled={maxPointsEnabled}\n maxNoOfTraits={maxNoOfTraits}\n minNoOfTraits={minNoOfTraits}\n imageSupport={imageSupport}\n {...this.props}\n mathMlOptions={mathMlOptions}\n maxMaxPoints={maxMaxPoints}\n expandedPluginProps={getPluginProps(expandedInput?.inputConfiguration)}\n labelPluginProps={getPluginProps(labelInput?.inputConfiguration)}\n />\n ))}\n {addScaleEnabled && <MultiTraitButton onClick={this.onScaleAdded}>Add Scale</MultiTraitButton>}\n </StyledDiv>\n\n <InfoDialog open={showInfoDialog} text={infoDialogText} onClose={() => this.set({ showInfoDialog: false })} />\n </layout.ConfigLayout>\n );\n }\n}\n\nMain.propTypes = {\n model: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n configuration: PropTypes.object,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default Main;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAEA,MAAM;EAAES,KAAK;EAAEC;AAAO,CAAC,GAAGC,kBAAQ;AAClC,MAAMC,SAAS,GAAG,OAAO;AAEzB,MAAMC,SAAS,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC9CC,UAAU,EAAE,cAAc;EAC1BC,QAAQ,EAAEF,KAAK,CAACG,UAAU,CAACD,QAAQ;EACnCE,OAAO,EAAE;AACX,CAAC,CAAC,CAAC;AAEH,MAAMC,SAAS,GAAGA,CAAC;EAAEC,qBAAqB;EAAEC,WAAW;EAAEC,iBAAiB;EAAEC;AAAO,CAAC,KAAK;EACvF,IAAIH,qBAAqB,IAAI,CAACC,WAAW,EAAE;IACzC,oBACExB,MAAA,CAAA2B,OAAA,CAAAC,aAAA,CAACnB,OAAA,CAAAoB,iBAAiB;MAChBC,IAAI,EAAEP,qBAAqB,IAAI,CAACC,W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IAAE,CAAE,CAC1F,CAAC;EAE1B;AACF;AAAC6H,OAAA,CAAAtI,IAAA,GAAAA,IAAA;AAEDA,IAAI,CAACJ,SAAS,GAAG;EACfmB,KAAK,EAAElB,kBAAS,CAAC0I,MAAM;EACvBhE,kBAAkB,EAAE1E,kBAAS,CAAC0I,MAAM;EACpCtH,aAAa,EAAEpB,kBAAS,CAAC0I,MAAM;EAC/BvH,cAAc,EAAEnB,kBAAS,CAACE,IAAI;EAC9BuE,sBAAsB,EAAEzE,kBAAS,CAACE,IAAI;EACtCyE,YAAY,EAAE3E,kBAAS,CAAC2I,KAAK,CAAC;IAC5BC,GAAG,EAAE5I,kBAAS,CAACE,IAAI,CAAC2I,UAAU;IAC9BC,MAAM,EAAE9I,kBAAS,CAACE,IAAI,CAAC2I;EACzB,CAAC;AACH,CAAC;AAAC,IAAAE,QAAA,GAAAN,OAAA,CAAA/I,OAAA,GAEaS,IAAI","ignoreList":[]}
|
package/configure/lib/trait.js
CHANGED
|
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _debug = _interopRequireDefault(require("debug"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var
|
|
12
|
+
var _lodashEs = require("lodash-es");
|
|
13
13
|
var _core = require("@dnd-kit/core");
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
15
|
var _renderUi = require("@pie-lib/render-ui");
|
|
@@ -109,7 +109,7 @@ function TraitTile({
|
|
|
109
109
|
}
|
|
110
110
|
}, [currentPosition]);
|
|
111
111
|
const onTraitChangedHandler = params => {
|
|
112
|
-
if ((0,
|
|
112
|
+
if ((0, _lodashEs.isEmpty)(params)) return;
|
|
113
113
|
const updatedTrait = {
|
|
114
114
|
...{
|
|
115
115
|
name,
|
|
@@ -1 +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 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,QAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,WAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,KAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,SAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AAEA,MAAMa,GAAG,GAAG,IAAAC,cAAK,EAAC,sDAAs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AAe,EAAEiG,kBAAS,CAACQ,IAAI;EAC/BpG,SAAS,EAAE4F,kBAAS,CAACE,MAAM;EAC3BlG,iBAAiB,EAAEgG,kBAAS,CAACQ,IAAI;EACjCvG,eAAe,EAAE+F,kBAAS,CAACE,MAAM;EACjChG,mBAAmB,EAAE8F,kBAAS,CAACE,MAAM;EACrC/F,UAAU,EAAE6F,kBAAS,CAACQ,IAAI;EAC1BnG,kBAAkB,EAAE2F,kBAAS,CAACC,MAAM;EACpC3F,aAAa,EAAE0F,kBAAS,CAACC,MAAM;EAC/B1F,mBAAmB,EAAEyF,kBAAS,CAACC,MAAM;EACrCzF,gBAAgB,EAAEwF,kBAAS,CAACC,MAAM;EAClCxF,YAAY,EAAEuF,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,GAEapE,SAAS","ignoreList":[]}
|
|
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","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-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}));\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.useEffect(() => {\n if (\n currentPosition !== undefined &&\n secondaryBlockRef.current &&\n secondaryBlockRef.current.scrollLeft !== currentPosition\n ) {\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 ? {\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,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,WAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,KAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,SAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AAEA,MAAMa,GAAG,GAAG,IAAAC,cAAK,EAAC,sDAAsD,CAAC;AAEzE,MAAMC,WAAW,GAAG,IAAAC,cAAM,EAACC,sBAAiB,CAAC,CAAC;EAC5CC,KAAK,EAAEA,eAAK,CAACC,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG,IAAAJ,cAAM,EAACK,oBAAY,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC9DC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,cAAc,EAAE,eAAe;EAC/BC,YAAY,EAAEJ,KAAK,CAACK,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AAEH,MAAMC,QAAQ,GAAG,IAAAZ,cAAM,EAAC,KAAK,CAAC,CAAC;EAC7BO,OAAO,EAAE,MAAM;EACfM,UAAU,EAAE,QA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IAAI,CAACD,UAAU;IAC9BO,MAAM,EAAEV,kBAAS,CAACI,IAAI,CAACD;EACzB,CAAC;AACH,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEapE,SAAS","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multi-trait-rubric-configure",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0-next.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@mui/icons-material": "^7.3.4",
|
|
12
12
|
"@mui/material": "^7.3.4",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/config-ui": "12.1.1-next.
|
|
15
|
-
"@pie-lib/drag": "3.1.1-next.
|
|
16
|
-
"@pie-lib/editable-html-tip-tap": "1.1.1-next.
|
|
17
|
-
"@pie-lib/render-ui": "5.1.1-next.
|
|
14
|
+
"@pie-lib/config-ui": "12.1.1-next.3",
|
|
15
|
+
"@pie-lib/drag": "3.1.1-next.1",
|
|
16
|
+
"@pie-lib/editable-html-tip-tap": "1.1.1-next.3",
|
|
17
|
+
"@pie-lib/render-ui": "5.1.1-next.1",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
|
-
"lodash": "^4.17.
|
|
19
|
+
"lodash-es": "^4.17.23",
|
|
20
20
|
"prop-types": "^15.6.2",
|
|
21
|
-
"react": "18.
|
|
22
|
-
"react-dom": "18.
|
|
21
|
+
"react": "18.3.1",
|
|
22
|
+
"react-dom": "18.3.1"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/controller/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multi-trait-rubric-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.0-next.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"debug": "^4.1.1",
|
|
12
|
-
"lodash": "^4.17.
|
|
12
|
+
"lodash-es": "^4.17.23"
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multi-trait-rubric",
|
|
3
|
-
"repository":
|
|
4
|
-
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/pie-framework/pie-elements"
|
|
6
|
+
},
|
|
7
|
+
"version": "7.1.0-next.0+20d879b",
|
|
5
8
|
"publishConfig": {
|
|
6
9
|
"access": "public"
|
|
7
10
|
},
|
|
@@ -11,14 +14,14 @@
|
|
|
11
14
|
"@mui/icons-material": "^7.3.4",
|
|
12
15
|
"@mui/material": "^7.3.4",
|
|
13
16
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
|
-
"@pie-lib/math-rendering": "4.1.1-next.
|
|
15
|
-
"@pie-lib/render-ui": "5.1.1-next.
|
|
17
|
+
"@pie-lib/math-rendering": "4.1.1-next.1",
|
|
18
|
+
"@pie-lib/render-ui": "5.1.1-next.1",
|
|
16
19
|
"clsx": "^1.1.1",
|
|
17
20
|
"prop-types": "^15.6.1",
|
|
18
|
-
"react": "18.
|
|
19
|
-
"react-dom": "18.
|
|
21
|
+
"react": "18.3.1",
|
|
22
|
+
"react-dom": "18.3.1"
|
|
20
23
|
},
|
|
21
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "20d879b8b8fa74decf5028d860d54cd09cbdf051",
|
|
22
25
|
"scripts": {
|
|
23
26
|
"postpublish": "../../scripts/postpublish"
|
|
24
27
|
},
|
package/module/configure.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_dll_react_dom as e,_dll_prop_types as t,_dll_mui__material_styles as n,_dll_mui__material as o,_dll_pie_lib__render_ui as i,_dll_react as r,_dll_mui__icons_material as a,_dll_debug as l,_dll_lodash as s}from"../../../@pie-lib/shared-module@^3.0.5/module/index.js";import{_dll_pie_lib__config_ui as c}from"../../../@pie-lib/config-module@^3.0.0/module/index.js";import{_dll_pie_lib__drag as d}from"../../../@pie-lib/drag-module@^3.0.5/module/index.js";import{_dll_pie_lib__editable_html_tip_tap as u}from"../../../@pie-lib/editable-html-module@^6.0.5/module/index.js";var p={};Object.defineProperty(p,"__esModule",{value:!0});class h extends CustomEvent{constructor(e,t=!1){super(h.TYPE,{bubbles:!0,detail:{update:e,reset:t}}),this.update=e,this.reset=t}}h.TYPE="model.updated";var g=p.ModelUpdatedEvent=h;class m extends CustomEvent{constructor(e,t){super(m.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}m.TYPE="delete.image";var f=p.DeleteImageEvent=m;class b extends CustomEvent{constructor(e){super(b.TYPE,{bubbles:!0,detail:e}),this.handler=e}}b.TYPE="insert.image";var v=p.InsertImageEvent=b;class y extends CustomEvent{constructor(e,t){super(y.TYPE,{bubbles:!0,detail:{src:e,done:t}}),this.src=e,this.done=t}}y.TYPE="delete.sound";var x=p.DeleteSoundEvent=y;class w extends CustomEvent{constructor(e){super(w.TYPE,{bubbles:!0,detail:e}),this.handler=e}}w.TYPE="insert.sound";var S,E=p.InsertSoundEvent=w,D=e;S=D.createRoot,D.hydrateRoot;var C={model:{addScaleEnabled:!0,description:!1,excludeZero:!1,halfScoring:!1,maxPointsEnabled:!0,pointLabels:!0,scales:[],standards:!1,visibleToStudent:!0},configuration:{baseInputConfiguration:{audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1},textAlign:{disabled:!0},showParagraphs:{disabled:!1},separateParagraphs:{disabled:!0}},expandedInput:{inputConfiguration:{math:{disabled:!0},audio:{disabled:!1},video:{disabled:!1},image:{disabled:!1}}},labelInput:{inputConfiguration:{math:{disabled:!0},audio:{disabled:!0},video:{disabled:!0},image:{disabled:!0}}},excludeZeroDialogBoxContent:{title:"Exclude 0 (Zero) from Score Point Values.",text:"<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"},includeZeroDialogBoxContent:{title:"Include 0 (Zero) in Score Point Values.",text:"<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"},deleteScaleDialogBoxContent:{title:"Delete Scale",text:"Are you sure you want to delete this scale?"},maxPointsDialogBoxContent:{title:"Decreasing Max Points.",text:" You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."},settingsPanelDisabled:!1,spellCheck:{label:"Spellcheck",settings:!1,enabled:!0},showExcludeZero:{settings:!0,label:"Exclude Zero"},showScorePointLabels:{settings:!0,label:"Show Score Point Labels"},showDescription:{settings:!0,label:"Show Description"},showVisibleToStudent:{settings:!0,label:"Visible to Student"},showHalfScoring:{settings:!0,label:"Half Scoring"},showStandards:{settings:!1,label:"Show Standards"},showLevelTagInput:{settings:!1,label:"Show Level Tag Input",enabled:!1},dragAndDrop:{settings:!0,label:"Enable Drag and Drop",enabled:!1},showMaxPoint:{settings:!0,label:"Show Max Points Dropdown"},addScale:{settings:!0,label:"Add Scale Available"},minNoOfTraits:1,maxNoOfTraits:10,minNoOfScales:1,maxNoOfScales:10,defaultTraitLabel:"Trait",mathMlOptions:{mmlOutput:!1,mmlEditing:!1},maxMaxPoints:10}};const P=r,_=t,{styled:T}=n,{Dialog:k}=o,{DialogTitle:M}=o,{DialogActions:R}=o,{DialogContent:L}=o,{DialogContentText:I}=o,{Button:O}=o,{color:A}=i,{configuration:{excludeZeroDialogBoxContent:N,includeZeroDialogBoxContent:B,deleteScaleDialogBoxContent:j,maxPointsDialogBoxContent:W}}=C,Z="remove0",z="add0",F="shiftLeft",$="shiftRight",Y=T(k)(({theme:e})=>({"& .MuiPaper-root":{padding:e.spacing(2.5)}})),V=T(M)(({theme:e})=>({padding:`0 0 ${e.spacing(2)} 0`,"& h2":{fontSize:"20px",lineHeight:"23px",fontFamily:"Cerebri Sans",color:A.text()}})),U=T(L)(({theme:e})=>({paddingLeft:"0","& p":{fontSize:e.typography.fontSize+2,fontFamily:"Cerebri Sans",color:A.text()}})),H=T(O)(({theme:e})=>({padding:`${e.spacing(1.5)} ${e.spacing(2)}`,borderRadius:"4px",fontSize:e.typography.fontSize,fontFamily:"Cerebri Sans",lineHeight:"14px",textTransform:"none",background:A.primary(),color:e.palette.common.white})),X=T(H)({background:A.secondaryBackground(),color:A.text()}),K=({open:e,changeExcludeZero:t,cancel:n})=>P.createElement(Y,{open:e},P.createElement(V,null,N.title),P.createElement(U,null,P.createElement(I,null,P.createElement("div",{dangerouslySetInnerHTML:{__html:N.text}}))),P.createElement(R,null,P.createElement(X,{onClick:()=>n()},"Cancel"),P.createElement(H,{onClick:()=>t(F)},"Shift to Left"),P.createElement(H,{onClick:()=>t(Z)},"Remove 0 column")));K.propTypes={open:_.bool,changeExcludeZero:_.func,cancel:_.func};const q=({open:e,changeExcludeZero:t,cancel:n})=>P.createElement(Y,{open:e},P.createElement(V,null,B.title),P.createElement(U,null,P.createElement(I,null,P.createElement("div",{dangerouslySetInnerHTML:{__html:B.text}}))),P.createElement(R,null,P.createElement(X,{onClick:()=>n()},"Cancel"),P.createElement(H,{onClick:()=>t($)},"Shift to Right"),P.createElement(H,{onClick:()=>t(z)},"Add 0 column")));q.propTypes={open:_.bool,changeExcludeZero:_.func,cancel:_.func};const J=({open:e,deleteScorePoints:t,cancel:n})=>P.createElement(Y,{open:e},P.createElement(V,null,W.title),P.createElement(U,null,P.createElement(I,null,P.createElement("div",{dangerouslySetInnerHTML:{__html:W.text}}))),P.createElement(R,null,P.createElement(X,{onClick:n},"Cancel"),P.createElement(H,{onClick:t},"Confirm")));J.propTypes={open:_.bool,deleteScorePoints:_.func,cancel:_.func};const G=({open:e,scaleIndex:t,deleteScale:n,cancel:o})=>P.createElement(Y,{open:e},P.createElement(V,null,`${j.title} #${t+1}`),P.createElement(U,null,P.createElement(I,null,P.createElement("div",{dangerouslySetInnerHTML:{__html:j.text}}))),P.createElement(R,null,P.createElement(X,{onClick:o},"Cancel"),P.createElement(H,{onClick:n},"Delete")));G.propTypes={open:_.bool,scaleIndex:_.number,deleteScale:_.func,cancel:_.func};const Q=({open:e,deleteTrait:t,cancel:n,traitLabel:o})=>P.createElement(Y,{open:e},P.createElement(V,null,"Delete ",o),P.createElement(U,null,P.createElement(I,null,P.createElement("div",{dangerouslySetInnerHTML:{__html:`Are you sure you want to delete this ${o}?`}}))),P.createElement(R,null,P.createElement(X,{onClick:n},"Cancel"),P.createElement(H,{onClick:t},"Delete")));Q.propTypes={open:_.bool,deleteTrait:_.func,cancel:_.func,traitLabel:_.string};const ee=({open:e,text:t,onClose:n})=>P.createElement(Y,{open:e},P.createElement(V,null,t),P.createElement(R,null,P.createElement(H,{onClick:n},"OK")));ee.propTypes={open:_.bool,text:_.string,cancel:_.func,onClose:_.func};const{DEFAULT_PLUGINS:te}=u,ne=(te||[]).filter(e=>"table"!==e&&"bulleted-list"!==e&&"numbered-list"!==e),oe=(e,t)=>e&&e.length?e.reduce((e,n)=>{let{scorePointsLabels:o,traits:i}=n||{};if(o.length<1)return e;switch(t){case Z:o=o.slice(1),i=i.map(({scorePointsDescriptors:e,...t})=>({...t,scorePointsDescriptors:e.slice(1)}));break;case z:o=["",...o],i=i.map(({scorePointsDescriptors:e,...t})=>({...t,scorePointsDescriptors:["",...e]}));break;case F:o=o.slice(0,-1),i=i.map(({scorePointsDescriptors:e,...t})=>({...t,scorePointsDescriptors:e.slice(0,-1)}));break;case $:o=[...o,""],i=i.map(({scorePointsDescriptors:e,...t})=>({...t,scorePointsDescriptors:[...e,""]}))}return e.push({...n,scorePointsLabels:o,traits:i}),e},[]):[],ie=r,{styled:re}=n,{Select:ae}=o,{MenuItem:le}=o,{InputBase:se}=o,{color:ce}=i,{InputContainer:de}=i,ue=u,pe="100px",he="160px",ge="solid 1px #bdbdbd",me="8px 4px",fe=re("div")(({theme:e})=>({"& .editable-label":{textAlign:"left",flex:1,border:"none","& div":{padding:0,border:"none"},"& > div":{borderLeft:ge,borderRadius:0,padding:me}},"& .editable-level":{background:e.palette.common.white,width:"60%"},"& .underlined-editable-level":{background:e.palette.common.white,width:"100%","& div":{padding:0,border:"none"},"& > div":{borderBottom:ge,borderRadius:0,padding:me}},"& .expanded-input-prompt":{border:"none",margin:"10px",marginTop:0}})),be=re("div")(({theme:e})=>({fontSize:e.typography.fontSize+2,textAlign:"right",display:"flex",flexDirection:"row",alignItems:"flex-start",padding:`${e.spacing(1.5)} ${e.spacing(2)}`,width:"114px",background:ce.secondaryBackground(),borderRadius:"4px",justifyContent:"space-around",color:ce.text(),cursor:"pointer"})),ve=({children:e,onClick:t})=>ie.createElement(be,{onClick:t},ie.createElement("strong",null,"+"),ie.createElement("div",null,e)),ye=re("div")({width:"200px",minWidth:"200px",position:"relative",padding:"0 10px",boxSizing:"border-box"}),xe=re("div")(({theme:e})=>({width:"200px",minWidth:"200px","& ul, ol":{marginBlockStart:0,paddingInlineStart:e.spacing(2)}})),we=re("div")({display:"flex",overflowX:"hidden",alignItems:"flex-end",paddingBottom:"30px"}),Se=({children:e,setRef:t,width:n})=>ie.createElement(we,{style:{width:n},ref:t},e),Ee=({children:e,height:t})=>ie.createElement("div",{style:{display:"flex",height:t}},e),De=re("div")({padding:"0 10px"}),Ce=re("div")({display:"flex",borderRadius:"4px",background:"white",flexDirection:"row",alignItems:"center",justifyContent:"space-between",border:ge}),Pe=re("div")({display:"flex",borderRadius:"4px",background:"none",flexDirection:"row",alignItems:"center",justifyContent:"center",border:"0"}),_e=re("div")({width:"24px",textAlign:"center"}),Te=({error:e="",scorePointsValue:t,scoreDescriptor:n,pluginProps:o,onChange:i,showScorePointLabels:r,alignToRight:a,spellCheck:l,uploadSoundSupport:s,imageSupport:c={},mathMlOptions:d={}})=>{const u=r?Ce:Pe;return ie.createElement(fe,null,ie.createElement(De,null,ie.createElement(u,null,ie.createElement(_e,null,t),r?ie.createElement(ue,{className:"editable-label",error:e,markup:n,placeholder:" Enter Label",onChange:i,pluginProps:o,activePlugins:ne,spellCheck:l,toolbarOpts:a?{alignment:"right"}:{},uploadSoundSupport:s,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:d,imageSupport:c,slateEditorExtraStyles:{fontFamily:"Cerebri"}}):null)))},ke=re(se)(({theme:e})=>({"&.MuiInputBase-root":{background:e.palette.common.white,marginTop:e.spacing(1),"label + &":{width:"80px"}},"& .MuiInputBase-input":{borderRadius:"4px",position:"relative",border:ge,fontSize:e.typography.fontSize,fontFamily:"Cerebri Sans",padding:`${e.spacing(1)} ${e.spacing(1.5)}`,"&:focus":{borderRadius:"4px"}}})),Me=({maxPoints:e,onChange:t,maxMaxPoints:n})=>ie.createElement(de,{label:"Max Points"},ie.createElement(ae,{value:e,onChange:t,input:ie.createElement(ke,null),MenuProps:{transitionDuration:{enter:225,exit:195}}},(e=>Array.from({length:e},(e,t)=>t+1))(n).map(e=>ie.createElement(le,{key:`menu-item-${e}`,value:e},e)))),Re=re("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",margin:`${e.spacing(1.5)} 0`})),Le=({markup:e,onChange:t,pluginProps:n,label:o,spellCheck:i,uploadSoundSupport:r,mathMlOptions:a={},imageSupport:l={}})=>ie.createElement(fe,null,ie.createElement(Re,null,o&&ie.createElement("div",null,o),ie.createElement(ue,{className:"editable-level",markup:e,onChange:t,placeholder:"Trait Label",pluginProps:n,activePlugins:ne,spellCheck:i,uploadSoundSupport:r,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:a,imageSupport:l,slateEditorExtraStyles:{fontFamily:"Cerebri"}}))),Ie=re("div")({width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}),Oe=({error:e,markup:t,onChange:n,pluginProps:o,label:i,placeholder:r,spellCheck:a,uploadSoundSupport:l,imageSupport:s={},mathMlOptions:c={}})=>ie.createElement(fe,null,ie.createElement(Ie,null,i&&ie.createElement("div",null,i),ie.createElement(ue,{className:"underlined-editable-level",error:e,markup:t,onChange:n,placeholder:r,pluginProps:o,activePlugins:ne,spellCheck:a,uploadSoundSupport:l,languageCharactersProps:[{language:"spanish"},{language:"special"}],mathMlOptions:c,imageSupport:s,slateEditorExtraStyles:{fontFamily:"Cerebri"}}))),Ae=({error:e,markup:t,onChange:n,pluginProps:o,placeholder:i,alignToRight:r,spellCheck:a,uploadSoundSupport:l,mathMlOptions:s={},imageSupport:c={}})=>ie.createElement(fe,null,ie.createElement(ue,{className:"expanded-input-prompt",error:e,markup:t,onChange:n,placeholder:i,pluginProps:o,toolbarOpts:r?{alignment:"right"}:{},spellCheck:a,uploadSoundSupport:l,languageCharactersProps:[{language:"spanish"},{language:"special"}],autoWidthToolbar:!0,mathMlOptions:s,imageSupport:c,slateEditorExtraStyles:{fontFamily:"Cerebri",height:"120px",padding:0}})),Ne=re("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"flex-end",paddingBottom:"18px",gap:e.spacing(.25)})),Be=re("div")(({theme:e})=>({position:"absolute",zIndex:10,cursor:"pointer",right:0,alignItems:"flex-start",justifyContent:"center",background:`linear-gradient(to left, ${e.palette.common.white}, ${ce.background()})`,boxSizing:"border-box"})),je=re("div")(({theme:e})=>({position:"absolute",zIndex:11,cursor:"pointer",right:0,alignItems:"flex-start",justifyContent:"center",background:`linear-gradient(to left, ${e.palette.common.white}, ${ce.background()})`,boxSizing:"border-box","& svg":{position:"absolute",bottom:"-24px"}})),We=({children:e,show:t,width:n,onClick:o,left:i,showLevelTagInput:r})=>ie.createElement(Be,{style:{height:"-webkit-fill-available",display:t?"flex":"none",width:n,left:i,background:i?`linear-gradient(to right, white, ${ce.background()})`:void 0},onClick:o},ie.createElement(je,{style:{display:t?"flex":"none",width:n,height:r?he:pe,left:0,background:i?`linear-gradient(to right, ${ce.secondaryBackground()}, ${ce.background()})`:void 0},onClick:o},e)),Ze=r,ze=t,{styled:Fe}=n,{IconButton:$e}=o,{Menu:Ye}=o,{MenuItem:Ve}=o,{MoreVert:Ue}=a,{color:He}=i,Xe=Fe("div")({width:"140px",border:"none",padding:"10px 0",display:"flex",alignItems:"center",justifyContent:"space-around"}),Ke=Fe("div")(({height:e,theme:t})=>({background:He.secondaryBackground(),borderRadius:"4px",position:"relative",marginBottom:t.spacing(2),display:"flex",height:e})),qe=Fe("div")(({theme:e})=>({width:"200px",minWidth:"200px",position:"relative",padding:"0 10px",boxSizing:"border-box",paddingTop:e.spacing(1.5),alignSelf:"center"})),Je=Fe("div")(({theme:e})=>({position:"absolute",fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingTop:e.spacing(.5)}));class Ge extends Ze.Component{constructor(...e){super(...e),Ge.prototype.__init.call(this),Ge.prototype.__init2.call(this),Ge.prototype.__init3.call(this),Ge.prototype.__init4.call(this),Ge.prototype.__init5.call(this),Ge.prototype.__init6.call(this)}static __initStatic(){this.propTypes={maxPointsEnabled:ze.bool,spellCheck:ze.bool,errors:ze.object}}__init(){this.state={anchorEl:null}}UNSAFE_componentWillReceiveProps(e){e.currentPosition!==this.props.currentPosition&&this.scrollToPosition(e.currentPosition)}__init2(){this.onScorePointLabelChange=({scorePointLabel:e,value:t})=>{const{scorePointsLabels:n,onScaleChange:o}=this.props;t<0||t>=n.length||(n[t]=e,o({scorePointsLabels:n}))}}__init3(){this.handleClick=e=>this.setState({anchorEl:e.currentTarget})}__init4(){this.handleClose=()=>this.setState({anchorEl:null})}__init5(){this.scrollToPosition=e=>this.secondaryBlock.scrollTo({left:e})}__init6(){this.openMenu=()=>{this.props.showDeleteScaleModal(),this.handleClose()}}render(){const{scorePointsValues:e,scorePointsLabels:t,traitLabel:n,currentPosition:o,showStandards:i,onTraitLabelChange:r,showDescription:a,showLevelTagInput:l,maxPoints:s,updateMaxPointsFieldValue:c,scaleIndex:d,showScorePointLabels:u,secondaryBlockWidth:p,setSecondaryBlockRef:h,spellCheck:g,uploadSoundSupport:m,maxPointsEnabled:f,mathMlOptions:b={},errors:v={},maxMaxPoints:y,labelPluginProps:x={},imageSupport:w={}}=this.props,{anchorEl:S}=this.state;return Ze.createElement(Ke,{height:l?he:pe},Ze.createElement(qe,null,l&&Ze.createElement(Le,{markup:n||"Trait",onChange:r,pluginProps:x,spellCheck:g,label:"Level Label",uploadSoundSupport:m,mathMlOptions:b,imageSupport:w}),Ze.createElement(Ne,null,Ze.createElement("div",null,"Scale ",d+1),f&&Ze.createElement(Me,{maxPoints:s,maxMaxPoints:y,onChange:c}),Ze.createElement("div",null,Ze.createElement($e,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:this.handleClick,size:"large"},Ze.createElement(Ue,null)),Ze.createElement(Ye,{id:"long-menu",anchorEl:S,keepMounted:!0,open:!!S,onClose:this.handleClose,transitionDuration:{enter:225,exit:195}},["Remove Scale"].map(e=>Ze.createElement(Ve,{key:e,onClick:this.openMenu},e)))))),Ze.createElement(Se,{setRef:e=>{e&&(this.secondaryBlock=e,h(e))},width:`${p}px`},i&&Ze.createElement(xe,null,Ze.createElement(Xe,null,"Standard(s)")),a&&Ze.createElement(xe,null,Ze.createElement(Xe,null,"Description")),e.map((n,i)=>{const r=p-216*i+o-128,a=e.length-i-1;let l,c;try{l=t[a]||"",c=v[a]||""}catch(e){l=""}return Ze.createElement(xe,{key:`secondary-block-part-${i}`},Ze.createElement(Te,{scorePointsValue:n,error:c,scoreDescriptor:l,pluginProps:x,showScorePointLabels:u,onChange:e=>this.onScorePointLabelChange({scorePointLabel:e,value:a}),alignToRight:r<296&&n<s,spellCheck:g,uploadSoundSupport:m,mathMlOptions:b,imageSupport:w}),c&&Ze.createElement(Je,null,c))})))}}Ge.__initStatic(),Ge.propTypes={onTraitLabelChange:ze.func,onScaleChange:ze.func,scorePointsValues:ze.arrayOf(ze.number),scorePointsLabels:ze.arrayOf(ze.string),traitLabel:ze.string,showStandards:ze.bool,showLevelTagInput:ze.bool,showDescription:ze.bool,maxPoints:ze.number,updateMaxPointsFieldValue:ze.func,scaleIndex:ze.number,currentPosition:ze.number,secondaryBlockWidth:ze.number,showDeleteScaleModal:ze.func,showScorePointLabels:ze.bool,setSecondaryBlockRef:ze.func,uploadSoundSupport:ze.object,maxMaxPoints:ze.number,labelPluginProps:ze.object,imageSupport:ze.shape({add:ze.func.isRequired,delete:ze.func.isRequired})};const{useMemo:Qe}=r,{useLayoutEffect:et}=r,{useEffect:tt}=r,{useRef:nt}=r,{useCallback:ot}=r,it="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function rt(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function at(e){return"nodeType"in e}function lt(e){var t,n;return e?rt(e)?e:at(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function st(e){const{Document:t}=lt(e);return e instanceof t}function ct(e){return!rt(e)&&e instanceof lt(e).HTMLElement}function dt(e){return e instanceof lt(e).SVGElement}function ut(e){return e?rt(e)?e.document:at(e)?st(e)?e:ct(e)||dt(e)?e.ownerDocument:document:document:document}const pt=it?et:tt;function ht(e){const t=nt(e);return pt(()=>{t.current=e}),ot(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)},[])}function gt(e,t){void 0===t&&(t=[e]);const n=nt(e);return pt(()=>{n.current!==e&&(n.current=e)},t),n}function mt(e,t){const n=nt();return Qe(()=>{const t=e(n.current);return n.current=t,t},[...t])}function ft(e){const t=ht(e),n=nt(null),o=ot(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function bt(e){const t=nt();return tt(()=>{t.current=e},[e]),t.current}let vt={};function yt(e,t){return Qe(()=>{if(t)return t;const n=null==vt[e]?0:vt[e]+1;return vt[e]=n,e+"-"+n},[e,t])}function xt(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((t,n)=>{const o=Object.entries(n);for(const[n,i]of o){const o=t[n];null!=o&&(t[n]=o+e*i)}return t},{...t})}}const wt=xt(1),St=xt(-1);function Et(e){if(!e)return!1;const{KeyboardEvent:t}=lt(e.target);return t&&e instanceof t}function Dt(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=lt(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Ct=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ct.Translate.toString(e),Ct.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),Pt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function _t(e){return e.matches(Pt)?e:e.querySelector(Pt)}const Tt=r,{useState:kt}=r,{useCallback:Mt}=r,Rt={display:"none"};function Lt(e){let{id:t,value:n}=e;return Tt.createElement("div",{id:t,style:Rt},n)}function It(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return Tt.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const Ot=r,{createContext:At}=r,{useContext:Nt}=r,{useEffect:Bt}=r,{useState:jt}=r,{useCallback:Wt}=r,{useMemo:Zt}=r,{useRef:zt}=r,{memo:Ft}=r,{useReducer:$t}=r,{cloneElement:Yt}=r,{forwardRef:Vt}=r,{createPortal:Ut}=e,{unstable_batchedUpdates:Ht}=e,Xt=At(null),Kt={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},qt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Jt(e){let{announcements:t=qt,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=Kt}=e;const{announce:r,announcement:a}=function(){const[e,t]=kt("");return{announce:Mt(e=>{null!=e&&t(e)},[]),announcement:e}}(),l=yt("DndLiveRegion"),[s,c]=jt(!1);if(Bt(()=>{c(!0)},[]),function(e){const t=Nt(Xt);Bt(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(Zt(()=>({onDragStart(e){let{active:n}=e;r(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&r(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;r(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;r(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;r(t.onDragCancel({active:n,over:o}))}}),[r,t])),!s)return null;const d=Ot.createElement(Ot.Fragment,null,Ot.createElement(Lt,{id:o,value:i.draggable}),Ot.createElement(It,{id:l,announcement:a}));return n?Ut(d,n):d}var Gt;function Qt(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Gt||(Gt={}));const en=Object.freeze({x:0,y:0});function tn(e,t){const n=Dt(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function nn(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function on(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),r=Math.min(t.top+t.height,e.top+e.height),a=i-o,l=r-n;if(o<i&&n<r){const n=t.width*t.height,o=e.width*e.height,i=a*l;return Number((i/(n+o-i)).toFixed(4))}return 0}const rn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const e of o){const{id:o}=e,r=n.get(o);if(r){const n=on(r,t);n>0&&i.push({id:o,data:{droppableContainer:e,value:n}})}}return i.sort(nn)};function an(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:en}const ln=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.reduce((e,t)=>({...e,top:e.top+1*t.y,bottom:e.bottom+1*t.y,left:e.left+1*t.x,right:e.right+1*t.x}),{...e})};function sn(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const cn={ignoreTransform:!1};function dn(e,t){void 0===t&&(t=cn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=lt(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=sn(t);if(!o)return e;const{scaleX:i,scaleY:r,x:a,y:l}=o,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(1-r)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,u=r?e.height/r:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,o))}const{top:o,left:i,width:r,height:a,bottom:l,right:s}=n;return{top:o,left:i,width:r,height:a,bottom:l,right:s}}function un(e){return dn(e,{ignoreTransform:!0})}function pn(e,t){const n=[];return e?function o(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(st(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ct(i)||dt(i))return n;if(n.includes(i))return n;const r=lt(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=lt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const o=t[e];return"string"==typeof o&&n.test(o)})}(i,r)&&n.push(i),function(e,t){return void 0===t&&(t=lt(e).getComputedStyle(e)),"fixed"===t.position}(i,r)?n:o(i.parentNode)}(e):n}function hn(e){const[t]=pn(e,1);return null!=t?t:null}function gn(e){return it&&e?rt(e)?e:at(e)?st(e)||e===ut(e).scrollingElement?window:ct(e)?e:null:null:null}function mn(e){return rt(e)?e.scrollX:e.scrollLeft}function fn(e){return rt(e)?e.scrollY:e.scrollTop}function bn(e){return{x:mn(e),y:fn(e)}}var vn;function yn(e){return!(!it||!e)&&e===document.scrollingElement}function xn(e){const t={x:0,y:0},n=yn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(vn||(vn={}));const wn={x:.2,y:.2};function Sn(e,t,n,o,i){let{top:r,left:a,right:l,bottom:s}=n;void 0===o&&(o=10),void 0===i&&(i=wn);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=xn(e),h={x:0,y:0},g={x:0,y:0},m=t.height*i.y,f=t.width*i.x;return!c&&r<=t.top+m?(h.y=vn.Backward,g.y=o*Math.abs((t.top+m-r)/m)):!d&&s>=t.bottom-m&&(h.y=vn.Forward,g.y=o*Math.abs((t.bottom-m-s)/m)),!p&&l>=t.right-f?(h.x=vn.Forward,g.x=o*Math.abs((t.right-f-l)/f)):!u&&a<=t.left+f&&(h.x=vn.Backward,g.x=o*Math.abs((t.left+f-a)/f)),{direction:h,speed:g}}function En(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dn(e){return e.reduce((e,t)=>wt(e,bn(t)),en)}function Cn(e,t){if(void 0===t&&(t=dn),!e)return;const{top:n,left:o,bottom:i,right:r}=t(e);hn(e)&&(i<=0||r<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Pn=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+mn(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+fn(t),0)}]];class _n{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=pn(t),o=Dn(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of Pn)for(const r of t)Object.defineProperty(this,r,{get:()=>{const t=i(n),a=o[e]-t;return this.rect[r]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Tn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function kn(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Mn,Rn;function Ln(e){e.preventDefault()}function In(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Mn||(Mn={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Rn||(Rn={}));const On={start:[Rn.Space,Rn.Enter],cancel:[Rn.Esc],end:[Rn.Space,Rn.Enter,Rn.Tab]},An=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Rn.Right:return{...n,x:n.x+25};case Rn.Left:return{...n,x:n.x-25};case Rn.Down:return{...n,y:n.y+25};case Rn.Up:return{...n,y:n.y-25}}};class Nn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Tn(ut(t)),this.windowListeners=new Tn(lt(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Mn.Resize,this.handleCancel),this.windowListeners.add(Mn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Mn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Cn(n),t(en)}handleKeyDown(e){if(Et(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:i=On,coordinateGetter:r=An,scrollBehavior:a="smooth"}=o,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:en;this.referenceCoordinates||(this.referenceCoordinates=c);const d=r(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=St(d,c),o={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:r,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:p}=xn(n),h=En(n),g={x:Math.min(i===Rn.Right?h.right-h.width/2:h.right,Math.max(i===Rn.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(i===Rn.Down?h.bottom-h.height/2:h.bottom,Math.max(i===Rn.Down?h.top:h.top+h.height/2,d.y))},m=i===Rn.Right&&!l||i===Rn.Left&&!s,f=i===Rn.Down&&!c||i===Rn.Up&&!r;if(m&&g.x!==d.x){const e=n.scrollLeft+t.x,r=i===Rn.Right&&e<=u.x||i===Rn.Left&&e>=p.x;if(r&&!t.y)return void n.scrollTo({left:e,behavior:a});o.x=r?n.scrollLeft-e:i===Rn.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,o.x&&n.scrollBy({left:-o.x,behavior:a});break}if(f&&g.y!==d.y){const e=n.scrollTop+t.y,r=i===Rn.Down&&e<=u.y||i===Rn.Up&&e>=p.y;if(r&&!t.x)return void n.scrollTo({top:e,behavior:a});o.y=r?n.scrollTop-e:i===Rn.Down?n.scrollTop-u.y:n.scrollTop-p.y,o.y&&n.scrollBy({top:-o.y,behavior:a});break}}this.handleMove(e,wt(St(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Bn(e){return Boolean(e&&"distance"in e)}function jn(e){return Boolean(e&&"delay"in e)}Nn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=On,onActivation:i}=t,{active:r}=n;const{code:a}=e.nativeEvent;if(o.start.includes(a)){const t=r.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class Wn{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=lt(e);return e instanceof t?e:ut(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:r}=i;this.props=e,this.events=t,this.document=ut(r),this.documentListeners=new Tn(this.document),this.listeners=new Tn(n),this.windowListeners=new Tn(lt(r)),this.initialCoordinates=null!=(o=Dt(i))?o:en,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Mn.Resize,this.handleCancel),this.windowListeners.add(Mn.DragStart,Ln),this.windowListeners.add(Mn.VisibilityChange,this.handleCancel),this.windowListeners.add(Mn.ContextMenu,Ln),this.documentListeners.add(Mn.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(jn(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Bn(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:o}=this.props;o(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Mn.Click,In,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Mn.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:r,options:{activationConstraint:a}}=i;if(!o)return;const l=null!=(t=Dt(e))?t:en,s=St(o,l);if(!n&&a){if(Bn(a)){if(null!=a.tolerance&&kn(s,a.tolerance))return this.handleCancel();if(kn(s,a.distance))return this.handleStart()}return jn(a)&&kn(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),r(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Rn.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Zn={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class zn extends Wn{constructor(e){const{event:t}=e,n=ut(t.target);super(e,Zn,n)}}zn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button||(null==o||o({event:n}),0))}}];const Fn={move:{name:"mousemove"},end:{name:"mouseup"}};var $n;!function(e){e[e.RightClick=2]="RightClick"}($n||($n={})),class extends Wn{constructor(e){super(e,Fn,ut(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==$n.RightClick&&(null==o||o({event:n}),!0)}}];const Yn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Vn,Un;(class extends Wn{constructor(e){super(e,Yn)}static setup(){return window.addEventListener(Yn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Yn.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return!(i.length>1||(null==o||o({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Vn||(Vn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Un||(Un={}));const Hn={x:{[vn.Backward]:!1,[vn.Forward]:!1},y:{[vn.Backward]:!1,[vn.Forward]:!1}};var Xn,Kn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Xn||(Xn={})),(Kn||(Kn={})).Optimized="optimized";const qn=new Map;function Jn(e,t){return mt(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Gn(e){let{callback:t,disabled:n}=e;const o=ht(t),i=Zt(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return Bt(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function Qn(e){return new _n(dn(e),e)}function eo(e,t,n){void 0===t&&(t=Qn);const[o,i]=jt(null);function r(){i(o=>{if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=o?o:n)?i:null;const r=t(e);return JSON.stringify(o)===JSON.stringify(r)?o:r})}const a=function(e){let{callback:t,disabled:n}=e;const o=ht(t),i=Zt(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return Bt(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){r();break}}}}),l=Gn({callback:r});return pt(()=>{r(),e?(null==l||l.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==a||a.disconnect())},[e]),o}const to=[];function no(e,t){void 0===t&&(t=[]);const n=zt(null);return Bt(()=>{n.current=null},t),Bt(()=>{const t=e!==en;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?St(e,n.current):en}function oo(e){return Zt(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const io=[];function ro(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ct(t)?t:e}const ao=[{sensor:zn,options:{}},{sensor:Nn,options:{}}],lo={current:{}},so={draggable:{measure:un},droppable:{measure:un,strategy:Xn.WhileDragging,frequency:Kn.Optimized},dragOverlay:{measure:dn}};class co extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const uo={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Qt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:so,measureDroppableContainers:Qt,windowRect:null,measuringScheduled:!1},po={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Qt,draggableNodes:new Map,over:null,measureDroppableContainers:Qt},ho=At(po),go=At(uo);function mo(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new co}}}function fo(e,t){switch(t.type){case Gt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Gt.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Gt.DragEnd:case Gt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Gt.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new co(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Gt.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const a=new co(e.droppable.containers);return a.set(n,{...r,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Gt.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const r=new co(e.droppable.containers);return r.delete(n),{...e,droppable:{...e.droppable,containers:r}}}default:return e}}function bo(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=Nt(ho),r=bt(o),a=bt(null==n?void 0:n.id);return Bt(()=>{if(!t&&!o&&r&&null!=a){if(!Et(r))return;if(document.activeElement===r.target)return;const e=i.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=_t(e);if(t){t.focus();break}}})}},[o,t,i,a,r]),null}function vo(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...o}),n):n}const yo=At({...en,scaleX:1,scaleY:1});var xo;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(xo||(xo={})),Ft(function(e){var t,n,o,i;let{id:r,accessibility:a,autoScroll:l=!0,children:s,sensors:c=ao,collisionDetection:d=rn,measuring:u,modifiers:p,...h}=e;const g=$t(fo,void 0,mo),[m,f]=g,[b,v]=function(){const[e]=jt(()=>new Set),t=Wt(t=>(e.add(t),()=>e.delete(t)),[e]);return[Wt(t=>{let{type:n,event:o}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)})},[e]),t]}(),[y,x]=jt(xo.Uninitialized),w=y===xo.Initialized,{draggable:{active:S,nodes:E,translate:D},droppable:{containers:C}}=m,P=null!=S?E.get(S):null,_=zt({initial:null,translated:null}),T=Zt(()=>{var e;return null!=S?{id:S,data:null!=(e=null==P?void 0:P.data)?e:lo,rect:_}:null},[S,P]),k=zt(null),[M,R]=jt(null),[L,I]=jt(null),O=gt(h,Object.values(h)),A=yt("DndDescribedBy",r),N=Zt(()=>C.getEnabled(),[C]),B=Zt(()=>({draggable:{...so.draggable,...null==j?void 0:j.draggable},droppable:{...so.droppable,...null==j?void 0:j.droppable},dragOverlay:{...so.dragOverlay,...null==j?void 0:j.dragOverlay}}),[null==(j=u)?void 0:j.draggable,null==j?void 0:j.droppable,null==j?void 0:j.dragOverlay]);var j;const{droppableRects:W,measureDroppableContainers:Z,measuringScheduled:z}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[r,a]=jt(null),{frequency:l,measure:s,strategy:c}=i,d=zt(e),u=function(){switch(c){case Xn.Always:return!1;case Xn.BeforeDragging:return n;default:return!n}}(),p=gt(u),h=Wt(function(e){void 0===e&&(e=[]),p.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),g=zt(null),m=mt(t=>{if(u&&!n)return qn;if(!t||t===qn||d.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new _n(s(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,r,n,u,s]);return Bt(()=>{d.current=e},[e]),Bt(()=>{u||h()},[n,u]),Bt(()=>{r&&r.length>0&&a(null)},[JSON.stringify(r)]),Bt(()=>{u||"number"!=typeof l||null!==g.current||(g.current=setTimeout(()=>{h(),g.current=null},l))},[l,u,h,...o]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:null!=r}}(N,{dragging:w,dependencies:[D.x,D.y],config:B.droppable}),F=function(e,t){const n=null!=t?e.get(t):void 0,o=n?n.node.current:null;return mt(e=>{var n;return null==t?null:null!=(n=null!=o?o:e)?n:null},[o,t])}(E,S),$=Zt(()=>L?Dt(L):null,[L]),Y=function(){const e=!1===(null==M?void 0:M.autoScrollEnabled),t="object"==typeof l?!1===l.enabled:!1===l,n=w&&!e&&!t;return"object"==typeof l?{...l,enabled:n}:{enabled:n}}(),V=function(e,t){return Jn(e,t)}(F,B.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const r=zt(!1),{x:a,y:l}="boolean"==typeof i?{x:i,y:i}:i;pt(()=>{if(!a&&!l||!t)return void(r.current=!1);if(r.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const i=an(n(e),o);if(a||(i.x=0),l||(i.y=0),r.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const t=hn(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,a,l,o,n])}({activeNode:null!=S?E.get(S):null,config:Y.layoutShiftCompensation,initialRect:V,measure:B.draggable.measure});const U=eo(F,B.draggable.measure,V),H=eo(F?F.parentElement:null),X=zt({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:C,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),K=C.getNodeFor(null==(t=X.current.over)?void 0:t.id),q=function(e){let{measure:t}=e;const[n,o]=jt(null),i=Gn({callback:Wt(e=>{for(const{target:n}of e)if(ct(n)){o(e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o});break}},[t])}),r=Wt(e=>{const n=ro(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)},[t,i]),[a,l]=ft(r);return Zt(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}({measure:B.dragOverlay.measure}),J=null!=(n=q.nodeRef.current)?n:F,G=w?null!=(o=q.rect)?o:U:null,Q=Boolean(q.nodeRef.current&&q.rect),ee=an(te=Q?null:U,Jn(te));var te;const ne=oo(J?lt(J):null),oe=function(e){const t=zt(e),n=mt(n=>e?n&&n!==to&&e&&t.current&&e.parentNode===t.current.parentNode?n:pn(e):to,[e]);return Bt(()=>{t.current=e},[e]),n}(w?null!=K?K:F:null),ie=function(e,t){void 0===t&&(t=dn);const[n]=e,o=oo(n?lt(n):null),[i,r]=jt(io);function a(){r(()=>e.length?e.map(e=>yn(e)?o:new _n(t(e),e)):io)}const l=Gn({callback:a});return pt(()=>{null==l||l.disconnect(),a(),e.forEach(e=>null==l?void 0:l.observe(e))},[e]),i}(oe),re=vo(p,{transform:{x:D.x-ee.x,y:D.y-ee.y,scaleX:1,scaleY:1},activatorEvent:L,active:T,activeNodeRect:U,containerNodeRect:H,draggingNodeRect:G,over:X.current.over,overlayNodeRect:q.rect,scrollableAncestors:oe,scrollableAncestorRects:ie,windowRect:ne}),ae=$?wt($,D):null,le=function(e){const[t,n]=jt(null),o=zt(e),i=Wt(e=>{const t=gn(e.target);t&&n(e=>e?(e.set(t,bn(t)),new Map(e)):null)},[]);return Bt(()=>{const t=o.current;if(e!==t){r(t);const a=e.map(e=>{const t=gn(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,bn(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=gn(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),Zt(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>wt(e,t),en):Dn(e):en,[e,t])}(oe),se=no(le),ce=no(le,[U]),de=wt(re,se),ue=G?ln(G,re):null,pe=T&&ue?d({active:T,collisionRect:ue,droppableRects:W,droppableContainers:N,pointerCoordinates:ae}):null,he=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(pe),[ge,me]=jt(null),fe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Q?re:wt(re,ce),null!=(i=null==ge?void 0:ge.rect)?i:null,U),be=zt(null),ve=Wt((e,t)=>{let{sensor:n,options:o}=t;if(null==k.current)return;const i=E.get(k.current);if(!i)return;const r=e.nativeEvent,a=new n({active:k.current,activeNode:i,event:r,options:o,context:X,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=O.current,n={id:e};null==t||t(n),b({type:"onDragAbort",event:n})},onPending(e,t,n,o){if(!E.get(e))return;const{onDragPending:i}=O.current,r={id:e,constraint:t,initialCoordinates:n,offset:o};null==i||i(r),b({type:"onDragPending",event:r})},onStart(e){const t=k.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:o}=O.current,i={activatorEvent:r,active:{id:t,data:n.data,rect:_}};Ht(()=>{null==o||o(i),x(xo.Initializing),f({type:Gt.DragStart,initialCoordinates:e,active:t}),b({type:"onDragStart",event:i}),R(be.current),I(r)})},onMove(e){f({type:Gt.DragMove,coordinates:e})},onEnd:l(Gt.DragEnd),onCancel:l(Gt.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:i}=X.current;let a=null;if(t&&i){const{cancelDrop:l}=O.current;a={activatorEvent:r,active:t,collisions:n,delta:i,over:o},e===Gt.DragEnd&&"function"==typeof l&&await Promise.resolve(l(a))&&(e=Gt.DragCancel)}k.current=null,Ht(()=>{f({type:e}),x(xo.Uninitialized),me(null),R(null),I(null),be.current=null;const t=e===Gt.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=O.current[t];null==e||e(a),b({type:t,event:a})}})}}be.current=a},[E]),ye=Wt((e,t)=>(n,o)=>{const i=n.nativeEvent,r=E.get(o);if(null!==k.current||!r||i.dndKit||i.defaultPrevented)return;const a={active:r};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},k.current=o,ve(n,t))},[E,ve]),xe=function(e,t){return Zt(()=>e.reduce((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,ye);!function(e){Bt(()=>{if(!it)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),pt(()=>{U&&y===xo.Initializing&&x(xo.Initialized)},[U,y]),Bt(()=>{const{onDragMove:e}=O.current,{active:t,activatorEvent:n,collisions:o,over:i}=X.current;if(!t||!n)return;const r={active:t,activatorEvent:n,collisions:o,delta:{x:de.x,y:de.y},over:i};Ht(()=>{null==e||e(r),b({type:"onDragMove",event:r})})},[de.x,de.y]),Bt(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:i}=X.current;if(!e||null==k.current||!t||!i)return;const{onDragOver:r}=O.current,a=o.get(he),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:l};Ht(()=>{me(l),null==r||r(s),b({type:"onDragOver",event:s})})},[he]),pt(()=>{X.current={activatorEvent:L,active:T,activeNode:F,collisionRect:ue,collisions:pe,droppableRects:W,draggableNodes:E,draggingNode:J,draggingNodeRect:G,droppableContainers:C,over:ge,scrollableAncestors:oe,scrollAdjustedTranslate:de},_.current={initial:G,translated:ue}},[T,F,pe,ue,E,J,G,W,C,ge,oe,de]),function(e){let{acceleration:t,activator:n=Vn.Pointer,canScroll:o,draggingRect:i,enabled:r,interval:a=5,order:l=Un.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:p}=e;const h=function(e){let{delta:t,disabled:n}=e;const o=bt(t);return mt(e=>{if(n||!o||!e)return Hn;const i=Math.sign(t.x-o.x),r=Math.sign(t.y-o.y);return{x:{[vn.Backward]:e.x[vn.Backward]||-1===i,[vn.Forward]:e.x[vn.Forward]||1===i},y:{[vn.Backward]:e.y[vn.Backward]||-1===r,[vn.Forward]:e.y[vn.Forward]||1===r}}},[n,t,o])}({delta:u,disabled:!r}),[g,m]=function(){const e=nt(null);return[ot((t,n)=>{e.current=setInterval(t,n)},[]),ot(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),f=zt({x:0,y:0}),b=zt({x:0,y:0}),v=Zt(()=>{switch(n){case Vn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Vn.DraggableRect:return i}},[n,i,s]),y=zt(null),x=Wt(()=>{const e=y.current;if(!e)return;const t=f.current.x*b.current.x,n=f.current.y*b.current.y;e.scrollBy(t,n)},[]),w=Zt(()=>l===Un.TreeOrder?[...c].reverse():c,[l,c]);Bt(()=>{if(r&&c.length&&v){for(const e of w){if(!1===(null==o?void 0:o(e)))continue;const n=c.indexOf(e),i=d[n];if(!i)continue;const{direction:r,speed:l}=Sn(e,i,v,t,p);for(const e of["x","y"])h[e][r[e]]||(l[e]=0,r[e]=0);if(l.x>0||l.y>0)return m(),y.current=e,g(x,a),f.current=l,void(b.current=r)}f.current={x:0,y:0},b.current={x:0,y:0},m()}else m()},[t,x,o,m,r,a,JSON.stringify(v),JSON.stringify(h),g,c,w,d,JSON.stringify(p)])}({...Y,delta:D,draggingRect:ue,pointerCoordinates:ae,scrollableAncestors:oe,scrollableAncestorRects:ie});const we=Zt(()=>({active:T,activeNode:F,activeNodeRect:U,activatorEvent:L,collisions:pe,containerNodeRect:H,dragOverlay:q,draggableNodes:E,droppableContainers:C,droppableRects:W,over:ge,measureDroppableContainers:Z,scrollableAncestors:oe,scrollableAncestorRects:ie,measuringConfiguration:B,measuringScheduled:z,windowRect:ne}),[T,F,U,L,pe,H,q,E,C,W,ge,Z,oe,ie,B,z,ne]),Se=Zt(()=>({activatorEvent:L,activators:xe,active:T,activeNodeRect:U,ariaDescribedById:{draggable:A},dispatch:f,draggableNodes:E,over:ge,measureDroppableContainers:Z}),[L,xe,T,U,f,A,E,ge,Z]);return Ot.createElement(Xt.Provider,{value:v},Ot.createElement(ho.Provider,{value:Se},Ot.createElement(go.Provider,{value:we},Ot.createElement(yo.Provider,{value:fe},s)),Ot.createElement(bo,{disabled:!1===(null==a?void 0:a.restoreFocus)})),Ot.createElement(Jt,{...a,hiddenTextDescribedById:A}))});const wo=At(null),So="button";const Eo={timeout:25};function Do(e){let{animation:t,children:n}=e;const[o,i]=jt(null),[r,a]=jt(null),l=bt(n);return n||o||!l||i(l),pt(()=>{if(!r)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,r)).then(()=>{i(null)}):i(null)},[t,o,r]),Ot.createElement(Ot.Fragment,null,n,o?Yt(o,{ref:a}):null)}const Co={x:0,y:0,scaleX:1,scaleY:1};function Po(e){let{children:t}=e;return Ot.createElement(ho.Provider,{value:po},Ot.createElement(yo.Provider,{value:Co},t))}const _o={position:"fixed",touchAction:"none"},To=e=>Et(e)?"transform 250ms ease":void 0,ko=Vt((e,t)=>{let{as:n,activatorEvent:o,adjustScale:i,children:r,className:a,rect:l,style:s,transform:c,transition:d=To}=e;if(!l)return null;const u=i?c:{...c,scaleX:1,scaleY:1},p={..._o,width:l.width,height:l.height,top:l.top,left:l.left,transform:Ct.Transform.toString(u),transformOrigin:i&&o?tn(o,l):void 0,transition:"function"==typeof d?d(o):d,...s};return Ot.createElement(n,{className:a,style:p,ref:t},r)}),Mo={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Ct.Transform.toString(t)},{transform:Ct.Transform.toString(n)}]},sideEffects:(Ro={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e;const o={},{styles:i,className:r}=Ro;if(null!=i&&i.active)for(const[e,n]of Object.entries(i.active))void 0!==n&&(o[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&n.node.style.setProperty(e,t);return null!=r&&r.active&&t.node.classList.add(r.active),null!=r&&r.dragOverlay&&n.node.classList.add(r.dragOverlay),function(){for(const[e,n]of Object.entries(o))t.node.style.setProperty(e,n);null!=r&&r.active&&t.node.classList.remove(r.active)}})};var Ro;let Lo=0;Ot.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:i,transition:r,modifiers:a,wrapperElement:l="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggableNodes:g,droppableContainers:m,dragOverlay:f,over:b,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:x,windowRect:w}=Nt(go),S=Nt(yo),E=function(e){return Zt(()=>{if(null!=e)return Lo++,Lo},[e])}(null==u?void 0:u.id),D=vo(a,{activatorEvent:d,active:u,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:f.rect,over:b,overlayNodeRect:f.rect,scrollableAncestors:y,scrollableAncestorRects:x,transform:S,windowRect:w}),C=Jn(p),P=function(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:i}=e;return ht((e,r)=>{if(null===t)return;const a=n.get(e);if(!a)return;const l=a.node.current;if(!l)return;const s=ro(r);if(!s)return;const{transform:c}=lt(r).getComputedStyle(r),d=sn(c);if(!d)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:o,keyframes:i}={...Mo,...e};return e=>{let{active:r,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-r.rect.left,d=a.rect.top-r.rect.top,u={scaleX:1!==l.scaleX?r.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?r.rect.height*l.scaleY/a.rect.height:1},p={x:l.x-c,y:l.y-d,...u},h=i({...s,active:r,dragOverlay:a,transform:{initial:l,final:p}}),[g]=h,m=h[h.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;const f=null==o?void 0:o({active:r,dragOverlay:a,...s}),b=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{b.onfinish=()=>{null==f||f(),e()}})}}(t);return Cn(l,i.draggable.measure),u({active:{id:e,data:a.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:r,rect:i.dragOverlay.measure(s)},droppableContainers:o,measuringConfiguration:i,transform:d})})}({config:o,draggableNodes:g,droppableContainers:m,measuringConfiguration:v}),_=C?f.setRef:void 0;return Ot.createElement(Po,null,Ot.createElement(Do,{animation:P},u&&E?Ot.createElement(ko,{key:E,id:u.id,ref:_,as:l,activatorEvent:d,adjustScale:t,className:s,transition:r,rect:C,style:{zIndex:c,...i},transform:D},n):null))});const Io=r,Oo=l,Ao=t,{isEmpty:No}=s,{styled:Bo}=n,{color:jo}=i,{IconButton:Wo}=o,{Menu:Zo}=o,{MenuItem:zo}=o,{MoreVert:Fo}=a,{DragIndicator:$o}=a;function Yo(e){let t,n=e[0],o=1;for(;o<e.length;){const i=e[o],r=e[o+1];if(o+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=r(n)):"call"!==i&&"optionalCall"!==i||(n=r((...e)=>n.call(t,...e)),t=void 0)}return n}Oo("@pie-element:placement-ordering:configure:trait-tile");const Vo=Bo($o)({color:jo.text()}),Uo=Bo(ye)(({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"space-between",marginBottom:e.spacing(5)})),Ho=Bo("div")({display:"flex",alignItems:"center",width:"100%",cursor:"pointer"}),Xo=Bo(Wo)({marginLeft:"auto"}),Ko=Bo("div")({display:"flex",whiteSpace:"break-spaces"}),qo=Bo("div")(({theme:e})=>({fontSize:e.typography.fontSize-2,color:e.palette.error.main,paddingBottom:e.spacing(1)}));function Jo({error:e,trait:{name:t,standards:n,description:o,scorePointsDescriptors:i},traitLabel:r,scorePointsValues:a,showStandards:l,showDescription:s,enableDragAndDrop:c,currentPosition:d,secondaryBlockWidth:u,spellCheck:p,maxPoints:h,uploadSoundSupport:g,mathMlOptions:m={},expandedPluginProps:f={},labelPluginProps:b={},imageSupport:v={},index:y,onTraitChanged:x,onTraitRemoved:w,onTraitDropped:S}){const[E,D]=Io.useState(null),C=Io.useRef(null),{attributes:P,listeners:_,setNodeRef:T,transform:k,isDragging:M}=function(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const r=yt("Draggable"),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:p}=Nt(ho),{role:h=So,roleDescription:g="draggable",tabIndex:m=0}=null!=i?i:{},f=(null==s?void 0:s.id)===t,b=Nt(f?yo:wo),[v,y]=ft(),[x,w]=ft(),S=function(e,t){return Zt(()=>e.reduce((e,n)=>{let{eventName:o,handler:i}=n;return e[o]=e=>{i(e,t)},e},{}),[e,t])}(a,t),E=gt(n);return pt(()=>(u.set(t,{id:t,key:r,node:v,activatorNode:x,data:E}),()=>{const e=u.get(t);e&&e.key===r&&u.delete(t)}),[u,t]),{active:s,activatorEvent:l,activeNodeRect:c,attributes:Zt(()=>({role:h,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!f||h!==So)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[o,h,m,f,g,d.draggable]),isDragging:f,listeners:o?void 0:S,node:v,over:p,setNodeRef:y,setActivatorNodeRef:w,transform:b}}({id:`trait-${y}`,data:{type:"trait",index:y,name:t}}),{setNodeRef:R}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const r=yt("Droppable"),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=Nt(ho),d=zt({disabled:n}),u=zt(!1),p=zt(null),h=zt(null),{disabled:g,updateMeasurementsFor:m,timeout:f}={...Eo,...i},b=gt(null!=m?m:o),v=Gn({callback:Wt(()=>{u.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),h.current=null},f)):u.current=!0},[f]),disabled:g||!a}),y=Wt((e,t)=>{v&&(t&&(v.unobserve(t),u.current=!1),e&&v.observe(e))},[v]),[x,w]=ft(y),S=gt(t);return Bt(()=>{v&&x.current&&(v.disconnect(),u.current=!1,v.observe(x.current))},[x,v]),Bt(()=>(l({type:Gt.RegisterDroppable,element:{id:o,key:r,disabled:n,node:x,rect:p,data:S}}),()=>l({type:Gt.UnregisterDroppable,key:r,id:o})),[o]),Bt(()=>{n!==d.current.disabled&&(l({type:Gt.SetDroppableDisabled,id:o,key:r,disabled:n}),d.current.disabled=n)},[o,r,n,l]),{active:a,rect:p,isOver:(null==s?void 0:s.id)===o,node:x,over:s,setNodeRef:w}}({id:`trait-drop-${y}`,data:{type:"trait",index:y}});Io.useEffect(()=>{void 0!==d&&C.current&&C.current.scrollLeft!==d&&O(d)},[d]);const L=e=>{if(No(e))return;const r={name:t,standards:n,description:o,scorePointsDescriptors:i,...e};x(r)},I=()=>D(null),O=e=>Yo([C,"access",e=>e.current,"optionalAccess",e=>e.scrollTo,"call",t=>t({left:e})]),A=k?{transform:`translate3d(${k.x}px, ${k.y}px, 0)`,opacity:M?.5:1}:{};return Io.createElement("div",{ref:R,style:A},Io.createElement(Ee,null,Io.createElement(Uo,null,Io.createElement(Ho,null,c&&Io.createElement("span",{ref:T,...P,..._},Io.createElement(Vo,null)),Io.createElement(Xo,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:e=>D(e.currentTarget),size:"large"},Io.createElement(Fo,null)),Io.createElement(Zo,{id:"long-menu",anchorEl:E,keepMounted:!0,open:!!E,onClose:I,transitionDuration:{enter:225,exit:195}},Io.createElement(zo,{onClick:()=>{w(),I()}},Io.createElement(Ko,{dangerouslySetInnerHTML:{__html:`Remove ${t||r}`}})))),Io.createElement(Oe,{markup:t,error:Yo([e,"optionalAccess",e=>e.name])||"",onChange:e=>L({name:e}),pluginProps:b,placeholder:`Enter ${r}`,spellCheck:p,uploadSoundSupport:g,mathMlOptions:m,imageSupport:v}),e&&Io.createElement(qo,null,e.name||"")),Io.createElement(Se,{setRef:e=>{C.current=e},width:`${u}px`},l&&n&&Io.createElement(xe,null,Io.createElement(Ae,{placeholder:"Standards",markup:n.join(","),onChange:e=>L({standards:e.split(",")}),pluginProps:f,spellCheck:p,uploadSoundSupport:g,mathMlOptions:m,imageSupport:v})),s&&Io.createElement(xe,null,Io.createElement(Ae,{placeholder:"Enter Description",markup:o,error:Yo([e,"optionalAccess",e=>e.description])||"",onChange:e=>L({description:e}),pluginProps:f,spellCheck:p,uploadSoundSupport:g,mathMlOptions:m,imageSupport:v}),e&&Io.createElement(qo,null,e.description||"")),(a||[]).map((e,t)=>{const n=u-216*t+d-98,o=a.length-t-1;let r;try{r=i[o]||""}catch(e){r=""}return Io.createElement(xe,{key:`key-key-${t}`},Io.createElement(Ae,{placeholder:"Enter Descriptor",markup:r,onChange:e=>(({descriptor:e,value:t})=>{if(t<0||t>=i.length)return;const n=[...i];n[t]=e,L({scorePointsDescriptors:n})})({descriptor:e,value:o}),pluginProps:f,alignToRight:n<296&&e<h,spellCheck:p,uploadSoundSupport:g,mathMlOptions:m,imageSupport:v}))}))))}Jo.propTypes={error:Ao.object,index:Ao.number.isRequired,onTraitChanged:Ao.func.isRequired,onTraitRemoved:Ao.func.isRequired,onTraitDropped:Ao.func,trait:Ao.shape({name:Ao.string,standards:Ao.arrayOf(Ao.string),scorePointsDescriptors:Ao.arrayOf(Ao.string),description:Ao.string}),traitLabel:Ao.string,scorePointsValues:Ao.arrayOf(Ao.number),showStandards:Ao.bool,showDescription:Ao.bool,maxPoints:Ao.number,enableDragAndDrop:Ao.bool,currentPosition:Ao.number,secondaryBlockWidth:Ao.number,spellCheck:Ao.bool,uploadSoundSupport:Ao.object,mathMlOptions:Ao.object,expandedPluginProps:Ao.object,labelPluginProps:Ao.object,imageSupport:Ao.shape({add:Ao.func.isRequired,delete:Ao.func.isRequired})};const Go=r,Qo=t,{styled:ei}=n,{ArrowBackIos:ti}=a,{ArrowForwardIos:ni}=a,{DragProvider:oi}=d;function ii(e){let t,n=e[0],o=1;for(;o<e.length;){const i=e[o],r=e[o+1];if(o+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=r(n)):"call"!==i&&"optionalCall"!==i||(n=r((...e)=>n.call(t,...e)),t=void 0)}return n}const ri=ei("div")(({theme:e})=>({display:"flex",flexDirection:"column",wordBreak:"break-word",position:"relative",marginBottom:e.spacing(2.5)}));class ai extends Go.Component{constructor(...e){super(...e),ai.prototype.__init.call(this),ai.prototype.__init2.call(this),ai.prototype.__init3.call(this),ai.prototype.__init4.call(this),ai.prototype.__init5.call(this),ai.prototype.__init6.call(this),ai.prototype.__init7.call(this),ai.prototype.__init8.call(this),ai.prototype.__init9.call(this),ai.prototype.__init10.call(this),ai.prototype.__init11.call(this),ai.prototype.__init12.call(this),ai.prototype.__init13.call(this),ai.prototype.__init14.call(this),ai.prototype.__init15.call(this),ai.prototype.__init16.call(this),ai.prototype.__init17.call(this)}__init(){this.state={showDecreaseMaxPointsDialog:!1,showDeleteScaleDialog:!1,showDeleteTraitDialog:!1,currentPosition:0,showRight:null,showLeft:null,showInfoDialog:!1,infoDialogText:""}}__init2(){this.set=e=>this.setState(e)}componentDidMount(){null===this.state.showRight&&this.secondaryBlockRef&&this.setState({showRight:this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth})}componentDidUpdate(e){e.scale.maxPoints===this.props.scale.maxPoints&&e.showDescription===this.props.showDescription&&e.excludeZero===this.props.excludeZero||this.setState({showRight:this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth})}UNSAFE_componentWillReceiveProps(e){e.excludeZero===this.props.excludeZero&&e.showStandards===this.props.showStandards&&e.showDescription===this.props.showDescription||this.setState({currentPosition:0,showLeft:!1,showRight:this.secondaryBlockRef&&this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth})}__init3(){this.updateMaxPointsFieldValue=({target:e})=>{const{scale:t,scaleIndex:n,onScaleChanged:o}=this.props||{},{maxPoints:i}=t,r=parseInt(e.value,10);this.setState({currentPosition:0,showLeft:!1,showRight:this.secondaryBlockRef&&this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth}),r<i?this.showDecreaseMaxPointsModal({newMaxPoints:r}):o(n,{maxPoints:r})}}__init4(){this.showDecreaseMaxPointsModal=({newMaxPoints:e})=>this.set({showDecreaseMaxPointsDialog:!0,newMaxPoints:e})}__init5(){this.hideDecreaseMaxPointsModal=()=>this.set({showDecreaseMaxPointsDialog:!1,newMaxPoints:void 0})}__init6(){this.changeMaxPoints=()=>{const{newMaxPoints:e}=this.state||{},{scaleIndex:t,onScaleChanged:n}=this.props||{};e&&n(t,{maxPoints:e}),this.hideDecreaseMaxPointsModal()}}__init7(){this.showDeleteScaleModal=()=>this.set({showDeleteScaleDialog:!0})}__init8(){this.hideDeleteScaleModal=()=>this.set({showDeleteScaleDialog:!1})}__init9(){this.deleteScale=()=>{const{scaleIndex:e,onScaleRemoved:t}=this.props||{};this.hideDeleteScaleModal(),t(e)}}__init10(){this.showDeleteTraitModal=e=>this.set({showDeleteTraitDialog:!0,traitToDeleteIndex:e})}__init11(){this.hideDeleteTraitModal=()=>this.set({showDeleteTraitDialog:!1,traitToDeleteIndex:void 0})}__init12(){this.onTraitRemoved=()=>{const{traitToDeleteIndex:e}=this.state,{scale:t,scaleIndex:n,onScaleChanged:o,minNoOfTraits:i}=this.props||{};let{traits:r,traitLabel:a}=t||{};if(!(e<0||e>=r.length)){if(r.length===i)return this.set({infoDialogText:`There can't be less than ${i} ${(a||"trait").toLowerCase()}s.`,showInfoDialog:!0}),!1;r=[...r.slice(0,e),...r.slice(e+1)],o(n,{traits:r}),this.hideDeleteTraitModal()}}}__init13(){this.onTraitAdded=()=>{const{scale:e,scaleIndex:t,onScaleChanged:n,maxNoOfTraits:o}=this.props||{},{traits:i,scorePointsLabels:r}=e||{};if(i.length===o)return this.set({infoDialogText:`There can't be more than ${o} scales.`,showInfoDialog:!0}),!1;i.push({name:"",description:"",standards:[],scorePointsDescriptors:Array.from({length:r.length},()=>"")}),n(t,{traits:i})}}__init14(){this.onTraitChanged=(e,t)=>{const{scale:n,scaleIndex:o,onScaleChanged:i}=this.props||{},{traits:r}=n||{};e>=0&&e<r.length&&(r[e]=t,i(o,{traits:r}))}}__init15(){this.onTraitDropped=e=>{const{active:t,over:n}=e;if(!n||!t)return;const o=t.data.current,i=n.data.current;if("trait"===ii([o,"optionalAccess",e=>e.type])&&"trait"===ii([i,"optionalAccess",e=>e.type])){const e=o.index,t=i.index;if(e===t)return;const{scale:n,scaleIndex:r,onScaleChanged:a}=this.props||{},{traits:l}=n||{},s=l[e],c=l.filter((t,n)=>n!==e);a(r,{traits:[...c.slice(0,t),s,...c.slice(t)]})}}}__init16(){this.decreasePosition=()=>{const{currentPosition:e}=this.state,t=e-(108===e?108:216);this.setState({currentPosition:t,showRight:t<this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth,showLeft:t>0})}}__init17(){this.increasePosition=()=>{const{currentPosition:e}=this.state,t=e+(0===e?108:216);this.setState({currentPosition:t,showRight:t<this.secondaryBlockRef.scrollWidth-this.secondaryBlockRef.offsetWidth,showLeft:t>0})}}render(){const{errors:e,scale:t,scaleIndex:n,showStandards:o,onScaleChanged:i,excludeZero:r,showDescription:a,showLevelTagInput:l,showScorePointLabels:s,enableDragAndDrop:c,spellCheck:d,width:u,uploadSoundSupport:p,maxPointsEnabled:h,mathMlOptions:g={},maxMaxPoints:m,expandedPluginProps:f={},labelPluginProps:b={},imageSupport:v={}}=this.props||{},{maxPoints:y,scorePointsLabels:x,traitLabel:w,traits:S}=t||{},{showDecreaseMaxPointsDialog:E,showDeleteScaleDialog:D,showDeleteTraitDialog:C,currentPosition:P,showRight:_,showLeft:T,showInfoDialog:k,infoDialogText:M}=this.state,{traitsErrors:R,scorePointsErrors:L}=e||{},I=R&&R[n]||{},O=L&&L[n]||{},A=[],N=parseInt(u)-32-200||320;for(let e=y;e>=r;e-=1)A.push(e);return Go.createElement(oi,{onDragEnd:this.onTraitDropped},Go.createElement(ri,{key:`scale-${n}`,ref:e=>{this.scaleWrapper=e}},Go.createElement(Ge,{setSecondaryBlockRef:e=>{e&&(this.secondaryBlockRef=e)},key:"header-key",errors:O,traitLabel:w,scorePointsValues:A,scorePointsLabels:x,onScaleChange:e=>i(n,e),onTraitLabelChange:e=>i(n,{traitLabel:e}),showStandards:o,showDescription:a,showLevelTagInput:l,showScorePointLabels:s,maxPoints:y,updateMaxPointsFieldValue:this.updateMaxPointsFieldValue,scaleIndex:n,showDeleteScaleModal:this.showDeleteScaleModal,currentPosition:P,secondaryBlockWidth:N,spellCheck:d,uploadSoundSupport:p,maxPointsEnabled:h,mathMlOptions:g,maxMaxPoints:m,expandedPluginProps:f,labelPluginProps:b,imageSupport:v}),S.map((e,t)=>Go.createElement(Jo,{key:t,index:t,error:I&&I[t],trait:e,traitLabel:w||"Trait",scorePointsValues:A,scorePointsLabels:x,onTraitRemoved:()=>this.showDeleteTraitModal(t),onTraitChanged:e=>this.onTraitChanged(t,e),showStandards:o,showDescription:a,maxPoints:y,currentPosition:P,enableDragAndDrop:c,secondaryBlockWidth:N,spellCheck:d,uploadSoundSupport:p,mathMlOptions:g,expandedPluginProps:f,labelPluginProps:b,imageSupport:v})),Go.createElement(We,{width:"108px",show:T,onClick:this.decreasePosition,left:"200px",showLevelTagInput:l},Go.createElement(ti,null)),Go.createElement(We,{width:"108px",show:_,onClick:this.increasePosition,showLevelTagInput:l},Go.createElement(ni,null)),Go.createElement(ve,{onClick:this.onTraitAdded},Go.createElement("div",{dangerouslySetInnerHTML:{__html:`Add ${w||" Trait"}`}})),Go.createElement(J,{open:!!E,deleteScorePoints:this.changeMaxPoints,cancel:this.hideDecreaseMaxPointsModal}),Go.createElement(G,{open:!!D,scaleIndex:n,deleteScale:this.deleteScale,cancel:this.hideDeleteScaleModal}),Go.createElement(Q,{open:!!C,deleteTrait:this.onTraitRemoved,cancel:this.hideDeleteTraitModal,traitLabel:w.toLowerCase()}),Go.createElement(ee,{open:k,text:M,onClose:()=>this.set({showInfoDialog:!1})})))}}ai.propTypes={errors:Qo.object,scale:Qo.shape({maxPoints:Qo.number,scorePointsLabels:Qo.arrayOf(Qo.string),traitLabel:Qo.string,traits:Qo.arrayOf(Qo.shape({name:Qo.string,standards:Qo.arrayOf(Qo.string),scorePointsDescriptors:Qo.arrayOf(Qo.string),description:Qo.string}))}),width:Qo.string,excludeZero:Qo.bool,scaleIndex:Qo.number,onScaleChanged:Qo.func,onScaleRemoved:Qo.func,showStandards:Qo.bool,showLevelTagInput:Qo.bool,showDescription:Qo.bool,uploadSoundSupport:Qo.object,showScorePointLabels:Qo.bool,enableDragAndDrop:Qo.bool,expandedPluginProps:Qo.object,labelPluginProps:Qo.object};const li=r,si=t,{cloneDeep:ci}=s,{isEmpty:di}=s,{debounce:ui}=s,{styled:pi}=n,{layout:hi}=c,{settings:gi}=c;function mi(e){let t,n=e[0],o=1;for(;o<e.length;){const i=e[o],r=e[o+1];if(o+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=r(n)):"call"!==i&&"optionalCall"!==i||(n=r((...e)=>n.call(t,...e)),t=void 0)}return n}const{Panel:fi,toggle:bi}=gi,vi=pi("div")(({theme:e})=>({fontFamily:"Cerebri Sans",fontSize:e.typography.fontSize,padding:"16px 0"})),yi=({showExcludeZeroDialog:e,excludeZero:t,changeExcludeZero:n,cancel:o})=>e&&!t?li.createElement(K,{open:e&&!t,changeExcludeZero:n,cancel:o}):e&&t?li.createElement(q,{open:e&&t,changeExcludeZero:n,cancel:o}):null;yi.propTypes={showExcludeZeroDialog:si.bool,excludeZero:si.bool,changeExcludeZero:si.func,cancel:si.func};class xi extends li.Component{constructor(e){super(e),xi.prototype.__init.call(this),xi.prototype.__init2.call(this),xi.prototype.__init3.call(this),xi.prototype.__init4.call(this),xi.prototype.__init5.call(this),xi.prototype.__init6.call(this),xi.prototype.__init7.call(this),xi.prototype.__init8.call(this),xi.prototype.__init9.call(this),xi.prototype.__init10.call(this),xi.prototype.__init11.call(this),xi.prototype.__init12.call(this),xi.prototype.__init13.call(this),xi.prototype.__init14.call(this),xi.prototype.__init15.call(this),xi.prototype.__init16.call(this),this.divRef=li.createRef(),this.updateDivWidth=this.updateDivWidth.bind(this)}__init(){this.state={showDecreaseMaxPointsDialog:!1,showDeleteScaleDialog:!1,showDeleteTraitDialog:!1,showExcludeZeroDialog:!1,showInfoDialog:!1,infoDialogText:"",adjustedWidth:"650px",initialUpdateCompleted:!1}}componentDidMount(){window.addEventListener("resize",this.updateDivWidthDebounced),window.addEventListener("load",this.updateDivWidth),setTimeout(this.updateDivWidth,0)}componentWillUnmount(){window.removeEventListener("resize",this.updateDivWidthDebounced),window.removeEventListener("load",this.updateDivWidth)}componentDidUpdate(){this.state.initialUpdateCompleted||(this.updateDivWidth(),this.setState({initialUpdateCompleted:!0}))}updateDivWidth(){if(this.divRef&&this.divRef.current){const e=this.divRef.current.offsetWidth;e!==this.state.adjustedWidth&&this.set({adjustedWidth:e})}}__init2(){this.updateDivWidthDebounced=ui(()=>this.updateDivWidth(),50)}__init3(){this.onScaleAdded=()=>{const{model:e,onModelChanged:t,configuration:n}=this.props;let{scales:o,excludeZero:i}=e||{};const{maxNoOfScales:r}=n||{};let{defaultTraitLabel:a}=n||"";if(o.length||(o=[]),a="string"==typeof a?a:mi([o,"access",e=>e[0],"optionalAccess",e=>e.traitLabel])||"",o.length===r)return this.set({infoDialogText:`There can't be more than ${r} scales.`,showInfoDialog:!0}),!1;o.push({maxPoints:1,scorePointsLabels:i?[""]:["",""],traitLabel:a,traits:[]}),t({...e,scales:o})}}__init4(){this.onScaleChanged=(e,t)=>{const{model:n,onModelChanged:o}=this.props;let i=ci((n||{}).scales);if(e<0||e>=i.length||di(t))return!1;Object.keys(t).forEach(n=>{i[e][n]=t[n]}),n.excludeZero&&1===t.maxPoints&&(n.excludeZero=!1,i=oe(i,z)),o({...n,scales:i})}}__init5(){this.onScaleRemoved=e=>{const{model:t,onModelChanged:n,configuration:o}=this.props;let{scales:i}=t||{};const{minNoOfScales:r}=o||{};return!(e<0||e>=i.length)&&(i.length===r?(this.set({infoDialogText:`There can't be less than ${r} scales.`,showInfoDialog:!0}),!1):(i=[...i.slice(0,e),...i.slice(e+1)],void n({...t,scales:i})))}}__init6(){this.onHalfScoringChanged=()=>{const{model:e,onModelChanged:t}=this.props;let{halfScoring:n}=e||{};t({...e,halfScoring:!n})}}__init7(){this.onVisibleToStudentChanged=()=>{const{model:e,onModelChanged:t}=this.props;let{visibleToStudent:n}=e||{};t({...e,visibleToStudent:!n})}}__init8(){this.set=e=>this.setState(e)}__init9(){this.changeShowScorePointLabels=()=>{const{model:e,onModelChanged:t}=this.props||{};let{pointLabels:n}=e||{};n=!n,t({...e,pointLabels:n})}}__init10(){this.changeShowDescription=()=>{const{model:e,onModelChanged:t}=this.props||{};let{description:n}=e||{};n=!n,t({...e,description:n})}}__init11(){this.changeShowStandards=()=>{const{model:e,onModelChanged:t}=this.props||{};let{standards:n}=e||{};n=!n,t({...e,standards:n})}}__init12(){this.showToggleExcludeZeroModal=()=>this.set({showExcludeZeroDialog:!0})}__init13(){this.hideToggleExcludeZeroModal=()=>{this.set({showExcludeZeroDialog:!1})}}__init14(){this.onCloseInfoDialog=()=>this.set({showInfoDialog:!1})}__init15(){this.changeExcludeZero=e=>{const{model:t,onModelChanged:n}=this.props||{},{scales:o}=t||{};let{excludeZero:i}=t||{};if(!o||!o.length)return;i=!i;const r=oe(o,e);n({...t,scales:r,excludeZero:i}),this.hideToggleExcludeZeroModal()}}__init16(){this.onModelChanged=(e,t)=>{const{onModelChanged:n}=this.props||{};"excludeZero"===t?this.showToggleExcludeZeroModal():n(e)}}render(){const{model:e,configuration:t,onConfigurationChanged:n,uploadSoundSupport:o,imageSupport:i}=this.props||{},{addScale:r,baseInputConfiguration:a={},dragAndDrop:l,contentDimensions:s={},showDescription:c,showExcludeZero:d,showLevelTagInput:u,showStandards:p,showHalfScoring:h,showMaxPoint:g,showScorePointLabels:m,showVisibleToStudent:f,spellCheck:b={},settingsPanelDisabled:v,maxNoOfTraits:y,minNoOfTraits:x,width:w,mathMlOptions:S={},maxMaxPoints:E,expandedInput:D={},labelInput:C={}}=t||{},{errors:P,extraCSSRules:_,scales:T,excludeZero:k,description:M,pointLabels:R,standards:L,spellCheckEnabled:I,maxPointsEnabled:O,addScaleEnabled:A}=e||{},{showExcludeZeroDialog:N,showInfoDialog:B,infoDialogText:j,adjustedWidth:W}=this.state||{},Z=mi([T,"optionalAccess",e=>e.some,"call",e=>e(e=>1===e.maxPoints)]),z={standards:p.settings&&bi(p.label),"showLevelTagInput.enabled":u.settings&&bi(u.label,!0),visibleToStudent:f.settings&&bi(f.label),excludeZero:d.settings&&bi(d.label,!1,Z),halfScoring:h.settings&&bi(h.label),"dragAndDrop.enabled":l.settings&&bi(l.label,!0)},F={description:c.settings&&bi(c.label),pointLabels:m.settings&&bi(m.label),spellCheckEnabled:b.settings&&bi(b.label),maxPointsEnabled:g.settings&&bi(g.label),addScaleEnabled:r.settings&&bi(r.label)},$=e=>Object.assign({...a},e||{});return li.createElement(hi.ConfigLayout,{extraCSSRules:_,dimensions:s,hideSettings:v,settings:li.createElement(fi,{model:e,onChangeModel:this.onModelChanged,configuration:t,onChangeConfiguration:n,groups:{Settings:z,Properties:F},modal:li.createElement(yi,{showExcludeZeroDialog:N,excludeZero:k,changeExcludeZero:this.changeExcludeZero,cancel:this.hideToggleExcludeZeroModal})})},li.createElement("div",{style:{width:"100%"},ref:this.divRef}),li.createElement(vi,{style:{width:w||W}},(T||[]).map((e,t)=>li.createElement(ai,{key:`scale-${t}`,scale:e,scaleIndex:t,errors:P,onScaleRemoved:this.onScaleRemoved,onScaleChanged:this.onScaleChanged,showStandards:L,showScorePointLabels:R,showDescription:M,showLevelTagInput:u.enabled,excludeZero:k,enableDragAndDrop:l.enabled,spellCheck:I,width:W,uploadSoundSupport:o,maxPointsEnabled:O,maxNoOfTraits:y,minNoOfTraits:x,imageSupport:i,...this.props,mathMlOptions:S,maxMaxPoints:E,expandedPluginProps:$(mi([D,"optionalAccess",e=>e.inputConfiguration])),labelPluginProps:$(mi([C,"optionalAccess",e=>e.inputConfiguration]))})),A&&li.createElement(ve,{onClick:this.onScaleAdded},"Add Scale")),li.createElement(ee,{open:B,text:j,onClose:()=>this.set({showInfoDialog:!1})}))}}xi.propTypes={model:si.object,uploadSoundSupport:si.object,configuration:si.object,onModelChanged:si.func,onConfigurationChanged:si.func,imageSupport:si.shape({add:si.func.isRequired,delete:si.func.isRequired})};const wi=r,Si=e=>({...C.model,...e}),Ei=e=>({...C.configuration,...e});class Di extends HTMLElement{constructor(){super(),Di.prototype.__init.call(this),Di.prototype.__init2.call(this),Di.prototype.__init3.call(this),this._root=null,this._model=Si(),this._configuration=Ei()}__init(){this.updateModelAccordingToReceivedProps=e=>{const t={...this._model};if(!e)return t;const n={...e},{scales:o,excludeZero:i}=n||{};return(o||[]).forEach(e=>{e||(e={scorePointsLabels:[],traits:[]});const{maxPoints:t}=e||{};e.scorePointsLabels=[...e.scorePointsLabels||[]],e.traits=[...e.traits||[]];const n=i?t:t+1,o=e.scorePointsLabels.length;if(o!==n)if(o<n)for(let t=0;t<n-o;t++)e.scorePointsLabels.push("");else e.scorePointsLabels=e.scorePointsLabels.slice(0,n);(e.traits||[]).forEach(e=>{e||(e={scorePointsDescriptors:[]}),e.scorePointsDescriptors=[...e.scorePointsDescriptors||[]];const t=e.scorePointsDescriptors.length;if(t!==n)if(t<n)for(let o=0;o<n-t;o++)e.scorePointsDescriptors.push("");else e.scorePointsDescriptors=e.scorePointsDescriptors.slice(0,n)})}),n.excludeZero&&n.scales.some(e=>1===e.maxPoints)&&(n.excludeZero=!1,n.scales=oe(o,z)),n}}set model(e){this._model=this.updateModelAccordingToReceivedProps(Si(e)),this._render()}set configuration(e){this._configuration=Ei(e),this._render()}__init2(){this.onModelChanged=e=>{this._model=this.updateModelAccordingToReceivedProps(Si(e)),this._render(),this.dispatchEvent(new g(this._model,!1))}}__init3(){this.onConfigurationChanged=e=>{this._configuration=Ei(e),this._render()}}insertSound(e){this.dispatchEvent(new E(e))}onDeleteSound(e,t){this.dispatchEvent(new x(e,t))}insertImage(e){this.dispatchEvent(new v(e))}onDeleteImage(e,t){this.dispatchEvent(new f(e,t))}_render(){if(this._model){let e=wi.createElement(xi,{model:this._model,configuration:this._configuration,onModelChanged:this.onModelChanged,onConfigurationChanged:this.onConfigurationChanged,uploadSoundSupport:{add:this.insertSound.bind(this),delete:this.onDeleteSound.bind(this)},imageSupport:{add:this.insertImage.bind(this),delete:this.onDeleteImage.bind(this)}});this._root||(this._root=S(this)),this._root.render(e)}}disconnectedCallback(){this._root&&this._root.unmount()}}export{Di as default};
|
package/module/controller.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
var defaults = {
|
|
2
|
-
addScaleEnabled: true,
|
|
3
|
-
description: false,
|
|
4
|
-
excludeZero: false,
|
|
5
|
-
halfScoring: false,
|
|
6
|
-
maxPointsEnabled: true,
|
|
7
|
-
pointLabels: true,
|
|
8
|
-
scales: [],
|
|
9
|
-
standards: false,
|
|
10
|
-
visibleToStudent: true,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const markupToText = (s) => {
|
|
14
|
-
return (s || '').replace(/(<([^>]+)>)/ig, '');
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function createDefaultModel(model = {}) {
|
|
18
|
-
return new Promise((resolve) => resolve({ ...defaults, ...model }));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const normalize = (question) => ({ ...defaults, ...question });
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {*} question
|
|
26
|
-
* @param {*} session
|
|
27
|
-
* @param {*} env
|
|
28
|
-
*/
|
|
29
|
-
async function model(question, session, env) {
|
|
30
|
-
const normalizedQuestion = normalize(question);
|
|
31
|
-
|
|
32
|
-
if (!env.role || env.role === 'student') {
|
|
33
|
-
normalizedQuestion.visible = normalizedQuestion.visibleToStudent;
|
|
34
|
-
} else {
|
|
35
|
-
normalizedQuestion.visible = true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// todo update pie-ui instead of parsing this here:
|
|
39
|
-
const { scales, excludeZero } = normalizedQuestion || {};
|
|
40
|
-
const parsedScales = (scales || []).map((scale) => ({ ...scale, excludeZero }));
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
...normalizedQuestion,
|
|
44
|
-
scales: parsedScales,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const getScore = () => 0;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @param {Object} model - the main model
|
|
52
|
-
* @param {*} session
|
|
53
|
-
* @param {Object} env
|
|
54
|
-
*/
|
|
55
|
-
function outcome() {
|
|
56
|
-
return new Promise((resolve) => resolve({ score: 0, empty: true }));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const createCorrectResponseSession = (question, env) => {
|
|
60
|
-
return new Promise((resolve) => {
|
|
61
|
-
if (env.mode !== 'evaluate' && env.role === 'instructor') {
|
|
62
|
-
resolve({ id: '1' });
|
|
63
|
-
} else {
|
|
64
|
-
resolve(null);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// IMPORTANT! If you make any changes to this function, please make sure you also update complex-rubric/controller/validateMultiTraitRubric function!“.
|
|
70
|
-
const validate = (model, config) => {
|
|
71
|
-
const { scales, description = false, pointLabels = false } = model;
|
|
72
|
-
const errors = {};
|
|
73
|
-
const traitsErrors = {};
|
|
74
|
-
const scorePointsErrors = {};
|
|
75
|
-
|
|
76
|
-
(scales || []).forEach((scale, scaleIndex) => {
|
|
77
|
-
const { traits = [] } = scale;
|
|
78
|
-
const { scorePointsLabels = [] } = scale;
|
|
79
|
-
const scaleErrors = {};
|
|
80
|
-
const scorePointsLabelsErrors = {};
|
|
81
|
-
|
|
82
|
-
if (pointLabels) {
|
|
83
|
-
scorePointsLabels.forEach((scorePointLabel, scoreIndex) => {
|
|
84
|
-
if (!scorePointLabel || scorePointLabel === '<div></div>') {
|
|
85
|
-
scorePointsLabelsErrors[scoreIndex] = 'Points labels should not be empty.';
|
|
86
|
-
} else {
|
|
87
|
-
const identicalScorePointLabel = scorePointsLabels
|
|
88
|
-
.slice(scoreIndex + 1)
|
|
89
|
-
.some((s) => markupToText(s) === markupToText(scorePointLabel));
|
|
90
|
-
|
|
91
|
-
if (identicalScorePointLabel) {
|
|
92
|
-
scorePointsLabelsErrors[scoreIndex] = 'Points labels should be unique.';
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (Object.keys(scorePointsLabelsErrors).length > 0) {
|
|
99
|
-
scorePointsErrors[scaleIndex] = scorePointsLabelsErrors;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
traits.forEach((trait, traitIndex) => {
|
|
103
|
-
if (!trait.name || trait.name === '<div></div>') {
|
|
104
|
-
scaleErrors[traitIndex] = { name: 'Trait names should not be empty.' };
|
|
105
|
-
} else {
|
|
106
|
-
const identicalTraitName = traits
|
|
107
|
-
.slice(traitIndex + 1)
|
|
108
|
-
.some((t) => markupToText(t.name) === markupToText(trait.name));
|
|
109
|
-
|
|
110
|
-
if (identicalTraitName) {
|
|
111
|
-
scaleErrors[traitIndex] = { name: 'Trait names should be unique.' };
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (description && (!trait.description || trait.description === '<div></div>')) {
|
|
115
|
-
scaleErrors[traitIndex] = { ...scaleErrors[traitIndex], description: 'Trait description should not be empty' };
|
|
116
|
-
} else {
|
|
117
|
-
const identicalTraitDescr = traits
|
|
118
|
-
.slice(traitIndex + 1)
|
|
119
|
-
.some((t) => markupToText(t.description) === markupToText(trait.description));
|
|
120
|
-
|
|
121
|
-
if (description && identicalTraitDescr) {
|
|
122
|
-
scaleErrors[traitIndex] = { ...scaleErrors[traitIndex], description: 'Trait descriptions should be unique.' };
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
if (Object.keys(scaleErrors).length > 0) {
|
|
127
|
-
traitsErrors[scaleIndex] = scaleErrors;
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
if (Object.keys(traitsErrors).length > 0) {
|
|
132
|
-
errors.traitsErrors = traitsErrors;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (Object.keys(scorePointsErrors).length > 0) {
|
|
136
|
-
errors.scorePointsErrors = scorePointsErrors;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return errors;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export { createCorrectResponseSession, createDefaultModel, getScore, model, normalize, outcome, validate };
|
package/module/demo.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import Configure from './configure.js';
|
|
2
|
-
import Element from './element.js';
|
|
3
|
-
import * as controller from './controller.js';
|
|
4
|
-
|
|
5
|
-
var generate = {};
|
|
6
|
-
|
|
7
|
-
generate.model = (id, element) => ({
|
|
8
|
-
visibleToStudent: true,
|
|
9
|
-
halfScoring: false,
|
|
10
|
-
pointLabels: true,
|
|
11
|
-
description: false,
|
|
12
|
-
standards: false,
|
|
13
|
-
scales: [
|
|
14
|
-
{
|
|
15
|
-
maxPoints: 4,
|
|
16
|
-
scorePointsLabels: [
|
|
17
|
-
'<div>Non-Scorable</div>',
|
|
18
|
-
'<div>Developing</div>',
|
|
19
|
-
'<div>Progressing</div>',
|
|
20
|
-
'<div>Effective</div>',
|
|
21
|
-
],
|
|
22
|
-
traitLabel: 'Trait',
|
|
23
|
-
traits: [
|
|
24
|
-
{
|
|
25
|
-
name: '<div>Ideas</div>',
|
|
26
|
-
standards: [],
|
|
27
|
-
description: 'the main message',
|
|
28
|
-
scorePointsDescriptors: [
|
|
29
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
30
|
-
'<div>Topic undefined and/or difficult to followDetails are unclear</div>',
|
|
31
|
-
'<div>Topic too broadDetails are limited</div>',
|
|
32
|
-
'<div>Writing stays on topicComplete details given</div>',
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: '<div>Organization</div>',
|
|
37
|
-
standards: [],
|
|
38
|
-
description: 'the internal structure of the piece',
|
|
39
|
-
scorePointsDescriptors: [
|
|
40
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
41
|
-
'<div>Does not have a beginning, middle and/or endDoes not have a lead and/or conclusionTransitions confusing and/or not presentNot written in logical orderNo sign of paragraphing / incorrect paragraphing</div>',
|
|
42
|
-
'<div>Weak beginning, middle and endHas evidence of a lead and/or conclusion but missing elementsTransitions are used sometimesSome logical orderMost paragraphing incorrect</div>',
|
|
43
|
-
'<div>Has an acceptable beginning, middle and endIncludes a lead and conclusionTransitions are used correctlyMostly logical orderMostly correct paragraphing</div>',
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: '<div>Word Choice</div>',
|
|
48
|
-
standards: [],
|
|
49
|
-
description: 'the vocabulary a writer chooses to convey meaning',
|
|
50
|
-
scorePointsDescriptors: [
|
|
51
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
52
|
-
'<div>Vocabulary is limited/used incorrectlyNo figurative language; words do not convey meaning</div>',
|
|
53
|
-
'<div>Generally correct wordsAttempt at figurative languageand/or words convey general meaning</div>',
|
|
54
|
-
'<div>Some active verbs and precise nounsEffective use of figurative language and/or words that enhance meaning</div>',
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: '<div>Sentence Fluency</div>',
|
|
59
|
-
standards: [],
|
|
60
|
-
description: 'the rhythm and flow of the language',
|
|
61
|
-
scorePointsDescriptors: [
|
|
62
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
63
|
-
'<div>No sentences are clearNo variety in sentence structureFrequent run-ons and/or fragments are present</div>',
|
|
64
|
-
'<div>Some sentences are clearSentence variety used rarelySome run-ons and/or fragments are present</div>',
|
|
65
|
-
'<div>Most sentences are clearSome sentence variety is usedRun-ons and/or fragments are rare</div>',
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
name: '<div>Conventions</div>',
|
|
70
|
-
standards: [],
|
|
71
|
-
description: 'the mechanical correctness',
|
|
72
|
-
scorePointsDescriptors: [
|
|
73
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
74
|
-
'<div>Many distracting errors are present in grammar, punctuation, capitalization and/or spelling</div>',
|
|
75
|
-
'<div>Errors in grammar, punctuation, capitalization and/or spelling are present and some distract from meaning</div>',
|
|
76
|
-
'<div>Errors in grammar, punctuation, capitalization and/or spelling are present but don’t distract from meaning</div>',
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: '<div>Voice</div>',
|
|
81
|
-
standards: [],
|
|
82
|
-
description: "the personal tone and flavor of the author's message",
|
|
83
|
-
scorePointsDescriptors: [
|
|
84
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
85
|
-
'<div>Not concerned with audience or purposeNo viewpoint (perspective) usedWriting is mechanical and lifeless</div>',
|
|
86
|
-
'<div>Shows beginning awareness of audience/purposeSome viewpoint (perspective) used throughout the pieceWriting is distant, too formal or informal</div>',
|
|
87
|
-
'<div>Awareness of audience; purpose is clear most of the timeUses viewpoint (perspective) throughout most of the paperWriting is pleasant, agreeable and satisfying</div>',
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
maxPoints: 5,
|
|
94
|
-
scorePointsLabels: [
|
|
95
|
-
'<div>Non-Scorable</div>',
|
|
96
|
-
'<div>Unsatisfactory</div>',
|
|
97
|
-
'<div>Satisfactory</div>',
|
|
98
|
-
'<div></div>',
|
|
99
|
-
'<div></div>',
|
|
100
|
-
],
|
|
101
|
-
traitLabel: 'Category',
|
|
102
|
-
traits: [
|
|
103
|
-
{
|
|
104
|
-
name: '<div>Presentation</div>',
|
|
105
|
-
standards: [],
|
|
106
|
-
description: '',
|
|
107
|
-
scorePointsDescriptors: [
|
|
108
|
-
'<div>Handwriting is unreadable, or response is blank, not in English, or too brief to evaluate. </div>',
|
|
109
|
-
'<div>Handwriting poorOverall appearance is distracting to unacceptable</div>',
|
|
110
|
-
'<div>Handwriting is generally legibleOverall appearance is acceptable or better</div>',
|
|
111
|
-
'<div></div>',
|
|
112
|
-
'<div></div>',
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
excludeZero: true,
|
|
119
|
-
maxPointsEnabled: true,
|
|
120
|
-
addScaleEnabled: true,
|
|
121
|
-
id,
|
|
122
|
-
element,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const { model } = generate;
|
|
126
|
-
|
|
127
|
-
var config = {
|
|
128
|
-
elements: {
|
|
129
|
-
'multi-trait-rubric': '../..',
|
|
130
|
-
},
|
|
131
|
-
models: [model('1', 'multi-trait-rubric')],
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
//Note: demo-el is a custom element loaded in the markup.
|
|
135
|
-
customElements.whenDefined("demo-el").then(() => {
|
|
136
|
-
config.models.forEach((m) => {
|
|
137
|
-
const de = document.createElement("demo-el");
|
|
138
|
-
document.body.appendChild(de);
|
|
139
|
-
de.def = { tagName: m.element, Element, Configure, controller };
|
|
140
|
-
de.model = m;
|
|
141
|
-
});
|
|
142
|
-
});
|
package/module/element.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_dll_pie_lib__math_rendering as e}from"../../../@pie-lib/math-rendering-module@^4.0.5/module/index.js";import{_dll_react_dom as t,_dll_prop_types as r,_dll_mui__material_styles as n,_dll_pie_lib__render_ui as o,_dll_mui__icons_material as s,_dll_mui__material as a,_dll_mui__material_collapse as l}from"../../../@pie-lib/shared-module@^3.0.5/module/index.js";var i={exports:{}},c={},u=Symbol.for("react.element"),p=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),b=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.iterator;var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function k(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||v}function L(){}function W(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||v}k.prototype.isReactComponent={},k.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},L.prototype=k.prototype;var C=W.prototype=new L;C.constructor=W,w(C,k.prototype),C.isPureReactComponent=!0;var R=Array.isArray,$=Object.prototype.hasOwnProperty,P={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var n,o={},s=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)$.call(t,n)&&!D.hasOwnProperty(n)&&(o[n]=t[n]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var i=Array(l),c=0;c<l;c++)i[c]=arguments[c+2];o.children=i}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===o[n]&&(o[n]=l[n]);return{$$typeof:u,type:e,key:s,ref:a,props:o,_owner:P.current}}function I(e){return"object"==typeof e&&null!==e&&e.$$typeof===u}var T=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function M(e,t,r,n,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var a=!1;if(null===e)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case p:a=!0}}if(a)return o=o(a=e),e=""===n?"."+j(a,0):n,R(o)?(r="",null!=e&&(r=e.replace(T,"$&/")+"/"),M(o,t,r,"",function(e){return e})):null!=o&&(I(o)&&(o=function(e,t){return{$$typeof:u,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=""===n?".":n+":",R(e))for(var l=0;l<e.length;l++){var i=n+j(s=e[l],l);a+=M(s,t,r,i,o)}else if(i=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}(e),"function"==typeof i)for(e=i.call(e),l=0;!(s=e.next()).done;)a+=M(s=s.value,t,r,i=n+j(s,l++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function A(e,t,r){if(null==e)return e;var n=[],o=0;return M(e,n,"","",function(e){return t.call(r,e,o++)}),n}function H(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var V={current:null},B={transition:null},U={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:B,ReactCurrentOwner:P};function F(){throw Error("act(...) is not supported in production builds of React.")}c.Children={map:A,forEach:function(e,t,r){A(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},c.Component=k,c.Fragment=d,c.Profiler=f,c.PureComponent=W,c.StrictMode=h,c.Suspense=g,c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,c.act=F,c.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=w({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=P.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(i in t)$.call(t,i)&&!D.hasOwnProperty(i)&&(n[i]=void 0===t[i]&&void 0!==l?l[i]:t[i])}var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){l=Array(i);for(var c=0;c<i;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:u,type:e.type,key:o,ref:s,props:n,_owner:a}},c.createContext=function(e){return(e={$$typeof:b,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},c.createElement=O,c.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},c.createRef=function(){return{current:null}},c.forwardRef=function(e){return{$$typeof:y,render:e}},c.isValidElement=I,c.lazy=function(e){return{$$typeof:S,_payload:{_status:-1,_result:e},_init:H}},c.memo=function(e,t){return{$$typeof:_,type:e,compare:void 0===t?null:t}},c.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},c.unstable_act=F,c.useCallback=function(e,t){return V.current.useCallback(e,t)},c.useContext=function(e){return V.current.useContext(e)},c.useDebugValue=function(){},c.useDeferredValue=function(e){return V.current.useDeferredValue(e)},c.useEffect=function(e,t){return V.current.useEffect(e,t)},c.useId=function(){return V.current.useId()},c.useImperativeHandle=function(e,t,r){return V.current.useImperativeHandle(e,t,r)},c.useInsertionEffect=function(e,t){return V.current.useInsertionEffect(e,t)},c.useLayoutEffect=function(e,t){return V.current.useLayoutEffect(e,t)},c.useMemo=function(e,t){return V.current.useMemo(e,t)},c.useReducer=function(e,t,r){return V.current.useReducer(e,t,r)},c.useRef=function(e){return V.current.useRef(e)},c.useState=function(e){return V.current.useState(e)},c.useSyncExternalStore=function(e,t,r){return V.current.useSyncExternalStore(e,t,r)},c.useTransition=function(){return V.current.useTransition()},c.version="18.3.1",i.exports=c;var q=i.exports;var N,Y=t;N=Y.createRoot,Y.hydrateRoot;var z={};Object.defineProperty(z,"__esModule",{value:!0});class Z extends CustomEvent{constructor(e,t,r){super(Z.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:r}}),this.component=e,this.complete=t}}Z.TYPE="model-set";var G=z.ModelSetEvent=Z;class J extends CustomEvent{constructor(e,t){super(J.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}J.TYPE="session-changed",z.SessionChangedEvent=J;const K=r,{styled:Q}=n,{color:X}=o,ee=Q("td")({color:X.primaryDark(),verticalAlign:"middle"}),te=Q("div")({color:X.secondaryBackground(),textAlign:"center"}),re=e=>{const{trait:t,traitIndex:r,scaleIndex:n,showStandards:o,showDescription:s,scorePointsValues:a}=e,{name:l,standards:i,scorePointsDescriptors:c,description:u}=t||{};return q.createElement("tr",{key:`scale-${n}-trait-${r}`},q.createElement(ee,null,q.createElement("div",{dangerouslySetInnerHTML:{__html:l}})),o?q.createElement("td",null,q.createElement("div",{dangerouslySetInnerHTML:{__html:i.join(",")}})):null,s?q.createElement("td",null,q.createElement("div",{dangerouslySetInnerHTML:{__html:u}})):null,a&&a.map((e,t)=>{let r;try{r=c[a.length-t-1]||""}catch(e){r=""}return q.createElement("td",{key:`table-cell-${t}`},r?q.createElement("div",{dangerouslySetInnerHTML:{__html:r}}):q.createElement(te,{dangerouslySetInnerHTML:{__html:"No Description"}}))}))};re.propTypes={showStandards:K.bool,showDescription:K.bool,scorePointsValues:K.arrayOf(K.number),scaleIndex:K.number,traitIndex:K.number,trait:K.shape({name:K.string,standards:K.arrayOf(K.string),scorePointsDescriptors:K.arrayOf(K.string),description:K.string})};const ne=r,{styled:oe}=n,{color:se}=o,{ArrowBackIos:ae}=s,{ArrowForwardIos:le}=s,ie=oe("div")({display:"flex",position:"relative"}),ce=oe("div")({width:"100%",overflow:"auto"}),ue=oe("table")(({theme:e})=>({borderSpacing:0,marginBottom:e.spacing(2),borderRadius:"4px",color:se.text(),fontSize:e.typography.fontSize,lineHeight:"16px",overflow:"unset","& ul, ol":{marginBlockStart:0,paddingInlineStart:e.spacing(2)},"& th":{padding:e.spacing(2),textAlign:"left",backgroundColor:se.secondaryBackground(),verticalAlign:"bottom"},"& th div":{width:"200px"},"& td":{width:"200px",padding:`${e.spacing(2)} ${e.spacing(1)}`,verticalAlign:"top"}})),pe=oe("table")({"& td":{border:0,padding:0,textAlign:"center",minWidth:"200px"}}),de=oe("div")({marginBottom:"4px"}),he=oe("td")({fontWeight:"normal"}),fe=({show:e,onClick:t,extraStyles:r,children:n})=>q.createElement("div",{style:{height:"calc(100% - 1px)",top:"1px",display:e?"flex":"none",width:"50px",margin:"auto",position:"absolute",alignItems:"center",justifyContent:"center",cursor:"pointer",...r},onClick:t},n);fe.propTypes={show:ne.bool,onClick:ne.func,extraStyles:ne.object,children:ne.object};class me extends q.Component{constructor(...e){super(...e),me.prototype.__init.call(this),me.prototype.__init2.call(this),me.prototype.__init3.call(this)}__init(){this.state={}}componentDidMount(){this.tableWrapper&&this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth&&this.setState({showRight:!0})}__init2(){this.scrollLeft=()=>{this.tableWrapper.scrollLeft-=this.tableWrapper.offsetWidth/2,this.setState({showRight:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}__init3(){this.scrollRight=()=>{const e=this.tableWrapper.scrollLeft;this.tableWrapper.scrollLeft+=this.tableWrapper.offsetWidth/2,this.setState({showRight:e!==this.tableWrapper.scrollLeft&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}}render(){const{showRight:e,showLeft:t}=this.state,{scale:r,scaleIndex:n,showDescription:o,showPointsLabels:s,showStandards:a,arrowsDisabled:l}=this.props,{excludeZero:i,maxPoints:c,traitLabel:u,traits:p,scorePointsLabels:d}=r||{};let h,f,m,b=[];try{for(let e=c;e>=i;e-=1)b.push(e);const{traitStandards:e,traitDescriptions:t}=p.reduce((e,t)=>({traitStandards:[...e.traitStandards,...t.standards||[]],traitDescriptions:[...e.traitDescriptions,...t.description||[]]}),{traitStandards:[],traitDescriptions:[]});h=o&&t.length,f=s&&d.length,m=a&&e.length}catch(e){h=!1,f=!1,m=!1}return q.createElement(ie,null,q.createElement(fe,{show:t&&!l,onClick:this.scrollLeft,extraStyles:{left:0,background:`linear-gradient(to right, white, ${se.background()})`}},q.createElement(ae,null)),q.createElement(ce,{ref:e=>{this.tableWrapper=e},onScroll:()=>{this.setState({showRight:this.tableWrapper.scrollLeft+this.tableWrapper.offsetWidth<this.tableWrapper.scrollWidth-5&&this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth,showLeft:this.tableWrapper.scrollLeft<this.tableWrapper.scrollWidth&&this.tableWrapper.scrollLeft>0})}},l&&(e||t)?q.createElement("div",null,"The item is too large to fit in print mode."):null,q.createElement(ue,{key:`scale-${n}`},q.createElement("thead",null,q.createElement("tr",null,q.createElement("th",null,q.createElement("div",{dangerouslySetInnerHTML:{__html:u}})),m?q.createElement("th",null,q.createElement("div",null,"Standard(s)")):null,h?q.createElement("th",null,q.createElement("div",null,"Description")):null,b&&b.map((e,t)=>{let r="";try{r=d[b.length-t-1]||""}catch(e){r=""}return q.createElement("th",{key:`table-header-${t}`},q.createElement(pe,null,q.createElement("thead",null,f?q.createElement("tr",null,q.createElement("td",null,q.createElement(de,{dangerouslySetInnerHTML:{__html:r}}))):null,q.createElement("tr",null,q.createElement(he,null,1===e?`${e} point`:`${e} points`)))))}))),q.createElement("tbody",null,p&&p.map((e,t)=>q.createElement(re,{key:`trait_${n}_${t}`,trait:e,traitIndex:t,showDescription:!!h,showStandards:!!m,scaleIndex:n,scorePointsValues:b,excludeZero:i}))))),q.createElement(fe,{show:e&&!l,onClick:this.scrollRight,extraStyles:{right:0,background:`linear-gradient(to left, white, ${se.background()})`}},q.createElement(le,null)))}}me.propTypes={scaleIndex:ne.number,scale:ne.shape({excludeZero:ne.bool,maxPoints:ne.number,scorePointsLabels:ne.arrayOf(ne.string),traitLabel:ne.string,traits:ne.arrayOf(ne.shape({name:ne.string,standards:ne.arrayOf(ne.string),scorePointsDescriptors:ne.arrayOf(ne.string),description:ne.string}))}),showPointsLabels:ne.bool,showDescription:ne.bool,showStandards:ne.bool,arrowsDisabled:ne.bool};const be=r,{Link:ye}=a,ge=l,{color:_e}=o,{UiLayout:Se}=o;class Ee extends q.Component{constructor(e){super(e),this.state={rubricOpen:!1,linkPrefix:"Show"},this.toggleRubric=this.toggleRubric.bind(this)}toggleRubric(){this.setState({rubricOpen:!this.state.rubricOpen}),this.setState({linkPrefix:this.state.rubricOpen?"Show":"Hide"})}render(){const{model:e}=this.props;let{animationsDisabled:t}=this.props;const{extraCSSRules:r,halfScoring:n,scales:o,visible:s,pointLabels:a,description:l,standards:i,arrowsDisabled:c}=e||{};if(t=t||e.animationsDisabled,!o||!s)return null;const u=q.createElement(Se,{extraCSSRules:r,style:{fontFamily:"Cerebri Sans",color:_e.text(),backgroundColor:_e.background()}},n?q.createElement("div",{style:{marginBottom:"16px"}},"* Half-point or in-between scores are permitted under this rubric."):null,o.map((e,t)=>q.createElement(me,{key:`scale_${t}`,scale:e,scaleIndex:t,showPointsLabels:a,showDescription:l,showStandards:i,arrowsDisabled:c})));return t?u:q.createElement(Se,{extraCSSRules:r,style:{color:_e.text(),backgroundColor:_e.background()}},q.createElement(ye,{style:{backgroundColor:_e.background()},href:this.dudUrl,onClick:this.toggleRubric},this.state.linkPrefix," Rubric"),q.createElement(ge,{style:{marginTop:"16px"},in:this.state.rubricOpen,timeout:{enter:225,exit:195}},u))}}Ee.propTypes={model:be.shape({halfScoring:be.bool,scales:be.arrayOf(be.shape({excludeZero:be.bool,maxPoints:be.number,scorePointsLabels:be.arrayOf(be.string),traitLabel:be.string,traits:be.arrayOf(be.shape({name:be.string,description:be.string,scorePointsDescriptors:be.arrayOf(be.string),standards:be.arrayOf(be.string)}))})),visible:be.bool,pointLabels:be.bool,description:be.bool,standards:be.bool,animationsDisabled:be.bool}),animationsDisabled:be.bool};const{renderMath:ve}=e;class we extends HTMLElement{constructor(){super(),this._model={},this._session=null,this._root=null}set model(e){this._model=e,this.dispatchEvent(new G(this.tagName.toLowerCase(),this._session,!!this._model)),this._render()}set session(e){this._session=e}get session(){return this._session}connectedCallback(){this._render()}_render(){const e=q.createElement(Ee,{model:this._model,session:this._session});this._root||(this._root=N(this)),this._root.render(e),queueMicrotask(()=>{ve(this)})}disconnectedCallback(){this._root&&this._root.unmount()}}export{we as default};
|
package/module/index.html
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<title>@pie-element/multi-trait-rubric@7.0.0-beta.1</title>
|
|
6
|
-
<script
|
|
7
|
-
type="module"
|
|
8
|
-
src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
|
|
9
|
-
|
|
10
|
-
<link
|
|
11
|
-
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
/>
|
|
14
|
-
<style>
|
|
15
|
-
html, body {
|
|
16
|
-
font-family: 'Roboto', sans-serif;
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
19
|
-
<script type="module" src="./demo.js"></script>
|
|
20
|
-
</head>
|
|
21
|
-
</html>
|
package/module/manifest.json
DELETED
package/module/print-demo.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import PrintElement from './print.js';
|
|
2
|
-
|
|
3
|
-
var generate = {};
|
|
4
|
-
|
|
5
|
-
generate.model = (id, element) => ({
|
|
6
|
-
visibleToStudent: true,
|
|
7
|
-
halfScoring: false,
|
|
8
|
-
pointLabels: true,
|
|
9
|
-
description: false,
|
|
10
|
-
standards: false,
|
|
11
|
-
scales: [
|
|
12
|
-
{
|
|
13
|
-
maxPoints: 4,
|
|
14
|
-
scorePointsLabels: [
|
|
15
|
-
'<div>Non-Scorable</div>',
|
|
16
|
-
'<div>Developing</div>',
|
|
17
|
-
'<div>Progressing</div>',
|
|
18
|
-
'<div>Effective</div>',
|
|
19
|
-
],
|
|
20
|
-
traitLabel: 'Trait',
|
|
21
|
-
traits: [
|
|
22
|
-
{
|
|
23
|
-
name: '<div>Ideas</div>',
|
|
24
|
-
standards: [],
|
|
25
|
-
description: 'the main message',
|
|
26
|
-
scorePointsDescriptors: [
|
|
27
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
28
|
-
'<div>Topic undefined and/or difficult to followDetails are unclear</div>',
|
|
29
|
-
'<div>Topic too broadDetails are limited</div>',
|
|
30
|
-
'<div>Writing stays on topicComplete details given</div>',
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: '<div>Organization</div>',
|
|
35
|
-
standards: [],
|
|
36
|
-
description: 'the internal structure of the piece',
|
|
37
|
-
scorePointsDescriptors: [
|
|
38
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
39
|
-
'<div>Does not have a beginning, middle and/or endDoes not have a lead and/or conclusionTransitions confusing and/or not presentNot written in logical orderNo sign of paragraphing / incorrect paragraphing</div>',
|
|
40
|
-
'<div>Weak beginning, middle and endHas evidence of a lead and/or conclusion but missing elementsTransitions are used sometimesSome logical orderMost paragraphing incorrect</div>',
|
|
41
|
-
'<div>Has an acceptable beginning, middle and endIncludes a lead and conclusionTransitions are used correctlyMostly logical orderMostly correct paragraphing</div>',
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: '<div>Word Choice</div>',
|
|
46
|
-
standards: [],
|
|
47
|
-
description: 'the vocabulary a writer chooses to convey meaning',
|
|
48
|
-
scorePointsDescriptors: [
|
|
49
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
50
|
-
'<div>Vocabulary is limited/used incorrectlyNo figurative language; words do not convey meaning</div>',
|
|
51
|
-
'<div>Generally correct wordsAttempt at figurative languageand/or words convey general meaning</div>',
|
|
52
|
-
'<div>Some active verbs and precise nounsEffective use of figurative language and/or words that enhance meaning</div>',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: '<div>Sentence Fluency</div>',
|
|
57
|
-
standards: [],
|
|
58
|
-
description: 'the rhythm and flow of the language',
|
|
59
|
-
scorePointsDescriptors: [
|
|
60
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
61
|
-
'<div>No sentences are clearNo variety in sentence structureFrequent run-ons and/or fragments are present</div>',
|
|
62
|
-
'<div>Some sentences are clearSentence variety used rarelySome run-ons and/or fragments are present</div>',
|
|
63
|
-
'<div>Most sentences are clearSome sentence variety is usedRun-ons and/or fragments are rare</div>',
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: '<div>Conventions</div>',
|
|
68
|
-
standards: [],
|
|
69
|
-
description: 'the mechanical correctness',
|
|
70
|
-
scorePointsDescriptors: [
|
|
71
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
72
|
-
'<div>Many distracting errors are present in grammar, punctuation, capitalization and/or spelling</div>',
|
|
73
|
-
'<div>Errors in grammar, punctuation, capitalization and/or spelling are present and some distract from meaning</div>',
|
|
74
|
-
'<div>Errors in grammar, punctuation, capitalization and/or spelling are present but don’t distract from meaning</div>',
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: '<div>Voice</div>',
|
|
79
|
-
standards: [],
|
|
80
|
-
description: "the personal tone and flavor of the author's message",
|
|
81
|
-
scorePointsDescriptors: [
|
|
82
|
-
'<div>Student’s response is blank, not in English, not legible, or does not respond to the prompt.</div>',
|
|
83
|
-
'<div>Not concerned with audience or purposeNo viewpoint (perspective) usedWriting is mechanical and lifeless</div>',
|
|
84
|
-
'<div>Shows beginning awareness of audience/purposeSome viewpoint (perspective) used throughout the pieceWriting is distant, too formal or informal</div>',
|
|
85
|
-
'<div>Awareness of audience; purpose is clear most of the timeUses viewpoint (perspective) throughout most of the paperWriting is pleasant, agreeable and satisfying</div>',
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
maxPoints: 5,
|
|
92
|
-
scorePointsLabels: [
|
|
93
|
-
'<div>Non-Scorable</div>',
|
|
94
|
-
'<div>Unsatisfactory</div>',
|
|
95
|
-
'<div>Satisfactory</div>',
|
|
96
|
-
'<div></div>',
|
|
97
|
-
'<div></div>',
|
|
98
|
-
],
|
|
99
|
-
traitLabel: 'Category',
|
|
100
|
-
traits: [
|
|
101
|
-
{
|
|
102
|
-
name: '<div>Presentation</div>',
|
|
103
|
-
standards: [],
|
|
104
|
-
description: '',
|
|
105
|
-
scorePointsDescriptors: [
|
|
106
|
-
'<div>Handwriting is unreadable, or response is blank, not in English, or too brief to evaluate. </div>',
|
|
107
|
-
'<div>Handwriting poorOverall appearance is distracting to unacceptable</div>',
|
|
108
|
-
'<div>Handwriting is generally legibleOverall appearance is acceptable or better</div>',
|
|
109
|
-
'<div></div>',
|
|
110
|
-
'<div></div>',
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
excludeZero: true,
|
|
117
|
-
maxPointsEnabled: true,
|
|
118
|
-
addScaleEnabled: true,
|
|
119
|
-
id,
|
|
120
|
-
element,
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
const { model } = generate;
|
|
124
|
-
|
|
125
|
-
var config = {
|
|
126
|
-
elements: {
|
|
127
|
-
'multi-trait-rubric': '../..',
|
|
128
|
-
},
|
|
129
|
-
models: [model('1', 'multi-trait-rubric')],
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
// new init - just shows off print!
|
|
133
|
-
|
|
134
|
-
const init = async () => {
|
|
135
|
-
console.log('define the element...');
|
|
136
|
-
await Promise.all(
|
|
137
|
-
config.models.map(async (m) => {
|
|
138
|
-
try {
|
|
139
|
-
const printTag = `${m.element}-print`;
|
|
140
|
-
if (customElements.get(printTag)) {
|
|
141
|
-
return true;
|
|
142
|
-
} else {
|
|
143
|
-
customElements.define(printTag, PrintElement);
|
|
144
|
-
await customElements.whenDefined(printTag);
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
} catch (e) {
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
})
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
console.log('now apply the model...');
|
|
154
|
-
config.models.forEach((m) => {
|
|
155
|
-
const printTag = `${m.element}-print`;
|
|
156
|
-
const h3s = document.createElement('h3');
|
|
157
|
-
h3s.textContent = 'student mode';
|
|
158
|
-
document.body.appendChild(h3s);
|
|
159
|
-
const de = document.createElement(printTag);
|
|
160
|
-
document.body.appendChild(de);
|
|
161
|
-
de.options = {};
|
|
162
|
-
de.model = m;
|
|
163
|
-
|
|
164
|
-
const h3 = document.createElement('h3');
|
|
165
|
-
h3.textContent = 'instructor mode';
|
|
166
|
-
document.body.appendChild(h3);
|
|
167
|
-
const instr = document.createElement(printTag);
|
|
168
|
-
document.body.appendChild(instr);
|
|
169
|
-
instr.options = { mode: 'instructor' };
|
|
170
|
-
instr.model = JSON.parse(JSON.stringify(m));
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
init()
|
|
175
|
-
.then(() => {
|
|
176
|
-
console.log('ready');
|
|
177
|
-
})
|
|
178
|
-
.catch((e) => {
|
|
179
|
-
console.error(e);
|
|
180
|
-
});
|
package/module/print.html
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<title>@pie-element/multi-trait-rubric@7.0.0-beta.1</title>
|
|
6
|
-
<link
|
|
7
|
-
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
|
|
8
|
-
rel="stylesheet"
|
|
9
|
-
/>
|
|
10
|
-
<style>
|
|
11
|
-
html, body {
|
|
12
|
-
font-family: 'Roboto', sans-serif;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
<script type="module" src="./print-demo.js"></script>
|
|
16
|
-
</head>
|
|
17
|
-
<body></body>
|
|
18
|
-
</html>
|