@pie-element/extended-text-entry 6.8.0 → 6.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.0...@pie-element/extended-text-entry@6.8.1) (2022-02-04)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry
9
+
10
+
11
+
12
+
13
+
6
14
  # [6.8.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.7.8...@pie-element/extended-text-entry@6.8.0) (2022-01-24)
7
15
 
8
16
 
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.4.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.9...@pie-element/extended-text-entry-configure@5.4.10) (2022-02-04)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.4.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.8...@pie-element/extended-text-entry-configure@5.4.9) (2022-01-24)
7
15
 
8
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","settings","label","enabled","feedback","multiple","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;A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AhBF,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 equationEditor: 'Grade 8 - HS',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size'\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 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 }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","settings","label","enabled","feedback","multiple","studentInstructions","teacherInstructions"],"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,cAAc,EAAE,cAPX;AAQLC,IAAAA,eAAe,EAAE,IARZ;AASLC,IAAAA,gBAAgB,EAAE,IATb;AAULC,IAAAA,aAAa,EAAE,IAVV;AAWLC,IAAAA,0BAA0B,EAAE,IAXvB;AAYLC,IAAAA,0BAA0B,EAAE,IAZvB;AAaLC,IAAAA,qBAAqB,EAAE;AAblB,GADM;AAgBbC,EAAAA,aAAa,EAAE;AACbZ,IAAAA,UAAU,EAAE;AACVa,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADC;AAKbT,IAAAA,cAAc,EAAE;AACdQ,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE,iBAFO;AAGdC,MAAAA,OAAO,EAAE;AAHK,KALH;AAUbC,IAAAA,QAAQ,EAAE;AACRH,MAAAA,QAAQ,EAAE,IADF;AAERC,MAAAA,KAAK,EAAE;AAFC,KAVG;AAcbV,IAAAA,SAAS,EAAE;AACTS,MAAAA,QAAQ,EAAE,IADD;AAETC,MAAAA,KAAK,EAAE,4CAFE;AAGTC,MAAAA,OAAO,EAAE;AAHA,KAdE;AAmBbE,IAAAA,QAAQ,EAAE;AACRJ,MAAAA,QAAQ,EAAE,KADF;AAERC,MAAAA,KAAK,EAAE,gBAFC;AAGRC,MAAAA,OAAO,EAAE;AAHD,KAnBG;AAwBbG,IAAAA,mBAAmB,EAAE;AACnBL,MAAAA,QAAQ,EAAE,KADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KAxBR;AA4BbX,IAAAA,MAAM,EAAE;AACNU,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KA5BK;AAgCbK,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY;AAhCR;AAhBF,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 equationEditor: 'Grade 8 - HS',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size'\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 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 }\n};\n"],"file":"defaults.js"}
@@ -159,7 +159,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
159
159
  return onConfigurationChanged(config);
160
160
  },
