@pie-element/image-cloze-association 3.6.29 → 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,39 @@
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/image-cloze-association@3.6.31...@pie-element/image-cloze-association@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
+
23
+ ## [3.6.31](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.30...@pie-element/image-cloze-association@3.6.31) (2022-06-13)
24
+
25
+ **Note:** Version bump only for package @pie-element/image-cloze-association
26
+
27
+
28
+
29
+
30
+
31
+ ## [3.6.30](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.29...@pie-element/image-cloze-association@3.6.30) (2022-05-30)
32
+
33
+ **Note:** Version bump only for package @pie-element/image-cloze-association
34
+
35
+
36
+
37
+
38
+
6
39
  ## [3.6.29](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.28...@pie-element/image-cloze-association@3.6.29) (2022-05-16)
7
40
 
8
41
  **Note:** Version bump only for package @pie-element/image-cloze-association
@@ -3,6 +3,39 @@
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/image-cloze-association-configure@3.1.49...@pie-element/image-cloze-association-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
+
23
+ ## [3.1.49](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.48...@pie-element/image-cloze-association-configure@3.1.49) (2022-06-13)
24
+
25
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
26
+
27
+
28
+
29
+
30
+
31
+ ## [3.1.48](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.47...@pie-element/image-cloze-association-configure@3.1.48) (2022-05-30)
32
+
33
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
34
+
35
+
36
+
37
+
38
+
6
39
  ## [3.1.47](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.46...@pie-element/image-cloze-association-configure@3.1.47) (2022-05-16)
7
40
 
8
41
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
@@ -19,6 +19,12 @@ var _default = {
19
19
  teacherInstructions: {
20
20
  settings: true,
21
21
  label: 'Teacher Instructions'
22
+ },
23
+ maxImageWidth: {
24
+ teacherInstructions: 300
25
+ },
26
+ maxImageHeight: {
27
+ teacherInstructions: 300
22
28
  }
23
29
  }
24
30
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","label","settings","enabled","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,0BAA0B,EAAE,IAFvB;AAGLC,IAAAA,0BAA0B,EAAE;AAHvB,GADM;AAMbC,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,mBAAmB,EAAE;AACnBF,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY;AANR;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\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","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","label","settings","enabled","teacherInstructions","maxImageWidth","maxImageHeight"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,0BAA0B,EAAE,IAFvB;AAGLC,IAAAA,0BAA0B,EAAE;AAHvB,GADM;AAMbC,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,mBAAmB,EAAE;AACnBF,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY,KANR;AAUbI,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE;AADR,KAVF;AAabE,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE;AADP;AAbH;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n maxImageWidth: {\n teacherInstructions: 300\n },\n maxImageHeight: {\n teacherInstructions: 300\n }\n }\n};\n"],"file":"defaults.js"}
@@ -80,7 +80,11 @@ var Root = /*#__PURE__*/function (_React$Component) {
80
80
  _ref$teacherInstructi = _ref.teacherInstructions,
81
81
  teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
82
82
  _ref$spellCheck = _ref.spellCheck,
83
- spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck;
83
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
84
+ _ref$maxImageWidth = _ref.maxImageWidth,
85
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
86
+ _ref$maxImageHeight = _ref.maxImageHeight,
87
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
84
88
 
85
89
  var _ref2 = model || {},
86
90
  spellCheckEnabled = _ref2.spellCheckEnabled;
@@ -113,7 +117,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
113
117
  onChange: this.onTeacherInstructionsChanged,
114
118
  imageSupport: imageSupport,
115
119
  nonEmpty: false,
116
- spellCheck: spellCheckEnabled
120
+ spellCheck: spellCheckEnabled,
121
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions,
122
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions
117
123
  })), "Image cloze association"));
118
124
  }
