@pie-element/charting 12.2.2-beta.8 → 12.2.2-beta.9

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,10 @@
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
+ ## [12.2.2-beta.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting@12.2.2-beta.8...@pie-element/charting@12.2.2-beta.9) (2026-10-05)
7
+
8
+ **Note:** Version bump only for package @pie-element/charting
9
+
6
10
  ## [12.2.2-beta.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting@12.2.2-beta.7...@pie-element/charting@12.2.2-beta.8) (2026-09-29)
7
11
 
8
12
  **Note:** Version bump only for package @pie-element/charting
@@ -3,6 +3,10 @@
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
+ # [11.4.0-beta.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-configure@11.4.0-beta.14...@pie-element/charting-configure@11.4.0-beta.15) (2026-10-05)
7
+
8
+ **Note:** Version bump only for package @pie-element/charting-configure
9
+
6
10
  # [11.4.0-beta.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-configure@11.4.0-beta.13...@pie-element/charting-configure@11.4.0-beta.14) (2026-09-29)
7
11
 
8
12
  **Note:** Version bump only for package @pie-element/charting-configure
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/charting-configure",
3
3
  "private": true,
4
- "version": "11.4.0-beta.14",
4
+ "version": "11.4.0-beta.15",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -12,9 +12,9 @@
12
12
  "@mui/icons-material": "^7.3.4",
13
13
  "@mui/material": "^7.3.4",
14
14
  "@pie-framework/pie-configure-events": "^1.3.0",
15
- "@pie-lib/charting": "7.0.22-beta.3",
16
- "@pie-lib/config-ui": "13.0.22-beta.3",
17
- "@pie-lib/editable-html-tip-tap": "2.1.20-beta.3",
15
+ "@pie-lib/charting": "7.0.22-beta.4",
16
+ "@pie-lib/config-ui": "13.0.22-beta.4",
17
+ "@pie-lib/editable-html-tip-tap": "2.1.20-beta.4",
18
18
  "@pie-lib/math-rendering": "5.1.0",
19
19
  "@pie-lib/render-ui": "6.1.3",
20
20
  "debug": "^4.1.1",
@@ -3,6 +3,10 @@
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
+ # [8.4.0-beta.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-controller@8.4.0-beta.14...@pie-element/charting-controller@8.4.0-beta.15) (2026-10-05)
7
+
8
+ **Note:** Version bump only for package @pie-element/charting-controller
9
+
6
10
  # [8.4.0-beta.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/charting-controller@8.4.0-beta.13...@pie-element/charting-controller@8.4.0-beta.14) (2026-09-29)
7
11
 
8
12
  **Note:** Version bump only for package @pie-element/charting-controller
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/charting-controller",
3
3
  "private": true,
4
- "version": "8.4.0-beta.14",
4
+ "version": "8.4.0-beta.15",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "12.2.2-beta.8",
7
+ "version": "12.2.2-beta.9",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "postpublish": "../../scripts/postpublish"
@@ -15,7 +15,7 @@
15
15
  "@mui/icons-material": "^7.3.4",
16
16
  "@mui/material": "^7.3.4",
17
17
  "@pie-framework/pie-player-events": "^0.1.0",
18
- "@pie-lib/charting": "7.0.22-beta.3",
18
+ "@pie-lib/charting": "7.0.22-beta.4",
19
19
  "@pie-lib/correct-answer-toggle": "4.0.5",
20
20
  "@pie-lib/math-rendering": "5.1.0",
21
21
  "@pie-lib/render-ui": "6.1.3",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "author": "",
28
28
  "license": "ISC",
29
- "gitHead": "675f5eade074184bdce556c2fac16b95d2bf1c60",
29
+ "gitHead": "32a5f5323ce51e20c15145518e8f6e45f2a87cf2",
30
30
  "main": "lib/index.js",
31
31
  "module": "src/index.js"
32
32
  }
