@pie-element/drawing-response 3.9.21 → 4.0.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,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.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.21...@pie-element/drawing-response@4.0.0) (2022-06-28)
7
+
8
+
9
+ ### chore
10
+
11
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * Image percent buttons were removed from toolbar.
17
+ New properties maxImageWidth and maxImageHeight were added.
18
+
19
+
20
+
21
+
22
+
6
23
  ## [3.9.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.20...@pie-element/drawing-response@3.9.21) (2022-06-13)
7
24
 
8
25
  **Note:** Version bump only for package @pie-element/drawing-response
@@ -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.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.25...@pie-element/drawing-response-configure@4.0.0) (2022-06-28)
7
+
8
+
9
+ ### chore
10
+
11
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * Image percent buttons were removed from toolbar.
17
+ New properties maxImageWidth and maxImageHeight were added.
18
+
19
+
20
+
21
+
22
+
6
23
  ## [3.2.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.24...@pie-element/drawing-response-configure@3.2.25) (2022-06-13)
7
24
 
8
25
  **Note:** Version bump only for package @pie-element/drawing-response-configure
@@ -36,6 +36,14 @@ var _default = {
36
36
  teacherInstructions: {
37
37
  settings: true,
38
38
  label: 'Teacher Instructions'
39
+ },
40
+ maxImageWidth: {
41
+ teacherInstructions: 300,
42
+ prompt: 300
43
+ },
44
+ maxImageHeight: {
45
+ teacherInstructions: 300,
46
+ prompt: 300
39
47
  }
40
48
  }
