@pie-element/charting 5.0.9 → 5.0.11-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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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
+ ## [5.0.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting@5.0.9...@pie-element/charting@5.0.10) (2022-09-29)
7
+
8
+ **Note:** Version bump only for package @pie-element/charting
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.0.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting@5.0.8...@pie-element/charting@5.0.9) (2022-09-14)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/charting
@@ -3,6 +3,14 @@
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
+ ## [5.0.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-configure@5.0.9...@pie-element/charting-configure@5.0.10) (2022-09-29)
7
+
8
+ **Note:** Version bump only for package @pie-element/charting-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.0.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-configure@5.0.8...@pie-element/charting-configure@5.0.9) (2022-09-14)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/charting-configure
@@ -137,6 +137,16 @@ var ChartingConfig = /*#__PURE__*/function (_React$Component) {
137
137
  }));
138
138
  }
139
139
  });
140
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeTitle", function (title) {
141
+ return _this.props.onChange(_objectSpread(_objectSpread({}, _this.props.model), {}, {
142
+ title: title
143
+ }));
144
+ });
145
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "changeLabel", function (type, label) {
146
+ return _this.props.onChange(_objectSpread(_objectSpread({}, _this.props.model), {}, (0, _defineProperty2["default"])({}, type, _objectSpread(_objectSpread({}, _this.props.model[type]), {}, {
147
+ label: label
148
+ }))));
149
+ });
140
150
  _this.state = {
141
151
  dialog: {
142
152
  open: false
@@ -154,6 +164,8 @@ var ChartingConfig = /*#__PURE__*/function (_React$Component) {
154
164
  classes = _this$props.classes,
155
165
  model = _this$props.model,
156
166
  charts = _this$props.charts,
167
+ labelsPlaceholders = _this$props.labelsPlaceholders,
168
+ titlePlaceholder = _this$props.titlePlaceholder,
157
169
  showPixelGuides = _this$props.showPixelGuides;
158
170
  var dialog = this.state.dialog;
159
171
  return /*#__PURE__*/React.createElement("div", null, "Define Initial Chart Attributes", /*#__PURE__*/React.createElement("div", {
@@ -180,8 +192,12 @@ var ChartingConfig = /*#__PURE__*/function (_React$Component) {
180
192
  }),
181
193
  title: model.title,
182
194
  onDataChange: this.changeData,
195
+ onChangeTitle: this.changeTitle,
196
+ onChangeLabels: this.changeLabel,
183
197
  addCategoryEnabled: true,
184
- categoryDefaultLabel: model.categoryDefaultLabel
198
+ categoryDefaultLabel: model.categoryDefaultLabel,
199
+ labelsPlaceholders: labelsPlaceholders,
200
+ titlePlaceholder: titlePlaceholder === null || titlePlaceholder === void 0 ? void 0 : titlePlaceholder.label
185
201
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Checkbox["default"], {
186
202
  checked: model.addCategoryEnabled,
187
203
  onChange: function onChange(e) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charting-config.jsx"],"names":["styles","theme","container","marginTop","spacing","unit","marginBottom","display","flex","column","restoreCorrectAnswer","correctAnswer","data","correctResponseDefinition","forEach","category","currentIndex","editable","interactive","label","value","ChartingConfig","props","open","callback","setState","dialog","onChange","model","title","text","onConfirm","handleAlertDialog","addCategoryEnabled","onClose","state","classes","charts","showPixelGuides","chartType","graph","domain","range","map","index","changeData","categoryDefaultLabel","e","changeAddRemoveEnabled","target","checked","React","Component","PropTypes","object","isRequired","func","array"],"mappings":";;;;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X;AAAA,iDAChB7B,QADgB;AAEnB6B,YAAAA,KAAK,EAAEA;AAFY;AAAA,SAAf,CATR;AAaE,QAAA,KAAK,EAAEhB,KAAK,CAACC,KAbf;AAcE,QAAA,YAAY,EAAE,KAAKgB,UAdrB;AAeE,QAAA,kBAAkB,EAAE,IAftB;AAgBE,QAAA,oBAAoB,EAAEjB,KAAK,CAACkB;AAhB9B,QARF,eA0BE,8CACE,oBAAC,oBAAD;AACE,QAAA,OAAO,EAAElB,KAAK,CAACK,kBADjB;AAEE,QAAA,QAAQ,EAAE,kBAACc,CAAD,EAAO;AACf,UAAA,MAAI,CAACC,sBAAL,CAA4BD,CAAC,CAACE,MAAF,CAASC,OAArC;AACD;AAJH,QADF,+BA1BF,eAoCE,oBAAC,qBAAD;AACE,QAAA,IAAI,EAAExB,MAAM,CAACH,IADf;AAEE,QAAA,KAAK,EAAEG,MAAM,CAACG,KAFhB;AAGE,QAAA,IAAI,EAAEH,MAAM,CAACI,IAHf;AAIE,QAAA,OAAO,EAAEJ,MAAM,CAACQ,OAJlB;AAKE,QAAA,SAAS,EAAER,MAAM,CAACK;AALpB,QApCF,CADF,CAFF,CADF;AAmDD;;;EAhHiCoB,KAAK,CAACC,S;;;iCAA7B/B,c,eACQ;AACjBe,EAAAA,OAAO,EAAEiB,sBAAUC,MAAV,CAAiBC,UADT;AAEjB3B,EAAAA,KAAK,EAAEyB,sBAAUC,MAAV,CAAiBC,UAFP;AAGjB5B,EAAAA,QAAQ,EAAE0B,sBAAUG,IAAV,CAAeD,UAHR;AAIjBlB,EAAAA,MAAM,EAAEgB,sBAAUI;AAJD,C;;eAkHN,wBAAWzD,MAAX,EAAmBqB,cAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Chart } from '@pie-lib/charting';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Checkbox from '@material-ui/core/Checkbox';\n\nimport Typography from '@material-ui/core/Typography';\n\nconst styles = (theme) => ({\n container: {\n marginTop: theme.spacing.unit * 3,\n marginBottom: theme.spacing.unit * 3,\n display: 'flex',\n flex: 1,\n },\n column: {\n flex: 1,\n },\n});\n\nconst restoreCorrectAnswer = (correctAnswer, data) => {\n if (!correctAnswer) {\n return data;\n }\n\n let correctResponseDefinition = [];\n\n (data || []).forEach((category, currentIndex) => {\n const { editable, interactive } = category;\n\n const label =\n editable && correctAnswer[currentIndex]?.label\n ? correctAnswer[currentIndex].label\n : category.label;\n\n const value =\n interactive && correctAnswer[currentIndex]?.value\n ? correctAnswer[currentIndex].value\n : category.value;\n\n correctResponseDefinition[currentIndex] = {\n label: label,\n value: value,\n editable: category.editable,\n interactive: category.interactive,\n };\n });\n\n return correctResponseDefinition;\n};\n\nexport class ChartingConfig extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n charts: PropTypes.array,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n dialog: {\n open: false,\n },\n };\n }\n\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback\n );\n\n changeData = (data) => this.props.onChange({ ...this.props.model, data });\n\n changeAddRemoveEnabled = (value) => {\n const { model } = this.props\n const correctAnswer = restoreCorrectAnswer(\n model.correctAnswer.data,\n model.data\n );\n\n if (!value) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `This change will remove any correct answer categories that are not part of the initial item configuration.`,\n onConfirm: () =>\n this.handleAlertDialog(\n false,\n this.props.onChange({\n ...this.props.model,\n addCategoryEnabled: value,\n correctAnswer: { data: correctAnswer },\n })\n ),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n } else {\n this.props.onChange({ ...this.props.model, addCategoryEnabled: value });\n }\n };\n\n render() {\n const { classes, model, charts, showPixelGuides } = this.props;\n const { dialog } = this.state;\n\n return (\n <div>\n Define Initial Chart Attributes\n <div className={classes.container}>\n <div className={classes.column} key=\"graph\">\n <Typography component=\"div\" type=\"body1\">\n <span>\n Use the tools below to set up the chart as it will initially\n appear to students.\n </span>\n </Typography>\n\n <Chart\n defineChart={true}\n showPixelGuides={showPixelGuides}\n chartType={model.chartType}\n size={model.graph}\n domain={model.domain}\n range={model.range}\n charts={charts}\n // index is a property used for setting the correct answer data; it's needed in order to remove categories from other data sets from the same index it was removed from the initial data\n data={model.data.map((category, index) => ({\n ...category,\n index: index,\n }))}\n title={model.title}\n onDataChange={this.changeData}\n addCategoryEnabled={true}\n categoryDefaultLabel={model.categoryDefaultLabel}\n />\n <div>\n <Checkbox\n checked={model.addCategoryEnabled}\n onChange={(e) => {\n this.changeAddRemoveEnabled(e.target.checked);\n }}\n />\n Student can add categories\n </div>\n\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(ChartingConfig);\n"],"file":"charting-config.js"}
1
+ {"version":3,"sources":["../src/charting-config.jsx"],"names":["styles","theme","container","marginTop","spacing","unit","marginBottom","display","flex","column","restoreCorrectAnswer","correctAnswer","data","correctResponseDefinition","forEach","category","currentIndex","editable","interactive","label","value","ChartingConfig","props","open","callback","setState","dialog","onChange","model","title","text","onConfirm","handleAlertDialog","addCategoryEnabled","onClose","type","state","classes","charts","labelsPlaceholders","titlePlaceholder","showPixelGuides","chartType","graph","domain","range","map","index","changeData","changeTitle","changeLabel","categoryDefaultLabel","e","changeAddRemoveEnabled","target","checked","React","Component","PropTypes","object","isRequired","func","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,SAAS,EAAE;AACTC,MAAAA,SAAS,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,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BgB,EAAAA,OAAO,EAAEqB,sBAAUC,MAAV,CAAiBC,UADT;AAEjBhC,EAAAA,KAAK,EAAE8B,sBAAUC,MAAV,CAAiBC,UAFP;AAGjBjC,EAAAA,QAAQ,EAAE+B,sBAAUG,IAAV,CAAeD,UAHR;AAIjBtB,EAAAA,MAAM,EAAEoB,sBAAUI;AAJD,C;;eAgIN,wBAAW9D,MAAX,EAAmBqB,cAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Chart } from '@pie-lib/charting';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Checkbox from '@material-ui/core/Checkbox';\n\nimport Typography from '@material-ui/core/Typography';\n\nconst styles = (theme) => ({\n container: {\n marginTop: theme.spacing.unit * 3,\n marginBottom: theme.spacing.unit * 3,\n display: 'flex',\n flex: 1,\n },\n column: {\n flex: 1,\n },\n});\n\nconst restoreCorrectAnswer = (correctAnswer, data) => {\n if (!correctAnswer) {\n return data;\n }\n\n let correctResponseDefinition = [];\n\n (data || []).forEach((category, currentIndex) => {\n const { editable, interactive } = category;\n\n const label =\n editable && correctAnswer[currentIndex]?.label\n ? correctAnswer[currentIndex].label\n : category.label;\n\n const value =\n interactive && correctAnswer[currentIndex]?.value\n ? correctAnswer[currentIndex].value\n : category.value;\n\n correctResponseDefinition[currentIndex] = {\n label: label,\n value: value,\n editable: category.editable,\n interactive: category.interactive,\n };\n });\n\n return correctResponseDefinition;\n};\n\nexport class ChartingConfig extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n charts: PropTypes.array,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n dialog: {\n open: false,\n },\n };\n }\n\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback\n );\n\n changeData = (data) => this.props.onChange({ ...this.props.model, data });\n\n changeAddRemoveEnabled = (value) => {\n const { model } = this.props\n const correctAnswer = restoreCorrectAnswer(\n model.correctAnswer.data,\n model.data\n );\n\n if (!value) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `This change will remove any correct answer categories that are not part of the initial item configuration.`,\n onConfirm: () =>\n this.handleAlertDialog(\n false,\n this.props.onChange({\n ...this.props.model,\n addCategoryEnabled: value,\n correctAnswer: { data: correctAnswer },\n })\n ),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n } else {\n this.props.onChange({ ...this.props.model, addCategoryEnabled: value });\n }\n };\n\n changeTitle = title => this.props.onChange({ ...this.props.model, title });\n\n changeLabel = (type, label) => this.props.onChange({\n ...this.props.model,\n [type]: {\n ...this.props.model[type],\n label\n },\n })\n\n render() {\n const { classes, model, charts, labelsPlaceholders, titlePlaceholder, showPixelGuides } = this.props;\n const { dialog } = this.state;\n\n return (\n <div>\n Define Initial Chart Attributes\n <div className={classes.container}>\n <div className={classes.column} key=\"graph\">\n <Typography component=\"div\" type=\"body1\">\n <span>\n Use the tools below to set up the chart as it will initially\n appear to students.\n </span>\n </Typography>\n\n <Chart\n defineChart={true}\n showPixelGuides={showPixelGuides}\n chartType={model.chartType}\n size={model.graph}\n domain={model.domain}\n range={model.range}\n charts={charts}\n // index is a property used for setting the correct answer data; it's needed in order to remove categories from other data sets from the same index it was removed from the initial data\n data={model.data.map((category, index) => ({\n ...category,\n index: index,\n }))}\n title={model.title}\n onDataChange={this.changeData}\n onChangeTitle={this.changeTitle}\n onChangeLabels={this.changeLabel}\n addCategoryEnabled={true}\n categoryDefaultLabel={model.categoryDefaultLabel}\n labelsPlaceholders={labelsPlaceholders}\n titlePlaceholder={titlePlaceholder?.label}\n />\n <div>\n <Checkbox\n checked={model.addCategoryEnabled}\n onChange={(e) => {\n this.changeAddRemoveEnabled(e.target.checked);\n }}\n />\n Student can add categories\n </div>\n\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(ChartingConfig);\n"],"file":"charting-config.js"}
@@ -162,7 +162,8 @@ var Configure = /*#__PURE__*/function (_React$Component) {
162
162
  configuration = _this$props.configuration,
163
163
  onConfigurationChanged = _this$props.onConfigurationChanged,
164
164
  onModelChanged = _this$props.onModelChanged,
165
- imageSupport = _this$props.imageSupport;
165
+ imageSupport = _this$props.imageSupport,
166
+ uploadSoundSupport = _this$props.uploadSoundSupport;
166
167
  log('[render] model', model);
167
168
  var graph = model.graph;
168
169
 
@@ -183,14 +184,20 @@ var Configure = /*#__PURE__*/function (_React$Component) {
183
184
  maxImageWidth = _ref2$maxImageWidth === void 0 ? {} : _ref2$maxImageWidth,
184
185
  _ref2$maxImageHeight = _ref2.maxImageHeight,
185
186
  maxImageHeight = _ref2$maxImageHeight === void 0 ? {} : _ref2$maxImageHeight,
187
+ _ref2$labelsPlacehold = _ref2.labelsPlaceholders,
188
+ labelsPlaceholders = _ref2$labelsPlacehold === void 0 ? {} : _ref2$labelsPlacehold,
189
+ _ref2$titlePlaceholde = _ref2.titlePlaceholder,
190
+ titlePlaceholder = _ref2$titlePlaceholde === void 0 ? {} : _ref2$titlePlaceholde,
186
191
  _ref2$chartDimensions = _ref2.chartDimensions,
187
- chartDimensions = _ref2$chartDimensions === void 0 ? {} : _ref2$chartDimensions;
192
+ chartDimensions = _ref2$chartDimensions === void 0 ? {} : _ref2$chartDimensions,
193
+ withRubric = _ref2.withRubric;
188
194
 
189
195
  var _ref3 = model || {},
190
196
  teacherInstructionsEnabled = _ref3.teacherInstructionsEnabled,
191
197
  promptEnabled = _ref3.promptEnabled,
192
198
  rationaleEnabled = _ref3.rationaleEnabled,
193
- spellCheckEnabled = _ref3.spellCheckEnabled;
199
+ spellCheckEnabled = _ref3.spellCheckEnabled,
200
+ rubricEnabled = _ref3.rubricEnabled;
194
201
 
195
202
  var _this$state2 = this.state,
196
203
  gridValues = _this$state2.gridValues,
@@ -211,7 +218,8 @@ var Configure = /*#__PURE__*/function (_React$Component) {
211
218
  rationaleEnabled: rationale.settings && toggle(rationale.label),
212
219
  spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
213
220
  promptEnabled: prompt.settings && toggle(prompt.label),
214
- scoringType: scoringType.settings && radio(scoringType.label, ['all or nothing', 'partial scoring'])
221
+ scoringType: scoringType.settings && radio(scoringType.label, ['all or nothing', 'partial scoring']),
222
+ rubricEnabled: withRubric.settings && toggle(withRubric.label)
215
223
  }
216
224
  }
217
225
  })
