@pie-element/hotspot 6.10.1-next.5 → 6.11.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,27 @@
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.11.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@6.10.0...@pie-element/hotspot@6.11.0) (2024-03-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Renamed the html prop to the correct math prop PD-3527 ([28061b6](https://github.com/pie-framework/pie-elements/commit/28061b6032817dae15837131d8a0bf5a08683b10))
12
+ * updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
13
+
14
+
15
+ ### Features
16
+
17
+ * Add configuration for custom buttons PD-3520 ([a7a7ace](https://github.com/pie-framework/pie-elements/commit/a7a7ace27eaac47c9a0f172f7ae0440c6dc4e600))
18
+ * Add configuration for custom buttons PD-3527 ([45a32bd](https://github.com/pie-framework/pie-elements/commit/45a32bd8e9d7bd33beca74cc10c7dd973a9f9dbc))
19
+ * Replace math-rendering package with math-rendering-accessible-package for accessibility PD-1870 ([b6cdee8](https://github.com/pie-framework/pie-elements/commit/b6cdee8915b06e4c11b002b10437db07ce966501))
20
+ * updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
21
+ * use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
22
+
23
+
24
+
25
+
26
+
6
27
  # [6.10.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@6.9.1...@pie-element/hotspot@6.10.0) (2024-03-15)
7
28
 
8
29
 
@@ -3,6 +3,24 @@
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.11.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@6.10.0...@pie-element/hotspot-configure@6.11.0) (2024-03-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
12
+
13
+
14
+ ### Features
15
+
16
+ * Add configuration for custom buttons PD-3520 ([a7a7ace](https://github.com/pie-framework/pie-elements/commit/a7a7ace27eaac47c9a0f172f7ae0440c6dc4e600))
17
+ * updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
18
+ * use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
19
+
20
+
21
+
22
+
23
+
6
24
  # [6.10.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@6.9.1...@pie-element/hotspot-configure@6.10.0) (2024-03-15)
7
25
 
8
26
 
@@ -185,8 +185,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
185
185
  rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
186
186
  };
187
187
 
188
- var getPluginProps = function getPluginProps(props) {
189
- return Object.assign(_objectSpread({}, baseInputConfiguration), props || {});
188
+ var getPluginProps = function getPluginProps() {
189
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
190
+ return _objectSpread(_objectSpread({}, baseInputConfiguration), props);
190
191
  };
191
192
 
192
193
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","dropdown","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","baseInputConfiguration","contentDimensions","maxImageWidth","maxImageHeight","multipleCorrect","partialScoring","prompt","rationale","settingsPanelDisabled","spellCheck","teacherInstructions","withRubric","mathMlOptions","language","languageChoices","errors","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","shapesError","selectionsError","validationMessage","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","options","panelProperties","rubricEnabled","getPluginProps","Object","assign","Settings","Properties","promptContainer","inputConfiguration","flexContainer","subheading","tooltip","hotspotColor","hotspotList","outlineColor","outlineList","handleColorChange","imageUrl","strokeWidth","add","errorText","width","e","handleOnUpdateImageDimensions","field","height","React","Component","styles","theme","display","marginBottom","spacing","unit","flex","paddingTop","marginRight","alignItems","fontSize","typography","whiteSpace","maxWidth","palette","error","main","propTypes","PropTypes","object","isRequired","shape","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAAeC,MAAf;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;IAEaC,I;;;;;;;;;;;;;;;0GACS,UAACC,SAAD,EAAYC,KAAZ,EAAsB;AACxC,UAAQC,cAAR,GAA2B,MAAKC,KAAhC,CAAQD,cAAR;AACA,UAAME,KAAK,aAAMJ,SAAN,UAAX;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B,cAAQJ,sBAAUI;AAFU,GAAhB,CAJC;AAQfxF,EAAAA,kBAAkB,EAAEoF,sBAAUG,KAAV,CAAgB;AAClC9B,IAAAA,GAAG,EAAE2B,sBAAUI,IADmB;AAElC,cAAQJ,sBAAUI;AAFgB,GAAhB,CARL;AAYftF,EAAAA,aAAa,EAAEkF,sBAAUI,IAAV,CAAeF,UAZf;AAafzG,EAAAA,cAAc,EAAEuG,sBAAUI,IAAV,CAAeF,UAbhB;AAcflF,EAAAA,eAAe,EAAEgF,sBAAUI,IAAV,CAAeF,UAdjB;AAef/F,EAAAA,sBAAsB,EAAE6F,sBAAUI,IAAV,CAAeF,UAfxB;AAgBf9F,EAAAA,cAAc,EAAE4F,sBAAUI,IAAV,CAAeF,UAhBhB;AAiBfnF,EAAAA,sBAAsB,EAAEiF,sBAAUI,IAAV,CAAeF,UAjBxB;AAkBfjF,EAAAA,kBAAkB,EAAE+E,sBAAUI,IAAV,CAAeF,UAlBpB;AAmBfrF,EAAAA,sBAAsB,EAAEmF,sBAAUI,IAAV,CAAeF,UAnBxB;AAoBfhF,EAAAA,4BAA4B,EAAE8E,sBAAUI,IAAV,CAAeF;AApB9B,CAAjB;;eAuBe,wBAAWpB,MAAX,EAAmBxF,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer, NumberTextField } from '@pie-lib/pie-toolbox/config-ui';\nimport PropTypes from 'prop-types';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/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 { updateImageDimensions, generateValidationMessage, getUpdatedShapes, getAllShapes, groupShapes } from './utils';\n\nconst { Panel, toggle, dropdown } = 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 baseInputConfiguration = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n multipleCorrect = {},\n partialScoring = {},\n preserveAspectRatio = {},\n prompt = {},\n rationale = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n } = configuration || {};\n const {\n errors,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n const { shapesError, selectionsError } = errors || {};\n const validationMessage = generateValidationMessage(configuration);\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n multipleCorrect: multipleCorrect.settings && toggle(multipleCorrect.label),\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChangedByConfig}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\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 mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n <div className={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\n <HotspotPalette\n hotspotColor={model.hotspotColor}\n hotspotList={model.hotspotList}\n outlineColor={model.outlineColor}\n outlineList={model.outlineList}\n onHotspotColorChange={(color) => this.handleColorChange('hotspot', color)}\n onOutlineColorChange={(color) => this.handleColorChange('outline', color)}\n />\n\n <HotspotContainer\n dimensions={model.dimensions}\n imageUrl={model.imageUrl}\n multipleCorrect={model.multipleCorrect}\n hasErrors={!!shapesError || !!selectionsError}\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 insertImage={imageSupport && imageSupport.add}\n />\n {shapesError && <div className={classes.errorText}>{shapesError}</div>}\n {selectionsError && <div className={classes.errorText}>{selectionsError}</div>}\n\n {model.imageUrl && (\n <React.Fragment>\n <Typography variant=\"subheading\">Image Dimensions</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\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 </React.Fragment>\n )}\n\n {rationaleEnabled && (\n <InputContainer label={rationale.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={onRationaleChanged}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\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 mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n dimensions: {\n display: 'flex',\n marginBottom: theme.spacing.unit * 1.5,\n },\n field: {\n flex: 1,\n width: '90%',\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n subheading: {\n marginRight: theme.spacing.unit,\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\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","dropdown","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","baseInputConfiguration","contentDimensions","maxImageWidth","maxImageHeight","multipleCorrect","partialScoring","prompt","rationale","settingsPanelDisabled","spellCheck","teacherInstructions","withRubric","mathMlOptions","language","languageChoices","errors","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","shapesError","selectionsError","validationMessage","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","options","panelProperties","rubricEnabled","getPluginProps","Settings","Properties","promptContainer","inputConfiguration","flexContainer","subheading","tooltip","hotspotColor","hotspotList","outlineColor","outlineList","handleColorChange","imageUrl","strokeWidth","add","errorText","width","e","handleOnUpdateImageDimensions","field","height","React","Component","styles","theme","display","marginBottom","spacing","unit","flex","paddingTop","marginRight","alignItems","fontSize","typography","whiteSpace","maxWidth","palette","error","main","propTypes","PropTypes","object","isRequired","shape","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAA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X;AAEf/F,EAAAA,aAAa,EAAE6F,sBAAUC,MAFV;AAGfjG,EAAAA,KAAK,EAAEgG,sBAAUC,MAAV,CAAiBC,UAHT;AAIfrF,EAAAA,YAAY,EAAEmF,sBAAUG,KAAV,CAAgB;AAC5B9B,IAAAA,GAAG,EAAE2B,sBAAUI,IADa;AAE5B,cAAQJ,sBAAUI;AAFU,GAAhB,CAJC;AAQftF,EAAAA,kBAAkB,EAAEkF,sBAAUG,KAAV,CAAgB;AAClC9B,IAAAA,GAAG,EAAE2B,sBAAUI,IADmB;AAElC,cAAQJ,sBAAUI;AAFgB,GAAhB,CARL;AAYfpF,EAAAA,aAAa,EAAEgF,sBAAUI,IAAV,CAAeF,UAZf;AAafvG,EAAAA,cAAc,EAAEqG,sBAAUI,IAAV,CAAeF,UAbhB;AAcfhF,EAAAA,eAAe,EAAE8E,sBAAUI,IAAV,CAAeF,UAdjB;AAef7F,EAAAA,sBAAsB,EAAE2F,sBAAUI,IAAV,CAAeF,UAfxB;AAgBf5F,EAAAA,cAAc,EAAE0F,sBAAUI,IAAV,CAAeF,UAhBhB;AAiBfjF,EAAAA,sBAAsB,EAAE+E,sBAAUI,IAAV,CAAeF,UAjBxB;AAkBf/E,EAAAA,kBAAkB,EAAE6E,sBAAUI,IAAV,CAAeF,UAlBpB;AAmBfnF,EAAAA,sBAAsB,EAAEiF,sBAAUI,IAAV,CAAeF,UAnBxB;AAoBf9E,EAAAA,4BAA4B,EAAE4E,sBAAUI,IAAV,CAAeF;AApB9B,CAAjB;;eAuBe,wBAAWpB,MAAX,EAAmBtF,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer, NumberTextField } from '@pie-lib/pie-toolbox/config-ui';\nimport PropTypes from 'prop-types';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/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 { updateImageDimensions, generateValidationMessage, getUpdatedShapes, getAllShapes, groupShapes } from './utils';\n\nconst { Panel, toggle, dropdown } = 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 baseInputConfiguration = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n multipleCorrect = {},\n partialScoring = {},\n preserveAspectRatio = {},\n prompt = {},\n rationale = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n } = configuration || {};\n const {\n errors,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n const { shapesError, selectionsError } = errors || {};\n const validationMessage = generateValidationMessage(configuration);\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n multipleCorrect: multipleCorrect.settings && toggle(multipleCorrect.label),\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChangedByConfig}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\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 mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n <div className={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\n <HotspotPalette\n hotspotColor={model.hotspotColor}\n hotspotList={model.hotspotList}\n outlineColor={model.outlineColor}\n outlineList={model.outlineList}\n onHotspotColorChange={(color) => this.handleColorChange('hotspot', color)}\n onOutlineColorChange={(color) => this.handleColorChange('outline', color)}\n />\n\n <HotspotContainer\n dimensions={model.dimensions}\n imageUrl={model.imageUrl}\n multipleCorrect={model.multipleCorrect}\n hasErrors={!!shapesError || !!selectionsError}\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 insertImage={imageSupport && imageSupport.add}\n />\n {shapesError && <div className={classes.errorText}>{shapesError}</div>}\n {selectionsError && <div className={classes.errorText}>{selectionsError}</div>}\n\n {model.imageUrl && (\n <React.Fragment>\n <Typography variant=\"subheading\">Image Dimensions</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\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 </React.Fragment>\n )}\n\n {rationaleEnabled && (\n <InputContainer label={rationale.label} className={classes.promptContainer}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={onRationaleChanged}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\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 mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n dimensions: {\n display: 'flex',\n marginBottom: theme.spacing.unit * 1.5,\n },\n field: {\n flex: 1,\n width: '90%',\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n subheading: {\n marginRight: theme.spacing.unit,\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\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": "6.10.0",
4
+ "version": "6.11.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/pie-toolbox": "1.9.0",
13
+ "@pie-lib/pie-toolbox": "1.11.1",
14
14
  "classnames": "^2.2.6",
15
15
  "debug": "^3.1.0",
16
16
  "konva": "^3.2.4",
@@ -113,14 +113,10 @@ export class Root extends React.Component {
113
113
  rubricEnabled: withRubric?.settings && toggle(withRubric?.label),
114
114
  };
115
115
 
116
- const getPluginProps = (props) => {
117
- return Object.assign(
118
- {
119
- ...baseInputConfiguration,
120
- },
121
- props || {},
122
- );
123
- };
116
+ const getPluginProps = (props = {}) => ({
117
+ ...baseInputConfiguration,
118
+ ...props,
119
+ });
124
120
 
125
121
  return (
126
122
  <layout.ConfigLayout
@@ -3,6 +3,23 @@
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.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-controller@4.5.0...@pie-element/hotspot-controller@4.6.0) (2024-03-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
12
+
13
+
14
+ ### Features
15
+
16
+ * updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
17
+ * use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
18
+
19
+
20
+
21
+
22
+
6
23
  # [4.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-controller@4.4.2...@pie-element/hotspot-controller@4.5.0) (2024-03-15)
7
24
 
8
25
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-controller",
3
3
  "private": true,
4
- "version": "4.5.0",
4
+ "version": "4.6.0",
5
5
  "description": "",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,7 +11,7 @@
11
11
  "main": "lib/index.js",
12
12
  "module": "src/index.js",
13
13
  "dependencies": {
14
- "@pie-lib/pie-toolbox": "1.9.0",
14
+ "@pie-lib/pie-toolbox": "1.11.1",
15
15
  "debug": "^4.1.1",
16
16
  "lodash": "^4.17.15"
17
17
  }
@@ -7,6 +7,17 @@
7
7
  "title": "EditableHtmlConfigureProp",
8
8
  "type": "object",
9
9
  "properties": {
10
+ "math": {
11
+ "title": "EditableHtmlButtonConfigure",
12
+ "type": "object",
13
+ "properties": {
14
+ "disabled": {
15
+ "description": "Indicates if the plugin is disabled or not",
16
+ "type": "boolean",
17
+ "title": "disabled"
18
+ }
19
+ }
20
+ },
10
21
  "audio": {
11
22
  "title": "EditableHtmlButtonConfigure",
12
23
  "type": "object",
@@ -82,6 +93,17 @@
82
93
  "title": "EditableHtmlConfigureProp",
83
94
  "type": "object",
84
95
  "properties": {
96
+ "math": {
97
+ "title": "EditableHtmlButtonConfigure",
98
+ "type": "object",
99
+ "properties": {
100
+ "disabled": {
101
+ "description": "Indicates if the plugin is disabled or not",
102
+ "type": "boolean",
103
+ "title": "disabled"
104
+ }
105
+ }
106
+ },
85
107
  "audio": {
86
108
  "title": "EditableHtmlButtonConfigure",
87
109
  "type": "object",
@@ -137,6 +159,17 @@
137
159
  "title": "EditableHtmlConfigureProp",
138
160
  "type": "object",
139
161
  "properties": {
162
+ "math": {
163
+ "title": "EditableHtmlButtonConfigure",
164
+ "type": "object",
165
+ "properties": {
166
+ "disabled": {
167
+ "description": "Indicates if the plugin is disabled or not",
168
+ "type": "boolean",
169
+ "title": "disabled"
170
+ }
171
+ }
172
+ },
140
173
  "audio": {
141
174
  "title": "EditableHtmlButtonConfigure",
142
175
  "type": "object",
@@ -192,6 +225,17 @@
192
225
  "title": "EditableHtmlConfigureProp",
193
226
  "type": "object",
194
227
  "properties": {
228
+ "math": {
229
+ "title": "EditableHtmlButtonConfigure",
230
+ "type": "object",
231
+ "properties": {
232
+ "disabled": {
233
+ "description": "Indicates if the plugin is disabled or not",
234
+ "type": "boolean",
235
+ "title": "disabled"
236
+ }
237
+ }
238
+ },
195
239
  "audio": {
196
240
  "title": "EditableHtmlButtonConfigure",
197
241
  "type": "object",
@@ -493,6 +537,17 @@
493
537
  "title": "EditableHtmlConfigureProp",
494
538
  "type": "object",
495
539
  "properties": {
540
+ "math": {
541
+ "title": "EditableHtmlButtonConfigure",
542
+ "type": "object",
543
+ "properties": {
544
+ "disabled": {
545
+ "description": "Indicates if the plugin is disabled or not",
546
+ "type": "boolean",
547
+ "title": "disabled"
548
+ }
549
+ }
550
+ },
496
551
  "audio": {
497
552
  "title": "EditableHtmlButtonConfigure",
498
553
  "type": "object",
@@ -563,6 +618,17 @@
563
618
  "title": "EditableHtmlConfigureProp",
564
619
  "type": "object",
565
620
  "properties": {
621
+ "math": {
622
+ "title": "EditableHtmlButtonConfigure",
623
+ "type": "object",
624
+ "properties": {
625
+ "disabled": {
626
+ "description": "Indicates if the plugin is disabled or not",
627
+ "type": "boolean",
628
+ "title": "disabled"
629
+ }
630
+ }
631
+ },
566
632
  "audio": {
567
633
  "title": "EditableHtmlButtonConfigure",
568
634
  "type": "object",
@@ -6,6 +6,14 @@ The schema defines the following properties:
6
6
 
7
7
  Properties of the `baseInputConfiguration` object:
8
8
 
9
+ ## `math` (object)
10
+
11
+ Properties of the `math` object:
12
+
13
+ ### `disabled` (boolean)
14
+
15
+ Indicates if the plugin is disabled or not
16
+
9
17
  ## `audio` (object)
10
18
 
11
19
  Properties of the `audio` object:
@@ -62,6 +70,14 @@ Properties of the `rationale` object:
62
70
 
63
71
  Properties of the `inputConfiguration` object:
64
72
 
73
+ ### `math` (object)
74
+
75
+ Properties of the `math` object:
76
+
77
+ #### `disabled` (boolean)
78
+
79
+ Indicates if the plugin is disabled or not
80
+
65
81
  ### `audio` (object)
66
82
 
67
83
  Properties of the `audio` object:
@@ -102,6 +118,14 @@ Properties of the `prompt` object:
102
118
 
103
119
  Properties of the `inputConfiguration` object:
104
120
 
121
+ ### `math` (object)
122
+
123
+ Properties of the `math` object:
124
+
125
+ #### `disabled` (boolean)
126
+
127
+ Indicates if the plugin is disabled or not
128
+
105
129
  ### `audio` (object)
106
130
 
107
131
  Properties of the `audio` object:
@@ -142,6 +166,14 @@ Properties of the `teacherInstructions` object:
142
166
 
143
167
  Properties of the `inputConfiguration` object:
144
168
 
169
+ ### `math` (object)
170
+
171
+ Properties of the `math` object:
172
+
173
+ #### `disabled` (boolean)
174
+
175
+ Indicates if the plugin is disabled or not
176
+
145
177
  ### `audio` (object)
146
178
 
147
179
  Properties of the `audio` object:
@@ -372,6 +404,14 @@ The schema defines the following additional types:
372
404
 
373
405
  Properties of the `EditableHtmlConfigureProp` object:
374
406
 
407
+ ### `math` (object)
408
+
409
+ Properties of the `math` object:
410
+
411
+ #### `disabled` (boolean)
412
+
413
+ Indicates if the plugin is disabled or not
414
+
375
415
  ### `audio` (object)
376
416
 
377
417
  Properties of the `audio` object:
@@ -424,6 +464,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
424
464
 
425
465
  Properties of the `inputConfiguration` object:
426
466
 
467
+ #### `math` (object)
468
+
469
+ Properties of the `math` object:
470
+
471
+ ##### `disabled` (boolean)
472
+
473
+ Indicates if the plugin is disabled or not
474
+
427
475
  #### `audio` (object)
428
476
 
429
477
  Properties of the `audio` object:
@@ -265,6 +265,17 @@
265
265
  "title": "EditableHtmlConfigureProp",
266
266
  "type": "object",
267
267
  "properties": {
268
+ "math": {
269
+ "title": "EditableHtmlButtonConfigure",
270
+ "type": "object",
271
+ "properties": {
272
+ "disabled": {
273
+ "description": "Indicates if the plugin is disabled or not",
274
+ "type": "boolean",
275
+ "title": "disabled"
276
+ }
277
+ }
278
+ },
268
279
  "audio": {
269
280
  "title": "EditableHtmlButtonConfigure",
270
281
  "type": "object",
@@ -335,6 +346,17 @@
335
346
  "title": "EditableHtmlConfigureProp",
336
347
  "type": "object",
337
348
  "properties": {
349
+ "math": {
350
+ "title": "EditableHtmlButtonConfigure",
351
+ "type": "object",
352
+ "properties": {
353
+ "disabled": {
354
+ "description": "Indicates if the plugin is disabled or not",
355
+ "type": "boolean",
356
+ "title": "disabled"
357
+ }
358
+ }
359
+ },
338
360
  "audio": {
339
361
  "title": "EditableHtmlButtonConfigure",
340
362
  "type": "object",
@@ -188,6 +188,14 @@ The schema defines the following additional types:
188
188
 
189
189
  Properties of the `EditableHtmlConfigureProp` object:
190
190
 
191
+ ### `math` (object)
192
+
193
+ Properties of the `math` object:
194
+
195
+ #### `disabled` (boolean)
196
+
197
+ Indicates if the plugin is disabled or not
198
+
191
199
  ### `audio` (object)
192
200
 
193
201
  Properties of the `audio` object:
@@ -240,6 +248,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
240
248
 
241
249
  Properties of the `inputConfiguration` object:
242
250
 
251
+ #### `math` (object)
252
+
253
+ Properties of the `math` object:
254
+
255
+ ##### `disabled` (boolean)
256
+
257
+ Indicates if the plugin is disabled or not
258
+
243
259
  #### `audio` (object)
244
260
 
245
261
  Properties of the `audio` object:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "6.10.1-next.5+39f4e49a2",
3
+ "version": "6.11.0",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/pie-toolbox": "1.9.0",
12
+ "@pie-lib/pie-toolbox": "1.11.1",
13
13
  "konva": "^3.2.5",
14
14
  "prop-types": "^15.6.1",
15
15
  "react": "^16.8.1",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "author": "pie framework developers",
20
20
  "license": "ISC",
21
- "gitHead": "39f4e49a21cc2c873345e9a96922166f606f48ae",
21
+ "gitHead": "229e10aa53659f55129b8a4e27dbfc76939e214b",
22
22
  "scripts": {
23
23
  "postpublish": "../../scripts/postpublish"
24
24
  },