161
161
  groups: {
162
- 'Settings': {
162
+ Settings: {
163
163
  mathInput: mathInput.settings && toggle(mathInput.label),
164
164
  equationEditor: equationEditor.enabled && model.mathInput && dropdown(equationEditor.label, ['non-negative-integers', 'integers', 'decimals', 'fractions', 'Grade 1 - 2', 'Grade 3 - 5', 'Grade 6 - 7', 'Grade 8 - HS', 'geometry', 'advanced-algebra', 'statistics', 'item-authoring']),
165
165
  dimensions: numberFields(dimensions.label, {
@@ -180,7 +180,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
180
180
  promptEnabled: prompt.settings && toggle(prompt.label),
181
181
  feedbackEnabled: feedback.settings && toggle(feedback.label)
182
182
  },
183
- 'Properties': {
183
+ Properties: {
184
184
  teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
185
185
  studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label)
186
186
  }
@@ -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","onConfigurationChanged","imageSupport","multiple","studentInstructions","mathInput","dimensions","equationEditor","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","toolbarOpts","toolbarEditorPosition","position","config","label","enabled","width","suffix","min","max","height","studentInstructionsEnabled","promptContainer","changeTeacherInstructions","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom","promptInput","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;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;;;;;AAUX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,uGAOF,UAAAC,MAAM,EAAI;AACzB,wBAAkC,MAAKD,KAAvC;AAAA,UAAQE,cAAR,eAAQA,cAAR;AAAA,UAAwBC,KAAxB,eAAwBA,KAAxB;AAEAD,MAAAA,cAAc,iCACTC,KADS;AAEZC,QAAAA,MAAM,EAAEH;AAFI,SAAd;AAID,KAdkB;AAAA,uGAgBF,UAAAI,QAAQ,EAAI;AAC3B,yBAAkC,MAAKL,KAAvC;AAAA,UAAQG,KAAR,gBAAQA,KAAR;AAAA,UAAeD,cAAf,gBAAeA,cAAf;;AACA,UAAMI,MAAM,mCAAQH,KAAR;AAAeE,QAAAA,QAAQ,EAARA;AAAf,QAAZ;;AACAH,MAAAA,cAAc,CAACI,MAAD,CAAd;AACD,KApBkB;AAAA,kHAsBS,UAAAC,mBAAmB,EAAI;AACjD,yBAAkC,MAAKP,KAAvC;AAAA,UAAQG,KAAR,gBAAQA,KAAR;AAAA,UAAeD,cAAf,gBAAeA,cAAf;;AACA,UAAMI,MAAM,mCAAQH,KAAR;AAAeI,QAAAA,mBAAmB,EAAnBA;AAAf,QAAZ;;AACAL,MAAAA,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AA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC;AAFjB,KATqB;AAalCI,IAAAA,KAAK,EAAE;AACLzB,MAAAA,KAAK,EAAE;AADF;AAb2B,GAAL;AAAA,CAAhB,EAgBX7B,IAhBW,C","sourcesContent":["import React from 'react';\nimport {\n FeedbackSelector,\n InputContainer,\n settings,\n layout\n} 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 classes: PropTypes.object.isRequired\n };\n\n constructor(props) {\n super(props);\n this.state = {\n setDimensions: true\n };\n }\n\n onPromptChange = markup => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({\n ...model,\n prompt: markup\n });\n };\n\n changeFeedback = feedback => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n onModelChanged(update);\n };\n\n changeTeacherInstructions = teacherInstructions => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n onModelChanged(update);\n };\n\n render() {\n const { model, classes, onModelChanged, configuration, onConfigurationChanged, imageSupport } = this.props;\n const {\n multiple = {},\n feedback = {},\n teacherInstructions = {},\n prompt = {},\n studentInstructions = {},\n mathInput = {},\n dimensions = {},\n equationEditor = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled } = model || {};\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={model => onModelChanged(model)}\n onChangeConfiguration={config => onConfigurationChanged(config)}\n groups={{\n 'Settings': {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor: equationEditor.enabled && model.mathInput && 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 dimensions: numberFields(dimensions.label, {\n width: {\n label: 'Width (px)',\n suffix: 'px',\n min: 100,\n max: 500\n },\n height: {\n label: 'Height (px)',\n suffix: 'px',\n min: 100,\n max: 500\n }\n }),\n 'multiple.enabled': multiple.settings &&\n toggle(multiple.label, true),\n promptEnabled: prompt.settings &&\n toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n },\n 'Properties': {\n teacherInstructionsEnabled: teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings &&\n toggle(studentInstructions.label)\n },\n }}\n />\n }\n >\n <div>\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 />\n </InputContainer>\n )}\n\n <br />\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 />\n </InputContainer>\n )}\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 }\n </div>\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 promptInput: {\n width: '100%',\n marginBottom: theme.spacing.unit\n },\n field: {\n width: '200px'\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","onConfigurationChanged","imageSupport","multiple","studentInstructions","mathInput","dimensions","equationEditor","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","toolbarOpts","toolbarEditorPosition","position","config","Settings","label","enabled","width","suffix","min","max","height","Properties","studentInstructionsEnabled","promptContainer","changeTeacherInstructions","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom","promptInput","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;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;;;;;AAUX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADi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C,IAFjB;AAGjB1C,EAAAA,KAAK,EAAEyC,sBAAUG,MAAV,CAAiBD,UAHP;AAIjBnC,EAAAA,aAAa,EAAEiC,sBAAUG,MAAV,CAAiBD,UAJf;AAKjBjC,EAAAA,YAAY,EAAE+B,sBAAUG,MAAV,CAAiBD,UALd;AAMjBpC,EAAAA,OAAO,EAAEkC,sBAAUG,MAAV,CAAiBD;AANT,C;;eAsLN,wBAAW,UAACE,KAAD;AAAA,SAAY;AACpCR,IAAAA,MAAM,EAAE;AACNS,MAAAA,aAAa,EAAED,KAAK,CAACE,OAAN,CAAcC;AADvB,KAD4B;AAIpCf,IAAAA,eAAe,EAAE;AACfgB,MAAAA,UAAU,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CADlB;AAEfE,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAFpB;AAGftB,MAAAA,KAAK,EAAE;AAHQ,KAJmB;AASpCyB,IAAAA,WAAW,EAAE;AACXzB,MAAAA,KAAK,EAAE,MADI;AAEXwB,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC;AAFjB,KATuB;AAapCI,IAAAA,KAAK,EAAE;AACL1B,MAAAA,KAAK,EAAE;AADF;AAb6B,GAAZ;AAAA,CAAX,EAgBX9B,IAhBW,C","sourcesContent":["import React from 'react';\nimport {\n FeedbackSelector,\n InputContainer,\n settings,\n layout,\n} 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 classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n setDimensions: true,\n };\n }\n\n onPromptChange = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({\n ...model,\n prompt: markup,\n });\n };\n\n changeFeedback = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n onModelChanged(update);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n onModelChanged(update);\n };\n\n render() {\n const {\n model,\n classes,\n onModelChanged,\n configuration,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const {\n multiple = {},\n feedback = {},\n teacherInstructions = {},\n prompt = {},\n studentInstructions = {},\n mathInput = {},\n dimensions = {},\n equationEditor = {},\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled } =\n model || {};\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: {\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 dimensions: numberFields(dimensions.label, {\n width: {\n label: 'Width (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n height: {\n label: 'Height (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n }),\n 'multiple.enabled':\n multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n },\n }}\n />\n }\n >\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptContainer}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n />\n </InputContainer>\n )}\n\n <br />\n\n {promptEnabled && (\n <InputContainer\n label={prompt.label}\n className={classes.promptContainer}\n >\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 />\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 </div>\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 promptInput: {\n width: '100%',\n marginBottom: theme.spacing.unit,\n },\n field: {\n width: '200px',\n },\n}))(Main);\n"],"file":"main.js"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-configure",
3
3
  "private": true,
4
- "version": "5.4.9",
4
+ "version": "5.4.10",
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.2.0",
13
- "@pie-lib/config-ui": "^10.10.16",
14
- "@pie-lib/editable-html": "^7.17.16",
13
+ "@pie-lib/config-ui": "^10.10.18",
14
+ "@pie-lib/editable-html": "^7.17.18",
15
15
  "lodash": "^4.17.15",
16
16
  "prop-types": "^15.6.2",
17
17
  "react": "^16.8.1",
