@pie-element/multi-trait-rubric 7.0.0-beta.0 → 7.0.0-next.42
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/CHANGELOG.md +0 -11
- package/configure/CHANGELOG.md +0 -11
- package/configure/lib/common.js +5 -5
- package/configure/lib/common.js.map +1 -1
- package/configure/lib/utils.js +2 -2
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +7 -7
- package/controller/package.json +1 -1
- package/module/configure.js +1 -0
- package/module/controller.js +142 -0
- package/module/demo.js +142 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +14 -0
- package/module/print-demo.js +180 -0
- package/module/print.html +18 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,17 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [6.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric@6.3.2...@pie-element/multi-trait-rubric@6.3.3) (2025-11-27)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* bump libs PD-5274, PD-5211, PD-5248 ([7610b25](https://github.com/pie-framework/pie-elements/commit/7610b25423956b6492f33322513b3430051fca77))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
6
|
## [6.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric@6.3.1...@pie-element/multi-trait-rubric@6.3.2) (2025-10-22)
|
|
18
7
|
|
|
19
8
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,17 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [5.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-configure@5.3.2...@pie-element/multi-trait-rubric-configure@5.3.3) (2025-11-27)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* bump libs PD-5274, PD-5211, PD-5248 ([7610b25](https://github.com/pie-framework/pie-elements/commit/7610b25423956b6492f33322513b3430051fca77))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
6
|
## [5.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multi-trait-rubric-configure@5.3.1...@pie-element/multi-trait-rubric-configure@5.3.2) (2025-10-22)
|
|
18
7
|
|
|
19
8
|
|
package/configure/lib/common.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.UnderlinedInput = exports.SimpleInput = exports.SecondaryBlock = exports.ScorePoint = exports.ScaleSettings = exports.Row = exports.PrimaryBlockWidth = exports.PrimaryBlock = exports.MultiTraitButton = exports.MaxPointsPicker = exports.HeaderHeightLarge = exports.HeaderHeight = exports.ExpandedInput = exports.DragHandleSpace = exports.BlockWidth = exports.Block = exports.Arrow = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styles = require("@mui/material/styles");
|
|
10
|
-
var
|
|
10
|
+
var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
|
|
11
11
|
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
12
12
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
13
13
|
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
|
|
@@ -171,7 +171,7 @@ const ScorePoint = ({
|
|
|
171
171
|
mathMlOptions = {}
|
|
172
172
|
}) => {
|
|
173
173
|
const ScorePointBoxComponent = showScorePointLabels ? ScorePointBox : ScorePointBoxDisabled;
|
|
174
|
-
return /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxWrapper, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxComponent, null, /*#__PURE__*/_react.default.createElement(SubLabel, null, scorePointsValue), showScorePointLabels ? /*#__PURE__*/_react.default.createElement(
|
|
174
|
+
return /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxWrapper, null, /*#__PURE__*/_react.default.createElement(ScorePointBoxComponent, null, /*#__PURE__*/_react.default.createElement(SubLabel, null, scorePointsValue), showScorePointLabels ? /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
175
175
|
className: "editable-label",
|
|
176
176
|
error: error,
|
|
177
177
|
markup: scoreDescriptor,
|
|
@@ -260,7 +260,7 @@ const SimpleInput = ({
|
|
|
260
260
|
uploadSoundSupport,
|
|
261
261
|
mathMlOptions = {},
|
|
262
262
|
imageSupport = {}
|
|
263
|
-
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(SimpleInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(
|
|
263
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(SimpleInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
264
264
|
className: "editable-level",
|
|
265
265
|
markup: markup,
|
|
266
266
|
onChange: onChange,
|
|
@@ -298,7 +298,7 @@ const UnderlinedInput = ({
|
|
|
298
298
|
uploadSoundSupport,
|
|
299
299
|
imageSupport = {},
|
|
300
300
|
mathMlOptions = {}
|
|
301
|
-
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(UnderlinedInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(
|
|
301
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(UnderlinedInputWrapper, null, label && /*#__PURE__*/_react.default.createElement("div", null, label), /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
302
302
|
className: "underlined-editable-level",
|
|
303
303
|
error: error,
|
|
304
304
|
markup: markup,
|
|
@@ -331,7 +331,7 @@ const ExpandedInput = ({
|
|
|
331
331
|
uploadSoundSupport,
|
|
332
332
|
mathMlOptions = {},
|
|
333
333
|
imageSupport = {}
|
|
334
|
-
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(
|
|
334
|
+
}) => /*#__PURE__*/_react.default.createElement(GlobalStyles, null, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
335
335
|
className: "expanded-input-prompt",
|
|
336
336
|
error: error,
|
|
337
337
|
markup: markup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":["_react","_interopRequireDefault","require","_styles","_editableHtml","_Select","_MenuItem","_InputBase","_renderUi","_colors","_utils","InputHeight","BlockWidth","exports","PrimaryBlockWidth","DragHandleSpace","HeaderHeight","HeaderHeightLarge","greyBorder","grey","Padding","GlobalStyles","styled","theme","textAlign","flex","border","padding","borderLeft","borderRadius","background","palette","common","white","width","borderBottom","margin","marginTop","StyledButton","fontSize","typography","display","flexDirection","alignItems","spacing","color","secondaryBackground","justifyContent","text","cursor","MultiTraitButton","children","onClick","default","createElement","PrimaryBlock","minWidth","position","boxSizing","Block","marginBlockStart","paddingInlineStart","StyledSecondaryBlock","overflowX","paddingBottom","SecondaryBlock","setRef","style","ref","Row","height","ScorePointBoxWrapper","ScorePointBox","ScorePointBoxDisabled","SubLabel","ScorePoint","error","scorePointsValue","scoreDescriptor","pluginProps","onChange","showScorePointLabels","alignToRight","spellCheck","uploadSoundSupport","imageSupport","mathMlOptions","ScorePointBoxComponent","className","markup","placeholder","activePlugins","filteredDefaultPlugins","toolbarOpts","alignment","languageCharactersProps","language","slateEditorExtraStyles","fontFamily","StyledBootstrapInput","InputBase","createMaxScoreOptions","maxMaxPoints","Array","from","length","_","i","MaxPointsPicker","maxPoints","InputContainer","label","value","input","MenuProps","transitionDuration","enter","exit","map","maxScore","key","SimpleInputWrapper","SimpleInput","UnderlinedInputWrapper","UnderlinedInput","ExpandedInput","autoWidthToolbar","ScaleSettings","gap","StyledArrow","zIndex","right","StyledInnerGrey","bottom","Arrow","show","left","showLevelTagInput","undefined"],"sources":["../src/common.jsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport InputBase from '@mui/material/InputBase';\nimport { color, InputContainer } from '@pie-lib/render-ui';\nimport { grey } from '@mui/material/colors';\n\nimport { filteredDefaultPlugins } from './utils';\n\nconst InputHeight = '120px';\nexport const BlockWidth = 200;\nexport const PrimaryBlockWidth = 200;\nexport const DragHandleSpace = 32;\nexport const HeaderHeight = '100px';\nexport const HeaderHeightLarge = '160px';\nconst greyBorder = `solid 1px ${grey[400]}`;\nconst Padding = '8px 4px';\n\n// global styles for EditableHtml components\nconst GlobalStyles = styled('div')(({ theme }) => ({\n '& .editable-label': {\n textAlign: 'left',\n flex: 1,\n border: 'none',\n\n '& div': {\n padding: 0,\n border: 'none',\n },\n\n '& > div': {\n borderLeft: greyBorder,\n borderRadius: 0,\n padding: Padding,\n },\n },\n\n '& .editable-level': {\n background: theme.palette.common.white,\n width: '60%',\n },\n\n '& .underlined-editable-level': {\n background: theme.palette.common.white,\n width: '100%',\n\n '& div': {\n padding: 0,\n border: 'none',\n },\n\n '& > div': {\n borderBottom: greyBorder,\n borderRadius: 0,\n padding: Padding,\n },\n },\n\n '& .expanded-input-prompt': {\n border: 'none',\n margin: '10px',\n marginTop: 0,\n },\n}));\n\nconst StyledButton = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize + 2,\n textAlign: 'right',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-start',\n padding: `${theme.spacing(1.5)} ${theme.spacing(2)}`,\n width: '114px',\n background: color.secondaryBackground(),\n borderRadius: '4px',\n justifyContent: 'space-around',\n color: color.text(),\n cursor: 'pointer',\n}));\n\nexport const MultiTraitButton = ({ children, onClick }) => (\n <StyledButton onClick={onClick}>\n <strong>+</strong>\n <div>{children}</div>\n </StyledButton>\n);\n\nexport const PrimaryBlock = styled('div')({\n width: `${PrimaryBlockWidth}px`,\n minWidth: `${PrimaryBlockWidth}px`,\n position: 'relative',\n padding: '0 10px',\n boxSizing: 'border-box',\n});\n\nexport const Block = styled('div')(({ theme }) => ({\n width: `${BlockWidth}px`,\n minWidth: `${BlockWidth}px`,\n '& ul, ol': {\n marginBlockStart: 0,\n paddingInlineStart: theme.spacing(2),\n },\n}));\n\nconst StyledSecondaryBlock = styled('div')({\n display: 'flex',\n overflowX: 'hidden',\n alignItems: 'flex-end',\n // this is needed to show the editor toolbar!!!\n paddingBottom: '30px',\n});\n\nexport const SecondaryBlock = ({ children, setRef, width }) => (\n <StyledSecondaryBlock style={{ width: width }} ref={setRef}>\n {children}\n </StyledSecondaryBlock>\n);\n\nexport const Row = (({ children, height }) => (\n <div\n style={{\n display: 'flex',\n height,\n }}\n >\n {children}\n </div>\n));\n\nconst ScorePointBoxWrapper = styled('div')({\n padding: '0 10px',\n});\n\nconst ScorePointBox = styled('div')({\n display: 'flex',\n borderRadius: '4px',\n background: 'white',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n border: greyBorder,\n});\n\nconst ScorePointBoxDisabled = styled('div')({\n display: 'flex',\n borderRadius: '4px',\n background: 'none',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n border: '0',\n});\n\nconst SubLabel = styled('div')({\n width: '24px',\n textAlign: 'center',\n});\n\nexport const ScorePoint = ({\n error = '',\n scorePointsValue,\n scoreDescriptor,\n pluginProps,\n onChange,\n showScorePointLabels,\n alignToRight,\n spellCheck,\n uploadSoundSupport,\n imageSupport = {},\n mathMlOptions = {},\n}) => {\n const ScorePointBoxComponent = showScorePointLabels ? ScorePointBox : ScorePointBoxDisabled;\n\n return (\n <GlobalStyles>\n <ScorePointBoxWrapper>\n <ScorePointBoxComponent>\n <SubLabel>{scorePointsValue}</SubLabel>\n\n {showScorePointLabels ? (\n <EditableHtml\n className=\"editable-label\"\n error={error}\n markup={scoreDescriptor}\n placeholder=\" Enter Label\"\n onChange={onChange}\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n toolbarOpts={alignToRight ? { alignment: 'right' } : {}}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n ) : null}\n </ScorePointBoxComponent>\n </ScorePointBoxWrapper>\n </GlobalStyles>\n );\n};\n\nconst StyledBootstrapInput = styled(InputBase)(({ theme }) => ({\n '&.MuiInputBase-root': {\n background: theme.palette.common.white,\n marginTop: theme.spacing(1),\n 'label + &': {\n width: '80px',\n },\n },\n '& .MuiInputBase-input': {\n borderRadius: '4px',\n position: 'relative',\n border: greyBorder,\n fontSize: theme.typography.fontSize,\n fontFamily: 'Cerebri Sans',\n padding: `${theme.spacing(1)} ${theme.spacing(1.5)}`,\n\n '&:focus': {\n borderRadius: '4px',\n },\n },\n}));\n\nconst createMaxScoreOptions = (maxMaxPoints) => Array.from({ length: maxMaxPoints }, (_, i) => i + 1);\n\nexport const MaxPointsPicker = ({ maxPoints, onChange, maxMaxPoints }) => (\n <InputContainer label=\"Max Points\">\n <Select\n value={maxPoints}\n onChange={onChange}\n input={<StyledBootstrapInput />}\n MenuProps={{\n transitionDuration: {\n enter: 225,\n exit: 195\n }\n }}\n >\n {createMaxScoreOptions(maxMaxPoints).map((maxScore) => (\n <MenuItem key={`menu-item-${maxScore}`} value={maxScore}>\n {maxScore}\n </MenuItem>\n ))}\n </Select>\n </InputContainer>\n);\n\nconst SimpleInputWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: `${theme.spacing(1.5)} 0`,\n}));\n\nexport const SimpleInput = ({\n markup,\n onChange,\n pluginProps,\n label,\n spellCheck,\n uploadSoundSupport,\n mathMlOptions = {},\n imageSupport = {},\n}) => (\n <GlobalStyles>\n <SimpleInputWrapper>\n {label && <div>{label}</div>}\n\n <EditableHtml\n className=\"editable-level\"\n markup={markup}\n onChange={onChange}\n placeholder=\"Trait Label\"\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n </SimpleInputWrapper>\n </GlobalStyles>\n);\n\nconst UnderlinedInputWrapper = styled('div')({\n width: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nexport const UnderlinedInput = ({\n error,\n markup,\n onChange,\n pluginProps,\n label,\n placeholder,\n spellCheck,\n uploadSoundSupport,\n imageSupport = {},\n mathMlOptions = {},\n}) => (\n <GlobalStyles>\n <UnderlinedInputWrapper>\n {label && <div>{label}</div>}\n\n <EditableHtml\n className=\"underlined-editable-level\"\n error={error}\n markup={markup}\n onChange={onChange}\n placeholder={placeholder}\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n </UnderlinedInputWrapper>\n </GlobalStyles>\n);\n\nexport const ExpandedInput = ({\n error,\n markup,\n onChange,\n pluginProps,\n placeholder,\n alignToRight,\n spellCheck,\n uploadSoundSupport,\n mathMlOptions = {},\n imageSupport = {},\n}) => (\n <GlobalStyles>\n <EditableHtml\n className=\"expanded-input-prompt\"\n error={error}\n markup={markup}\n onChange={onChange}\n placeholder={placeholder}\n pluginProps={pluginProps}\n toolbarOpts={alignToRight ? { alignment: 'right' } : {}}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n autoWidthToolbar\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{\n fontFamily: 'Cerebri',\n height: InputHeight,\n padding: 0\n }}\n />\n </GlobalStyles>\n);\n\nexport const ScaleSettings = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-end',\n paddingBottom: '18px',\n gap: theme.spacing(0.25),\n}));\n\nconst StyledArrow = styled('div')(({ theme }) => ({\n position: 'absolute',\n zIndex: 10,\n cursor: 'pointer',\n right: 0,\n alignItems: 'flex-start',\n justifyContent: 'center',\n background: `linear-gradient(to left, ${theme.palette.common.white}, ${color.background()})`,\n boxSizing: 'border-box',\n}));\n\nconst StyledInnerGrey = styled('div')(({ theme }) => ({\n position: 'absolute',\n zIndex: 11,\n cursor: 'pointer',\n right: 0,\n alignItems: 'flex-start',\n justifyContent: 'center',\n background: `linear-gradient(to left, ${theme.palette.common.white}, ${color.background()})`,\n boxSizing: 'border-box',\n '& svg': {\n position: 'absolute',\n bottom: '-24px',\n },\n}));\n\nexport const Arrow = ({ children, show, width, onClick, left, showLevelTagInput }) => (\n <StyledArrow\n style={{\n height: '-webkit-fill-available',\n display: show ? 'flex' : 'none',\n width: width,\n left: left,\n background: left ? `linear-gradient(to right, white, ${color.background()})` : undefined,\n }}\n onClick={onClick}\n >\n <StyledInnerGrey\n style={{\n display: show ? 'flex' : 'none',\n width: width,\n height: showLevelTagInput ? HeaderHeightLarge : HeaderHeight,\n left: 0,\n background: left\n ? `linear-gradient(to right, ${color.secondaryBackground()}, ${color.background()})`\n : undefined,\n }}\n onClick={onClick}\n >\n {children}\n </StyledInnerGrey>\n </StyledArrow>\n);\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,MAAA,GAAAR,OAAA;AAEA,MAAMS,WAAW,GAAG,OAAO;AACpB,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,GAAG;AACtB,MAAME,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,GAAG;AAC7B,MAAMC,eAAe,GAAAF,OAAA,CAAAE,eAAA,GAAG,EAAE;AAC1B,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,OAAO;AAC5B,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,OAAO;AACxC,MAAMC,UAAU,GAAG,aAAaC,YAAI,CAAC,GAAG,CAAC,EAAE;AAC3C,MAAMC,OAAO,GAAG,SAAS;;AAEzB;AACA,MAAMC,YAAY,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EACjD,mBAAmB,EAAE;IACnBC,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IAEd,OAAO,EAAE;MACPC,OAAO,EAAE,CAAC;MACVD,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KAAK,GAAGA,CAAC;EAAEnF,QAAQ;EAAEoF,IAAI;EAAErG,KAAK;EAAEkB,OAAO;EAAEoF,IAAI;EAAEC;AAAkB,CAAC,kBAC/EzI,MAAA,CAAAqD,OAAA,CAAAC,aAAA,CAAC2E,WAAW;EACV9D,KAAK,EAAE;IACLG,MAAM,EAAE,wBAAwB;IAChC7B,OAAO,EAAE8F,IAAI,GAAG,MAAM,GAAG,MAAM;IAC/BrG,KAAK,EAAEA,KAAK;IACZsG,IAAI,EAAEA,IAAI;IACV1G,UAAU,EAAE0G,IAAI,GAAG,oCAAoC3F,eAAK,CAACf,UAAU,CAAC,CAAC,GAAG,GAAG4G;EACjF,CAAE;EACFtF,OAAO,EAAEA;AAAQ,gBAEjBpD,MAAA,CAAAqD,OAAA,CAAAC,aAAA,CAAC8E,eAAe;EACdjE,KAAK,EAAE;IACL1B,OAAO,EAAE8F,IAAI,GAAG,MAAM,GAAG,MAAM;IAC/BrG,KAAK,EAAEA,KAAK;IACZoC,MAAM,EAAEmE,iBAAiB,GAAGxH,iBAAiB,GAAGD,YAAY;IAC5DwH,IAAI,EAAE,CAAC;IACP1G,UAAU,EAAE0G,IAAI,GACZ,6BAA6B3F,eAAK,CAACC,mBAAmB,CAAC,CAAC,KAAKD,eAAK,CAACf,UAAU,CAAC,CAAC,GAAG,GAClF4G;EACN,CAAE;EACFtF,OAAO,EAAEA;AAAQ,GAEhBD,QACc,CACN,CACd;AAACtC,OAAA,CAAAyH,KAAA,GAAAA,KAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"common.js","names":["_react","_interopRequireDefault","require","_styles","_editableHtmlTipTap","_Select","_MenuItem","_InputBase","_renderUi","_colors","_utils","InputHeight","BlockWidth","exports","PrimaryBlockWidth","DragHandleSpace","HeaderHeight","HeaderHeightLarge","greyBorder","grey","Padding","GlobalStyles","styled","theme","textAlign","flex","border","padding","borderLeft","borderRadius","background","palette","common","white","width","borderBottom","margin","marginTop","StyledButton","fontSize","typography","display","flexDirection","alignItems","spacing","color","secondaryBackground","justifyContent","text","cursor","MultiTraitButton","children","onClick","default","createElement","PrimaryBlock","minWidth","position","boxSizing","Block","marginBlockStart","paddingInlineStart","StyledSecondaryBlock","overflowX","paddingBottom","SecondaryBlock","setRef","style","ref","Row","height","ScorePointBoxWrapper","ScorePointBox","ScorePointBoxDisabled","SubLabel","ScorePoint","error","scorePointsValue","scoreDescriptor","pluginProps","onChange","showScorePointLabels","alignToRight","spellCheck","uploadSoundSupport","imageSupport","mathMlOptions","ScorePointBoxComponent","className","markup","placeholder","activePlugins","filteredDefaultPlugins","toolbarOpts","alignment","languageCharactersProps","language","slateEditorExtraStyles","fontFamily","StyledBootstrapInput","InputBase","createMaxScoreOptions","maxMaxPoints","Array","from","length","_","i","MaxPointsPicker","maxPoints","InputContainer","label","value","input","MenuProps","transitionDuration","enter","exit","map","maxScore","key","SimpleInputWrapper","SimpleInput","UnderlinedInputWrapper","UnderlinedInput","ExpandedInput","autoWidthToolbar","ScaleSettings","gap","StyledArrow","zIndex","right","StyledInnerGrey","bottom","Arrow","show","left","showLevelTagInput","undefined"],"sources":["../src/common.jsx"],"sourcesContent":["import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport InputBase from '@mui/material/InputBase';\nimport { color, InputContainer } from '@pie-lib/render-ui';\nimport { grey } from '@mui/material/colors';\n\nimport { filteredDefaultPlugins } from './utils';\n\nconst InputHeight = '120px';\nexport const BlockWidth = 200;\nexport const PrimaryBlockWidth = 200;\nexport const DragHandleSpace = 32;\nexport const HeaderHeight = '100px';\nexport const HeaderHeightLarge = '160px';\nconst greyBorder = `solid 1px ${grey[400]}`;\nconst Padding = '8px 4px';\n\n// global styles for EditableHtml components\nconst GlobalStyles = styled('div')(({ theme }) => ({\n '& .editable-label': {\n textAlign: 'left',\n flex: 1,\n border: 'none',\n\n '& div': {\n padding: 0,\n border: 'none',\n },\n\n '& > div': {\n borderLeft: greyBorder,\n borderRadius: 0,\n padding: Padding,\n },\n },\n\n '& .editable-level': {\n background: theme.palette.common.white,\n width: '60%',\n },\n\n '& .underlined-editable-level': {\n background: theme.palette.common.white,\n width: '100%',\n\n '& div': {\n padding: 0,\n border: 'none',\n },\n\n '& > div': {\n borderBottom: greyBorder,\n borderRadius: 0,\n padding: Padding,\n },\n },\n\n '& .expanded-input-prompt': {\n border: 'none',\n margin: '10px',\n marginTop: 0,\n },\n}));\n\nconst StyledButton = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize + 2,\n textAlign: 'right',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-start',\n padding: `${theme.spacing(1.5)} ${theme.spacing(2)}`,\n width: '114px',\n background: color.secondaryBackground(),\n borderRadius: '4px',\n justifyContent: 'space-around',\n color: color.text(),\n cursor: 'pointer',\n}));\n\nexport const MultiTraitButton = ({ children, onClick }) => (\n <StyledButton onClick={onClick}>\n <strong>+</strong>\n <div>{children}</div>\n </StyledButton>\n);\n\nexport const PrimaryBlock = styled('div')({\n width: `${PrimaryBlockWidth}px`,\n minWidth: `${PrimaryBlockWidth}px`,\n position: 'relative',\n padding: '0 10px',\n boxSizing: 'border-box',\n});\n\nexport const Block = styled('div')(({ theme }) => ({\n width: `${BlockWidth}px`,\n minWidth: `${BlockWidth}px`,\n '& ul, ol': {\n marginBlockStart: 0,\n paddingInlineStart: theme.spacing(2),\n },\n}));\n\nconst StyledSecondaryBlock = styled('div')({\n display: 'flex',\n overflowX: 'hidden',\n alignItems: 'flex-end',\n // this is needed to show the editor toolbar!!!\n paddingBottom: '30px',\n});\n\nexport const SecondaryBlock = ({ children, setRef, width }) => (\n <StyledSecondaryBlock style={{ width: width }} ref={setRef}>\n {children}\n </StyledSecondaryBlock>\n);\n\nexport const Row = (({ children, height }) => (\n <div\n style={{\n display: 'flex',\n height,\n }}\n >\n {children}\n </div>\n));\n\nconst ScorePointBoxWrapper = styled('div')({\n padding: '0 10px',\n});\n\nconst ScorePointBox = styled('div')({\n display: 'flex',\n borderRadius: '4px',\n background: 'white',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n border: greyBorder,\n});\n\nconst ScorePointBoxDisabled = styled('div')({\n display: 'flex',\n borderRadius: '4px',\n background: 'none',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n border: '0',\n});\n\nconst SubLabel = styled('div')({\n width: '24px',\n textAlign: 'center',\n});\n\nexport const ScorePoint = ({\n error = '',\n scorePointsValue,\n scoreDescriptor,\n pluginProps,\n onChange,\n showScorePointLabels,\n alignToRight,\n spellCheck,\n uploadSoundSupport,\n imageSupport = {},\n mathMlOptions = {},\n}) => {\n const ScorePointBoxComponent = showScorePointLabels ? ScorePointBox : ScorePointBoxDisabled;\n\n return (\n <GlobalStyles>\n <ScorePointBoxWrapper>\n <ScorePointBoxComponent>\n <SubLabel>{scorePointsValue}</SubLabel>\n\n {showScorePointLabels ? (\n <EditableHtml\n className=\"editable-label\"\n error={error}\n markup={scoreDescriptor}\n placeholder=\" Enter Label\"\n onChange={onChange}\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n toolbarOpts={alignToRight ? { alignment: 'right' } : {}}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n ) : null}\n </ScorePointBoxComponent>\n </ScorePointBoxWrapper>\n </GlobalStyles>\n );\n};\n\nconst StyledBootstrapInput = styled(InputBase)(({ theme }) => ({\n '&.MuiInputBase-root': {\n background: theme.palette.common.white,\n marginTop: theme.spacing(1),\n 'label + &': {\n width: '80px',\n },\n },\n '& .MuiInputBase-input': {\n borderRadius: '4px',\n position: 'relative',\n border: greyBorder,\n fontSize: theme.typography.fontSize,\n fontFamily: 'Cerebri Sans',\n padding: `${theme.spacing(1)} ${theme.spacing(1.5)}`,\n\n '&:focus': {\n borderRadius: '4px',\n },\n },\n}));\n\nconst createMaxScoreOptions = (maxMaxPoints) => Array.from({ length: maxMaxPoints }, (_, i) => i + 1);\n\nexport const MaxPointsPicker = ({ maxPoints, onChange, maxMaxPoints }) => (\n <InputContainer label=\"Max Points\">\n <Select\n value={maxPoints}\n onChange={onChange}\n input={<StyledBootstrapInput />}\n MenuProps={{\n transitionDuration: {\n enter: 225,\n exit: 195\n }\n }}\n >\n {createMaxScoreOptions(maxMaxPoints).map((maxScore) => (\n <MenuItem key={`menu-item-${maxScore}`} value={maxScore}>\n {maxScore}\n </MenuItem>\n ))}\n </Select>\n </InputContainer>\n);\n\nconst SimpleInputWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: `${theme.spacing(1.5)} 0`,\n}));\n\nexport const SimpleInput = ({\n markup,\n onChange,\n pluginProps,\n label,\n spellCheck,\n uploadSoundSupport,\n mathMlOptions = {},\n imageSupport = {},\n}) => (\n <GlobalStyles>\n <SimpleInputWrapper>\n {label && <div>{label}</div>}\n\n <EditableHtml\n className=\"editable-level\"\n markup={markup}\n onChange={onChange}\n placeholder=\"Trait Label\"\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n </SimpleInputWrapper>\n </GlobalStyles>\n);\n\nconst UnderlinedInputWrapper = styled('div')({\n width: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nexport const UnderlinedInput = ({\n error,\n markup,\n onChange,\n pluginProps,\n label,\n placeholder,\n spellCheck,\n uploadSoundSupport,\n imageSupport = {},\n mathMlOptions = {},\n}) => (\n <GlobalStyles>\n <UnderlinedInputWrapper>\n {label && <div>{label}</div>}\n\n <EditableHtml\n className=\"underlined-editable-level\"\n error={error}\n markup={markup}\n onChange={onChange}\n placeholder={placeholder}\n pluginProps={pluginProps}\n activePlugins={filteredDefaultPlugins}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{ fontFamily: 'Cerebri' }}\n />\n </UnderlinedInputWrapper>\n </GlobalStyles>\n);\n\nexport const ExpandedInput = ({\n error,\n markup,\n onChange,\n pluginProps,\n placeholder,\n alignToRight,\n spellCheck,\n uploadSoundSupport,\n mathMlOptions = {},\n imageSupport = {},\n}) => (\n <GlobalStyles>\n <EditableHtml\n className=\"expanded-input-prompt\"\n error={error}\n markup={markup}\n onChange={onChange}\n placeholder={placeholder}\n pluginProps={pluginProps}\n toolbarOpts={alignToRight ? { alignment: 'right' } : {}}\n spellCheck={spellCheck}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n autoWidthToolbar\n mathMlOptions={mathMlOptions}\n imageSupport={imageSupport}\n slateEditorExtraStyles={{\n fontFamily: 'Cerebri',\n height: InputHeight,\n padding: 0\n }}\n />\n </GlobalStyles>\n);\n\nexport const ScaleSettings = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-end',\n paddingBottom: '18px',\n gap: theme.spacing(0.25),\n}));\n\nconst StyledArrow = styled('div')(({ theme }) => ({\n position: 'absolute',\n zIndex: 10,\n cursor: 'pointer',\n right: 0,\n alignItems: 'flex-start',\n justifyContent: 'center',\n background: `linear-gradient(to left, ${theme.palette.common.white}, ${color.background()})`,\n boxSizing: 'border-box',\n}));\n\nconst StyledInnerGrey = styled('div')(({ theme }) => ({\n position: 'absolute',\n zIndex: 11,\n cursor: 'pointer',\n right: 0,\n alignItems: 'flex-start',\n justifyContent: 'center',\n background: `linear-gradient(to left, ${theme.palette.common.white}, ${color.background()})`,\n boxSizing: 'border-box',\n '& svg': {\n position: 'absolute',\n bottom: '-24px',\n },\n}));\n\nexport const Arrow = ({ children, show, width, onClick, left, showLevelTagInput }) => (\n <StyledArrow\n style={{\n height: '-webkit-fill-available',\n display: show ? 'flex' : 'none',\n width: width,\n left: left,\n background: left ? `linear-gradient(to right, white, ${color.background()})` : undefined,\n }}\n onClick={onClick}\n >\n <StyledInnerGrey\n style={{\n display: show ? 'flex' : 'none',\n width: width,\n height: showLevelTagInput ? HeaderHeightLarge : HeaderHeight,\n left: 0,\n background: left\n ? `linear-gradient(to right, ${color.secondaryBackground()}, ${color.background()})`\n : undefined,\n }}\n onClick={onClick}\n >\n {children}\n </StyledInnerGrey>\n </StyledArrow>\n);\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,MAAA,GAAAR,OAAA;AAEA,MAAMS,WAAW,GAAG,OAAO;AACpB,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,GAAG;AACtB,MAAME,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,GAAG;AAC7B,MAAMC,eAAe,GAAAF,OAAA,CAAAE,eAAA,GAAG,EAAE;AAC1B,MAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,OAAO;AAC5B,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,O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N,CACd;AAACtC,OAAA,CAAAyH,KAAA,GAAAA,KAAA","ignoreList":[]}
|
package/configure/lib/utils.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.filteredDefaultPlugins = exports.addOrRemoveScaleColumn = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _editableHtmlTipTap = require("@pie-lib/editable-html-tip-tap");
|
|
8
8
|
var _modals = require("./modals");
|
|
9
|
-
const filteredDefaultPlugins = exports.filteredDefaultPlugins = (
|
|
9
|
+
const filteredDefaultPlugins = exports.filteredDefaultPlugins = (_editableHtmlTipTap.DEFAULT_PLUGINS || []).filter(p => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list');
|
|
10
10
|
const addOrRemoveScaleColumn = (scales, excludeZeroType) => {
|
|
11
11
|
if (!scales || !scales.length) {
|
|
12
12
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_editableHtmlTipTap","require","_modals","filteredDefaultPlugins","exports","DEFAULT_PLUGINS","filter","p","addOrRemoveScaleColumn","scales","excludeZeroType","length","reduce","acc","scale","scorePointsLabels","traits","excludeZeroTypes","remove0","slice","map","scorePointsDescriptors","trait","add0","shiftLeft","shiftRight","push"],"sources":["../src/utils.js"],"sourcesContent":["import { DEFAULT_PLUGINS } from '@pie-lib/editable-html-tip-tap';\nimport { excludeZeroTypes } from './modals';\n\nexport const filteredDefaultPlugins = (DEFAULT_PLUGINS || []).filter(\n (p) => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list',\n);\n\nexport const addOrRemoveScaleColumn = (scales, excludeZeroType) => {\n if (!scales || !scales.length) {\n return [];\n }\n\n return scales.reduce((acc, scale) => {\n let { scorePointsLabels, traits } = scale || {};\n\n if (scorePointsLabels.length < 1) {\n return acc;\n }\n\n switch (excludeZeroType) {\n case excludeZeroTypes.remove0: {\n // removes column 0\n scorePointsLabels = scorePointsLabels.slice(1);\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: scorePointsDescriptors.slice(1),\n }));\n\n break;\n }\n\n case excludeZeroTypes.add0: {\n // adds empty column at start\n scorePointsLabels = ['', ...scorePointsLabels];\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: ['', ...scorePointsDescriptors],\n }));\n\n break;\n }\n\n case excludeZeroTypes.shiftLeft: {\n // removes last column\n scorePointsLabels = scorePointsLabels.slice(0, -1);\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: scorePointsDescriptors.slice(0, -1),\n }));\n\n break;\n }\n\n case excludeZeroTypes.shiftRight: {\n // adds empty column at end\n scorePointsLabels = [...scorePointsLabels, ''];\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: [...scorePointsDescriptors, ''],\n }));\n\n break;\n }\n\n default:\n break;\n }\n\n acc.push({ ...scale, scorePointsLabels, traits });\n\n return acc;\n }, []);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEO,MAAME,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,CAACE,mCAAe,IAAI,EAAE,EAAEC,MAAM,CACjEC,CAAC,IAAKA,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,eACzD,CAAC;AAEM,MAAMC,sBAAsB,GAAGA,CAACC,MAAM,EAAEC,eAAe,KAAK;EACjE,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,MAAM,EAAE;IAC7B,OAAO,EAAE;EACX;EAEA,OAAOF,MAAM,CAACG,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;IACnC,IAAI;MAAEC,iBAAiB;M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CAAC;UAC9CC,MAAM,GAAGA,MAAM,CAACI,GAAG,CAAC,CAAC;YAAEC,sBAAsB;YAAE,GAAGC;UAAM,CAAC,MAAM;YAC7D,GAAGA,KAAK;YACRD,sBAAsB,EAAE,CAAC,GAAGA,sBAAsB,EAAE,EAAE;UACxD,CAAC,CAAC,CAAC;UAEH;QACF;MAEA;QACE;IACJ;IAEAR,GAAG,CAACa,IAAI,CAAC;MAAE,GAAGZ,KAAK;MAAEC,iBAAiB;MAAEC;IAAO,CAAC,CAAC;IAEjD,OAAOH,GAAG;EACZ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACT,OAAA,CAAAI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
package/configure/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multi-trait-rubric-configure",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@dnd-kit/core": "6.1
|
|
8
|
+
"@dnd-kit/core": "6.3.1",
|
|
9
9
|
"@emotion/react": "^11.14.0",
|
|
10
10
|
"@emotion/style": "^0.8.0",
|
|
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": "
|
|
15
|
-
"@pie-lib/drag": "
|
|
16
|
-
"@pie-lib/editable-html": "
|
|
17
|
-
"@pie-lib/render-ui": "
|
|
18
|
-
"debug": "^
|
|
14
|
+
"@pie-lib/config-ui": "12.1.1-next.0",
|
|
15
|
+
"@pie-lib/drag": "3.1.1-next.0",
|
|
16
|
+
"@pie-lib/editable-html-tip-tap": "1.1.1-next.0",
|
|
17
|
+
"@pie-lib/render-ui": "5.1.1-next.0",
|
|
18
|
+
"debug": "^4.1.1",
|
|
19
19
|
"lodash": "^4.17.15",
|
|
20
20
|
"prop-types": "^15.6.2",
|
|
21
21
|
"react": "18.2.0",
|
package/controller/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,142 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,21 @@
|
|
|
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>
|
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multi-trait-rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "7.0.0-
|
|
4
|
+
"version": "7.0.0-next.42+bb1f3eb4e",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@mui/icons-material": "^7.3.4",
|
|
12
12
|
"@mui/material": "^7.3.4",
|
|
13
13
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
|
-
"@pie-lib/math-rendering": "
|
|
15
|
-
"@pie-lib/render-ui": "
|
|
14
|
+
"@pie-lib/math-rendering": "4.1.1-next.0",
|
|
15
|
+
"@pie-lib/render-ui": "5.1.1-next.0",
|
|
16
16
|
"clsx": "^1.1.1",
|
|
17
17
|
"prop-types": "^15.6.1",
|
|
18
18
|
"react": "18.2.0",
|
|
19
19
|
"react-dom": "18.2.0"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "bb1f3eb4e3b5b1cb15024d459ffd6e94bf419712",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"postpublish": "../../scripts/postpublish"
|
|
24
24
|
},
|