@pie-element/math-inline 8.2.2-next.9 → 8.3.0
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 +16 -0
- package/configure/CHANGELOG.md +16 -0
- package/configure/lib/response.js +7 -0
- package/configure/lib/response.js.map +1 -1
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +11 -0
- package/controller/package.json +2 -2
- package/module/configure.js +32 -26
- package/module/element.js +2 -2
- package/module/manifest.json +2 -2
- package/module/print.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.2.1...@pie-element/math-inline@8.3.0) (2024-11-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4401, PD-4441, PD-4319, PD-4394, PD-3687 ([f1f0af3](https://github.com/pie-framework/pie-elements/commit/f1f0af31f3c6fba54ca3a378dea3b8b32d8ebb87))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Adjust all elements to support custom color for controls in authoring PD-4334 ([d6b3dc5](https://github.com/pie-framework/pie-elements/commit/d6b3dc5963824d0a1ce7bf36a8c590e27761c86c))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [8.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.2.0...@pie-element/math-inline@8.2.1) (2024-11-01)
|
|
7
23
|
|
|
8
24
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.1.1...@pie-element/math-inline-configure@8.2.0) (2024-11-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4401, PD-4441, PD-4319, PD-4394, PD-3687 ([f1f0af3](https://github.com/pie-framework/pie-elements/commit/f1f0af31f3c6fba54ca3a378dea3b8b32d8ebb87))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Adjust all elements to support custom color for controls in authoring PD-4334 ([d6b3dc5](https://github.com/pie-framework/pie-elements/commit/d6b3dc5963824d0a1ce7bf36a8c590e27761c86c))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [8.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.1.0...@pie-element/math-inline-configure@8.1.1) (2024-11-01)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -51,6 +51,8 @@ var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
|
51
51
|
|
|
52
52
|
var _styles = require("@material-ui/core/styles");
|
|
53
53
|
|
|
54
|
+
var _renderUi = require("@pie-lib/pie-toolbox/render-ui");
|
|
55
|
+
|
|
54
56
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
55
57
|
|
|
56
58
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -122,6 +124,9 @@ var styles = function styles(theme) {
|
|
|
122
124
|
fontSize: theme.typography.fontSize - 2,
|
|
123
125
|
color: theme.palette.error.main,
|
|
124
126
|
paddingTop: theme.spacing.unit
|
|
127
|
+
},
|
|
128
|
+
customColor: {
|
|
129
|
+
color: "".concat(_renderUi.color.tertiary(), " !important")
|
|
125
130
|
}
|
|
126
131
|
};
|
|
127
132
|
};
|
|
@@ -353,12 +358,14 @@ var Response = /*#__PURE__*/function (_React$Component) {
|
|
|
353
358
|
}, cAllowTrailingZeros.enabled && /*#__PURE__*/React.createElement(_FormControlLabel["default"], {
|
|
354
359
|
label: cAllowTrailingZeros.label,
|
|
355
360
|
control: /*#__PURE__*/React.createElement(_Checkbox["default"], {
|
|
361
|
+
className: classes.customColor,
|
|
356
362
|
checked: allowTrailingZeros,
|
|
357
363
|
onChange: this.onLiteralOptionsChange('allowTrailingZeros')
|
|
358
364
|
})
|
|
359
365
|
}), cIgnoreOrder.enabled && /*#__PURE__*/React.createElement(_FormControlLabel["default"], {
|
|
360
366
|
label: cIgnoreOrder.label,
|
|
361
367
|
control: /*#__PURE__*/React.createElement(_Checkbox["default"], {
|
|
368
|
+
className: classes.customColor,
|
|
362
369
|
checked: ignoreOrder,
|
|
363
370
|
onChange: this.onLiteralOptionsChange('ignoreOrder')
|
|
364
371
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/response.jsx"],"names":["INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED","styles","theme","responseContainer","marginBottom","spacing","unit","width","minWidth","border","palette","grey","display","flexDirection","justifyContent","cardContent","paddingBottom","title","fontWeight","fontSize","flex","selectContainer","inputContainer","titleBar","alignItems","responseEditor","maxWidth","height","minHeight","mathToolbar","alternateButton","removeAlternateButton","marginLeft","color","errorText","typography","error","main","paddingTop","Response","props","name","evt","response","onResponseChange","index","newResponse","target","value","checked","answer","alternateId","alternates","alternateIdCounter","state","setState","showKeypad","openCount","alternatesLength","Object","keys","length","classes","mode","defaultResponse","cAllowTrailingZeros","cIgnoreOrder","validation","ignoreOrder","allowTrailingZeros","hasAlternates","classNames","editor","select","onChange","flexContainer","enabled","label","onLiteralOptionsChange","onAnswerChange","onFocus","onDone","map","altIdx","alternateBar","onRemoveAlternate","onAlternateAnswerChange","onAlternateFocus","onAlternateDone","onAddAlternate","React","Component","PropTypes","object","isRequired","bool","oneOfType","string","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA;AACA,IAAMA,yCAAyC,GAAG,KAAlD;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,YAAY,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,GADlB;AAEjBC,MAAAA,KAAK,EAAE,MAFU;AAGjBC,MAAAA,QAAQ,EAAE,OAHO;AAIjBC,MAAAA,MAAM,sBAAeP,KAAK,CAACQ,OAAN,CAAcC,IAAd,CAAmB,GAAnB,CAAf,CAJW;AAKjBC,MAAAA,OAAO,EAAE,MALQ;AAMjBC,MAAAA,aAAa,EAAE,QANE;AAOjBC,MAAAA,cAAc,EAAE;AAPC,KADM;AAUzBC,IAAAA,WAAW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AHA;AAIjB9B,EAAAA,IAAI,EAAE6B,sBAAUI,SAAV,CAAoB,CAACJ,sBAAUK,MAAX,EAAmBL,sBAAUM,MAA7B,CAApB,CAJW;AAKjBrD,EAAAA,KAAK,EAAE+C,sBAAUM,MALA;AAMjBtD,EAAAA,gBAAgB,EAAEgD,sBAAUO,IAAV,CAAeL,UANhB;AAOjBnD,EAAAA,QAAQ,EAAEiD,sBAAUC,MAAV,CAAiBC,UAPV;AAQjB5B,EAAAA,YAAY,EAAE0B,sBAAUC,MAAV,CAAiBC,UARd;AASjB7B,EAAAA,mBAAmB,EAAE2B,sBAAUC,MAAV,CAAiBC;AATrB,C;iCADfvD,Q,kBAakB;AACpByB,EAAAA,eAAe,EAAE,KADG;AAEpBD,EAAAA,IAAI,EAAE;AAFc,C;;eAyPT,wBAAW9D,MAAX,EAAmBsC,QAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport { MathToolbar } from '@pie-lib/pie-toolbox/math-toolbar';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Typography from '@material-ui/core/Typography';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport { withStyles } from '@material-ui/core/styles';\n\n// TODO once we support individual response correctness, we need to remove this constant\nconst INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED = false;\n\nconst styles = (theme) => ({\n responseContainer: {\n marginBottom: theme.spacing.unit * 2.5,\n width: '100%',\n minWidth: '548px',\n border: `1px solid ${theme.palette.grey[700]}`,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n cardContent: {\n paddingBottom: `${theme.spacing.unit * 2}px !important`,\n },\n title: {\n fontWeight: 700,\n fontSize: '1.2rem',\n flex: 3,\n },\n selectContainer: {\n flex: 2,\n },\n inputContainer: {\n marginBottom: theme.spacing.unit * 2,\n },\n titleBar: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n responseEditor: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n minWidth: '500px',\n maxWidth: '900px',\n height: 'auto',\n minHeight: '40px',\n },\n mathToolbar: {\n width: '100%',\n },\n alternateButton: {\n border: `1px solid ${theme.palette.grey['A100']}`,\n },\n removeAlternateButton: {\n marginLeft: theme.spacing.unit * 2,\n border: `1px solid ${theme.palette.grey['A100']}`,\n color: 'gray',\n fontSize: '0.8rem',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n});\n\nclass Response extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n defaultResponse: PropTypes.bool,\n error: PropTypes.object,\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n index: PropTypes.number,\n onResponseChange: PropTypes.func.isRequired,\n response: PropTypes.object.isRequired,\n cIgnoreOrder: PropTypes.object.isRequired,\n cAllowTrailingZeros: PropTypes.object.isRequired,\n };\n\n static defaultProps = {\n defaultResponse: false,\n mode: 'miscellaneous',\n };\n\n constructor(props) {\n super(props);\n\n const { response: { alternates } = {} } = props || {};\n const alternatesLength = Object.keys(alternates || {}).length;\n\n this.state = {\n alternateIdCounter: alternatesLength + 1,\n showKeypad: {\n openCount: 0,\n main: false,\n },\n };\n }\n\n onChange = (name) => (evt) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = evt.target.value;\n\n onResponseChange(newResponse, index);\n };\n\n onConfigChanged = (name) => (evt) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = evt.target.checked;\n\n onResponseChange(newResponse, index);\n };\n\n onLiteralOptionsChange = (name) => () => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = !response[name];\n\n onResponseChange(newResponse, index);\n };\n\n onAnswerChange = (answer) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse.answer = answer;\n\n onResponseChange(newResponse, index);\n };\n\n onAlternateAnswerChange = (alternateId) => (answer) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse.alternates[alternateId] = answer;\n\n onResponseChange(newResponse, index);\n };\n\n onAddAlternate = () => {\n const { response, onResponseChange, index } = this.props;\n const { alternateIdCounter } = this.state;\n const newResponse = { ...response };\n\n if (!newResponse.alternates) {\n newResponse.alternates = {};\n }\n\n newResponse.alternates[alternateIdCounter] = '';\n\n onResponseChange(newResponse, index);\n\n this.setState({\n alternateIdCounter: alternateIdCounter + 1,\n });\n };\n\n onRemoveAlternate = (alternateId) => () => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n delete newResponse.alternates[alternateId];\n\n onResponseChange(newResponse, index);\n\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad[alternateId] ? state.showKeypad.openCount : state.showKeypad.openCount - 1,\n },\n }));\n };\n\n onDone = () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: state.showKeypad.openCount - 1,\n main: false,\n },\n }));\n };\n\n onFocus = () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad.main ? state.showKeypad.openCount + 1 : state.showKeypad.openCount,\n main: true,\n },\n }));\n };\n\n onAlternateFocus = (alternateId) => () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad[alternateId] ? state.showKeypad.openCount + 1 : state.showKeypad.openCount,\n [alternateId]: true,\n },\n }));\n };\n\n onAlternateDone = (alternateId) => () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: state.showKeypad.openCount - 1,\n [alternateId]: false,\n },\n }));\n };\n\n render() {\n const { classes, mode, defaultResponse, index, response, cAllowTrailingZeros, cIgnoreOrder, error } = this.props;\n\n const { showKeypad } = this.state;\n const { validation, answer, alternates, ignoreOrder, allowTrailingZeros } = response;\n const hasAlternates = Object.keys(alternates || {}).length > 0;\n const classNames = {\n editor: classes.responseEditor,\n mathToolbar: classes.mathToolbar,\n };\n const styles = {\n minHeight: `${showKeypad.openCount > 0 ? 430 : 230}px`,\n };\n\n return (\n <Card className={classes.responseContainer} style={styles}>\n <CardContent className={classes.cardContent}>\n <div className={classes.titleBar}>\n <Typography className={classes.title} component=\"div\">\n Response {INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED ? (defaultResponse ? '' : index + 1) : ''}\n </Typography>\n\n <InputContainer label=\"Validation\" className={classes.selectContainer}>\n <Select className={classes.select} onChange={this.onChange('validation')} value={validation || 'literal'}>\n <MenuItem value=\"literal\">Literal Validation</MenuItem>\n <MenuItem value=\"symbolic\">Symbolic Validation</MenuItem>\n </Select>\n </InputContainer>\n </div>\n\n {validation === 'literal' && (\n <div className={classes.flexContainer}>\n {cAllowTrailingZeros.enabled && (\n <FormControlLabel\n label={cAllowTrailingZeros.label}\n control={\n <Checkbox\n checked={allowTrailingZeros}\n onChange={this.onLiteralOptionsChange('allowTrailingZeros')}\n />\n }\n />\n )}\n\n {cIgnoreOrder.enabled && (\n <FormControlLabel\n label={cIgnoreOrder.label}\n control={<Checkbox checked={ignoreOrder} onChange={this.onLiteralOptionsChange('ignoreOrder')} />}\n />\n )}\n </div>\n )}\n\n <div className={classes.inputContainer}>\n <InputLabel>Correct Answer</InputLabel>\n <MathToolbar\n keypadMode={mode}\n classNames={classNames}\n controlledKeypad\n showKeypad={showKeypad.main}\n latex={answer || ''}\n onChange={this.onAnswerChange}\n onFocus={this.onFocus}\n onDone={this.onDone}\n error={error && error.answer}\n />\n {error && error.answer ? <div className={classes.errorText}>{error.answer}</div> : null}\n </div>\n\n {hasAlternates &&\n Object.keys(alternates).map((alternateId, altIdx) => (\n <div className={classes.inputContainer} key={alternateId}>\n <div className={classes.alternateBar}>\n <InputLabel>\n Alternate\n {Object.keys(alternates).length > 1 ? ` ${altIdx + 1}` : ''}\n </InputLabel>\n <Button\n className={classes.removeAlternateButton}\n type=\"secondary\"\n onClick={this.onRemoveAlternate(alternateId)}\n >\n Remove\n </Button>\n </div>\n\n <MathToolbar\n classNames={classNames}\n controlledKeypad\n keypadMode={mode}\n showKeypad={showKeypad[alternateId] || false}\n latex={alternates[alternateId] || ''}\n onChange={this.onAlternateAnswerChange(alternateId)}\n onFocus={this.onAlternateFocus(alternateId)}\n onDone={this.onAlternateDone(alternateId)}\n error={error && error[alternateId]}\n />\n {error && error[alternateId] ? <div className={classes.errorText}>{error[alternateId]}</div> : null}\n </div>\n ))}\n\n <Button className={classes.alternateButton} type=\"primary\" onClick={this.onAddAlternate}>\n ADD ALTERNATE\n </Button>\n </CardContent>\n </Card>\n );\n }\n}\n\nexport default withStyles(styles)(Response);\n"],"file":"response.js"}
|
|
1
|
+
{"version":3,"sources":["../src/response.jsx"],"names":["INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED","styles","theme","responseContainer","marginBottom","spacing","unit","width","minWidth","border","palette","grey","display","flexDirection","justifyContent","cardContent","paddingBottom","title","fontWeight","fontSize","flex","selectContainer","inputContainer","titleBar","alignItems","responseEditor","maxWidth","height","minHeight","mathToolbar","alternateButton","removeAlternateButton","marginLeft","color","errorText","typography","error","main","paddingTop","customColor","tertiary","Response","props","name","evt","response","onResponseChange","index","newResponse","target","value","checked","answer","alternateId","alternates","alternateIdCounter","state","setState","showKeypad","openCount","alternatesLength","Object","keys","length","classes","mode","defaultResponse","cAllowTrailingZeros","cIgnoreOrder","validation","ignoreOrder","allowTrailingZeros","hasAlternates","classNames","editor","select","onChange","flexContainer","enabled","label","onLiteralOptionsChange","onAnswerChange","onFocus","onDone","map","altIdx","alternateBar","onRemoveAlternate","onAlternateAnswerChange","onAlternateFocus","onAlternateDone","onAddAlternate","React","Component","PropTypes","object","isRequired","bool","oneOfType","string","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA;AACA,IAAMA,yCAAyC,GAAG,KAAlD;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,YAAY,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,GADlB;AAEjBC,MAAAA,KAAK,EAAE,MAFU;AAGjBC,MAAAA,QAAQ,EAAE,OAHO;AAIjBC,MAAAA,MAAM,sBAAeP,KAAK,CAACQ,OAAN,CAAcC,IAAd,CAAmB,GAAnB,CAAf,CAJW;AAKjBC,MAAAA,OAAO,EAAE,MALQ;AAMjBC,MAAAA,aAAa,EAAE,QANE;AAOjBC,MAAAA,cAAc,EAAE;AAPC,KADM;AAUzBC,IAAAA,WAAW,EAAE;AACXC,MAAAA,aAAa,YAAKd,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAA1B;AADF,KAVY;AAazBW,IAAAA,KAAK,EAAE;AACLC,MAAAA,UAAU,EAAE,GADP;AAELC,MAAAA,QAAQ,EAAE,QAFL;AAGLC,MAAAA,IAAI,EAAE;AAHD,KAbkB;AAkBzBC,IAAAA,eAAe,EAAE;AACfD,MAAAA,IAAI,EAAE;AADS,KAlBQ;AAqBzBE,IAAAA,cAAc,EAAE;AACdlB,MAAAA,YAAY,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AADrB,KArBS;AAwBzBiB,IAAAA,QAAQ,EAAE;AACRX,MAAAA,OAAO,EAAE,MADD;AAERY,MAAAA,UAAU,EAAE,QAFJ;AAGRV,MAAAA,cAAc,EAAE;AAHR,KAxBe;AA6BzBW,IAAAA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EAAAA,mBAAmB,EAAE2B,sBAAUC,MAAV,CAAiBC;AATrB,C;iCADfvD,Q,kBAakB;AACpByB,EAAAA,eAAe,EAAE,KADG;AAEpBD,EAAAA,IAAI,EAAE;AAFc,C;;eA8PT,wBAAWhE,MAAX,EAAmBwC,QAAnB,C","sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport { MathToolbar } from '@pie-lib/pie-toolbox/math-toolbar';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Typography from '@material-ui/core/Typography';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport { withStyles } from '@material-ui/core/styles';\nimport { color } from '@pie-lib/pie-toolbox/render-ui';\n\n// TODO once we support individual response correctness, we need to remove this constant\nconst INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED = false;\n\nconst styles = (theme) => ({\n responseContainer: {\n marginBottom: theme.spacing.unit * 2.5,\n width: '100%',\n minWidth: '548px',\n border: `1px solid ${theme.palette.grey[700]}`,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n cardContent: {\n paddingBottom: `${theme.spacing.unit * 2}px !important`,\n },\n title: {\n fontWeight: 700,\n fontSize: '1.2rem',\n flex: 3,\n },\n selectContainer: {\n flex: 2,\n },\n inputContainer: {\n marginBottom: theme.spacing.unit * 2,\n },\n titleBar: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n responseEditor: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n minWidth: '500px',\n maxWidth: '900px',\n height: 'auto',\n minHeight: '40px',\n },\n mathToolbar: {\n width: '100%',\n },\n alternateButton: {\n border: `1px solid ${theme.palette.grey['A100']}`,\n },\n removeAlternateButton: {\n marginLeft: theme.spacing.unit * 2,\n border: `1px solid ${theme.palette.grey['A100']}`,\n color: 'gray',\n fontSize: '0.8rem',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n customColor: {\n color: `${color.tertiary()} !important`\n },\n});\n\nclass Response extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n defaultResponse: PropTypes.bool,\n error: PropTypes.object,\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n index: PropTypes.number,\n onResponseChange: PropTypes.func.isRequired,\n response: PropTypes.object.isRequired,\n cIgnoreOrder: PropTypes.object.isRequired,\n cAllowTrailingZeros: PropTypes.object.isRequired,\n };\n\n static defaultProps = {\n defaultResponse: false,\n mode: 'miscellaneous',\n };\n\n constructor(props) {\n super(props);\n\n const { response: { alternates } = {} } = props || {};\n const alternatesLength = Object.keys(alternates || {}).length;\n\n this.state = {\n alternateIdCounter: alternatesLength + 1,\n showKeypad: {\n openCount: 0,\n main: false,\n },\n };\n }\n\n onChange = (name) => (evt) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = evt.target.value;\n\n onResponseChange(newResponse, index);\n };\n\n onConfigChanged = (name) => (evt) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = evt.target.checked;\n\n onResponseChange(newResponse, index);\n };\n\n onLiteralOptionsChange = (name) => () => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse[name] = !response[name];\n\n onResponseChange(newResponse, index);\n };\n\n onAnswerChange = (answer) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse.answer = answer;\n\n onResponseChange(newResponse, index);\n };\n\n onAlternateAnswerChange = (alternateId) => (answer) => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n newResponse.alternates[alternateId] = answer;\n\n onResponseChange(newResponse, index);\n };\n\n onAddAlternate = () => {\n const { response, onResponseChange, index } = this.props;\n const { alternateIdCounter } = this.state;\n const newResponse = { ...response };\n\n if (!newResponse.alternates) {\n newResponse.alternates = {};\n }\n\n newResponse.alternates[alternateIdCounter] = '';\n\n onResponseChange(newResponse, index);\n\n this.setState({\n alternateIdCounter: alternateIdCounter + 1,\n });\n };\n\n onRemoveAlternate = (alternateId) => () => {\n const { response, onResponseChange, index } = this.props;\n const newResponse = { ...response };\n\n delete newResponse.alternates[alternateId];\n\n onResponseChange(newResponse, index);\n\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad[alternateId] ? state.showKeypad.openCount : state.showKeypad.openCount - 1,\n },\n }));\n };\n\n onDone = () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: state.showKeypad.openCount - 1,\n main: false,\n },\n }));\n };\n\n onFocus = () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad.main ? state.showKeypad.openCount + 1 : state.showKeypad.openCount,\n main: true,\n },\n }));\n };\n\n onAlternateFocus = (alternateId) => () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: !state.showKeypad[alternateId] ? state.showKeypad.openCount + 1 : state.showKeypad.openCount,\n [alternateId]: true,\n },\n }));\n };\n\n onAlternateDone = (alternateId) => () => {\n this.setState((state) => ({\n showKeypad: {\n ...state.showKeypad,\n openCount: state.showKeypad.openCount - 1,\n [alternateId]: false,\n },\n }));\n };\n\n render() {\n const { classes, mode, defaultResponse, index, response, cAllowTrailingZeros, cIgnoreOrder, error } = this.props;\n\n const { showKeypad } = this.state;\n const { validation, answer, alternates, ignoreOrder, allowTrailingZeros } = response;\n const hasAlternates = Object.keys(alternates || {}).length > 0;\n const classNames = {\n editor: classes.responseEditor,\n mathToolbar: classes.mathToolbar,\n };\n const styles = {\n minHeight: `${showKeypad.openCount > 0 ? 430 : 230}px`,\n };\n\n return (\n <Card className={classes.responseContainer} style={styles}>\n <CardContent className={classes.cardContent}>\n <div className={classes.titleBar}>\n <Typography className={classes.title} component=\"div\">\n Response {INDIVIDUAL_RESPONSE_CORRECTNESS_SUPPORTED ? (defaultResponse ? '' : index + 1) : ''}\n </Typography>\n\n <InputContainer label=\"Validation\" className={classes.selectContainer}>\n <Select className={classes.select} onChange={this.onChange('validation')} value={validation || 'literal'}>\n <MenuItem value=\"literal\">Literal Validation</MenuItem>\n <MenuItem value=\"symbolic\">Symbolic Validation</MenuItem>\n </Select>\n </InputContainer>\n </div>\n\n {validation === 'literal' && (\n <div className={classes.flexContainer}>\n {cAllowTrailingZeros.enabled && (\n <FormControlLabel\n label={cAllowTrailingZeros.label}\n control={\n <Checkbox\n className={classes.customColor}\n checked={allowTrailingZeros}\n onChange={this.onLiteralOptionsChange('allowTrailingZeros')}\n />\n }\n />\n )}\n\n {cIgnoreOrder.enabled && (\n <FormControlLabel\n label={cIgnoreOrder.label}\n control={\n <Checkbox \n className={classes.customColor} \n checked={ignoreOrder} \n onChange={this.onLiteralOptionsChange('ignoreOrder')} />}\n />\n )}\n </div>\n )}\n\n <div className={classes.inputContainer}>\n <InputLabel>Correct Answer</InputLabel>\n <MathToolbar\n keypadMode={mode}\n classNames={classNames}\n controlledKeypad\n showKeypad={showKeypad.main}\n latex={answer || ''}\n onChange={this.onAnswerChange}\n onFocus={this.onFocus}\n onDone={this.onDone}\n error={error && error.answer}\n />\n {error && error.answer ? <div className={classes.errorText}>{error.answer}</div> : null}\n </div>\n\n {hasAlternates &&\n Object.keys(alternates).map((alternateId, altIdx) => (\n <div className={classes.inputContainer} key={alternateId}>\n <div className={classes.alternateBar}>\n <InputLabel>\n Alternate\n {Object.keys(alternates).length > 1 ? ` ${altIdx + 1}` : ''}\n </InputLabel>\n <Button\n className={classes.removeAlternateButton}\n type=\"secondary\"\n onClick={this.onRemoveAlternate(alternateId)}\n >\n Remove\n </Button>\n </div>\n\n <MathToolbar\n classNames={classNames}\n controlledKeypad\n keypadMode={mode}\n showKeypad={showKeypad[alternateId] || false}\n latex={alternates[alternateId] || ''}\n onChange={this.onAlternateAnswerChange(alternateId)}\n onFocus={this.onAlternateFocus(alternateId)}\n onDone={this.onAlternateDone(alternateId)}\n error={error && error[alternateId]}\n />\n {error && error[alternateId] ? <div className={classes.errorText}>{error[alternateId]}</div> : null}\n </div>\n ))}\n\n <Button className={classes.alternateButton} type=\"primary\" onClick={this.onAddAlternate}>\n ADD ALTERNATE\n </Button>\n </CardContent>\n </Card>\n );\n }\n}\n\nexport default withStyles(styles)(Response);\n"],"file":"response.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-inline-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@material-ui/icons": "^3.0.1",
|
|
12
12
|
"@pie-framework/mathquill": "^1.1.3",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
14
|
-
"@pie-lib/pie-toolbox": "2.
|
|
14
|
+
"@pie-lib/pie-toolbox": "2.2.0",
|
|
15
15
|
"classnames": "^2.2.5",
|
|
16
16
|
"debug": "^3.1.0",
|
|
17
17
|
"prop-types": "^15.6.2",
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [7.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@7.1.1...@pie-element/math-inline-controller@7.1.2) (2024-11-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update pie-lib/pie-toolbox PD-4401, PD-4441, PD-4319, PD-4394, PD-3687 ([f1f0af3](https://github.com/pie-framework/pie-elements/commit/f1f0af31f3c6fba54ca3a378dea3b8b32d8ebb87))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [7.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@7.1.0...@pie-element/math-inline-controller@7.1.1) (2024-11-01)
|
|
7
18
|
|
|
8
19
|
|
package/controller/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-inline-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "7.1.
|
|
4
|
+
"version": "7.1.2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@pie-framework/math-validation": "^1.2.2",
|
|
13
|
-
"@pie-lib/pie-toolbox": "2.
|
|
13
|
+
"@pie-lib/pie-toolbox": "2.2.0",
|
|
14
14
|
"debug": "^3.1.0",
|
|
15
15
|
"lodash": "^4.17.15"
|
|
16
16
|
},
|
package/module/configure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@5.2.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -13066,6 +13066,7 @@ const React$3 = _dll_react;
|
|
|
13066
13066
|
const PropTypes$2 = _dll_prop_types;
|
|
13067
13067
|
const {InputContainer: InputContainer$2} = _dll_pie_lib__pie_toolbox_config_ui;
|
|
13068
13068
|
const {MathToolbar: MathToolbar$1} = _dll_pie_lib__pie_toolbox_math_toolbar;
|
|
13069
|
+
const {color: color} = _dll_pie_lib__pie_toolbox_render_ui;
|
|
13069
13070
|
const _jsxFileName$2 = "/home/circleci/repo/packages/math-inline/configure/src/response.jsx";
|
|
13070
13071
|
const styles$3 = theme => ({
|
|
13071
13072
|
responseContainer: {
|
|
@@ -13122,6 +13123,9 @@ const styles$3 = theme => ({
|
|
|
13122
13123
|
fontSize: theme.typography.fontSize - 2,
|
|
13123
13124
|
color: theme.palette.error.main,
|
|
13124
13125
|
paddingTop: theme.spacing.unit
|
|
13126
|
+
},
|
|
13127
|
+
customColor: {
|
|
13128
|
+
color: `${color.tertiary()} !important`
|
|
13125
13129
|
}
|
|
13126
13130
|
});
|
|
13127
13131
|
class Response extends React$3.Component {
|
|
@@ -13312,21 +13316,21 @@ class Response extends React$3.Component {
|
|
|
13312
13316
|
__self: this,
|
|
13313
13317
|
__source: {
|
|
13314
13318
|
fileName: _jsxFileName$2,
|
|
13315
|
-
lineNumber:
|
|
13319
|
+
lineNumber: 248
|
|
13316
13320
|
}
|
|
13317
13321
|
}, React$3.createElement(CardContent, {
|
|
13318
13322
|
className: classes.cardContent,
|
|
13319
13323
|
__self: this,
|
|
13320
13324
|
__source: {
|
|
13321
13325
|
fileName: _jsxFileName$2,
|
|
13322
|
-
lineNumber:
|
|
13326
|
+
lineNumber: 249
|
|
13323
13327
|
}
|
|
13324
13328
|
}, React$3.createElement('div', {
|
|
13325
13329
|
className: classes.titleBar,
|
|
13326
13330
|
__self: this,
|
|
13327
13331
|
__source: {
|
|
13328
13332
|
fileName: _jsxFileName$2,
|
|
13329
|
-
lineNumber:
|
|
13333
|
+
lineNumber: 250
|
|
13330
13334
|
}
|
|
13331
13335
|
}, React$3.createElement(Typography, {
|
|
13332
13336
|
className: classes.title,
|
|
@@ -13334,7 +13338,7 @@ class Response extends React$3.Component {
|
|
|
13334
13338
|
__self: this,
|
|
13335
13339
|
__source: {
|
|
13336
13340
|
fileName: _jsxFileName$2,
|
|
13337
|
-
lineNumber:
|
|
13341
|
+
lineNumber: 251
|
|
13338
13342
|
}
|
|
13339
13343
|
}, "Response ", ''), React$3.createElement(InputContainer$2, {
|
|
13340
13344
|
label: "Validation",
|
|
@@ -13342,7 +13346,7 @@ class Response extends React$3.Component {
|
|
|
13342
13346
|
__self: this,
|
|
13343
13347
|
__source: {
|
|
13344
13348
|
fileName: _jsxFileName$2,
|
|
13345
|
-
lineNumber:
|
|
13349
|
+
lineNumber: 255
|
|
13346
13350
|
}
|
|
13347
13351
|
}, React$3.createElement(Select, {
|
|
13348
13352
|
className: classes.select,
|
|
@@ -13351,73 +13355,75 @@ class Response extends React$3.Component {
|
|
|
13351
13355
|
__self: this,
|
|
13352
13356
|
__source: {
|
|
13353
13357
|
fileName: _jsxFileName$2,
|
|
13354
|
-
lineNumber:
|
|
13358
|
+
lineNumber: 256
|
|
13355
13359
|
}
|
|
13356
13360
|
}, React$3.createElement(MenuItem, {
|
|
13357
13361
|
value: "literal",
|
|
13358
13362
|
__self: this,
|
|
13359
13363
|
__source: {
|
|
13360
13364
|
fileName: _jsxFileName$2,
|
|
13361
|
-
lineNumber:
|
|
13365
|
+
lineNumber: 257
|
|
13362
13366
|
}
|
|
13363
13367
|
}, "Literal Validation"), React$3.createElement(MenuItem, {
|
|
13364
13368
|
value: "symbolic",
|
|
13365
13369
|
__self: this,
|
|
13366
13370
|
__source: {
|
|
13367
13371
|
fileName: _jsxFileName$2,
|
|
13368
|
-
lineNumber:
|
|
13372
|
+
lineNumber: 258
|
|
13369
13373
|
}
|
|
13370
13374
|
}, "Symbolic Validation")))), validation === 'literal' && React$3.createElement('div', {
|
|
13371
13375
|
className: classes.flexContainer,
|
|
13372
13376
|
__self: this,
|
|
13373
13377
|
__source: {
|
|
13374
13378
|
fileName: _jsxFileName$2,
|
|
13375
|
-
lineNumber:
|
|
13379
|
+
lineNumber: 264
|
|
13376
13380
|
}
|
|
13377
13381
|
}, cAllowTrailingZeros.enabled && React$3.createElement(FormControlLabel, {
|
|
13378
13382
|
label: cAllowTrailingZeros.label,
|
|
13379
13383
|
control: React$3.createElement(Checkbox, {
|
|
13384
|
+
className: classes.customColor,
|
|
13380
13385
|
checked: allowTrailingZeros,
|
|
13381
13386
|
onChange: this.onLiteralOptionsChange('allowTrailingZeros'),
|
|
13382
13387
|
__self: this,
|
|
13383
13388
|
__source: {
|
|
13384
13389
|
fileName: _jsxFileName$2,
|
|
13385
|
-
lineNumber:
|
|
13390
|
+
lineNumber: 269
|
|
13386
13391
|
}
|
|
13387
13392
|
}),
|
|
13388
13393
|
__self: this,
|
|
13389
13394
|
__source: {
|
|
13390
13395
|
fileName: _jsxFileName$2,
|
|
13391
|
-
lineNumber:
|
|
13396
|
+
lineNumber: 266
|
|
13392
13397
|
}
|
|
13393
13398
|
}), cIgnoreOrder.enabled && React$3.createElement(FormControlLabel, {
|
|
13394
13399
|
label: cIgnoreOrder.label,
|
|
13395
13400
|
control: React$3.createElement(Checkbox, {
|
|
13401
|
+
className: classes.customColor,
|
|
13396
13402
|
checked: ignoreOrder,
|
|
13397
13403
|
onChange: this.onLiteralOptionsChange('ignoreOrder'),
|
|
13398
13404
|
__self: this,
|
|
13399
13405
|
__source: {
|
|
13400
13406
|
fileName: _jsxFileName$2,
|
|
13401
|
-
lineNumber:
|
|
13407
|
+
lineNumber: 282
|
|
13402
13408
|
}
|
|
13403
13409
|
}),
|
|
13404
13410
|
__self: this,
|
|
13405
13411
|
__source: {
|
|
13406
13412
|
fileName: _jsxFileName$2,
|
|
13407
|
-
lineNumber:
|
|
13413
|
+
lineNumber: 279
|
|
13408
13414
|
}
|
|
13409
13415
|
})), React$3.createElement('div', {
|
|
13410
13416
|
className: classes.inputContainer,
|
|
13411
13417
|
__self: this,
|
|
13412
13418
|
__source: {
|
|
13413
13419
|
fileName: _jsxFileName$2,
|
|
13414
|
-
lineNumber:
|
|
13420
|
+
lineNumber: 291
|
|
13415
13421
|
}
|
|
13416
13422
|
}, React$3.createElement(InputLabel, {
|
|
13417
13423
|
__self: this,
|
|
13418
13424
|
__source: {
|
|
13419
13425
|
fileName: _jsxFileName$2,
|
|
13420
|
-
lineNumber:
|
|
13426
|
+
lineNumber: 292
|
|
13421
13427
|
}
|
|
13422
13428
|
}, "Correct Answer"), React$3.createElement(MathToolbar$1, {
|
|
13423
13429
|
keypadMode: mode,
|
|
@@ -13432,14 +13438,14 @@ class Response extends React$3.Component {
|
|
|
13432
13438
|
__self: this,
|
|
13433
13439
|
__source: {
|
|
13434
13440
|
fileName: _jsxFileName$2,
|
|
13435
|
-
lineNumber:
|
|
13441
|
+
lineNumber: 293
|
|
13436
13442
|
}
|
|
13437
13443
|
}), error && error.answer ? React$3.createElement('div', {
|
|
13438
13444
|
className: classes.errorText,
|
|
13439
13445
|
__self: this,
|
|
13440
13446
|
__source: {
|
|
13441
13447
|
fileName: _jsxFileName$2,
|
|
13442
|
-
lineNumber:
|
|
13448
|
+
lineNumber: 304
|
|
13443
13449
|
}
|
|
13444
13450
|
}, error.answer) : null), hasAlternates && Object.keys(alternates).map((alternateId, altIdx) => React$3.createElement('div', {
|
|
13445
13451
|
className: classes.inputContainer,
|
|
@@ -13447,20 +13453,20 @@ class Response extends React$3.Component {
|
|
|
13447
13453
|
__self: this,
|
|
13448
13454
|
__source: {
|
|
13449
13455
|
fileName: _jsxFileName$2,
|
|
13450
|
-
lineNumber:
|
|
13456
|
+
lineNumber: 309
|
|
13451
13457
|
}
|
|
13452
13458
|
}, React$3.createElement('div', {
|
|
13453
13459
|
className: classes.alternateBar,
|
|
13454
13460
|
__self: this,
|
|
13455
13461
|
__source: {
|
|
13456
13462
|
fileName: _jsxFileName$2,
|
|
13457
|
-
lineNumber:
|
|
13463
|
+
lineNumber: 310
|
|
13458
13464
|
}
|
|
13459
13465
|
}, React$3.createElement(InputLabel, {
|
|
13460
13466
|
__self: this,
|
|
13461
13467
|
__source: {
|
|
13462
13468
|
fileName: _jsxFileName$2,
|
|
13463
|
-
lineNumber:
|
|
13469
|
+
lineNumber: 311
|
|
13464
13470
|
}
|
|
13465
13471
|
}, "Alternate", Object.keys(alternates).length > 1 ? ` ${altIdx + 1}` : ''), React$3.createElement(Button, {
|
|
13466
13472
|
className: classes.removeAlternateButton,
|
|
@@ -13469,7 +13475,7 @@ class Response extends React$3.Component {
|
|
|
13469
13475
|
__self: this,
|
|
13470
13476
|
__source: {
|
|
13471
13477
|
fileName: _jsxFileName$2,
|
|
13472
|
-
lineNumber:
|
|
13478
|
+
lineNumber: 315
|
|
13473
13479
|
}
|
|
13474
13480
|
}, "Remove")), React$3.createElement(MathToolbar$1, {
|
|
13475
13481
|
classNames: classNames,
|
|
@@ -13484,14 +13490,14 @@ class Response extends React$3.Component {
|
|
|
13484
13490
|
__self: this,
|
|
13485
13491
|
__source: {
|
|
13486
13492
|
fileName: _jsxFileName$2,
|
|
13487
|
-
lineNumber:
|
|
13493
|
+
lineNumber: 324
|
|
13488
13494
|
}
|
|
13489
13495
|
}), error && error[alternateId] ? React$3.createElement('div', {
|
|
13490
13496
|
className: classes.errorText,
|
|
13491
13497
|
__self: this,
|
|
13492
13498
|
__source: {
|
|
13493
13499
|
fileName: _jsxFileName$2,
|
|
13494
|
-
lineNumber:
|
|
13500
|
+
lineNumber: 335
|
|
13495
13501
|
}
|
|
13496
13502
|
}, error[alternateId]) : null)), React$3.createElement(Button, {
|
|
13497
13503
|
className: classes.alternateButton,
|
|
@@ -13500,7 +13506,7 @@ class Response extends React$3.Component {
|
|
|
13500
13506
|
__self: this,
|
|
13501
13507
|
__source: {
|
|
13502
13508
|
fileName: _jsxFileName$2,
|
|
13503
|
-
lineNumber:
|
|
13509
|
+
lineNumber: 339
|
|
13504
13510
|
}
|
|
13505
13511
|
}, "ADD ALTERNATE")));
|
|
13506
13512
|
}
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.2.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.2.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "8.
|
|
7
|
+
"version": "8.3.0",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"description": "",
|
|
10
10
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@material-ui/core": "^3.9.2",
|
|
15
15
|
"@pie-framework/mathquill": "^1.1.3",
|
|
16
16
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
17
|
-
"@pie-lib/pie-toolbox": "2.
|
|
17
|
+
"@pie-lib/pie-toolbox": "2.2.0",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
19
19
|
"debug": "^4.1.1",
|
|
20
20
|
"lodash": "^4.17.10",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "20cc12d3d06ad5318bfa4c6994cf7c7614dfed2f",
|
|
28
28
|
"module": "src/index.js",
|
|
29
29
|
"exports": {
|
|
30
30
|
".": "./src/index.js",
|