@pie-element/image-cloze-association 3.6.21 → 3.6.24

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,30 @@
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
+ ## [3.6.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.23...@pie-element/image-cloze-association@3.6.24) (2022-03-22)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.6.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.22...@pie-element/image-cloze-association@3.6.23) (2022-03-08)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.6.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.21...@pie-element/image-cloze-association@3.6.22) (2022-03-08)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association
25
+
26
+
27
+
28
+
29
+
6
30
  ## [3.6.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.20...@pie-element/image-cloze-association@3.6.21) (2022-02-21)
7
31
 
8
32
  **Note:** Version bump only for package @pie-element/image-cloze-association
@@ -3,6 +3,30 @@
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
+ ## [3.1.42](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.41...@pie-element/image-cloze-association-configure@3.1.42) (2022-03-22)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.1.41](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.40...@pie-element/image-cloze-association-configure@3.1.41) (2022-03-08)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.1.40](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.39...@pie-element/image-cloze-association-configure@3.1.40) (2022-03-08)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
25
+
26
+
27
+
28
+
29
+
6
30
  ## [3.1.39](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.38...@pie-element/image-cloze-association-configure@3.1.39) (2022-02-21)
7
31
 
8
32
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
@@ -11,6 +11,11 @@ var _default = {
11
11
  studentInstructionsEnabled: true
12
12
  },
13
13
  configuration: {
14
+ spellCheck: {
15
+ label: "Spellcheck",
16
+ settings: true,
17
+ enabled: true
18
+ },
14
19
  teacherInstructions: {
15
20
  settings: true,
16
21
  label: 'Teacher Instructions'
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","teacherInstructions","settings","label"],"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,mBAAmB,EAAE;AACnBC,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY;AADR;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true\n },\n configuration: {\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"],"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,IAFC;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:true,\n enabled:true\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n }\n }\n};\n"],"file":"defaults.js"}
@@ -78,7 +78,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
78
78
 
79
79
  var _ref = configuration || {},
80
80
  _ref$teacherInstructi = _ref.teacherInstructions,
81
- teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi;
81
+ teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
82
+ _ref$spellCheck = _ref.spellCheck,
83
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck;
84
+
85
+ var _ref2 = model || {},
86
+ spellCheckEnabled = _ref2.spellCheckEnabled;
82
87
 
83
88
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
84
89
  settings: /*#__PURE__*/_react["default"].createElement(Panel, {
@@ -91,8 +96,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
91
96
  return onConfigurationChanged(config);
92
97
  },
93
98
  groups: {
94
- 'Properties': {
95
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label)
99
+ Properties: {
100
+ teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
101
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
96
102
  }
97
103
  }
98
104
  })
@@ -106,7 +112,8 @@ var Root = /*#__PURE__*/function (_React$Component) {
106
112
  markup: model.teacherInstructions || '',
107
113
  onChange: this.onTeacherInstructionsChanged,
108
114
  imageSupport: imageSupport,
109
- nonEmpty: false
115
+ nonEmpty: false,
116
+ spellCheck: spellCheckEnabled
110
117
  })), "Image cloze association"));
111
118
  }
112
119
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","config","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;;AAKA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEaC,I;;;;;;;;;;;;;;;qHACoB,UAAAC,mBAAmB,EAAI;AACpD,YAAKC,KAAL,CAAWC,cAAX,iCACK,MAAKD,KAAL,CAAWE,KADhB;AAEEH,QAAAA,mBAAmB,EAAnBA;AAFF;AAID,K;;;;;;WAED,kBAAS;AACP,wBAAgG,KAAKC,KAArG;AAAA,UAAQG,OAAR,eAAQA,OAAR;AAAA,UAAiBD,KAAjB,eAAiBA,KAAjB;AAAA,UAAwBE,aAAxB,eAAwBA,aAAxB;AAAA,UAAuCH,cAAvC,eAAuCA,cAAvC;AAAA,UAAuDI,sBAAvD,eAAuDA,sBAAvD;AAAA,UAA+EC,YAA/E,eAA+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B;AAIvBV,IAAAA,YAAY,EAAE;AACZW,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAFrB,KAJS;AAQvBT,IAAAA,MAAM,EAAE;AACNW,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAD3B;AAENC,MAAAA,KAAK,EAAE;AAFD;AARe,GAAL;AAAA,CAApB;;AAcAxB,IAAI,CAAC0B,SAAL,GAAiB;AACfrB,EAAAA,OAAO,EAAEsB,sBAAUC,MAAV,CAAiBC,UADX;AAEf1B,EAAAA,cAAc,EAAEwB,sBAAUG,IAFX;AAGfvB,EAAAA,sBAAsB,EAAEoB,sBAAUG,IAHnB;AAIf1B,EAAAA,KAAK,EAAEuB,sBAAUC,MAAV,CAAiBC,UAJT;AAKfvB,EAAAA,aAAa,EAAEqB,sBAAUC,MAAV,CAAiBC,UALjB;AAMfrB,EAAAA,YAAY,EAAEmB,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB;AANC,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBlB,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n settings,\n layout,\n InputContainer\n} 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 { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport } = this.props;\n const { teacherInstructions = {} } = configuration || {};\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: teacherInstructions.settings && toggle(teacherInstructions.label),\n },\n }}\n />\n }\n >\n <div className={classes.content}>\n {model && model.teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n />\n </InputContainer>\n )}\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","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,Y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V,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,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-configure",
3
3
  "private": true,
