@pie-element/image-cloze-association 4.1.9 → 4.1.10-next.173

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.
@@ -25,6 +25,10 @@ var _default = {
25
25
  },
26
26
  maxImageHeight: {
27
27
  teacherInstructions: 300
28
+ },
29
+ withRubric: {
30
+ settings: false,
31
+ label: 'Add Rubric'
28
32
  }
29
33
  }
30
34
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","label","settings","enabled","teacherInstructions","maxImageWidth","maxImageHeight","withRubric"],"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,KAbH;AAgBbG,IAAAA,UAAU,EAAE;AACVL,MAAAA,QAAQ,EAAE,KADA;AAEVD,MAAAA,KAAK,EAAE;AAFG;AAhBC;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 withRubric: {\n settings: false,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
@@ -85,10 +85,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
85
85
  _ref$maxImageWidth = _ref.maxImageWidth,
86
86
  maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
87
87
  _ref$maxImageHeight = _ref.maxImageHeight,
88
- maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
88
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight,
89
+ withRubric = _ref.withRubric;
89
90
 
90
91
  var _ref2 = model || {},
91
- spellCheckEnabled = _ref2.spellCheckEnabled;
92
+ spellCheckEnabled = _ref2.spellCheckEnabled,
93
+ rubricEnabled = _ref2.rubricEnabled;
92
94
 
93
95
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
94
96
  settings: /*#__PURE__*/_react["default"].createElement(Panel, {
@@ -103,7 +105,8 @@ var Root = /*#__PURE__*/function (_React$Component) {
103
105
  groups: {
104
106
  Properties: {
105
107
  teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
106
- spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
108
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
109
+ rubricEnabled: withRubric.settings && toggle(withRubric.label)
107
110
  }
108
111
  }
109
112
  })
@@ -121,7 +124,12 @@ var Root = /*#__PURE__*/function (_React$Component) {
121
124
  spellCheck: spellCheckEnabled,
122
125
  maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions,
123
126
  maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions,
124
- uploadSoundSupport: uploadSoundSupport
127
+ uploadSoundSupport: uploadSoundSupport,
128
+ languageCharactersProps: [{
129
+ language: 'spanish'
130
+ }, {
131
+ language: 'special'
132
+ }]
125
133
  })), "Image cloze association"));
126
134
  }
127
135
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","spellCheck","maxImageWidth","maxImageHeight","spellCheckEnabled","config","Properties","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","React","Component","styles","theme","base","marginTop","spacing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,MADK;AAEZC,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAFrB,KAJW;AAQzBT,IAAAA,MAAM,EAAE;AACNW,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAD3B;AAENC,MAAAA,KAAK,EAAE;AAFD;AARiB,GAAZ;AAAA,CAAf;;AAcA9B,IAAI,CAACgC,SAAL,GAAiB;AACf3B,EAAAA,OAAO,EAAE4B,sBAAUC,MAAV,CAAiBC,UADX;AAEfhC,EAAAA,cAAc,EAAE8B,sBAAUG,IAFX;AAGf7B,EAAAA,sBAAsB,EAAE0B,sBAAUG,IAHnB;AAIfhC,EAAAA,KAAK,EAAE6B,sBAAUC,MAAV,CAAiBC,UAJT;AAKf7B,EAAAA,aAAa,EAAE2B,sBAAUC,MAAV,CAAiBC,UALjB;AAMf3B,EAAAA,YAAY,EAAEyB,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB,CANC;AAUf1B,EAAAA,kBAAkB,EAAEwB,sBAAUI,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADc;AAElC,cAAQF,sBAAUG,IAAV,CAAeD;AAFW,GAAhB;AAVL,CAAjB;;eAgBe,wBAAWX,MAAX,EAAmBxB,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 uploadSoundSupport\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 uploadSoundSupport={uploadSoundSupport}\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 uploadSoundSupport: 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","uploadSoundSupport","spellCheck","maxImageWidth","maxImageHeight","withRubric","spellCheckEnabled","rubricEnabled","config","Properties","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","language","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,wBAQI,KAAKC,KART;AAAA,UACEG,OADF,eACEA,OADF;AAAA,UAEED,KAFF,eAEEA,KAFF;AAAA,UAGEE,aAHF,eAGEA,aAHF;AAAA,UAIEH,cAJF,eAIEA,cAJF;AAAA,UAKEI,sBALF,eAKEA,sBALF;AAAA,UAMEC,YANF,eAMEA,YANF;AAAA,UAOEC,kBAPF,eAOEA,kBAPF;;AASA,iBAMIH,aAAa,IAAI,EANrB;AAAA,uCACEL,mBADF;AAAA,UACEA,mBADF,sCACwB,EADxB;AAAA,iCAEES,UAFF;AAAA,UAEEA,UAFF,gCAEe,EAFf;AAAA,oCAGEC,aAHF;AAAA,UAGEA,aAHF,mCAGkB,EAHlB;AAAA,qCAIEC,cAJF;AAAA,UAIEA,cAJF,oCAImB,EAJnB;AAAA,UAKEC,UALF,QAKEA,UALF;;AAOA,kBAA6CT,KAAK,IAAI,EAAtD;AAAA,UAAQU,iBAAR,SAAQA,iBAAR;AAAA,UAA2B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2B,sBAAUI,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADc;AAElC,cAAQF,sBAAUG,IAAV,CAAeD;AAFW,GAAhB;AAVL,CAAjB;;eAgBe,wBAAWX,MAAX,EAAmB3B,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 uploadSoundSupport\n } = this.props;\n const {\n teacherInstructions = {},\n spellCheck = {},\n maxImageWidth = {},\n maxImageHeight = {},\n withRubric\n } = configuration || {};\n const { spellCheckEnabled, rubricEnabled } = 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 rubricEnabled: withRubric.settings && toggle(withRubric.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 uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\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 uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.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/config-ui": "^11.0.19",
12
+ "@pie-lib/config-ui": "^11.0.20",
13
13
  "@pie-lib/editable-html": "^9.2.2",
14
14
  "debug": "^3.1.0",
15
15
  "prop-types": "^15.7.2",
@@ -19,6 +19,10 @@ export default {
19
19
  },
20
20
  maxImageHeight: {
21
21
  teacherInstructions: 300
22
+ },
23
+ withRubric: {
24
+ settings: false,
25
+ label: 'Add Rubric'
22
26
  }
23
27
  }