@@ -3,6 +3,14 @@
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
+ ## [4.1.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.18...@pie-element/extended-text-entry-controller@4.1.19) (2022-02-04)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry-controller
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.1.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.13...@pie-element/extended-text-entry-controller@4.1.15) (2021-11-11)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/extended-text-entry-controller
@@ -122,7 +122,8 @@ function _model() {
122
122
  feedback: feedback,
123
123
  teacherInstructions: teacherInstructions,
124
124
  mathInput: normalizedQuestion.mathInput,
125
- equationEditor: equationEditor
125
+ equationEditor: equationEditor,
126
+ playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'
126
127
  };
127
128
  }));
128
129
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","outcome","score","completed","note"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;;;;;A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AAAA;AAAA;AAAA,G","sourcesContent":["import debug from 'debug';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\nimport { getFeedback } from '@pie-lib/feedback';\n\nimport defaults from './defaults';\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return {\n ...defaults,\n ...model,\n };\n}\n\nexport const normalize = question => ({\n ...defaults,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n ...question,\n});\n\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n return fb.then(feedback => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n mathInput: normalizedQuestion.mathInput,\n equationEditor\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring'\n };\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","playersToolbarPosition","outcome","score","completed","note"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;;;;;AAHA,IAAMA,GAAG,GAAG,uBAAM,6CAAN,CAAZ;;SAKsBC,kB;;;;;sGAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkCC,YAAAA,KAAlC,2DAA0C,EAA1C;AACLF,YAAAA,GAAG,CAAC,sBAAD,EAAyBE,KAAzB,CAAH;AADK,6EAIAC,oBAJA,GAKAD,KALA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AASA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AAAA,yCAC5BF,oBAD4B;AAE/BG,IAAAA,eAAe,EAAE,IAFc;AAG/BC,IAAAA,gBAAgB,EAAE,IAHa;AAI/BC,IAAAA,aAAa,EAAE,IAJgB;AAK/BC,IAAAA,0BAA0B,EAAE,IALG;AAM/BC,IAAAA,0BAA0B,EAAE;AANG,KAO5BL,QAP4B;AAAA,CAA1B;;;;SAWeH,K;;;;;yFAAf,kBAAqBG,QAArB,EAA+BM,OAA/B,EAAwCC,GAAxC;AAAA;AAAA;AAAA;AAAA;AAAA;AACLZ,YAAAA,GAAG,CAAC,YAAD,EAAeK,QAAf,CAAH;AACMQ,YAAAA,kBAFD,GAEsBT,SAAS,CAACC,QAAD,CAF/B;AAICS,YAAAA,EAJD,GAKHF,GAAG,CAACG,IAAJ,KAAa,UAAb,IAA2BF,kBAAkB,CAACP,eAA9C,GACI,2BAAYO,kBAAkB,CAACG,QAA/B,EAAyC,gCAAzC,CADJ,GAEIC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAPD;AASDC,YAAAA,mBATC,GASqB,IATrB;;AAUL,gBAAIR,GA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AAkB,CAACgB,sBAAnB,IAA6C;AAT3C,eAAL;AAAA,aAAhB,CAnCF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;SAgDeC,O;;;;;2FAAf;AAAA;AAAA;AAAA;AAAA;AAAA,8CACE;AACLC,cAAAA,KAAK,EAAE,CADF;AAELC,cAAAA,SAAS,EAAE,KAFN;AAGLC,cAAAA,IAAI,EAAE;AAHD,aADF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["import debug from 'debug';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\nimport { getFeedback } from '@pie-lib/feedback';\n\nimport defaults from './defaults';\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return {\n ...defaults,\n ...model,\n };\n}\n\nexport const normalize = question => ({\n ...defaults,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n ...question,\n});\n\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n return fb.then(feedback => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n mathInput: normalizedQuestion.mathInput,\n equationEditor, \n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring'\n };\n}\n"],"file":"index.js"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-controller",
3
3
  "private": true,
4
- "version": "4.1.18",
4
+ "version": "4.1.19",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -8,5 +8,6 @@ exports.model = (id, element) => ({
8
8
  prompt: 'This is the question prompt',
9
9
  promptEnabled: true,
10
10
  mathInput: true,
11
- toolbarEditorPosition: 'bottom',
11
+ playersToolbarPosition: 'bottom',
12
+ toolbarEditorPosition: 'bottom'
12
13
  });
@@ -116,6 +116,16 @@
116
116
  "type": "string",
117
117
  "title": "toolbarEditorPosition"
118
118
  },
119
+ "playersToolbarPosition": {
120
+ "description": "Indicates the editor's toolbar position for the player, which can be 'bottom' or 'top'",
121
+ "default": ": 'bottom'",
122
+ "enum": [
123
+ "bottom",
124
+ "top"
125
+ ],
126
+ "type": "string",
127
+ "title": "playersToolbarPosition"
128
+ },
119
129
  "id": {
120
130
  "description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
121
131
  "type": "string",
@@ -95,6 +95,17 @@ This element must be one of the following enum values:
95
95
  * `bottom`
96
96
  * `top`
97
97
 
98
+ # `playersToolbarPosition` (string, enum)
99
+
100
+ Indicates the editor's toolbar position for the player, which can be 'bottom' or 'top'
101
+
102
+ This element must be one of the following enum values:
103
+
104
+ * `bottom`
105
+ * `top`
106
+
107
+ Default: `": 'bottom'"`
108
+
98
109
  # `id` (string, required)
99
110
 
100
111
  Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
package/lib/main.js CHANGED
@@ -100,7 +100,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
100
100
  feedback = model.feedback,
101
101
  teacherInstructions = model.teacherInstructions,
102
102
  mathInput = model.mathInput,
103
- animationsDisabled = model.animationsDisabled;
103
+ animationsDisabled = model.animationsDisabled,
104
+ playersToolbarPosition = model.playersToolbarPosition;
104
105
  var value = session.value;
105
106
 
106
107
  var _ref = dimensions || {},
@@ -108,6 +109,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
108
109
  height = _ref.height;
109
110
 
110
111
  var maxHeight = '40vh';
112
+ var toolbarOpts = {};
111
113
  log('[render] disabled? ', disabled);
112
114
 
113
115
  var teacherInstructionsDiv = /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
@@ -115,6 +117,16 @@ var Main = /*#__PURE__*/function (_React$Component) {
115
117
  prompt: teacherInstructions
116
118
  });
