@pie-element/inline-dropdown 6.1.2-next.7 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/lib/main.js +59 -62
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/response-area.js +99 -0
- package/configure/lib/response-area.js.map +1 -0
- package/configure/package.json +2 -2
- package/controller/package.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@6.1.1...@pie-element/inline-dropdown@6.1.2) (2024-10-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **inline-dropdown:** extracted ResponseArea into a separate component to ensure renderMath is called on re-render PD-4232 ([d4d2b39](https://github.com/pie-framework/pie-elements/commit/d4d2b39142a6bc79ef3c44197738d3ac49399eb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [6.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@6.1.0...@pie-element/inline-dropdown@6.1.1) (2024-10-03)
|
|
7
18
|
|
|
8
19
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.0.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@6.0.4...@pie-element/inline-dropdown-configure@6.0.5) (2024-10-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **inline-dropdown:** extracted ResponseArea into a separate component to ensure renderMath is called on re-render PD-4232 ([d4d2b39](https://github.com/pie-framework/pie-elements/commit/d4d2b39142a6bc79ef3c44197738d3ac49399eb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [6.0.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@6.0.3...@pie-element/inline-dropdown-configure@6.0.4) (2024-10-03)
|
|
7
18
|
|
|
8
19
|
|
package/configure/lib/main.js
CHANGED
|
@@ -65,6 +65,8 @@ var _inlineDropdownToolbar = _interopRequireDefault(require("./inline-dropdown-t
|
|
|
65
65
|
|
|
66
66
|
var _utils = require("./utils");
|
|
67
67
|
|
|
68
|
+
var _responseArea = _interopRequireDefault(require("./response-area"));
|
|
69
|
+
|
|
68
70
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
69
71
|
|
|
70
72
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -106,9 +108,6 @@ var styles = function styles(theme) {
|
|
|
106
108
|
rationaleChoices: {
|
|
107
109
|
marginBottom: theme.spacing.unit * 2.5
|
|
108
110
|
},
|
|
109
|
-
responseArea: {
|
|
110
|
-
paddingBottom: theme.spacing.unit * 2.5
|
|
111
|
-
},
|
|
112
111
|
panelDetails: {
|
|
113
112
|
display: 'block',
|
|
114
113
|
paddingTop: 0,
|
|
@@ -619,66 +618,64 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
619
618
|
}, /*#__PURE__*/_react["default"].createElement(_Info["default"], {
|
|
620
619
|
fontSize: 'small',
|
|
621
620
|
color: 'primary'
|
|
622
|
-
}))), /*#__PURE__*/_react["default"].createElement("
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
responseAreaProps: {
|
|
631
|
-
type: 'inline-dropdown',
|
|
632
|
-
options: {
|
|
633
|
-
duplicates: true
|
|
621
|
+
}))), /*#__PURE__*/_react["default"].createElement(_responseArea["default"], {
|
|
622
|
+
responseAreasError: responseAreasError,
|
|
623
|
+
responseAreaChoicesError: responseAreaChoicesError,
|
|
624
|
+
editableHtmlProps: {
|
|
625
|
+
pluginProps: getPluginProps(template === null || template === void 0 ? void 0 : template.inputConfiguration),
|
|
626
|
+
activePlugins: _editableHtml.ALL_PLUGINS,
|
|
627
|
+
toolbarOpts: {
|
|
628
|
+
position: 'top'
|
|
634
629
|
},
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
630
|
+
responseAreaProps: {
|
|
631
|
+
type: 'inline-dropdown',
|
|
632
|
+
options: {
|
|
633
|
+
duplicates: true
|
|
634
|
+
},
|
|
635
|
+
maxResponseAreas: maxResponseAreas,
|
|
636
|
+
respAreaToolbar: function respAreaToolbar(node, value, onToolbarDone) {
|
|
637
|
+
var respAreaChoices = _this2.state.respAreaChoices;
|
|
638
|
+
return function () {
|
|
639
|
+
return /*#__PURE__*/_react["default"].createElement(_inlineDropdownToolbar["default"], {
|
|
640
|
+
onAddChoice: _this2.onAddChoice,
|
|
641
|
+
onCheck: _this2.onCheck,
|
|
642
|
+
onRemoveChoice: function onRemoveChoice(index) {
|
|
643
|
+
return _this2.onRemoveChoice(node.data.get('index'), index);
|
|
644
|
+
},
|
|
645
|
+
onSelectChoice: function onSelectChoice(index) {
|
|
646
|
+
return _this2.onSelectChoice(node.data.get('index'), index);
|
|
647
|
+
},
|
|
648
|
+
node: node,
|
|
649
|
+
value: value,
|
|
650
|
+
onToolbarDone: onToolbarDone,
|
|
651
|
+
choices: respAreaChoices[node.data.get('index')],
|
|
652
|
+
spellCheck: spellCheckEnabled,
|
|
653
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
654
|
+
mathMlOptions: mathMlOptions,
|
|
655
|
+
baseInputConfiguration: baseInputConfiguration,
|
|
656
|
+
responseAreaInputConfiguration: responseAreaInputConfiguration
|
|
657
|
+
});
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
spellCheck: spellCheckEnabled,
|
|
662
|
+
className: classes.markup,
|
|
663
|
+
markup: model.slateMarkup || '',
|
|
664
|
+
onChange: this.onChange,
|
|
665
|
+
imageSupport: imageSupport,
|
|
666
|
+
disableImageAlignmentButtons: true,
|
|
667
|
+
disabled: false,
|
|
668
|
+
highlightShape: false,
|
|
669
|
+
error: responseAreasError,
|
|
670
|
+
uploadSoundSupport: uploadSoundSupport,
|
|
671
|
+
languageCharactersProps: [{
|
|
672
|
+
language: 'spanish'
|
|
673
|
+
}, {
|
|
674
|
+
language: 'special'
|
|
675
|
+
}],
|
|
676
|
+
mathMlOptions: mathMlOptions
|
|
677
|
+
}
|
|
678
|
+
}), choiceRationaleEnabled && renderChoiceRationale(), rationaleEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
682
679
|
label: rationale.label,
|
|
683
680
|
className: classes.promptHolder
|
|
684
681
|
}, /*#__PURE__*/_react["default"].createElement(_editableHtml.EditableHtml, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["toggle","settings","Panel","dropdown","styles","theme","promptHolder","width","paddingTop","spacing","unit","marginBottom","markup","minHeight","choiceConfiguration","paddingBottom","text","fontSize","typography","marginRight","rationaleLabel","display","whiteSpace","rationaleChoices","responseArea","panelDetails","flexContainer","alignItems","tooltip","maxWidth","errorText","color","palette","error","main","createElementFromHTML","htmlString","div","document","createElement","innerHTML","trim","Main","warning","open","newVal","props","onModelChanged","model","prompt","onModelChange","rationale","index","choice","indexOfChoice","choices","findIndex","elem","label","value","splice","teacherInstructions","slateMarkup","callback","setState","onClose","onConfirm","respAreaChoices","state","domMarkup","allRespAreas","querySelectorAll","allChoices","forEach","el","dataset","existingRespAreaChoices","obj","key","newRespAreaChoices","shouldWarn","newChoices","length","find","c","correct","remove","choiceIndex","maxResponseAreaChoices","configuration","undefined","r","idx","map","parseInt","filter","val","isNaN","push","respIndex","selectedIndex","nProps","newState","domNode","ReactDOM","findDOMNode","classes","onConfigurationChanged","imageSupport","uploadSoundSupport","baseInputConfiguration","choiceRationale","contentDimensions","lockChoiceOrder","maxResponseAreas","maxImageWidth","maxImageHeight","partialScoring","settingsPanelDisabled","spellCheck","template","withRubric","mathMlOptions","language","languageChoices","responseAreaInputConfiguration","choiceRationaleEnabled","errors","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","promptError","rationaleError","responseAreasError","responseAreaChoicesError","teacherInstructionsError","defaultImageMaxWidth","defaultImageMaxHeight","renderChoiceRationale","Object","keys","__html","onChoiceRationaleChanged","toolbarOpts","position","validationMessage","panelSettings","enabled","options","panelProperties","rubricEnabled","getPluginProps","Settings","Properties","onTeacherInstructionsChanged","inputConfiguration","onPromptChanged","ALL_PLUGINS","type","duplicates","respAreaToolbar","node","onToolbarDone","onAddChoice","onCheck","onRemoveChoice","data","get","onSelectChoice","onChange","onRationaleChanged","React","Component","PropTypes","object","isRequired","disableSidePanel","bool","func","shape","add","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,MAAR,GAAoCC,kBAApC,CAAQD,MAAR;AAAA,IAAgBE,KAAhB,GAAoCD,kBAApC,CAAgBC,KAAhB;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGZC,MAAAA,YAAY,EAAEN,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB;AAHvB,KADW;AAMzBE,IAAAA,MAAM,EAAE;AACNC,MAAAA,SAAS,EAAE,OADL;AAENN,MAAAA,KAAK,EAAE,MAFD;AAGN,sCAAgC;AAC9BM,QAAAA,SAAS,EAAE;AADmB;AAH1B,KANiB;AAazBC,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,UAAU,EAAEH,KAAK,CAACI,OA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AAV,CAAeH,UALtB;AAMjBvE,EAAAA,OAAO,EAAEqE,sBAAUC,MAAV,CAAiBC,UANT;AAOjBrE,EAAAA,YAAY,EAAEmE,sBAAUM,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEP,sBAAUK,IAAV,CAAeH,UADQ;AAE5B,cAAQF,sBAAUK,IAAV,CAAeH;AAFK,GAAhB,CAPG;AAWjBpE,EAAAA,kBAAkB,EAAEkE,sBAAUM,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEP,sBAAUK,IAAV,CAAeH,UADc;AAElC,cAAQF,sBAAUK,IAAV,CAAeH;AAFW,GAAhB;AAXH,C;AAkgBrB,IAAMM,MAAM,GAAG,wBAAWnL,MAAX,EAAmBsC,IAAnB,CAAf;eAEe6I,M","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { EditableHtml, ALL_PLUGINS } from '@pie-lib/pie-toolbox/editable-html';\nimport { AlertDialog, InputContainer, layout, settings } from '@pie-lib/pie-toolbox/config-ui';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport cloneDeep from 'lodash/cloneDeep';\nimport isEqual from 'lodash/isEqual';\nimport isUndefined from 'lodash/isUndefined';\nimport isEmpty from 'lodash/isEmpty';\nimport reduce from 'lodash/reduce';\nimport max from 'lodash/max';\nimport { withStyles } from '@material-ui/core/styles';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Info from '@material-ui/icons/Info';\nimport InlineDropdownToolbar from './inline-dropdown-toolbar';\nimport { generateValidationMessage } from './utils';\n\nconst { toggle, Panel, dropdown } = settings;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n markup: {\n minHeight: '100px',\n width: '100%',\n '& [data-slate-editor=\"true\"]': {\n minHeight: '100px',\n },\n },\n choiceConfiguration: {\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n text: {\n fontSize: theme.typography.fontSize + 2,\n marginRight: theme.spacing.unit,\n },\n rationaleLabel: {\n display: 'flex',\n whiteSpace: 'break-spaces',\n },\n rationaleChoices: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n responseArea: {\n paddingBottom: theme.spacing.unit * 2.5,\n },\n panelDetails: {\n display: 'block',\n paddingTop: 0,\n paddingBottom: 0,\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: theme.spacing.unit,\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n});\n\nconst createElementFromHTML = (htmlString) => {\n const div = document.createElement('div');\n\n div.innerHTML = (htmlString || '').trim();\n\n return div;\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n configuration: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n state = {\n warning: { open: false },\n };\n\n componentDidMount() {\n const {\n model: { choices },\n } = this.props;\n\n this.setState({ respAreaChoices: cloneDeep(choices) });\n }\n\n UNSAFE_componentWillReceiveProps(nProps) {\n const newState = {};\n\n if (\n !isEqual(nProps.model.choices, this.props.model.choices) ||\n !isEqual(nProps.model.choices, this.state.respAreaChoices)\n ) {\n newState.respAreaChoices = cloneDeep(nProps.model.choices);\n }\n\n if (!isEmpty(newState)) {\n this.setState(newState);\n }\n }\n\n componentDidUpdate() {\n //eslint-disable-next-line\n const domNode = ReactDOM.findDOMNode(this);\n\n renderMath(domNode);\n }\n\n onModelChange = (newVal) => {\n this.props.onModelChanged({ ...this.props.model, ...newVal });\n };\n\n onPromptChanged = (prompt) => {\n this.onModelChange({ prompt });\n };\n\n onRationaleChanged = (rationale) => {\n this.onModelChange({ rationale });\n };\n\n onChoiceRationaleChanged = (index, choice) => {\n const { model } = this.props;\n const indexOfChoice =\n model.choices &&\n model.choices[index] &&\n model.choices[index].findIndex((elem) => elem.label === choice.label && elem.value === choice.value);\n\n model.choices[index] && model.choices[index].splice(indexOfChoice, 1, choice);\n\n this.onModelChange(model);\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.onModelChange({ teacherInstructions });\n };\n\n onMarkupChanged = (slateMarkup) => {\n this.onModelChange({ slateMarkup });\n };\n\n onCheck = (callback) => {\n this.setState({\n warning: {\n open: true,\n text: 'Response areas with under 2 options or with no correct answers will be discarded.',\n onClose: () => {\n this.setState({ warning: { open: false } });\n },\n onConfirm: () => {\n this.setState({ warning: { open: false } }, callback);\n },\n },\n });\n };\n\n onChange = (markup) => {\n const { respAreaChoices } = this.state;\n const domMarkup = createElementFromHTML(markup);\n const allRespAreas = domMarkup.querySelectorAll('[data-type=\"inline_dropdown\"]');\n const allChoices = {};\n\n allRespAreas.forEach((el) => {\n allChoices[el.dataset.index] = el.dataset.value || '';\n });\n\n const existingRespAreaChoices = reduce(\n respAreaChoices,\n (obj, choices, key) => {\n if (!isUndefined(allChoices[key])) {\n obj[key] = respAreaChoices[key];\n }\n\n return obj;\n },\n {},\n );\n\n const newRespAreaChoices = {};\n let shouldWarn = false;\n\n allRespAreas.forEach((el, index) => {\n const newChoices = existingRespAreaChoices[el.dataset.index] || [];\n\n if (newChoices.length < 2 || !newChoices.find((c) => c.correct)) {\n el.remove();\n shouldWarn = true;\n } else {\n newRespAreaChoices[index] = existingRespAreaChoices[el.dataset.index] || [];\n el.dataset.index = index;\n }\n });\n\n if (shouldWarn) {\n this.setState({\n warning: {\n open: true,\n text: 'Response areas with under 2 options or with no correct answers will be discarded.',\n onClose: () => {\n this.setState({ warning: { open: false } });\n },\n onConfirm: () => {\n this.setState({ warning: { open: false } }, () =>\n this.onModelChange({\n choices: cloneDeep(newRespAreaChoices),\n slateMarkup: domMarkup.innerHTML,\n }),\n );\n },\n },\n });\n } else {\n this.onModelChange({\n choices: cloneDeep(newRespAreaChoices),\n slateMarkup: domMarkup.innerHTML,\n });\n }\n };\n\n onAddChoice = (index, label, choiceIndex) => {\n const { respAreaChoices } = this.state;\n const { maxResponseAreaChoices } = this.props.configuration;\n\n if (respAreaChoices[index] && respAreaChoices[index].length >= maxResponseAreaChoices) {\n this.setState({\n warning: {\n open: true,\n text: `There are only ${maxResponseAreaChoices} answers allowed per choice.`,\n onClose: undefined,\n onConfirm: () => {\n this.setState({ warning: { open: false } });\n },\n },\n });\n\n return;\n }\n\n if (!respAreaChoices[index]) {\n respAreaChoices[index] = [];\n }\n\n // check for duplicate answer, but exclude the one that is currently edited\n if ((respAreaChoices[index] || []).find((r, idx) => r.label === label && idx !== choiceIndex)) {\n // show warning for duplicated answers\n this.setState({\n warning: {\n open: true,\n text: 'Duplicate answers are not allowed.',\n onClose: undefined,\n onConfirm: () => {\n this.setState({ warning: { open: false } });\n },\n },\n });\n\n return;\n }\n\n if (choiceIndex >= 0 && respAreaChoices[index]?.[choiceIndex]) {\n // we need to update the choice label with the new value\n respAreaChoices[index][choiceIndex].label = label;\n } else {\n // add a new choice\n const value =\n (respAreaChoices[index] &&\n max(respAreaChoices[index].map((c) => parseInt(c.value)).filter((val) => !isNaN(val)))) ||\n 0;\n\n respAreaChoices[index].push({\n label,\n value: `${value + 1}`,\n correct: false,\n });\n }\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n onRemoveChoice = (respIndex, index) => {\n const { respAreaChoices } = this.state;\n\n respAreaChoices[respIndex].splice(index, 1);\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n onSelectChoice = (respIndex, selectedIndex) => {\n const { respAreaChoices } = this.state;\n\n respAreaChoices[respIndex] = respAreaChoices[respIndex].map((choice, index) => ({\n ...choice,\n correct: index === selectedIndex,\n }));\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n render() {\n const { warning } = this.state;\n const { classes, model, configuration, onConfigurationChanged, imageSupport, uploadSoundSupport } = this.props;\n const {\n baseInputConfiguration = {},\n choiceRationale = {},\n contentDimensions = {},\n lockChoiceOrder = {},\n maxResponseAreas,\n maxImageWidth = {},\n maxImageHeight = {},\n partialScoring = {},\n prompt = {},\n rationale = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n template = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n responseAreaInputConfiguration = {},\n } = configuration || {};\n\n const {\n choiceRationaleEnabled,\n choices,\n errors,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n responseAreasError,\n responseAreaChoicesError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const renderChoiceRationale = () =>\n (Object.keys(choices) || []).map((key, index) => (\n <div key={key} className={classes.rationaleChoices}>\n <ExpansionPanel>\n <ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>\n <Typography className={classes.text}>{`Rationale for response area #${index + 1}`}</Typography>\n </ExpansionPanelSummary>\n\n <ExpansionPanelDetails className={classes.panelDetails}>\n {(choices[key] || []).map((choice) => (\n <InputContainer\n key={choice.label}\n label={\n <span\n className={classes.rationaleLabel}\n dangerouslySetInnerHTML={{\n __html: `${rationale.label} for ${choice.label} (${choice.correct ? 'correct' : 'incorrect'})`,\n }}\n />\n }\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={choice.rationale || ''}\n spellCheck={spellCheckEnabled}\n onChange={(c) => this.onChoiceRationaleChanged(key, { ...choice, rationale: c })}\n imageSupport={imageSupport}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n ))}\n </ExpansionPanelDetails>\n </ExpansionPanel>\n </div>\n ));\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const validationMessage = generateValidationMessage(configuration);\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n choiceRationaleEnabled: choiceRationale.settings && toggle(choiceRationale.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => this.onModelChange(model)}\n onChangeConfiguration={(configuration) => onConfigurationChanged(configuration, true)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n disableUnderline\n error={promptError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <div className={classes.errorText}>{promptError}</div>}\n </InputContainer>\n )}\n\n <div className={classes.flexContainer}>\n <Typography className={classes.text} component={'div'}>\n Define Template, Choices, and Correct Responses\n </Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} />\n </Tooltip>\n </div>\n\n <div className={classes.responseArea}>\n <EditableHtml\n pluginProps={getPluginProps(template?.inputConfiguration)}\n activePlugins={ALL_PLUGINS}\n toolbarOpts={{ position: 'top' }}\n responseAreaProps={{\n type: 'inline-dropdown',\n options: {\n duplicates: true,\n },\n maxResponseAreas: maxResponseAreas,\n respAreaToolbar: (node, value, onToolbarDone) => {\n const { respAreaChoices } = this.state;\n\n return () => (\n <InlineDropdownToolbar\n onAddChoice={this.onAddChoice}\n onCheck={this.onCheck}\n onRemoveChoice={(index) => this.onRemoveChoice(node.data.get('index'), index)}\n onSelectChoice={(index) => this.onSelectChoice(node.data.get('index'), index)}\n node={node}\n value={value}\n onToolbarDone={onToolbarDone}\n choices={respAreaChoices[node.data.get('index')]}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n baseInputConfiguration={baseInputConfiguration}\n responseAreaInputConfiguration={responseAreaInputConfiguration}\n />\n );\n },\n }}\n spellCheck={spellCheckEnabled}\n className={classes.markup}\n markup={model.slateMarkup || ''}\n onChange={this.onChange}\n imageSupport={imageSupport}\n disableImageAlignmentButtons={true}\n disabled={false}\n highlightShape={false}\n error={responseAreasError}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {responseAreasError && <div className={classes.errorText}>{responseAreasError}</div>}\n {responseAreaChoicesError && <div className={classes.errorText}>{responseAreaChoicesError}</div>}\n </div>\n\n {choiceRationaleEnabled && renderChoiceRationale()}\n\n {rationaleEnabled && (\n <InputContainer label={rationale.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.rationale || ''}\n onChange={this.onRationaleChanged}\n imageSupport={imageSupport}\n error={rationaleError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <div className={classes.errorText}>{rationaleError}</div>}\n </InputContainer>\n )}\n\n <AlertDialog\n open={warning.open}\n title=\"Warning\"\n text={warning.text}\n onClose={warning.onClose}\n onConfirm={warning.onConfirm}\n />\n </layout.ConfigLayout>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["toggle","settings","Panel","dropdown","styles","theme","promptHolder","width","paddingTop","spacing","unit","marginBottom","markup","minHeight","choiceConfiguration","paddingBottom","text","fontSize","typography","marginRight","rationaleLabel","display","whiteSpace","rationaleChoices","panelDetails","flexContainer","alignItems","tooltip","maxWidth","errorText","color","palette","error","main","createElementFromHTML","htmlString","div","document","createElement","innerHTML","trim","Main","warning","open","newVal","props","onModelChanged","model","prompt","onModelChange","rationale","index","choice","indexOfChoice","choices","findIndex","elem","label","value","splice","teacherInstructions","slateMarkup","callback","setState","onClose","onConfirm","respAreaChoices","state","domMarkup","allRespAreas","querySelectorAll","allChoices","forEach","el","dataset","existingRespAreaChoices","obj","key","newRespAreaChoices","shouldWarn","newChoices","length","find","c","correct","remove","choiceIndex","maxResponseAreaChoices","configuration","undefined","r","idx","map","parseInt","filter","val","isNaN","push","respIndex","selectedIndex","nProps","newState","domNode","ReactDOM","findDOMNode","classes","onConfigurationChanged","imageSupport","uploadSoundSupport","baseInputConfiguration","choiceRationale","contentDimensions","lockChoiceOrder","maxResponseAreas","maxImageWidth","maxImageHeight","partialScoring","settingsPanelDisabled","spellCheck","template","withRubric","mathMlOptions","language","languageChoices","responseAreaInputConfiguration","choiceRationaleEnabled","errors","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","promptError","rationaleError","responseAreasError","responseAreaChoicesError","teacherInstructionsError","defaultImageMaxWidth","defaultImageMaxHeight","renderChoiceRationale","Object","keys","__html","onChoiceRationaleChanged","toolbarOpts","position","validationMessage","panelSettings","enabled","options","panelProperties","rubricEnabled","getPluginProps","Settings","Properties","onTeacherInstructionsChanged","inputConfiguration","onPromptChanged","pluginProps","activePlugins","ALL_PLUGINS","responseAreaProps","type","duplicates","respAreaToolbar","node","onToolbarDone","onAddChoice","onCheck","onRemoveChoice","data","get","onSelectChoice","className","onChange","disableImageAlignmentButtons","disabled","highlightShape","languageCharactersProps","onRationaleChanged","React","Component","PropTypes","object","isRequired","disableSidePanel","bool","func","shape","add","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,MAAR,GAAoCC,kBAApC,CAAQD,MAAR;AAAA,IAAgBE,KAAhB,GAAoCD,kBAApC,CAAgBC,KAAhB;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGZC,MAAAA,YAAY,EAAEN,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB;AAHvB,KADW;AAMzBE,IAAAA,MAAM,EAAE;AACNC,MAAAA,SAAS,EAAE,OADL;AAENN,MAAAA,KAAK,EAAE,MAFD;AAGN,sCAAgC;AAC9BM,QAAAA,SAAS,EAAE;AADmB;AAH1B,KANiB;AAazBC,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,UAAU,EAAEH,KAAK,CAAC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B,cAAQF,sBAAUK,IAAV,CAAeH;AAFK,GAAhB,CAPG;AAWjB5E,EAAAA,kBAAkB,EAAE0E,sBAAUM,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEP,sBAAUK,IAAV,CAAeH,UADc;AAElC,cAAQF,sBAAUK,IAAV,CAAeH;AAFW,GAAhB;AAXH,C;AAkgBrB,IAAMM,MAAM,GAAG,wBAAW1L,MAAX,EAAmBqC,IAAnB,CAAf;eAEeqJ,M","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { EditableHtml, ALL_PLUGINS } from '@pie-lib/pie-toolbox/editable-html';\nimport { AlertDialog, InputContainer, layout, settings } from '@pie-lib/pie-toolbox/config-ui';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport cloneDeep from 'lodash/cloneDeep';\nimport isEqual from 'lodash/isEqual';\nimport isUndefined from 'lodash/isUndefined';\nimport isEmpty from 'lodash/isEmpty';\nimport reduce from 'lodash/reduce';\nimport max from 'lodash/max';\nimport { withStyles } from '@material-ui/core/styles';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Info from '@material-ui/icons/Info';\nimport InlineDropdownToolbar from './inline-dropdown-toolbar';\nimport { generateValidationMessage } from './utils';\nimport ResponseAreaComponent from './response-area';\n\nconst { toggle, Panel, dropdown } = settings;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n markup: {\n minHeight: '100px',\n width: '100%',\n '& [data-slate-editor=\"true\"]': {\n minHeight: '100px',\n },\n },\n choiceConfiguration: {\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n text: {\n fontSize: theme.typography.fontSize + 2,\n marginRight: theme.spacing.unit,\n },\n rationaleLabel: {\n display: 'flex',\n whiteSpace: 'break-spaces',\n },\n rationaleChoices: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n panelDetails: {\n display: 'block',\n paddingTop: 0,\n paddingBottom: 0,\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: theme.spacing.unit,\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n }\n});\n\nconst createElementFromHTML = (htmlString) => {\n const div = document.createElement('div');\n\n div.innerHTML = (htmlString || '').trim();\n\n return div;\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n configuration: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n state = {\n warning: { open: false },\n };\n\n componentDidMount() {\n const {\n model: { choices },\n } = this.props;\n\n this.setState({ respAreaChoices: cloneDeep(choices) });\n }\n\n UNSAFE_componentWillReceiveProps(nProps) {\n const newState = {};\n\n if (\n !isEqual(nProps.model.choices, this.props.model.choices) ||\n !isEqual(nProps.model.choices, this.state.respAreaChoices)\n ) {\n newState.respAreaChoices = cloneDeep(nProps.model.choices);\n }\n\n if (!isEmpty(newState)) {\n this.setState(newState);\n }\n }\n\n componentDidUpdate() {\n //eslint-disable-next-line\n const domNode = ReactDOM.findDOMNode(this);\n\n renderMath(domNode);\n }\n\n onModelChange = (newVal) => {\n this.props.onModelChanged({ ...this.props.model, ...newVal });\n };\n\n onPromptChanged = (prompt) => {\n this.onModelChange({ prompt });\n };\n\n onRationaleChanged = (rationale) => {\n this.onModelChange({ rationale });\n };\n\n onChoiceRationaleChanged = (index, choice) => {\n const { model } = this.props;\n const indexOfChoice =\n model.choices &&\n model.choices[index] &&\n model.choices[index].findIndex((elem) => elem.label === choice.label && elem.value === choice.value);\n\n model.choices[index] && model.choices[index].splice(indexOfChoice, 1, choice);\n\n this.onModelChange(model);\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.onModelChange({ teacherInstructions });\n };\n\n onMarkupChanged = (slateMarkup) => {\n this.onModelChange({ slateMarkup });\n };\n\n onCheck = (callback) => {\n this.setState({\n warning: {\n open: true,\n text: 'Response areas with under 2 options or with no correct answers will be discarded.',\n onClose: () => {\n this.setState({ warning: { open: false } });\n },\n onConfirm: () => {\n this.setState({ warning: { open: false } }, callback);\n },\n },\n });\n };\n\n onChange = (markup) => {\n const { respAreaChoices } = this.state;\n const domMarkup = createElementFromHTML(markup);\n const allRespAreas = domMarkup.querySelectorAll('[data-type=\"inline_dropdown\"]');\n const allChoices = {};\n\n allRespAreas.forEach((el) => {\n allChoices[el.dataset.index] = el.dataset.value || '';\n });\n\n const existingRespAreaChoices = reduce(\n respAreaChoices,\n (obj, choices, key) => {\n if (!isUndefined(allChoices[key])) {\n obj[key] = respAreaChoices[key];\n }\n\n return obj;\n },\n {},\n );\n\n const newRespAreaChoices = {};\n let shouldWarn = false;\n\n allRespAreas.forEach((el, index) => {\n const newChoices = existingRespAreaChoices[el.dataset.index] || [];\n\n if (newChoices.length < 2 || !newChoices.find((c) => c.correct)) {\n el.remove();\n shouldWarn = true;\n } else {\n newRespAreaChoices[index] = existingRespAreaChoices[el.dataset.index] || [];\n el.dataset.index = index;\n }\n });\n\n if (shouldWarn) {\n this.setState({\n warning: {\n open: true,\n text: 'Response areas with under 2 options or with no correct answers will be discarded.',\n onClose: () => {\n this.setState({ warning: { open: false } });\n },\n onConfirm: () => {\n this.setState({ warning: { open: false } }, () =>\n this.onModelChange({\n choices: cloneDeep(newRespAreaChoices),\n slateMarkup: domMarkup.innerHTML,\n }),\n );\n },\n },\n });\n } else {\n this.onModelChange({\n choices: cloneDeep(newRespAreaChoices),\n slateMarkup: domMarkup.innerHTML,\n });\n }\n };\n\n onAddChoice = (index, label, choiceIndex) => {\n const { respAreaChoices } = this.state;\n const { maxResponseAreaChoices } = this.props.configuration;\n\n if (respAreaChoices[index] && respAreaChoices[index].length >= maxResponseAreaChoices) {\n this.setState({\n warning: {\n open: true,\n text: `There are only ${maxResponseAreaChoices} answers allowed per choice.`,\n onClose: undefined,\n onConfirm: () => {\n this.setState({ warning: { open: false } });\n },\n },\n });\n\n return;\n }\n\n if (!respAreaChoices[index]) {\n respAreaChoices[index] = [];\n }\n\n // check for duplicate answer, but exclude the one that is currently edited\n if ((respAreaChoices[index] || []).find((r, idx) => r.label === label && idx !== choiceIndex)) {\n // show warning for duplicated answers\n this.setState({\n warning: {\n open: true,\n text: 'Duplicate answers are not allowed.',\n onClose: undefined,\n onConfirm: () => {\n this.setState({ warning: { open: false } });\n },\n },\n });\n\n return;\n }\n\n if (choiceIndex >= 0 && respAreaChoices[index]?.[choiceIndex]) {\n // we need to update the choice label with the new value\n respAreaChoices[index][choiceIndex].label = label;\n } else {\n // add a new choice\n const value =\n (respAreaChoices[index] &&\n max(respAreaChoices[index].map((c) => parseInt(c.value)).filter((val) => !isNaN(val)))) ||\n 0;\n\n respAreaChoices[index].push({\n label,\n value: `${value + 1}`,\n correct: false,\n });\n }\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n onRemoveChoice = (respIndex, index) => {\n const { respAreaChoices } = this.state;\n\n respAreaChoices[respIndex].splice(index, 1);\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n onSelectChoice = (respIndex, selectedIndex) => {\n const { respAreaChoices } = this.state;\n\n respAreaChoices[respIndex] = respAreaChoices[respIndex].map((choice, index) => ({\n ...choice,\n correct: index === selectedIndex,\n }));\n\n this.onModelChange({ choices: cloneDeep(respAreaChoices) });\n };\n\n render() {\n const { warning } = this.state;\n const { classes, model, configuration, onConfigurationChanged, imageSupport, uploadSoundSupport } = this.props;\n const {\n baseInputConfiguration = {},\n choiceRationale = {},\n contentDimensions = {},\n lockChoiceOrder = {},\n maxResponseAreas,\n maxImageWidth = {},\n maxImageHeight = {},\n partialScoring = {},\n prompt = {},\n rationale = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n template = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n responseAreaInputConfiguration = {},\n } = configuration || {};\n\n const {\n choiceRationaleEnabled,\n choices,\n errors,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n responseAreasError,\n responseAreaChoicesError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const renderChoiceRationale = () =>\n (Object.keys(choices) || []).map((key, index) => (\n <div key={key} className={classes.rationaleChoices}>\n <ExpansionPanel>\n <ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>\n <Typography className={classes.text}>{`Rationale for response area #${index + 1}`}</Typography>\n </ExpansionPanelSummary>\n\n <ExpansionPanelDetails className={classes.panelDetails}>\n {(choices[key] || []).map((choice) => (\n <InputContainer\n key={choice.label}\n label={\n <span\n className={classes.rationaleLabel}\n dangerouslySetInnerHTML={{\n __html: `${rationale.label} for ${choice.label} (${choice.correct ? 'correct' : 'incorrect'})`,\n }}\n />\n }\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={choice.rationale || ''}\n spellCheck={spellCheckEnabled}\n onChange={(c) => this.onChoiceRationaleChanged(key, { ...choice, rationale: c })}\n imageSupport={imageSupport}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n ))}\n </ExpansionPanelDetails>\n </ExpansionPanel>\n </div>\n ));\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const validationMessage = generateValidationMessage(configuration);\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n choiceRationaleEnabled: choiceRationale.settings && toggle(choiceRationale.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => this.onModelChange(model)}\n onChangeConfiguration={(configuration) => onConfigurationChanged(configuration, true)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n disableUnderline\n error={promptError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <div className={classes.errorText}>{promptError}</div>}\n </InputContainer>\n )}\n\n <div className={classes.flexContainer}>\n <Typography className={classes.text} component={'div'}>\n Define Template, Choices, and Correct Responses\n </Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} />\n </Tooltip>\n </div>\n\n <ResponseAreaComponent\n responseAreasError={responseAreasError}\n responseAreaChoicesError={responseAreaChoicesError}\n editableHtmlProps={{\n pluginProps: getPluginProps(template?.inputConfiguration),\n activePlugins: ALL_PLUGINS,\n toolbarOpts: { position: 'top' },\n responseAreaProps: {\n type: 'inline-dropdown',\n options: {\n duplicates: true,\n },\n maxResponseAreas: maxResponseAreas,\n respAreaToolbar: (node, value, onToolbarDone) => {\n const { respAreaChoices } = this.state;\n\n return () => (\n <InlineDropdownToolbar\n onAddChoice={this.onAddChoice}\n onCheck={this.onCheck}\n onRemoveChoice={(index) => this.onRemoveChoice(node.data.get('index'), index)}\n onSelectChoice={(index) => this.onSelectChoice(node.data.get('index'), index)}\n node={node}\n value={value}\n onToolbarDone={onToolbarDone}\n choices={respAreaChoices[node.data.get('index')]}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n baseInputConfiguration={baseInputConfiguration}\n responseAreaInputConfiguration={responseAreaInputConfiguration}\n />\n );\n },\n },\n spellCheck: spellCheckEnabled,\n className: classes.markup,\n markup: model.slateMarkup || '',\n onChange: this.onChange,\n imageSupport: imageSupport,\n disableImageAlignmentButtons: true,\n disabled: false,\n highlightShape: false,\n error: responseAreasError,\n uploadSoundSupport: uploadSoundSupport,\n languageCharactersProps: [{ language: 'spanish' }, { language: 'special' }],\n mathMlOptions: mathMlOptions,\n }}\n />\n\n {choiceRationaleEnabled && renderChoiceRationale()}\n\n {rationaleEnabled && (\n <InputContainer label={rationale.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.rationale || ''}\n onChange={this.onRationaleChanged}\n imageSupport={imageSupport}\n error={rationaleError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <div className={classes.errorText}>{rationaleError}</div>}\n </InputContainer>\n )}\n\n <AlertDialog\n open={warning.open}\n title=\"Warning\"\n text={warning.text}\n onClose={warning.onClose}\n onConfirm={warning.onConfirm}\n />\n </layout.ConfigLayout>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
+
|
|
20
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
+
|
|
22
|
+
var _react = _interopRequireDefault(require("react"));
|
|
23
|
+
|
|
24
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
25
|
+
|
|
26
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
+
|
|
28
|
+
var _styles = require("@material-ui/core/styles");
|
|
29
|
+
|
|
30
|
+
var _editableHtml = require("@pie-lib/pie-toolbox/editable-html");
|
|
31
|
+
|
|
32
|
+
var _mathRenderingAccessible = require("@pie-lib/pie-toolbox/math-rendering-accessible");
|
|
33
|
+
|
|
34
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
35
|
+
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
|
|
38
|
+
var styles = function styles(theme) {
|
|
39
|
+
return {
|
|
40
|
+
responseArea: {
|
|
41
|
+
paddingBottom: theme.spacing.unit * 2.5
|
|
42
|
+
},
|
|
43
|
+
errorText: {
|
|
44
|
+
fontSize: theme.typography.fontSize - 2,
|
|
45
|
+
color: theme.palette.error.main,
|
|
46
|
+
paddingTop: theme.spacing.unit
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var ResponseAreaComponent = /*#__PURE__*/function (_React$Component) {
|
|
52
|
+
(0, _inherits2["default"])(ResponseAreaComponent, _React$Component);
|
|
53
|
+
|
|
54
|
+
var _super = _createSuper(ResponseAreaComponent);
|
|
55
|
+
|
|
56
|
+
function ResponseAreaComponent() {
|
|
57
|
+
(0, _classCallCheck2["default"])(this, ResponseAreaComponent);
|
|
58
|
+
return _super.apply(this, arguments);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
(0, _createClass2["default"])(ResponseAreaComponent, [{
|
|
62
|
+
key: "componentDidMount",
|
|
63
|
+
value: function componentDidMount() {
|
|
64
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
65
|
+
var domNode = _reactDom["default"].findDOMNode(this);
|
|
66
|
+
|
|
67
|
+
(0, _mathRenderingAccessible.renderMath)(domNode);
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
key: "render",
|
|
71
|
+
value: function render() {
|
|
72
|
+
var _this$props = this.props,
|
|
73
|
+
editableHtmlProps = _this$props.editableHtmlProps,
|
|
74
|
+
responseAreasError = _this$props.responseAreasError,
|
|
75
|
+
responseAreaChoicesError = _this$props.responseAreaChoicesError,
|
|
76
|
+
classes = _this$props.classes;
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
+
className: classes.responseArea
|
|
79
|
+
}, /*#__PURE__*/_react["default"].createElement(_editableHtml.EditableHtml, editableHtmlProps), responseAreasError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: classes.errorText
|
|
81
|
+
}, responseAreasError), responseAreaChoicesError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
|
+
className: classes.errorText
|
|
83
|
+
}, responseAreaChoicesError));
|
|
84
|
+
}
|
|
85
|
+
}]);
|
|
86
|
+
return ResponseAreaComponent;
|
|
87
|
+
}(_react["default"].Component);
|
|
88
|
+
|
|
89
|
+
(0, _defineProperty2["default"])(ResponseAreaComponent, "propTypes", {
|
|
90
|
+
editableHtmlProps: _propTypes["default"].object.isRequired,
|
|
91
|
+
classes: _propTypes["default"].object.isRequired,
|
|
92
|
+
responseAreasError: _propTypes["default"].string,
|
|
93
|
+
responseAreaChoicesError: _propTypes["default"].string
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
var _default = (0, _styles.withStyles)(styles)(ResponseAreaComponent);
|
|
97
|
+
|
|
98
|
+
exports["default"] = _default;
|
|
99
|
+
//# sourceMappingURL=response-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/response-area.jsx"],"names":["styles","theme","responseArea","paddingBottom","spacing","unit","errorText","fontSize","typography","color","palette","error","main","paddingTop","ResponseAreaComponent","domNode","ReactDOM","findDOMNode","props","editableHtmlProps","responseAreasError","responseAreaChoicesError","classes","React","Component","PropTypes","object","isRequired","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,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AHb;AAIjBP,EAAAA,wBAAwB,EAAEI,sBAAUG;AAJnB,C;;eA2BN,wBAAW5B,MAAX,EAAmBc,qBAAnB,C","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\n\nconst styles = (theme) => ({\n responseArea: {\n paddingBottom: theme.spacing.unit * 2.5,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n});\n\nclass ResponseAreaComponent extends React.Component {\n static propTypes = {\n editableHtmlProps: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n responseAreasError: PropTypes.string,\n responseAreaChoicesError: PropTypes.string,\n };\n\n componentDidMount() {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(this);\n\n renderMath(domNode);\n }\n\n render() {\n const { editableHtmlProps, responseAreasError, responseAreaChoicesError, classes } = this.props;\n\n return (\n <div className={classes.responseArea}>\n <EditableHtml {...editableHtmlProps} />\n {responseAreasError && <div className={classes.errorText}>{responseAreasError}</div>}\n {responseAreaChoicesError && <div className={classes.errorText}>{responseAreaChoicesError}</div>}\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(ResponseAreaComponent);\n"],"file":"response-area.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/inline-dropdown-configure",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@material-ui/core": "^3.9.2",
|
|
9
9
|
"@material-ui/icons": "^3.0.1",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "2.0.
|
|
11
|
+
"@pie-lib/pie-toolbox": "2.0.10",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"debug": "^3.1.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "6.1.2
|
|
7
|
+
"version": "6.1.2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"postpublish": "../../scripts/postpublish"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@material-ui/core": "^3.9.2",
|
|
14
14
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
15
|
-
"@pie-lib/pie-toolbox": "2.0.
|
|
15
|
+
"@pie-lib/pie-toolbox": "2.0.10",
|
|
16
16
|
"classnames": "^2.2.5",
|
|
17
17
|
"lodash": "^4.17.10",
|
|
18
18
|
"prop-types": "^15.6.1",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "ISC",
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "afcc2302f69b62703d2df77e7ba0b465cb48c13a",
|
|
25
25
|
"main": "lib/index.js",
|
|
26
26
|
"module": "src/index.js"
|
|
27
27
|
}
|