@pie-element/extended-text-entry 6.7.7 → 6.7.8

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.7.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.7.7...@pie-element/extended-text-entry@6.7.8) (2022-01-10)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry
9
+
10
+
11
+
12
+
13
+
6
14
  ## [6.7.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.7.6...@pie-element/extended-text-entry@6.7.7) (2021-12-23)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/extended-text-entry
@@ -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.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.7...@pie-element/extended-text-entry-configure@5.4.8) (2022-01-10)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.4.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.6...@pie-element/extended-text-entry-configure@5.4.7) (2021-12-23)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/extended-text-entry-configure
@@ -12,7 +12,7 @@ var _default = {
12
12
  },
13
13
  prompt: 'This is the question prompt',
14
14
  mathInput: false,
15
- equationEditor: 'miscellaneous',
15
+ equationEditor: 'Grade 8 - HS',
16
16
  feedbackEnabled: true,
17
17
  rationaleEnabled: true,
18
18
  promptEnabled: true,
@@ -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;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,cAAc,EAAE,eAPX;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: 'miscellaneous',\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,I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put: 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"}
@@ -161,7 +161,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
161
161
  groups: {
162
162
  'Settings': {
163
163
  mathInput: mathInput.settings && toggle(mathInput.label),
164
- equationEditor: equationEditor.enabled && model.mathInput && dropdown(equationEditor.label, ['Grade 1 - 2', 'Grade 3 - 5', 'Grade 6 - 7', 'Grade 8 - HS', 'geometry', 'advanced-algebra', 'statistics', 'miscellaneous']),
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, {
166
166
  width: {
167
167
  label: 'Width (px)',
@@ -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,cAA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AAE;AACXxB,MAAAA,KAAK,EAAE,MADI;AAEXuB,MAAAA,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 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'miscellaneous'\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","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,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sBAAsB,EAAE8B,sBAAUC,IAFjB;AAGjBxC,EAAAA,KAAK,EAAEuC,sBAAUG,MAAV,CAAiBD,UAHP;AAIjBjC,EAAAA,aAAa,EAAE+B,sBAAUG,MAAV,CAAiBD,UAJf;AAKjB/B,EAAAA,YAAY,EAAE6B,sBAAUG,MAAV,CAAiBD,UALd;AAMjBlC,EAAAA,OAAO,EAAEgC,sBAAUG,MAAV,CAAiBD;AANT,C;;eAuKN,wBAAW,UAAAE,KAAK;AAAA,SAAK;AAClCR,IAAAA,MAAM,EAAE;AACNS,MAAAA,aAAa,EAAED,KAAK,CAACE,OAAN,CAAcC;AADvB,KAD0B;AAIlCf,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;AAGfrB,MAAAA,KAAK,EAAE;AAHQ,KAJiB;AASlCwB,IAAAA,WAAW,EAAE;AACXxB,MAAAA,KAAK,EAAE,MADI;AAEXuB,MAAAA,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,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry-configure",
3
3
  "private": true,
4
- "version": "5.4.7",
4
+ "version": "5.4.8",
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.14",
14
- "@pie-lib/editable-html": "^7.17.14",
13
+ "@pie-lib/config-ui": "^10.10.15",
14
+ "@pie-lib/editable-html": "^7.17.15",
15
15
  "lodash": "^4.17.15",
16
16
  "prop-types": "^15.6.2",
17
17
  "react": "^16.8.1",
@@ -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.15/module/index.js";
2
- import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.16/module/index.js";
3
- import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.16/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.16/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.17/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.17/module/index.js";
4
4
  var lib = {};
5
5
  Object.defineProperty(lib, "__esModule", {
6
6
  value: true
@@ -133,7 +133,7 @@ class Main extends React$1.Component {
133
133
  groups: {
134
134
  'Settings': {
135
135
  mathInput: mathInput.settings && toggle(mathInput.label),
136
- equationEditor: equationEditor.enabled && model.mathInput && dropdown(equationEditor.label, ['Grade 1 - 2', 'Grade 3 - 5', 'Grade 6 - 7', 'Grade 8 - HS', 'geometry', 'advanced-algebra', 'statistics', 'miscellaneous']),
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, {
138
138
  width: {
139
139
  label: 'Width (px)',
@@ -172,7 +172,7 @@ class Main extends React$1.Component {
172
172
  __self: this,
173
173
  __source: {
174
174
  fileName: _jsxFileName,
175
- lineNumber: 132
175
+ lineNumber: 136
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: 135
183
+ lineNumber: 139
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: 136
195
+ lineNumber: 140
196
196
  }
197
197
  })), React$1.createElement('br', {
198
198
  __self: this,
199
199
  __source: {
200
200
  fileName: _jsxFileName,
201
- lineNumber: 147
201
+ lineNumber: 151
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: 150
209
+ lineNumber: 154
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: 151
222
+ lineNumber: 155
223
223
  }
224
224
  })), feedbackEnabled && React$1.createElement(React$1.Fragment, {
225
225
  __self: this,
226
226
  __source: {
227
227
  fileName: _jsxFileName,
228
- lineNumber: 165
228
+ lineNumber: 169
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: 166
236
+ lineNumber: 170
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: 170
246
+ lineNumber: 174
247
247
  }
248
248
  }))));
249
249
  }
@@ -274,7 +274,7 @@ var defaults = {
274
274
  },
275
275
  prompt: 'This is the question prompt',
276
276
  mathInput: false,
277
- equationEditor: 'miscellaneous',
277
+ equationEditor: 'Grade 8 - HS',
278
278
  feedbackEnabled: true,
279
279
  rationaleEnabled: true,
280
280
  promptEnabled: true,
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.15/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.18/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.14/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.16/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.16/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.19/module/index.js";
3
+ import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.15/module/index.js";
4
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.17/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;
@@ -30493,6 +30493,17 @@ TableCell.propTypes = {
30493
30493
  onBlur: PropTypes$a.func,
30494
30494
  children: PropTypes$a.oneOfType([PropTypes$a.arrayOf(PropTypes$a.node), PropTypes$a.node]).isRequired
30495
30495
  };
30496
+ const moveFocusToBeginningOfTable = change => {
30497
+ const addedTable = change.value.document.findDescendant(d => !!d.data && !!d.data.get('newTable'));
30498
+ if (!addedTable) {
30499
+ return;
30500
+ }
30501
+ change.collapseToStartOf(addedTable);
30502
+ const update = addedTable.data.remove('newTable');
30503
+ change.setNodeByKey(addedTable.key, {
30504
+ data: update
30505
+ });
30506
+ };
30496
30507
  var TablePlugin = (opts, toolbarPlugins) => {
30497
30508
  const core = _default({
30498
30509
  typeContent: 'div'
@@ -30539,7 +30550,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30539
30550
  __self: undefined,
30540
30551
  __source: {
30541
30552
  fileName: _jsxFileName$e,
30542
- lineNumber: 131
30553
+ lineNumber: 145
30543
30554
  }
30544
30555
  }),
30545
30556
  onClick: (value, onChange) => {
@@ -30547,10 +30558,12 @@ var TablePlugin = (opts, toolbarPlugins) => {
30547
30558
  const change = value.change();
30548
30559
  const newTable = core.utils.createTableWithOptions(2, 2, {
30549
30560
  data: {
30550
- border: '1'
30561
+ border: '1',
30562
+ newTable: true
30551
30563
  }
30552
30564
  });
30553
30565
  change.insertBlock(newTable);
30566
+ moveFocusToBeginningOfTable(change);
30554
30567
  onChange(change);
30555
30568
  },
30556
30569
  supports: (node, value) => node && node.object === 'block' && core.utils.isSelectionInTable(value),
@@ -30607,7 +30620,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30607
30620
  __self: undefined,
30608
30621
  __source: {
30609
30622
  fileName: _jsxFileName$e,
30610
- lineNumber: 197
30623
+ lineNumber: 213
30611
30624
  }
30612
30625
  });
30613
30626
  return Tb;
@@ -30623,7 +30636,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30623
30636
  __self: undefined,
30624
30637
  __source: {
30625
30638
  fileName: _jsxFileName$e,
30626
- lineNumber: 218
30639
+ lineNumber: 234
30627
30640
  }
30628
30641
  });
30629
30642
  case 'table_row':
@@ -30632,7 +30645,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30632
30645
  __self: undefined,
30633
30646
  __source: {
30634
30647
  fileName: _jsxFileName$e,
30635
- lineNumber: 220
30648
+ lineNumber: 236
30636
30649
  }
30637
30650
  });