@@ -231,7 +239,13 @@ var Configure = /*#__PURE__*/function (_React$Component) {
231
239
  nonEmpty: false,
232
240
  spellCheck: spellCheckEnabled,
233
241
  maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
234
- maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight
242
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
243
+ uploadSoundSupport: uploadSoundSupport,
244
+ languageCharactersProps: [{
245
+ language: 'spanish'
246
+ }, {
247
+ language: 'special'
248
+ }]
235
249
  })), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
236
250
  label: prompt.label,
237
251
  className: classes.promptHolder
@@ -244,7 +258,13 @@ var Configure = /*#__PURE__*/function (_React$Component) {
244
258
  spellCheck: spellCheckEnabled,
245
259
  disableUnderline: true,
246
260
  maxImageWidth: defaultImageMaxWidth,
247
- maxImageHeight: defaultImageMaxHeight
261
+ maxImageHeight: defaultImageMaxHeight,
262
+ uploadSoundSupport: uploadSoundSupport,
263
+ languageCharactersProps: [{
264
+ language: 'spanish'
265
+ }, {
266
+ language: 'special'
267
+ }]
248
268
  })), rationaleEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
249
269
  label: rationale.label || 'Rationale',
250
270
  className: classes.promptHolder
@@ -255,7 +275,13 @@ var Configure = /*#__PURE__*/function (_React$Component) {
255
275
  imageSupport: imageSupport,
256
276
  spellCheck: spellCheckEnabled,
257
277
  maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
258
- maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight
278
+ maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
279
+ uploadSoundSupport: uploadSoundSupport,
280
+ languageCharactersProps: [{
281
+ language: 'spanish'
282
+ }, {
283
+ language: 'special'
284
+ }]
259
285
  })), /*#__PURE__*/_react["default"].createElement(_charting.ConfigureChartPanel, {
260
286
  model: model,
261
287
  onChange: this.onConfigChange,
@@ -267,6 +293,8 @@ var Configure = /*#__PURE__*/function (_React$Component) {
267
293
  model: model,
268
294
  onChange: onModelChanged,
269
295
  charts: charts,
296
+ labelsPlaceholders: labelsPlaceholders,
297
+ titlePlaceholder: titlePlaceholder,
270
298
  showPixelGuides: showPixeGuides
271
299
  }), /*#__PURE__*/_react["default"].createElement(_correctResponse["default"], {
272
300
  config: graph,
@@ -285,6 +313,7 @@ exports.Configure = Configure;
285
313
  onConfigurationChanged: _propTypes["default"].func,
286
314
  classes: _propTypes["default"].object,
287
315
  imageSupport: _propTypes["default"].object,
316
+ uploadSoundSupport: _propTypes["default"].object,
288
317
  model: _propTypes["default"].object.isRequired,
289
318
  configuration: _propTypes["default"].object.isRequired
290
319
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configure.jsx"],"names":["log","Panel","settings","toggle","radio","styles","theme","title","fontSize","display","marginTop","spacing","unit","marginBottom","content","promptHolder","width","paddingBottom","prompt","paddingTop","charts","chartTypes","Bar","Histogram","LineDot","LineCross","DotPlot","LinePlot","Configure","props","rationale","onModelChanged","model","teacherInstructions","chartType","config","state","oldGridValues","gridValues","oldLabelValues","labelValues","updatedModel","graph","range","rangeConstraints","height","setState","step","classes","configuration","onConfigurationChanged","imageSupport","scoringType","studentInstructions","spellCheck","maxImageWidth","maxImageHeight","chartDimensions","teacherInstructionsEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","showPixeGuides","showInConfigPanel","defaultImageMaxWidth","defaultImageMaxHeight","Properties","label","studentInstructionsEnabled","onTeacherInstructionsChange","onPromptChange","onRationaleChange","onConfigChange","React","Component","PropTypes","func","object","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAGA,IAAMA,GAAG,GAAG,uBAAM,iCAAN,CAAZ;AACA,IAAQC,KAAR,GAAiCC,kBAAjC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAiCD,kBAAjC,CAAeC,MAAf;AAAA,IAAuBC,KAAvB,GAAiCF,kBAAjC,CAAuBE,KAAvB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,KAAK,EAAE;AACLC,MAAAA,QAAQ,EAAE,QADL;AAELC,MAAAA,OAAO,EAAE,OAFJ;AAGLC,MAAAA,SAAS,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB,CAH3B;AAILC,MAAAA,YAAY,EAAEP,KAAK,CAACK,OAAN,CAAcC;AAJvB,KADkB;AAOzBE,IAAAA,OAAO,EAAE;AACPJ,MAAAA,SAAS,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB;AADzB,KAPgB;AAUzBG,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,aAAa,EAAEX,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB,CAFxB;AAGZC,MAAAA,YAAY,EAAEP,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB,CAHvB;AAIZF,MAAAA,SAAS,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB;AAJpB,KAVW;AAgBzBM,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAEb,KAAK,CAACK,OAAN,CAAcC,I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1B,SAAjC,IAA8CmC;AAPhE,QAJF,CA7CJ,eA6DE,gCAAC,6BAAD;AACE,QAAA,KAAK,EAAEjC,KADT;AAEE,QAAA,QAAQ,EAAE,KAAKwC,cAFjB;AAGE,QAAA,UAAU,EAAElC,UAHd;AAIE,QAAA,WAAW,EAAEE,WAJf;AAKE,QAAA,eAAe,EAAEiB,eALnB;AAME,QAAA,MAAM,EAAErC;AANV,QA7DF,eAsEE,gCAAC,0BAAD;AACE,QAAA,KAAK,EAAEY,KADT;AAEE,QAAA,QAAQ,EAAED,cAFZ;AAGE,QAAA,MAAM,EAAEX,MAHV;AAIE,QAAA,eAAe,EAAE0C;AAJnB,QAtEF,eA6EE,gCAAC,2BAAD;AACE,QAAA,MAAM,EAAEpB,KADV;AAEE,QAAA,KAAK,EAAEV,KAFT;AAGE,QAAA,QAAQ,EAAED,cAHZ;AAIE,QAAA,MAAM,EAAEX;AAJV,QA7EF,CA9BF,CADF;AAqHD;;;EA3M4BqD,kBAAMC,S;;;iCAAxB9C,S,eACQ;AACjBG,EAAAA,cAAc,EAAE4C,sBAAUC,IADT;AAEjB1B,EAAAA,sBAAsB,EAAEyB,sBAAUC,IAFjB;AAGjB5B,EAAAA,OAAO,EAAE2B,sBAAUE,MAHF;AAIjB1B,EAAAA,YAAY,EAAEwB,sBAAUE,MAJP;AAKjB7C,EAAAA,KAAK,EAAE2C,sBAAUE,MAAV,CAAiBC,UALP;AAMjB7B,EAAAA,aAAa,EAAE0B,sBAAUE,MAAV,CAAiBC;AANf,C;iCADRlD,S,kBAyBW;AAAEoB,EAAAA,OAAO,EAAE;AAAX,C;;eAqLT,wBAAW3C,MAAX,EAAmBuB,SAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { chartTypes, ConfigureChartPanel } from '@pie-lib/charting';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport debug from 'debug';\nimport Typography from '@material-ui/core/Typography';\nimport EditableHtml from '@pie-lib/editable-html';\n\nimport ChartingConfig from './charting-config';\nimport CorrectResponse from './correct-response';\nimport { applyConstraints, getGridValues, getLabelValues } from './utils';\n\n\nconst log = debug('@pie-element:graphing:configure');\nconst { Panel, toggle, radio } = settings;\n\nconst styles = (theme) => ({\n title: {\n fontSize: '1.1rem',\n display: 'block',\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit,\n },\n content: {\n marginTop: theme.spacing.unit * 2,\n },\n promptHolder: {\n width: '100%',\n paddingBottom: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n marginTop: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n});\n\nconst charts = [\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n];\n\nexport class Configure extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n classes: PropTypes.object,\n imageSupport: PropTypes.object,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { range, graph } = props.model || {};\n\n const gridValues = {\n range: getGridValues(range, graph.height, true)\n };\n\n const labelValues = {\n range: getLabelValues(range.step || 1)\n };\n\n this.state = { gridValues, labelValues };\n };\n\n static defaultProps = { classes: {} };\n\n onRationaleChange = (rationale) =>\n this.props.onModelChanged({ ...this.props.model, rationale });\n\n onPromptChange = (prompt) =>\n this.props.onModelChanged({ ...this.props.model, prompt });\n\n onTeacherInstructionsChange = (teacherInstructions) =>\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n\n onChartTypeChange = (chartType) =>\n this.props.onModelChanged({ ...this.props.model, chartType });\n\n onConfigChange = config => {\n const { model } = this.props;\n const { gridValues: oldGridValues, labelValues: oldLabelValues } = this.state;\n const updatedModel = { ...model, ...config };\n const { graph, range } = updatedModel;\n const gridValues = {};\n const labelValues = {};\n\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues;\n labelValues.range = rangeConstraints.labelValues;\n\n this.setState({ gridValues, labelValues });\n this.props.onModelChanged(updatedModel);\n };\n\n render() {\n const {\n classes,\n model,\n configuration,\n onConfigurationChanged,\n onModelChanged,\n imageSupport,\n } = this.props;\n log('[render] model', model);\n const { graph } = model;\n const {\n rationale = {},\n scoringType = {},\n studentInstructions = {},\n teacherInstructions = {},\n prompt = {},\n spellCheck = {},\n maxImageWidth = {},\n maxImageHeight = {},\n chartDimensions = {},\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, rationaleEnabled, spellCheckEnabled } =\n model || {};\n const { gridValues, labelValues } = this.state;\n const showPixeGuides = chartDimensions.showInConfigPanel || true;\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={onModelChanged}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n scoringType:\n scoringType.settings &&\n radio(scoringType.label, [\n 'all or nothing',\n 'partial scoring',\n ]),\n },\n }}\n />\n }\n >\n <div className={classes.content}>\n <Typography component=\"div\" type=\"body1\">\n <span>\n This item type provides various types of interactive charts. Depending upon how an item is configured, students can change the heights of bars (or other similar chart elements) created by the author; relabel bars created by the author; and/or add new bars, label them, and set their heights.\n </span>\n </Typography>\n\n {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.onTeacherInstructionsChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer\n label={prompt.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n disableUnderline\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n />\n </InputContainer>\n )}\n\n {rationaleEnabled && (\n <InputContainer\n label={rationale.label || 'Rationale'}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.rationale || ''}\n onChange={this.onRationaleChange}\n imageSupport={imageSupport}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight}\n />\n </InputContainer>\n )}\n\n <ConfigureChartPanel\n model={model}\n onChange={this.onConfigChange}\n gridValues={gridValues}\n labelValues={labelValues}\n chartDimensions={chartDimensions}\n charts={charts}\n />\n\n <ChartingConfig\n model={model}\n onChange={onModelChanged}\n charts={charts}\n showPixelGuides={showPixeGuides}\n />\n\n <CorrectResponse\n config={graph}\n model={model}\n onChange={onModelChanged}\n charts={charts}\n />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Configure);\n"],"file":"configure.js"}
1
+ {"version":3,"sources":["../src/configure.jsx"],"names":["log","Panel","settings","toggle","radio","styles","theme","title","fontSize","display","marginTop","spacing","unit","marginBottom","content","promptHolder","width","paddingBottom","prompt","paddingTop","charts","chartTypes","Bar","Histogram","LineDot","LineCross","DotPlot","LinePlot","Configure","props","rationale","onModelChanged","model","teacherInstructions","chartType","config","state","oldGridValues","gridValues","oldLabelValues","labelValues","updatedModel","graph","range","rangeConstraints","height","setState","step","classes","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","scoringType","studentInstructions","spellCheck","maxImageWidth","maxImageHeight","labelsPlaceholders","titlePlaceholder","chartDimensions","withRubric","teacherInstructionsEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","rubricEnabled","showPixeGuides","showInConfigPanel","defaultImageMaxWidth","defaultImageMaxHeight","Properties","label","studentInstructionsEnabled","onTeacherInstructionsChange","language","onPromptChange","onRationaleChange","onConfigChange","React","Component","PropTypes","func","object","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAGA,IAAMA,GAAG,GAAG,uBAAM,iCAAN,CAAZ;AACA,IAAQC,KAAR,GAAiCC,kBAAjC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAiCD,kBAAjC,CAAeC,MAAf;AAAA,IAAuBC,KAAvB,GAAiCF,kBAAjC,CAAuBE,KAAvB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,KAAK,EAAE;AACLC,MAAAA,QAAQ,EAAE,QADL;AAELC,MAAAA,OAAO,EAAE,OAFJ;AAGLC,MAAAA,SAAS,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB,CAH3B;AAILC,MAAAA,YAAY,EAAEP,KAAK,CAACK,OAAN,CAAcC;AAJvB,KADkB;AAOzBE,IAAAA,OAAO,EAAE;AACPJ,MAAAA,SAAS,EAAEJ,KAAK,CAACK,OAAN,CAAcC,IAAd,GAAqB;AADzB,KAPgB;AAUzBG,IAAAA,YAAY,EAAE;AACZC,MA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QAAA,QAAQ,EAAE,KAAK8C,cAFjB;AAGE,QAAA,UAAU,EAAExC,UAHd;AAIE,QAAA,WAAW,EAAEE,WAJf;AAKE,QAAA,eAAe,EAAEoB,eALnB;AAME,QAAA,MAAM,EAAExC;AANV,QAnEF,eA4EE,gCAAC,0BAAD;AACE,QAAA,KAAK,EAAEY,KADT;AAEE,QAAA,QAAQ,EAAED,cAFZ;AAGE,QAAA,MAAM,EAAEX,MAHV;AAIE,QAAA,kBAAkB,EAAEsC,kBAJtB;AAKE,QAAA,gBAAgB,EAAEC,gBALpB;AAME,QAAA,eAAe,EAAEQ;AANnB,QA5EF,eAqFE,gCAAC,2BAAD;AACE,QAAA,MAAM,EAAEzB,KADV;AAEE,QAAA,KAAK,EAAEV,KAFT;AAGE,QAAA,QAAQ,EAAED,cAHZ;AAIE,QAAA,MAAM,EAAEX;AAJV,QArFF,CA/BF,CADF;AA8HD;;;EA9N4B2D,kBAAMC,S;;;iCAAxBpD,S,eACQ;AACjBG,EAAAA,cAAc,EAAEkD,sBAAUC,IADT;AAEjBhC,EAAAA,sBAAsB,EAAE+B,sBAAUC,IAFjB;AAGjBlC,EAAAA,OAAO,EAAEiC,sBAAUE,MAHF;AAIjBhC,EAAAA,YAAY,EAAE8B,sBAAUE,MAJP;AAKjB/B,EAAAA,kBAAkB,EAAE6B,sBAAUE,MALb;AAMjBnD,EAAAA,KAAK,EAAEiD,sBAAUE,MAAV,CAAiBC,UANP;AAOjBnC,EAAAA,aAAa,EAAEgC,sBAAUE,MAAV,CAAiBC;AAPf,C;iCADRxD,S,kBA0BW;AAAEoB,EAAAA,OAAO,EAAE;AAAX,C;;eAuMT,wBAAW3C,MAAX,EAAmBuB,SAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport { chartTypes, ConfigureChartPanel } from '@pie-lib/charting';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport debug from 'debug';\nimport Typography from '@material-ui/core/Typography';\nimport EditableHtml from '@pie-lib/editable-html';\n\nimport ChartingConfig from './charting-config';\nimport CorrectResponse from './correct-response';\nimport { applyConstraints, getGridValues, getLabelValues } from './utils';\n\n\nconst log = debug('@pie-element:graphing:configure');\nconst { Panel, toggle, radio } = settings;\n\nconst styles = (theme) => ({\n title: {\n fontSize: '1.1rem',\n display: 'block',\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit,\n },\n content: {\n marginTop: theme.spacing.unit * 2,\n },\n promptHolder: {\n width: '100%',\n paddingBottom: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n marginTop: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n});\n\nconst charts = [\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n];\n\nexport class Configure extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n classes: PropTypes.object,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const { range, graph } = props.model || {};\n\n const gridValues = {\n range: getGridValues(range, graph.height, true)\n };\n\n const labelValues = {\n range: getLabelValues(range.step || 1)\n };\n\n this.state = { gridValues, labelValues };\n };\n\n static defaultProps = { classes: {} };\n\n onRationaleChange = (rationale) =>\n this.props.onModelChanged({ ...this.props.model, rationale });\n\n onPromptChange = (prompt) =>\n this.props.onModelChanged({ ...this.props.model, prompt });\n\n onTeacherInstructionsChange = (teacherInstructions) =>\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n\n onChartTypeChange = (chartType) =>\n this.props.onModelChanged({ ...this.props.model, chartType });\n\n onConfigChange = config => {\n const { model } = this.props;\n const { gridValues: oldGridValues, labelValues: oldLabelValues } = this.state;\n const updatedModel = { ...model, ...config };\n const { graph, range } = updatedModel;\n const gridValues = {};\n const labelValues = {};\n\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues;\n labelValues.range = rangeConstraints.labelValues;\n\n this.setState({ gridValues, labelValues });\n this.props.onModelChanged(updatedModel);\n };\n\n render() {\n const {\n classes,\n model,\n configuration,\n onConfigurationChanged,\n onModelChanged,\n imageSupport,\n uploadSoundSupport\n } = this.props;\n log('[render] model', model);\n const { graph } = model;\n const {\n rationale = {},\n scoringType = {},\n studentInstructions = {},\n teacherInstructions = {},\n prompt = {},\n spellCheck = {},\n maxImageWidth = {},\n maxImageHeight = {},\n labelsPlaceholders = {},\n titlePlaceholder = {},\n chartDimensions = {},\n withRubric,\n } = configuration || {};\n const {\n teacherInstructionsEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n rubricEnabled\n } = model || {};\n const { gridValues, labelValues } = this.state;\n const showPixeGuides = chartDimensions.showInConfigPanel || true;\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={onModelChanged}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n scoringType:\n scoringType.settings &&\n radio(scoringType.label, [\n 'all or nothing',\n 'partial scoring',\n ]),\n rubricEnabled: withRubric.settings && toggle(withRubric.label)\n },\n }}\n />\n }\n >\n <div className={classes.content}>\n <Typography component=\"div\" type=\"body1\">\n <span>\n This item type provides various types of interactive charts. Depending upon how an item is configured, students can change the heights of bars (or other similar chart elements) created by the author; relabel bars created by the author; and/or add new bars, label them, and set their heights.\n </span>\n </Typography>\n\n {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.onTeacherInstructionsChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer\n label={prompt.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n disableUnderline\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n {rationaleEnabled && (\n <InputContainer\n label={rationale.label || 'Rationale'}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.rationale || ''}\n onChange={this.onRationaleChange}\n imageSupport={imageSupport}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth}\n maxImageHeight={maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n <ConfigureChartPanel\n model={model}\n onChange={this.onConfigChange}\n gridValues={gridValues}\n labelValues={labelValues}\n chartDimensions={chartDimensions}\n charts={charts}\n />\n\n <ChartingConfig\n model={model}\n onChange={onModelChanged}\n charts={charts}\n labelsPlaceholders={labelsPlaceholders}\n titlePlaceholder={titlePlaceholder}\n showPixelGuides={showPixeGuides}\n />\n\n <CorrectResponse\n config={graph}\n model={model}\n onChange={onModelChanged}\n charts={charts}\n />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Configure);\n"],"file":"configure.js"}
@@ -87,7 +87,17 @@ var _default = {
87
87
  },