41
49
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","imageUrl","imageDimensions","height","width","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","backgroundImageEnabled","spellCheckEnabled","toolbarEditorPosition","configuration","spellCheck","label","settings","enabled","backgroundImage","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,QAAQ,EAAE,EAFL;AAGLC,IAAAA,eAAe,EAAE;AACfC,MAAAA,MAAM,EAAE,CADO;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KAHZ;AAOLC,IAAAA,aAAa,EAAE,IAPV;AAQLC,IAAAA,0BAA0B,EAAE,IARvB;AASLC,IAAAA,0BAA0B,EAAE,IATvB;AAULC,IAAAA,sBAAsB,EAAE,IAVnB;AAWLC,IAAAA,iBAAiB,EAAC,IAXb;AAYLC,IAAAA,qBAAqB,EAAE;AAZlB,GADM;AAebC,EAAAA,aAAa,EAAE;AACbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAC,KAFC;AAGVC,MAAAA,OAAO,EAAC;AAHE,KADC;AAMbC,IAAAA,eAAe,EAAE;AACfF,MAAAA,QAAQ,EAAE,IADK;AAEfD,MAAAA,KAAK,EAAE;AAFQ,KANJ;AAUbb,IAAAA,MAAM,EAAE;AACNc,MAAAA,QAAQ,EAAE,IADJ;AAEND,MAAAA,KAAK,EAAE;AAFD,KAVK;AAcbI,IAAAA,mBAAmB,EAAE;AACnBH,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY;AAdR;AAfF,C","sourcesContent":["export default {\n model: {\n prompt: 'This is the question prompt',\n imageUrl: '',\n imageDimensions: {\n height: 0,\n width: 0\n },\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n backgroundImageEnabled: true,\n spellCheckEnabled:true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n backgroundImage: {\n settings: true,\n label: 'Background Image'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n }\n }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","imageUrl","imageDimensions","height","width","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","backgroundImageEnabled","spellCheckEnabled","toolbarEditorPosition","configuration","spellCheck","label","settings","enabled","backgroundImage","teacherInstructions","maxImageWidth","maxImageHeight"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,QAAQ,EAAE,EAFL;AAGLC,IAAAA,eAAe,EAAE;AACfC,MAAAA,MAAM,EAAE,CADO;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KAHZ;AAOLC,IAAAA,aAAa,EAAE,IAPV;AAQLC,IAAAA,0BAA0B,EAAE,IARvB;AASLC,IAAAA,0BAA0B,EAAE,IATvB;AAULC,IAAAA,sBAAsB,EAAE,IAVnB;AAWLC,IAAAA,iBAAiB,EAAC,IAXb;AAYLC,IAAAA,qBAAqB,EAAE;AAZlB,GADM;AAebC,EAAAA,aAAa,EAAE;AACbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAC,KAFC;AAGVC,MAAAA,OAAO,EAAC;AAHE,KADC;AAMbC,IAAAA,eAAe,EAAE;AACfF,MAAAA,QAAQ,EAAE,IADK;AAEfD,MAAAA,KAAK,EAAE;AAFQ,KANJ;AAUbb,IAAAA,MAAM,EAAE;AACNc,MAAAA,QAAQ,EAAE,IADJ;AAEND,MAAAA,KAAK,EAAE;AAFD,KAVK;AAcbI,IAAAA,mBAAmB,EAAE;AACnBH,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY,KAdR;AAkBbK,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE,GADR;AAEbjB,MAAAA,MAAM,EAAE;AAFK,KAlBF;AAsBbmB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdjB,MAAAA,MAAM,EAAE;AAFM;AAtBH;AAfF,C","sourcesContent":["export default {\n model: {\n prompt: 'This is the question prompt',\n imageUrl: '',\n imageDimensions: {\n height: 0,\n width: 0\n },\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n backgroundImageEnabled: true,\n spellCheckEnabled:true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n backgroundImage: {\n settings: true,\n label: 'Background Image'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300\n }\n }\n};\n"],"file":"defaults.js"}
@@ -118,7 +118,11 @@ var Root = /*#__PURE__*/function (_React$Component) {
118
118
  _ref$teacherInstructi = _ref.teacherInstructions,
119
119
  teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
120
120
  _ref$spellCheck = _ref.spellCheck,
121
- spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck;
121
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
122
+ _ref$maxImageWidth = _ref.maxImageWidth,
123
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
124
+ _ref$maxImageHeight = _ref.maxImageHeight,
125
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
122
126
 
123
127
  var _ref2 = model || {},
124
128
  teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
@@ -127,6 +131,8 @@ var Root = /*#__PURE__*/function (_React$Component) {
127
131
  backgroundImageEnabled = _ref2.backgroundImageEnabled;
128
132
 
129
133
  var toolbarOpts = {};
134
+ var defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
135
+ var defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
130
136
 
131
137
  switch (model.toolbarEditorPosition) {
132
138
  case 'top':
@@ -168,7 +174,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
168
174
  imageSupport: imageSupport,
169
175
  nonEmpty: false,
170
176
  toolbarOpts: toolbarOpts,
171
- spellCheck: spellCheckEnabled
177
+ spellCheck: spellCheckEnabled,
178
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
179
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight
172
180
  })), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
173
181
  label: "Item Stem",
174
182
  className: classes.prompt
@@ -177,7 +185,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
177
185
  onChange: this.onPromptChanged,
178
186
  toolbarOpts: toolbarOpts,
179
187
  spellCheck: spellCheckEnabled,
180
- imageSupport: imageSupport
188
+ imageSupport: imageSupport,
189
+ maxImageWidth: defaultImageMaxWidth,
190
+ maxImageHeight: defaultImageMaxHeight
181
191
  })), backgroundImageEnabled && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
182
192
  className: classes.label,
