@pie-element/drag-in-the-blank 9.1.1-next.1 → 9.1.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [9.1.1-next.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank@9.1.1-next.1...@pie-element/drag-in-the-blank@9.1.1-next.2) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **drag-in-the-blank:** autofocs for adding choice field, avoid browser extraspaces for p tags PD-5670 ([a9d131d](https://github.com/pie-framework/pie-elements/commit/a9d131dba7c08a9bca02ad266b1d913bbb1ef5a2))
|
|
11
|
+
|
|
6
12
|
## [9.1.1-next.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank@9.1.0-next.2...@pie-element/drag-in-the-blank@9.1.1-next.1) (2026-02-26)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @pie-element/drag-in-the-blank
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [8.1.1-next.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-configure@8.1.1-next.1...@pie-element/drag-in-the-blank-configure@8.1.1-next.2) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **drag-in-the-blank:** autofocs for adding choice field, avoid browser extraspaces for p tags PD-5670 ([a9d131d](https://github.com/pie-framework/pie-elements/commit/a9d131dba7c08a9bca02ad266b1d913bbb1ef5a2))
|
|
11
|
+
|
|
6
12
|
## [8.1.1-next.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-configure@8.1.0-next.2...@pie-element/drag-in-the-blank-configure@8.1.1-next.1) (2026-02-26)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @pie-element/drag-in-the-blank-configure
|
package/configure/lib/choice.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choice.js","names":["_react","_interopRequireDefault","require","_propTypes","_MoreVert","_Delete","_core","_styles","_markupUtils","GripIcon","style","default","createElement","margin","propTypes","PropTypes","object","StyledChoice","styled","shouldForwardProp","prop","includes","theme","error","display","minWidth","minHeight","background","palette","common","white","boxSizing","borderRadius","overflow","position","padding","cursor","border","fontSize","StyledDeleteIcon","Delete","top","right","color","grey","zIndex","black","BlankContent","props","choice","onClick","onRemoveChoice","instanceId","disabled","attributes","listeners","setNodeRef","isDragging","useDraggable","id","data","type","value","choiceIsEmpty","handleDragStart","e","preventDefault","alert","_extends2","ref","onDragStart","left","dangerouslySetInnerHTML","__html","stopPropagation","exports","isRequired","func","bool","string","_default"],"sources":["../src/choice.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport MoreVert from '@mui/icons-material/MoreVert';\nimport Delete from '@mui/icons-material/Delete';\nimport { useDraggable } from '@dnd-kit/core';\nimport { styled } from '@mui/material/styles';\nimport { choiceIsEmpty } from './markupUtils';\n\nconst GripIcon = ({ style }) => (\n <span style={style}>\n <MoreVert style={{ margin: '0 -16px' }}/>\n <MoreVert/>\n </span>\n);\n\nGripIcon.propTypes = {\n style: PropTypes.object,\n};\n\nconst StyledChoice = styled('div', {\n shouldForwardProp: (prop) => !['error', 'isDragging'].includes(prop),\n})(({ theme, error }) => ({\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n background: theme.palette.common.white,\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n position: 'relative',\n padding: '8px 35px 8px 35px',\n cursor: 'grab',\n border: `1px solid ${error ? '#f44336' : '#C0C3CF'}`,\n '& img': {\n display: 'flex'\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n}));\n\nconst StyledDeleteIcon = styled(Delete)(({ theme }) => ({\n position: 'absolute',\n top: '6px',\n right: '0',\n color: theme.palette.grey[500],\n zIndex: 2,\n '&:hover': {\n cursor: 'pointer',\n color: theme.palette.common.black,\n },\n}));\n\nexport const BlankContent = (props) => {\n const { choice, onClick, onRemoveChoice, error, instanceId, disabled } = props;\n const {
|
|
1
|
+
{"version":3,"file":"choice.js","names":["_react","_interopRequireDefault","require","_propTypes","_MoreVert","_Delete","_core","_styles","_markupUtils","GripIcon","style","default","createElement","margin","propTypes","PropTypes","object","StyledChoice","styled","shouldForwardProp","prop","includes","theme","error","display","minWidth","minHeight","background","palette","common","white","boxSizing","borderRadius","overflow","position","padding","cursor","border","fontSize","StyledDeleteIcon","Delete","top","right","color","grey","zIndex","black","BlankContent","props","choice","onClick","onRemoveChoice","instanceId","disabled","attributes","listeners","setNodeRef","isDragging","useDraggable","id","data","type","value","choiceIsEmpty","handleDragStart","e","preventDefault","alert","_extends2","ref","onDragStart","left","dangerouslySetInnerHTML","__html","stopPropagation","exports","isRequired","func","bool","string","_default"],"sources":["../src/choice.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport MoreVert from '@mui/icons-material/MoreVert';\nimport Delete from '@mui/icons-material/Delete';\nimport { useDraggable } from '@dnd-kit/core';\nimport { styled } from '@mui/material/styles';\nimport { choiceIsEmpty } from './markupUtils';\n\nconst GripIcon = ({ style }) => (\n <span style={style}>\n <MoreVert style={{ margin: '0 -16px' }} />\n <MoreVert />\n </span>\n);\n\nGripIcon.propTypes = {\n style: PropTypes.object,\n};\n\nconst StyledChoice = styled('div', {\n shouldForwardProp: (prop) => !['error', 'isDragging'].includes(prop),\n})(({ theme, error }) => ({\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n background: theme.palette.common.white,\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n position: 'relative',\n padding: '8px 35px 8px 35px',\n cursor: 'grab',\n border: `1px solid ${error ? '#f44336' : '#C0C3CF'}`,\n '& img': {\n display: 'flex',\n },\n // browser adds extra marrgin for p tags by default\n '& p': {\n margin: 0,\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n}));\n\nconst StyledDeleteIcon = styled(Delete)(({ theme }) => ({\n position: 'absolute',\n top: '6px',\n right: '0',\n color: theme.palette.grey[500],\n zIndex: 2,\n '&:hover': {\n cursor: 'pointer',\n color: theme.palette.common.black,\n },\n}));\n\nexport const BlankContent = (props) => {\n const { choice, onClick, onRemoveChoice, error, instanceId, disabled } = props;\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id: `choice-${choice.id}-${instanceId || 'default'}`,\n data: {\n type: 'drag-in-the-blank-choice',\n id: choice.id,\n value: choice,\n instanceId: instanceId,\n },\n disabled: disabled || choiceIsEmpty(choice),\n });\n\n const handleDragStart = (e) => {\n if (choiceIsEmpty(choice)) {\n e.preventDefault();\n alert('You need to define a value for an answer choice before it can be associated with a response area.');\n return;\n }\n };\n\n return (\n <StyledChoice\n ref={setNodeRef}\n error={error}\n isDragging={isDragging}\n onClick={onClick}\n {...attributes}\n {...listeners}\n onDragStart={handleDragStart}\n >\n <GripIcon\n style={{\n position: 'absolute',\n top: '6px',\n left: '15px',\n color: '#9e9e9e',\n zIndex: 2,\n }}\n />\n\n <span dangerouslySetInnerHTML={{ __html: choice.value }} />\n\n <StyledDeleteIcon\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n\n onRemoveChoice(e);\n }}\n />\n </StyledChoice>\n );\n};\n\nBlankContent.propTypes = {\n choice: PropTypes.object.isRequired,\n onClick: PropTypes.func,\n onRemoveChoice: PropTypes.func.isRequired,\n error: PropTypes.bool,\n instanceId: PropTypes.string,\n disabled: PropTypes.bool,\n};\n\nexport default BlankContent;\n"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kBAAS,CAACgE,MAAM;EAC5B1B,QAAQ,EAAEtC,kBAAS,CAAC+D;AACtB,CAAC;AAAC,IAAAE,QAAA,GAAAL,OAAA,CAAAhE,OAAA,GAEaoC,YAAY","ignoreList":[]}
|
package/configure/lib/choices.js
CHANGED
|
@@ -225,6 +225,7 @@ class Choices extends _react.default.Component {
|
|
|
225
225
|
}
|
|
226
226
|
}, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
227
227
|
ref: ref => this.focusedNodeRef = ref,
|
|
228
|
+
autoFocus: true,
|
|
228
229
|
imageSupport: imageSupport,
|
|
229
230
|
markup: choice.value,
|
|
230
231
|
pluginProps: pluginProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choices.js","names":["_react","_interopRequireDefault","require","_propTypes","_editableHtmlTipTap","_configUi","_Button","_styles","_choice","_markupUtils","_mathRendering","StyledDesign","styled","theme","display","flexDirection","marginBottom","spacing","StyledAddButton","Button","marginLeft","StyledAltChoices","alignItems","flexWrap","justifyContent","marginTop","margin","ErrorText","fontSize","typography","color","palette","error","main","paddingBottom","Choices","React","Component","constructor","args","_defineProperty2","default","warning","open","createRef","prevValue","val","key","onChange","model","props","choices","correctResponse","alternateResponses","duplicatedValue","find","c","value","id","newChoices","filter","setState","text","map","choice","choiceIsEmpty","usedForResponse","Object","keys","forEach","responseKey","values","alternate","indexOf","newChoicesWithoutTheEmptyOne","focusedEl","oldChoices","maxId","length","Math","max","parseInt","newId","duplicates","includes","componentDidUpdate","focusedNodeRef","focus","renderMath","wrapperRef","current","render","state","mathMlOptions","maxChoices","toolbarOpts","uploadSoundSupport","imageSupport","pluginProps","maxImageWidth","maxImageHeight","maxLength","visibleChoices","getVisibleChoices","createElement","ref","variant","onClick","onAddChoice","disabled","index","style","minWidth","zIndex","markup","languageCharactersProps","language","preventDone","onChoiceChanged","onDone","undefined","onBlur","e","inInInsertCharacter","relatedTarget","closest","disableUnderline","charactersLimit","onChoiceFocus","onRemoveChoice","onChoiceRemove","AlertDialog","title","onConfirm","exports","PropTypes","bool","string","object","isRequired","func","number","_default"],"sources":["../src/choices.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Button from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport Choice from './choice';\nimport { choiceIsEmpty } from './markupUtils';\nimport { renderMath } from \"@pie-lib/math-rendering\";\n\nconst StyledDesign = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst StyledAddButton = styled(Button)({\n marginLeft: 'auto',\n});\n\nconst StyledAltChoices = styled('div')(({ theme }) => ({\n alignItems: 'flex-start',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-evenly',\n marginTop: theme.spacing(1),\n\n '& > *': {\n margin: theme.spacing(1),\n },\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingBottom: theme.spacing(2),\n}));\n\nexport class Choices extends React.Component {\n static propTypes = {\n duplicates: PropTypes.bool,\n error: PropTypes.string,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n toolbarOpts: PropTypes.object,\n pluginProps: PropTypes.object,\n maxChoices: PropTypes.number,\n uploadSoundSupport: PropTypes.object,\n maxImageWidth: PropTypes.number,\n maxImageHeight: PropTypes.number,\n maxLength: PropTypes.number,\n };\n\n state = { warning: { open: false } };\n preventDone = false;\n wrapperRef = React.createRef(null);\n\n componentDidUpdate() {\n if (this.focusedNodeRef) {\n this.focusedNodeRef.focus('end');\n }\n\n renderMath(this.wrapperRef.current);\n }\n\n onChoiceChanged = (prevValue, val, key) => {\n const { onChange, model } = this.props;\n const { choices, correctResponse, alternateResponses } = model;\n const duplicatedValue = (choices || []).find((c) => c.value === val && c.id !== key);\n\n // discard the new added choice or the changes if the choice would be a duplicate to one that already exists\n if (duplicatedValue) {\n if (prevValue === '') {\n // remove the new added choice from choices\n const newChoices = (choices || []).filter((c) => c.id !== key);\n\n onChange(newChoices);\n }\n\n this.setState({\n warning: {\n open: true,\n text: 'Identical answer choices are not allowed and the changes will be discarded.',\n },\n });\n\n return;\n }\n\n const newChoices = choices?.map((choice) => (choice.id === key ? { ...choice, value: val } : choice)) || [];\n\n if (!choiceIsEmpty({ value: val })) {\n onChange(newChoices);\n\n return;\n }\n\n // if the edited content is empty, its usage has to be searched in the correct response definitions\n let usedForResponse = false;\n\n if (correctResponse) {\n Object.keys(correctResponse).forEach((responseKey) => {\n if (correctResponse[responseKey] === key) {\n usedForResponse = true;\n }\n });\n }\n\n if (alternateResponses && !usedForResponse) {\n Object.values(alternateResponses).forEach((alternate) => {\n if (alternate.indexOf(key) >= 0) {\n usedForResponse = true;\n }\n });\n }\n\n if (usedForResponse) {\n this.setState({\n warning: {\n open: true,\n text: 'Answer choices cannot be blank and the changes will be discarded.',\n },\n });\n\n return;\n }\n\n const newChoicesWithoutTheEmptyOne = newChoices.filter((choice) => choice.id !== key);\n\n onChange(newChoicesWithoutTheEmptyOne);\n\n this.setState({\n warning: {\n open: true,\n text: 'Answer choices cannot be blank.',\n },\n });\n };\n\n onChoiceFocus = (id) =>\n this.setState({\n focusedEl: id,\n });\n\n onAddChoice = () => {\n const {\n model: { choices: oldChoices },\n onChange,\n } = this.props;\n\n // find the maximum existing id and add 1 to generate the new id so we avoid duplicates\n const maxId = oldChoices.length > 0\n ? Math.max(...oldChoices.map(choice => parseInt(choice.id, 10) || 0))\n : -1;\n const newId = `${maxId + 1}`;\n\n this.setState(\n {\n focusedEl: newId,\n },\n () => {\n onChange([\n ...oldChoices,\n {\n id: newId,\n value: '',\n },\n ]);\n },\n );\n };\n\n onChoiceRemove = (id) => {\n const {\n onChange,\n model: { choices },\n } = this.props;\n const newChoices = (choices || []).filter((choice) => choice.id !== id);\n\n onChange(newChoices);\n };\n\n getVisibleChoices = () => {\n const {\n duplicates,\n model: { choices, correctResponse },\n } = this.props;\n\n if (!choices) {\n return [];\n }\n\n if (duplicates) {\n return choices;\n }\n\n // if duplicates not allowed, remove the choices that are used to define the correct response\n return choices.filter((choice) => !(correctResponse && Object.values(correctResponse).includes(choice.id)));\n };\n\n render() {\n const { focusedEl, warning } = this.state;\n const {\n duplicates,\n error,\n mathMlOptions = {},\n maxChoices,\n model: { choices },\n toolbarOpts,\n uploadSoundSupport,\n imageSupport = {},\n pluginProps = {},\n maxImageWidth,\n maxImageHeight,\n maxLength,\n } = this.props;\n const visibleChoices = this.getVisibleChoices() || [];\n return (\n <StyledDesign ref={this.wrapperRef}>\n <StyledAddButton\n variant=\"contained\"\n color=\"primary\"\n onClick={this.onAddChoice}\n disabled={maxChoices && choices && maxChoices === choices.length}\n >\n Add Choice\n </StyledAddButton>\n\n <StyledAltChoices>\n {visibleChoices.map((choice, index) => {\n if (!choice || !choice.id) {\n return null;\n }\n\n return focusedEl === choice.id ? (\n <div\n key={index}\n style={{\n minWidth: '100%',\n zIndex: '100',\n }}\n >\n <EditableHtml\n ref={(ref) => (this.focusedNodeRef = ref)}\n imageSupport={imageSupport}\n markup={choice.value}\n pluginProps={pluginProps}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n onChange={(val) => {\n if (this.preventDone) {\n return;\n }\n\n this.onChoiceChanged(choice.value, val, choice.id);\n }}\n onDone={() => {\n if (this.preventDone) {\n return;\n }\n\n this.setState({\n focusedEl: undefined,\n });\n }}\n onBlur={(e) => {\n const inInInsertCharacter = e.relatedTarget && e.relatedTarget.closest('.insert-character-dialog');\n\n this.preventDone = inInInsertCharacter;\n }}\n disableUnderline\n toolbarOpts={toolbarOpts}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n maxImageHeight={maxImageHeight}\n maxImageWidth={maxImageWidth}\n charactersLimit={maxLength}\n />\n </div>\n ) : (\n <Choice\n key={index}\n duplicates={duplicates}\n choice={choice}\n error={error}\n onClick={() => this.onChoiceFocus(choice.id)}\n onRemoveChoice={() => this.onChoiceRemove(choice.id)}\n />\n );\n })}\n </StyledAltChoices>\n {error && <ErrorText>{error}</ErrorText>}\n\n <AlertDialog\n open={warning.open}\n title=\"Warning\"\n text={warning.text}\n onConfirm={() => this.setState({ warning: { open: false } })}\n />\n </StyledDesign>\n );\n }\n}\n\nexport default Choices;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,mBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAEA,MAAMS,YAAY,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EACjDC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,YAAY,EAAEH,KAAK,CAACI,OAAO,CAAC,GAAG;AACjC,CAAC,CAAC,CAAC;AAEH,MAAMC,eAAe,GAAG,IAAAN,cAAM,EAACO,eAAM,CAAC,CAAC;EACrCC,UAAU,EAAE;AACd,CAAC,CAAC;AAEF,MAAMC,gBAAgB,GAAG,IAAAT,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EACrDS,UAAU,EAAE,YAAY;EACxBR,OAAO,EAAE,MAAM;EACfS,QAAQ,EAAE,MAAM;EAChBC,cAAc,EAAE,cAAc;EAC9BC,SAAS,EAAEZ,KAAK,CAACI,OAAO,CAAC,CAAC,CAAC;EAE3B,OAAO,EAAE;I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AAS,EAAEA,CAAA,KAAM,IAAI,CAACxE,QAAQ,CAAC;QAAEnB,OAAO,EAAE;UAAEC,IAAI,EAAE;QAAM;MAAE,CAAC;IAAE,CAC9D,CACW,CAAC;EAEnB;AACF;AAAC2F,OAAA,CAAAnG,OAAA,GAAAA,OAAA;AAAA,IAAAK,gBAAA,CAAAC,OAAA,EAvQYN,OAAO,eACC;EACjBgD,UAAU,EAAEoD,kBAAS,CAACC,IAAI;EAC1BxG,KAAK,EAAEuG,kBAAS,CAACE,MAAM;EACvBxF,KAAK,EAAEsF,kBAAS,CAACG,MAAM,CAACC,UAAU;EAClC3F,QAAQ,EAAEuF,kBAAS,CAACK,IAAI,CAACD,UAAU;EACnC5C,WAAW,EAAEwC,kBAAS,CAACG,MAAM;EAC7BxC,WAAW,EAAEqC,kBAAS,CAACG,MAAM;EAC7B5C,UAAU,EAAEyC,kBAAS,CAACM,MAAM;EAC5B7C,kBAAkB,EAAEuC,kBAAS,CAACG,MAAM;EACpCvC,aAAa,EAAEoC,kBAAS,CAACM,MAAM;EAC/BzC,cAAc,EAAEmC,kBAAS,CAACM,MAAM;EAChCxC,SAAS,EAAEkC,kBAAS,CAACM;AACvB,CAAC;AAAA,IAAAC,QAAA,GAAAR,OAAA,CAAA7F,OAAA,GA4PYN,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"choices.js","names":["_react","_interopRequireDefault","require","_propTypes","_editableHtmlTipTap","_configUi","_Button","_styles","_choice","_markupUtils","_mathRendering","StyledDesign","styled","theme","display","flexDirection","marginBottom","spacing","StyledAddButton","Button","marginLeft","StyledAltChoices","alignItems","flexWrap","justifyContent","marginTop","margin","ErrorText","fontSize","typography","color","palette","error","main","paddingBottom","Choices","React","Component","constructor","args","_defineProperty2","default","warning","open","createRef","prevValue","val","key","onChange","model","props","choices","correctResponse","alternateResponses","duplicatedValue","find","c","value","id","newChoices","filter","setState","text","map","choice","choiceIsEmpty","usedForResponse","Object","keys","forEach","responseKey","values","alternate","indexOf","newChoicesWithoutTheEmptyOne","focusedEl","oldChoices","maxId","length","Math","max","parseInt","newId","duplicates","includes","componentDidUpdate","focusedNodeRef","focus","renderMath","wrapperRef","current","render","state","mathMlOptions","maxChoices","toolbarOpts","uploadSoundSupport","imageSupport","pluginProps","maxImageWidth","maxImageHeight","maxLength","visibleChoices","getVisibleChoices","createElement","ref","variant","onClick","onAddChoice","disabled","index","style","minWidth","zIndex","autoFocus","markup","languageCharactersProps","language","preventDone","onChoiceChanged","onDone","undefined","onBlur","e","inInInsertCharacter","relatedTarget","closest","disableUnderline","charactersLimit","onChoiceFocus","onRemoveChoice","onChoiceRemove","AlertDialog","title","onConfirm","exports","PropTypes","bool","string","object","isRequired","func","number","_default"],"sources":["../src/choices.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Button from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport Choice from './choice';\nimport { choiceIsEmpty } from './markupUtils';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nconst StyledDesign = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n marginBottom: theme.spacing(1.5),\n}));\n\nconst StyledAddButton = styled(Button)({\n marginLeft: 'auto',\n});\n\nconst StyledAltChoices = styled('div')(({ theme }) => ({\n alignItems: 'flex-start',\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-evenly',\n marginTop: theme.spacing(1),\n\n '& > *': {\n margin: theme.spacing(1),\n },\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingBottom: theme.spacing(2),\n}));\n\nexport class Choices extends React.Component {\n static propTypes = {\n duplicates: PropTypes.bool,\n error: PropTypes.string,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n toolbarOpts: PropTypes.object,\n pluginProps: PropTypes.object,\n maxChoices: PropTypes.number,\n uploadSoundSupport: PropTypes.object,\n maxImageWidth: PropTypes.number,\n maxImageHeight: PropTypes.number,\n maxLength: PropTypes.number,\n };\n\n state = { warning: { open: false } };\n preventDone = false;\n wrapperRef = React.createRef(null);\n\n componentDidUpdate() {\n if (this.focusedNodeRef) {\n this.focusedNodeRef.focus('end');\n }\n\n renderMath(this.wrapperRef.current);\n }\n\n onChoiceChanged = (prevValue, val, key) => {\n const { onChange, model } = this.props;\n const { choices, correctResponse, alternateResponses } = model;\n const duplicatedValue = (choices || []).find((c) => c.value === val && c.id !== key);\n\n // discard the new added choice or the changes if the choice would be a duplicate to one that already exists\n if (duplicatedValue) {\n if (prevValue === '') {\n // remove the new added choice from choices\n const newChoices = (choices || []).filter((c) => c.id !== key);\n\n onChange(newChoices);\n }\n\n this.setState({\n warning: {\n open: true,\n text: 'Identical answer choices are not allowed and the changes will be discarded.',\n },\n });\n\n return;\n }\n\n const newChoices = choices?.map((choice) => (choice.id === key ? { ...choice, value: val } : choice)) || [];\n\n if (!choiceIsEmpty({ value: val })) {\n onChange(newChoices);\n\n return;\n }\n\n // if the edited content is empty, its usage has to be searched in the correct response definitions\n let usedForResponse = false;\n\n if (correctResponse) {\n Object.keys(correctResponse).forEach((responseKey) => {\n if (correctResponse[responseKey] === key) {\n usedForResponse = true;\n }\n });\n }\n\n if (alternateResponses && !usedForResponse) {\n Object.values(alternateResponses).forEach((alternate) => {\n if (alternate.indexOf(key) >= 0) {\n usedForResponse = true;\n }\n });\n }\n\n if (usedForResponse) {\n this.setState({\n warning: {\n open: true,\n text: 'Answer choices cannot be blank and the changes will be discarded.',\n },\n });\n\n return;\n }\n\n const newChoicesWithoutTheEmptyOne = newChoices.filter((choice) => choice.id !== key);\n\n onChange(newChoicesWithoutTheEmptyOne);\n\n this.setState({\n warning: {\n open: true,\n text: 'Answer choices cannot be blank.',\n },\n });\n };\n\n onChoiceFocus = (id) =>\n this.setState({\n focusedEl: id,\n });\n\n onAddChoice = () => {\n const {\n model: { choices: oldChoices },\n onChange,\n } = this.props;\n\n // find the maximum existing id and add 1 to generate the new id so we avoid duplicates\n const maxId = oldChoices.length > 0 ? Math.max(...oldChoices.map((choice) => parseInt(choice.id, 10) || 0)) : -1;\n const newId = `${maxId + 1}`;\n\n this.setState(\n {\n focusedEl: newId,\n },\n () => {\n onChange([\n ...oldChoices,\n {\n id: newId,\n value: '',\n },\n ]);\n },\n );\n };\n\n onChoiceRemove = (id) => {\n const {\n onChange,\n model: { choices },\n } = this.props;\n const newChoices = (choices || []).filter((choice) => choice.id !== id);\n\n onChange(newChoices);\n };\n\n getVisibleChoices = () => {\n const {\n duplicates,\n model: { choices, correctResponse },\n } = this.props;\n\n if (!choices) {\n return [];\n }\n\n if (duplicates) {\n return choices;\n }\n\n // if duplicates not allowed, remove the choices that are used to define the correct response\n return choices.filter((choice) => !(correctResponse && Object.values(correctResponse).includes(choice.id)));\n };\n\n render() {\n const { focusedEl, warning } = this.state;\n const {\n duplicates,\n error,\n mathMlOptions = {},\n maxChoices,\n model: { choices },\n toolbarOpts,\n uploadSoundSupport,\n imageSupport = {},\n pluginProps = {},\n maxImageWidth,\n maxImageHeight,\n maxLength,\n } = this.props;\n const visibleChoices = this.getVisibleChoices() || [];\n return (\n <StyledDesign ref={this.wrapperRef}>\n <StyledAddButton\n variant=\"contained\"\n color=\"primary\"\n onClick={this.onAddChoice}\n disabled={maxChoices && choices && maxChoices === choices.length}\n >\n Add Choice\n </StyledAddButton>\n\n <StyledAltChoices>\n {visibleChoices.map((choice, index) => {\n if (!choice || !choice.id) {\n return null;\n }\n\n return focusedEl === choice.id ? (\n <div\n key={index}\n style={{\n minWidth: '100%',\n zIndex: '100',\n }}\n >\n <EditableHtml\n ref={(ref) => (this.focusedNodeRef = ref)}\n autoFocus\n imageSupport={imageSupport}\n markup={choice.value}\n pluginProps={pluginProps}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n onChange={(val) => {\n if (this.preventDone) {\n return;\n }\n\n this.onChoiceChanged(choice.value, val, choice.id);\n }}\n onDone={() => {\n if (this.preventDone) {\n return;\n }\n\n this.setState({\n focusedEl: undefined,\n });\n }}\n onBlur={(e) => {\n const inInInsertCharacter = e.relatedTarget && e.relatedTarget.closest('.insert-character-dialog');\n\n this.preventDone = inInInsertCharacter;\n }}\n disableUnderline\n toolbarOpts={toolbarOpts}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n maxImageHeight={maxImageHeight}\n maxImageWidth={maxImageWidth}\n charactersLimit={maxLength}\n />\n </div>\n ) : (\n <Choice\n key={index}\n duplicates={duplicates}\n choice={choice}\n error={error}\n onClick={() => this.onChoiceFocus(choice.id)}\n onRemoveChoice={() => this.onChoiceRemove(choice.id)}\n />\n );\n })}\n </StyledAltChoices>\n {error && <ErrorText>{error}</ErrorText>}\n\n <AlertDialog\n open={warning.open}\n title=\"Warning\"\n text={warning.text}\n onConfirm={() => this.setState({ warning: { open: false } })}\n />\n </StyledDesign>\n );\n }\n}\n\nexport default Choices;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,mBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAEA,MAAMS,YAAY,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EACjDC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,YAAY,EAAEH,KAAK,CAACI,OAAO,CAAC,GAAG;AACjC,CAAC,CAAC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GED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "9.1.1-next.
|
|
7
|
+
"version": "9.1.1-next.2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"postpublish": "../../scripts/postpublish"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"author": "",
|
|
29
29
|
"license": "ISC",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "1cead25be37ce917fdac95e0051a708cf4f4c0fd",
|
|
31
31
|
"main": "lib/index.js",
|
|
32
32
|
"module": "src/index.js"
|
|
33
33
|
}
|