88
88
  title: {
89
89
  settings: false,
90
- label: 'Graph Title'
90
+ label: 'Chart Title'
91
+ },
92
+ titlePlaceholder: {
93
+ settings: false,
94
+ label: 'Click here to add a title'
95
+ },
96
+ labelsPlaceholders: {
97
+ left: 'Click here to add a label for this axis',
98
+ right: '',
99
+ top: '',
100
+ bottom: 'Click here to add a label for this axis'
91
101
  },
92
102
  maxImageWidth: {
93
103
  teacherInstructions: 300,
@@ -98,6 +108,10 @@ var _default = {
98
108
  teacherInstructions: 300,
99
109
  prompt: 300,
100
110
  rationale: 300
111
+ },
112
+ withRubric: {
113
+ settings: false,
114
+ label: 'Add Rubric'
101
115
  }
102
116
  }
103
117
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","addCategoryEnabled","categoryDefaultLabel","chartType","correctAnswer","data","domain","label","graph","width","height","prompt","promptEnabled","rationale","range","max","min","scoringType","title","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","settings","enabled","chartDimensions","showInConfigPanel","step","studentInstructions","teacherInstructions","maxImageWidth","maxImageHeight"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,IADf;AAELC,IAAAA,oBAAoB,EAAE,UAFjB;AAGLC,IAAAA,SAAS,EAAE,WAHN;AAILC,IAAAA,aAAa,EA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,KAAK,EAAE;AAFD,KArBK;AAyBbM,IAAAA,SAAS,EAAE;AACTW,MAAAA,QAAQ,EAAE,IADD;AAETjB,MAAAA,KAAK,EAAE;AAFE,KAzBE;AA6BbU,IAAAA,WAAW,EAAE;AACXO,MAAAA,QAAQ,EAAE,KADC;AAEXjB,MAAAA,KAAK,EAAE;AAFI,KA7BA;AAiCbsB,IAAAA,mBAAmB,EAAE;AACnBL,MAAAA,QAAQ,EAAE,KADS;AAEnBjB,MAAAA,KAAK,EAAE;AAFY,KAjCR;AAqCbuB,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,IADS;AAEnBjB,MAAAA,KAAK,EAAE;AAFY,KArCR;AAyCbW,IAAAA,KAAK,EAAE;AACLM,MAAAA,QAAQ,EAAE,KADL;AAELjB,MAAAA,KAAK,EAAE;AAFF,KAzCM;AA6CbwB,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE,GADR;AAEbnB,MAAAA,MAAM,EAAE,GAFK;AAGbE,MAAAA,SAAS,EAAE;AAHE,KA7CF;AAkDbmB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdnB,MAAAA,MAAM,EAAE,GAFM;AAGdE,MAAAA,SAAS,EAAE;AAHG;AAlDH;AA5BF,C","sourcesContent":["/**\n * NOTE: There's no functionality described for graphTitle,\n * rationale, scoringType, studentInstructions, teacherInstructions\n * so there's no implementation (they are only added in model)\n */\n\n\n// const createCategory = (label, value) => ({\n// label,\n// value,\n// interactive: true,\n// editable: true\n// });\n\nexport default {\n model: {\n addCategoryEnabled: true,\n categoryDefaultLabel: 'Category',\n chartType: 'lineCross',\n correctAnswer: {},\n data: [],\n domain: {\n label: 'Fruits',\n },\n graph: {\n width: 480,\n height: 480\n },\n prompt: 'Here goes item stem!',\n promptEnabled: true,\n rationale: 'Rationale goes here!',\n range: {\n label: 'Amount',\n max: 5.5,\n min: 0,\n },\n scoringType: 'all or nothing',\n title: 'This is a chart!',\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 chartDimensions: {\n settings: false,\n label: 'Chart Dimensions',\n showInConfigPanel: true,\n width: {\n min: 50,\n max: 700,\n step: 20\n },\n height: {\n min: 400,\n max: 700,\n step: 20\n },\n },\n prompt: {\n settings: true,\n label: 'Item Stem'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type'\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n title: {\n settings: false,\n label: 'Graph Title'\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n }\n }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","addCategoryEnabled","categoryDefaultLabel","chartType","correctAnswer","data","domain","label","graph","width","height","prompt","promptEnabled","rationale","range","max","min","scoringType","title","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","settings","enabled","chartDimensions","showInConfigPanel","step","studentInstructions","teacherInstructions","titlePlaceholder","labelsPlaceholders","left","right","top","bottom","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,IADf;AAELC,IAAAA,oBAAoB,EAAE,UAFjB;AAGLC,IAAAA,SAAS,EAAE,WAHN;AAILC,IAAAA,aAAa,EAAE,EAJV;AAKLC,IAAAA,IAAI,EAAE,EALD;AAMLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE;AADD,KANH;AASLC,IAAAA,KAA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zBE;AA6BbU,IAAAA,WAAW,EAAE;AACXO,MAAAA,QAAQ,EAAE,KADC;AAEXjB,MAAAA,KAAK,EAAE;AAFI,KA7BA;AAiCbsB,IAAAA,mBAAmB,EAAE;AACnBL,MAAAA,QAAQ,EAAE,KADS;AAEnBjB,MAAAA,KAAK,EAAE;AAFY,KAjCR;AAqCbuB,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,IADS;AAEnBjB,MAAAA,KAAK,EAAE;AAFY,KArCR;AAyCbW,IAAAA,KAAK,EAAE;AACLM,MAAAA,QAAQ,EAAE,KADL;AAELjB,MAAAA,KAAK,EAAE;AAFF,KAzCM;AA6CbwB,IAAAA,gBAAgB,EAAE;AAChBP,MAAAA,QAAQ,EAAE,KADM;AAEhBjB,MAAAA,KAAK,EAAE;AAFS,KA7CL;AAiDbyB,IAAAA,kBAAkB,EAAE;AAClBC,MAAAA,IAAI,EAAE,yCADY;AAElBC,MAAAA,KAAK,EAAE,EAFW;AAGlBC,MAAAA,GAAG,EAAE,EAHa;AAIlBC,MAAAA,MAAM,EAAE;AAJU,KAjDP;AAuDbC,IAAAA,aAAa,EAAE;AACbP,MAAAA,mBAAmB,EAAE,GADR;AAEbnB,MAAAA,MAAM,EAAE,GAFK;AAGbE,MAAAA,SAAS,EAAE;AAHE,KAvDF;AA4DbyB,IAAAA,cAAc,EAAE;AACdR,MAAAA,mBAAmB,EAAE,GADP;AAEdnB,MAAAA,MAAM,EAAE,GAFM;AAGdE,MAAAA,SAAS,EAAE;AAHG,KA5DH;AAiEb0B,IAAAA,UAAU,EAAE;AACVf,MAAAA,QAAQ,EAAE,KADA;AAEVjB,MAAAA,KAAK,EAAE;AAFG;AAjEC;AA5BF,C","sourcesContent":["/**\n * NOTE: There's no functionality described for graphTitle,\n * rationale, scoringType, studentInstructions, teacherInstructions\n * so there's no implementation (they are only added in model)\n */\n\n// const createCategory = (label, value) => ({\n// label,\n// value,\n// interactive: true,\n// editable: true\n// });\n\nexport default {\n model: {\n addCategoryEnabled: true,\n categoryDefaultLabel: 'Category',\n chartType: 'lineCross',\n correctAnswer: {},\n data: [],\n domain: {\n label: 'Fruits',\n },\n graph: {\n width: 480,\n height: 480,\n },\n prompt: 'Here goes item stem!',\n promptEnabled: true,\n rationale: 'Rationale goes here!',\n range: {\n label: 'Amount',\n max: 5.5,\n min: 0,\n },\n scoringType: 'all or nothing',\n title: 'This is a chart!',\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 chartDimensions: {\n settings: false,\n label: 'Chart Dimensions',\n showInConfigPanel: true,\n width: {\n min: 50,\n max: 700,\n step: 20,\n },\n height: {\n min: 400,\n max: 700,\n step: 20,\n },\n },\n prompt: {\n settings: true,\n label: 'Item Stem',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n title: {\n settings: false,\n label: 'Chart Title',\n },\n titlePlaceholder: {\n settings: false,\n label: 'Click here to add a title',\n },\n labelsPlaceholders: {\n left: 'Click here to add a label for this axis',\n right: '',\n top: '',\n bottom: 'Click here to add a label for this axis',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric'\n }\n },\n};\n"],"file":"defaults.js"}
@@ -33,6 +33,8 @@ var _configure = _interopRequireDefault(require("./configure"));
33
33
 
