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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
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.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.1...@pie-element/extended-text-entry@6.8.2) (2022-02-21)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @pie-element/extended-text-entry
17
+
18
+
19
+
20
+
21
+
22
+ # [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)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **extended-text-entry:** add static classname for editor DNA-13102 ([3ad662f](https://github.com/pie-framework/pie-elements/commit/3ad662fbc6413f5c1721862f87120696071bfdea))
28
+ * **math-inline, extended-text-entry:** use new editors ([2123b8a](https://github.com/pie-framework/pie-elements/commit/2123b8a6d930852a629140053a8459dbc75f281f))
29
+ * **multiple-choice-print, ecr-print:** fix toggle issue, change options.mode to options.role ([0b3f534](https://github.com/pie-framework/pie-elements/commit/0b3f534bb4d2f969e21528e74516345e84f18d72))
30
+ * **multiple-choice, explicit-constructed-response, extended-text-entry:** print do not show teacher instructions, rationale or prompt if they are diabled DNA-13089 ([06b9555](https://github.com/pie-framework/pie-elements/commit/06b9555b25e094e0b2bce0e6a852a206c6d2c17d))
31
+ * use preview prompt for prompt, rationale and teacher instructions to fix table rendering PD-1456 ([f330601](https://github.com/pie-framework/pie-elements/commit/f3306019a2d1c8ce3e2783823dfe9ef0a0394e4f))
32
+
33
+
34
+ ### Features
35
+
36
+ * **extended-text-entry:** Added the ability for instructor to annotate student's response with comments PD-744 ([6d266f9](https://github.com/pie-framework/pie-elements/commit/6d266f9de59bfe3f9b71089f8e222e9ad9026cbc))
37
+ * **extended-text-entry:** implement print PD-1283 ([7e4f7d8](https://github.com/pie-framework/pie-elements/commit/7e4f7d8203f54d905f542369d444232b54261582))
38
+
39
+
40
+
41
+
42
+
43
+ ## [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)
44
+
45
+ **Note:** Version bump only for package @pie-element/extended-text-entry
46
+
47
+
48
+
49
+
50
+
6
51
  ## [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
52
 
8
53
  **Note:** Version bump only for package @pie-element/extended-text-entry
@@ -3,6 +3,41 @@
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.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.10...@pie-element/extended-text-entry-configure@5.4.11) (2022-02-21)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
17
+
18
+
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **math-inline, extended-text-entry:** use new editors ([2123b8a](https://github.com/pie-framework/pie-elements/commit/2123b8a6d930852a629140053a8459dbc75f281f))
28
+
29
+
30
+
31
+
32
+
33
+ ## [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)
34
+
35
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
36
+
37
+
38
+
39
+
40
+
6
41
  ## [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
42
 
8
43
  **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,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,9 +159,9 @@ 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
- 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)',
@@ -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;;A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er,\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","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;AADiB,uGAOF,UAACC,MAAD,EAAY;AAC3B,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,UAACI,QAAD,EAAc;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ANT,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.7",
4
+ "version": "5.4.11",
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.20",
14
+ "@pie-lib/editable-html": "^7.18.0",
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;;;;;;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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AA;AAoBDA,YAAAA,cAAc,GAAG,CAAjB;AApBC;;AAAA;AAuBDA,YAAAA,cAAc,GAAG,CAAjB;AAvBC;;AAAA;AA0BDA,YAAAA,cAAc,GAAG,CAAjB;AA1BC;;AAAA;AA6BDA,YAAAA,cAAc,GAAG,CAAjB;AA7BC;;AAAA;AAAA;;AAAA;AAAA,8CAmCER,EAAE,CAACS,IAAH,CAAQ,UAAAP,QAAQ;AAAA,qBAAK;AAC1BQ,gBAAAA,MAAM,EAAEX,kBAAkB,CAACL,aAAnB,GAAmCK,kBAAkB,CAACW,MAAtD,GAA+D,IAD7C;AAE1BC,gBAAAA,UAAU,EAAEZ,kBAAkB,CAACY,UAFL;AAG1BC,gBAAAA,UAAU,EAAEb,kBAAkB,CAACa,UAAnB,IAAiC,EAHnB;AAI1BC,gBAAAA,QAAQ,EAAEf,GAAG,CAACG,IAAJ,KAAa,QAJG;AAK1BC,gBAAAA,QAAQ,EAARA,QAL0B;AAM1BI,gBAAAA,mBAAmB,EAAnBA,mBAN0B;AAO1BQ,gBAAAA,SAAS,EAAEf,kBAAkB,CAACe,SAPJ;AAQ1BN,gBAAAA,cAAc,EAAdA;AAR0B,eAAL;AAAA,aAAhB,CAnCF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;SA+CeO,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 }));\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,GAA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A,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","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,EA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B;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,KAAR;AAAA,UAAeC,OAAf,eAAeA,OAAf;AAAA,UAAwBC,OAAxB,eAAwBA,OAAxB;AACA,UAAQC,UAAR,GAAuHH,KAAvH,CAAQG,UAAR;AAAA,UAAoBC,QAApB,GAAuHJ,KAAvH,CAAoBI,QAApB;AAAA,UAA8BC,QAA9B,GAAuHL,KAAvH,CAA8BK,QAA9B;AAAA,UAAwCC,mBA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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.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.3.1/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.22/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.22/module/index.js";
4
4
  var lib = {};
5
5
  Object.defineProperty(lib, "__esModule", {
6
6
  value: true
@@ -131,9 +131,9 @@ 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
- 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)',
@@ -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: 132
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: 135
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: 136
195
+ lineNumber: 154
196
196
  }
197
197
  })), React$1.createElement('br', {
198
198
  __self: this,
199
199
  __source: {
200
200
  fileName: _jsxFileName,
201
- lineNumber: 147
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: 150
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: 151
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: 165
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: 166
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: 170
246
+ lineNumber: 190
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,
@@ -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;