183
193
  variant: "subheading"
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","prompt","props","model","onModelChanged","update","teacherInstructions","dimensions","imageDimensions","imageUrl","classes","configuration","imageSupport","onConfigurationChanged","backgroundImage","spellCheck","teacherInstructionsEnabled","promptEnabled","spellCheckEnabled","backgroundImageEnabled","toolbarOpts","toolbarEditorPosition","position","base","Settings","label","Properties","regular","onTeacherInstructionsChanged","onPromptChanged","onUpdateImageDimension","onImageUpload","React","Component","styles","theme","marginTop","spacing","unit","paddingTop","width","marginBottom","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;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,iCACTC,MADS;AAEZJ,QAAAA,MAAM,EAANA;AAFY,SAAd;AAID,K;qHAE8B,UAACK,mBAAD,EAAyB;AACtD,yBAAkC,MAAKJ,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCACTD,KADS;AAEZG,QAAAA,mBAAmB,EAAnBA;AAFY,SAAd;AAID,K;+GAEwB,UAACC,UAAD,EAAgB;AACvC,yBAAkC,MAAKL,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCACTD,KADS;AAE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EwC,sBAAUC,MAAV,CAAiBC,UAHT;AAIfjC,EAAAA,YAAY,EAAE+B,sBAAUG,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEJ,sBAAUK,IADa;AAE5B,cAAQL,sBAAUK;AAFU,GAAhB,CAJC;AAQf5C,EAAAA,cAAc,EAAEuC,sBAAUK,IAAV,CAAeH,UARhB;AASfhC,EAAAA,sBAAsB,EAAE8B,sBAAUK,IAAV,CAAeH;AATxB,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBlC,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/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 } = 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({\n ...update,\n prompt,\n });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n teacherInstructions,\n });\n };\n\n onUpdateImageDimension = (dimensions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n imageDimensions: dimensions,\n });\n };\n\n onImageUpload = (imageUrl) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n imageUrl,\n });\n };\n\n render() {\n const {\n classes,\n configuration,\n model,\n imageSupport,\n onConfigurationChanged,\n onModelChanged,\n } = this.props;\n const {\n backgroundImage = {},\n prompt = {},\n teacherInstructions = {},\n spellCheck = {},\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, spellCheckEnabled, backgroundImageEnabled } =\n model || {};\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n return (\n <div className={classes.base}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: {\n backgroundImageEnabled: backgroundImage.settings && toggle(backgroundImage.label),\n promptEnabled: prompt.settings && toggle(prompt.label)\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n },\n }}\n />\n }\n >\n <div className={classes.regular}>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.prompt}\n >\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label=\"Item Stem\" className={classes.prompt}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChanged}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n imageSupport={imageSupport}\n />\n </InputContainer>\n )}\n\n {backgroundImageEnabled && (\n <div>\n <Typography className={classes.label} variant=\"subheading\">\n Define Background Image\n </Typography>\n\n <ImageContainer\n imageUrl={model.imageUrl}\n onUpdateImageDimension={this.onUpdateImageDimension}\n onImageUpload={this.onImageUpload}\n imageDimensions={model.imageDimensions}\n />\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 label: {\n marginTop: theme.spacing.unit * 4,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n regular: {\n marginBottom: theme.spacing.unit * 3,\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 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","Root","prompt","props","model","onModelChanged","update","teacherInstructions","dimensions","imageDimensions","imageUrl","classes","configuration","imageSupport","onConfigurationChanged","backgroundImage","spellCheck","maxImageWidth","maxImageHeight","teacherInstructionsEnabled","promptEnabled","spellCheckEnabled","backgroundImageEnabled","toolbarOpts","defaultImageMaxWidth","defaultImageMaxHeight","toolbarEditorPosition","position","base","Settings","label","Properties","regular","onTeacherInstructionsChanged","onPromptChanged","onUpdateImageDimension","onImageUpload","React","Component","styles","theme","marginTop","spacing","unit","paddingTop","width","marginBottom","propTypes","PropTypes","object","isRequired","shape","add","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;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,iCACTC,MADS;AAEZJ,QAAAA,MAAM,EAANA;AAFY,SAAd;AAID,K;qHAE8B,UAACK,mBAAD,EAAyB;AACtD,yBAAkC,MAAKJ,KAAvC;AAAA,UAAQC,KAAR,gBAAQA,KAAR;AAAA,UAAeC,cAAf,gBAAeA,cAAf;AAEAA,MAAAA,cAAc,iCACTD,KADS;AAEZG,QAAAA,mBAAmB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AACzBZ,IAAAA,IAAI,EAAE;AACJa,MAAAA,SAAS,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAD5B,KADmB;AAIzBb,IAAAA,KAAK,EAAE;AACLW,MAAAA,SAAS,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAD3B,KAJkB;AAOzBzC,IAAAA,MAAM,EAAE;AACN0C,MAAAA,UAAU,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CAD3B;AAENE,MAAAA,KAAK,EAAE;AAFD,KAPiB;AAWzBb,IAAAA,OAAO,EAAE;AACPc,MAAAA,YAAY,EAAEN,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAD5B;AAXgB,GAAZ;AAAA,CAAf;;AAgBA1C,IAAI,CAAC8C,SAAL,GAAiB;AACfpC,EAAAA,OAAO,EAAEqC,sBAAUC,MAAV,CAAiBC,UADX;AAEftC,EAAAA,aAAa,EAAEoC,sBAAUC,MAFV;AAGf7C,EAAAA,KAAK,EAAE4C,sBAAUC,MAAV,CAAiBC,UAHT;AAIfrC,EAAAA,YAAY,EAAEmC,sBAAUG,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEJ,sBAAUK,IADa;AAE5B,cAAQL,sBAAUK;AAFU,GAAhB,CAJC;AAQfhD,EAAAA,cAAc,EAAE2C,sBAAUK,IAAV,CAAeH,UARhB;AASfpC,EAAAA,sBAAsB,EAAEkC,sBAAUK,IAAV,CAAeH;AATxB,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBtC,IAAnB,C","sourcesContent":["import React from 'react';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/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 } = 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({\n ...update,\n prompt,\n });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n teacherInstructions,\n });\n };\n\n onUpdateImageDimension = (dimensions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n imageDimensions: dimensions,\n });\n };\n\n onImageUpload = (imageUrl) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({\n ...model,\n imageUrl,\n });\n };\n\n render() {\n const {\n classes,\n configuration,\n model,\n imageSupport,\n onConfigurationChanged,\n onModelChanged,\n } = this.props;\n const {\n backgroundImage = {},\n prompt = {},\n teacherInstructions = {},\n spellCheck = {},\n maxImageWidth = {},\n maxImageHeight = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, spellCheckEnabled, backgroundImageEnabled } =\n model || {};\n const toolbarOpts = {};\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n return (\n <div className={classes.base}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: {\n backgroundImageEnabled: backgroundImage.settings && toggle(backgroundImage.label),\n promptEnabled: prompt.settings && toggle(prompt.label)\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n },\n }}\n />\n }\n >\n <div className={classes.regular}>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.prompt}\n >\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.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 />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label=\"Item Stem\" className={classes.prompt}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChanged}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n imageSupport={imageSupport}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n />\n </InputContainer>\n )}\n\n {backgroundImageEnabled && (\n <div>\n <Typography className={classes.label} variant=\"subheading\">\n Define Background Image\n </Typography>\n\n <ImageContainer\n imageUrl={model.imageUrl}\n onUpdateImageDimension={this.onUpdateImageDimension}\n onImageUpload={this.onImageUpload}\n imageDimensions={model.imageDimensions}\n />\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 label: {\n marginTop: theme.spacing.unit * 4,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n regular: {\n marginBottom: theme.spacing.unit * 3,\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 onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: 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/drawing-response-configure",
3
3
  "private": true,
4
- "version": "3.2.25",
4
+ "version": "4.0.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-configure-events": "^1.2.0",
12
- "@pie-lib/config-ui": "^10.13.3",
13
- "@pie-lib/editable-html": "^7.22.6",
12
+ "@pie-lib/config-ui": "^11.0.1",
13
+ "@pie-lib/editable-html": "^8.1.0",
14
14
  "classnames": "^2.2.6",
15
15
  "debug": "^3.1.0",
16
16
  "lodash": "^4.17.15",
@@ -11,6 +11,14 @@ exports[`Root snapshot renders 1`] = `
11
11
  "label": "Background Image",
12
12
  "settings": true,
13
13
  },
14
+ "maxImageHeight": Object {
15
+ "prompt": 300,
16
+ "teacherInstructions": 300,
17
+ },
18
+ "maxImageWidth": Object {
19
+ "prompt": 300,
20
+ "teacherInstructions": 300,
21
+ },
14
22
  "prompt": Object {
15
23
  "label": "Prompt",
16
24
  "settings": true,
@@ -60,6 +68,8 @@ exports[`Root snapshot renders 1`] = `
60
68
  >
61
69
  <EditableHtml
62
70
  markup="Test Prompt"
71
+ maxImageHeight={300}
72
+ maxImageWidth={300}
63
73
  onChange={[Function]}
64
74
  toolbarOpts={
65
75
  Object {
@@ -30,6 +30,14 @@ export default {
30
30
  teacherInstructions: {
31
31
  settings: true,
32
32
  label: 'Teacher Instructions',
33
+ },
34
+ maxImageWidth: {
35
+ teacherInstructions: 300,
36
+ prompt: 300
37
+ },
38
+ maxImageHeight: {
39
+ teacherInstructions: 300,
40
+ prompt: 300
33
41
  }
34
42
  }
35
43
  };
@@ -62,11 +62,16 @@ export class Root extends React.Component {
62
62
  prompt = {},
63
63
  teacherInstructions = {},
64
64
  spellCheck = {},
65
+ maxImageWidth = {},
66
+ maxImageHeight = {}
65
67
  } = configuration || {};
66
68
  const { teacherInstructionsEnabled, promptEnabled, spellCheckEnabled, backgroundImageEnabled } =
67
69
  model || {};
68
70
  const toolbarOpts = {};
69
71
 
72
+ const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
73
+ const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
74
+
70
75
  switch (model.toolbarEditorPosition) {
71
76
  case 'top':
72
77
  toolbarOpts.position = 'top';
@@ -114,6 +119,8 @@ export class Root extends React.Component {
114
119
  nonEmpty={false}
115
120
  toolbarOpts={toolbarOpts}
116
121
  spellCheck={spellCheckEnabled}
122
+ maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}
123
+ maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}
117
124
  />
118
125
  </InputContainer>
119
126
  )}