34
34
  var _defaults = _interopRequireDefault(require("./defaults"));
35
35
 
36
+ var _mathRendering = require("@pie-lib/math-rendering");
37
+
36
38
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
39
 
38
40
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -99,9 +101,21 @@ var GraphLinesConfigure = /*#__PURE__*/function (_HTMLElement) {
99
101
  value: function onDeleteImage(src, done) {
100
102
  this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
101
103
  }
104
+ }, {
105
+ key: "insertSound",
106
+ value: function insertSound(handler) {
107
+ this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
108
+ }
109
+ }, {
110
+ key: "onDeleteSound",
111
+ value: function onDeleteSound(src, done) {
112
+ this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
113
+ }
102
114
  }, {
103
115
  key: "_render",
104
116
  value: function _render() {
117
+ var _this2 = this;
118
+
105
119
  if (this._model) {
106
120
  var el = /*#__PURE__*/_react["default"].createElement(_configure["default"], {
107
121
  onModelChanged: this.onModelChanged.bind(this),
@@ -111,10 +125,16 @@ var GraphLinesConfigure = /*#__PURE__*/function (_HTMLElement) {
111
125
  imageSupport: {
112
126
  add: this.insertImage.bind(this),
113
127
  "delete": this.onDeleteImage.bind(this)
128
+ },
129
+ uploadSoundSupport: {
130
+ add: this.insertSound.bind(this),
131
+ "delete": this.onDeleteSound.bind(this)
114
132
  }
115
133
  });
116
134
 
117
- _reactDom["default"].render(el, this);
135
+ _reactDom["default"].render(el, this, function () {
136
+ (0, _mathRendering.renderMath)(_this2);
137
+ });
118
138
  }
119
139
  }
120
140
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","GraphLinesConfigure","_model","createDefaultModel","_configuration","defaultValues","configuration","m","_render","c","model","dispatchEvent","ModelUpdatedEvent","config","handler","InsertImageEvent","src","done","DeleteImageEvent","el","React","createElement","Configure","onModelChanged","bind","onConfigurationChanged","imageSupport","add","insertImage","onDeleteImage","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,iCAAN,CAAZ;;IAEqBC,mB;;;;;AAGnB,iCAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAcD,mBAAmB,CAACE,kBAApB,EAAd;AACA,UAAKC,cAAL,GAAsBC,qBAAcC,aAApC;AAHY;AAIb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKL,MAAL,GAAcD,mBAAmB,CAACE,kBAApB,CAAuCI,CAAvC,CAAd;;AACA,WAAKC,OAAL;AACD;;;SAED,aAAkBC,CAAlB,EAAqB;AACnB,WAAKL,cAAL,GAAsBK,CAAtB;;AACA,WAAKD,OAAL;AACD;;;WAED,wBAAeE,KAAf,EAAsB;AACpB,WAAKR,MAAL,GAAcQ,KAAd;;AACA,WAAKF,OAAL;;AACAR,MAAAA,GAAG,CAAC,oBAAD,EAAuB,KAAKE,MAA5B,CAAH;AACA,WAAKS,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,KAAKV,MAA3B,CAAnB;AACD;;;WAED,gCAAuBW,MAAvB,EAA+B;AAC7B,WAAKT,cAAL,GAAsBS,MAAtB;;AACA,WAAKL,OAAL;AACD;;;WAED,qBAAYM,OAAZ,EAAqB;AACnB,WAAKH,aAAL,CAAmB,IAAII,oCAAJ,CAAqBD,OAArB,CAAnB;AACD;;;WAED,uBAAcE,GAAd,EAAmBC,IAAnB,EAAyB;AACvB,WAAKN,aAAL,CAAmB,IAAIO,oCAAJ,CAAqBF,GAArB,EAA0BC,IAA1B,CAAnB;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKf,MAAT,EAAiB;AACf,YAAMiB,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,qBAApB,EAA+B;AACxCC,UAAAA,cAAc,EAAE,KAAKA,cAAL,CAAoBC,IAApB,CAAyB,IAAzB,CADwB;AAExCC,UAAAA,sBAAsB,EAAE,KAAKA,sBAAL,CAA4BD,IAA5B,CAAiC,IAAjC,CAFgB;AAGxCd,UAAAA,KAAK,EAAE,KAAKR,MAH4B;AAIxCI,UAAAA,aAAa,EAAE,KAAKF,cAJoB;AAKxCsB,UAAAA,YAAY,EAAE;AACZC,YAAAA,GAAG,EAAE,KAAKC,WAAL,CAAiBJ,IAAjB,CAAsB,IAAtB,CADO;AAEZ,sBAAQ,KAAKK,aAAL,CAAmBL,IAAnB,CAAwB,IAAxB;AAFI;AAL0B,SAA/B,CAAX;;AAUAM,6BAASC,MAAT,CAAgBZ,EAAhB,EAAoB,IAApB;AACD;AACF;;;kDArD8Ca,W;;;iCAA5B/B,mB,wBACS;AAAA,MAACS,KAAD,uEAAS,EAAT;AAAA,yCAAsBL,qBAAcK,KAApC,GAA8CA,KAA9C;AAAA,C","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { DeleteImageEvent, InsertImageEvent, ModelUpdatedEvent } from '@pie-framework/pie-configure-events';\nimport debug from 'debug';\nimport Configure from './configure';\nimport defaultValues from './defaults';\n\nconst log = debug('pie-elements:graphing:configure');\n\nexport default class GraphLinesConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({ ...defaultValues.model, ...model });\n\n constructor() {\n super();\n this._model = GraphLinesConfigure.createDefaultModel();\n this._configuration = defaultValues.configuration;\n }\n\n set model(m) {\n this._model = GraphLinesConfigure.createDefaultModel(m);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n onModelChanged(model) {\n this._model = model;\n this._render();\n log('[onModelChanged]: ', this._model);\n this.dispatchEvent(new ModelUpdatedEvent(this._model));\n }\n\n onConfigurationChanged(config) {\n this._configuration = config;\n this._render();\n }\n\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n _render() {\n if (this._model) {\n const el = React.createElement(Configure, {\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n model: this._model,\n configuration: this._configuration,\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this)\n }\n });\n ReactDOM.render(el, this);\n }\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","GraphLinesConfigure","_model","createDefaultModel","_configuration","defaultValues","configuration","m","_render","c","model","dispatchEvent","ModelUpdatedEvent","config","handler","InsertImageEvent","src","done","DeleteImageEvent","InsertSoundEvent","DeleteSoundEvent","el","React","createElement","Configure","onModelChanged","bind","onConfigurationChanged","imageSupport","add","insertImage","onDeleteImage","uploadSoundSupport","insertSound","onDeleteSound","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,iCAAN,CAAZ;;IAEqBC,mB;;;;;AAGnB,iCAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAcD,mBAAmB,CAACE,kBAApB,EAAd;AACA,UAAKC,cAAL,GAAsBC,qBAAcC,aAApC;AAHY;AAIb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKL,MAAL,GAAcD,mBAAmB,CAACE,kBAApB,CAAuCI,CAAvC,CAAd;;AACA,WAAKC,OAAL;AACD;;;SAED,aAAkBC,CAAlB,EAAqB;AACnB,WAAKL,cAAL,GAAsBK,CAAtB;;AACA,WAAKD,OAA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;AAEZ,sBAAQ,KAAKK,aAAL,CAAmBL,IAAnB,CAAwB,IAAxB;AAFI,WAL0B;AASxCM,UAAAA,kBAAkB,EAAE;AAClBH,YAAAA,GAAG,EAAE,KAAKI,WAAL,CAAiBP,IAAjB,CAAsB,IAAtB,CADa;AAElB,sBAAQ,KAAKQ,aAAL,CAAmBR,IAAnB,CAAwB,IAAxB;AAFU;AAToB,SAA/B,CAAX;;AAeAS,6BAASC,MAAT,CAAgBf,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,MAAX;AACD,SAFD;AAGD;AACF;;;kDApE8CgB,W;;;iCAA5BpC,mB,wBACS;AAAA,MAACS,KAAD,uEAAS,EAAT;AAAA,yCAAsBL,qBAAcK,KAApC,GAA8CA,KAA9C;AAAA,C","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent\n} from '@pie-framework/pie-configure-events';\nimport debug from 'debug';\nimport Configure from './configure';\nimport defaultValues from './defaults';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nconst log = debug('pie-elements:graphing:configure');\n\nexport default class GraphLinesConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({ ...defaultValues.model, ...model });\n\n constructor() {\n super();\n this._model = GraphLinesConfigure.createDefaultModel();\n this._configuration = defaultValues.configuration;\n }\n\n set model(m) {\n this._model = GraphLinesConfigure.createDefaultModel(m);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n onModelChanged(model) {\n this._model = model;\n this._render();\n log('[onModelChanged]: ', this._model);\n this.dispatchEvent(new ModelUpdatedEvent(this._model));\n }\n\n onConfigurationChanged(config) {\n this._configuration = config;\n this._render();\n }\n\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n if (this._model) {\n const el = React.createElement(Configure, {\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n model: this._model,\n configuration: this._configuration,\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this)\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this)\n }\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@pie-element/charting-configure",
3
3
  "private": true,
4
- "version": "5.0.9",
4
+ "version": "5.0.10",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "author": "",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
- "@pie-framework/pie-configure-events": "^1.2.0",
12
- "@pie-lib/charting": "^5.1.8",
13
- "@pie-lib/config-ui": "^11.0.16",
14
- "@pie-lib/editable-html": "^9.1.6",
11
+ "@pie-framework/pie-configure-events": "^1.3.0",
12
+ "@pie-lib/charting": "^5.3.0",
13
+ "@pie-lib/config-ui": "^11.0.20",
14
+ "@pie-lib/editable-html": "^9.2.2",
15
+ "@pie-lib/math-rendering": "^2.5.0",
15
16
  "classnames": "^2.2.5",
16
17
  "debug": "^4.1.1",
17
18
  "prop-types": "^15.6.2",
@@ -51,6 +51,63 @@
51
51
  }
52
52
  }