@@ -1,192 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.ChartingConfig = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var React = _interopRequireWildcard(require("react"));
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
- var _styles = require("@mui/material/styles");
12
- var _charting = require("@pie-lib/charting");
13
- var _configUi = require("@pie-lib/config-ui");
14
- var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
15
- var _renderUi = require("@pie-lib/render-ui");
16
- var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
17
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
- const Container = (0, _styles.styled)('div')(({
19
- theme
20
- }) => ({
21
- marginBottom: theme.spacing(2.5),
22
- display: 'flex',
23
- flex: 1
24
- }));
25
- const Title = (0, _styles.styled)('div')(({
26
- theme
27
- }) => ({
28
- marginBottom: theme.spacing(1)
29
- }));
30
- const Column = (0, _styles.styled)('div')({
31
- flex: 1
32
- });
33
- const CustomColorCheckbox = (0, _styles.styled)(_Checkbox.default)({
34
- color: `${_renderUi.color.tertiary()} !important`
35
- });
36
- const restoreCorrectAnswer = (correctAnswer, data) => {
37
- if (!correctAnswer) {
38
- return data;
39
- }
40
- let correctResponseDefinition = [];
41
- (data || []).forEach((category, currentIndex) => {
42
- const {
43
- editable,
44
- interactive
45
- } = category;
46
- const label = editable && correctAnswer[currentIndex]?.label ? correctAnswer[currentIndex].label : category.label;
47
- const value = interactive && correctAnswer[currentIndex]?.value ? correctAnswer[currentIndex].value : category.value;
48
- correctResponseDefinition[currentIndex] = {
49
- label: label,
50
- value: value,
51
- editable: category.editable,
52
- interactive: category.interactive
53
- };
54
- });
55
- return correctResponseDefinition;
56
- };
57
- class ChartingConfig extends React.Component {
58
- constructor(props) {
59
- super(props);
60
- (0, _defineProperty2.default)(this, "handleAlertDialog", (open, callback) => this.setState({
61
- dialog: {
62
- open
63
- }
64
- }, callback));
65
- (0, _defineProperty2.default)(this, "changeData", data => this.props.onChange({
66
- ...this.props.model,
67
- data
68
- }));
69
- (0, _defineProperty2.default)(this, "changeAddRemoveEnabled", value => {
70
- const {
71
- model
72
- } = this.props;
73
- const correctAnswer = restoreCorrectAnswer(model.correctAnswer.data, model.data);
74
- if (!value) {
75
- this.setState({
76
- dialog: {
77
- open: true,
78
- title: 'Warning',
79
- text: 'This change will remove any correct answer categories that are not part of the initial item configuration.',
80
- onConfirm: () => this.handleAlertDialog(false, this.props.onChange({
81
- ...this.props.model,
82
- addCategoryEnabled: value,
83
- correctAnswer: {
84
- data: correctAnswer
85
- }
86
- })),
87
- onClose: () => this.handleAlertDialog(false)
88
- }
89
- });
90
- } else {
91
- this.props.onChange({
92
- ...this.props.model,
93
- addCategoryEnabled: value
94
- });
95
- }
96
- });
97
- (0, _defineProperty2.default)(this, "changeTitle", title => this.props.onChange({
98
- ...this.props.model,
99
- title
100
- }));
101
- (0, _defineProperty2.default)(this, "changeLabel", (type, label) => this.props.onChange({
102
- ...this.props.model,
103
- [type]: {
104
- ...this.props.model[type],
105
- label
106
- }
107
- }));
108
- this.state = {
109
- dialog: {
110
- open: false
111
- }
112
- };
113
- }
114
- render() {
115
- const {
116
- model,
117
- charts,
118
- labelsPlaceholders,
119
- titlePlaceholder,
120
- showPixelGuides,
121
- authorNewCategoryDefaults,
122
- chartingOptions,
123
- mathMlOptions = {},
124
- labelsCharactersLimit
125
- } = this.props;
126
- const {
127
- dialog
128
- } = this.state;
129
- const {
130
- domain = {},
131
- range = {}
132
- } = model || {};
133
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, null, "Define Initial Chart Attributes"), /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Column, {
134
- key: "graph"
135
- }, /*#__PURE__*/React.createElement(_Typography.default, {
136
- component: "div",
137
- type: "body1"
138
- }, /*#__PURE__*/React.createElement("span", null, "Use the tools below to set up the chart as it will initially appear to students.")), /*#__PURE__*/React.createElement(_charting.Chart, {
139
- defineChart: true,
140
- chartingOptions: chartingOptions,
141
- showPixelGuides: showPixelGuides,
142
- chartType: model.chartType,
143
- size: model.graph,
144
- domain: domain,
145
- range: range,
146
- charts: charts
147
- // 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
148
- ,
149
- data: model.data.map((category, index) => ({
150
- ...category,
151
- index: index
152
- })),
153
- title: model.title,
154
- onDataChange: this.changeData,
155
- onChangeTitle: this.changeTitle,
156
- onChangeLabels: this.changeLabel,
157
- addCategoryEnabled: true,
158
- changeInteractiveEnabled: model.changeInteractiveEnabled,
159
- changeEditableEnabled: model.changeEditableEnabled,
160
- categoryDefaultLabel: authorNewCategoryDefaults?.label,
161
- categoryDefaults: authorNewCategoryDefaults,
162
- labelsPlaceholders: labelsPlaceholders,
163
- titlePlaceholder: titlePlaceholder?.label,
164
- mathMlOptions: mathMlOptions,
165
- labelsCharactersLimit: labelsCharactersLimit
166
- }), model.changeAddCategoryEnabled && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CustomColorCheckbox, {
167
- checked: model.addCategoryEnabled,
168
- onChange: e => {
169
- this.changeAddRemoveEnabled(e.target.checked);
170
- }
171
- }), chartingOptions?.addCategory?.authoringLabel), /*#__PURE__*/React.createElement(_configUi.AlertDialog, {
172
- open: dialog.open,
173
- title: dialog.title,
174
- text: dialog.text,
175
- onClose: dialog.onClose,
176
- onConfirm: dialog.onConfirm
177
- }))));
178
- }
179
- }
180
- exports.ChartingConfig = ChartingConfig;
181
- (0, _defineProperty2.default)(ChartingConfig, "propTypes", {
182
- model: _propTypes.default.object.isRequired,
183
- onChange: _propTypes.default.func.isRequired,
184
- charts: _propTypes.default.array,
185
- labelsPlaceholders: _propTypes.default.object,
186
- titlePlaceholder: _propTypes.default.object,
187
- showPixelGuides: _propTypes.default.bool,
188
- authorNewCategoryDefaults: _propTypes.default.object,
189
- chartingOptions: _propTypes.default.object
190
- });
191
- var _default = exports.default = ChartingConfig;
192
- //# sourceMappingURL=charting-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"charting-config.js","names":["React","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_styles","_charting","_configUi","_Checkbox","_renderUi","_Typography","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Container","styled","theme","marginBottom","spacing","display","flex","Title","Column","CustomColorCheckbox","Checkbox","color","tertiary","restoreCorrectAnswer","correctAnswer","data","correctResponseDefinition","forEach","category","currentIndex","editable","interactive","label","value","ChartingConfig","Component","constructor","props","_defineProperty2","open","callback","setState","dialog","onChange","model","title","text","onConfirm","handleAlertDialog","addCategoryEnabled","onClose","type","state","render","charts","labelsPlaceholders","titlePlaceholder","showPixelGuides","authorNewCategoryDefaults","chartingOptions","mathMlOptions","labelsCharactersLimit","domain","range","createElement","key","component","Chart","defineChart","chartType","size","graph","map","index","onDataChange","changeData","onChangeTitle","changeTitle","onChangeLabels","changeLabel","changeInteractiveEnabled","changeEditableEnabled","categoryDefaultLabel","categoryDefaults","changeAddCategoryEnabled","checked","changeAddRemoveEnabled","target","addCategory","authoringLabel","AlertDialog","exports","PropTypes","object","isRequired","func","array","bool","_default"],"sources":["../src/charting-config.jsx"],"sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { Chart } from '@pie-lib/charting';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Checkbox from '@mui/material/Checkbox';\nimport { color } from '@pie-lib/render-ui';\n\nimport Typography from '@mui/material/Typography';\n\nconst Container = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2.5),\n display: 'flex',\n flex: 1,\n}));\n\nconst Title = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(1),\n}));\n\nconst Column = styled('div')({\n flex: 1,\n});\n\nconst CustomColorCheckbox = styled(Checkbox)({\n color: `${color.tertiary()} !important`,\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 = editable && correctAnswer[currentIndex]?.label ? correctAnswer[currentIndex].label : category.label;\n\n const value =\n interactive && correctAnswer[currentIndex]?.value ? correctAnswer[currentIndex].value : 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 model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n charts: PropTypes.array,\n labelsPlaceholders: PropTypes.object,\n titlePlaceholder: PropTypes.object,\n showPixelGuides: PropTypes.bool,\n authorNewCategoryDefaults: PropTypes.object,\n chartingOptions: PropTypes.object,\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(model.correctAnswer.data, model.data);\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) =>\n this.props.onChange({\n ...this.props.model,\n [type]: {\n ...this.props.model[type],\n label,\n },\n });\n\n render() {\n const {\n model,\n charts,\n labelsPlaceholders,\n titlePlaceholder,\n showPixelGuides,\n authorNewCategoryDefaults,\n chartingOptions,\n mathMlOptions = {},\n labelsCharactersLimit,\n } = this.props;\n const { dialog } = this.state;\n const { domain = {}, range = {} } = model || {};\n\n return (\n <div>\n <Title>Define Initial Chart Attributes</Title>\n <Container>\n <Column key=\"graph\">\n <Typography component=\"div\" type=\"body1\">\n <span>Use the tools below to set up the chart as it will initially appear to students.</span>\n </Typography>\n\n <Chart\n defineChart={true}\n chartingOptions={chartingOptions}\n showPixelGuides={showPixelGuides}\n chartType={model.chartType}\n size={model.graph}\n domain={domain}\n range={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 changeInteractiveEnabled={model.changeInteractiveEnabled}\n changeEditableEnabled={model.changeEditableEnabled}\n categoryDefaultLabel={authorNewCategoryDefaults?.label}\n categoryDefaults={authorNewCategoryDefaults}\n labelsPlaceholders={labelsPlaceholders}\n titlePlaceholder={titlePlaceholder?.label}\n mathMlOptions={mathMlOptions}\n labelsCharactersLimit={labelsCharactersLimit}\n />\n {model.changeAddCategoryEnabled && (\n <div>\n <CustomColorCheckbox\n checked={model.addCategoryEnabled}\n onChange={(e) => {\n this.changeAddRemoveEnabled(e.target.checked);\n }}\n />\n {chartingOptions?.addCategory?.authoringLabel}\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 </Column>\n </Container>\n </div>\n );\n }\n}\n\nexport default ChartingConfig;\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAEA,IAAAQ,WAAA,GAAAN,sBAAA,CAAAF,OAAA;AAAkD,SAAAD,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA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7B,CACK,CACC,CACR,CAAC;EAEV;AACF;AAAC4C,OAAA,CAAAzD,cAAA,GAAAA,cAAA;AAAA,IAAAI,gBAAA,CAAArC,OAAA,EAhJYiC,cAAc,eACN;EACjBU,KAAK,EAAEgD,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCnD,QAAQ,EAAEiD,kBAAS,CAACG,IAAI,CAACD,UAAU;EACnCxC,MAAM,EAAEsC,kBAAS,CAACI,KAAK;EACvBzC,kBAAkB,EAAEqC,kBAAS,CAACC,MAAM;EACpCrC,gBAAgB,EAAEoC,kBAAS,CAACC,MAAM;EAClCpC,eAAe,EAAEmC,kBAAS,CAACK,IAAI;EAC/BvC,yBAAyB,EAAEkC,kBAAS,CAACC,MAAM;EAC3ClC,eAAe,EAAEiC,kBAAS,CAACC;AAC7B,CAAC;AAAA,IAAAK,QAAA,GAAAP,OAAA,CAAA1F,OAAA,GAwIYiC,cAAc","ignoreList":[]}
@@ -1,312 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Configure = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _styles = require("@mui/material/styles");
11
- var _charting = require("@pie-lib/charting");
12
- var _configUi = require("@pie-lib/config-ui");
13
- var _propTypes = _interopRequireDefault(require("prop-types"));
14
- var _debug = _interopRequireDefault(require("debug"));
15
- var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
16
- var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
17
- var _chartingConfig = _interopRequireDefault(require("./charting-config"));
18
- var _correctResponse = _interopRequireDefault(require("./correct-response"));
19
- var _utils = require("./utils");
20
- const log = (0, _debug.default)('@pie-element:graphing:configure');
21
- const {
22
- Panel,
23
- toggle,
24
- radio,
25
- dropdown,
26
- textField
27
- } = _configUi.settings;
28
- const PromptHolder = (0, _styles.styled)(_configUi.InputContainer)(({
29
- theme
30
- }) => ({
31
- width: '100%',
32
- paddingTop: theme.spacing(2),
33
- marginBottom: theme.spacing(2)
34
- }));
35
- const Description = (0, _styles.styled)(_Typography.default)(({
36
- theme
37
- }) => ({
38
- marginBottom: theme.spacing(2.5)
39
- }));
40
- const ErrorText = (0, _styles.styled)('div')(({
41
- theme
42
- }) => ({
43
- fontSize: theme.typography.fontSize - 2,
44
- color: theme.palette.error.main,
45
- paddingTop: theme.spacing(1)
46
- }));
47
- const charts = [_charting.chartTypes.Bar(), _charting.chartTypes.Histogram(), _charting.chartTypes.LineDot(), _charting.chartTypes.LineCross(), _charting.chartTypes.DotPlot(), _charting.chartTypes.LinePlot()];
48
- class Configure extends _react.default.Component {
49
- constructor(props) {
50
- super(props);
51
- (0, _defineProperty2.default)(this, "onRationaleChange", rationale => this.props.onModelChanged({
52
- ...this.props.model,
53
- rationale
54
- }));
55
- (0, _defineProperty2.default)(this, "onPromptChange", prompt => this.props.onModelChanged({
56
- ...this.props.model,
57
- prompt
58
- }));
59
- (0, _defineProperty2.default)(this, "onTeacherInstructionsChange", teacherInstructions => this.props.onModelChanged({
60
- ...this.props.model,
61
- teacherInstructions
62
- }));
63
- (0, _defineProperty2.default)(this, "onChartTypeChange", chartType => this.props.onModelChanged({
64
- ...this.props.model,
65
- chartType
66
- }));
67
- (0, _defineProperty2.default)(this, "onConfigChange", config => {
68
- const {
69
- model,
70
- onModelChanged
71
- } = this.props;
72
- const {
73
- gridValues: oldGridValues,
74
- labelValues: oldLabelValues
75
- } = this.state;
76
- const updatedModel = {
77
- ...model,
78
- ...config
79
- };
80
- const {
81
- graph,
82
- range
83
- } = updatedModel;
84
- const gridValues = {};
85
- const labelValues = {};
86
- const rangeConstraints = (0, _utils.applyConstraints)(range, graph.height, oldGridValues.range, oldLabelValues.range);
87
- gridValues.range = rangeConstraints.gridValues;
88
- labelValues.range = rangeConstraints.labelValues;
89
- this.setState({
90
- gridValues,
91
- labelValues
92
- });
93
- onModelChanged(updatedModel);
94
- });
95
- const {
96
- range: _range = {},
97
- graph: _graph
98
- } = props.model || {};
99
- const _gridValues = {
100
- range: (0, _utils.getGridValues)(_range, _graph.height, true)
101
- };
102
- const _labelValues = {
103
- range: (0, _utils.getLabelValues)(_range.step || 1)
104
- };
105
- this.state = {
106
- gridValues: _gridValues,
107
- labelValues: _labelValues
108
- };
109
- }
110
- render() {
111
- const {
112
- configuration,
113
- imageSupport,
114
- model,
115
- onConfigurationChanged,
116
- onModelChanged,
117
- uploadSoundSupport
118
- } = this.props;
119
- log('[render] model', model);
120
- const {
121
- graph
122
- } = model;
123
- const {
124
- baseInputConfiguration = {},
125
- contentDimensions = {},
126
- chartDimensions = {},
127
- authorNewCategoryDefaults = {},
128
- labelsPlaceholders = {},
129
- instruction = {},
130
- maxImageWidth = {},
131
- maxImageHeight = {},
132
- prompt = {},
133
- rationale = {},
134
- scoringType = {},
135
- settingsPanelDisabled,
136
- spellCheck = {},
137
- studentInstructions = {},
138
- teacherInstructions = {},
139
- titlePlaceholder = {},
140
- withRubric = {},
141
- chartingOptions = {},
142
- availableChartTypes = {},
143
- mathMlOptions = {},
144
- chartTypeLabel,
145
- language = {},
146
- languageChoices = {},
147
- labelsCharactersLimit
148
- } = configuration || {};
149
- const {
150
- errors,
151
- extraCSSRules,
152
- promptEnabled,
153
- rationaleEnabled,
154
- spellCheckEnabled,
155
- teacherInstructionsEnabled,
156
- studentNewCategoryDefaultLabel
157
- } = model || {};
158
- const {
159
- categoryErrors,
160
- correctAnswerErrors,
161
- prompt: promptError,
162
- rationale: rationaleError,
163
- teacherInstructions: teacherInstructionsError
164
- } = errors || {};
165
- const {
166
- gridValues,
167
- labelValues
168
- } = this.state;
169
- const showPixeGuides = chartDimensions.showInConfigPanel || true;
170
- const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
171
- const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
172
- const panelItemType = {
173
- changeInteractiveEnabled: chartingOptions.changeInteractive?.settings && toggle(chartingOptions.changeInteractive.settingsLabel),
174
- changeEditableEnabled: chartingOptions.changeEditable?.settings && toggle(chartingOptions.changeEditable.settingsLabel),
175
- changeAddCategoryEnabled: chartingOptions.addCategory?.settings && toggle(chartingOptions.addCategory.settingsLabel)
176
- };
177
- const panelProperties = {
178
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
179
- studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
180
- rationaleEnabled: rationale.settings && toggle(rationale.label),
181
- spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
182
- promptEnabled: prompt.settings && toggle(prompt.label),
183
- scoringType: scoringType.settings && radio(scoringType.label, ['all or nothing', 'partial scoring']),
184
- rubricEnabled: withRubric?.settings && toggle(withRubric?.label),
185
- 'language.enabled': language.settings && toggle(language.label, true),
186
- language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),
187
- instruction: instruction.settings && textField(instruction.label)
188
- };
189
- const getPluginProps = (props = {}) => ({
190
- ...baseInputConfiguration,
191
- ...props
192
- });
193
- return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
194
- extraCSSRules: extraCSSRules,
195
- dimensions: contentDimensions,
196
- hideSettings: settingsPanelDisabled,
197
- settings: /*#__PURE__*/_react.default.createElement(Panel, {
198
- model: model,
199
- configuration: configuration,
200
- onChangeModel: onModelChanged,
201
- onChangeConfiguration: onConfigurationChanged,
202
- groups: {
203
- Settings: panelItemType,
204
- Properties: panelProperties
205
- }
206
- })
207
- }, /*#__PURE__*/_react.default.createElement(Description, {
208
- component: "div",
209
- type: "body1"
210
- }, instruction?.label || ''), teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
211
- label: teacherInstructions.label
212
- }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
213
- markup: model.teacherInstructions || '',
214
- onChange: this.onTeacherInstructionsChange,
215
- imageSupport: imageSupport,
216
- nonEmpty: false,
217
- error: teacherInstructionsError,
218
- spellCheck: spellCheckEnabled,
219
- pluginProps: getPluginProps(teacherInstructions?.inputConfiguration),
220
- maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
221
- maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
222
- uploadSoundSupport: uploadSoundSupport,
223
- languageCharactersProps: [{
224
- language: 'spanish'
225
- }, {
226
- language: 'special'
227
- }],
228
- mathMlOptions: mathMlOptions
229
- }), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), promptEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
230
- label: prompt.label
231
- }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
232
- markup: model.prompt,
233
- onChange: this.onPromptChange,
234
- imageSupport: imageSupport,
235
- nonEmpty: false,
236
- error: promptError,
237
- spellCheck: spellCheckEnabled,
238
- disableUnderline: true,
239
- pluginProps: getPluginProps(prompt?.inputConfiguration),
240
- maxImageWidth: defaultImageMaxWidth,
241
- maxImageHeight: defaultImageMaxHeight,
242
- uploadSoundSupport: uploadSoundSupport,
243
- languageCharactersProps: [{
244
- language: 'spanish'
245
- }, {
246
- language: 'special'
247
- }],
248
- mathMlOptions: mathMlOptions
249
- }), promptError && /*#__PURE__*/_react.default.createElement(ErrorText, null, promptError)), /*#__PURE__*/_react.default.createElement(_charting.ConfigureChartPanel, {
250
- model: model,
251
- onChange: this.onConfigChange,
252
- gridValues: gridValues,
253
- labelValues: labelValues,
254
- chartDimensions: chartDimensions,
255
- charts: charts,
256
- studentNewCategoryDefaultLabel: studentNewCategoryDefaultLabel,
257
- availableChartTypes: availableChartTypes,
258
- chartTypeLabel: chartTypeLabel
259
- }), /*#__PURE__*/_react.default.createElement(_chartingConfig.default, {
260
- model: model,
261
- onChange: onModelChanged,
262
- charts: charts,
263
- labelsPlaceholders: labelsPlaceholders,
264
- titlePlaceholder: titlePlaceholder,
265
- showPixelGuides: showPixeGuides,
266
- authorNewCategoryDefaults: authorNewCategoryDefaults,
267
- chartingOptions: chartingOptions,
268
- mathMlOptions: mathMlOptions,
269
- labelsCharactersLimit: labelsCharactersLimit
270
- }), /*#__PURE__*/_react.default.createElement(_correctResponse.default, {
271
- config: graph,
272
- model: model,
273
- onChange: onModelChanged,
274
- charts: charts,
275
- error: categoryErrors,
276
- correctAnswerErrors: correctAnswerErrors,
277
- studentNewCategoryDefaultLabel: studentNewCategoryDefaultLabel,
278
- mathMlOptions: mathMlOptions,
279
- labelsPlaceholders: labelsPlaceholders
280
- }), rationaleEnabled && /*#__PURE__*/_react.default.createElement(PromptHolder, {
281
- label: rationale.label || 'Rationale'
282
- }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
283
- markup: model.rationale || '',
284
- onChange: this.onRationaleChange,
285
- imageSupport: imageSupport,
286
- error: rationaleError,
287
- spellCheck: spellCheckEnabled,
288
- pluginProps: getPluginProps(rationale?.inputConfiguration),
289
- maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
290
- maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
291
- uploadSoundSupport: uploadSoundSupport,
292
- languageCharactersProps: [{
293
- language: 'spanish'
294
- }, {
295
- language: 'special'
296
- }],
297
- mathMlOptions: mathMlOptions
298
- }), rationaleError && /*#__PURE__*/_react.default.createElement(ErrorText, null, rationaleError)));
299
- }
300
- }
301
- exports.Configure = Configure;
302
- (0, _defineProperty2.default)(Configure, "propTypes", {
303
- onModelChanged: _propTypes.default.func,
304
- onConfigurationChanged: _propTypes.default.func,
305
- imageSupport: _propTypes.default.object,
306
- uploadSoundSupport: _propTypes.default.object,
307
- model: _propTypes.default.object.isRequired,
308
- configuration: _propTypes.default.object.isRequired,
309
- chartingOptions: _propTypes.default.object
310
- });
311
- var _default = exports.default = Configure;
312
- //# sourceMappingURL=configure.js.map