@pie-element/drawing-response 7.6.1-next.9 → 7.7.1-next.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 +21 -0
- package/configure/CHANGELOG.md +18 -0
- package/configure/lib/root.js +3 -2
- package/configure/lib/root.js.map +1 -1
- package/configure/package.json +2 -2
- package/configure/src/root.jsx +4 -8
- package/docs/config-schema.json +55 -0
- package/docs/config-schema.json.md +40 -0
- package/docs/pie-schema.json +22 -0
- package/docs/pie-schema.json.md +16 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.js +1 -1
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
|
+
# [7.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@7.6.0...@pie-element/drawing-response@7.7.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
|
# [7.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@7.5.1...@pie-element/drawing-response@7.6.0) (2024-03-15)
|
|
7
28
|
|
|
8
29
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -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
|
+
# [7.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@7.6.0...@pie-element/drawing-response-configure@7.7.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
|
# [7.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@7.5.1...@pie-element/drawing-response-configure@7.6.0) (2024-03-15)
|
|
7
25
|
|
|
8
26
|
|
package/configure/lib/root.js
CHANGED
|
@@ -163,8 +163,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
|
|
|
163
163
|
rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
var getPluginProps = function getPluginProps(
|
|
167
|
-
|
|
166
|
+
var getPluginProps = function getPluginProps() {
|
|
167
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
168
|
+
return _objectSpread(_objectSpread({}, baseInputConfiguration), props);
|
|
168
169
|
};
|
|
169
170
|
|
|
170
171
|
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","dropdown","Root","prompt","props","model","onModelChanged","update","teacherInstructions","dimensions","imageDimensions","imageUrl","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","baseInputConfiguration","backgroundImage","contentDimensions","maxImageWidth","maxImageHeight","settingsPanelDisabled","spellCheck","withRubric","language","languageChoices","mathMlOptions","backgroundImageEnabled","promptEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","enabled","options","panelProperties","rubricEnabled","getPluginProps","Object","assign","Settings","Properties","promptHolder","onTeacherInstructionsChanged","inputConfiguration","onPromptChanged","onUpdateImageDimension","onImageUpload","React","Component","styles","theme","paddingTop","spacing","unit","marginBottom","width","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAAeC,MAAf;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;IAEaC,I;;;;;;;;;;;;;;;wGACO,UAACC,MAAD,EAAY;AAC5B,wBAAkC,MAAKC,KAAvC;AAAA,UAAQC,KAAR,eAAQA,KAAR;AAAA,UAAeC,cAAf,eAAeA,cAAf;AACA,UAAMC,MAAM,GAAG,2BAAUF,KAAV,CAAf;AAEAC,MAAAA,cAAc,iCAAMC,MAAN;AAAcJ,QAAAA,MAAM,EAANA;AAAd,SAAd;AACD,K;qHAE8B,UAACK,mBAAD,EAAyB;AACtD,yBAAkC,MAAKJ,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCAAMD,KAAN;AAAaG,QAAAA,mBAAmB,EAAnBA;AAAb,SAAd;AACD,K;+GAEwB,UAACC,UAAD,EAAgB;AACvC,yBAAkC,MAAKL,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCAAMD,KAAN;AAAaK,QAAAA,eAAe,EAAED;AAA9B,SAAd;AACD,K;sGAEe,UAACE,QAAD,EAAc;AAC5B,yBAAkC,MAAKP,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCAAMD,KAAN;AAAaM,QAAAA,QAAQ,EAARA;AAAb,SAAd;AACD,K;;;;;;WAED,kBAAS;AACP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,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAFvB;AAGZE,MAAAA,KAAK,EAAE;AAHK;AADW,GAAZ;AAAA,CAAf;;AAQA5D,IAAI,CAAC6D,SAAL,GAAiB;AACfnD,EAAAA,OAAO,EAAEoD,sBAAUC,MAAV,CAAiBC,UADX;AAEfrD,EAAAA,aAAa,EAAEmD,sBAAUC,MAFV;AAGf5D,EAAAA,KAAK,EAAE2D,sBAAUC,MAAV,CAAiBC,UAHT;AAIfpD,EAAAA,YAAY,EAAEkD,sBAAUG,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEJ,sBAAUK,IADa;AAE5B,cAAQL,sBAAUK;AAFU,GAAhB,CAJC;AAQfrD,EAAAA,kBAAkB,EAAEgD,sBAAUG,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEJ,sBAAUK,IADmB;AAElC,cAAQL,sBAAUK;AAFgB,GAAhB,CARL;AAYf/D,EAAAA,cAAc,EAAE0D,sBAAUK,IAAV,CAAeH,UAZhB;AAafnD,EAAAA,sBAAsB,EAAEiD,sBAAUK,IAAV,CAAeH;AAbxB,CAAjB;;eAgBe,wBAAWV,MAAX,EAAmBtD,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport PropTypes from 'prop-types';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport ImageContainer from './image-container';\nimport cloneDeep from 'lodash/cloneDeep';\n\nconst { Panel, toggle, dropdown } = settings;\n\nexport class Root extends React.Component {\n onPromptChanged = (prompt) => {\n const { model, onModelChanged } = this.props;\n const update = cloneDeep(model);\n\n onModelChanged({ ...update, prompt });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, teacherInstructions });\n };\n\n onUpdateImageDimension = (dimensions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, imageDimensions: dimensions });\n };\n\n onImageUpload = (imageUrl) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, imageUrl });\n };\n\n render() {\n const { classes, configuration, imageSupport, model, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n baseInputConfiguration = {},\n backgroundImage = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n prompt = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n language = {},\n languageChoices = {},\n mathMlOptions = {},\n } = configuration || {};\n const {\n backgroundImageEnabled,\n promptEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\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 backgroundImageEnabled: backgroundImage.settings && toggle(backgroundImage.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\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.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={onModelChanged}\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.promptHolder}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.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=\"Item Stem\" className={classes.promptHolder}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChanged}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n imageSupport={imageSupport}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n {backgroundImageEnabled && (\n <React.Fragment>\n <Typography variant=\"subheading\">Define Background Image</Typography>\n\n <ImageContainer\n imageUrl={model.imageUrl}\n onUpdateImageDimension={this.onUpdateImageDimension}\n onImageUpload={this.onImageUpload}\n imageDimensions={model.imageDimensions}\n />\n </React.Fragment>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n promptHolder: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\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 onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: 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","prompt","props","model","onModelChanged","update","teacherInstructions","dimensions","imageDimensions","imageUrl","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","baseInputConfiguration","backgroundImage","contentDimensions","maxImageWidth","maxImageHeight","settingsPanelDisabled","spellCheck","withRubric","language","languageChoices","mathMlOptions","backgroundImageEnabled","promptEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","label","enabled","options","panelProperties","rubricEnabled","getPluginProps","Settings","Properties","promptHolder","onTeacherInstructionsChanged","inputConfiguration","onPromptChanged","onUpdateImageDimension","onImageUpload","React","Component","styles","theme","paddingTop","spacing","unit","marginBottom","width","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAAeC,MAAf;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;IAEaC,I;;;;;;;;;;;;;;;wGACO,UAACC,MAAD,EAAY;AAC5B,wBAAkC,MAAKC,KAAvC;AAAA,UAAQC,KAAR,eAAQA,KAAR;AAAA,UAAeC,cAAf,eAAeA,cAAf;AACA,UAAMC,MAAM,GAAG,2BAAUF,KAAV,CAAf;AAEAC,MAAAA,cAAc,iCAAMC,MAAN;AAAcJ,QAAAA,MAAM,EAANA;AAAd,SAAd;AACD,K;qHAE8B,UAACK,mBAAD,EAAyB;A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AA,sBAAsB,EAAE+C,sBAAUK,IAAV,CAAeH;AAbxB,CAAjB;;eAgBe,wBAAWV,MAAX,EAAmBpD,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport PropTypes from 'prop-types';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport ImageContainer from './image-container';\nimport cloneDeep from 'lodash/cloneDeep';\n\nconst { Panel, toggle, dropdown } = settings;\n\nexport class Root extends React.Component {\n onPromptChanged = (prompt) => {\n const { model, onModelChanged } = this.props;\n const update = cloneDeep(model);\n\n onModelChanged({ ...update, prompt });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, teacherInstructions });\n };\n\n onUpdateImageDimension = (dimensions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, imageDimensions: dimensions });\n };\n\n onImageUpload = (imageUrl) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, imageUrl });\n };\n\n render() {\n const { classes, configuration, imageSupport, model, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n baseInputConfiguration = {},\n backgroundImage = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n prompt = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n language = {},\n languageChoices = {},\n mathMlOptions = {},\n } = configuration || {};\n const {\n backgroundImageEnabled,\n promptEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\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 backgroundImageEnabled: backgroundImage.settings && toggle(backgroundImage.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\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.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={onModelChanged}\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.promptHolder}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.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=\"Item Stem\" className={classes.promptHolder}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChanged}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n imageSupport={imageSupport}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n {backgroundImageEnabled && (\n <React.Fragment>\n <Typography variant=\"subheading\">Define Background Image</Typography>\n\n <ImageContainer\n imageUrl={model.imageUrl}\n onUpdateImageDimension={this.onUpdateImageDimension}\n onImageUpload={this.onImageUpload}\n imageDimensions={model.imageDimensions}\n />\n </React.Fragment>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n promptHolder: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\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 onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/drawing-response-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.7.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
11
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
12
|
-
"@pie-lib/pie-toolbox": "1.
|
|
12
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
14
14
|
"debug": "^3.1.0",
|
|
15
15
|
"lodash": "^4.17.15",
|
package/configure/src/root.jsx
CHANGED
|
@@ -82,14 +82,10 @@ export class Root extends React.Component {
|
|
|
82
82
|
rubricEnabled: withRubric?.settings && toggle(withRubric?.label),
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
const getPluginProps = (props) => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
props || {},
|
|
91
|
-
);
|
|
92
|
-
};
|
|
85
|
+
const getPluginProps = (props = {}) => ({
|
|
86
|
+
...baseInputConfiguration,
|
|
87
|
+
...props,
|
|
88
|
+
});
|
|
93
89
|
|
|
94
90
|
return (
|
|
95
91
|
<layout.ConfigLayout
|
package/docs/config-schema.json
CHANGED
|
@@ -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",
|
|
@@ -124,6 +135,17 @@
|
|
|
124
135
|
"title": "EditableHtmlConfigureProp",
|
|
125
136
|
"type": "object",
|
|
126
137
|
"properties": {
|
|
138
|
+
"math": {
|
|
139
|
+
"title": "EditableHtmlButtonConfigure",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": {
|
|
142
|
+
"disabled": {
|
|
143
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"title": "disabled"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
127
149
|
"audio": {
|
|
128
150
|
"title": "EditableHtmlButtonConfigure",
|
|
129
151
|
"type": "object",
|
|
@@ -179,6 +201,17 @@
|
|
|
179
201
|
"title": "EditableHtmlConfigureProp",
|
|
180
202
|
"type": "object",
|
|
181
203
|
"properties": {
|
|
204
|
+
"math": {
|
|
205
|
+
"title": "EditableHtmlButtonConfigure",
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"disabled": {
|
|
209
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
210
|
+
"type": "boolean",
|
|
211
|
+
"title": "disabled"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
182
215
|
"audio": {
|
|
183
216
|
"title": "EditableHtmlButtonConfigure",
|
|
184
217
|
"type": "object",
|
|
@@ -433,6 +466,17 @@
|
|
|
433
466
|
"title": "EditableHtmlConfigureProp",
|
|
434
467
|
"type": "object",
|
|
435
468
|
"properties": {
|
|
469
|
+
"math": {
|
|
470
|
+
"title": "EditableHtmlButtonConfigure",
|
|
471
|
+
"type": "object",
|
|
472
|
+
"properties": {
|
|
473
|
+
"disabled": {
|
|
474
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
475
|
+
"type": "boolean",
|
|
476
|
+
"title": "disabled"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
436
480
|
"audio": {
|
|
437
481
|
"title": "EditableHtmlButtonConfigure",
|
|
438
482
|
"type": "object",
|
|
@@ -524,6 +568,17 @@
|
|
|
524
568
|
"title": "EditableHtmlConfigureProp",
|
|
525
569
|
"type": "object",
|
|
526
570
|
"properties": {
|
|
571
|
+
"math": {
|
|
572
|
+
"title": "EditableHtmlButtonConfigure",
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"disabled": {
|
|
576
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
577
|
+
"type": "boolean",
|
|
578
|
+
"title": "disabled"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
},
|
|
527
582
|
"audio": {
|
|
528
583
|
"title": "EditableHtmlButtonConfigure",
|
|
529
584
|
"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:
|
|
@@ -95,6 +103,14 @@ Properties of the `teacherInstructions` object:
|
|
|
95
103
|
|
|
96
104
|
Properties of the `inputConfiguration` object:
|
|
97
105
|
|
|
106
|
+
### `math` (object)
|
|
107
|
+
|
|
108
|
+
Properties of the `math` object:
|
|
109
|
+
|
|
110
|
+
#### `disabled` (boolean)
|
|
111
|
+
|
|
112
|
+
Indicates if the plugin is disabled or not
|
|
113
|
+
|
|
98
114
|
### `audio` (object)
|
|
99
115
|
|
|
100
116
|
Properties of the `audio` object:
|
|
@@ -135,6 +151,14 @@ Properties of the `prompt` object:
|
|
|
135
151
|
|
|
136
152
|
Properties of the `inputConfiguration` object:
|
|
137
153
|
|
|
154
|
+
### `math` (object)
|
|
155
|
+
|
|
156
|
+
Properties of the `math` object:
|
|
157
|
+
|
|
158
|
+
#### `disabled` (boolean)
|
|
159
|
+
|
|
160
|
+
Indicates if the plugin is disabled or not
|
|
161
|
+
|
|
138
162
|
### `audio` (object)
|
|
139
163
|
|
|
140
164
|
Properties of the `audio` object:
|
|
@@ -332,6 +356,14 @@ The schema defines the following additional types:
|
|
|
332
356
|
|
|
333
357
|
Properties of the `EditableHtmlConfigureProp` object:
|
|
334
358
|
|
|
359
|
+
### `math` (object)
|
|
360
|
+
|
|
361
|
+
Properties of the `math` object:
|
|
362
|
+
|
|
363
|
+
#### `disabled` (boolean)
|
|
364
|
+
|
|
365
|
+
Indicates if the plugin is disabled or not
|
|
366
|
+
|
|
335
367
|
### `audio` (object)
|
|
336
368
|
|
|
337
369
|
Properties of the `audio` object:
|
|
@@ -401,6 +433,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
|
|
|
401
433
|
|
|
402
434
|
Properties of the `inputConfiguration` object:
|
|
403
435
|
|
|
436
|
+
#### `math` (object)
|
|
437
|
+
|
|
438
|
+
Properties of the `math` object:
|
|
439
|
+
|
|
440
|
+
##### `disabled` (boolean)
|
|
441
|
+
|
|
442
|
+
Indicates if the plugin is disabled or not
|
|
443
|
+
|
|
404
444
|
#### `audio` (object)
|
|
405
445
|
|
|
406
446
|
Properties of the `audio` object:
|
package/docs/pie-schema.json
CHANGED
|
@@ -119,6 +119,17 @@
|
|
|
119
119
|
"title": "EditableHtmlConfigureProp",
|
|
120
120
|
"type": "object",
|
|
121
121
|
"properties": {
|
|
122
|
+
"math": {
|
|
123
|
+
"title": "EditableHtmlButtonConfigure",
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"disabled": {
|
|
127
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"title": "disabled"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
122
133
|
"audio": {
|
|
123
134
|
"title": "EditableHtmlButtonConfigure",
|
|
124
135
|
"type": "object",
|
|
@@ -210,6 +221,17 @@
|
|
|
210
221
|
"title": "EditableHtmlConfigureProp",
|
|
211
222
|
"type": "object",
|
|
212
223
|
"properties": {
|
|
224
|
+
"math": {
|
|
225
|
+
"title": "EditableHtmlButtonConfigure",
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"disabled": {
|
|
229
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"title": "disabled"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
213
235
|
"audio": {
|
|
214
236
|
"title": "EditableHtmlButtonConfigure",
|
|
215
237
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -92,6 +92,14 @@ The schema defines the following additional types:
|
|
|
92
92
|
|
|
93
93
|
Properties of the `EditableHtmlConfigureProp` object:
|
|
94
94
|
|
|
95
|
+
### `math` (object)
|
|
96
|
+
|
|
97
|
+
Properties of the `math` object:
|
|
98
|
+
|
|
99
|
+
#### `disabled` (boolean)
|
|
100
|
+
|
|
101
|
+
Indicates if the plugin is disabled or not
|
|
102
|
+
|
|
95
103
|
### `audio` (object)
|
|
96
104
|
|
|
97
105
|
Properties of the `audio` object:
|
|
@@ -161,6 +169,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
|
|
|
161
169
|
|
|
162
170
|
Properties of the `inputConfiguration` object:
|
|
163
171
|
|
|
172
|
+
#### `math` (object)
|
|
173
|
+
|
|
174
|
+
Properties of the `math` object:
|
|
175
|
+
|
|
176
|
+
##### `disabled` (boolean)
|
|
177
|
+
|
|
178
|
+
Indicates if the plugin is disabled or not
|
|
179
|
+
|
|
164
180
|
#### `audio` (object)
|
|
165
181
|
|
|
166
182
|
Properties of the `audio` object:
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
29
29
|
|
|
30
30
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
|
|
33
33
|
|
|
34
34
|
var _piePlayerEvents = require("@pie-framework/pie-player-events");
|
|
35
35
|
|
|
@@ -106,7 +106,7 @@ var DrawingResponse = /*#__PURE__*/function (_HTMLElement) {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
_reactDom["default"].render(el, this, function () {
|
|
109
|
-
(0,
|
|
109
|
+
(0, _mathRendering.renderMath)(_this2);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["DrawingResponse","update","_session","drawables","texts","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","isComplete","_render","m","_model","ModelSetEvent","s","el","React","createElement","DrawingResponseComponent","model","session","onSessionChange","sessionChanged","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,e;;;;;;;;;;;;;;;uGAYF,UAACC,MAAD,EAAY;AAC3B,YAAKC,QAAL,CAAcC,SAAd,GAA0BF,MAAM,CAACE,SAAjC;AACA,YAAKD,QAAL,CAAcE,KAAd,GAAsBH,MAAM,CAACG,KAA7B;;AAEA,YAAKC,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,MAAKC,UAAL,EAApD,CAAnB;;AAEA,YAAKC,OAAL;AACD,K;;;;;;SAlBD,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;AAEA,WAAKN,aAAL,CAAmB,IAAIQ,8BAAJ,CAAkB,KAAKN,OAAL,CAAaC,WAAb,EAAlB,EAA8C,KAAKC,UAAL,EAA9C,EAAiE,CAAC,CAAC,KAAKG,MAAxE,CAAnB;;AACA,WAAKF,OAAL;AACD;;;WAED,sBAAa;AACX,aAAO,KAAKR,QAAL,KAAkB,CAAC,yBAAQ,KAAKA,QAAL,CAAcC,SAAtB,CAAD,IAAqC,CAAC,yBAAQ,KAAKD,QAAL,CAAcE,KAAtB,CAAxD,CAAP;AACD;;;SAgBD,eAAc;AACZ,aAAO,KAAKF,QAAZ;AACD,K;SAPD,aAAYY,CAAZ,EAAe;AACb,WAAKZ,QAAL,GAAgBY,CAAhB;;AACA,WAAKJ,OAAL;AACD;;;WAMD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAED,mBAAU;AAAA;;AACR,UAAI,KAAKE,MAAL,IAAe,KAAKV,QAAxB,EAAkC;AAChC,YAAMa,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,2BAApB,EAA8C;AACvDC,UAAAA,KAAK,EAAE,KAAKP,MAD2C;AAEvDQ,UAAAA,OAAO,EAAE,KAAKlB,QAFyC;AAGvDmB,UAAAA,eAAe,EAAE,KAAKC;AAHiC,SAA9C,CAAX;;AAMAC,6BAASC,MAAT,CAAgBT,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["DrawingResponse","update","_session","drawables","texts","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","isComplete","_render","m","_model","ModelSetEvent","s","el","React","createElement","DrawingResponseComponent","model","session","onSessionChange","sessionChanged","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,e;;;;;;;;;;;;;;;uGAYF,UAACC,MAAD,EAAY;AAC3B,YAAKC,QAAL,CAAcC,SAAd,GAA0BF,MAAM,CAACE,SAAjC;AACA,YAAKD,QAAL,CAAcE,KAAd,GAAsBH,MAAM,CAACG,KAA7B;;AAEA,YAAKC,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,MAAKC,UAAL,EAApD,CAAnB;;AAEA,YAAKC,OAAL;AACD,K;;;;;;SAlBD,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;AAEA,WAAKN,aAAL,CAAmB,IAAIQ,8BAAJ,CAAkB,KAAKN,OAAL,CAAaC,WAAb,EAAlB,EAA8C,KAAKC,UAAL,EAA9C,EAAiE,CAAC,CAAC,KAAKG,MAAxE,CAAnB;;AACA,WAAKF,OAAL;AACD;;;WAED,sBAAa;AACX,aAAO,KAAKR,QAAL,KAAkB,CAAC,yBAAQ,KAAKA,QAAL,CAAcC,SAAtB,CAAD,IAAqC,CAAC,yBAAQ,KAAKD,QAAL,CAAcE,KAAtB,CAAxD,CAAP;AACD;;;SAgBD,eAAc;AACZ,aAAO,KAAKF,QAAZ;AACD,K;SAPD,aAAYY,CAAZ,EAAe;AACb,WAAKZ,QAAL,GAAgBY,CAAhB;;AACA,WAAKJ,OAAL;AACD;;;WAMD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAED,mBAAU;AAAA;;AACR,UAAI,KAAKE,MAAL,IAAe,KAAKV,QAAxB,EAAkC;AAChC,YAAMa,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,2BAApB,EAA8C;AACvDC,UAAAA,KAAK,EAAE,KAAKP,MAD2C;AAEvDQ,UAAAA,OAAO,EAAE,KAAKlB,QAFyC;AAGvDmB,UAAAA,eAAe,EAAE,KAAKC;AAHiC,SAA9C,CAAX;;AAMAC,6BAASC,MAAT,CAAgBT,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDA9C0CU,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport isEmpty from 'lodash/isEmpty';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\n\nimport DrawingResponseComponent from './drawing-response';\n\nexport default class DrawingResponse extends HTMLElement {\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this.isComplete(), !!this._model));\n this._render();\n }\n\n isComplete() {\n return this._session && (!isEmpty(this._session.drawables) || !isEmpty(this._session.texts));\n }\n\n sessionChanged = (update) => {\n this._session.drawables = update.drawables;\n this._session.texts = update.texts;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete()));\n\n this._render();\n };\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(DrawingResponseComponent, {\n model: this._model,\n session: this._session,\n onSessionChange: this.sessionChanged,\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/drawing-response",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.1-next.0+0260e08e8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@mdi/js": "^3.6.95",
|
|
12
12
|
"@mdi/react": "^1.1.1",
|
|
13
13
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
|
-
"@pie-lib/pie-toolbox": "1.
|
|
14
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
15
15
|
"classnames": "^2.2.6",
|
|
16
16
|
"enzyme-to-json": "^3.3.5",
|
|
17
17
|
"konva": "^3.4.1",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "pie framework developers",
|
|
25
25
|
"license": "ISC",
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "0260e08e86e6b0683fd07acecbca0703c6dc54df",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postpublish": "../../scripts/postpublish"
|
|
29
29
|
},
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
import { renderMath } from '@pie-lib/pie-toolbox/math-rendering
|
|
4
|
+
import { renderMath } from '@pie-lib/pie-toolbox/math-rendering';
|
|
5
5
|
import { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';
|
|
6
6
|
|
|
7
7
|
import DrawingResponseComponent from './drawing-response';
|