53
53
  },
54
+ "titlePlaceholder": {
55
+ "title": "ConfigureProp",
56
+ "type": "object",
57
+ "properties": {
58
+ "settings": {
59
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
60
+ "type": "boolean",
61
+ "title": "settings"
62
+ },
63
+ "label": {
64
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
65
+ "type": "string",
66
+ "title": "label"
67
+ }
68
+ }
69
+ },
70
+ "labelsPlaceholders": {
71
+ "title": "LabelsPlaceholderConfigProp",
72
+ "type": "object",
73
+ "properties": {
74
+ "top": {
75
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
76
+ "type": "string",
77
+ "title": "top"
78
+ },
79
+ "right": {
80
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
81
+ "type": "string",
82
+ "title": "right"
83
+ },
84
+ "bottom": {
85
+ "description": "Indicates the placeholder for the bottom label",
86
+ "type": "string",
87
+ "title": "bottom"
88
+ },
89
+ "left": {
90
+ "description": "Indicates the placeholder for the left label",
91
+ "type": "string",
92
+ "title": "left"
93
+ },
94
+ "settings": {
95
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
96
+ "type": "boolean",
97
+ "title": "settings"
98
+ },
99
+ "label": {
100
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
101
+ "type": "string",
102
+ "title": "label"
103
+ },
104
+ "enabled": {
105
+ "description": "Indicates the value of the item if it affects config-ui\n(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)",
106
+ "type": "boolean",
107
+ "title": "enabled"
108
+ }
109
+ }
110
+ },
54
111
  "scoringType": {
55
112
  "title": "ConfigureProp",
56
113
  "type": "object",
@@ -162,6 +219,22 @@
162
219
  }
