@pie-element/charting 2.7.3-next.1357 → 2.7.3-next.1368

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.
@@ -197,7 +197,7 @@ var ChartingConfig = /*#__PURE__*/function (_React$Component) {
197
197
  addCategoryEnabled: true,
198
198
  categoryDefaultLabel: model.categoryDefaultLabel,
199
199
  labelsPlaceholders: labelsPlaceholders,
200
- titlePlaceholder: titlePlaceholder
200
+ titlePlaceholder: titlePlaceholder === null || titlePlaceholder === void 0 ? void 0 : titlePlaceholder.label
201
201
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Checkbox["default"], {
202
202
  checked: model.addCategoryEnabled,
203
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","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,CADvB;AAETC,MAAAA,YAAY,EAAEL,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAF1B;AAGTE,MAAAA,OAAO,EAAE,MAHA;AAITC,MAAAA,IAAI,EAAE;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BtB,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}\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,CADvB;AAETC,MAAAA,YAAY,EAAEL,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAF1B;AAGTE,MAAAA,OAAO,EAAE,MAHA;AAITC,MAAAA,IAAI,EAAE;AAJG,KADc;AAOzBC,IAAAA,MAAM,EAAE;AACND,MAAAA,IAAI,EAAE;AADA;AAPiB,GAAZ;AAAA,CAAf;;AAYA,IAAME,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,aAAD,EAAgBC,IAAhB,EAAyB;AACpD,MAAI,CAACD,aAAL,EAAoB;AAClB,WAAOC,IAAP;AACD;;AAED,MAAIC,yBAAyB,GAAG,EAAhC;AAEA,GAACD,IAAI,IAAI,EAAT,EAAaE,OAAb,CAAqB,UAACC,QAAD,EAAWC,YAAX,EAA4B;AAAA;;AAC/C,QAAQC,QAAR,GAAkCF,QAAlC,CAAQE,QAAR;AAAA,QAAkBC,WAAlB,GAAkCH,QAAlC,CAAkBG,WAAlB;AAEA,QAAMC,KAAK,GACTF,QAAQ,6BAAIN,aAAa,CAACK,YAAD,CAAjB,kDAAI,sBAA6BG,KAAzC,GACIR,aAAa,CAACK,YAAD,CAAb,CAA4BG,KADhC,GA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ACE,QAAA,OAAO,EAAES,KAAK,CAACK,kBADjB;AAEE,QAAA,QAAQ,EAAE,kBAACmB,CAAD,EAAO;AACf,UAAA,MAAI,CAACC,sBAAL,CAA4BD,CAAC,CAACE,MAAF,CAASC,OAArC;AACD;AAJH,QADF,+BA9BF,eAwCE,oBAAC,qBAAD;AACE,QAAA,IAAI,EAAE7B,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,QAxCF,CADF,CAFF,CADF;AAuDD;;;EA9HiCyB,KAAK,CAACC,S;;;iCAA7BpC,c,eACQ;AACjBgB,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"}
@@ -89,7 +89,10 @@ var _default = {
89
89
  settings: false,
90
90
  label: 'Chart Title'
91
91
  },
92
- titlePlaceholder: 'Click here to add a title',
92
+ titlePlaceholder: {
93
+ settings: false,
94
+ label: 'Click here to add a title'
95
+ },
93
96
  labelsPlaceholders: {
94
97
  left: 'Click here to add a label for this axis',
95
98
  right: '',
@@ -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","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,IA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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: 'Click here to add a title',\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"}
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,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAE,GADF;AAELC,MAAAA,MAAM,EAAE;AAFH,KATF;AAaLC,IAAAA,MAAM,EAAE,sBAbH;AAcLC,IAAAA,aAAa,EAAE,IAdV;AAeLC,IAAAA,SAAS,EAAE,sBAfN;AAgBLC,IAAAA,KAAK,EAAE;AACLP,MAAAA,KAAK,EAAE,QADF;AAELQ,MAAAA,GAAG,EAAE,GAFA;AAGLC,MAAAA,GAAG,EAAE;AAHA,KAhBF;AAqBLC,IAAAA,WAAW,EAAE,gBArBR;AAsBLC,IAAAA,KAAK,EAAE,kBAtBF;AAuBLC,IAAAA,gBAAgB,EAAE,IAvBb;AAwBLC,IAAAA,0BAA0B,EAAE,IAxBvB;AAyBLC,IAAAA,0BAA0B,EAAE;AAzBvB,GADM;AA4BbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,UAAU,EAAE;AACVhB,MAAAA,KAAK,EAAE,YADG;AAEViB,MAAAA,QAAQ,EAAE,KAFA;AAGVC,MAAAA,OAAO,EAAE;AAHC,KADC;AAMbC,IAAAA,eAAe,EAAE;AACfF,MAAAA,QAAQ,EA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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"}
@@ -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",
@@ -214,6 +271,47 @@
214
271
  }
215
272
  }
216
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
+ },
217
315
  "ConfigurePropWithEnabled": {
218
316
  "title": "ConfigurePropWithEnabled",
219
317
  "type": "object",
@@ -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:
@@ -171,6 +216,39 @@ Indicates if the item has to be displayed in the Settings Panel
171
216
 
172
217
  Indicates the label for the item that has to be displayed in the Settings Panel
173
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
+
174
252
  ## `ConfigurePropWithEnabled` (object)
175
253
 
176
254
  Properties of the `ConfigurePropWithEnabled` object:
@@ -553,6 +553,47 @@
553
553
  }
554
554
  }
555
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
+ },
556
597
  "ConfigurePropWithEnabled": {
557
598
  "title": "ConfigurePropWithEnabled",
558
599
  "type": "object",
@@ -196,6 +196,39 @@ Indicates if the item has to be displayed in the Settings Panel
196
196
 
197
197
  Indicates the label for the item that has to be displayed in the Settings Panel
198
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
+
199
232
  ## `ConfigurePropWithEnabled` (object)
200
233
 
201
234
  Properties of the `ConfigurePropWithEnabled` object:
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "2.7.3-next.1357+42d700e42",
7
+ "version": "2.7.3-next.1368+3228a0861",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "author": "",
27
27
  "license": "ISC",
28
- "gitHead": "42d700e42127ea8ccd3e7b4f069d918abb490f15",
28
+ "gitHead": "3228a0861ddd2d070c1f718edf8e33cc63704687",
29
29
  "main": "lib/index.js",
30
30
  "module": "src/index.js"
31
31
  }