30638
30651
  case 'table_cell':
@@ -30643,7 +30656,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30643
30656
  __self: undefined,
30644
30657
  __source: {
30645
30658
  fileName: _jsxFileName$e,
30646
- lineNumber: 222
30659
+ lineNumber: 238
30647
30660
  }
30648
30661
  });
30649
30662
  default:
@@ -30681,7 +30694,14 @@ var TablePlugin = (opts, toolbarPlugins) => {
30681
30694
  if (prevText) {
30682
30695
  change.moveFocusTo(prevText.key, prevText.text.length).moveAnchorTo(prevText.key, prevText.text.length);
30683
30696
  }
30684
- change.insertBlock(tableJSON);
30697
+ change.insertBlock({
30698
+ ...tableJSON,
30699
+ data: {
30700
+ ...tableJSON.data,
30701
+ newTable: true
30702
+ }
30703
+ });
30704
+ moveFocusToBeginningOfTable(change);
30685
30705
  });
30686
30706
  }
30687
30707
  };
@@ -30788,13 +30808,13 @@ const serialization$1 = {
30788
30808
  __self: this,
30789
30809
  __source: {
30790
30810
  fileName: _jsxFileName$e,
30791
- lineNumber: 389
30811
+ lineNumber: 413
30792
30812
  }
30793
30813
  }, React$f.createElement('tbody', {
30794
30814
  __self: this,
30795
30815
  __source: {
30796
30816
  fileName: _jsxFileName$e,
30797
- lineNumber: 390
30817
+ lineNumber: 414
30798
30818
  }
30799
30819
  }, children));