163
220
  }
164
221
  },
222
+ "withRubric": {
223
+ "title": "ConfigureProp",
224
+ "type": "object",
225
+ "properties": {
226
+ "settings": {
227
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
228
+ "type": "boolean",
229
+ "title": "settings"
230
+ },
231
+ "label": {
232
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
233
+ "type": "string",
234
+ "title": "label"
235
+ }
236
+ }
237
+ },
165
238
  "showPrompt": {
166
239
  "description": "Determines whether prompt field will be displayed or not",
167
240
  "default": true,
@@ -198,6 +271,47 @@
198
271
  }
199
272
  }
200
273
  },
274
+ "LabelsPlaceholderConfigProp": {
275
+ "title": "LabelsPlaceholderConfigProp",
276
+ "type": "object",
277
+ "properties": {
278
+ "top": {
279
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
280
+ "type": "string",
281
+ "title": "top"
282
+ },
283
+ "right": {
284
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
285
+ "type": "string",
286
+ "title": "right"
287
+ },
288
+ "bottom": {
289
+ "description": "Indicates the placeholder for the bottom label",
290
+ "type": "string",
291
+ "title": "bottom"
292
+ },
293
+ "left": {
294
+ "description": "Indicates the placeholder for the left label",
295
+ "type": "string",
296
+ "title": "left"
297
+ },
298
+ "settings": {
299
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
300
+ "type": "boolean",
301
+ "title": "settings"
302
+ },
303
+ "label": {
304
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
305
+ "type": "string",
306
+ "title": "label"
307
+ },
308
+ "enabled": {
309
+ "description": "Indicates the value of the item if it affects config-ui\n(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)",
310
+ "type": "boolean",
311
+ "title": "enabled"
312
+ }
313
+ }
314
+ },
201
315
  "ConfigurePropWithEnabled": {
202
316
  "title": "ConfigurePropWithEnabled",
203
317
  "type": "object",
@@ -242,4 +356,4 @@
242
356
  }
243
357
  },
244
358
  "$schema": "http://json-schema.org/draft-07/schema#"
245
- }
359
+ }
@@ -38,6 +38,51 @@ Indicates if the item has to be displayed in the Settings Panel
38
38
 
39
39
  Indicates the label for the item that has to be displayed in the Settings Panel
40
40
 