119
125
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","spellCheck","spellCheckEnabled","config","Properties","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","React","Component","styles","theme","base","marginTop","spacing","unit","width","paddingTop","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;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AUG,IAFX;AAGf1B,EAAAA,sBAAsB,EAAEuB,sBAAUG,IAHnB;AAIf7B,EAAAA,KAAK,EAAE0B,sBAAUC,MAAV,CAAiBC,UAJT;AAKf1B,EAAAA,aAAa,EAAEwB,sBAAUC,MAAV,CAAiBC,UALjB;AAMfxB,EAAAA,YAAY,EAAEsB,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB;AANC,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBrB,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n render() {\n const {\n classes,\n model,\n configuration,\n onModelChanged,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const { teacherInstructions = {}, spellCheck = {} } = configuration || {};\n const { spellCheckEnabled } = model || {};\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n 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.content}>\n {model && model.teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n Image cloze association\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n base: {\n marginTop: theme.spacing.unit * 3,\n },\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
1
+ {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","spellCheck","maxImageWidth","maxImageHeight","spellCheckEnabled","config","Properties","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","React","Component","styles","theme","base","marginTop","spacing","unit","width","paddingTop","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEaC,I;;;;;;;;;;;;;;;qHACoB,UAACC,mBAAD,EAAyB;AACtD,YAAKC,KAAL,CAAWC,cAAX,iCACK,MAAKD,KAAL,CAAWE,KADhB;AAEEH,QAAAA,mBAAmB,EAAnBA;AAFF;AAID,K;;;;;;WAED,kBAAS;AACP,wBAOI,KAAKC,KAPT;AAAA,UACEG,OADF,eACEA,OADF;AAAA,UAEED,KAFF,eAEEA,KAFF;AAAA,UAGEE,aAHF,eAGEA,aAHF;AAAA,UAIEH,cAJF,eAIEA,cAJF;AA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AEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB;AANC,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBvB,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n render() {\n const {\n classes,\n model,\n configuration,\n onModelChanged,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const { teacherInstructions = {}, spellCheck = {}, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};\n const { spellCheckEnabled } = model || {};\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n 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.content}>\n {model && model.teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}\n />\n </InputContainer>\n )}\n Image cloze association\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n base: {\n marginTop: theme.spacing.unit * 3,\n },\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-configure",
3
3
  "private": true,
4
- "version": "3.1.47",
4
+ "version": "4.0.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.2.0",
12
- "@pie-lib/config-ui": "^10.13.0",
12
+ "@pie-lib/config-ui": "^11.0.1",
13
13
  "debug": "^3.1.0",
14
14
  "prop-types": "^15.7.2",
15
15
  "react": "^16.8.6",
@@ -13,6 +13,12 @@ export default {
13
13
  teacherInstructions: {
14
14
  settings: true,
15
15
  label: 'Teacher Instructions'
16
+ },
17
+ maxImageWidth: {
18
+ teacherInstructions: 300
19
+ },
20
+ maxImageHeight: {
21
+ teacherInstructions: 300
16
22
  }
17
23
  }
18
24
  };
@@ -23,7 +23,7 @@ export class Root extends React.Component {
23
23
  onConfigurationChanged,
24
24
  imageSupport,
25
25
  } = this.props;
26
- const { teacherInstructions = {}, spellCheck = {} } = configuration || {};
26
+ const { teacherInstructions = {}, spellCheck = {}, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};
27
27
  const { spellCheckEnabled } = model || {};
28
28
 
29
29
  return (
@@ -59,6 +59,8 @@ export class Root extends React.Component {
59
59
  imageSupport={imageSupport}
60
60
  nonEmpty={false}
61
61
  spellCheck={spellCheckEnabled}
62
+ maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}
63
+ maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}
62
64
  />
63
65
  </InputContainer>
64
66
  )}
@@ -35,6 +35,48 @@
35
35
  }
36
36
  }
37
37
  },
38
+ "maxImageWidth": {
39
+ "title": "ConfigureMaxImageDimensionsProp",
40
+ "type": "object",
41
+ "properties": {
42
+ "teacherInstructions": {
43
+ "description": "Indicates the max dimension for images in teacher instructions",
44
+ "type": "number",
45
+ "title": "teacherInstructions"
46
+ },
47
+ "prompt": {
48
+ "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",
49
+ "type": "number",
50
+ "title": "prompt"
51
+ },
52
+ "rationale": {
53
+ "description": "Indicates the max dimension for images in rationale",
54
+ "type": "number",
55
+ "title": "rationale"
56
+ }
57
+ }
58
+ },
59
+ "maxImageHeight": {
60
+ "title": "ConfigureMaxImageDimensionsProp",
61
+ "type": "object",
62
+ "properties": {
63
+ "teacherInstructions": {
64
+ "description": "Indicates the max dimension for images in teacher instructions",
65
+ "type": "number",
66
+ "title": "teacherInstructions"
67
+ },
68
+ "prompt": {
69
+ "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",
70
+ "type": "number",
71
+ "title": "prompt"
72
+ },
73
+ "rationale": {
74
+ "description": "Indicates the max dimension for images in rationale",
75
+ "type": "number",
76
+ "title": "rationale"
77
+ }
78
+ }
79
+ },
38
80
  "showPrompt": {
39
81
  "description": "Determines whether prompt field will be displayed or not",
40
82
  "default": true,
@@ -70,6 +112,27 @@
70
112
  "title": "label"
71
113
  }
72
114
  }
115
+ },
116
+ "ConfigureMaxImageDimensionsProp": {
117
+ "title": "ConfigureMaxImageDimensionsProp",
118
+ "type": "object",
119
+ "properties": {
120
+ "teacherInstructions": {
121
+ "description": "Indicates the max dimension for images in teacher instructions",
122
+ "type": "number",
123
+ "title": "teacherInstructions"
124
+ },
125
+ "prompt": {
126
+ "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",
127
+ "type": "number",
128
+ "title": "prompt"
129
+ },
130
+ "rationale": {
131
+ "description": "Indicates the max dimension for images in rationale",
132
+ "type": "number",
133
+ "title": "rationale"
134
+ }
135
+ }
73
136
  }