@@ -126,6 +133,8 @@ export class Root extends React.Component {
126
133
  toolbarOpts={toolbarOpts}
127
134
  spellCheck={spellCheckEnabled}
128
135
  imageSupport={imageSupport}
136
+ maxImageWidth={defaultImageMaxWidth}
137
+ maxImageHeight={defaultImageMaxHeight}
129
138
  />
130
139
  </InputContainer>
131
140
  )}
@@ -88,6 +88,48 @@
88
88
  }
89
89
  }
90
90
  },
91
+ "maxImageWidth": {
92
+ "title": "ConfigureMaxImageDimensionsProp",
93
+ "type": "object",
94
+ "properties": {
95
+ "teacherInstructions": {
96
+ "description": "Indicates the max dimension for images in teacher instructions",
97
+ "type": "number",
98
+ "title": "teacherInstructions"
99
+ },
100
+ "prompt": {
101
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
102
+ "type": "number",
103
+ "title": "prompt"
104
+ },
105
+ "rationale": {
106
+ "description": "Indicates the max dimension for images in rationale",
107
+ "type": "number",
108
+ "title": "rationale"
109
+ }
110
+ }
111
+ },
112
+ "maxImageHeight": {
113
+ "title": "ConfigureMaxImageDimensionsProp",
114
+ "type": "object",
115
+ "properties": {
116
+ "teacherInstructions": {
117
+ "description": "Indicates the max dimension for images in teacher instructions",
118
+ "type": "number",
119
+ "title": "teacherInstructions"
120
+ },
121
+ "prompt": {
122
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
123
+ "type": "number",
124
+ "title": "prompt"
125
+ },
126
+ "rationale": {
127
+ "description": "Indicates the max dimension for images in rationale",
128
+ "type": "number",
129
+ "title": "rationale"
130
+ }
131
+ }
132
+ },
91
133
  "showPrompt": {
92
134
  "description": "Determines whether prompt field will be displayed or not",
93
135
  "default": true,
@@ -138,6 +180,27 @@
138
180
  "title": "label"
139
181
  }