30800
30820
  }
@@ -30804,7 +30824,7 @@ const serialization$1 = {
30804
30824
  __self: this,
30805
30825
  __source: {
30806
30826
  fileName: _jsxFileName$e,
30807
- lineNumber: 395
30827
+ lineNumber: 419
30808
30828
  }
30809
30829
  }, children);
30810
30830
  }
@@ -30818,7 +30838,7 @@ const serialization$1 = {
30818
30838
  __self: this,
30819
30839
  __source: {
30820
30840
  fileName: _jsxFileName$e,
30821
- lineNumber: 401
30841
+ lineNumber: 425
30822
30842
  }
30823
30843
  }, children);
30824
30844
  } else {
@@ -30827,7 +30847,7 @@ const serialization$1 = {
30827
30847
  __self: this,
30828
30848
  __source: {
30829
30849
  fileName: _jsxFileName$e,
30830
- lineNumber: 403
30850
+ lineNumber: 427
30831
30851
  }
30832
30852
  }, children);
30833
30853
  }
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.6</title>
5
+ <title>@pie-element/extended-text-entry@6.7.7</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.6",
3
+ "version": "6.7.7",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
7
- "version": "^1.2.15"
7
+ "version": "^1.2.16"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/math-rendering-module",
11
- "version": "^1.0.18"
11
+ "version": "^1.0.19"
12
12
  },
13
13
  {
14
14
  "name": "@pie-lib/math-edit-module",
15
- "version": "^1.1.14"
15
+ "version": "^1.1.15"
16
16
  },
17
17
  {
18
18
  "name": "@pie-lib/drag-module",
19
- "version": "^1.0.16"
19
+ "version": "^1.0.17"
20
20
  }
21
21
  ]
22
22
  }
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.6</title>
5
+ <title>@pie-element/extended-text-entry@6.7.7</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.15/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.18/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.14/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.16/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.16/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.19/module/index.js";
3
+ import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.15/module/index.js";
4
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.17/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;
@@ -30493,6 +30493,17 @@ TableCell.propTypes = {
30493
30493
  onBlur: PropTypes$a.func,
30494
30494
  children: PropTypes$a.oneOfType([PropTypes$a.arrayOf(PropTypes$a.node), PropTypes$a.node]).isRequired
30495
30495
  };
30496
+ const moveFocusToBeginningOfTable = change => {
30497
+ const addedTable = change.value.document.findDescendant(d => !!d.data && !!d.data.get('newTable'));
30498
+ if (!addedTable) {
30499
+ return;
30500
+ }
30501
+ change.collapseToStartOf(addedTable);
30502
+ const update = addedTable.data.remove('newTable');
30503
+ change.setNodeByKey(addedTable.key, {
30504
+ data: update
30505
+ });
30506
+ };
30496
30507
  var TablePlugin = (opts, toolbarPlugins) => {
30497
30508
  const core = _default({
30498
30509
  typeContent: 'div'
@@ -30539,7 +30550,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30539
30550
  __self: undefined,
30540
30551
  __source: {
30541
30552
  fileName: _jsxFileName$e,
30542
- lineNumber: 131
30553
+ lineNumber: 145
30543
30554
  }
30544
30555
  }),
30545
30556
  onClick: (value, onChange) => {
@@ -30547,10 +30558,12 @@ var TablePlugin = (opts, toolbarPlugins) => {
30547
30558
  const change = value.change();
30548
30559
  const newTable = core.utils.createTableWithOptions(2, 2, {
30549
30560
  data: {
30550
- border: '1'
30561
+ border: '1',
30562
+ newTable: true
30551
30563
  }
30552
30564
  });
30553
30565
  change.insertBlock(newTable);
30566
+ moveFocusToBeginningOfTable(change);
30554
30567
  onChange(change);
30555
30568
  },
30556
30569
  supports: (node, value) => node && node.object === 'block' && core.utils.isSelectionInTable(value),
@@ -30607,7 +30620,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30607
30620
  __self: undefined,
30608
30621
  __source: {
30609
30622
  fileName: _jsxFileName$e,
30610
- lineNumber: 197
30623
+ lineNumber: 213
30611
30624
  }
30612
30625
  });
