@pie-element/number-line 8.3.1-next.9 → 8.4.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 +21 -0
- package/configure/CHANGELOG.md +18 -0
- package/configure/lib/main.js +3 -2
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +17 -0
- package/controller/package.json +2 -2
- package/docs/config-schema.json +77 -0
- package/docs/config-schema.json.md +56 -0
- package/docs/pie-schema.json +33 -0
- package/docs/pie-schema.json.md +24 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
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](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line@8.3.0...@pie-element/number-line@8.4.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Renamed the html prop to the correct math prop PD-3527 ([28061b6](https://github.com/pie-framework/pie-elements/commit/28061b6032817dae15837131d8a0bf5a08683b10))
|
|
12
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Add configuration for custom buttons PD-3520 ([a7a7ace](https://github.com/pie-framework/pie-elements/commit/a7a7ace27eaac47c9a0f172f7ae0440c6dc4e600))
|
|
18
|
+
* Add configuration for custom buttons PD-3527 ([45a32bd](https://github.com/pie-framework/pie-elements/commit/45a32bd8e9d7bd33beca74cc10c7dd973a9f9dbc))
|
|
19
|
+
* Replace math-rendering package with math-rendering-accessible-package for accessibility PD-1870 ([b6cdee8](https://github.com/pie-framework/pie-elements/commit/b6cdee8915b06e4c11b002b10437db07ce966501))
|
|
20
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
21
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
# [8.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line@8.2.2...@pie-element/number-line@8.3.0) (2024-03-15)
|
|
7
28
|
|
|
8
29
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line-configure@7.3.0...@pie-element/number-line-configure@7.4.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add configuration for custom buttons PD-3520 ([a7a7ace](https://github.com/pie-framework/pie-elements/commit/a7a7ace27eaac47c9a0f172f7ae0440c6dc4e600))
|
|
17
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
18
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# [7.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line-configure@7.2.2...@pie-element/number-line-configure@7.3.0) (2024-03-15)
|
|
7
25
|
|
|
8
26
|
|
package/configure/lib/main.js
CHANGED
|
@@ -623,8 +623,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
623
623
|
position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
|
|
624
624
|
};
|
|
625
625
|
|
|
626
|
-
var getPluginProps = function getPluginProps(
|
|
627
|
-
|
|
626
|
+
var getPluginProps = function getPluginProps() {
|
|
627
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
628
|
+
return _objectSpread(_objectSpread({}, baseInputConfiguration), props);
|
|
628
629
|
};
|
|
629
630
|
|
|
630
631
|
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["trimModel","model","feedback","undefined","prompt","teacherInstructions","graph","title","disabled","correctResponse","lineIsSwitched","dataConverter","switchGraphLine","toGraphFormat","toSessionFormat","minorLimits","minorValues","majorValues","styles","theme","maxNumberOfPoints","width","checkbox","marginTop","spacing","unit","marginBottom","row","display","flexWrap","paddingRight","pointTypeChooser","margin","promptContainer","paddingTop","tooltip","fontSize","typography","whiteSpace","maxWidth","inlineFlexContainer","resetButton","errorText","color","palette","error","main","flexRow","alignItems","gap","description","toPointType","response","rest","pointType","direction","leftPoint","rightPoint","type","toUpperCase","Main","props","obj","onChange","respIndex","forEach","correctResp","key","domainPosition","domain","min","max","size","push","length","setState","correctAnswerDialog","open","text","indices","reloadTicksData","height","graphChange","availableTypes","onlyPFAvailable","Object","entries","value","e","Math","floor","dialog","getAdjustedHeight","object","ticks","tickUtils","snapElements","initialElements","updatedGraph","updateMajorValue","tickIntervalType","minor","getMinorLimits","math","number","ceil","integerTick","decimal","fraction","fractionTick","decimalTick","generateMinorValues","minValue","maxValue","n","d","generateMajorValuesForMinor","indexOf","major","currIndex","arrows","defaultModel","index","el","position","update","Set","map","filter","v","some","data","pop","state","classes","configuration","uploadSoundSupport","baseInputConfiguration","contentDimensions","instruction","mathMlOptions","numberLineDimensions","maxMaxElements","hidePointConfigButtons","availableTools","errors","spellCheckEnabled","toolbarEditorPosition","correctResponseError","domainError","maxError","pointsError","promptError","teacherInstructionsError","widthError","validationMessage","initialModel","toolbarOpts","getPluginProps","assign","label","settings","inputConfiguration","language","marginLeft","changeTicks","widthEnabled","step","changeSize","changeArrows","changeGraphTitle","exhibitOnly","availableTypesChange","changeMaxNoOfPoints","moveCorrectResponse","deleteCorrectResponse","addCorrectResponse","clearCorrectResponse","undoCorrectResponse","React","Component","PropTypes","isRequired","func","name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;AAAA,yCACbA,KADa;AAEhBC,IAAAA,QAAQ,EAAEC,SAFM;AAGhBC,IAAAA,MAAM,EAAED,SAHQ;AAIhBE,IAAAA,mBAAmB,EAAEF,SAJL;AAKhBG,IAAAA,KAAK,kCAAOL,KAAK,CAACK,KAAb;AAAoBC,MAAAA,KAAK,EAAEJ,SAA3B;AAAsCK,MAAAA,QAAQ,EAAE;AAAhD,MALW;AAMhBC,IAAAA,eAAe,EAAEN;AAND;AAAA,CAAlB;;AASA,IAAQO,cAAR,GAA4EC,yBAA5E,CAAQD,cAAR;AAAA,IAAwBE,eAAxB,GAA4ED,yBAA5E,CAAwBC,eAAxB;AAAA,IAAyCC,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EAxkBuBsG,kBAAMC,S;;;iCAAnBxH,I,eACQ;AACjB0E,EAAAA,OAAO,EAAE+C,sBAAUxF,MAAV,CAAiByF,UADT;AAEjBrL,EAAAA,KAAK,EAAEoL,sBAAUxF,MAAV,CAAiByF,UAFP;AAGjB/C,EAAAA,aAAa,EAAE8C,sBAAUxF,MAAV,CAAiByF,UAHf;AAIjBvH,EAAAA,QAAQ,EAAEsH,sBAAUE,IAAV,CAAeD,UAJR;AAKjB9C,EAAAA,kBAAkB,EAAE6C,sBAAUxF,MAAV,CAAiByF;AALpB,C;;eA0kBN,wBAAWpK,MAAX,EAAmB;AAAEsK,EAAAA,IAAI,EAAE;AAAR,CAAnB,EAAqC5H,IAArC,C","sourcesContent":["import React from 'react';\nimport { FormSection, InputContainer, AlertDialog, layout } from '@pie-lib/pie-toolbox/config-ui';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport { NumberLineComponent, dataConverter, tickUtils } from '@pie-element/number-line';\nimport NumberTextField from './number-text-field';\nimport CardBar from './card-bar';\nimport Size from './size';\nimport PropTypes from 'prop-types';\nimport Domain from './domain';\nimport Arrows from './arrows';\nimport PointConfig from './point-config';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Ticks from './ticks';\nimport { model as defaultModel } from './defaults';\nimport { generateValidationMessage } from './utils';\nimport * as math from 'mathjs';\n\nconst trimModel = (model) => ({\n ...model,\n feedback: undefined,\n prompt: undefined,\n teacherInstructions: undefined,\n graph: { ...model.graph, title: undefined, disabled: true },\n correctResponse: undefined,\n});\n\nconst { lineIsSwitched, switchGraphLine, toGraphFormat, toSessionFormat } = dataConverter;\nlet minorLimits = {};\nlet minorValues = {};\nlet majorValues = {};\n\nconst styles = (theme) => ({\n maxNumberOfPoints: {\n width: '150px',\n },\n checkbox: {\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n row: {\n display: 'flex',\n flexWrap: 'wrap',\n '& > *': {\n paddingRight: theme.spacing.unit * 2,\n },\n },\n pointTypeChooser: {\n margin: `${theme.spacing.unit * 2.5}px 0`,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n title: {\n marginBottom: theme.spacing.unit * 4,\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n inlineFlexContainer: {\n display: 'inline-flex',\n },\n resetButton: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n flexRow: {\n display: 'flex',\n alignItems: 'center',\n gap: '10px',\n },\n description: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n});\n\nexport const toPointType = (response) => {\n function rest(response) {\n if (response.pointType) {\n if (response.direction) {\n return `${response.pointType[0]}${response.direction[0]}`;\n }\n\n return response.pointType[0];\n }\n\n return `${response.leftPoint[0]}${response.rightPoint[0]}`;\n }\n\n return `${response.type[0]}${rest(response)}`.toUpperCase();\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const {\n model: {\n graph: { availableTypes, maxNumberOfPoints },\n },\n } = props;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n this.state = {\n dialog: {\n open: false,\n text: '',\n },\n correctAnswerDialog: {\n open: false,\n text: '',\n },\n };\n this.graphChange({ height });\n }\n\n graphChange = (obj) => {\n const { model, onChange } = this.props;\n let graph = { ...model.graph, ...obj };\n let respIndex = [];\n model.correctResponse.forEach((correctResp, key) => {\n if (\n correctResp.domainPosition < graph.domain.min ||\n correctResp.domainPosition > graph.domain.max ||\n (correctResp.size &&\n (correctResp.domainPosition + correctResp.size < graph.domain.min ||\n correctResp.domainPosition + correctResp.size > graph.domain.max))\n ) {\n respIndex.push(key);\n }\n });\n if (respIndex.length > 0) {\n this.setState({\n correctAnswerDialog: {\n open: true,\n text:\n 'This\\n' +\n 'change would make it impossible for students to plot one or more elements in the current\\n' +\n 'correct answer. If you proceed, all such elements will be removed from the correct\\n' +\n 'answer.',\n indices: respIndex,\n graph: model.graph,\n },\n });\n }\n //reload ticks value whenever domain and width is changed\n graph = this.reloadTicksData(graph);\n onChange({ graph });\n };\n\n changeSize = ({ width, height }) => this.graphChange({ width, height });\n\n getAdjustedHeight = (availableTypes, maxNumberOfPoints) => {\n let onlyPFAvailable = true;\n Object.entries(availableTypes || {}).forEach(([type, value]) => {\n if (type !== 'PF' && value) {\n onlyPFAvailable = false;\n return;\n }\n });\n return maxNumberOfPoints && (maxNumberOfPoints === 1 || onlyPFAvailable)\n ? 100\n : 50 + (maxNumberOfPoints || 20) * 25;\n };\n\n changeMaxNoOfPoints = (e, maxNumberOfPoints) => {\n maxNumberOfPoints = Math.floor(maxNumberOfPoints);\n if (this.props.model.correctResponse.length > maxNumberOfPoints) {\n this.setState({\n dialog: {\n open: true,\n text: 'To use this value, you must first remove one or more elements from the correct answers.',\n },\n });\n return;\n }\n const {\n model: {\n graph: { availableTypes },\n },\n } = this.props;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n\n this.graphChange({ maxNumberOfPoints, height });\n };\n\n changeGraphTitle = (title) => this.graphChange({ title });\n\n /*\n * Gets triggered whenever ticks related data is changed by user.\n * */\n changeTicks = (object) => {\n const { model, onChange } = this.props;\n let { ticks } = object;\n const correctResponse = tickUtils.snapElements(model.graph.domain, ticks, model.correctResponse);\n const initialElements = tickUtils.snapElements(model.graph.domain, ticks, model.graph.initialElements);\n let updatedGraph = this.updateMajorValue({ ...model.graph, ticks });\n const graph = { ...updatedGraph, initialElements };\n onChange({ graph, correctResponse });\n };\n\n /*\n * This function will reload ticks data whenever graph object is changed and also sets required tick object\n * for rendering Ticks Components.\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\n reloadTicksData = (graph) => {\n const { domain, ticks, width } = graph;\n //Set tick interval type if not present for legacy number line models depending upon minor value\n if (!ticks.tickIntervalType) {\n if (ticks.minor > 0.5) {\n ticks.tickIntervalType = 'Integer';\n } else {\n ticks.tickIntervalType = 'Decimal';\n }\n }\n // This section will calculate minor and major values array and assign respective value\n // to different tick types object\n minorLimits = tickUtils.getMinorLimits(domain, width);\n if (minorLimits.min >= 1) {\n /*\n * In this scenario only integer tick will be enabled\n * */\n ticks.tickIntervalType = 'Integer';\n ticks.minor =\n ticks.minor < 1\n ? math.number(math.ceil(minorLimits.min))\n : ticks.minor >= math.number(math.ceil(minorLimits.min)) &&\n ticks.minor <= math.number(math.floor(minorLimits.max))\n ? ticks.minor\n : math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n minorValues = { decimal: [], fraction: [] };\n ticks.fractionTick = '0';\n ticks.decimalTick = 0;\n } else if (minorLimits.min >= 0 && minorLimits.max < 1) {\n /*\n * In this scenario only decimal or fraction tick will be enabled\n * */\n if (ticks.tickIntervalType === 'Integer') {\n ticks.tickIntervalType = 'Fraction';\n }\n minorValues = tickUtils.generateMinorValues(minorLimits);\n let minValue = math.number(math.fraction(minorValues.fraction[0]));\n let maxValue = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n if (ticks.minor < minValue || ticks.minor > maxValue) {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n ticks.fractionTick = minorValues.fraction[minorValues.fraction.length - 1];\n ticks.decimalTick = minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.minor = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.decimalTick = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n ticks.decimalTick = ticks.decimalTick ? ticks.decimalTick : minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = ticks.fractionTick ? ticks.fractionTick : minorValues.fraction[0];\n }\n }\n ticks.integerTick = 1;\n } else if (minorLimits.min < 1 && minorLimits.max >= 1) {\n /*\n * In this scenario all integer, decimal or fraction tick will be enabled\n * */\n minorValues = tickUtils.generateMinorValues(minorLimits);\n if (!(ticks.minor >= minorLimits.min && ticks.minor <= minorLimits.max)) {\n if (minorLimits.min > 0.5) {\n ticks.tickIntervalType = 'Integer';\n }\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.minor = math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.minor = minorValues.decimal[0];\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[0]));\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n }\n }\n }\n return this.updateMajorValue({ ...graph, ticks });\n };\n\n /*\n * This function will update major value whenever minor value is changed or tick type is changed\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\n updateMajorValue = (graph) => {\n const { domain, ticks, width } = graph;\n majorValues = tickUtils.generateMajorValuesForMinor(ticks.minor, domain, width);\n if (majorValues.decimal.indexOf(ticks.major) === -1) {\n let currIndex = 0;\n if (ticks.tickIntervalType === 'Integer') {\n currIndex = majorValues.decimal.length > 4 ? 4 : majorValues.decimal.length - 1;\n } else {\n currIndex = majorValues.decimal.length - 1;\n }\n ticks.major = majorValues.decimal[currIndex];\n }\n graph.fraction = ticks.tickIntervalType === 'Fraction' && ticks.major < 1;\n return { ...graph, ticks };\n };\n\n changeArrows = (arrows) => this.graphChange({ arrows });\n\n setDefaults = () => {\n const {\n graph: { availableTypes, maxNumberOfPoints },\n } = defaultModel;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n const graph = { ...cloneDeep(defaultModel.graph), height };\n\n this.props.onChange({ graph });\n };\n\n moveCorrectResponse = (index, el, position) => {\n el.position = position;\n\n const { onChange, model } = this.props;\n const update = toSessionFormat(el.type === 'line' && lineIsSwitched(el) ? switchGraphLine(el) : el);\n const correctResponse = [...model.correctResponse];\n correctResponse[index] = update;\n\n onChange({ correctResponse });\n };\n\n availableTypesChange = (availableTypes) => {\n const { model, onChange } = this.props;\n const {\n correctResponse,\n graph: { maxNumberOfPoints },\n } = model;\n\n new Set(correctResponse.map(toPointType)).forEach((pointType) => {\n availableTypes[pointType] = true;\n });\n\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n const graph = { ...model.graph, availableTypes, height };\n\n onChange({ graph });\n };\n\n deleteCorrectResponse = (indices) => {\n const { model, onChange } = this.props;\n const correctResponse = model.correctResponse.filter((v, index) => !indices.some((d) => d === index));\n\n onChange({ correctResponse });\n };\n\n addCorrectResponse = (data) => {\n const { model, onChange } = this.props;\n const correctResponse = [...model.correctResponse];\n correctResponse.push(toSessionFormat(data));\n\n onChange({ correctResponse });\n };\n\n clearCorrectResponse = () => {\n const { onChange } = this.props;\n\n onChange({ correctResponse: [] });\n };\n\n undoCorrectResponse = () => {\n const { model, onChange } = this.props;\n const correctResponse = [...model.correctResponse];\n correctResponse.pop();\n onChange({ correctResponse });\n };\n\n render() {\n const { classes, model, onChange, configuration, uploadSoundSupport } = this.props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n instruction = {},\n teacherInstructions = {},\n title = {},\n prompt = {},\n mathMlOptions = {},\n numberLineDimensions = {},\n maxMaxElements = 20,\n hidePointConfigButtons = false,\n availableTools = ['PF'],\n } = configuration || {};\n const { errors = {}, spellCheckEnabled, toolbarEditorPosition } = model || {};\n let { graph } = model;\n graph = this.reloadTicksData(graph);\n const { dialog, correctAnswerDialog } = this.state;\n const {\n correctResponseError,\n domainError,\n maxError,\n pointsError,\n prompt: promptError,\n teacherInstructions: teacherInstructionsError,\n widthError,\n } = errors || {};\n const validationMessage = generateValidationMessage();\n const correctResponse = cloneDeep(model.correctResponse || []).map(toGraphFormat);\n const initialModel = cloneDeep(model);\n initialModel['disabled'] = true;\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout dimensions={contentDimensions} hideSettings={true} settings={null}>\n <Typography component=\"div\" type=\"body1\" className={classes.description}>\n {instruction.label}\n </Typography>\n\n {teacherInstructions.settings && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.teacherInstructions}\n markup={model.teacherInstructions}\n onChange={(teacherInstructions) => onChange({ teacherInstructions })}\n nonEmpty={false}\n disableUnderline\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n {prompt.settings && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={(prompt) => onChange({ prompt })}\n nonEmpty={false}\n disableUnderline\n error={promptError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <div className={classes.errorText}>{promptError}</div>}\n </InputContainer>\n )}\n\n <CardBar\n header=\"Set Up Number Line\"\n info={\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '8px' }} />\n </Tooltip>\n }\n >\n Set up the number line by entering the domain and number of tick marks to display. Labels on the number line\n can be edited or removed by clicking on the label.\n </CardBar>\n\n <div className={classes.row}>\n <Domain domain={graph.domain} errors={errors} onChange={(domain) => this.graphChange({ domain })} />\n </div>\n\n {maxError && <div className={classes.errorText}>{maxError}</div>}\n {domainError && <div className={classes.errorText}>{domainError}</div>}\n\n <div>\n <FormSection>\n <Ticks\n ticks={graph.ticks}\n minorLimits={minorLimits}\n minorValues={minorValues}\n majorValues={majorValues}\n onChange={this.changeTicks}\n />\n </FormSection>\n </div>\n\n <div className={classes.flexRow}>\n {model.widthEnabled && (\n <Size\n size={graph}\n min={numberLineDimensions.min}\n max={numberLineDimensions.max}\n step={numberLineDimensions.step}\n onChange={this.changeSize}\n />\n )}\n <div></div>\n <Arrows arrows={graph.arrows} onChange={this.changeArrows} />\n </div>\n\n {widthError && <div className={classes.errorText}>{widthError}</div>}\n\n <NumberLineComponent\n onMoveElement={() => {}}\n onDeleteElements={() => {}}\n onAddElement={() => {}}\n onClearElements={() => {}}\n onUndoElement={() => {}}\n minWidth={numberLineDimensions.min}\n maxWidth={numberLineDimensions.max}\n maxHeight={70}\n model={trimModel(initialModel)}\n />\n\n <FormSection label={title?.label || 'Title'} className={classes.title}>\n <EditableHtml\n markup={graph.title || ''}\n onChange={this.changeGraphTitle}\n toolbarOpts={toolbarOpts}\n activePlugins={[\n 'bold',\n 'html',\n 'italic',\n 'underline',\n 'strikethrough',\n 'image',\n 'math',\n 'languageCharacters',\n 'responseArea',\n ]}\n pluginProps={getPluginProps(title?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </FormSection>\n\n {!graph.exhibitOnly && (\n <React.Fragment>\n <CardBar header=\"Define Tool Set and Correct Response\">\n Select answer type and place it on the number line. Intersecting points, line segments and/or rays will\n appear above the number line. <i>Note: A maximum of 20 points, line segments or rays may be plotted.</i>\n </CardBar>\n\n <CardBar header=\"Available Tools\" mini>\n Click on the input options to be displayed to the students. All inputs will display by default.\n </CardBar>\n\n <div className={classes.pointTypeChooser}>\n <PointConfig\n onSelectionChange={this.availableTypesChange}\n selection={graph.availableTypes}\n availableTools={availableTools}\n hideButtons={hidePointConfigButtons}\n />\n </div>\n\n <FormSection className={classes.flexRow}>\n <label>Max No of Elements</label>\n <NumberTextField\n className={classes.maxNumberOfPoints}\n min={1}\n max={maxMaxElements}\n onlyIntegersAllowed={true}\n value={graph.maxNumberOfPoints}\n onChange={this.changeMaxNoOfPoints}\n />\n {pointsError && <div className={classes.errorText}>{pointsError}</div>}\n </FormSection>\n\n <label>Correct Answer</label>\n\n <NumberLineComponent\n onMoveElement={this.moveCorrectResponse}\n onDeleteElements={this.deleteCorrectResponse}\n onAddElement={this.addCorrectResponse}\n onClearElements={this.clearCorrectResponse}\n onUndoElement={this.undoCorrectResponse}\n minWidth={numberLineDimensions.min}\n maxWidth={numberLineDimensions.max}\n answer={correctResponse}\n //strip feedback for this model\n model={trimModel(model)}\n />\n {correctResponseError && <div className={classes.errorText}>{correctResponseError}</div>}\n </React.Fragment>\n )}\n <AlertDialog\n open={dialog.open}\n title=\"Warning\"\n text={dialog.text}\n onConfirm={() => this.setState({ dialog: { open: false } })}\n />\n <AlertDialog\n open={correctAnswerDialog.open}\n title=\"Warning\"\n text={correctAnswerDialog.text}\n onConfirm={() => {\n let indices = this.state.correctAnswerDialog.indices;\n if (indices && indices.length > 0) {\n this.deleteCorrectResponse(indices);\n }\n this.setState({ correctAnswerDialog: { open: false } });\n }}\n onClose={() => {\n const graph = this.state.correctAnswerDialog.graph;\n onChange({ graph });\n this.setState({ correctAnswerDialog: { open: false } });\n }}\n onConfirmText={'OK'}\n onCloseText={'Cancel'}\n />\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles, { name: 'Main' })(Main);\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["trimModel","model","feedback","undefined","prompt","teacherInstructions","graph","title","disabled","correctResponse","lineIsSwitched","dataConverter","switchGraphLine","toGraphFormat","toSessionFormat","minorLimits","minorValues","majorValues","styles","theme","maxNumberOfPoints","width","checkbox","marginTop","spacing","unit","marginBottom","row","display","flexWrap","paddingRight","pointTypeChooser","margin","promptContainer","paddingTop","tooltip","fontSize","typography","whiteSpace","maxWidth","inlineFlexContainer","resetButton","errorText","color","palette","error","main","flexRow","alignItems","gap","description","toPointType","response","rest","pointType","direction","leftPoint","rightPoint","type","toUpperCase","Main","props","obj","onChange","respIndex","forEach","correctResp","key","domainPosition","domain","min","max","size","push","length","setState","correctAnswerDialog","open","text","indices","reloadTicksData","height","graphChange","availableTypes","onlyPFAvailable","Object","entries","value","e","Math","floor","dialog","getAdjustedHeight","object","ticks","tickUtils","snapElements","initialElements","updatedGraph","updateMajorValue","tickIntervalType","minor","getMinorLimits","math","number","ceil","integerTick","decimal","fraction","fractionTick","decimalTick","generateMinorValues","minValue","maxValue","n","d","generateMajorValuesForMinor","indexOf","major","currIndex","arrows","defaultModel","index","el","position","update","Set","map","filter","v","some","data","pop","state","classes","configuration","uploadSoundSupport","baseInputConfiguration","contentDimensions","instruction","mathMlOptions","numberLineDimensions","maxMaxElements","hidePointConfigButtons","availableTools","errors","spellCheckEnabled","toolbarEditorPosition","correctResponseError","domainError","maxError","pointsError","promptError","teacherInstructionsError","widthError","validationMessage","initialModel","toolbarOpts","getPluginProps","label","settings","inputConfiguration","language","marginLeft","changeTicks","widthEnabled","step","changeSize","changeArrows","changeGraphTitle","exhibitOnly","availableTypesChange","changeMaxNoOfPoints","moveCorrectResponse","deleteCorrectResponse","addCorrectResponse","clearCorrectResponse","undoCorrectResponse","React","Component","PropTypes","isRequired","func","name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;AAAA,yCACbA,KADa;AAEhBC,IAAAA,QAAQ,EAAEC,SAFM;AAGhBC,IAAAA,MAAM,EAAED,SAHQ;AAIhBE,IAAAA,mBAAmB,EAAEF,SAJL;AAKhBG,IAAAA,KAAK,kCAAOL,KAAK,CAACK,KAAb;AAAoBC,MAAAA,KAAK,EAAEJ,SAA3B;AAAsCK,MAAAA,QAAQ,EAAE;AAAhD,MALW;AAMhBC,IAAAA,eAAe,EAAEN;AAND;AAAA,CAAlB;;AASA,IAAQO,cAAR,GAA4EC,yBAA5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;AAiBE,QAAA,WAAW,EAAE;AAjBf,QA9LF,CADF;AAoND;;;EApkBuBqG,kBAAMC,S;;;iCAAnBvH,I,eACQ;AACjB0E,EAAAA,OAAO,EAAE8C,sBAAUvF,MAAV,CAAiBwF,UADT;AAEjBpL,EAAAA,KAAK,EAAEmL,sBAAUvF,MAAV,CAAiBwF,UAFP;AAGjB9C,EAAAA,aAAa,EAAE6C,sBAAUvF,MAAV,CAAiBwF,UAHf;AAIjBtH,EAAAA,QAAQ,EAAEqH,sBAAUE,IAAV,CAAeD,UAJR;AAKjB7C,EAAAA,kBAAkB,EAAE4C,sBAAUvF,MAAV,CAAiBwF;AALpB,C;;eAskBN,wBAAWnK,MAAX,EAAmB;AAAEqK,EAAAA,IAAI,EAAE;AAAR,CAAnB,EAAqC3H,IAArC,C","sourcesContent":["import React from 'react';\nimport { FormSection, InputContainer, AlertDialog, layout } from '@pie-lib/pie-toolbox/config-ui';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport { NumberLineComponent, dataConverter, tickUtils } from '@pie-element/number-line';\nimport NumberTextField from './number-text-field';\nimport CardBar from './card-bar';\nimport Size from './size';\nimport PropTypes from 'prop-types';\nimport Domain from './domain';\nimport Arrows from './arrows';\nimport PointConfig from './point-config';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Ticks from './ticks';\nimport { model as defaultModel } from './defaults';\nimport { generateValidationMessage } from './utils';\nimport * as math from 'mathjs';\n\nconst trimModel = (model) => ({\n ...model,\n feedback: undefined,\n prompt: undefined,\n teacherInstructions: undefined,\n graph: { ...model.graph, title: undefined, disabled: true },\n correctResponse: undefined,\n});\n\nconst { lineIsSwitched, switchGraphLine, toGraphFormat, toSessionFormat } = dataConverter;\nlet minorLimits = {};\nlet minorValues = {};\nlet majorValues = {};\n\nconst styles = (theme) => ({\n maxNumberOfPoints: {\n width: '150px',\n },\n checkbox: {\n marginTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n row: {\n display: 'flex',\n flexWrap: 'wrap',\n '& > *': {\n paddingRight: theme.spacing.unit * 2,\n },\n },\n pointTypeChooser: {\n margin: `${theme.spacing.unit * 2.5}px 0`,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n title: {\n marginBottom: theme.spacing.unit * 4,\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n inlineFlexContainer: {\n display: 'inline-flex',\n },\n resetButton: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing.unit,\n },\n flexRow: {\n display: 'flex',\n alignItems: 'center',\n gap: '10px',\n },\n description: {\n marginBottom: theme.spacing.unit * 2.5,\n },\n});\n\nexport const toPointType = (response) => {\n function rest(response) {\n if (response.pointType) {\n if (response.direction) {\n return `${response.pointType[0]}${response.direction[0]}`;\n }\n\n return response.pointType[0];\n }\n\n return `${response.leftPoint[0]}${response.rightPoint[0]}`;\n }\n\n return `${response.type[0]}${rest(response)}`.toUpperCase();\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n const {\n model: {\n graph: { availableTypes, maxNumberOfPoints },\n },\n } = props;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n this.state = {\n dialog: {\n open: false,\n text: '',\n },\n correctAnswerDialog: {\n open: false,\n text: '',\n },\n };\n this.graphChange({ height });\n }\n\n graphChange = (obj) => {\n const { model, onChange } = this.props;\n let graph = { ...model.graph, ...obj };\n let respIndex = [];\n model.correctResponse.forEach((correctResp, key) => {\n if (\n correctResp.domainPosition < graph.domain.min ||\n correctResp.domainPosition > graph.domain.max ||\n (correctResp.size &&\n (correctResp.domainPosition + correctResp.size < graph.domain.min ||\n correctResp.domainPosition + correctResp.size > graph.domain.max))\n ) {\n respIndex.push(key);\n }\n });\n if (respIndex.length > 0) {\n this.setState({\n correctAnswerDialog: {\n open: true,\n text:\n 'This\\n' +\n 'change would make it impossible for students to plot one or more elements in the current\\n' +\n 'correct answer. If you proceed, all such elements will be removed from the correct\\n' +\n 'answer.',\n indices: respIndex,\n graph: model.graph,\n },\n });\n }\n //reload ticks value whenever domain and width is changed\n graph = this.reloadTicksData(graph);\n onChange({ graph });\n };\n\n changeSize = ({ width, height }) => this.graphChange({ width, height });\n\n getAdjustedHeight = (availableTypes, maxNumberOfPoints) => {\n let onlyPFAvailable = true;\n Object.entries(availableTypes || {}).forEach(([type, value]) => {\n if (type !== 'PF' && value) {\n onlyPFAvailable = false;\n return;\n }\n });\n return maxNumberOfPoints && (maxNumberOfPoints === 1 || onlyPFAvailable)\n ? 100\n : 50 + (maxNumberOfPoints || 20) * 25;\n };\n\n changeMaxNoOfPoints = (e, maxNumberOfPoints) => {\n maxNumberOfPoints = Math.floor(maxNumberOfPoints);\n if (this.props.model.correctResponse.length > maxNumberOfPoints) {\n this.setState({\n dialog: {\n open: true,\n text: 'To use this value, you must first remove one or more elements from the correct answers.',\n },\n });\n return;\n }\n const {\n model: {\n graph: { availableTypes },\n },\n } = this.props;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n\n this.graphChange({ maxNumberOfPoints, height });\n };\n\n changeGraphTitle = (title) => this.graphChange({ title });\n\n /*\n * Gets triggered whenever ticks related data is changed by user.\n * */\n changeTicks = (object) => {\n const { model, onChange } = this.props;\n let { ticks } = object;\n const correctResponse = tickUtils.snapElements(model.graph.domain, ticks, model.correctResponse);\n const initialElements = tickUtils.snapElements(model.graph.domain, ticks, model.graph.initialElements);\n let updatedGraph = this.updateMajorValue({ ...model.graph, ticks });\n const graph = { ...updatedGraph, initialElements };\n onChange({ graph, correctResponse });\n };\n\n /*\n * This function will reload ticks data whenever graph object is changed and also sets required tick object\n * for rendering Ticks Components.\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\n reloadTicksData = (graph) => {\n const { domain, ticks, width } = graph;\n //Set tick interval type if not present for legacy number line models depending upon minor value\n if (!ticks.tickIntervalType) {\n if (ticks.minor > 0.5) {\n ticks.tickIntervalType = 'Integer';\n } else {\n ticks.tickIntervalType = 'Decimal';\n }\n }\n // This section will calculate minor and major values array and assign respective value\n // to different tick types object\n minorLimits = tickUtils.getMinorLimits(domain, width);\n if (minorLimits.min >= 1) {\n /*\n * In this scenario only integer tick will be enabled\n * */\n ticks.tickIntervalType = 'Integer';\n ticks.minor =\n ticks.minor < 1\n ? math.number(math.ceil(minorLimits.min))\n : ticks.minor >= math.number(math.ceil(minorLimits.min)) &&\n ticks.minor <= math.number(math.floor(minorLimits.max))\n ? ticks.minor\n : math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n minorValues = { decimal: [], fraction: [] };\n ticks.fractionTick = '0';\n ticks.decimalTick = 0;\n } else if (minorLimits.min >= 0 && minorLimits.max < 1) {\n /*\n * In this scenario only decimal or fraction tick will be enabled\n * */\n if (ticks.tickIntervalType === 'Integer') {\n ticks.tickIntervalType = 'Fraction';\n }\n minorValues = tickUtils.generateMinorValues(minorLimits);\n let minValue = math.number(math.fraction(minorValues.fraction[0]));\n let maxValue = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n if (ticks.minor < minValue || ticks.minor > maxValue) {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[minorValues.fraction.length - 1]));\n ticks.fractionTick = minorValues.fraction[minorValues.fraction.length - 1];\n ticks.decimalTick = minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.minor = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.decimalTick = minorValues.decimal[minorValues.decimal.length - 1];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Fraction':\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n ticks.decimalTick = ticks.decimalTick ? ticks.decimalTick : minorValues.decimal[0];\n break;\n case 'Decimal':\n case 'Integer':\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = ticks.fractionTick ? ticks.fractionTick : minorValues.fraction[0];\n }\n }\n ticks.integerTick = 1;\n } else if (minorLimits.min < 1 && minorLimits.max >= 1) {\n /*\n * In this scenario all integer, decimal or fraction tick will be enabled\n * */\n minorValues = tickUtils.generateMinorValues(minorLimits);\n if (!(ticks.minor >= minorLimits.min && ticks.minor <= minorLimits.max)) {\n if (minorLimits.min > 0.5) {\n ticks.tickIntervalType = 'Integer';\n }\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.minor = math.number(math.ceil(minorLimits.min));\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.minor = minorValues.decimal[0];\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.minor = math.number(math.fraction(minorValues.fraction[0]));\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n ticks.fractionTick = minorValues.fraction[0];\n }\n } else {\n switch (ticks.tickIntervalType) {\n case 'Integer':\n ticks.integerTick = ticks.minor;\n ticks.decimalTick = minorLimits.min > 0.5 ? 0 : minorValues.decimal[0];\n ticks.fractionTick = minorLimits.min > 0.5 ? '0' : minorValues.fraction[0];\n break;\n case 'Decimal':\n ticks.integerTick = 1;\n ticks.decimalTick = ticks.minor;\n ticks.fractionTick = minorValues.fraction[0];\n break;\n case 'Fraction':\n ticks.integerTick = 1;\n ticks.decimalTick = minorValues.decimal[0];\n let fraction = math.fraction(math.number(ticks.minor));\n ticks.fractionTick = fraction.n + '/' + fraction.d;\n }\n }\n }\n return this.updateMajorValue({ ...graph, ticks });\n };\n\n /*\n * This function will update major value whenever minor value is changed or tick type is changed\n * @param graph object containing domain, ticks and width value\n * @return graph object with updated ticks values\n * */\n updateMajorValue = (graph) => {\n const { domain, ticks, width } = graph;\n majorValues = tickUtils.generateMajorValuesForMinor(ticks.minor, domain, width);\n if (majorValues.decimal.indexOf(ticks.major) === -1) {\n let currIndex = 0;\n if (ticks.tickIntervalType === 'Integer') {\n currIndex = majorValues.decimal.length > 4 ? 4 : majorValues.decimal.length - 1;\n } else {\n currIndex = majorValues.decimal.length - 1;\n }\n ticks.major = majorValues.decimal[currIndex];\n }\n graph.fraction = ticks.tickIntervalType === 'Fraction' && ticks.major < 1;\n return { ...graph, ticks };\n };\n\n changeArrows = (arrows) => this.graphChange({ arrows });\n\n setDefaults = () => {\n const {\n graph: { availableTypes, maxNumberOfPoints },\n } = defaultModel;\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n const graph = { ...cloneDeep(defaultModel.graph), height };\n\n this.props.onChange({ graph });\n };\n\n moveCorrectResponse = (index, el, position) => {\n el.position = position;\n\n const { onChange, model } = this.props;\n const update = toSessionFormat(el.type === 'line' && lineIsSwitched(el) ? switchGraphLine(el) : el);\n const correctResponse = [...model.correctResponse];\n correctResponse[index] = update;\n\n onChange({ correctResponse });\n };\n\n availableTypesChange = (availableTypes) => {\n const { model, onChange } = this.props;\n const {\n correctResponse,\n graph: { maxNumberOfPoints },\n } = model;\n\n new Set(correctResponse.map(toPointType)).forEach((pointType) => {\n availableTypes[pointType] = true;\n });\n\n const height = this.getAdjustedHeight(availableTypes, maxNumberOfPoints);\n const graph = { ...model.graph, availableTypes, height };\n\n onChange({ graph });\n };\n\n deleteCorrectResponse = (indices) => {\n const { model, onChange } = this.props;\n const correctResponse = model.correctResponse.filter((v, index) => !indices.some((d) => d === index));\n\n onChange({ correctResponse });\n };\n\n addCorrectResponse = (data) => {\n const { model, onChange } = this.props;\n const correctResponse = [...model.correctResponse];\n correctResponse.push(toSessionFormat(data));\n\n onChange({ correctResponse });\n };\n\n clearCorrectResponse = () => {\n const { onChange } = this.props;\n\n onChange({ correctResponse: [] });\n };\n\n undoCorrectResponse = () => {\n const { model, onChange } = this.props;\n const correctResponse = [...model.correctResponse];\n correctResponse.pop();\n onChange({ correctResponse });\n };\n\n render() {\n const { classes, model, onChange, configuration, uploadSoundSupport } = this.props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n instruction = {},\n teacherInstructions = {},\n title = {},\n prompt = {},\n mathMlOptions = {},\n numberLineDimensions = {},\n maxMaxElements = 20,\n hidePointConfigButtons = false,\n availableTools = ['PF'],\n } = configuration || {};\n const { errors = {}, spellCheckEnabled, toolbarEditorPosition } = model || {};\n let { graph } = model;\n graph = this.reloadTicksData(graph);\n const { dialog, correctAnswerDialog } = this.state;\n const {\n correctResponseError,\n domainError,\n maxError,\n pointsError,\n prompt: promptError,\n teacherInstructions: teacherInstructionsError,\n widthError,\n } = errors || {};\n const validationMessage = generateValidationMessage();\n const correctResponse = cloneDeep(model.correctResponse || []).map(toGraphFormat);\n const initialModel = cloneDeep(model);\n initialModel['disabled'] = true;\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout dimensions={contentDimensions} hideSettings={true} settings={null}>\n <Typography component=\"div\" type=\"body1\" className={classes.description}>\n {instruction.label}\n </Typography>\n\n {teacherInstructions.settings && (\n <InputContainer label={teacherInstructions.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.teacherInstructions}\n markup={model.teacherInstructions}\n onChange={(teacherInstructions) => onChange({ teacherInstructions })}\n nonEmpty={false}\n disableUnderline\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}\n </InputContainer>\n )}\n\n {prompt.settings && (\n <InputContainer label={prompt.label} className={classes.promptContainer}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={(prompt) => onChange({ prompt })}\n nonEmpty={false}\n disableUnderline\n error={promptError}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <div className={classes.errorText}>{promptError}</div>}\n </InputContainer>\n )}\n\n <CardBar\n header=\"Set Up Number Line\"\n info={\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '8px' }} />\n </Tooltip>\n }\n >\n Set up the number line by entering the domain and number of tick marks to display. Labels on the number line\n can be edited or removed by clicking on the label.\n </CardBar>\n\n <div className={classes.row}>\n <Domain domain={graph.domain} errors={errors} onChange={(domain) => this.graphChange({ domain })} />\n </div>\n\n {maxError && <div className={classes.errorText}>{maxError}</div>}\n {domainError && <div className={classes.errorText}>{domainError}</div>}\n\n <div>\n <FormSection>\n <Ticks\n ticks={graph.ticks}\n minorLimits={minorLimits}\n minorValues={minorValues}\n majorValues={majorValues}\n onChange={this.changeTicks}\n />\n </FormSection>\n </div>\n\n <div className={classes.flexRow}>\n {model.widthEnabled && (\n <Size\n size={graph}\n min={numberLineDimensions.min}\n max={numberLineDimensions.max}\n step={numberLineDimensions.step}\n onChange={this.changeSize}\n />\n )}\n <div></div>\n <Arrows arrows={graph.arrows} onChange={this.changeArrows} />\n </div>\n\n {widthError && <div className={classes.errorText}>{widthError}</div>}\n\n <NumberLineComponent\n onMoveElement={() => {}}\n onDeleteElements={() => {}}\n onAddElement={() => {}}\n onClearElements={() => {}}\n onUndoElement={() => {}}\n minWidth={numberLineDimensions.min}\n maxWidth={numberLineDimensions.max}\n maxHeight={70}\n model={trimModel(initialModel)}\n />\n\n <FormSection label={title?.label || 'Title'} className={classes.title}>\n <EditableHtml\n markup={graph.title || ''}\n onChange={this.changeGraphTitle}\n toolbarOpts={toolbarOpts}\n activePlugins={[\n 'bold',\n 'html',\n 'italic',\n 'underline',\n 'strikethrough',\n 'image',\n 'math',\n 'languageCharacters',\n 'responseArea',\n ]}\n pluginProps={getPluginProps(title?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </FormSection>\n\n {!graph.exhibitOnly && (\n <React.Fragment>\n <CardBar header=\"Define Tool Set and Correct Response\">\n Select answer type and place it on the number line. Intersecting points, line segments and/or rays will\n appear above the number line. <i>Note: A maximum of 20 points, line segments or rays may be plotted.</i>\n </CardBar>\n\n <CardBar header=\"Available Tools\" mini>\n Click on the input options to be displayed to the students. All inputs will display by default.\n </CardBar>\n\n <div className={classes.pointTypeChooser}>\n <PointConfig\n onSelectionChange={this.availableTypesChange}\n selection={graph.availableTypes}\n availableTools={availableTools}\n hideButtons={hidePointConfigButtons}\n />\n </div>\n\n <FormSection className={classes.flexRow}>\n <label>Max No of Elements</label>\n <NumberTextField\n className={classes.maxNumberOfPoints}\n min={1}\n max={maxMaxElements}\n onlyIntegersAllowed={true}\n value={graph.maxNumberOfPoints}\n onChange={this.changeMaxNoOfPoints}\n />\n {pointsError && <div className={classes.errorText}>{pointsError}</div>}\n </FormSection>\n\n <label>Correct Answer</label>\n\n <NumberLineComponent\n onMoveElement={this.moveCorrectResponse}\n onDeleteElements={this.deleteCorrectResponse}\n onAddElement={this.addCorrectResponse}\n onClearElements={this.clearCorrectResponse}\n onUndoElement={this.undoCorrectResponse}\n minWidth={numberLineDimensions.min}\n maxWidth={numberLineDimensions.max}\n answer={correctResponse}\n //strip feedback for this model\n model={trimModel(model)}\n />\n {correctResponseError && <div className={classes.errorText}>{correctResponseError}</div>}\n </React.Fragment>\n )}\n <AlertDialog\n open={dialog.open}\n title=\"Warning\"\n text={dialog.text}\n onConfirm={() => this.setState({ dialog: { open: false } })}\n />\n <AlertDialog\n open={correctAnswerDialog.open}\n title=\"Warning\"\n text={correctAnswerDialog.text}\n onConfirm={() => {\n let indices = this.state.correctAnswerDialog.indices;\n if (indices && indices.length > 0) {\n this.deleteCorrectResponse(indices);\n }\n this.setState({ correctAnswerDialog: { open: false } });\n }}\n onClose={() => {\n const graph = this.state.correctAnswerDialog.graph;\n onChange({ graph });\n this.setState({ correctAnswerDialog: { open: false } });\n }}\n onConfirmText={'OK'}\n onCloseText={'Cancel'}\n />\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles, { name: 'Main' })(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/number-line-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.4.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@material-ui/core": "^3.9.2",
|
|
9
9
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
10
|
-
"@pie-lib/pie-toolbox": "1.
|
|
10
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
11
11
|
"lodash": "^4.17.15",
|
|
12
12
|
"react": "^16.8.1",
|
|
13
13
|
"react-dom": "^16.8.1"
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line-controller@5.5.0...@pie-element/number-line-controller@5.6.0) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated pie-lib/pie-toolbox SC-28500 ([a8e4e6a](https://github.com/pie-framework/pie-elements/commit/a8e4e6ab27584435ce7ac3e964ccac2747402777))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* updated pie-lib/pie-toolbox SC-27890 and reverted once again math-rendering-accessible ([fd312e1](https://github.com/pie-framework/pie-elements/commit/fd312e1336999893025231946649496d290883e4))
|
|
17
|
+
* use math-rendering-accessible everywhere PD-1870 ([d52e660](https://github.com/pie-framework/pie-elements/commit/d52e6607ad8847d704bd9cb9b7e3107c130f0500))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [5.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/number-line-controller@5.4.2...@pie-element/number-line-controller@5.5.0) (2024-03-15)
|
|
7
24
|
|
|
8
25
|
|
package/controller/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/number-line-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.0",
|
|
5
5
|
"description": "Controller logic for @pie-ui/number-line",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"pie",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pie-lib/pie-toolbox": "1.
|
|
17
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
18
18
|
"lodash": "^4.17.15"
|
|
19
19
|
},
|
|
20
20
|
"author": "",
|
package/docs/config-schema.json
CHANGED
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
"title": "EditableHtmlConfigureProp",
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
10
|
+
"math": {
|
|
11
|
+
"title": "EditableHtmlButtonConfigure",
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"disabled": {
|
|
15
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"title": "disabled"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
10
21
|
"audio": {
|
|
11
22
|
"title": "EditableHtmlButtonConfigure",
|
|
12
23
|
"type": "object",
|
|
@@ -71,6 +82,17 @@
|
|
|
71
82
|
"title": "EditableHtmlConfigureProp",
|
|
72
83
|
"type": "object",
|
|
73
84
|
"properties": {
|
|
85
|
+
"math": {
|
|
86
|
+
"title": "EditableHtmlButtonConfigure",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"disabled": {
|
|
90
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"title": "disabled"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
74
96
|
"audio": {
|
|
75
97
|
"title": "EditableHtmlButtonConfigure",
|
|
76
98
|
"type": "object",
|
|
@@ -131,6 +153,17 @@
|
|
|
131
153
|
"title": "EditableHtmlConfigureProp",
|
|
132
154
|
"type": "object",
|
|
133
155
|
"properties": {
|
|
156
|
+
"math": {
|
|
157
|
+
"title": "EditableHtmlButtonConfigure",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": {
|
|
160
|
+
"disabled": {
|
|
161
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"title": "disabled"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
134
167
|
"audio": {
|
|
135
168
|
"title": "EditableHtmlButtonConfigure",
|
|
136
169
|
"type": "object",
|
|
@@ -191,6 +224,17 @@
|
|
|
191
224
|
"title": "EditableHtmlConfigureProp",
|
|
192
225
|
"type": "object",
|
|
193
226
|
"properties": {
|
|
227
|
+
"math": {
|
|
228
|
+
"title": "EditableHtmlButtonConfigure",
|
|
229
|
+
"type": "object",
|
|
230
|
+
"properties": {
|
|
231
|
+
"disabled": {
|
|
232
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
233
|
+
"type": "boolean",
|
|
234
|
+
"title": "disabled"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
194
238
|
"audio": {
|
|
195
239
|
"title": "EditableHtmlButtonConfigure",
|
|
196
240
|
"type": "object",
|
|
@@ -454,6 +498,17 @@
|
|
|
454
498
|
"title": "EditableHtmlConfigureProp",
|
|
455
499
|
"type": "object",
|
|
456
500
|
"properties": {
|
|
501
|
+
"math": {
|
|
502
|
+
"title": "EditableHtmlButtonConfigure",
|
|
503
|
+
"type": "object",
|
|
504
|
+
"properties": {
|
|
505
|
+
"disabled": {
|
|
506
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
507
|
+
"type": "boolean",
|
|
508
|
+
"title": "disabled"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
457
512
|
"audio": {
|
|
458
513
|
"title": "EditableHtmlButtonConfigure",
|
|
459
514
|
"type": "object",
|
|
@@ -529,6 +584,17 @@
|
|
|
529
584
|
"title": "EditableHtmlConfigureProp",
|
|
530
585
|
"type": "object",
|
|
531
586
|
"properties": {
|
|
587
|
+
"math": {
|
|
588
|
+
"title": "EditableHtmlButtonConfigure",
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"disabled": {
|
|
592
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
593
|
+
"type": "boolean",
|
|
594
|
+
"title": "disabled"
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
},
|
|
532
598
|
"audio": {
|
|
533
599
|
"title": "EditableHtmlButtonConfigure",
|
|
534
600
|
"type": "object",
|
|
@@ -589,6 +655,17 @@
|
|
|
589
655
|
"title": "EditableHtmlConfigureProp",
|
|
590
656
|
"type": "object",
|
|
591
657
|
"properties": {
|
|
658
|
+
"math": {
|
|
659
|
+
"title": "EditableHtmlButtonConfigure",
|
|
660
|
+
"type": "object",
|
|
661
|
+
"properties": {
|
|
662
|
+
"disabled": {
|
|
663
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
664
|
+
"type": "boolean",
|
|
665
|
+
"title": "disabled"
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
},
|
|
592
669
|
"audio": {
|
|
593
670
|
"title": "EditableHtmlButtonConfigure",
|
|
594
671
|
"type": "object",
|
|
@@ -6,6 +6,14 @@ The schema defines the following properties:
|
|
|
6
6
|
|
|
7
7
|
Properties of the `baseInputConfiguration` object:
|
|
8
8
|
|
|
9
|
+
## `math` (object)
|
|
10
|
+
|
|
11
|
+
Properties of the `math` object:
|
|
12
|
+
|
|
13
|
+
### `disabled` (boolean)
|
|
14
|
+
|
|
15
|
+
Indicates if the plugin is disabled or not
|
|
16
|
+
|
|
9
17
|
## `audio` (object)
|
|
10
18
|
|
|
11
19
|
Properties of the `audio` object:
|
|
@@ -55,6 +63,14 @@ Properties of the `prompt` object:
|
|
|
55
63
|
|
|
56
64
|
Properties of the `inputConfiguration` object:
|
|
57
65
|
|
|
66
|
+
### `math` (object)
|
|
67
|
+
|
|
68
|
+
Properties of the `math` object:
|
|
69
|
+
|
|
70
|
+
#### `disabled` (boolean)
|
|
71
|
+
|
|
72
|
+
Indicates if the plugin is disabled or not
|
|
73
|
+
|
|
58
74
|
### `audio` (object)
|
|
59
75
|
|
|
60
76
|
Properties of the `audio` object:
|
|
@@ -99,6 +115,14 @@ Properties of the `teacherInstructions` object:
|
|
|
99
115
|
|
|
100
116
|
Properties of the `inputConfiguration` object:
|
|
101
117
|
|
|
118
|
+
### `math` (object)
|
|
119
|
+
|
|
120
|
+
Properties of the `math` object:
|
|
121
|
+
|
|
122
|
+
#### `disabled` (boolean)
|
|
123
|
+
|
|
124
|
+
Indicates if the plugin is disabled or not
|
|
125
|
+
|
|
102
126
|
### `audio` (object)
|
|
103
127
|
|
|
104
128
|
Properties of the `audio` object:
|
|
@@ -143,6 +167,14 @@ Properties of the `title` object:
|
|
|
143
167
|
|
|
144
168
|
Properties of the `inputConfiguration` object:
|
|
145
169
|
|
|
170
|
+
### `math` (object)
|
|
171
|
+
|
|
172
|
+
Properties of the `math` object:
|
|
173
|
+
|
|
174
|
+
#### `disabled` (boolean)
|
|
175
|
+
|
|
176
|
+
Indicates if the plugin is disabled or not
|
|
177
|
+
|
|
146
178
|
### `audio` (object)
|
|
147
179
|
|
|
148
180
|
Properties of the `audio` object:
|
|
@@ -331,6 +363,14 @@ The schema defines the following additional types:
|
|
|
331
363
|
|
|
332
364
|
Properties of the `EditableHtmlConfigureProp` object:
|
|
333
365
|
|
|
366
|
+
### `math` (object)
|
|
367
|
+
|
|
368
|
+
Properties of the `math` object:
|
|
369
|
+
|
|
370
|
+
#### `disabled` (boolean)
|
|
371
|
+
|
|
372
|
+
Indicates if the plugin is disabled or not
|
|
373
|
+
|
|
334
374
|
### `audio` (object)
|
|
335
375
|
|
|
336
376
|
Properties of the `audio` object:
|
|
@@ -388,6 +428,14 @@ Properties of the `EditableHtmlPluginConfigureRequired` object:
|
|
|
388
428
|
|
|
389
429
|
Properties of the `inputConfiguration` object:
|
|
390
430
|
|
|
431
|
+
#### `math` (object)
|
|
432
|
+
|
|
433
|
+
Properties of the `math` object:
|
|
434
|
+
|
|
435
|
+
##### `disabled` (boolean)
|
|
436
|
+
|
|
437
|
+
Indicates if the plugin is disabled or not
|
|
438
|
+
|
|
391
439
|
#### `audio` (object)
|
|
392
440
|
|
|
393
441
|
Properties of the `audio` object:
|
|
@@ -432,6 +480,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
|
|
|
432
480
|
|
|
433
481
|
Properties of the `inputConfiguration` object:
|
|
434
482
|
|
|
483
|
+
#### `math` (object)
|
|
484
|
+
|
|
485
|
+
Properties of the `math` object:
|
|
486
|
+
|
|
487
|
+
##### `disabled` (boolean)
|
|
488
|
+
|
|
489
|
+
Indicates if the plugin is disabled or not
|
|
490
|
+
|
|
435
491
|
#### `audio` (object)
|
|
436
492
|
|
|
437
493
|
Properties of the `audio` object:
|
package/docs/pie-schema.json
CHANGED
|
@@ -717,6 +717,17 @@
|
|
|
717
717
|
"title": "EditableHtmlConfigureProp",
|
|
718
718
|
"type": "object",
|
|
719
719
|
"properties": {
|
|
720
|
+
"math": {
|
|
721
|
+
"title": "EditableHtmlButtonConfigure",
|
|
722
|
+
"type": "object",
|
|
723
|
+
"properties": {
|
|
724
|
+
"disabled": {
|
|
725
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
726
|
+
"type": "boolean",
|
|
727
|
+
"title": "disabled"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
},
|
|
720
731
|
"audio": {
|
|
721
732
|
"title": "EditableHtmlButtonConfigure",
|
|
722
733
|
"type": "object",
|
|
@@ -792,6 +803,17 @@
|
|
|
792
803
|
"title": "EditableHtmlConfigureProp",
|
|
793
804
|
"type": "object",
|
|
794
805
|
"properties": {
|
|
806
|
+
"math": {
|
|
807
|
+
"title": "EditableHtmlButtonConfigure",
|
|
808
|
+
"type": "object",
|
|
809
|
+
"properties": {
|
|
810
|
+
"disabled": {
|
|
811
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
812
|
+
"type": "boolean",
|
|
813
|
+
"title": "disabled"
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
},
|
|
795
817
|
"audio": {
|
|
796
818
|
"title": "EditableHtmlButtonConfigure",
|
|
797
819
|
"type": "object",
|
|
@@ -852,6 +874,17 @@
|
|
|
852
874
|
"title": "EditableHtmlConfigureProp",
|
|
853
875
|
"type": "object",
|
|
854
876
|
"properties": {
|
|
877
|
+
"math": {
|
|
878
|
+
"title": "EditableHtmlButtonConfigure",
|
|
879
|
+
"type": "object",
|
|
880
|
+
"properties": {
|
|
881
|
+
"disabled": {
|
|
882
|
+
"description": "Indicates if the plugin is disabled or not",
|
|
883
|
+
"type": "boolean",
|
|
884
|
+
"title": "disabled"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
},
|
|
855
888
|
"audio": {
|
|
856
889
|
"title": "EditableHtmlButtonConfigure",
|
|
857
890
|
"type": "object",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -202,6 +202,14 @@ The schema defines the following additional types:
|
|
|
202
202
|
|
|
203
203
|
Properties of the `EditableHtmlConfigureProp` object:
|
|
204
204
|
|
|
205
|
+
### `math` (object)
|
|
206
|
+
|
|
207
|
+
Properties of the `math` object:
|
|
208
|
+
|
|
209
|
+
#### `disabled` (boolean)
|
|
210
|
+
|
|
211
|
+
Indicates if the plugin is disabled or not
|
|
212
|
+
|
|
205
213
|
### `audio` (object)
|
|
206
214
|
|
|
207
215
|
Properties of the `audio` object:
|
|
@@ -259,6 +267,14 @@ Properties of the `EditableHtmlPluginConfigureRequired` object:
|
|
|
259
267
|
|
|
260
268
|
Properties of the `inputConfiguration` object:
|
|
261
269
|
|
|
270
|
+
#### `math` (object)
|
|
271
|
+
|
|
272
|
+
Properties of the `math` object:
|
|
273
|
+
|
|
274
|
+
##### `disabled` (boolean)
|
|
275
|
+
|
|
276
|
+
Indicates if the plugin is disabled or not
|
|
277
|
+
|
|
262
278
|
#### `audio` (object)
|
|
263
279
|
|
|
264
280
|
Properties of the `audio` object:
|
|
@@ -303,6 +319,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
|
|
|
303
319
|
|
|
304
320
|
Properties of the `inputConfiguration` object:
|
|
305
321
|
|
|
322
|
+
#### `math` (object)
|
|
323
|
+
|
|
324
|
+
Properties of the `math` object:
|
|
325
|
+
|
|
326
|
+
##### `disabled` (boolean)
|
|
327
|
+
|
|
328
|
+
Indicates if the plugin is disabled or not
|
|
329
|
+
|
|
306
330
|
#### `audio` (object)
|
|
307
331
|
|
|
308
332
|
Properties of the `audio` object:
|
package/lib/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
55
55
|
|
|
56
56
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
|
|
59
59
|
|
|
60
60
|
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); }
|
|
61
61
|
|
|
@@ -226,7 +226,7 @@ var NumberLine = /*#__PURE__*/function (_HTMLElement) {
|
|
|
226
226
|
var el = /*#__PURE__*/_react["default"].createElement(_numberLine["default"], props);
|
|
227
227
|
|
|
228
228
|
_reactDom["default"].render(el, this, function () {
|
|
229
|
-
(0,
|
|
229
|
+
(0, _mathRendering.renderMath)(_this);
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
} catch (e) {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["NumberLine","m","_model","_applyInitialElements","_render","dispatch","_session","s","answer","length","type","dispatchEvent","CustomEvent","bubbles","detail","complete","isComplete","data","push","dispatchSessionChanged","index","el","position","Error","left","right","update","splice","indices","filter","v","some","d","pop","graph","initialElements","map","toGraphFormat","model","correctResponse","props","onAddElement","addElement","bind","onMoveElement","moveElement","onDeleteElements","deleteElements","onUndoElement","undoElement","onClearElements","clearElements","React","createElement","RootComponent","ReactDOM","render","e","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AACA;;;;AAIA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;IAIqBA,U;;;;;AACnB,wBAAc;AAAA;AAAA;AAEb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;;AACA,WAAKE,qBAAL;;AACA,WAAKC,OAAL;;AACA,WAAKC,QAAL,CAAc,WAAd;AACD;;;SAQD,eAAc;AACZ,aAAO,KAAKC,QAAZ;AACD,K;SARD,aAAYC,CAAZ,EAAe;AACb,WAAKD,QAAL,GAAgBC,CAAhB;;AACA,WAAKJ,qBAAL;;AACA,WAAKC,OAAL;AACD;;;WAMD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAED,sBAAa;AACX,aAAO,KAAKE,QAAL,GAAgB,CAAC,KAAKA,QAAL,CAAcE,MAAd,IAAwB,EAAzB,EAA6BC,MAA7B,GAAsC,CAAtD,GAA0D,KAAjE;AACD;;;WAED,kBAASC,IAAT,EAAe;AACb,WAAKC,aAAL,CACE,IAAIC,WAAJ,CAAgBF,IAAhB,EAAsB;AACpBG,QAAAA,OAAO,EAAE,IADW;AAEpBC,QAAAA,MAAM,EAAE;AACNC,UAAAA,QAAQ,EAAE,KAAKC,UAAL;AADJ;AAFY,OAAtB,CADF;AAQD;;;WAED,kCAAyB;AACvB,WAAKX,QAAL,CAAc,iBAAd;AACD;;;WAED,oBAAWY,IAAX,EAAiB;AACf,UAAI,CAAC,KAAKX,QAAV,EAAoB;AAClB;AACD;;AAED,WAAKA,QAAL,CAAcE,MAAd,GAAuB,KAAKF,QAAL,CAAcE,MAAd,IAAwB,EAA/C;;AACA,WAAKF,QAAL,CAAcE,MAAd,CAAqBU,IAArB,CAA0B,mCAAgBD,IAAhB,CAA1B;;AACA,WAAKE,sBAAL;;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CAAsB,IAAtB,CANL;AAOVO,YAAAA,eAAe,EAAE,KAAKC,aAAL,CAAmBR,IAAnB,CAAwB,IAAxB;AAPP,WAAZ;;AAUA,cAAItB,EAAE,gBAAG+B,kBAAMC,aAAN,CAAoBC,sBAApB,EAAmCd,KAAnC,CAAT;;AAEAe,+BAASC,MAAT,CAAgBnC,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["NumberLine","m","_model","_applyInitialElements","_render","dispatch","_session","s","answer","length","type","dispatchEvent","CustomEvent","bubbles","detail","complete","isComplete","data","push","dispatchSessionChanged","index","el","position","Error","left","right","update","splice","indices","filter","v","some","d","pop","graph","initialElements","map","toGraphFormat","model","correctResponse","props","onAddElement","addElement","bind","onMoveElement","moveElement","onDeleteElements","deleteElements","onUndoElement","undoElement","onClearElements","clearElements","React","createElement","RootComponent","ReactDOM","render","e","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AACA;;;;AAIA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;IAIqBA,U;;;;;AACnB,wBAAc;AAAA;AAAA;AAEb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;;AACA,WAAKE,qBAAL;;AACA,WAAKC,OAAL;;AACA,WAAKC,QAAL,CAAc,WAAd;AACD;;;SAQD,eAAc;AACZ,aAAO,KAAKC,QAAZ;AACD,K;SARD,aAAYC,CAAZ,EAAe;AACb,WAAKD,QAAL,GAAgBC,CAAhB;;AACA,WAAKJ,qBAAL;;AACA,WAAKC,OAAL;AACD;;;WAMD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;WAED,sBAAa;AACX,aAAO,KAAKE,QAAL,GAAgB,CAAC,KAAKA,QAAL,CAAcE,MAAd,IAAwB,EAAzB,EAA6BC,MAA7B,GAAsC,CAAtD,GAA0D,KAAjE;AACD;;;WAED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KAAKpC,MAAf,CAAZ;AACAoC,UAAAA,KAAK,CAACC,eAAN,GAAwBD,KAAK,CAACC,eAAN,IAAyBD,KAAK,CAACC,eAAN,CAAsBH,GAAtB,CAA0BC,2BAA1B,CAAjD;AAEA,cAAIG,KAAK,GAAG;AACVF,YAAAA,KAAK,EAALA,KADU;AAEV9B,YAAAA,MAAM,EAANA,MAFU;AAGViC,YAAAA,YAAY,EAAE,KAAKC,UAAL,CAAgBC,IAAhB,CAAqB,IAArB,CAHJ;AAIVC,YAAAA,aAAa,EAAE,KAAKC,WAAL,CAAiBF,IAAjB,CAAsB,IAAtB,CAJL;AAKVG,YAAAA,gBAAgB,EAAE,KAAKC,cAAL,CAAoBJ,IAApB,CAAyB,IAAzB,CALR;AAMVK,YAAAA,aAAa,EAAE,KAAKC,WAAL,CAAiBN,IAAjB,CAAsB,IAAtB,CANL;AAOVO,YAAAA,eAAe,EAAE,KAAKC,aAAL,CAAmBR,IAAnB,CAAwB,IAAxB;AAPP,WAAZ;;AAUA,cAAItB,EAAE,gBAAG+B,kBAAMC,aAAN,CAAoBC,sBAApB,EAAmCd,KAAnC,CAAT;;AAEAe,+BAASC,MAAT,CAAgBnC,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,2CAAW,KAAX;AACD,WAFD;AAGD;AACF,OA1BD,CA0BE,OAAOoC,CAAP,EAAU;AACV,cAAMA,CAAN;AACD;AACF;;;kDA7IqCC,W","sourcesContent":["import * as dataConverter from './data-converter';\nimport * as pointChooser from './number-line/point-chooser';\nimport * as tickUtils from './number-line/graph/tick-utils';\n\nimport { lineIsSwitched, switchGraphLine, toGraphFormat, toSessionFormat } from './data-converter';\n\nimport Graph from './number-line/graph';\nimport NumberLineComponent from './number-line';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport RootComponent from './number-line';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\n\n//Expose some additional modules for configuration\nexport { Graph, NumberLineComponent, tickUtils, dataConverter, pointChooser };\nexport default class NumberLine extends HTMLElement {\n constructor() {\n super();\n }\n\n set model(m) {\n this._model = m;\n this._applyInitialElements();\n this._render();\n this.dispatch('model-set');\n }\n\n set session(s) {\n this._session = s;\n this._applyInitialElements();\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n isComplete() {\n return this._session ? (this._session.answer || []).length > 0 : false;\n }\n\n dispatch(type) {\n this.dispatchEvent(\n new CustomEvent(type, {\n bubbles: true,\n detail: {\n complete: this.isComplete(),\n },\n }),\n );\n }\n\n dispatchSessionChanged() {\n this.dispatch('session-changed');\n }\n\n addElement(data) {\n if (!this._session) {\n return;\n }\n\n this._session.answer = this._session.answer || [];\n this._session.answer.push(toSessionFormat(data));\n this.dispatchSessionChanged();\n this._render();\n }\n\n moveElement(index, el, position) {\n let answer = this._session.answer[index];\n\n if (!answer) {\n throw new Error('cant find element at index: ', index);\n }\n\n if (el.type === 'line' && position.left === position.right) {\n this._render();\n return;\n }\n\n //set the new position\n el.position = position;\n\n let update = el.type === 'line' && lineIsSwitched(el) ? switchGraphLine(el) : el;\n\n this._session.answer.splice(index, 1, toSessionFormat(update));\n\n this.dispatchSessionChanged();\n this._render();\n }\n\n deleteElements(indices) {\n this._session.answer = this._session.answer.filter((v, index) => {\n return !indices.some((d) => d === index);\n });\n this.dispatchSessionChanged();\n this._render();\n }\n\n undoElement() {\n this._session.answer.pop();\n this.dispatchSessionChanged();\n this._render();\n }\n\n clearElements() {\n this._session.answer = [];\n this.dispatchSessionChanged();\n this._render();\n }\n\n _applyInitialElements() {\n if (\n this._model &&\n this._model.graph &&\n this._model.graph.initialElements &&\n this._session &&\n (!this._session.answer || !this._session.answer.length)\n ) {\n this._session.answer = cloneDeep(this._model.graph.initialElements);\n }\n }\n\n _render() {\n try {\n if (this._model && this._session) {\n if (!this._session.answer) {\n this._applyInitialElements();\n }\n\n let answer = (this._session.answer || []).map(toGraphFormat);\n let model = cloneDeep(this._model);\n model.correctResponse = model.correctResponse && model.correctResponse.map(toGraphFormat);\n\n let props = {\n model,\n answer,\n onAddElement: this.addElement.bind(this),\n onMoveElement: this.moveElement.bind(this),\n onDeleteElements: this.deleteElements.bind(this),\n onUndoElement: this.undoElement.bind(this),\n onClearElements: this.clearElements.bind(this),\n };\n\n let el = React.createElement(RootComponent, props);\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n } catch (e) {\n throw e;\n }\n }\n}\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/number-line",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"repository": "pie-framework/pie-elements",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
|
-
"@pie-lib/pie-toolbox": "1.
|
|
11
|
+
"@pie-lib/pie-toolbox": "1.11.1",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-scale": "^3.2.1",
|
|
14
14
|
"d3-selection": "^1.4.1",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "pie framework developers",
|
|
25
25
|
"license": "ISC",
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "229e10aa53659f55129b8a4e27dbfc76939e214b",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postpublish": "../../scripts/postpublish"
|
|
29
29
|
},
|