140
182
  }
183
+ },
184
+ "ConfigureMaxImageDimensionsProp": {
185
+ "title": "ConfigureMaxImageDimensionsProp",
186
+ "type": "object",
187
+ "properties": {
188
+ "teacherInstructions": {
189
+ "description": "Indicates the max dimension for images in teacher instructions",
190
+ "type": "number",
191
+ "title": "teacherInstructions"
192
+ },
193
+ "prompt": {
194
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
195
+ "type": "number",
196
+ "title": "prompt"
197
+ },
198
+ "rationale": {
199
+ "description": "Indicates the max dimension for images in rationale",
200
+ "type": "number",
201
+ "title": "rationale"
202
+ }
203
+ }
141
204
  }
142
205
  },
143
206
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -67,6 +67,38 @@ Indicates if the item has to be displayed in the Settings Panel
67
67
 
68
68
  Indicates the label for the item that has to be displayed in the Settings Panel
69
69
 
70
+ # `maxImageWidth` (object)
71
+
72
+ Properties of the `maxImageWidth` object:
73
+
74
+ ## `teacherInstructions` (number)
75
+
76
+ Indicates the max dimension for images in teacher instructions
77
+
78
+ ## `prompt` (number)
79
+
80
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
81
+
82
+ ## `rationale` (number)
83
+
84
+ Indicates the max dimension for images in rationale
85
+
86
+ # `maxImageHeight` (object)
87
+
88
+ Properties of the `maxImageHeight` object:
89
+
90
+ ## `teacherInstructions` (number)
91
+
92
+ Indicates the max dimension for images in teacher instructions
93
+
94
+ ## `prompt` (number)
95
+
96
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
97
+
98
+ ## `rationale` (number)
99
+
100
+ Indicates the max dimension for images in rationale
101
+
70
102
  # `showPrompt` (boolean)