30613
30626
  return Tb;
@@ -30623,7 +30636,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30623
30636
  __self: undefined,
30624
30637
  __source: {
30625
30638
  fileName: _jsxFileName$e,
30626
- lineNumber: 218
30639
+ lineNumber: 234
30627
30640
  }
30628
30641
  });
30629
30642
  case 'table_row':
@@ -30632,7 +30645,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30632
30645
  __self: undefined,
30633
30646
  __source: {
30634
30647
  fileName: _jsxFileName$e,
30635
- lineNumber: 220
30648
+ lineNumber: 236
30636
30649
  }
30637
30650
  });
30638
30651
  case 'table_cell':
@@ -30643,7 +30656,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
30643
30656
  __self: undefined,
30644
30657
  __source: {
30645
30658
  fileName: _jsxFileName$e,
30646
- lineNumber: 222
30659
+ lineNumber: 238
30647
30660
  }
30648
30661
  });
30649
30662
  default:
@@ -30681,7 +30694,14 @@ var TablePlugin = (opts, toolbarPlugins) => {
30681
30694
  if (prevText) {
30682
30695
  change.moveFocusTo(prevText.key, prevText.text.length).moveAnchorTo(prevText.key, prevText.text.length);
30683
30696
  }
30684
- change.insertBlock(tableJSON);
30697
+ change.insertBlock({
30698
+ ...tableJSON,
30699
+ data: {
30700
+ ...tableJSON.data,
30701
+ newTable: true
30702
+ }
30703
+ });
30704
+ moveFocusToBeginningOfTable(change);
30685
30705
  });
30686
30706
  }
30687
30707
  };
@@ -30788,13 +30808,13 @@ const serialization$1 = {
30788
30808
  __self: this,
30789
30809
  __source: {
30790
30810
  fileName: _jsxFileName$e,
30791
- lineNumber: 389
30811
+ lineNumber: 413
30792
30812
  }
30793
30813
  }, React$f.createElement('tbody', {
30794
30814
  __self: this,
30795
30815
  __source: {
30796
30816
  fileName: _jsxFileName$e,
30797
- lineNumber: 390
30817
+ lineNumber: 414
30798
30818
  }
30799
30819
  }, children));
30800
30820
  }
@@ -30804,7 +30824,7 @@ const serialization$1 = {
30804
30824
  __self: this,
30805
30825
  __source: {
30806
30826
  fileName: _jsxFileName$e,
30807
- lineNumber: 395
30827
+ lineNumber: 419
30808
30828
  }
30809
30829
  }, children);
30810
30830
  }
@@ -30818,7 +30838,7 @@ const serialization$1 = {
30818
30838
  __self: this,
30819
30839
  __source: {
30820
30840
  fileName: _jsxFileName$e,
30821
- lineNumber: 401
30841
+ lineNumber: 425
30822
30842
  }
30823
30843
  }, children);
30824
30844
  } else {
@@ -30827,7 +30847,7 @@ const serialization$1 = {
30827
30847
  __self: this,
30828
30848
  __source: {
30829
30849
  fileName: _jsxFileName$e,
30830
- lineNumber: 403
30850
+ lineNumber: 427
30831
30851
  }
30832
30852
  }, children);
30833
30853
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "6.7.7",
3
+ "version": "6.7.8",
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.14",
15
+ "@pie-lib/editable-html": "^7.17.15",
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": "aed4c49b18e323dd0fc7fbf2186039723d406751",
25
+ "gitHead": "62c971b852c1b1405f96fbb19712f882a9f1504e",
26
26
  "scripts": {
27
27
  "postpublish": "../../scripts/postpublish"
28
28
  },