41
+ # `titlePlaceholder` (object)
42
+
43
+ Properties of the `titlePlaceholder` object:
44
+
45
+ ## `settings` (boolean)
46
+
47
+ Indicates if the item has to be displayed in the Settings Panel
48
+
49
+ ## `label` (string)
50
+
51
+ Indicates the label for the item that has to be displayed in the Settings Panel
52
+
53
+ # `labelsPlaceholders` (object)
54
+
55
+ Properties of the `labelsPlaceholders` object:
56
+
57
+ ## `top` (string)
58
+
59
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
60
+
61
+ ## `right` (string)
62
+
63
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
64
+
65
+ ## `bottom` (string)
66
+
67
+ Indicates the placeholder for the bottom label
68
+
69
+ ## `left` (string)
70
+
71
+ Indicates the placeholder for the left label
72
+
73
+ ## `settings` (boolean)
74
+
75
+ Indicates if the item has to be displayed in the Settings Panel
76
+
77
+ ## `label` (string)
78
+
79
+ Indicates the label for the item that has to be displayed in the Settings Panel
80
+
81
+ ## `enabled` (boolean)
82
+
83
+ Indicates the value of the item if it affects config-ui
84
+ (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
85
+
41
86
  # `scoringType` (object)
42
87
 
43
88
  Properties of the `scoringType` object:
@@ -123,6 +168,18 @@ Indicates the max dimension for images in prompt - this is also the default dime
123
168
 
124
169
  Indicates the max dimension for images in rationale
125
170
 
171
+ # `withRubric` (object)
172
+
173
+ Properties of the `withRubric` object:
174
+
175
+ ## `settings` (boolean)
176
+
177
+ Indicates if the item has to be displayed in the Settings Panel
178
+
179
+ ## `label` (string)
180
+
181
+ Indicates the label for the item that has to be displayed in the Settings Panel
182
+
126
183
  # `showPrompt` (boolean)
127
184
 
128
185
  Determines whether prompt field will be displayed or not
@@ -159,6 +216,39 @@ Indicates if the item has to be displayed in the Settings Panel
159
216
 
160
217
  Indicates the label for the item that has to be displayed in the Settings Panel
161
218
 
219
+ ## `LabelsPlaceholderConfigProp` (object)
220
+
221
+ Properties of the `LabelsPlaceholderConfigProp` object:
222
+
223
+ ### `top` (string)
224
+
225
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
226
+
227
+ ### `right` (string)
228
+
229
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
230
+
231
+ ### `bottom` (string)
232
+
233
+ Indicates the placeholder for the bottom label
234
+
235
+ ### `left` (string)
236
+
237
+ Indicates the placeholder for the left label
238
+
239
+ ### `settings` (boolean)
240
+
241
+ Indicates if the item has to be displayed in the Settings Panel
242
+
243
+ ### `label` (string)
244
+
245
+ Indicates the label for the item that has to be displayed in the Settings Panel
246
+
247
+ ### `enabled` (boolean)
248
+
249
+ Indicates the value of the item if it affects config-ui
250
+ (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
251
+
162
252
  ## `ConfigurePropWithEnabled` (object)
163
253
 
164
254
  Properties of the `ConfigurePropWithEnabled` object:
@@ -57,4 +57,5 @@ exports.model = (id, element) => ({
57
57
  labelStep: 1,
58
58
  },
59
59
  title: 'This is a chart!',
60
+ rubricEnabled: false
60
61
  });
@@ -463,6 +463,26 @@
463
463
  "type": "string",
464
464
  "title": "title"
465
465
  },
466
+ "placeholderMessages": {
467
+ "title": "Placeholder",
468
+ "type": "object",
469
+ "properties": {
470
+ "title": {
471
+ "description": "Indicates placeholder message if title is not defined",
472
+ "type": "string",
473
+ "title": "title"
474
+ },
475
+ "labels": {
476
+ "description": "Indicates placeholder message if labels for range or domain are not defined",
477
+ "type": "string",
478
+ "title": "labels"
479
+ }
480
+ },
481
+ "required": [
482
+ "labels",
483
+ "title"
484
+ ]
485
+ },
466
486
  "rationaleEnabled": {
467
487
  "description": "Indicates if Rationale are enabled",
468
488
  "type": "boolean",
@@ -483,6 +503,11 @@
483
503
  "type": "boolean",
484
504
  "title": "teacherInstructionsEnabled"
485
505
  },
506
+ "rubricEnabled": {
507
+ "description": "Indicates if Rubric is enabled",
508
+ "type": "boolean",
509
+ "title": "rubricEnabled"
510
+ },
486
511
  "id": {
487
512
  "description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.",
488
513
  "type": "string",
@@ -506,6 +531,7 @@
506
531
  "id",
507
532
  "range",
508
533
  "rationaleEnabled",
534
+ "rubricEnabled",
509
535
  "spellCheckEnabled",
510
536
  "studentInstructionsEnabled",
511
537
  "teacherInstructionsEnabled"
@@ -527,6 +553,47 @@
527
553
  }
528
554
  }
529
555
  },
556
+ "LabelsPlaceholderConfigProp": {
557
+ "title": "LabelsPlaceholderConfigProp",
558
+ "type": "object",
559
+ "properties": {
560
+ "top": {
561
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
562
+ "type": "string",
563
+ "title": "top"
564
+ },
565
+ "right": {
566
+ "description": "This value is empty for charting. The property exist in order to be consistent with graphing configuration.",
567
+ "type": "string",
568
+ "title": "right"
569
+ },
570
+ "bottom": {
571
+ "description": "Indicates the placeholder for the bottom label",
572
+ "type": "string",
573
+ "title": "bottom"
574
+ },
575
+ "left": {
576
+ "description": "Indicates the placeholder for the left label",
577
+ "type": "string",
578
+ "title": "left"
579
+ },
580
+ "settings": {
581
+ "description": "Indicates if the item has to be displayed in the Settings Panel",
582
+ "type": "boolean",
583
+ "title": "settings"
584
+ },
585
+ "label": {
586
+ "description": "Indicates the label for the item that has to be displayed in the Settings Panel",
587
+ "type": "string",
588
+ "title": "label"
589
+ },
590
+ "enabled": {
591
+ "description": "Indicates the value of the item if it affects config-ui\n(eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)",
592
+ "type": "boolean",
593
+ "title": "enabled"
594
+ }
595
+ }
596
+ },
530
597
  "ConfigurePropWithEnabled": {
531
598
  "title": "ConfigurePropWithEnabled",
532
599
  "type": "object",
@@ -851,6 +918,26 @@
851
918
  "height",
852
919
  "width"
853
920
  ]
921
+ },
922
+ "Placeholder": {
923
+ "title": "Placeholder",
924
+ "type": "object",
925
+ "properties": {
926
+ "title": {
927
+ "description": "Indicates placeholder message if title is not defined",
928
+ "type": "string",
929
+ "title": "title"
930
+ },
931
+ "labels": {
932
+ "description": "Indicates placeholder message if labels for range or domain are not defined",
933
+ "type": "string",
934
+ "title": "labels"
935
+ }
936
+ },
937
+ "required": [
938
+ "labels",
939
+ "title"
940
+ ]
854
941
  }
855
942
  },
856
943
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -138,6 +138,18 @@ Indicates teacher instructions
138
138
 
139
139
  Indicates chart title
140
140
 
141
+ # `placeholderMessages` (object)
142
+
143
+ Properties of the `placeholderMessages` object:
144
+
145
+ ## `title` (string, required)
146
+
147
+ Indicates placeholder message if title is not defined
148
+
149
+ ## `labels` (string, required)
150
+
151
+ Indicates placeholder message if labels for range or domain are not defined
152
+
141
153
  # `rationaleEnabled` (boolean, required)
142
154
 
143
155
  Indicates if Rationale are enabled
@@ -154,6 +166,10 @@ Indicates if Student Instructions are enabled
154
166
 
155
167
  Indicates if Teacher Instructions are enabled
156
168
 
169
+ # `rubricEnabled` (boolean, required)
170
+
171
+ Indicates if Rubric is enabled
172
+
157
173
  # `id` (string, required)
158
174
 
159
175
  Identifier to identify the Pie Element in html markup, Must be unique within a pie item config.
@@ -180,6 +196,39 @@ Indicates if the item has to be displayed in the Settings Panel
180
196
 
181
197
  Indicates the label for the item that has to be displayed in the Settings Panel
182
198
 
199
+ ## `LabelsPlaceholderConfigProp` (object)
200
+
201
+ Properties of the `LabelsPlaceholderConfigProp` object:
202
+
203
+ ### `top` (string)
204
+
205
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
206
+
207
+ ### `right` (string)
208
+
209
+ This value is empty for charting. The property exist in order to be consistent with graphing configuration.
210
+
211
+ ### `bottom` (string)
212
+
213
+ Indicates the placeholder for the bottom label
214
+
215
+ ### `left` (string)
216
+
217
+ Indicates the placeholder for the left label
218
+
219
+ ### `settings` (boolean)
220
+
221
+ Indicates if the item has to be displayed in the Settings Panel
222
+
223
+ ### `label` (string)
224
+
225
+ Indicates the label for the item that has to be displayed in the Settings Panel
226
+
227
+ ### `enabled` (boolean)
228
+
229
+ Indicates the value of the item if it affects config-ui
230
+ (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)
231
+
183
232
  ## `ConfigurePropWithEnabled` (object)
184
233
 
185
234
  Properties of the `ConfigurePropWithEnabled` object:
@@ -307,4 +356,16 @@ Width for chart representation
307
356
 
308
357
  ### `height` (number, required)
309
358
 
