@pie-element/hotspot 5.2.5 → 5.3.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,29 @@
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.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@5.2.5...@pie-element/hotspot@5.3.0) (2022-10-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update snapshots ([9781596](https://github.com/pie-framework/pie-elements/commit/978159686bbbd6b727dff4b88ce4ab9606504586))
12
+
13
+
14
+ ### Features
15
+
16
+ * set withRubric to false in item default configurations. Set rubricEnabled to true if it's enabled for drawing-response and extended-text-entry ([a209057](https://github.com/pie-framework/pie-elements/commit/a209057f5a3fa5438efc8595453c89c11959a8f5))
17
+ * update libs ([7e174fb](https://github.com/pie-framework/pie-elements/commit/7e174fba75e7ea668900ad5c103751cefe33e2af))
18
+ * **docs:** update docs ([23cab69](https://github.com/pie-framework/pie-elements/commit/23cab69700cfee41395941f99599253cba8a28a3))
19
+ * **hotspot:** add pie-api config PD-23 ([0791093](https://github.com/pie-framework/pie-elements/commit/0791093b9f36ab922de1af69e781d1856d3477be))
20
+ * **hotspot:** add settings to enable rubric. Add withRubric prop to configuration and rubricEnabled prop to model PD-2100 ([fbddb7a](https://github.com/pie-framework/pie-elements/commit/fbddb7a0c11841ffd1fd4f93b77dc5331ac225fb))
21
+ * **hotspot:** updated snapshot PD-2100 ([1af1e2a](https://github.com/pie-framework/pie-elements/commit/1af1e2af10b591bd61c02c8cc651035587a418ca))
22
+ * enable spanish and special characters in author PD-2120 ([85fd3dd](https://github.com/pie-framework/pie-elements/commit/85fd3dd0fc10da1a2dfd5a842809c625790f8ba9))
23
+ * **hotspot:** add uploadSoundSupport property PD-23-updated ([b438dfb](https://github.com/pie-framework/pie-elements/commit/b438dfbd5840081f0931bb50badf218b0385d62b))
24
+
25
+
26
+
27
+
28
+
6
29
  ## [5.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@5.2.4...@pie-element/hotspot@5.2.5) (2022-09-29)
7
30
 
8
31
  **Note:** Version bump only for package @pie-element/hotspot
@@ -3,6 +3,28 @@
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.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@5.1.9...@pie-element/hotspot-configure@5.2.0) (2022-10-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update snapshots ([9781596](https://github.com/pie-framework/pie-elements/commit/978159686bbbd6b727dff4b88ce4ab9606504586))
12
+
13
+
14
+ ### Features
15
+
16
+ * set withRubric to false in item default configurations. Set rubricEnabled to true if it's enabled for drawing-response and extended-text-entry ([a209057](https://github.com/pie-framework/pie-elements/commit/a209057f5a3fa5438efc8595453c89c11959a8f5))
17
+ * update libs ([7e174fb](https://github.com/pie-framework/pie-elements/commit/7e174fba75e7ea668900ad5c103751cefe33e2af))
18
+ * **hotspot:** add pie-api config PD-23 ([0791093](https://github.com/pie-framework/pie-elements/commit/0791093b9f36ab922de1af69e781d1856d3477be))
19
+ * **hotspot:** add settings to enable rubric. Add withRubric prop to configuration and rubricEnabled prop to model PD-2100 ([fbddb7a](https://github.com/pie-framework/pie-elements/commit/fbddb7a0c11841ffd1fd4f93b77dc5331ac225fb))
20
+ * **hotspot:** updated snapshot PD-2100 ([1af1e2a](https://github.com/pie-framework/pie-elements/commit/1af1e2af10b591bd61c02c8cc651035587a418ca))
21
+ * enable spanish and special characters in author PD-2120 ([85fd3dd](https://github.com/pie-framework/pie-elements/commit/85fd3dd0fc10da1a2dfd5a842809c625790f8ba9))
22
+ * **hotspot:** add uploadSoundSupport property PD-23-updated ([b438dfb](https://github.com/pie-framework/pie-elements/commit/b438dfbd5840081f0931bb50badf218b0385d62b))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [5.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@5.1.8...@pie-element/hotspot-configure@5.1.9) (2022-09-29)
7
29
 
8
30
  **Note:** Version bump only for package @pie-element/hotspot-configure
@@ -70,6 +70,10 @@ var _default = {
70
70
  teacherInstructions: 300,
71
71
  prompt: 300,
72
72
  rationale: 300
73
+ },
74
+ withRubric: {
75
+ settings: false,
76
+ label: 'Add Rubric'
73
77
  }
74
78
  }
75
79
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","toolbarEditorPosition","promptEnabled","imageUrl","shapes","rectangles","polygons","multipleCorrect","partialScoring","dimensions","height","width","hotspotColor","hotspotList","outlineColor","outlineList","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","strokeWidth","configuration","settings","label","rationale","spellCheck","enabled","teacherInstructions","preserveAspectRatio","minShapes","maxImageWidth","maxImageHeight"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,qBAAqB,EAAE,QAFlB;AAGLC,IAAAA,aAAa,EAAE,IAHV;AAILC,IAAAA,QAAQ,EAAE,EAJL;AAKLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAE,EADN;AAENC,MAAAA,QAAQ,EAAE;AAFJ,KALH;AASLC,IAAAA,eAAe,EAAE,IATZ;AAULC,IAAAA,cAAc,EAAE,KAVX;AAWLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KAXP;AAeLC,IAAAA,YAAY,EAAE,2BAfT;AAgBLC,IAAAA,WAAW,EAAE,CACX,2BADW,CAhBR;AAmBLC,IAAAA,YAAY,EAAE,MAnBT;AAoBLC,IAAAA,WAAW,EAAE,CACX,MADW,CApBR;AAuBLC,IAAAA,gBAAgB,EAAE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n model: {\n prompt: 'This is the question prompt',\n toolbarEditorPosition: 'bottom',\n promptEnabled: true,\n imageUrl: '',\n shapes: {\n rectangles: [],\n polygons: []\n },\n multipleCorrect: true,\n partialScoring: false,\n dimensions: {\n height: 0,\n width: 0\n },\n hotspotColor: 'rgba(137, 183, 244, 0.65)',\n hotspotList: [\n 'rgba(137, 183, 244, 0.65)'\n ],\n outlineColor: 'blue',\n outlineList: [\n 'blue'\n ],\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n strokeWidth: 5\n },\n configuration: {\n multipleCorrect: {\n settings: true,\n label: 'Multiple Correct Responses'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n preserveAspectRatio: {\n settings: false,\n enabled: true,\n label: 'Preserve aspect ratio'\n },\n minShapes: 2,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n }\n }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","toolbarEditorPosition","promptEnabled","imageUrl","shapes","rectangles","polygons","multipleCorrect","partialScoring","dimensions","height","width","hotspotColor","hotspotList","outlineColor","outlineList","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","strokeWidth","configuration","settings","label","rationale","spellCheck","enabled","teacherInstructions","preserveAspectRatio","minShapes","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,qBAAqB,EAAE,QAFlB;AAGLC,IAAAA,aAAa,EAAE,IAHV;AAILC,IA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A0BbK,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,KADS;AAEnBI,MAAAA,OAAO,EAAE,IAFU;AAGnBH,MAAAA,KAAK,EAAE;AAHY,KA1BR;AA+BbM,IAAAA,SAAS,EAAE,CA/BE;AAgCbC,IAAAA,aAAa,EAAE;AACbH,MAAAA,mBAAmB,EAAE,GADR;AAEb1B,MAAAA,MAAM,EAAE,GAFK;AAGbuB,MAAAA,SAAS,EAAE;AAHE,KAhCF;AAqCbO,IAAAA,cAAc,EAAE;AACdJ,MAAAA,mBAAmB,EAAE,GADP;AAEd1B,MAAAA,MAAM,EAAE,GAFM;AAGduB,MAAAA,SAAS,EAAE;AAHG,KArCH;AA0CbQ,IAAAA,UAAU,EAAE;AACVV,MAAAA,QAAQ,EAAE,KADA;AAEVC,MAAAA,KAAK,EAAE;AAFG;AA1CC;AA7BF,C","sourcesContent":["export default {\n model: {\n prompt: 'This is the question prompt',\n toolbarEditorPosition: 'bottom',\n promptEnabled: true,\n imageUrl: '',\n shapes: {\n rectangles: [],\n polygons: []\n },\n multipleCorrect: true,\n partialScoring: false,\n dimensions: {\n height: 0,\n width: 0\n },\n hotspotColor: 'rgba(137, 183, 244, 0.65)',\n hotspotList: [\n 'rgba(137, 183, 244, 0.65)'\n ],\n outlineColor: 'blue',\n outlineList: [\n 'blue'\n ],\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n strokeWidth: 5\n },\n configuration: {\n multipleCorrect: {\n settings: true,\n label: 'Multiple Correct Responses'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n preserveAspectRatio: {\n settings: false,\n enabled: true,\n label: 'Preserve aspect ratio'\n },\n minShapes: 2,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
@@ -139,14 +139,16 @@ var Root = /*#__PURE__*/function (_React$Component) {
139
139
  _ref$maxImageWidth = _ref.maxImageWidth,
140
140
  maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
141
141
  _ref$maxImageHeight = _ref.maxImageHeight,
142
- maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
142
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight,
143
+ withRubric = _ref.withRubric;
143
144
 
144
145
  var _ref2 = model || {},
145
146
  teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
146
147
  promptEnabled = _ref2.promptEnabled,
147
148
  rationaleEnabled = _ref2.rationaleEnabled,
148
149
  spellCheckEnabled = _ref2.spellCheckEnabled,
149
- errors = _ref2.errors;
150
+ errors = _ref2.errors,
151
+ rubricEnabled = _ref2.rubricEnabled;
150
152
 
151
153
  var _ref3 = errors || {},
152
154
  shapesError = _ref3.shapesError,
@@ -184,7 +186,8 @@ var Root = /*#__PURE__*/function (_React$Component) {
184
186
  Properties: {
185
187
  teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
186
188
  rationaleEnabled: rationale.settings && toggle(rationale.label),
187
- spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
189
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
190
+ rubricEnabled: withRubric.settings && toggle(withRubric.label)
188
191
  }
189
192
  }
190
193
  })
@@ -202,7 +205,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
202
205
  spellCheck: spellCheckEnabled,
203
206
  maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
204
207
  maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
205
- uploadSoundSupport: uploadSoundSupport
208
+ uploadSoundSupport: uploadSoundSupport,
209
+ languageCharactersProps: [{
210
+ language: 'spanish'
211
+ }, {
212
+ language: 'special'
213
+ }]
206
214
  })), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
207
215
  label: prompt.label,
208
216
  className: classes.prompt
@@ -215,7 +223,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
215
223
  spellCheck: spellCheckEnabled,
216
224
  maxImageWidth: defaultImageMaxWidth,
217
225
  maxImageHeight: defaultImageMaxHeight,
218
- uploadSoundSupport: uploadSoundSupport
226
+ uploadSoundSupport: uploadSoundSupport,
227
+ languageCharactersProps: [{
228
+ language: 'spanish'
229
+ }, {
230
+ language: 'special'
231
+ }]
219
232
  })), rationaleEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
220
233
  label: rationale.label,
221
234
  className: classes.prompt
@@ -227,7 +240,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
227
240
  spellCheck: spellCheckEnabled,
228
241
  maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
229
242
  maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
230
- uploadSoundSupport: uploadSoundSupport
243
+ uploadSoundSupport: uploadSoundSupport,
244
+ languageCharactersProps: [{
245
+ language: 'spanish'
246
+ }, {
247
+ language: 'special'
248
+ }]
231
249
  })), /*#__PURE__*/_react["default"].createElement("div", {
232
250
  className: (0, _classnames["default"])(classes.label, classes.flexContainer)
233
251
  }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","fieldType","color","onColorChanged","props","cType","value","resizeType","model","dimensions","shapes","configuration","preserveAspectRatio","onUpdateImageDimension","onUpdateShapes","nextImageDimensions","updatedDimensions","enabled","shapesArray","updatedShapes","classes","imageSupport","uploadSoundSupport","onConfigurationChanged","onImageUpload","onModelChangedByConfig","onPromptChanged","onRationaleChanged","onTeacherInstructionsChanged","multipleCorrect","partialScoring","prompt","teacherInstructions","rationale","spellCheck","maxImageWidth","maxImageHeight","teacherInstructionsEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","errors","shapesError","selectionsError","toolbarOpts","validationMessage","defaultImageMaxWidth","defaultImageMaxHeight","toolbarEditorPosition","position","base","label","Properties","regular","flexContainer","subheading","tooltip","errorText","hotspotColor","hotspotList","outlineColor","outlineList","handleColorChange","imageUrl","strokeWidth","width","e","handleOnUpdateImageDimensions","field","height","React","Component","styles","theme","marginTop","spacing","unit","container","display","flex","paddingTop","marginRight","marginBottom","switchElement","justifyContent","margin","alignItems","fontSize","whiteSpace","maxWidth","padding","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAQA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEaC,I;;;;;;;;;;;;;;;0GACS,UAACC,SAAD,EAAYC,KAAZ,EAAsB;AACxC,UAAQC,cAAR,GAA2B,MAAKC,KAAhC,CAAQD,cAAR;AACA,UAAME,KAAK,aAAMJ,SAAN,UAAX;AAEAE,MAAAA,cAAc,CAACE,KAAD,EAAQH,KAAR,CAAd;AACD,K;sHAE+B,UAACI,KAAD,EAAQC,UAAR,EAAuB;AACrD,wBAKI,MAAKH,KALT;AAAA,0CACEI,KADF;AAAA,UACWC,UADX,qBACWA,UADX;AAAA,UACuBC,MADvB,qBACuBA,MADvB;AAAA,8CAEEC,aAFF,CAEmBC,mBAFnB;AAAA,UAEmBA,mBAFnB,sCAEyC,EAFzC;AAAA,UAGEC,sBAHF,eAGEA,sBAHF;A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AV,CAAeH,UAnBxB;AAoBflE,EAAAA,4BAA4B,EAAEgE,sBAAUK,IAAV,CAAeH;AApB9B,CAAjB;;eAuBe,wBAAWtB,MAAX,EAAmBxE,IAAnB,C","sourcesContent":["import React from 'react';\nimport {\n settings,\n layout,\n InputContainer,\n NumberTextField\n} from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport HotspotPalette from './hotspot-palette';\nimport HotspotContainer from './hotspot-container';\nimport classNames from 'classnames';\nimport {\n updateImageDimensions,\n generateValidationMessage,\n getUpdatedShapes,\n getAllShapes,\n groupShapes\n} from './utils';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n handleColorChange = (fieldType, color) => {\n const { onColorChanged } = this.props;\n const cType = `${fieldType}Color`;\n\n onColorChanged(cType, color);\n };\n\n handleOnUpdateImageDimensions = (value, resizeType) => {\n const {\n model: { dimensions, shapes },\n configuration: { preserveAspectRatio = {} },\n onUpdateImageDimension,\n onUpdateShapes,\n } = this.props;\n\n const nextImageDimensions = { ...dimensions, [resizeType]: value };\n\n // if preserveAspectRatio.enabled, updateImageDimensions function makes sure aspect ratio is kept\n const updatedDimensions = updateImageDimensions(\n dimensions,\n nextImageDimensions,\n preserveAspectRatio.enabled,\n resizeType\n );\n // transform shapes map into shapes array\n const shapesArray = getAllShapes(shapes);\n // transform all the shapes to fit the re-sized image\n const updatedShapes = getUpdatedShapes(dimensions, updatedDimensions, shapesArray);\n // transform shapes array back into shapes map\n\n onUpdateShapes(groupShapes(updatedShapes));\n onUpdateImageDimension(updatedDimensions);\n };\n\n render() {\n const {\n classes,\n configuration,\n model,\n imageSupport,\n uploadSoundSupport,\n onConfigurationChanged,\n onImageUpload,\n onModelChangedByConfig,\n onPromptChanged,\n onRationaleChanged,\n onUpdateImageDimension,\n onTeacherInstructionsChanged,\n onUpdateShapes\n } = this.props;\n const {\n multipleCorrect = {},\n partialScoring = {},\n prompt = {},\n teacherInstructions = {},\n rationale = {},\n spellCheck = {},\n preserveAspectRatio = {},\n maxImageWidth = {},\n maxImageHeight = {},\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, rationaleEnabled, spellCheckEnabled, errors } = model || {};\n const { shapesError, selectionsError } = errors || {};\n const toolbarOpts = {};\n\n const validationMessage = generateValidationMessage(configuration);\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\n return (\n <div className={classes.base}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChangedByConfig}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n 'Settings': {\n multipleCorrect:\n multipleCorrect.settings && toggle(multipleCorrect.label),\n partialScoring:\n partialScoring.settings && toggle(partialScoring.label),\n promptEnabled:\n prompt.settings && toggle(prompt.label),\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n }\n }}\n />\n }\n >\n <div className={classes.regular}>\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.prompt}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n />\n </InputContainer>\n )}\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.prompt}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n />\n </InputContainer>\n )}\n\n {rationaleEnabled && (\n <InputContainer\n label={rationale.label}\n className={classes.prompt}\n >\n <EditableHtml\n markup={model.rationale || ''}\n onChange={onRationaleChanged}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n />\n </InputContainer>\n )}\n\n <div className={classNames(classes.label, classes.flexContainer)}>\n <Typography className={classes.subheading} variant=\"subheading\">\n Define Hotspot\n </Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'left'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ float: 'right' }}/>\n </Tooltip>\n </div>\n {shapesError && <div className={classes.errorText}>{shapesError}</div>}\n {selectionsError && <div className={classes.errorText}>{selectionsError}</div>}\n\n <HotspotPalette\n hotspotColor={model.hotspotColor}\n hotspotList={model.hotspotList}\n outlineColor={model.outlineColor}\n outlineList={model.outlineList}\n onHotspotColorChange={color =>\n this.handleColorChange('hotspot', color)\n }\n onOutlineColorChange={color =>\n this.handleColorChange('outline', color)\n }\n />\n\n <HotspotContainer\n dimensions={model.dimensions}\n imageUrl={model.imageUrl}\n multipleCorrect={model.multipleCorrect}\n hotspotColor={model.hotspotColor}\n outlineColor={model.outlineColor}\n onUpdateImageDimension={onUpdateImageDimension}\n onUpdateShapes={onUpdateShapes}\n onImageUpload={onImageUpload}\n shapes={model.shapes}\n strokeWidth={model.strokeWidth}\n preserveAspectRatioEnabled={preserveAspectRatio.enabled}\n />\n\n {model.imageUrl && (\n <div>\n <Typography className={classes.label} variant=\"subheading\">\n Image Dimensions\n </Typography>\n\n <div className={classes.dimensions}>\n <NumberTextField\n key=\"hotspot-manual-width\"\n label=\"Width\"\n value={model.dimensions.width}\n min={0}\n onChange={(e, value) => this.handleOnUpdateImageDimensions(value, 'width')}\n showErrorWhenOutsideRange\n className={classes.field}\n />\n <NumberTextField\n key=\"hotspot-manual-height\"\n label=\"Height\"\n value={model.dimensions.height}\n min={0}\n onChange={(e, value) => this.handleOnUpdateImageDimensions(value, 'height')}\n showErrorWhenOutsideRange\n className={classes.field}\n />\n </div>\n </div>\n )}\n </div>\n </layout.ConfigLayout>\n </div>\n );\n }\n}\n\nconst styles = theme => ({\n base: {\n marginTop: theme.spacing.unit * 3\n },\n container: {\n display: 'flex',\n marginTop: theme.spacing.unit\n },\n dimensions: {\n display: 'flex'\n },\n field: {\n flex: 1,\n width: '90%'\n },\n label: {\n marginTop: theme.spacing.unit * 4\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%'\n },\n subheading: {\n marginRight: '5px'\n },\n regular: {\n marginBottom: theme.spacing.unit * 3\n },\n switchElement: {\n justifyContent: 'space-between',\n margin: 0\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center'\n },\n tooltip: {\n fontSize: '12px',\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: '12px',\n color: 'red',\n padding: '5px 0'\n }\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n configuration: PropTypes.object,\n model: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func,\n delete: PropTypes.func\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func,\n delete: PropTypes.func\n }),\n onImageUpload: PropTypes.func.isRequired,\n onColorChanged: PropTypes.func.isRequired,\n onPromptChanged: PropTypes.func.isRequired,\n onUpdateImageDimension: PropTypes.func.isRequired,\n onUpdateShapes: PropTypes.func.isRequired,\n onModelChangedByConfig: PropTypes.func.isRequired,\n onRationaleChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n onTeacherInstructionsChanged: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
1
+ {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","fieldType","color","onColorChanged","props","cType","value","resizeType","model","dimensions","shapes","configuration","preserveAspectRatio","onUpdateImageDimension","onUpdateShapes","nextImageDimensions","updatedDimensions","enabled","shapesArray","updatedShapes","classes","imageSupport","uploadSoundSupport","onConfigurationChanged","onImageUpload","onModelChangedByConfig","onPromptChanged","onRationaleChanged","onTeacherInstructionsChanged","multipleCorrect","partialScoring","prompt","teacherInstructions","rationale","spellCheck","maxImageWidth","maxImageHeight","withRubric","teacherInstructionsEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","errors","rubricEnabled","shapesError","selectionsError","toolbarOpts","validationMessage","defaultImageMaxWidth","defaultImageMaxHeight","toolbarEditorPosition","position","base","label","Properties","regular","language","flexContainer","subheading","tooltip","errorText","hotspotColor","hotspotList","outlineColor","outlineList","handleColorChange","imageUrl","strokeWidth","width","e","handleOnUpdateImageDimensions","field","height","React","Component","styles","theme","marginTop","spacing","unit","container","display","flex","paddingTop","marginRight","marginBottom","switchElement","justifyContent","margin","alignItems","fontSize","whiteSpace","maxWidth","padding","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAQA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEa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MAAAA,OAAO,EAAE;AAHA;AAzCY,GAAL;AAAA,CAApB;;AAgDA7F,IAAI,CAAC8F,SAAL,GAAiB;AACf1E,EAAAA,OAAO,EAAE2E,sBAAUC,MAAV,CAAiBC,UADX;AAEftF,EAAAA,aAAa,EAAEoF,sBAAUC,MAFV;AAGfxF,EAAAA,KAAK,EAAEuF,sBAAUC,MAAV,CAAiBC,UAHT;AAIf5E,EAAAA,YAAY,EAAE0E,sBAAUG,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEJ,sBAAUK,IADa;AAE5B,cAAQL,sBAAUK;AAFU,GAAhB,CAJC;AAQf9E,EAAAA,kBAAkB,EAAEyE,sBAAUG,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEJ,sBAAUK,IADmB;AAElC,cAAQL,sBAAUK;AAFgB,GAAhB,CARL;AAYf5E,EAAAA,aAAa,EAAEuE,sBAAUK,IAAV,CAAeH,UAZf;AAaf9F,EAAAA,cAAc,EAAE4F,sBAAUK,IAAV,CAAeH,UAbhB;AAcfvE,EAAAA,eAAe,EAAEqE,sBAAUK,IAAV,CAAeH,UAdjB;AAefpF,EAAAA,sBAAsB,EAAEkF,sBAAUK,IAAV,CAAeH,UAfxB;AAgBfnF,EAAAA,cAAc,EAAEiF,sBAAUK,IAAV,CAAeH,UAhBhB;AAiBfxE,EAAAA,sBAAsB,EAAEsE,sBAAUK,IAAV,CAAeH,UAjBxB;AAkBftE,EAAAA,kBAAkB,EAAEoE,sBAAUK,IAAV,CAAeH,UAlBpB;AAmBf1E,EAAAA,sBAAsB,EAAEwE,sBAAUK,IAAV,CAAeH,UAnBxB;AAoBfrE,EAAAA,4BAA4B,EAAEmE,sBAAUK,IAAV,CAAeH;AApB9B,CAAjB;;eAuBe,wBAAWtB,MAAX,EAAmB3E,IAAnB,C","sourcesContent":["import React from 'react';\nimport {\n settings,\n layout,\n InputContainer,\n NumberTextField\n} from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport HotspotPalette from './hotspot-palette';\nimport HotspotContainer from './hotspot-container';\nimport classNames from 'classnames';\nimport {\n updateImageDimensions,\n generateValidationMessage,\n getUpdatedShapes,\n getAllShapes,\n groupShapes\n} from './utils';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n handleColorChange = (fieldType, color) => {\n const { onColorChanged } = this.props;\n const cType = `${fieldType}Color`;\n\n onColorChanged(cType, color);\n };\n\n handleOnUpdateImageDimensions = (value, resizeType) => {\n const {\n model: { dimensions, shapes },\n configuration: { preserveAspectRatio = {} },\n onUpdateImageDimension,\n onUpdateShapes,\n } = this.props;\n\n const nextImageDimensions = { ...dimensions, [resizeType]: value };\n\n // if preserveAspectRatio.enabled, updateImageDimensions function makes sure aspect ratio is kept\n const updatedDimensions = updateImageDimensions(\n dimensions,\n nextImageDimensions,\n preserveAspectRatio.enabled,\n resizeType\n );\n // transform shapes map into shapes array\n const shapesArray = getAllShapes(shapes);\n // transform all the shapes to fit the re-sized image\n const updatedShapes = getUpdatedShapes(dimensions, updatedDimensions, shapesArray);\n // transform shapes array back into shapes map\n\n onUpdateShapes(groupShapes(updatedShapes));\n onUpdateImageDimension(updatedDimensions);\n };\n\n render() {\n const {\n classes,\n configuration,\n model,\n imageSupport,\n uploadSoundSupport,\n onConfigurationChanged,\n onImageUpload,\n onModelChangedByConfig,\n onPromptChanged,\n onRationaleChanged,\n onUpdateImageDimension,\n onTeacherInstructionsChanged,\n onUpdateShapes\n } = this.props;\n const {\n multipleCorrect = {},\n partialScoring = {},\n prompt = {},\n teacherInstructions = {},\n rationale = {},\n spellCheck = {},\n preserveAspectRatio = {},\n maxImageWidth = {},\n maxImageHeight = {},\n withRubric\n } = configuration || {};\n const {\n teacherInstructionsEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n errors,\n rubricEnabled\n } = model || {};\n const { shapesError, selectionsError } = errors || {};\n const toolbarOpts = {};\n\n const validationMessage = generateValidationMessage(configuration);\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\n return (\n <div className={classes.base}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChangedByConfig}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n 'Settings': {\n multipleCorrect:\n multipleCorrect.settings && toggle(multipleCorrect.label),\n partialScoring:\n partialScoring.settings && toggle(partialScoring.label),\n promptEnabled:\n prompt.settings && toggle(prompt.label),\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric.settings && toggle(withRubric.label)\n }\n }}\n />\n }\n >\n <div className={classes.regular}>\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.prompt}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.prompt}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n {rationaleEnabled && (\n <InputContainer\n label={rationale.label}\n className={classes.prompt}\n >\n <EditableHtml\n markup={model.rationale || ''}\n onChange={onRationaleChanged}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n <div className={classNames(classes.label, classes.flexContainer)}>\n <Typography className={classes.subheading} variant=\"subheading\">\n Define Hotspot\n </Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'left'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ float: 'right' }}/>\n </Tooltip>\n </div>\n {shapesError && <div className={classes.errorText}>{shapesError}</div>}\n {selectionsError && <div className={classes.errorText}>{selectionsError}</div>}\n\n <HotspotPalette\n hotspotColor={model.hotspotColor}\n hotspotList={model.hotspotList}\n outlineColor={model.outlineColor}\n outlineList={model.outlineList}\n onHotspotColorChange={color =>\n this.handleColorChange('hotspot', color)\n }\n onOutlineColorChange={color =>\n this.handleColorChange('outline', color)\n }\n />\n\n <HotspotContainer\n dimensions={model.dimensions}\n imageUrl={model.imageUrl}\n multipleCorrect={model.multipleCorrect}\n hotspotColor={model.hotspotColor}\n outlineColor={model.outlineColor}\n onUpdateImageDimension={onUpdateImageDimension}\n onUpdateShapes={onUpdateShapes}\n onImageUpload={onImageUpload}\n shapes={model.shapes}\n strokeWidth={model.strokeWidth}\n preserveAspectRatioEnabled={preserveAspectRatio.enabled}\n />\n\n {model.imageUrl && (\n <div>\n <Typography className={classes.label} variant=\"subheading\">\n Image Dimensions\n </Typography>\n\n <div className={classes.dimensions}>\n <NumberTextField\n key=\"hotspot-manual-width\"\n label=\"Width\"\n value={model.dimensions.width}\n min={0}\n onChange={(e, value) => this.handleOnUpdateImageDimensions(value, 'width')}\n showErrorWhenOutsideRange\n className={classes.field}\n />\n <NumberTextField\n key=\"hotspot-manual-height\"\n label=\"Height\"\n value={model.dimensions.height}\n min={0}\n onChange={(e, value) => this.handleOnUpdateImageDimensions(value, 'height')}\n showErrorWhenOutsideRange\n className={classes.field}\n />\n </div>\n </div>\n )}\n </div>\n </layout.ConfigLayout>\n </div>\n );\n }\n}\n\nconst styles = theme => ({\n base: {\n marginTop: theme.spacing.unit * 3\n },\n container: {\n display: 'flex',\n marginTop: theme.spacing.unit\n },\n dimensions: {\n display: 'flex'\n },\n field: {\n flex: 1,\n width: '90%'\n },\n label: {\n marginTop: theme.spacing.unit * 4\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%'\n },\n subheading: {\n marginRight: '5px'\n },\n regular: {\n marginBottom: theme.spacing.unit * 3\n },\n switchElement: {\n justifyContent: 'space-between',\n margin: 0\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center'\n },\n tooltip: {\n fontSize: '12px',\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: '12px',\n color: 'red',\n padding: '5px 0'\n }\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n configuration: PropTypes.object,\n model: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func,\n delete: PropTypes.func\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func,\n delete: PropTypes.func\n }),\n onImageUpload: PropTypes.func.isRequired,\n onColorChanged: PropTypes.func.isRequired,\n onPromptChanged: PropTypes.func.isRequired,\n onUpdateImageDimension: PropTypes.func.isRequired,\n onUpdateShapes: PropTypes.func.isRequired,\n onModelChangedByConfig: PropTypes.func.isRequired,\n onRationaleChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n onTeacherInstructionsChanged: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-configure",
3
3
  "private": true,
4
- "version": "5.1.9",
4
+ "version": "5.2.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,7 +10,7 @@
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@material-ui/icons": "^3.0.2",
12
12
  "@pie-framework/pie-configure-events": "^1.3.0",
13
- "@pie-lib/config-ui": "^11.0.19",
13
+ "@pie-lib/config-ui": "^11.0.20",
14
14
  "@pie-lib/editable-html": "^9.2.2",
15
15
  "classnames": "^2.2.6",
16
16
  "debug": "^3.1.0",
@@ -48,12 +48,17 @@ exports[`Root render renders 1`] = `
48
48
  "label": "Teacher Instructions",
49
49
  "settings": true,
50
50
  },
51
+ "withRubric": Object {
52
+ "label": "Add Rubric",
53
+ "settings": false,
54
+ },
51
55
  }
52
56
  }
53
57
  groups={
54
58
  Object {
55
59
  "Properties": Object {
56
60
  "rationaleEnabled": undefined,
61
+ "rubricEnabled": false,
57
62
  "spellCheckEnabled": false,
58
63
  "teacherInstructionsEnabled": undefined,
59
64
  },
@@ -68,6 +68,10 @@ export default {
68
68
  teacherInstructions: 300,
69
69
  prompt: 300,
70
70
  rationale: 300,
71
+ },
72
+ withRubric: {
73
+ settings: false,
74
+ label: 'Add Rubric'
71
75
  }
72
76
  }
73
77
  };
@@ -85,8 +85,16 @@ export class Root extends React.Component {
85
85
  preserveAspectRatio = {},
86
86
  maxImageWidth = {},
87
87
  maxImageHeight = {},
88
+ withRubric
88
89
  } = configuration || {};
89
- const { teacherInstructionsEnabled, promptEnabled, rationaleEnabled, spellCheckEnabled, errors } = model || {};
90
+ const {
91
+ teacherInstructionsEnabled,
92
+ promptEnabled,
93
+ rationaleEnabled,
94
+ spellCheckEnabled,
95
+ errors,
96
+ rubricEnabled
97
+ } = model || {};
90
98
  const { shapesError, selectionsError } = errors || {};
91
99
  const toolbarOpts = {};
92
100
 
@@ -128,6 +136,7 @@ export class Root extends React.Component {
128
136
  rationaleEnabled: rationale.settings && toggle(rationale.label),
129
137
  spellCheckEnabled:
130
138
  spellCheck.settings && toggle(spellCheck.label),
139
+ rubricEnabled: withRubric.settings && toggle(withRubric.label)
131
140
  }
132
141
  }}
133
142
  />
@@ -146,6 +155,7 @@ export class Root extends React.Component {
146
155
  maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}
147
156
  maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}
148
157
  uploadSoundSupport={uploadSoundSupport}
158
+ languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
149
159
  />
150
160
  </InputContainer>
151
161
  )}
@@ -161,6 +171,7 @@ export class Root extends React.Component {
161
171
  maxImageWidth={defaultImageMaxWidth}
162
172
  maxImageHeight={defaultImageMaxHeight}
163
173
  uploadSoundSupport={uploadSoundSupport}
174
+ languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
164
175
  />
165
176
  </InputContainer>
166
177
  )}
@@ -179,6 +190,7 @@ export class Root extends React.Component {
179
190
  maxImageWidth={maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth}
180
191
  maxImageHeight={maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight}
181
192
  uploadSoundSupport={uploadSoundSupport}
193
+ languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
182
194
  />
183
195
  </InputContainer>
184
196
  )}
@@ -140,6 +140,22 @@
140
140
  }
141
141
  }
142
142
  },
143
+ "withRubric": {
144
+ "title": "ConfigureProp",
145
+ "type": "object",
146
+ "properties": {
147
+ "settings": {
148
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
149
+ "type": "boolean",
150
+ "title": "settings"
151
+ },
152
+ "label": {
153
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
154
+ "type": "string",
155
+ "title": "label"
156
+ }
157
+ }
158
+ },
143
159
  "showPrompt": {
144
160
  "description": "Determines whether prompt field will be displayed or not",
145
161
  "default": true,
@@ -106,6 +106,18 @@ Indicates the max dimension for images in prompt - this is also the default dime
106
106
 
107
107
  Indicates the max dimension for images in rationale
108
108
 
109
+ # `withRubric` (object)
110
+
111
+ Properties of the `withRubric` object:
112
+
113
+ ## `settings` (boolean)
114
+
115
+ Indicates if the item has to be displayed in the Settings Panel
116
+
117
+ ## `label` (string)
118
+
119
+ Indicates the label for the item that has to be displayed in the Settings Panel
120
+
109
121
  # `showPrompt` (boolean)
110
122
 
111
123
  Determines whether prompt field will be displayed or not
@@ -65,4 +65,5 @@ exports.model = (id, element) => ({
65
65
  teacherInstructions: null,
66
66
  toolbarEditorPosition: 'bottom',
67
67
  prompt: '<div><audio controls="controls" src="https://storage.googleapis.com/pie-prod-221718-assets/audio/77f3f61e-5f2d-425f-80a5-fb814dfa5e4c"></audio><br><br>Choose ALL of the words with the long /o/ sound.</div>',
68
+ rubricEnabled: false
68
69
  });
@@ -225,6 +225,11 @@
225
225
  "type": "string",
226
226
  "title": "toolbarEditorPosition"
227
227
  },
228
+ "rubricEnabled": {
229
+ "description": "Indicates if Rubric is enabled",
230
+ "type": "boolean",
231
+ "title": "rubricEnabled"
232
+ },
228
233
  "id": {
229
234
  "description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
230
235
  "type": "string",
@@ -243,6 +248,7 @@
243
248
  "multipleCorrect",
244
249
  "partialScoring",
245
250
  "rationaleEnabled",
251
+ "rubricEnabled",
246
252
  "shapes",
247
253
  "spellCheckEnabled",
248
254
  "strokeWidth",
@@ -161,6 +161,10 @@ This element must be one of the following enum values:
161
161
 
162
162
  Default: `": 'bottom'"`
163
163
 
164
+ # `rubricEnabled` (boolean, required)
165
+
166
+ Indicates if Rubric is enabled
167
+
164
168
  # `id` (string, required)
165
169
 
166
170
  Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "5.2.5",
3
+ "version": "5.3.0",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "pie framework developers",
23
23
  "license": "ISC",
24
- "gitHead": "f60d1edac928da4682a9789000e3c8cf464348c0",
24
+ "gitHead": "2d74cf6e1f9ad7921efc46779c0e5028d787b9d3",
25
25
  "scripts": {
26
26
  "postpublish": "../../scripts/postpublish"
27
27
  },