117
119
 
120
+ switch (playersToolbarPosition) {
121
+ case 'top':
122
+ toolbarOpts.position = 'top';
123
+ break;
124
+
125
+ default:
126
+ toolbarOpts.position = 'bottom';
127
+ break;
128
+ }
129
+
118
130
  return /*#__PURE__*/_react["default"].createElement("div", {
119
131
  className: classes.main,
120
132
  ref: function ref(_ref2) {
@@ -140,6 +152,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
140
152
  maxHeight: maxHeight,
141
153
  disabled: disabled,
142
154
  highlightShape: true,
155
+ toolbarOpts: toolbarOpts,
143
156
  pluginProps: {
144
157
  math: {
145
158
  disabled: !mathInput,
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","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","value","height","maxHeight","teacherInstructionsDiv","ref","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","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ME,QAAA,SAAS,EAAEP,SANb;AAOE,QAAA,QAAQ,EAAEP,QAPZ;AAQE,QAAA,cAAc,EAAE,IARlB;AASE,QAAA,WAAW,EAAE;AACXe,UAAAA,IAAI,EAAE;AACJf,YAAAA,QAAQ,EAAE,CAACG,SADP;AAEJa,YAAAA,UAAU,EAAE,KAAKvB,KAAL,CAAWG,KAAX,CAAiBoB,UAFzB;AAGJC,YAAAA,UAAU,EAAE,KAAKxB,KAAL,CAAWG,KAAX,CAAiBsB,cAHzB;AAIJC,YAAAA,oBAAoB,EAAE;AAJlB,WADK;AAOXC,UAAAA,KAAK,EAAE;AACLpB,YAAAA,QAAQ,EAAE;AADL,WAPI;AAUVqB,UAAAA,KAAK,EAAE;AACNrB,YAAAA,QAAQ,EAAE;AADJ;AAVG;AATf,QA5BF,EAoDGC,QAAQ,iBACP,0DACE,2CADF,eAEE,gCAAC,kBAAD;AAAU,QAAA,WAAW,EAAC,SAAtB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAFF,CArDJ,CADF;AA6DD;;;EAzFuBqB,kBAAMC,S;;;iCAAnB/B,I,eACQ;AACjBE,EAAAA,QAAQ,EAAE8B,sBAAUC,IAAV,CAAeC,UADR;AAEjB9B,EAAAA,KAAK,EAAE4B,sBAAUG,MAFA;AAGjB9B,EAAAA,OAAO,EAAE2B,sBAAUG,MAAV,CAAiBD,UAHT;AAIjB5B,EAAAA,OAAO,EAAE0B,sBAAUI,KAAV,CAAgB;AACvBvB,IAAAA,KAAK,EAAEmB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eA2FN,wBAAW/C,KAAX,EAAkBa,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 { renderMath } from '@pie-lib/math-rendering';\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});\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 componentDidUpdate() {\n if (this.containerRef) {\n renderMath(this.containerRef);\n }\n }\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n const { dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />;\n\n return (\n <div\n className={classes.main}\n ref={ref => {\n this.containerRef = ref;\n }}\n >\n {\n teacherInstructions && (\n <div>\n {!animationsDisabled ? (\n <Collapsible\n labels={{hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions'}}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : teacherInstructionsDiv }\n <br/>\n </div>\n )\n }\n {model.prompt && (\n <Typography\n className={classes.prompt}\n >\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n <EditableHTML\n className=\"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 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 />\n {feedback && (\n <div>\n <br />\n <Feedback correctness=\"correct\" feedback={feedback}/>\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
1
+ {"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","playersToolbarPosition","value","height","maxHeight","toolbarOpts","teacherInstructionsDiv","position","ref","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,CAAAC,KAAK;AAAA,SAAK;AACtBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EADb;AAEJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAFH,KADgB;AAKtBC,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;AALc,GAAL;AAAA,CAAnB;;IAaaC,I;;;;;;;;;;;;;;;sGAgBK,0BAAS,MAAKC,KAAL,CAAWC,QAApB,EAA8B,IAA9B,C;;;;;;WANhB,8BAAqB;AACnB,UAAI,KAAKC,YAAT,EAAuB;AACrB,uCAAW,KAAKA,YAAhB;AACD;AACF;;;WAID,kBAAS;AAAA;;AACP,wBAAoC,KAAKF,KAAzC;AAAA,UAAQG,KAAR,eAAQA,K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,QAAA,WAAW,EAAC,SAAtB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAFF,CAtDJ,CADF;AA8DD;;;EArGuBwB,kBAAMC,S;;;iCAAnBlC,I,eACQ;AACjBE,EAAAA,QAAQ,EAAEiC,sBAAUC,IAAV,CAAeC,UADR;AAEjBjC,EAAAA,KAAK,EAAE+B,sBAAUG,MAFA;AAGjBjC,EAAAA,OAAO,EAAE8B,sBAAUG,MAAV,CAAiBD,UAHT;AAIjB/B,EAAAA,OAAO,EAAE6B,sBAAUI,KAAV,CAAgB;AACvBzB,IAAAA,KAAK,EAAEqB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eAuGN,wBAAWlD,KAAX,EAAkBa,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 { renderMath } from '@pie-lib/math-rendering';\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});\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 componentDidUpdate() {\n if (this.containerRef) {\n renderMath(this.containerRef);\n }\n }\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n const { dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled, playersToolbarPosition } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n const toolbarOpts = {};\n\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />;\n\n switch (playersToolbarPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n return (\n <div\n className={classes.main}\n ref={ref => {\n this.containerRef = ref;\n }}\n >\n {\n teacherInstructions && (\n <div>\n {!animationsDisabled ? (\n <Collapsible\n labels={{hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions'}}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : teacherInstructionsDiv }\n <br/>\n </div>\n )\n }\n {model.prompt && (\n <Typography\n className={classes.prompt}\n >\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n <EditableHTML\n className=\"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 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 />\n {feedback && (\n <div>\n <br />\n <Feedback correctness=\"correct\" feedback={feedback}/>\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.17/module/index.js";
2
- import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.18/module/index.js";
3
- import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.18/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.19/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.20/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.20/module/index.js";
4
4
  var lib = {};
5
5
  Object.defineProperty(lib, "__esModule", {
6
6
  value: true
@@ -131,7 +131,7 @@ class Main extends React$1.Component {
131
131
  onChangeModel: model => onModelChanged(model),
132
132
  onChangeConfiguration: config => onConfigurationChanged(config),
133
133
  groups: {
134
- 'Settings': {
134
+ Settings: {
135
135
  mathInput: mathInput.settings && toggle(mathInput.label),
136
136
  equationEditor: equationEditor.enabled && model.mathInput && dropdown(equationEditor.label, ['non-negative-integers', 'integers', 'decimals', 'fractions', 'Grade 1 - 2', 'Grade 3 - 5', 'Grade 6 - 7', 'Grade 8 - HS', 'geometry', 'advanced-algebra', 'statistics', 'item-authoring']),
137
137
  dimensions: numberFields(dimensions.label, {
@@ -152,7 +152,7 @@ class Main extends React$1.Component {
152
152
  promptEnabled: prompt.settings && toggle(prompt.label),
153
153
  feedbackEnabled: feedback.settings && toggle(feedback.label)
154
154
  },
155
- 'Properties': {
155
+ Properties: {
156
156
  teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
157
157
  studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label)
158
158
  }
@@ -160,19 +160,19 @@ class Main extends React$1.Component {
160
160
  __self: this,
161
161
  __source: {
162
162
  fileName: _jsxFileName,
163
- lineNumber: 84
163
+ lineNumber: 92
164
164
  }
165
165
  }),
166
166
  __self: this,
167
167
  __source: {
168
168
  fileName: _jsxFileName,
169
- lineNumber: 82
169
+ lineNumber: 90
170
170
  }
171
171
  }, React$1.createElement('div', {
172
172
  __self: this,
173
173
  __source: {
174
174
  fileName: _jsxFileName,
175
- lineNumber: 136
175
+ lineNumber: 148
176
176
  }
177
177
  }, teacherInstructionsEnabled && React$1.createElement(InputContainer, {
178
178
  label: teacherInstructions.label,
@@ -180,7 +180,7 @@ class Main extends React$1.Component {
180
180
  __self: this,
181
181
  __source: {
182
182
  fileName: _jsxFileName,
183
- lineNumber: 139
183
+ lineNumber: 150
184
184
  }
185
185
  }, React$1.createElement(EditableHtml, {
186
186
  className: classes.prompt,
@@ -192,13 +192,13 @@ class Main extends React$1.Component {
192
192
  __self: this,
193
193
  __source: {
194
194
  fileName: _jsxFileName,
195
- lineNumber: 140
195
+ lineNumber: 154
196
196
  }
197
197
  })), React$1.createElement('br', {
198
198
  __self: this,
199
199
  __source: {
200
200
  fileName: _jsxFileName,
201
- lineNumber: 151
201
+ lineNumber: 165
202
202
  }
203
203
  }), promptEnabled && React$1.createElement(InputContainer, {
204
204
  label: prompt.label,
@@ -206,7 +206,7 @@ class Main extends React$1.Component {
206
206
  __self: this,
207
207
  __source: {
208
208
  fileName: _jsxFileName,
209
- lineNumber: 154
209
+ lineNumber: 168
210
210
  }
211
211
  }, React$1.createElement(EditableHtml, {
212
212
  activePlugins: ALL_PLUGINS,
@@ -219,13 +219,13 @@ class Main extends React$1.Component {
219
219
  __self: this,
220
220
  __source: {
221
221
  fileName: _jsxFileName,
222
- lineNumber: 155
222
+ lineNumber: 172
223
223
  }
224
224
  })), feedbackEnabled && React$1.createElement(React$1.Fragment, {
225
225
  __self: this,
226
226
  __source: {
227
227
  fileName: _jsxFileName,
228
- lineNumber: 169
228
+ lineNumber: 185
229
229
  }
230
230
  }, React$1.createElement(Typography, {
231
231
  className: classes.header,
@@ -233,7 +233,7 @@ class Main extends React$1.Component {
233
233
  __self: this,
234
234
  __source: {
235
235
  fileName: _jsxFileName,
236
- lineNumber: 170
236
+ lineNumber: 186
237
237
  }
238
238
  }, "Feedback"), React$1.createElement(FeedbackSelector, {
239
239
  label: "When submitted, show",
@@ -243,7 +243,7 @@ class Main extends React$1.Component {
243
243
  __self: this,
244
244
  __source: {
245
245
  fileName: _jsxFileName,
246
- lineNumber: 174
246
+ lineNumber: 190
247
247
  }
248
248
  }))));
249
249
  }
@@ -81,7 +81,8 @@ async function model(question, session, env) {
81
81
  feedback,
82
82
  teacherInstructions,
83
83
  mathInput: normalizedQuestion.mathInput,
84
- equationEditor
84
+ equationEditor,
85
+ playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'
85
86
  }));
86
87
  }
87
88
 
package/module/demo.js CHANGED
@@ -14,7 +14,8 @@ generate.model = (id, element) => ({
14
14
  prompt: 'This is the question prompt',
15
15
  promptEnabled: true,
16
16
  mathInput: true,
17
- toolbarEditorPosition: 'bottom',
17
+ playersToolbarPosition: 'bottom',
18
+ toolbarEditorPosition: 'bottom'
18
19
  });
19
20
 
20
21
  const { model } = generate;
package/module/element.js CHANGED
@@ -1,7 +1,7 @@
1
- import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2.17/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.20/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.16/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.18/module/index.js";
1
+ import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2.19/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.22/module/index.js";
3
+ import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.18/module/index.js";
4
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.20/module/index.js";
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
  function getDefaultExportFromCjs(x) {
7
7
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -21958,6 +21958,18 @@ const htmlDecode = input => {
21958
21958
  const getTagName = el => {
21959
21959
  return (el && el.tagName || '').toLowerCase();
21960
21960
  };
21961
+ const lessThanHandling = input => {
21962
+ const arrowSplit = input.split('<');
21963
+ if (input.length > 2) {
21964
+ return arrowSplit.reduce((st, part) => {
21965
+ if (part.match(/<[a-zA-Z/][\s\S]*>/ig)) {
21966
+ return `${st}${st ? '<' : ''}${part}`;
21967
+ }
21968
+ return `${st}${st ? '&lt;' : ''}${part}`;
21969
+ }, '');
21970
+ }
21971
+ return input;
21972
+ };
21961
21973
  const serialization$4 = {
21962
21974
  deserialize(el) {
21963
21975
  const tagName = getTagName(el);
@@ -22002,14 +22014,14 @@ const serialization$4 = {
22002
22014
  const l = object.data.get('latex');
22003
22015
  const wrapper = object.data.get('wrapper');
22004
22016
  log$f('[serialize] latex: ', l);
22005
- const decoded = htmlDecode(l);
22017
+ const decoded = htmlDecode(lessThanHandling(l));
22006
22018
  return React$p.createElement('span', {
22007
22019
  'data-latex': "",
22008
22020
  'data-raw': decoded,
22009
22021
  __self: this,
22010
22022
  __source: {
22011
22023
  fileName: _jsxFileName$o,
22012
- lineNumber: 238
22024
+ lineNumber: 268
22013
22025
  }
22014
22026
  }, wrapMath(decoded, wrapper));
22015
22027
  }
@@ -22023,7 +22035,7 @@ const serialization$4 = {
22023
22035
  __self: this,
22024
22036
  __source: {
22025
22037
  fileName: _jsxFileName$o,
22026
- lineNumber: 250
22038
+ lineNumber: 280
22027
22039
  }
22028
22040
  });
22029
22041
  }
@@ -33339,10 +33351,11 @@ class Main extends React$1.Component {
33339
33351
  }
33340
33352
  render() {
33341
33353
  const {model, classes, session} = this.props;
33342
- const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled} = model;
33354
+ const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled, playersToolbarPosition} = model;
33343
33355
  const {value} = session;
33344
33356
  const {width, height} = dimensions || ({});
33345
33357
  const maxHeight = '40vh';
33358
+ const toolbarOpts = {};
33346
33359
  log$1('[render] disabled? ', disabled);
33347
33360
  const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
33348
33361
  defaultClassName: "teacher-instructions",
@@ -33350,9 +33363,17 @@ class Main extends React$1.Component {
33350
33363
  __self: this,
33351
33364
  __source: {
33352
33365
  fileName: _jsxFileName,
33353
- lineNumber: 52
33366
+ lineNumber: 54
33354
33367
  }
33355
33368
  });
33369
+ switch (playersToolbarPosition) {
33370
+ case 'top':
33371
+ toolbarOpts.position = 'top';
33372
+ break;
33373
+ default:
33374
+ toolbarOpts.position = 'bottom';
33375
+ break;
33376
+ }
33356
33377
  return React$1.createElement('div', {
33357
33378
  className: classes.main,
33358
33379
  ref: ref => {
@@ -33361,13 +33382,13 @@ class Main extends React$1.Component {
33361
33382
  __self: this,
33362
33383
  __source: {
33363
33384
  fileName: _jsxFileName,
33364
- lineNumber: 55
33385
+ lineNumber: 66
33365
33386
  }
33366
33387
  }, teacherInstructions && React$1.createElement('div', {
33367
33388
  __self: this,
33368
33389
  __source: {
33369
33390
  fileName: _jsxFileName,
33370
- lineNumber: 63
33391
+ lineNumber: 74
33371
33392
  }
33372
33393
  }, !animationsDisabled ? React$1.createElement(Collapsible, {
33373
33394
  labels: {
@@ -33378,20 +33399,20 @@ class Main extends React$1.Component {
33378
33399
  __self: this,
33379
33400
  __source: {
33380
33401
  fileName: _jsxFileName,
33381
- lineNumber: 65
33402
+ lineNumber: 76
33382
33403
  }
33383
33404
  }, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
33384
33405
  __self: this,
33385
33406
  __source: {
33386
33407
  fileName: _jsxFileName,
33387
- lineNumber: 72
33408
+ lineNumber: 83
33388
33409
  }
33389
33410
  })), model.prompt && React$1.createElement(Typography, {
33390
33411
  className: classes.prompt,
33391
33412
  __self: this,
33392
33413
  __source: {
33393
33414
  fileName: _jsxFileName,
33394
- lineNumber: 77
33415
+ lineNumber: 88
33395
33416
  }
33396
33417
  }, React$1.createElement(PreviewPrompt, {
33397
33418
  defaultClassName: "prompt",
@@ -33399,7 +33420,7 @@ class Main extends React$1.Component {
33399
33420
  __self: this,
33400
33421
  __source: {
33401
33422
  fileName: _jsxFileName,
33402
- lineNumber: 80
33423
+ lineNumber: 91
33403
33424
  }
33404
33425
  })), React$1.createElement(EditableHtml, {
33405
33426
  className: "response-area-editor",
@@ -33410,6 +33431,7 @@ class Main extends React$1.Component {
33410
33431
  maxHeight: maxHeight,
33411
33432
  disabled: disabled,
33412
33433
  highlightShape: true,
33434
+ toolbarOpts: toolbarOpts,
33413
33435
  pluginProps: {
33414
33436
  math: {
33415
33437
  disabled: !mathInput,
@@ -33427,19 +33449,19 @@ class Main extends React$1.Component {
33427
33449
  __self: this,
33428
33450
  __source: {
33429
33451
  fileName: _jsxFileName,
33430
- lineNumber: 83
33452
+ lineNumber: 94
33431
33453
  }
33432
33454
  }), feedback && React$1.createElement('div', {
33433
33455
  __self: this,
33434
33456
  __source: {
33435
33457
  fileName: _jsxFileName,
33436
- lineNumber: 108
33458
+ lineNumber: 120
33437
33459
  }
33438
33460
  }, React$1.createElement('br', {
33439
33461
  __self: this,
33440
33462
  __source: {
33441
33463
  fileName: _jsxFileName,
33442
- lineNumber: 109
33464
+ lineNumber: 121
33443
33465
  }
33444
33466
  }), React$1.createElement(Feedback, {
33445
33467
  correctness: "correct",
@@ -33447,7 +33469,7 @@ class Main extends React$1.Component {
33447
33469
  __self: this,
33448
33470
  __source: {
33449
33471
  fileName: _jsxFileName,
33450
- lineNumber: 110
33472
+ lineNumber: 122
33451
33473
  }
33452
33474
  })));
33453
33475
  }
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/extended-text-entry@6.7.8</title>
5
+ <title>@pie-element/extended-text-entry@6.8.0</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "6.7.8",
3
+ "version": "6.8.0",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
7
- "version": "^1.2.17"
7
+ "version": "^1.2.19"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/math-rendering-module",
11
- "version": "^1.0.20"
11
+ "version": "^1.0.22"
12
12
  },
13
13
  {
14
14
  "name": "@pie-lib/math-edit-module",
15
- "version": "^1.1.16"
15
+ "version": "^1.1.18"
16
16
  },
17
17
  {
18
18
  "name": "@pie-lib/drag-module",
19
- "version": "^1.0.18"
19
+ "version": "^1.0.20"
20
20
  }
21
21
  ]
22
22
  }
@@ -12,7 +12,8 @@ generate.model = (id, element) => ({
12
12
  prompt: 'This is the question prompt',
13
13
  promptEnabled: true,
14
14
  mathInput: true,
15
- toolbarEditorPosition: 'bottom',
15
+ playersToolbarPosition: 'bottom',
16
+ toolbarEditorPosition: 'bottom'
16
17
  });
17
18
 
18
19
  const { model } = generate;
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/extended-text-entry@6.7.8</title>
5
+ <title>@pie-element/extended-text-entry@6.8.0</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1,7 +1,7 @@
1
- import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2.17/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.20/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.16/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.18/module/index.js";
1
+ import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2.19/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.22/module/index.js";
3
+ import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.18/module/index.js";
4
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.20/module/index.js";
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
  function getDefaultExportFromCjs(x) {
7
7
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -21958,6 +21958,18 @@ const htmlDecode = input => {
21958
21958
  const getTagName = el => {
21959
21959
  return (el && el.tagName || '').toLowerCase();
21960
21960
  };
21961
+ const lessThanHandling = input => {
21962
+ const arrowSplit = input.split('<');
21963
+ if (input.length > 2) {
21964
+ return arrowSplit.reduce((st, part) => {
21965
+ if (part.match(/<[a-zA-Z/][\s\S]*>/ig)) {
21966
+ return `${st}${st ? '<' : ''}${part}`;
21967
+ }
21968
+ return `${st}${st ? '&lt;' : ''}${part}`;
21969
+ }, '');
21970
+ }
21971
+ return input;
21972
+ };
21961
21973
  const serialization$4 = {
21962
21974
  deserialize(el) {
21963
21975
  const tagName = getTagName(el);
@@ -22002,14 +22014,14 @@ const serialization$4 = {
22002
22014
  const l = object.data.get('latex');
22003
22015
  const wrapper = object.data.get('wrapper');
22004
22016
  log$f('[serialize] latex: ', l);
22005
- const decoded = htmlDecode(l);
22017
+ const decoded = htmlDecode(lessThanHandling(l));
22006
22018
  return React$p.createElement('span', {
22007
22019
  'data-latex': "",
22008
22020
  'data-raw': decoded,
22009
22021
  __self: this,
22010
22022
  __source: {
22011
22023
  fileName: _jsxFileName$o,
22012
- lineNumber: 238
22024
+ lineNumber: 268
22013
22025
  }
22014
22026
  }, wrapMath(decoded, wrapper));
22015
22027
  }
@@ -22023,7 +22035,7 @@ const serialization$4 = {
22023
22035
  __self: this,
22024
22036
  __source: {
22025
22037
  fileName: _jsxFileName$o,
22026
- lineNumber: 250
22038
+ lineNumber: 280
22027
22039
  }
22028
22040
  });
22029
22041
  }
@@ -33339,10 +33351,11 @@ class Main extends React$1.Component {
33339
33351
  }
33340
33352
  render() {
33341
33353
  const {model, classes, session} = this.props;
33342
- const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled} = model;
33354
+ const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled, playersToolbarPosition} = model;
33343
33355
  const {value} = session;
33344
33356
  const {width, height} = dimensions || ({});
33345
33357
  const maxHeight = '40vh';
33358
+ const toolbarOpts = {};
33346
33359
  log$1('[render] disabled? ', disabled);
33347
33360
  const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
33348
33361
  defaultClassName: "teacher-instructions",
@@ -33350,9 +33363,17 @@ class Main extends React$1.Component {
33350
33363
  __self: this,
33351
33364
  __source: {
33352
33365
  fileName: _jsxFileName,
33353
- lineNumber: 52
33366
+ lineNumber: 54
33354
33367
  }
33355
33368
  });
33369
+ switch (playersToolbarPosition) {
33370
+ case 'top':
33371
+ toolbarOpts.position = 'top';
33372
+ break;
33373
+ default:
33374
+ toolbarOpts.position = 'bottom';
33375
+ break;
33376
+ }
33356
33377
  return React$1.createElement('div', {
33357
33378
  className: classes.main,
33358
33379
  ref: ref => {
@@ -33361,13 +33382,13 @@ class Main extends React$1.Component {
33361
33382
  __self: this,
33362
33383
  __source: {
33363
33384
  fileName: _jsxFileName,
33364
- lineNumber: 55
33385
+ lineNumber: 66
33365
33386
  }
33366
33387
  }, teacherInstructions && React$1.createElement('div', {
33367
33388
  __self: this,
33368
33389
  __source: {
33369
33390
  fileName: _jsxFileName,
33370
- lineNumber: 63
33391
+ lineNumber: 74
33371
33392
  }
33372
33393
  }, !animationsDisabled ? React$1.createElement(Collapsible, {
33373
33394
  labels: {
@@ -33378,20 +33399,20 @@ class Main extends React$1.Component {
33378
33399
  __self: this,
33379
33400
  __source: {
33380
33401
  fileName: _jsxFileName,
33381
- lineNumber: 65
33402
+ lineNumber: 76
33382
33403
  }
33383
33404
  }, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
33384
33405
  __self: this,
33385
33406
  __source: {
33386
33407
  fileName: _jsxFileName,
33387
- lineNumber: 72
33408
+ lineNumber: 83
33388
33409
  }
33389
33410
  })), model.prompt && React$1.createElement(Typography, {
33390
33411
  className: classes.prompt,
33391
33412
  __self: this,
33392
33413
  __source: {
33393
33414
  fileName: _jsxFileName,
33394
- lineNumber: 77
33415
+ lineNumber: 88
33395
33416
  }
33396
33417
  }, React$1.createElement(PreviewPrompt, {
33397
33418
  defaultClassName: "prompt",
@@ -33399,7 +33420,7 @@ class Main extends React$1.Component {
33399
33420
  __self: this,
33400
33421
  __source: {
33401
33422
  fileName: _jsxFileName,
33402
- lineNumber: 80
33423
+ lineNumber: 91
33403
33424
  }
33404
33425
  })), React$1.createElement(EditableHtml, {
33405
33426
  className: "response-area-editor",
@@ -33410,6 +33431,7 @@ class Main extends React$1.Component {
33410
33431
  maxHeight: maxHeight,
33411
33432
  disabled: disabled,
33412
33433
  highlightShape: true,
33434
+ toolbarOpts: toolbarOpts,
33413
33435
  pluginProps: {
33414
33436
  math: {
33415
33437
  disabled: !mathInput,
@@ -33427,19 +33449,19 @@ class Main extends React$1.Component {
33427
33449
  __self: this,
33428
33450
  __source: {
33429
33451
  fileName: _jsxFileName,
33430
- lineNumber: 83
33452
+ lineNumber: 94
33431
33453
  }
33432
33454
  }), feedback && React$1.createElement('div', {
33433
33455
  __self: this,
33434
33456
  __source: {
33435
33457
  fileName: _jsxFileName,
33436
- lineNumber: 108
33458
+ lineNumber: 120
33437
33459
  }
33438
33460
  }, React$1.createElement('br', {
33439
33461
  __self: this,
33440
33462
  __source: {
33441
33463
  fileName: _jsxFileName,
33442
- lineNumber: 109
33464
+ lineNumber: 121
33443
33465
  }
33444
33466
  }), React$1.createElement(Feedback, {
33445
33467
  correctness: "correct",
@@ -33447,7 +33469,7 @@ class Main extends React$1.Component {
33447
33469
  __self: this,
33448
33470
  __source: {
33449
33471
  fileName: _jsxFileName,
33450
- lineNumber: 110
33472
+ lineNumber: 122
33451
33473
  }
33452
33474
  })));
33453
33475
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -12,7 +12,7 @@
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": "^7.17.16",
15
+ "@pie-lib/editable-html": "^7.17.18",
16
16
  "@pie-lib/math-rendering": "^2.3.12",
17
17
  "@pie-lib/render-ui": "^4.12.4",
18
18
  "classnames": "^2.2.5",
@@ -22,7 +22,7 @@
22
22
  "react": "^16.8.1",
23
23
  "react-dom": "^16.8.1"
24
24
  },
25
- "gitHead": "510db2949732b8997ff2e1a496ca1a7bd3973088",
25
+ "gitHead": "820dc9994e5f621018ca2c262f9a999996fd2079",
26
26
  "scripts": {
27
27
  "postpublish": "../../scripts/postpublish"
28
28
  },