@pie-element/extended-text-entry 6.8.12 → 7.1.0

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,50 @@
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
+ # [7.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@7.0.0...@pie-element/extended-text-entry@7.1.0) (2022-06-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * PD-1499 not having desired result (also, remove unnecessary code) - PD-1793 ([9987b4c](https://github.com/pie-framework/pie-elements/commit/9987b4c39f407ad7fab6db59cbe6ad1a66233cb6))
12
+ * PD-1499 not having desired result with extended-text (TTS for math markup) - import renderMath - PD-1793 ([2db2559](https://github.com/pie-framework/pie-elements/commit/2db2559c9bc14dd052a3fa643528e81c7751e521))
13
+ * PD-1499 not having desired result with extended-text (TTS for math markup) PD-1793 ([c0f6d78](https://github.com/pie-framework/pie-elements/commit/c0f6d78b718303b152008447b30262e167438bf0))
14
+
15
+
16
+ ### Features
17
+
18
+ * **extended-text-entry:** add maxImageWidth and maxImageHeight props PD-1801 ([82b1404](https://github.com/pie-framework/pie-elements/commit/82b1404a25c67d21599c916574a9caa66b536584))
19
+ * **input:** added configurability for inserting spanish and special characters [PD-1461], [PD-1462] ([11f381e](https://github.com/pie-framework/pie-elements/commit/11f381ea44a3ae2b2c5c189dc53932d689c8e044))
20
+
21
+
22
+
23
+
24
+
25
+ # [7.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.13...@pie-element/extended-text-entry@7.0.0) (2022-06-28)
26
+
27
+
28
+ ### chore
29
+
30
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
31
+
32
+
33
+ ### BREAKING CHANGES
34
+
35
+ * Image percent buttons were removed from toolbar.
36
+ New properties maxImageWidth and maxImageHeight were added.
37
+
38
+
39
+
40
+
41
+
42
+ ## [6.8.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.12...@pie-element/extended-text-entry@6.8.13) (2022-06-13)
43
+
44
+ **Note:** Version bump only for package @pie-element/extended-text-entry
45
+
46
+
47
+
48
+
49
+
6
50
  ## [6.8.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.11...@pie-element/extended-text-entry@6.8.12) (2022-05-30)
7
51
 
8
52
  **Note:** Version bump only for package @pie-element/extended-text-entry
@@ -3,6 +3,43 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.0.0...@pie-element/extended-text-entry-configure@6.1.0) (2022-06-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **extended-text-entry:** add maxImageWidth and maxImageHeight props PD-1801 ([82b1404](https://github.com/pie-framework/pie-elements/commit/82b1404a25c67d21599c916574a9caa66b536584))
12
+ * **input:** added configurability for inserting spanish and special characters [PD-1461], [PD-1462] ([11f381e](https://github.com/pie-framework/pie-elements/commit/11f381ea44a3ae2b2c5c189dc53932d689c8e044))
13
+
14
+
15
+
16
+
17
+
18
+ # [6.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.21...@pie-element/extended-text-entry-configure@6.0.0) (2022-06-28)
19
+
20
+
21
+ ### chore
22
+
23
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
24
+
25
+
26
+ ### BREAKING CHANGES
27
+
28
+ * Image percent buttons were removed from toolbar.
29
+ New properties maxImageWidth and maxImageHeight were added.
30
+
31
+
32
+
33
+
34
+
35
+ ## [5.4.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.20...@pie-element/extended-text-entry-configure@5.4.21) (2022-06-13)
36
+
37
+ **Note:** Version bump only for package @pie-element/extended-text-entry-configure
38
+
39
+
40
+
41
+
42
+
6
43
  ## [5.4.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.19...@pie-element/extended-text-entry-configure@5.4.20) (2022-05-30)
7
44
 
8
45
  **Note:** Version bump only for package @pie-element/extended-text-entry-configure
@@ -12,6 +12,8 @@ var _default = {
12
12
  },
13
13
  prompt: 'This is the question prompt',
14
14
  mathInput: false,
15
+ spanishInput: false,
16
+ specialInput: false,
15
17
  equationEditor: 'Grade 8 - HS',
16
18
  feedbackEnabled: true,
17
19
  rationaleEnabled: true,
@@ -51,6 +53,16 @@ var _default = {
51
53
  label: 'Student response can include math notation',
52
54
  enabled: false
53
55
  },
56
+ spanishInput: {
57
+ settings: true,
58
+ label: 'Students can insert Spanish',
59
+ enabled: false
60
+ },
61
+ specialInput: {
62
+ settings: true,
63
+ label: 'Students can insert Special Characters',
64
+ enabled: false
65
+ },
54
66
  multiple: {
55
67
  settings: false,
56
68
  label: 'Multiple Parts',
@@ -67,6 +79,14 @@ var _default = {
67
79
  teacherInstructions: {
68
80
  settings: true,
69
81
  label: 'Teacher Instructions'
82
+ },
83
+ maxImageWidth: {
84
+ teacherInstructions: 300,
85
+ prompt: 300
86
+ },
87
+ maxImageHeight: {
88
+ teacherInstructions: 300,
89
+ prompt: 300
70
90
  }
71
91
  }
72
92
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckEnabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","multiple","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,I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E;AACRN,MAAAA,QAAQ,EAAE,KADF;AAERC,MAAAA,KAAK,EAAE,gBAFC;AAGRE,MAAAA,OAAO,EAAE;AAHD,KA7BG;AAkCbI,IAAAA,mBAAmB,EAAE;AACnBP,MAAAA,QAAQ,EAAE,KADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KAlCR;AAsCbb,IAAAA,MAAM,EAAE;AACNY,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KAtCK;AA0CbO,IAAAA,mBAAmB,EAAE;AACnBR,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY;AA1CR;AAlBF,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 spellCheckEnabled:true,\n playerSpellCheckEnabled:true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n playerSpellCheck: {\n label: 'Student Spellcheck',\n settings:true,\n enabled:true\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback'\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n 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","spanishInput","specialInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckEnabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","multiple","studentInstructions","teacherInstructions","maxImageWidth","maxImageHeight"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,YAAY,EAAE,KAPT;AAQLC,IAAAA,YAAY,EAAE,KART;AASLC,IAAAA,cAAc,EAAE,cATX;AAULC,IAAAA,eAAe,EAAE,IAVZ;AAWLC,IAAAA,gBAAgB,EAAE,IAXb;AAYLC,IAAAA,aAAa,EAAE,IAZV;AAaLC,IAAAA,0BAA0B,EAAE,IAbvB;AAcLC,IAAAA,0BAA0B,EAAE,IAdvB;AAeLC,IAAAA,iBAAiB,EAAC,IAfb;AAgBLC,IAAAA,uBAAuB,EAAC,IAhBnB;AAiBLC,IAAAA,qBAAqB,EAAE;AAjBlB,GADM;AAoBbC,EAAAA,aAAa,EAAE;AACbhB,IAAAA,UAAU,EAAE;AACViB,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADC;AAKbC,IAAAA,UAAU,EAAE;AACVD,MAAAA,KAAK,EAAE,YADG;AAEVD,MAAAA,QAAQ,EAAC,KAFC;AAGVG,MAAAA,OAAO,EAAC;AAHE,KALC;AAUbC,IAAAA,gBAAgB,EAAE;AAChBH,MAAAA,KAAK,EAAE,oBADS;AAEhBD,MAAAA,QAAQ,EAAC,IAFO;AAGhBG,MAAAA,OAAO,EAAC;AAHQ,KAVL;AAebb,IAAAA,cAAc,EAAE;AACdU,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE,iBAFO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\n prompt: 'This is the question prompt',\n mathInput: false,\n spanishInput: false,\n specialInput: false,\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n spellCheckEnabled:true,\n playerSpellCheckEnabled:true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n playerSpellCheck: {\n label: 'Student Spellcheck',\n settings:true,\n enabled:true\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback'\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n spanishInput: {\n settings: true,\n label: 'Students can insert Spanish',\n enabled: false,\n },\n specialInput: {\n settings: true,\n label: 'Students can insert Special Characters',\n enabled: false,\n },\n multiple: {\n settings: false,\n label: 'Multiple Parts',\n enabled: false,\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300\n }\n }\n};\n"],"file":"defaults.js"}
@@ -126,6 +126,10 @@ var Main = /*#__PURE__*/function (_React$Component) {
126
126
  studentInstructions = _ref$studentInstructi === void 0 ? {} : _ref$studentInstructi,
127
127
  _ref$mathInput = _ref.mathInput,
128
128
  mathInput = _ref$mathInput === void 0 ? {} : _ref$mathInput,
129
+ _ref$spanishInput = _ref.spanishInput,
130
+ spanishInput = _ref$spanishInput === void 0 ? {} : _ref$spanishInput,
131
+ _ref$specialInput = _ref.specialInput,
132
+ specialInput = _ref$specialInput === void 0 ? {} : _ref$specialInput,
129
133
  _ref$dimensions = _ref.dimensions,
130
134
  dimensions = _ref$dimensions === void 0 ? {} : _ref$dimensions,
131
135
  _ref$equationEditor = _ref.equationEditor,
@@ -133,7 +137,11 @@ var Main = /*#__PURE__*/function (_React$Component) {
133
137
  _ref$spellCheck = _ref.spellCheck,
134
138
  spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
135
139
  _ref$playerSpellCheck = _ref.playerSpellCheck,
136
- playerSpellCheck = _ref$playerSpellCheck === void 0 ? {} : _ref$playerSpellCheck;
140
+ playerSpellCheck = _ref$playerSpellCheck === void 0 ? {} : _ref$playerSpellCheck,
141
+ _ref$maxImageWidth = _ref.maxImageWidth,
142
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
143
+ _ref$maxImageHeight = _ref.maxImageHeight,
144
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
137
145
 
138
146
  var _ref2 = model || {},
139
147
  teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
@@ -142,6 +150,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
142
150
  spellCheckEnabled = _ref2.spellCheckEnabled;
143
151
 
144
152
  var toolbarOpts = {};
153
+ var defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
154
+ var defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
145
155
 
146
156
  switch (model.toolbarEditorPosition) {
147
157
  case 'top':
@@ -167,6 +177,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
167
177
  Settings: {
168
178
  mathInput: mathInput.settings && toggle(mathInput.label),
169
179
  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']),
180
+ spanishInput: spanishInput.settings && toggle(spanishInput.label),
181
+ specialInput: specialInput.settings && toggle(specialInput.label),
170
182
  dimensions: numberFields(dimensions.label, {
171
183
  width: {
172
184
  label: 'Width (px)',
@@ -203,7 +215,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
203
215
  imageSupport: imageSupport,
204
216
  nonEmpty: false,
205
217
  toolbarOpts: toolbarOpts,
206
- spellCheck: spellCheckEnabled
218
+ spellCheck: spellCheckEnabled,
219
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
220
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight
207
221
  })), /*#__PURE__*/_react["default"].createElement("br", null), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
208
222
  label: prompt.label,
209
223
  className: classes.promptContainer
@@ -215,7 +229,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
215
229
  imageSupport: imageSupport,
216
230
  nonEmpty: false,
217
231
  toolbarOpts: toolbarOpts,
218
- spellCheck: spellCheckEnabled
232
+ spellCheck: spellCheckEnabled,
233
+ maxImageWidth: defaultImageMaxWidth,
234
+ maxImageHeight: defaultImageMaxHeight
219
235
  })), feedbackEnabled && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
220
236
  className: classes.header,
221
237
  variant: "subheading"
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","numberFields","dropdown","defaultFeedback","type","Main","props","markup","onModelChanged","model","prompt","feedback","update","teacherInstructions","state","setDimensions","classes","configuration","onConfigurationChanged","imageSupport","multiple","studentInstructions","mathInput","dimensions","equationEditor","spellCheck","playerSpellCheck","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","spellCheckEnabled","toolbarOpts","toolbarEditorPosition","position","config","Settings","label","enabled","width","suffix","min","max","height","playerSpellCheckEnabled","Properties","studentInstructionsEnabled","promptContainer","changeTeacherInstructions","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","pa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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;AAGfvB,MAAAA,KAAK,EAAE;AAHQ,KAJmB;AASpC0B,IAAAA,WAAW,EAAE;AACX1B,MAAAA,KAAK,EAAE,MADI;AAEXyB,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC;AAFjB,KATuB;AAapCI,IAAAA,KAAK,EAAE;AACL3B,MAAAA,KAAK,EAAE;AADF;AAb6B,GAAZ;AAAA,CAAX,EAgBXjC,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 spellCheck = {},\n playerSpellCheck = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled, spellCheckEnabled } =\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 spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckEnabled:\n playerSpellCheck.settings && toggle(playerSpellCheck.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 spellCheck={spellCheckEnabled}\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 spellCheck={spellCheckEnabled}\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
+ {"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","spanishInput","specialInput","dimensions","equationEditor","spellCheck","playerSpellCheck","maxImageWidth","maxImageHeight","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","spellCheckEnabled","toolbarOpts","defaultImageMaxWidth","defaultImageMaxHeight","toolbarEditorPosition","position","config","Settings","label","enabled","width","suffix","min","max","height","playerSpellCheckEnabled","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;AAC7B,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,UAACC,mBAAD,EAAyB;AACnD,yBAAkC,MAAKP,KAAvC;AAA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AAA,KAAK,EAAE;AAHQ,KAJmB;AASpC0B,IAAAA,WAAW,EAAE;AACX1B,MAAAA,KAAK,EAAE,MADI;AAEXyB,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC;AAFjB,KATuB;AAapCI,IAAAA,KAAK,EAAE;AACL3B,MAAAA,KAAK,EAAE;AADF;AAb6B,GAAZ;AAAA,CAAX,EAgBXvC,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 spanishInput = {},\n specialInput = {},\n dimensions = {},\n equationEditor = {},\n spellCheck = {},\n playerSpellCheck = {},\n maxImageWidth = {},\n maxImageHeight = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled, spellCheckEnabled } =\n model || {};\n const toolbarOpts = {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\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 spanishInput: spanishInput.settings && toggle(spanishInput.label),\n specialInput: specialInput.settings && toggle(specialInput.label),\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 spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckEnabled:\n playerSpellCheck.settings && toggle(playerSpellCheck.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 spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}\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 spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\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.20",
4
+ "version": "6.1.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,8 +10,8 @@
10
10
  "dependencies": {
11
11
  "@material-ui/core": "^3.9.2",
12
12
  "@pie-framework/pie-configure-events": "^1.2.0",
13
- "@pie-lib/config-ui": "^10.13.2",
14
- "@pie-lib/editable-html": "^7.22.5",
13
+ "@pie-lib/config-ui": "^11.0.3",
14
+ "@pie-lib/editable-html": "^8.1.2",
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.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.21...@pie-element/extended-text-entry-controller@4.1.22) (2022-06-13)
7
+
8
+ **Note:** Version bump only for package @pie-element/extended-text-entry-controller
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.1.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.20...@pie-element/extended-text-entry-controller@4.1.21) (2022-03-28)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/extended-text-entry-controller
@@ -123,6 +123,8 @@ function _model() {
123
123
  feedback: feedback,
124
124
  teacherInstructions: teacherInstructions,
125
125
  mathInput: normalizedQuestion.mathInput,
126
+ spanishInput: normalizedQuestion.spanishInput,
127
+ specialInput: normalizedQuestion.specialInput,
126
128
  equationEditor: equationEditor,
127
129
  spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,
128
130
  playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","playerSpellCheckEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","spellCheckE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AA,aAAhB,CAnCF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;;AAiDuB;AAARC,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 playerSpellCheckEnabled: 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 spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,\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
+ {"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","playerSpellCheckEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","spanishInput","specialInput","spellCheckEnabled","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,IANG;AAO/BC,IAAAA,uBAAuB,EAAE;AAPM,KAQ5BN,QAR4B;AAAA,CAA1B;;;;SAY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,aAAnB,GAAmCM,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;AAQ1BC,gBAAAA,YAAY,EAAEhB,kBAAkB,CAACgB,YARP;AAS1BC,gBAAAA,YAAY,EAAEjB,kBAAkB,CAACiB,YATP;AAU1BR,gBAAAA,cAAc,EAAdA,cAV0B;AAW1BS,gBAAAA,iBAAiB,EAAElB,kBAAkB,CAACH,uBAXZ;AAY1BsB,gBAAAA,sBAAsB,EAAEnB,kBAAkB,CAACmB,sBAAnB,IAA6C;AAZ3C,eAAL;AAAA,aAAhB,CAnCF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;;AAmDuB;AAARC,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 playerSpellCheckEnabled: 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 spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,\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.21",
4
+ "version": "4.1.22",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -35,6 +35,38 @@
35
35
  }
36
36
  }
37
37
  },
38
+ "spanishInput": {
39
+ "title": "ConfigureProp",
40
+ "type": "object",
41
+ "properties": {
42
+ "settings": {
43
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
44
+ "type": "boolean",
45
+ "title": "settings"
46
+ },
47
+ "label": {
48
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
49
+ "type": "string",
50
+ "title": "label"
51
+ }
52
+ }
53
+ },
54
+ "specialInput": {
55
+ "title": "ConfigureProp",
56
+ "type": "object",
57
+ "properties": {
58
+ "settings": {
59
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
60
+ "type": "boolean",
61
+ "title": "settings"
62
+ },
63
+ "label": {
64
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
65
+ "type": "string",
66
+ "title": "label"
67
+ }
68
+ }
69
+ },
38
70
  "multiple": {
39
71
  "title": "ConfigurePropWithEnabled",
40
72
  "type": "object",
@@ -136,6 +168,48 @@
136
168
  }
137
169
  }
138
170
  },
171
+ "maxImageWidth": {
172
+ "title": "ConfigureMaxImageDimensionsProp",
173
+ "type": "object",
174
+ "properties": {
175
+ "teacherInstructions": {
176
+ "description": "Indicates the max dimension for images in teacher instructions",
177
+ "type": "number",
178
+ "title": "teacherInstructions"
179
+ },
180
+ "prompt": {
181
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
182
+ "type": "number",
183
+ "title": "prompt"
184
+ },
185
+ "rationale": {
186
+ "description": "Indicates the max dimension for images in rationale",
187
+ "type": "number",
188
+ "title": "rationale"
189
+ }
190
+ }
191
+ },
192
+ "maxImageHeight": {
193
+ "title": "ConfigureMaxImageDimensionsProp",
194
+ "type": "object",
195
+ "properties": {
196
+ "teacherInstructions": {
197
+ "description": "Indicates the max dimension for images in teacher instructions",
198
+ "type": "number",
199
+ "title": "teacherInstructions"
200
+ },
201
+ "prompt": {
202
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
203
+ "type": "number",
204
+ "title": "prompt"
205
+ },
206
+ "rationale": {
207
+ "description": "Indicates the max dimension for images in rationale",
208
+ "type": "number",
209
+ "title": "rationale"
210
+ }
211
+ }
212
+ },
139
213
  "showPrompt": {
140
214
  "description": "Determines whether prompt field will be displayed or not",
141
215
  "default": true,
@@ -192,6 +266,27 @@
192
266
  "title": "enabled"
193
267
  }
194
268
  }
269
+ },
270
+ "ConfigureMaxImageDimensionsProp": {
271
+ "title": "ConfigureMaxImageDimensionsProp",
272
+ "type": "object",
273
+ "properties": {
274
+ "teacherInstructions": {
275
+ "description": "Indicates the max dimension for images in teacher instructions",
276
+ "type": "number",
277
+ "title": "teacherInstructions"
278
+ },
279
+ "prompt": {
280
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
281
+ "type": "number",
282
+ "title": "prompt"
283
+ },
284
+ "rationale": {
285
+ "description": "Indicates the max dimension for images in rationale",
286
+ "type": "number",
287
+ "title": "rationale"
288
+ }
289
+ }
195
290
  }
196
291
  },
197
292
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -26,6 +26,30 @@ Indicates if the item has to be displayed in the Settings Panel
26
26
 
27
27
  Indicates the label for the item that has to be displayed in the Settings Panel
28
28
 
29
+ # `spanishInput` (object)
30
+
31
+ Properties of the `spanishInput` object:
32
+
33
+ ## `settings` (boolean)
34
+
35
+ Indicates if the item has to be displayed in the Settings Panel
36
+
37
+ ## `label` (string)
38
+
39
+ Indicates the label for the item that has to be displayed in the Settings Panel
40
+
41
+ # `specialInput` (object)
42
+
43
+ Properties of the `specialInput` object:
44
+
45
+ ## `settings` (boolean)
46
+
47
+ Indicates if the item has to be displayed in the Settings Panel
48
+
49
+ ## `label` (string)
50
+
51
+ Indicates the label for the item that has to be displayed in the Settings Panel
52
+
29
53
  # `multiple` (object)
30
54
 
31
55
  Properties of the `multiple` object:
@@ -103,6 +127,38 @@ Indicates if the item has to be displayed in the Settings Panel
103
127
 
104
128
  Indicates the label for the item that has to be displayed in the Settings Panel
105
129
 
130
+ # `maxImageWidth` (object)
131
+
132
+ Properties of the `maxImageWidth` object:
133
+
134
+ ## `teacherInstructions` (number)
135
+
136
+ Indicates the max dimension for images in teacher instructions
137
+
138
+ ## `prompt` (number)
139
+
140
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
141
+
142
+ ## `rationale` (number)
143
+
144
+ Indicates the max dimension for images in rationale
145
+
146
+ # `maxImageHeight` (object)
147
+
148
+ Properties of the `maxImageHeight` object:
149
+
150
+ ## `teacherInstructions` (number)
151
+
152
+ Indicates the max dimension for images in teacher instructions
153
+
154
+ ## `prompt` (number)
155
+
156
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
157
+
158
+ ## `rationale` (number)
159
+
160
+ Indicates the max dimension for images in rationale
161
+
106
162
  # `showPrompt` (boolean)
107
163
 
108
164
  Determines whether prompt field will be displayed or not
@@ -154,4 +210,20 @@ Indicates the label for the item that has to be displayed in the Settings Panel
154
210
  ### `enabled` (boolean)
155
211
 
156
212
  Indicates the value of the item if it affects config-ui
157
- (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
213
+ (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
214
+
215
+ ## `ConfigureMaxImageDimensionsProp` (object)
216
+
217
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
218
+
219
+ ### `teacherInstructions` (number)
220
+
221
+ Indicates the max dimension for images in teacher instructions
222
+
223
+ ### `prompt` (number)
224
+
225
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
226
+
227
+ ### `rationale` (number)
228
+
229
+ Indicates the max dimension for images in rationale
@@ -63,6 +63,18 @@
63
63
  "type": "boolean",
64
64
  "title": "mathInput"
65
65
  },
66
+ "spanishInput": {
67
+ "description": "Whether a control to allow insertion of spanish characters should be displayed",
68
+ "default": false,
69
+ "type": "boolean",
70
+ "title": "spanishInput"
71
+ },
72
+ "specialInput": {
73
+ "description": "Whether a control to allow insertion of special characters should be displayed",
74
+ "default": false,
75
+ "type": "boolean",
76
+ "title": "specialInput"
77
+ },
66
78
  "multiple": {
67
79
  "description": "Indicates if multiple parts are enabled",
68
80
  "type": "boolean",
@@ -196,6 +208,27 @@
196
208
  }
197
209
  }
198
210
  },
211
+ "ConfigureMaxImageDimensionsProp": {
212
+ "title": "ConfigureMaxImageDimensionsProp",
213
+ "type": "object",
214
+ "properties": {
215
+ "teacherInstructions": {
216
+ "description": "Indicates the max dimension for images in teacher instructions",
217
+ "type": "number",
218
+ "title": "teacherInstructions"
219
+ },
220
+ "prompt": {
221
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
222
+ "type": "number",
223
+ "title": "prompt"
224
+ },
225
+ "rationale": {
226
+ "description": "Indicates the max dimension for images in rationale",
227
+ "type": "number",
228
+ "title": "rationale"
229
+ }
230
+ }
231
+ },
199
232
  "Dimensions": {
200
233
  "title": "Dimensions",
201
234
  "type": "object",