4
- "version": "3.1.39",
4
+ "version": "3.1.42",
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.10.20",
12
+ "@pie-lib/config-ui": "^10.10.24",
13
13
  "debug": "^3.1.0",
14
14
  "prop-types": "^15.7.2",
15
15
  "react": "^16.8.6",
@@ -2,9 +2,14 @@ export default {
2
2
  model: {
3
3
  rationaleEnabled: true,
4
4
  teacherInstructionsEnabled: true,
5
- studentInstructionsEnabled: true
5
+ studentInstructionsEnabled: true,
6
6
  },
7
7
  configuration: {
8
+ spellCheck: {
9
+ label: "Spellcheck",
10
+ settings:true,
11
+ enabled:true
12
+ },
8
13
  teacherInstructions: {
9
14
  settings: true,
10
15
  label: 'Teacher Instructions'
@@ -1,26 +1,30 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { withStyles } from '@material-ui/core/styles';
4
- import {
5
- settings,
6
- layout,
7
- InputContainer
8
- } from '@pie-lib/config-ui';
4
+ import { settings, layout, InputContainer } from '@pie-lib/config-ui';
9
5
  import EditableHtml from '@pie-lib/editable-html';
10
6
 
11
7
  const { Panel, toggle } = settings;
12
8
 
13
9
  export class Root extends React.Component {
14
- onTeacherInstructionsChanged = teacherInstructions => {
10
+ onTeacherInstructionsChanged = (teacherInstructions) => {
15
11
  this.props.onModelChanged({
16
12
  ...this.props.model,
17
- teacherInstructions
13
+ teacherInstructions,
18
14
  });
19
15
  };
20
16
 
21
17
  render() {
22
- const { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport } = this.props;
23
- const { teacherInstructions = {} } = configuration || {};
18
+ const {
19
+ classes,
20
+ model,
21
+ configuration,
22
+ onModelChanged,
23
+ onConfigurationChanged,
24
+ imageSupport,
25
+ } = this.props;
26
+ const { teacherInstructions = {}, spellCheck = {} } = configuration || {};
27
+ const { spellCheckEnabled } = model || {};
24
28
 
25
29
  return (
26
30
  <layout.ConfigLayout
@@ -28,11 +32,15 @@ export class Root extends React.Component {
28
32
  <Panel
29
33
  model={model}
30
34
  configuration={configuration}
31
- onChangeModel={model => onModelChanged(model)}
32
- onChangeConfiguration={config => onConfigurationChanged(config)}
35
+ onChangeModel={(model) => onModelChanged(model)}
36
+ onChangeConfiguration={(config) => onConfigurationChanged(config)}
33
37
  groups={{
34
- 'Properties': {
35
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
38
+ Properties: {
39
+ teacherInstructionsEnabled:
40
+ teacherInstructions.settings &&
41
+ toggle(teacherInstructions.label),
42
+ spellCheckEnabled:
43
+ spellCheck.settings && toggle(spellCheck.label),
36
44
  },
37
45
  }}
38
46
  />
@@ -40,17 +48,20 @@ export class Root extends React.Component {
40
48
  >
41
49
  <div className={classes.content}>
42
50
  {model && model.teacherInstructionsEnabled && (
43
- <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>
51
+ <InputContainer
52
+ label={teacherInstructions.label}
53
+ className={classes.promptHolder}
54
+ >
44
55
  <EditableHtml
45
56
  className={classes.prompt}
46
57
  markup={model.teacherInstructions || ''}
47
58
  onChange={this.onTeacherInstructionsChanged}
48
59
  imageSupport={imageSupport}
49
60
  nonEmpty={false}
61
+ spellCheck={spellCheckEnabled}
50
62
  />
51
63
  </InputContainer>
52
64
  )}
53
-
54
65
  Image cloze association
55
66
  </div>
56
67
  </layout.ConfigLayout>
@@ -58,17 +69,17 @@ export class Root extends React.Component {
58
69
  }
59
70
  }
60
71
 
61
- const styles = theme => ({
72
+ const styles = (theme) => ({
62
73
  base: {
63
- marginTop: theme.spacing.unit * 3
74
+ marginTop: theme.spacing.unit * 3,
64
75
  },
65
76
  promptHolder: {
66
77
  width: '100%',
67
- paddingTop: theme.spacing.unit * 2
78
+ paddingTop: theme.spacing.unit * 2,
68
79
  },
69
80
  prompt: {
70
81
  paddingTop: theme.spacing.unit * 2,
71
- width: '100%'
82
+ width: '100%',
72
83
  },
73
84
  });
74
85
 
@@ -80,8 +91,8 @@ Root.propTypes = {
80
91
  configuration: PropTypes.object.isRequired,
81
92
  imageSupport: PropTypes.shape({
82
93
  add: PropTypes.func.isRequired,
83
- delete: PropTypes.func.isRequired
84
- })
94
+ delete: PropTypes.func.isRequired,
95
+ }),
85
96
  };
86
97
 
87
98
  export default withStyles(styles)(Root);
@@ -19,6 +19,22 @@
19
19
  }
20
20
  }
21
21
  },
22
+ "spellCheck": {
23
+ "title": "ConfigureProp",
24
+ "type": "object",
25
+ "properties": {
26
+ "settings": {
27
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
28
+ "type": "boolean",
29
+ "title": "settings"
30
+ },
31
+ "label": {
32
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
33
+ "type": "string",
34
+ "title": "label"
35
+ }
36
+ }
37
+ },
22
38
  "showPrompt": {
23
39
  "description": "Determines whether prompt field will be displayed or not",
24
40
  "default": true,
@@ -14,6 +14,18 @@ Indicates if the item has to be displayed in the Settings Panel
14
14
 
15
15
  Indicates the label for the item that has to be displayed in the Settings Panel
16
16
 
17
+ # `spellCheck` (object)
18
+
19
+ Properties of the `spellCheck` object:
20
+
21
+ ## `settings` (boolean)
22
+
23
+ Indicates if the item has to be displayed in the Settings Panel
24
+
25
+ ## `label` (string)
26
+
27
+ Indicates the label for the item that has to be displayed in the Settings Panel
28
+
17
29
  # `showPrompt` (boolean)
18
30
 
19
31
  Determines whether prompt field will be displayed or not
@@ -13,6 +13,11 @@
13
13
  "type": "boolean",
14
14
  "title": "rationaleEnabled"
15
15
  },
16
+ "spellCheckEnabled": {
17
+ "description": "Indicates if spellcheck is enabled",
18
+ "type": "boolean",
19
+ "title": "spellCheckEnabled"
20
+ },
16
21
  "teacherInstructionsEnabled": {
17
22
  "description": "Indicates if Teacher Instructions are enabled",
18
23
  "type": "boolean",
@@ -185,7 +190,8 @@
185
190
  },
186
191
  "required": [
187
192
  "element",
188
- "id"
193
+ "id",
194
+ "spellCheckEnabled"
189
195
  ],
190
196
  "definitions": {
191
197
  "ConfigureProp": {
@@ -10,6 +10,10 @@ The question prompt or item stem
10
10
 
11
11
  Indicates if Rationale is enabled
12
12
 
13
+ # `spellCheckEnabled` (boolean, required)
14
+
15
+ Indicates if spellcheck is enabled
16
+
13
17
  # `teacherInstructionsEnabled` (boolean)
14
18
 
15
19
  Indicates if Teacher Instructions are enabled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association",
3
- "version": "3.6.21",
3
+ "version": "3.6.24",
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.34",
13
+ "@pie-lib/correct-answer-toggle": "^2.3.35",
14
14
  "@pie-lib/drag": "^1.1.52",
15
- "@pie-lib/math-rendering": "^2.3.12",
16
- "@pie-lib/render-ui": "^4.12.4",
15
+ "@pie-lib/math-rendering": "^2.3.13",
16
+ "@pie-lib/render-ui": "^4.12.5",
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": "cd1a2efd59f915b882937dea95c2675b2d2a3a50",
24
+ "gitHead": "b32a90d35916de8f2b77d7b3428b02efbd145313",
25
25
  "scripts": {
26
26
  "postpublish": "../../scripts/postpublish"
27
27
  },