@pie-element/extended-text-entry 9.3.1-next.9 → 9.4.1-next.13
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 +19 -0
- package/configure/CHANGELOG.md +18 -0
- package/configure/lib/defaults.js +4 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +7 -3
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +3 -3
- package/controller/package.json +1 -1
- package/docs/config-schema.json +32 -0
- package/docs/config-schema.json.md +25 -1
- package/docs/pie-schema.json +16 -0
- package/docs/pie-schema.json.md +12 -0
- package/lib/main.js +11 -1
- package/lib/main.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@9.3.0...@pie-element/extended-text-entry@9.4.0) (2023-06-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update libs PD-2722, PD-2827, PD-2832 ([834ecf9](https://github.com/pie-framework/pie-elements/commit/834ecf92cc7204c851c68f0945ad5d52e453c9d0))
|
|
12
|
+
* update pie-libs ([649fb8f](https://github.com/pie-framework/pie-elements/commit/649fb8f535172d76b3ffc676ec53b2726432808c))
|
|
13
|
+
* update pie-libs PD-2150, PD-2795 ([ff6f64a](https://github.com/pie-framework/pie-elements/commit/ff6f64afa6ccaa8a060c986b1637c680e68c62b6))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **extended-text-entry:** add hidden heading for screen readers PD-2883 ([fb794a0](https://github.com/pie-framework/pie-elements/commit/fb794a08bb35ab834d37397a2e57e93058315d96))
|
|
19
|
+
* add mathMlOptions PD-2150 ([0c6984c](https://github.com/pie-framework/pie-elements/commit/0c6984cf042141eac36badfbab1c46d8d42f71ee))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [9.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@9.2.3...@pie-element/extended-text-entry@9.3.0) (2023-05-23)
|
|
7
26
|
|
|
8
27
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@8.3.0...@pie-element/extended-text-entry-configure@8.4.0) (2023-06-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update libs PD-2722, PD-2827, PD-2832 ([834ecf9](https://github.com/pie-framework/pie-elements/commit/834ecf92cc7204c851c68f0945ad5d52e453c9d0))
|
|
12
|
+
* update pie-libs ([649fb8f](https://github.com/pie-framework/pie-elements/commit/649fb8f535172d76b3ffc676ec53b2726432808c))
|
|
13
|
+
* update pie-libs PD-2150, PD-2795 ([ff6f64a](https://github.com/pie-framework/pie-elements/commit/ff6f64afa6ccaa8a060c986b1637c680e68c62b6))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add mathMlOptions PD-2150 ([0c6984c](https://github.com/pie-framework/pie-elements/commit/0c6984cf042141eac36badfbab1c46d8d42f71ee))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# [8.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@8.2.3...@pie-element/extended-text-entry-configure@8.3.0) (2023-05-23)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","spanishInput","specialInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckDisabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","settingsPanelDisabled","multiple","studentInstructions","teacherInstructions","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,YAAY,EAAE,KAPT;AAQLC,IAAAA,YAAY,EAAE,KART;AASLC,IAAAA,cAAc,EAAE,cATX;AAULC,IAAAA,eAAe,EAAE,KAVZ;AAWLC,IAAAA,gBAAgB,EAAE,IAXb;AAYLC,IAAAA,aAAa,EAAE,IAZV;AAaLC,IAAAA,0BAA0B,EAAE,IAbvB;AAcLC,IAAAA,0BAA0B,EAAE,IAdvB;AAeLC,IAAAA,iBAAiB,EAAE,IAfd;AAgBLC,IAAAA,wBAAwB,EAAE,IAhBrB;AAiBLC,IAAAA,qBAAqB,EAAE;AAjBlB,GADM;AAoBbC,EAAAA,aAAa,EAAE;AACbhB,IAAAA,UAAU,EAAE;AACViB,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADC;AAKbC,IAAAA,UAAU,EAAE;AACVD,MAAAA,KAAK,EAAE,YADG;AAEVD,MAAAA,QAAQ,EAAE,KAFA;AAGVG,MAAAA,OAAO,EAAE;AAHC,KALC;AAUbC,IAAAA,gBAAgB,EAAE;AAChBH,MAAAA,KAAK,EAAE,4BADS;AAEhBD,MA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AAA,MAAM,EAAE;AAFK,KAzDF;AA6DbyB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdvB,MAAAA,MAAM,EAAE;AAFM,KA7DH;AAiEb0B,IAAAA,UAAU,EAAE;AACVZ,MAAAA,QAAQ,EAAE,KADA;AAEVC,MAAAA,KAAK,EAAE;AAFG;
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","spanishInput","specialInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckDisabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","settingsPanelDisabled","multiple","studentInstructions","teacherInstructions","maxImageWidth","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,YAAY,EAAE,KAPT;AAQLC,IAAAA,YAAY,EAAE,KART;AASLC,IAAAA,cAAc,EAAE,cATX;AAULC,IAAAA,eAAe,EAAE,KAVZ;AAWLC,IAAAA,gBAAgB,EAAE,IAXb;AAYLC,IAAAA,aAAa,EAAE,IAZV;AAaLC,IAAAA,0BAA0B,EAAE,IAbvB;AAcLC,IAAAA,0BAA0B,EAAE,IAdvB;AAeLC,IAAAA,iBAAiB,EAAE,IAfd;AAgBLC,IAAAA,wBAAwB,EAAE,IAhBrB;AAiBLC,IAAAA,qBAAqB,EAAE;AAjBlB,GADM;AAoBbC,EAAAA,aAAa,EAAE;AACbhB,IAAAA,UAAU,EAAE;AACViB,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,E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;AAENC,MAAAA,KAAK,EAAE;AAFD,KAjDK;AAqDbQ,IAAAA,mBAAmB,EAAE;AACnBT,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KArDR;AAyDbS,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE,GADR;AAEbvB,MAAAA,MAAM,EAAE;AAFK,KAzDF;AA6DbyB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdvB,MAAAA,MAAM,EAAE;AAFM,KA7DH;AAiEb0B,IAAAA,UAAU,EAAE;AACVZ,MAAAA,QAAQ,EAAE,KADA;AAEVC,MAAAA,KAAK,EAAE;AAFG,KAjEC;AAqEbY,IAAAA,aAAa,EAAE;AACbC,MAAAA,SAAS,EAAE,KADE;AAEbC,MAAAA,UAAU,EAAE;AAFC;AArEF;AApBF,C","sourcesContent":["export default {\n model: {\n dimensions: {\n height: 100,\n width: 500,\n },\n prompt: 'This is the question prompt',\n mathInput: false,\n spanishInput: false,\n specialInput: false,\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: false,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n spellCheckEnabled: true,\n playerSpellCheckDisabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size',\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n playerSpellCheck: {\n label: 'Disable Student Spellcheck',\n settings: true,\n enabled: true,\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n settingsPanelDisabled: false,\n spanishInput: {\n settings: true,\n label: 'Students can insert Spanish',\n enabled: false,\n },\n specialInput: {\n settings: true,\n label: 'Students can insert Special Characters',\n enabled: false,\n },\n multiple: {\n settings: false,\n label: 'Multiple Parts',\n enabled: false,\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n },\n};\n"],"file":"defaults.js"}
|
package/configure/lib/main.js
CHANGED
|
@@ -147,7 +147,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
147
147
|
_ref$multiple = _ref.multiple,
|
|
148
148
|
multiple = _ref$multiple === void 0 ? {} : _ref$multiple,
|
|
149
149
|
_ref$withRubric = _ref.withRubric,
|
|
150
|
-
withRubric = _ref$withRubric === void 0 ? {} : _ref$withRubric
|
|
150
|
+
withRubric = _ref$withRubric === void 0 ? {} : _ref$withRubric,
|
|
151
|
+
_ref$mathMlOptions = _ref.mathMlOptions,
|
|
152
|
+
mathMlOptions = _ref$mathMlOptions === void 0 ? {} : _ref$mathMlOptions;
|
|
151
153
|
|
|
152
154
|
var _ref2 = model || {},
|
|
153
155
|
feedbackEnabled = _ref2.feedbackEnabled,
|
|
@@ -226,7 +228,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
226
228
|
language: 'spanish'
|
|
227
229
|
}, {
|
|
228
230
|
language: 'special'
|
|
229
|
-
}]
|
|
231
|
+
}],
|
|
232
|
+
mathMlOptions: mathMlOptions
|
|
230
233
|
})), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
231
234
|
label: prompt.label,
|
|
232
235
|
className: classes.promptContainer
|
|
@@ -246,7 +249,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
246
249
|
language: 'spanish'
|
|
247
250
|
}, {
|
|
248
251
|
language: 'special'
|
|
249
|
-
}]
|
|
252
|
+
}],
|
|
253
|
+
mathMlOptions: mathMlOptions
|
|
250
254
|
})), feedbackEnabled && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
251
255
|
className: classes.header,
|
|
252
256
|
variant: "subheading"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","numberFields","dropdown","defaultFeedback","type","Main","props","markup","onModelChanged","model","prompt","feedback","update","teacherInstructions","state","setDimensions","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","contentDimensions","dimensions","equationEditor","playerSpellCheck","settingsPanelDisabled","spanishInput","specialInput","spellCheck","studentInstructions","mathInput","maxImageWidth","maxImageHeight","multiple","withRubric","feedbackEnabled","promptEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","enabled","width","suffix","min","max","height","playerSpellCheckDisabled","panelProperties","studentInstructionsEnabled","rubricEnabled","config","Settings","Properties","promptContainer","changeTeacherInstructions","language","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAAkDC,kBAAlD,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAkDD,kBAAlD,CAAeC,MAAf;AAAA,IAAuBC,YAAvB,GAAkDF,kBAAlD,CAAuBE,YAAvB;AAAA,IAAqCC,QAArC,GAAkDH,kBAAlD,CAAqCG,QAArC;AAEA,IAAMC,eAAe,GAAG;AACtBC,EAAAA,IAAI,EAAE,SADgB;AAEtB,aAAS;AAFa,CAAxB;;IAKaC,I;;;;;AAWX,gBAA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pCR,IAAAA,MAAM,EAAE;AACNS,MAAAA,aAAa,EAAED,KAAK,CAACE,OAAN,CAAcC;AADvB,KAD4B;AAIpChB,IAAAA,eAAe,EAAE;AACfiB,MAAAA,UAAU,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CADlB;AAEfE,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAFpB;AAGf5B,MAAAA,KAAK,EAAE;AAHQ;AAJmB,GAAZ;AAAA,CAAX,EASX1C,IATW,C","sourcesContent":["import React from 'react';\nimport { FeedbackSelector, InputContainer, settings, layout } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n\nconst { Panel, toggle, numberFields, dropdown } = settings;\n\nconst defaultFeedback = {\n type: 'default',\n default: 'Your answer has been submitted',\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = { setDimensions: true };\n }\n\n onPromptChange = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, prompt: markup });\n };\n\n changeFeedback = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n\n onModelChanged(update);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n\n onModelChanged(update);\n };\n\n render() {\n const { model, classes, configuration, imageSupport, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n contentDimensions = {},\n dimensions = {},\n equationEditor = {},\n feedback = {},\n playerSpellCheck = {},\n prompt = {},\n settingsPanelDisabled,\n spanishInput = {},\n specialInput = {},\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n mathInput = {},\n maxImageWidth = {},\n maxImageHeight = {},\n multiple = {},\n withRubric = {},\n } = configuration || {};\n const { feedbackEnabled, promptEnabled, spellCheckEnabled, teacherInstructionsEnabled, toolbarEditorPosition } =\n model || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor:\n equationEditor.enabled &&\n model.mathInput &&\n dropdown(equationEditor.label, [\n 'non-negative-integers',\n 'integers',\n 'decimals',\n 'fractions',\n 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'item-authoring',\n ]),\n spanishInput: spanishInput.settings && toggle(spanishInput.label),\n specialInput: specialInput.settings && toggle(specialInput.label),\n dimensions: numberFields(dimensions.label, {\n width: { label: 'Width (px)', suffix: 'px', min: 100, max: 500 },\n height: { label: 'Height (px)', suffix: 'px', min: 100, max: 500 },\n }),\n 'multiple.enabled': multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckDisabled: playerSpellCheck.settings && toggle(playerSpellCheck.label),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\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) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\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 />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n className={classes.prompt}\n markup={model.prompt || ''}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n {feedbackEnabled && (\n <React.Fragment>\n <Typography className={classes.header} variant=\"subheading\">\n Feedback\n </Typography>\n\n <FeedbackSelector\n label=\"When submitted, show\"\n feedback={model.feedback || defaultFeedback}\n onChange={this.changeFeedback}\n toolbarOpts={toolbarOpts}\n />\n </React.Fragment>\n )}\n </layout.ConfigLayout>\n );\n }\n}\nexport default withStyles((theme) => ({\n header: {\n paddingBottom: theme.spacing.unit,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n}))(Main);\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","numberFields","dropdown","defaultFeedback","type","Main","props","markup","onModelChanged","model","prompt","feedback","update","teacherInstructions","state","setDimensions","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","contentDimensions","dimensions","equationEditor","playerSpellCheck","settingsPanelDisabled","spanishInput","specialInput","spellCheck","studentInstructions","mathInput","maxImageWidth","maxImageHeight","multiple","withRubric","mathMlOptions","feedbackEnabled","promptEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","enabled","width","suffix","min","max","height","playerSpellCheckDisabled","panelProperties","studentInstructionsEnabled","rubricEnabled","config","Settings","Properties","promptContainer","changeTeacherInstructions","language","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAAkDC,kBAAlD,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAkDD,kBAAlD,CAAeC,MAAf;AAAA,IAAuBC,YAAvB,GAAkDF,kBAAlD,CAAuBE,YAAvB;AAAA,IAAqCC,QAArC,GAAkDH,kBAAlD,CAAqCG,QAArC;AAEA,IAAMC,eAAe,GAAG;AACtBC,EAAAA,IAAI,EAAE,SADgB;AAEtB,aAAS;AAFa,CAAxB;;IAKaC,I;;;;;AAWX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,uGAKF,UAACC,MAAD,EAAY;AAC3B,wBAAkC,MAAKD,KAAvC;AAAA,UAAQE,cAAR,eAAQA,cAAR;AAAA,UAAwBC,KAAxB,eAAwBA,KAAxB;AAEAD,MAAAA,cAAc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AAcC;AADvB,KAD4B;AAIpChB,IAAAA,eAAe,EAAE;AACfiB,MAAAA,UAAU,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CADlB;AAEfE,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAFpB;AAGf5B,MAAAA,KAAK,EAAE;AAHQ;AAJmB,GAAZ;AAAA,CAAX,EASX3C,IATW,C","sourcesContent":["import React from 'react';\nimport { FeedbackSelector, InputContainer, settings, layout } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n\nconst { Panel, toggle, numberFields, dropdown } = settings;\n\nconst defaultFeedback = {\n type: 'default',\n default: 'Your answer has been submitted',\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = { setDimensions: true };\n }\n\n onPromptChange = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, prompt: markup });\n };\n\n changeFeedback = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n\n onModelChanged(update);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n\n onModelChanged(update);\n };\n\n render() {\n const { model, classes, configuration, imageSupport, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n contentDimensions = {},\n dimensions = {},\n equationEditor = {},\n feedback = {},\n playerSpellCheck = {},\n prompt = {},\n settingsPanelDisabled,\n spanishInput = {},\n specialInput = {},\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n mathInput = {},\n maxImageWidth = {},\n maxImageHeight = {},\n multiple = {},\n withRubric = {},\n mathMlOptions = {},\n } = configuration || {};\n const { feedbackEnabled, promptEnabled, spellCheckEnabled, teacherInstructionsEnabled, toolbarEditorPosition } =\n model || {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor:\n equationEditor.enabled &&\n model.mathInput &&\n dropdown(equationEditor.label, [\n 'non-negative-integers',\n 'integers',\n 'decimals',\n 'fractions',\n 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'item-authoring',\n ]),\n spanishInput: spanishInput.settings && toggle(spanishInput.label),\n specialInput: specialInput.settings && toggle(specialInput.label),\n dimensions: numberFields(dimensions.label, {\n width: { label: 'Width (px)', suffix: 'px', min: 100, max: 500 },\n height: { label: 'Height (px)', suffix: 'px', min: 100, max: 500 },\n }),\n 'multiple.enabled': multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckDisabled: playerSpellCheck.settings && toggle(playerSpellCheck.label),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\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) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\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 </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n className={classes.prompt}\n markup={model.prompt || ''}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n {feedbackEnabled && (\n <React.Fragment>\n <Typography className={classes.header} variant=\"subheading\">\n Feedback\n </Typography>\n\n <FeedbackSelector\n label=\"When submitted, show\"\n feedback={model.feedback || defaultFeedback}\n onChange={this.changeFeedback}\n toolbarOpts={toolbarOpts}\n />\n </React.Fragment>\n )}\n </layout.ConfigLayout>\n );\n }\n}\nexport default withStyles((theme) => ({\n header: {\n paddingBottom: theme.spacing.unit,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n}))(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.4.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.9.2",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
13
|
-
"@pie-lib/config-ui": "^11.
|
|
14
|
-
"@pie-lib/editable-html": "^9.
|
|
13
|
+
"@pie-lib/config-ui": "^11.8.4",
|
|
14
|
+
"@pie-lib/editable-html": "^9.7.1",
|
|
15
15
|
"lodash": "^4.17.15",
|
|
16
16
|
"prop-types": "^15.6.2",
|
|
17
17
|
"react": "^16.8.1",
|
package/controller/package.json
CHANGED
package/docs/config-schema.json
CHANGED
|
@@ -236,6 +236,22 @@
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
+
"mathMlOptions": {
|
|
240
|
+
"title": "ConfigureMathMLProp",
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"mmlOutput": {
|
|
244
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
245
|
+
"type": "number",
|
|
246
|
+
"title": "mmlOutput"
|
|
247
|
+
},
|
|
248
|
+
"mmlEditing": {
|
|
249
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
250
|
+
"type": "number",
|
|
251
|
+
"title": "mmlEditing"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
239
255
|
"showPrompt": {
|
|
240
256
|
"description": "Determines whether prompt field will be displayed or not",
|
|
241
257
|
"default": true,
|
|
@@ -378,6 +394,22 @@
|
|
|
378
394
|
"title": "forceEnabled"
|
|
379
395
|
}
|
|
380
396
|
}
|
|
397
|
+
},
|
|
398
|
+
"ConfigureMathMLProp": {
|
|
399
|
+
"title": "ConfigureMathMLProp",
|
|
400
|
+
"type": "object",
|
|
401
|
+
"properties": {
|
|
402
|
+
"mmlOutput": {
|
|
403
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
404
|
+
"type": "number",
|
|
405
|
+
"title": "mmlOutput"
|
|
406
|
+
},
|
|
407
|
+
"mmlEditing": {
|
|
408
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
409
|
+
"type": "number",
|
|
410
|
+
"title": "mmlEditing"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
381
413
|
}
|
|
382
414
|
},
|
|
383
415
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -182,6 +182,18 @@ if true:
|
|
|
182
182
|
- this property will not be visible in Settings Panel (settings will become automatically false)
|
|
183
183
|
- the model property afferent to it will become automatically false
|
|
184
184
|
|
|
185
|
+
# `mathMlOptions` (object)
|
|
186
|
+
|
|
187
|
+
Properties of the `mathMlOptions` object:
|
|
188
|
+
|
|
189
|
+
## `mmlOutput` (number)
|
|
190
|
+
|
|
191
|
+
Indicates if model should have mathML output instead of latex
|
|
192
|
+
|
|
193
|
+
## `mmlEditing` (number)
|
|
194
|
+
|
|
195
|
+
Indicates if mathML that's already in model should be editable
|
|
196
|
+
|
|
185
197
|
# `showPrompt` (boolean)
|
|
186
198
|
|
|
187
199
|
Determines whether prompt field will be displayed or not
|
|
@@ -302,4 +314,16 @@ Indicates the label for the item that has to be displayed in the Settings Panel
|
|
|
302
314
|
Indicates the value for the toggle;
|
|
303
315
|
if true:
|
|
304
316
|
- this property will not be visible in Settings Panel (settings will become automatically false)
|
|
305
|
-
- the model property afferent to it will become automatically false
|
|
317
|
+
- the model property afferent to it will become automatically false
|
|
318
|
+
|
|
319
|
+
## `ConfigureMathMLProp` (object)
|
|
320
|
+
|
|
321
|
+
Properties of the `ConfigureMathMLProp` object:
|
|
322
|
+
|
|
323
|
+
### `mmlOutput` (number)
|
|
324
|
+
|
|
325
|
+
Indicates if model should have mathML output instead of latex
|
|
326
|
+
|
|
327
|
+
### `mmlEditing` (number)
|
|
328
|
+
|
|
329
|
+
Indicates if mathML that's already in model should be editable
|
package/docs/pie-schema.json
CHANGED
|
@@ -256,6 +256,22 @@
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
|
+
"ConfigureMathMLProp": {
|
|
260
|
+
"title": "ConfigureMathMLProp",
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"mmlOutput": {
|
|
264
|
+
"description": "Indicates if model should have mathML output instead of latex",
|
|
265
|
+
"type": "number",
|
|
266
|
+
"title": "mmlOutput"
|
|
267
|
+
},
|
|
268
|
+
"mmlEditing": {
|
|
269
|
+
"description": "Indicates if mathML that's already in model should be editable",
|
|
270
|
+
"type": "number",
|
|
271
|
+
"title": "mmlEditing"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
259
275
|
"Dimensions": {
|
|
260
276
|
"title": "Dimensions",
|
|
261
277
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -208,6 +208,18 @@ if true:
|
|
|
208
208
|
- this property will not be visible in Settings Panel (settings will become automatically false)
|
|
209
209
|
- the model property afferent to it will become automatically false
|
|
210
210
|
|
|
211
|
+
## `ConfigureMathMLProp` (object)
|
|
212
|
+
|
|
213
|
+
Properties of the `ConfigureMathMLProp` object:
|
|
214
|
+
|
|
215
|
+
### `mmlOutput` (number)
|
|
216
|
+
|
|
217
|
+
Indicates if model should have mathML output instead of latex
|
|
218
|
+
|
|
219
|
+
### `mmlEditing` (number)
|
|
220
|
+
|
|
221
|
+
Indicates if mathML that's already in model should be editable
|
|
222
|
+
|
|
211
223
|
## `Dimensions` (object)
|
|
212
224
|
|
|
213
225
|
Properties of the `Dimensions` object:
|
package/lib/main.js
CHANGED
|
@@ -63,6 +63,14 @@ var style = function style(theme) {
|
|
|
63
63
|
editor: {
|
|
64
64
|
marginBottom: theme.spacing.unit * 2,
|
|
65
65
|
borderRadius: '4px'
|
|
66
|
+
},
|
|
67
|
+
srOnly: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
left: '-10000px',
|
|
70
|
+
top: 'auto',
|
|
71
|
+
width: '1px',
|
|
72
|
+
height: '1px',
|
|
73
|
+
overflow: 'hidden'
|
|
66
74
|
}
|
|
67
75
|
};
|
|
68
76
|
};
|
|
@@ -141,7 +149,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
141
149
|
ref: function ref(_ref2) {
|
|
142
150
|
_this2.containerRef = _ref2;
|
|
143
151
|
}
|
|
144
|
-
},
|
|
152
|
+
}, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
153
|
+
className: classes.srOnly
|
|
154
|
+
}, "Constructed Response Question"), teacherInstructions && /*#__PURE__*/_react["default"].createElement("div", {
|
|
145
155
|
className: classes.teacherInstructions
|
|
146
156
|
}, !animationsDisabled ? /*#__PURE__*/_react["default"].createElement(_renderUi.Collapsible, {
|
|
147
157
|
labels: {
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","teacherInstructions","editor","borderRadius","Main","props","onChange","model","classes","session","dimensions","disabled","feedback","mathInput","spanishInput","specialInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","teacherInstructions","editor","borderRadius","srOnly","position","left","top","height","overflow","Main","props","onChange","model","classes","session","dimensions","disabled","feedback","mathInput","spanishInput","specialInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","maxHeight","toolbarOpts","teacherInstructionsDiv","languageCharactersProps","push","language","ref","containerRef","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","isRequired","object","shape","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD;AAAA,SAAY;AACxBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EADb;AAEJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAFH,KADkB;AAKxBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,MADD;AAENJ,MAAAA,KAAK,EAAEA,gBAAME,IAAN,EAFD;AAGNG,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB,CAH7B;AAINC,MAAAA,QAAQ,EAAE;AAJJ,KALgB;AAWxBC,IAAAA,mBAAmB,EAAE;AACnBJ,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB;AADhB,KAXG;AAcxBG,IAAAA,MAAM,EAAE;AACNL,MAAAA,YAAY,EAAER,KAAK,CAACS,OAAN,CAAcC,IAAd,GAAqB,CAD7B;AAENI,MAAAA,YAAY,EAAE;AAFR,KAdgB;AAkBxBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,QAAQ,EAAE,UADJ;AAENC,MAAAA,IAAI,EAAE,UAFA;AAGNC,MAAAA,GAAG,EAAE,MAHC;AAINX,MAAAA,KAAK,EAAE,KAJD;AAKNY,MAAAA,MAAM,EAAE,KALF;AAMNC,MAAAA,QAAQ,EAAE;AANJ;AAlBgB,GAAZ;AAAA,CAAd;;IA4BaC,I;;;;;;;;;;;;;;;sGAUK,0BAAS,MAAKC,KAAL,CAAWC,QAApB,EAA8B,IAA9B,C;;;;;;WAEh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AAQ,EAAET,QAPZ;AAQE,QAAA,cAAc,EAAE,IARlB;AASE,QAAA,WAAW,EAAEU,WATf;AAUE,QAAA,UAAU,EAAEH,iBAVd;AAWE,QAAA,WAAW,EAAE;AACXe,UAAAA,IAAI,EAAE;AACJtB,YAAAA,QAAQ,EAAE,CAACE,SADP;AAEJqB,YAAAA,UAAU,EAAE,KAAK7B,KAAL,CAAWE,KAAX,CAAiB2B,UAFzB;AAGJC,YAAAA,UAAU,EAAE,KAAK9B,KAAL,CAAWE,KAAX,CAAiB6B,cAHzB;AAIJC,YAAAA,oBAAoB,EAAE;AAJlB,WADK;AAOXC,UAAAA,KAAK,EAAE;AACL3B,YAAAA,QAAQ,EAAE;AADL,WAPI;AAUX4B,UAAAA,KAAK,EAAE;AACL5B,YAAAA,QAAQ,EAAE;AADL;AAVI,SAXf;AAyBE,QAAA,uBAAuB,EAAEY;AAzB3B,QA7BF,EAyDGX,QAAQ,iBAAI,gCAAC,kBAAD;AAAU,QAAA,WAAW,EAAC,SAAtB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAzDf,CADF;AA6DD;;;EA7GuB4B,kBAAMC,S;;;iCAAnBrC,I,eACQ;AACjBE,EAAAA,QAAQ,EAAEoC,sBAAUC,IAAV,CAAeC,UADR;AAEjBrC,EAAAA,KAAK,EAAEmC,sBAAUG,MAFA;AAGjBrC,EAAAA,OAAO,EAAEkC,sBAAUG,MAAV,CAAiBD,UAHT;AAIjBnC,EAAAA,OAAO,EAAEiC,sBAAUI,KAAV,CAAgB;AACvB3B,IAAAA,KAAK,EAAEuB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eA+GN,wBAAW9D,KAAX,EAAkBsB,IAAlB,C","sourcesContent":["import React from 'react';\nimport EditableHTML from '@pie-lib/editable-html';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport debounce from 'lodash/debounce';\nimport { color, Feedback, Collapsible, PreviewPrompt } from '@pie-lib/render-ui';\nimport classnames from 'classnames';\n\nconst log = debug('@pie-ui:extended-text-entry');\n\nconst style = (theme) => ({\n main: {\n backgroundColor: color.background(),\n color: color.text(),\n },\n prompt: {\n width: '100%',\n color: color.text(),\n marginBottom: theme.spacing.unit * 2,\n fontSize: 'inherit',\n },\n teacherInstructions: {\n marginBottom: theme.spacing.unit * 2,\n },\n editor: {\n marginBottom: theme.spacing.unit * 2,\n borderRadius: '4px',\n },\n srOnly: {\n position: 'absolute',\n left: '-10000px',\n top: 'auto',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n },\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n model: PropTypes.object,\n classes: PropTypes.object.isRequired,\n session: PropTypes.shape({\n value: PropTypes.string,\n }).isRequired,\n };\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n\n const {\n dimensions,\n disabled,\n feedback,\n teacherInstructions,\n mathInput,\n spanishInput,\n specialInput,\n animationsDisabled,\n playersToolbarPosition,\n spellCheckEnabled,\n } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n const toolbarOpts = { position: playersToolbarPosition === 'top' ? 'top' : 'bottom' };\n\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = (\n <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />\n );\n\n const languageCharactersProps = [];\n\n if (spanishInput) {\n languageCharactersProps.push({ language: 'spanish' });\n }\n\n if (specialInput) {\n languageCharactersProps.push({ language: 'special' });\n }\n\n return (\n <div\n className={classes.main}\n ref={(ref) => {\n this.containerRef = ref;\n }}\n >\n <h2 className={classes.srOnly}>Constructed Response Question</h2>\n\n {teacherInstructions && (\n <div className={classes.teacherInstructions}>\n {!animationsDisabled ? (\n <Collapsible\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : (\n teacherInstructionsDiv\n )}\n </div>\n )}\n\n {model.prompt && (\n <Typography component={'span'} className={classes.prompt}>\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n\n <EditableHTML\n className={classnames(classes.editor, 'response-area-editor')}\n onChange={this.changeSession}\n markup={value || ''}\n width={width && width.toString()}\n minHeight={height && height.toString()}\n maxHeight={maxHeight}\n disabled={disabled}\n highlightShape={true}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n pluginProps={{\n math: {\n disabled: !mathInput,\n customKeys: this.props.model.customKeys,\n keypadMode: this.props.model.equationEditor,\n controlledKeypadMode: false,\n },\n video: {\n disabled: true,\n },\n audio: {\n disabled: true,\n },\n }}\n languageCharactersProps={languageCharactersProps}\n />\n\n {feedback && <Feedback correctness=\"correct\" feedback={feedback} />}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.1-next.13+c3304b1da",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
13
|
"@material-ui/icons": "^3.0.2",
|
|
14
14
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
15
|
-
"@pie-lib/editable-html": "^9.
|
|
16
|
-
"@pie-lib/math-rendering": "^2.5.
|
|
17
|
-
"@pie-lib/render-ui": "^4.14.
|
|
15
|
+
"@pie-lib/editable-html": "^9.7.1",
|
|
16
|
+
"@pie-lib/math-rendering": "^2.5.17",
|
|
17
|
+
"@pie-lib/render-ui": "^4.14.28",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
19
19
|
"debug": "^4.1.1",
|
|
20
20
|
"lodash.throttle": "^4.1.1",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "^16.8.1",
|
|
23
23
|
"react-dom": "^16.8.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "c3304b1da96b7e77b03b372d3467add35c77f8fe",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"postpublish": "../../scripts/postpublish"
|
|
28
28
|
},
|