310
- Height for chart representation
359
+ Height for chart representation
360
+
361
+ ## `Placeholder` (object)
362
+
363
+ Properties of the `Placeholder` object:
364
+
365
+ ### `title` (string, required)
366
+
367
+ Indicates placeholder message if title is not defined
368
+
369
+ ### `labels` (string, required)
370
+
371
+ Indicates placeholder message if labels for range or domain are not defined
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main.jsx"],"names":["Main","props","data","setState","categories","onAnswersChange","showingCorrect","state","model","nextProps","nextData","classes","teacherInstructions","prompt","chartType","size","domain","range","title","addCategoryEnabled","categoryDefaultLabel","rationale","correctedAnswer","correctAnswer","correctData","map","interactive","editable","showToggle","length","mainContainer","toggleCorrect","hidden","visible","chartTypes","Bar","Histogram","LineDot","LineCross","DotPlot","LinePlot","changeData","React","Component","PropTypes","object","isRequired","func","array","styles","theme","padding","spacing","unit","color","text","backgroundColor","background","overflow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;AAUX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,mGAkBN,UAACC,IAAD;AAAA,aACX,MAAKC,QAAL,CACE;AACEC,QAAAA,UAAU,EAAEF;AADd,OADF,EAIE;AAAA,eAAM,MAAKD,KAAL,CAAWI,eAAX,CAA2BH,IAA3B,CAAN;AAAA,OAJF,CADW;AAAA,KAlBM;AAAA,sGA0BH,UAACI,cAAD;AAAA,aAAoB,MAAKH,QAAL,CAAc;AAAEG,QAAAA,cAAc,EAAdA;AAAF,OAAd,CAApB;AAAA,KA1BG;AAGjB,UAAKC,KAAL,GAAa;AACXH,MAAAA,UAAU,EAAEH,KAAK,CAACG,UAAN,IAAoBH,KAAK,CAACO,KAAN,CAAYN,IADjC;AAEXI,MAAAA,cAAc,EAAE;AAFL,KAAb;AAHiB;AAOlB;;;;WAED,0CAAiCG,SAAjC,EAA4C;AAC1C,6BAAgDA,SAAhD,CAAQD,KAAR;AAAA,uDAAyC,EAAzC;AAAA,mDAAiBN,IAAjB;AAAA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;AACzBpB,IAAAA,aAAa,EAAE;AACbqB,MAAAA,OAAO,EAAED,KAAK,CAACE,OAAN,CAAcC,IADV;AAEbC,MAAAA,KAAK,EAAEA,gBAAMC,IAAN,EAFM;AAGbC,MAAAA,eAAe,EAAEF,gBAAMG,UAAN,EAHJ;AAIbC,MAAAA,QAAQ,EAAE;AAJG;AADU,GAAZ;AAAA,CAAf;;eASe,wBAAWT,MAAX,EAAmBjD,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {color, Collapsible, hasText, PreviewPrompt} from '@pie-lib/render-ui';\nimport { Chart, chartTypes } from '@pie-lib/charting';\nimport isEqual from 'lodash/isEqual';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n categories: PropTypes.array,\n };\n\n static defaultProps = { classes: {} };\n\n constructor(props) {\n super(props);\n\n this.state = {\n categories: props.categories || props.model.data,\n showingCorrect: false,\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { model: { data: nextData = [] } = {} } = nextProps;\n const { model: { data = [] } = {} } = this.props;\n\n if (!isEqual(nextData, data)) {\n this.setState({ categories: nextData });\n }\n }\n\n changeData = (data) =>\n this.setState(\n {\n categories: data,\n },\n () => this.props.onAnswersChange(data)\n );\n\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n render() {\n const { categories, showingCorrect } = this.state;\n const { model, classes } = this.props;\n const {\n teacherInstructions,\n prompt,\n chartType,\n size,\n domain,\n range,\n title,\n addCategoryEnabled,\n categoryDefaultLabel,\n rationale,\n correctedAnswer,\n correctAnswer,\n } = model;\n\n const correctData =\n correctAnswer && correctAnswer.data\n ? correctAnswer.data.map((data) => {\n return {\n ...data,\n interactive: false,\n editable: false,\n };\n })\n : [];\n\n const showToggle = correctData && correctData.length > 0;\n\n return (\n <div className={classes.mainContainer}>\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n />\n\n {teacherInstructions && hasText(teacherInstructions) && (\n <React.Fragment>\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </Collapsible>\n <br />\n </React.Fragment>\n )}\n\n {prompt && (\n <React.Fragment>\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n <br />\n </React.Fragment>\n )}\n\n {showingCorrect && showToggle ? (\n <Chart\n chartType={chartType}\n size={size}\n domain={domain}\n range={range}\n charts={[\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n ]}\n data={correctData || categories}\n title={title}\n onDataChange={this.changeData}\n addCategoryEnabled={false}\n categoryDefaultLabel={categoryDefaultLabel}\n />\n ) : (\n <Chart\n chartType={chartType}\n size={size}\n domain={domain}\n range={range}\n charts={[\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n ]}\n data={correctedAnswer || categories}\n title={title}\n onDataChange={this.changeData}\n addCategoryEnabled={addCategoryEnabled}\n categoryDefaultLabel={categoryDefaultLabel}\n />\n )}\n\n <br />\n {rationale && hasText(rationale) && (\n <Collapsible\n labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}\n >\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n mainContainer: {\n padding: theme.spacing.unit,\n color: color.text(),\n backgroundColor: color.background(),\n overflow: 'hidden'\n }\n});\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
1
+ {"version":3,"sources":["../src/main.jsx"],"names":["Main","props","data","setState","categories","onAnswersChange","showingCorrect","state","model","nextProps","nextData","classes","teacherInstructions","prompt","chartType","size","domain","range","title","addCategoryEnabled","categoryDefaultLabel","rationale","correctedAnswer","correctAnswer","correctData","map","interactive","editable","showToggle","length","mainContainer","toggleCorrect","hidden","visible","chartTypes","Bar","Histogram","LineDot","LineCross","DotPlot","LinePlot","changeData","React","Component","PropTypes","object","isRequired","func","array","styles","theme","padding","spacing","unit","color","text","backgroundColor","background","overflow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;IAEaA,I;;;;;AAUX,gBAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,mGAkBN,UAACC,IAAD;AAAA,aACX,MAAKC,QAAL,CACE;AACEC,QAAAA,UAAU,EAAEF;AADd,OADF,EAIE;AAAA,eAAM,MAAKD,KAAL,CAAWI,eAAX,CAA2BH,IAA3B,CAAN;AAAA,OAJF,CADW;AAAA,KAlBM;AAAA,sGA0BH,UAACI,cAAD;AAAA,aAAoB,MAAKH,QAAL,CAAc;AAAEG,QAAAA,cAAc,EAAdA;AAAF,OAAd,CAApB;AAAA,KA1BG;AAGjB,UAAKC,KAAL,GAAa;AACXH,MAAAA,UAAU,EAAEH,KAAK,CAACG,UAAN,IAAoBH,KAAK,CAACO,KAAN,CAAYN,IADjC;AAEXI,MAAAA,cAAc,EAAE;AAFL,KAAb;AAHiB;AAOlB;;;;WAED,0CAAiCG,SAAjC,EAA4C;AAC1C,6BAAgDA,SAAhD,CAAQD,KAAR;AAAA,uDAAyC,EAAzC;AAAA,mDAAiBN,IAAjB;AAAA,UAAuBQ,QAAvB,sCAAkC,EAAlC;AACA,8BAAsC,KAAKT,KAA3C,CAAQO,KAAR;AAAA,yDAA+B,EAA/B;AAAA,oDAAiBN,IAAjB;AAAA,UAAiBA,IAAjB,sCAAwB,EAAxB;;AAEA,UAAI,CAAC,yBAAQQ,QAAR,EAAkBR,IAAlB,CAA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AAJG;AADU,GAAZ;AAAA,CAAf;;eASe,wBAAWT,MAAX,EAAmBjD,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {color, Collapsible, hasText, PreviewPrompt} from '@pie-lib/render-ui';\nimport { Chart, chartTypes } from '@pie-lib/charting';\nimport isEqual from 'lodash/isEqual';\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n categories: PropTypes.array,\n };\n\n static defaultProps = { classes: {} };\n\n constructor(props) {\n super(props);\n\n this.state = {\n categories: props.categories || props.model.data,\n showingCorrect: false,\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { model: { data: nextData = [] } = {} } = nextProps;\n const { model: { data = [] } = {} } = this.props;\n\n if (!isEqual(nextData, data)) {\n this.setState({ categories: nextData });\n }\n }\n\n changeData = (data) =>\n this.setState(\n {\n categories: data,\n },\n () => this.props.onAnswersChange(data)\n );\n\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n render() {\n const { categories, showingCorrect } = this.state;\n const { model, classes } = this.props;\n const {\n teacherInstructions,\n prompt,\n chartType,\n size,\n domain,\n range,\n title,\n addCategoryEnabled,\n categoryDefaultLabel,\n rationale,\n correctedAnswer,\n correctAnswer,\n } = model;\n \n const correctData =\n correctAnswer && correctAnswer.data\n ? correctAnswer.data.map((data) => {\n return {\n ...data,\n interactive: false,\n editable: false,\n };\n })\n : [];\n\n const showToggle = correctData && correctData.length > 0;\n\n return (\n <div className={classes.mainContainer}>\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n />\n\n {teacherInstructions && hasText(teacherInstructions) && (\n <React.Fragment>\n <Collapsible\n labels={{\n hidden: 'Show Teacher Instructions',\n visible: 'Hide Teacher Instructions',\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </Collapsible>\n <br />\n </React.Fragment>\n )}\n\n {prompt && (\n <React.Fragment>\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n <br />\n </React.Fragment>\n )}\n\n {showingCorrect && showToggle ? (\n <Chart\n chartType={chartType}\n size={size}\n domain={domain}\n range={range}\n charts={[\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n ]}\n data={correctData || categories}\n title={title}\n onDataChange={this.changeData}\n addCategoryEnabled={false}\n categoryDefaultLabel={categoryDefaultLabel}\n />\n ) : (\n <Chart\n chartType={chartType}\n size={size}\n domain={domain}\n range={range}\n charts={[\n chartTypes.Bar(),\n chartTypes.Histogram(),\n chartTypes.LineDot(),\n chartTypes.LineCross(),\n chartTypes.DotPlot(),\n chartTypes.LinePlot(),\n ]}\n data={correctedAnswer || categories}\n title={title}\n onDataChange={this.changeData}\n addCategoryEnabled={addCategoryEnabled}\n categoryDefaultLabel={categoryDefaultLabel}\n />\n )}\n\n <br />\n {rationale && hasText(rationale) && (\n <Collapsible\n labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}\n >\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n mainContainer: {\n padding: theme.spacing.unit,\n color: color.text(),\n backgroundColor: color.background(),\n overflow: 'hidden'\n }\n});\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "5.0.9",
7
+ "version": "5.0.11-next.173+d434ce108",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -13,10 +13,10 @@
13
13
  "dependencies": {
14
14
  "@material-ui/core": "^3.9.2",
15
15
  "@pie-framework/pie-player-events": "^0.1.0",
16
- "@pie-lib/charting": "^5.1.8",
17
- "@pie-lib/correct-answer-toggle": "^2.3.45",
16
+ "@pie-lib/charting": "^5.3.0",
17
+ "@pie-lib/correct-answer-toggle": "^2.3.46",
18
18
  "@pie-lib/math-rendering": "^2.5.0",
19
- "@pie-lib/render-ui": "^4.13.5",
19
+ "@pie-lib/render-ui": "^4.13.6",
20
20
  "classnames": "^2.2.5",
21
21
  "debug": "^4.1.1",
22
22
  "lodash": "^4.17.15",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "author": "",
27
27
  "license": "ISC",
28
- "gitHead": "dec027da9b944f8ee4286ab27e27fb888f657155",
28
+ "gitHead": "d434ce108dd12cb05f72f676a79bbfba67944cb3",
29
29
  "main": "lib/index.js",
30
30
  "module": "src/index.js"
31
31
  }