71
103
 
72
104
  Determines whether prompt field will be displayed or not
@@ -112,4 +144,20 @@ Indicates if the item has to be displayed in the Settings Panel
112
144
 
113
145
  ### `label` (string)
114
146
 
115
- Indicates the label for the item that has to be displayed in the Settings Panel
147
+ Indicates the label for the item that has to be displayed in the Settings Panel
148
+
149
+ ## `ConfigureMaxImageDimensionsProp` (object)
150
+
151
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
152
+
153
+ ### `teacherInstructions` (number)
154
+
155
+ Indicates the max dimension for images in teacher instructions
156
+
157
+ ### `prompt` (number)
158
+
159
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
160
+
161
+ ### `rationale` (number)
162
+
163
+ Indicates the max dimension for images in rationale
@@ -141,6 +141,27 @@
141
141
  }
142
142
  }
143
143
  },
144
+ "ConfigureMaxImageDimensionsProp": {
145
+ "title": "ConfigureMaxImageDimensionsProp",
146
+ "type": "object",
147
+ "properties": {
148
+ "teacherInstructions": {
149
+ "description": "Indicates the max dimension for images in teacher instructions",
150
+ "type": "number",
151
+ "title": "teacherInstructions"
152
+ },
153
+ "prompt": {
154
+ "description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified",
155
+ "type": "number",
156
+ "title": "prompt"
157
+ },
158
+ "rationale": {
159
+ "description": "Indicates the max dimension for images in rationale",
160
+ "type": "number",
161
+ "title": "rationale"
162
+ }
163
+ }
164
+ },
144
165
  "Dimension": {
145
166
  "title": "Dimension",
146
167
  "type": "object",
@@ -108,6 +108,22 @@ Indicates if the item has to be displayed in the Settings Panel
108
108
 
109
109
  Indicates the label for the item that has to be displayed in the Settings Panel
110
110
 
111
+ ## `ConfigureMaxImageDimensionsProp` (object)
112
+
113
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
114
+
115
+ ### `teacherInstructions` (number)
116
+
117
+ Indicates the max dimension for images in teacher instructions
118
+
119
+ ### `prompt` (number)
120
+
121
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
122
+
123
+ ### `rationale` (number)
124
+
125
+ Indicates the max dimension for images in rationale
126
+
111
127
  ## `Dimension` (object)
112
128
 
113
129
  Properties of the `Dimension` object:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/drawing-response",
3
- "version": "3.9.21",
3
+ "version": "4.0.0",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "author": "pie framework developers",
26
26
  "license": "ISC",
27
- "gitHead": "2b16a41c0627a27ee758af9285afde4d226dc12b",
27
+ "gitHead": "ff92cee6f9a7bf3f3dc75dbafd2263710f0a6b3d",
28
28
  "scripts": {
29
29
  "postpublish": "../../scripts/postpublish"
30
30
  },