24
28
  };
@@ -24,8 +24,14 @@ export class Root extends React.Component {
24
24
  imageSupport,
25
25
  uploadSoundSupport
26
26
  } = this.props;
27
- const { teacherInstructions = {}, spellCheck = {}, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};
28
- const { spellCheckEnabled } = model || {};
27
+ const {
28
+ teacherInstructions = {},
29
+ spellCheck = {},
30
+ maxImageWidth = {},
31
+ maxImageHeight = {},
32
+ withRubric
33
+ } = configuration || {};
34
+ const { spellCheckEnabled, rubricEnabled } = model || {};
29
35
 
30
36
  return (
31
37
  <layout.ConfigLayout
@@ -42,6 +48,7 @@ export class Root extends React.Component {
42
48
  toggle(teacherInstructions.label),
43
49
  spellCheckEnabled:
44
50
  spellCheck.settings && toggle(spellCheck.label),
51
+ rubricEnabled: withRubric.settings && toggle(withRubric.label)
45
52
  },
46
53
  }}
47
54
  />
@@ -63,6 +70,7 @@ export class Root extends React.Component {
63
70
  maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}
64
71
  maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}
65
72
  uploadSoundSupport={uploadSoundSupport}
73
+ languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
66
74
  />
67
75
  </InputContainer>
68
76
  )}
@@ -77,6 +77,22 @@
77
77
  }
78
78
  }
79
79
  },
80
+ "withRubric": {
81
+ "title": "ConfigureProp",
82
+ "type": "object",
83
+ "properties": {
84
+ "settings": {
85
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
86
+ "type": "boolean",
87
+ "title": "settings"
88
+ },
89
+ "label": {
90
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
91
+ "type": "string",
92
+ "title": "label"
93
+ }
94
+ }
95
+ },
80
96
  "showPrompt": {
81
97
  "description": "Determines whether prompt field will be displayed or not",
82
98
  "default": true,
@@ -58,6 +58,18 @@ Indicates the max dimension for images in prompt - this is also the default dime
58
58
 
59
59
  Indicates the max dimension for images in rationale
60
60
 
61
+ # `withRubric` (object)
62
+
63
+ Properties of the `withRubric` object:
64
+
65
+ ## `settings` (boolean)
66
+
67
+ Indicates if the item has to be displayed in the Settings Panel
68
+
69
+ ## `label` (string)
70
+
71
+ Indicates the label for the item that has to be displayed in the Settings Panel
72
+
61
73
  # `showPrompt` (boolean)
62
74
 
63
75
  Determines whether prompt field will be displayed or not
@@ -63,5 +63,6 @@ exports.model = (id, element) => ({
63
63
  },
64
64
  showDashedBorder: false,
65
65
  partialScoring: false,
66
- shuffle: true // this is not used
66
+ shuffle: true, // this is not used
67
+ rubricEnabled: false
67
68
  });
@@ -177,6 +177,11 @@
177
177
  "type": "boolean",
178
178
  "title": "showDashedBorder"
179
179
  },
180
+ "rubricEnabled": {
181
+ "description": "Indicates if Rubric is enabled",
182
+ "type": "boolean",
183
+ "title": "rubricEnabled"
184
+ },
180
185
  "id": {
181
186
  "description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
182
187
  "type": "string",
@@ -191,6 +196,7 @@
191
196
  "required": [
192
197
  "element",
193
198
  "id",
199
+ "rubricEnabled",
194
200
  "spellCheckEnabled"
195
201
  ],
196
202
  "definitions": {
@@ -141,6 +141,10 @@ Indicates if duplicate responses are allowed
141
141
 
142
142
  Indicates if the response containers should have a dashed border
143
143
 
144
+ # `rubricEnabled` (boolean, required)
145
+
146
+ Indicates if Rubric is enabled
147
+
144
148
  # `id` (string, required)
145
149
 
146
150
  Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association",
3
- "version": "4.1.9",
3
+ "version": "4.1.10-next.173+d434ce108",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "pie framework developers",
23
23
  "license": "ISC",
24
- "gitHead": "f60d1edac928da4682a9789000e3c8cf464348c0",
24
+ "gitHead": "d434ce108dd12cb05f72f676a79bbfba67944cb3",
25
25
  "scripts": {
26
26
  "postpublish": "../../scripts/postpublish"
27
27
  },