74
137
  },
75
138
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -26,6 +26,38 @@ Indicates if the item has to be displayed in the Settings Panel
26
26
 
27
27
  Indicates the label for the item that has to be displayed in the Settings Panel
28
28
 
29
+ # `maxImageWidth` (object)
30
+
31
+ Properties of the `maxImageWidth` object:
32
+
33
+ ## `teacherInstructions` (number)
34
+
35
+ Indicates the max dimension for images in teacher instructions
36
+
37
+ ## `prompt` (number)
38
+
39
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
40
+
41
+ ## `rationale` (number)
42
+
43
+ Indicates the max dimension for images in rationale
44
+
45
+ # `maxImageHeight` (object)
46
+
47
+ Properties of the `maxImageHeight` object:
48
+
49
+ ## `teacherInstructions` (number)
50
+
51
+ Indicates the max dimension for images in teacher instructions
52
+
53
+ ## `prompt` (number)
54
+
55
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
56
+
57
+ ## `rationale` (number)
58
+
59
+ Indicates the max dimension for images in rationale
60
+
29
61
  # `showPrompt` (boolean)
30
62
 
31
63
  Determines whether prompt field will be displayed or not
@@ -60,4 +92,20 @@ Indicates if the item has to be displayed in the Settings Panel
60
92
 
61
93
  ### `label` (string)
62
94
 
63
- Indicates the label for the item that has to be displayed in the Settings Panel
95
+ Indicates the label for the item that has to be displayed in the Settings Panel
96
+
97
+ ## `ConfigureMaxImageDimensionsProp` (object)
98
+
99
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
100
+
101
+ ### `teacherInstructions` (number)
102
+
103
+ Indicates the max dimension for images in teacher instructions
104
+
105
+ ### `prompt` (number)
106
+
107
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
108
+
109
+ ### `rationale` (number)
110
+
111
+ Indicates the max dimension for images in rationale
@@ -210,6 +210,27 @@
210
210
  }
211
211
  }
212
212
  },
213
+ "ConfigureMaxImageDimensionsProp": {
214
+ "title": "ConfigureMaxImageDimensionsProp",
215
+ "type": "object",
216
+ "properties": {
217
+ "teacherInstructions": {
218
+ "description": "Indicates the max dimension for images in teacher instructions",
219
+ "type": "number",
220
+ "title": "teacherInstructions"
221
+ },
222
+ "prompt": {
223
+ "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",
224
+ "type": "number",
225
+ "title": "prompt"
226
+ },
227
+ "rationale": {
228
+ "description": "Indicates the max dimension for images in rationale",
229
+ "type": "number",
230
+ "title": "rationale"
231
+ }
232
+ }
233
+ },
213
234
  "Image": {
214
235
  "title": "Image",
215
236
  "type": "object",
@@ -167,6 +167,22 @@ Indicates if the item has to be displayed in the Settings Panel
167
167
 
168
168
  Indicates the label for the item that has to be displayed in the Settings Panel
169
169
 
170
+ ## `ConfigureMaxImageDimensionsProp` (object)
171
+
172
+ Properties of the `ConfigureMaxImageDimensionsProp` object:
173
+
174
+ ### `teacherInstructions` (number)
175
+
176
+ Indicates the max dimension for images in teacher instructions
177
+
178
+ ### `prompt` (number)
179
+
180
+ Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified
181
+
182
+ ### `rationale` (number)
183
+
184
+ Indicates the max dimension for images in rationale
185
+
170
186
  ## `Image` (object)
171
187
 
172
188
  Properties of the `Image` object:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association",
3
- "version": "3.6.29",
3
+ "version": "4.0.0",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -10,10 +10,10 @@
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@material-ui/icons": "^3.0.1",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
- "@pie-lib/correct-answer-toggle": "^2.3.36",
13
+ "@pie-lib/correct-answer-toggle": "^2.3.39",
14
14
  "@pie-lib/drag": "^1.1.52",
15
- "@pie-lib/math-rendering": "^2.4.0",
16
- "@pie-lib/render-ui": "^4.12.6",
15
+ "@pie-lib/math-rendering": "^2.4.3",
16
+ "@pie-lib/render-ui": "^4.12.9",
17
17
  "classnames": "^2.2.6",
18
18
  "prop-types": "^15.6.1",
19
19
  "react": "^16.8.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "pie framework developers",
23
23
  "license": "ISC",
24
- "gitHead": "8ea971e13e74d785cd35a04fd9fe1abe1fa2dabf",
24
+ "gitHead": "ff92cee6f9a7bf3f3dc75dbafd2263710f0a6b3d",
25
25
  "scripts": {
26
26
  "postpublish": "../../scripts/postpublish"
27
27
  },