@pie-element/ebsr 7.0.22 → 7.0.24-next.2
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 +0 -16
- package/configure/CHANGELOG.md +0 -16
- package/configure/lib/main.js +6 -4
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +1793 -0
- package/{LICENSE.md → configure/node_modules/@pie-element/multiple-choice/LICENSE.md} +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +1334 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +104 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +198 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +599 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +768 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +305 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +36 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +353 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +277 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +52 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +338 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +274 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +298 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +157 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +174 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +151 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +97 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +254 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +129 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +843 -0
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/controller.js +17304 -17374
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +77 -0
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/element.js +42 -171
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/index.html +1 -1
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/manifest.json +4 -4
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print-demo.js +46 -46
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print.html +1 -1
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/print.js +70 -259
- package/configure/node_modules/@pie-element/multiple-choice/package.json +34 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +427 -0
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +275 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +234 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +602 -0
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/package.json +3 -3
- package/configure/src/__tests__/index.test.js +4 -2
- package/configure/src/main.jsx +8 -3
- package/controller/lib/index.js +79 -3
- package/controller/lib/index.js.map +1 -1
- package/controller/src/index.js +55 -0
- package/package.json +3 -3
- package/module/configure.js +0 -472
- package/module/demo.js +0 -77
package/CHANGELOG.md
CHANGED
|
@@ -3,22 +3,6 @@
|
|
|
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.0.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr@7.0.21...@pie-element/ebsr@7.0.22) (2022-05-03)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @pie-element/ebsr
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [7.0.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr@7.0.20...@pie-element/ebsr@7.0.21) (2022-04-12)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @pie-element/ebsr
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
6
|
## [7.0.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr@7.0.19...@pie-element/ebsr@7.0.20) (2022-03-28)
|
|
23
7
|
|
|
24
8
|
**Note:** Version bump only for package @pie-element/ebsr
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,22 +3,6 @@
|
|
|
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.0.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-configure@7.0.21...@pie-element/ebsr-configure@7.0.22) (2022-05-03)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @pie-element/ebsr-configure
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [7.0.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-configure@7.0.20...@pie-element/ebsr-configure@7.0.21) (2022-04-12)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @pie-element/ebsr-configure
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
6
|
## [7.0.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-configure@7.0.19...@pie-element/ebsr-configure@7.0.20) (2022-03-28)
|
|
23
7
|
|
|
24
8
|
**Note:** Version bump only for package @pie-element/ebsr-configure
|
package/configure/lib/main.js
CHANGED
|
@@ -31,8 +31,6 @@ var _configUi = require("@pie-lib/config-ui");
|
|
|
31
31
|
|
|
32
32
|
var _styles = require("@material-ui/core/styles");
|
|
33
33
|
|
|
34
|
-
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
35
|
-
|
|
36
34
|
var _excluded = ["partA", "partB", "partialScoring", "scoringType"];
|
|
37
35
|
|
|
38
36
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -245,7 +243,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
245
243
|
if (_ref4) {
|
|
246
244
|
// do not use destructuring to get model from props
|
|
247
245
|
_this2.partA = _ref4;
|
|
248
|
-
_this2.partA._model = (
|
|
246
|
+
_this2.partA._model = _objectSpread(_objectSpread({}, _this2.props.model.partA), {}, {
|
|
247
|
+
errors: _this2.props.model.errors && _this2.props.model.errors.partA || {}
|
|
248
|
+
});
|
|
249
249
|
_this2.partA.configuration = _objectSpread(_objectSpread({}, partA), generalConfiguration);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -258,7 +258,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
258
258
|
if (_ref5) {
|
|
259
259
|
// do not use destructuring to get model from props
|
|
260
260
|
_this2.partB = _ref5;
|
|
261
|
-
_this2.partB._model = (
|
|
261
|
+
_this2.partB._model = _objectSpread(_objectSpread({}, _this2.props.model.partB), {}, {
|
|
262
|
+
errors: _this2.props.model.errors && _this2.props.model.errors.partB || {}
|
|
263
|
+
});
|
|
262
264
|
_this2.partB.configuration = _objectSpread(_objectSpread({}, partB), generalConfiguration);
|
|
263
265
|
}
|
|
264
266
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","radio","dropdown","styles","theme","design","paddingTop","spacing","unit","part","display","flexDirection","padding","Main","choices","correctFound","map","choice","correct","model","key","onModelChanged","props","partA","choiceMode","removeExtraChoices","partB","classes","configuration","onConfigurationChanged","partLabelType","modelPartA","modelPartB","partialScoring","scoringType","generalConfiguration","feedback","feedbackA","choiceModeA","choicePrefix","choicePrefixA","lockChoiceOrder","lockChoiceOrderA","prompt","promptA","teacherInstructions","teacherInstructionsA","studentInstructions","studentInstructionsA","choicesLayout","choicesLayoutA","gridColumns","gridColumnsA","rationale","rationaleA","spellCheck","spellCheckA","feedbackB","choiceModeB","choicePrefixB","lockChoiceOrderB","promptB","teacherInstructionsB","studentInstructionsB","choicesLayoutB","gridColumnsB","rationaleB","spellCheckB","type","typeIsNumber","firstPart","secondPart","nrOfColumnsAvailable","length","Array","from","_","i","partLabels","label","ref","_model","React","Component","PropTypes","object","func","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAA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AACF;AAbH,QAFF,CApBF,CAzFF,CADF,CADF;AAqID;;;EA/NuB+C,kBAAMC,S;;;iCAAnBtE,I,eACQ;AACjBc,EAAAA,OAAO,EAAEyD,sBAAUC,MADF;AAEjBzD,EAAAA,aAAa,EAAEwD,sBAAUC,MAFR;AAGjBlE,EAAAA,KAAK,EAAEiE,sBAAUC,MAHA;AAIjBhE,EAAAA,cAAc,EAAE+D,sBAAUE,IAJT;AAKjBzD,EAAAA,sBAAsB,EAAEuD,sBAAUE;AALjB,C;AAiOrB,IAAMC,MAAM,GAAG,wBAAWpF,MAAX,EAAmBU,IAAnB,CAAf;eAEe0E,M","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { settings, layout } from '@pie-lib/config-ui';\nimport { withStyles } from '@material-ui/core/styles';\nimport cloneDeep from 'lodash/cloneDeep';\n\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst styles = theme => ({\n design: {\n paddingTop: theme.spacing.unit * 3\n },\n part: {\n display: 'flex',\n flexDirection: 'column',\n padding: '16px 0 32px'\n }\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n configuration: PropTypes.object,\n model: PropTypes.object,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func\n };\n\n removeExtraChoices = (choices) => {\n let correctFound = false;\n\n return (choices || []).map(choice => {\n if (correctFound) {\n choice.correct = false;\n return choice;\n }\n\n if (choice.correct) {\n correctFound = true;\n }\n\n return choice;\n });\n }\n\n onModelChanged = (model, key) => {\n const { onModelChanged } = this.props;\n\n if (key === 'partA.choiceMode' && model.partA.choiceMode === 'radio') {\n model.partA.choices = this.removeExtraChoices(model.partA.choices);\n\n return onModelChanged(model, true);\n }\n\n if (key === 'partB.choiceMode' && model.partB.choiceMode === 'radio') {\n model.partB.choices = this.removeExtraChoices(model.partB.choices);\n\n return onModelChanged(model, true);\n }\n\n return onModelChanged(model);\n }\n\n render() {\n const {\n classes,\n model,\n configuration,\n onConfigurationChanged\n } = this.props;\n const { partLabelType, partA: modelPartA, partB: modelPartB } = model;\n const { partA, partB, partialScoring, scoringType, ...generalConfiguration } = configuration;\n const {\n feedback: feedbackA = {},\n choiceMode: choiceModeA = {},\n choicePrefix: choicePrefixA = {},\n lockChoiceOrder: lockChoiceOrderA = {},\n prompt: promptA = {},\n teacherInstructions: teacherInstructionsA = {},\n studentInstructions: studentInstructionsA = {},\n choicesLayout: choicesLayoutA = {},\n gridColumns: gridColumnsA = {},\n rationale: rationaleA = {},\n spellCheck: spellCheckA = {}\n } = partA || {};\n const {\n feedback: feedbackB = {},\n choiceMode: choiceModeB = {},\n choicePrefix: choicePrefixB = {},\n lockChoiceOrder: lockChoiceOrderB = {},\n prompt: promptB = {},\n teacherInstructions: teacherInstructionsB = {},\n studentInstructions: studentInstructionsB = {},\n choicesLayout: choicesLayoutB = {},\n gridColumns: gridColumnsB = {},\n rationale: rationaleB = {},\n spellCheck: spellCheckB = {}\n } = partB || {};\n const type = partLabelType || 'Numbers';\n const typeIsNumber = type === 'Numbers';\n const firstPart = `Part ${typeIsNumber ? '1' : 'A'}`;\n const secondPart = `Part ${typeIsNumber ? '2' : 'B'}`;\n const nrOfColumnsAvailable = {\n partA: modelPartA.choices && modelPartA.choices.length ?\n Array.from({length: modelPartA.choices.length}, (_, i) => (`${i + 1}`)) : [],\n partB: modelPartB.choices && modelPartB.choices.length ?\n Array.from({length: modelPartB.choices.length}, (_, i) => (`${i + 1}`)) : [],\n };\n\n return (\n <div className={classes.design}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={this.onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n 'Settings for both': {\n partLabels:\n generalConfiguration.partLabels.settings &&\n toggle(generalConfiguration.partLabels.label),\n partLabelType:\n model.partLabels && dropdown('', ['Numbers', 'Letters']),\n partialScoring:\n partialScoring.settings && toggle(partialScoring.label),\n scoringType:\n scoringType.settings && radio(scoringType.label, ['auto', 'rubric'])\n },\n [`Settings ${firstPart}`]: {\n 'partA.choiceMode':\n choiceModeA.settings &&\n radio(choiceModeA.label, ['checkbox', 'radio']),\n 'partA.choicePrefix':\n choicePrefixA.settings &&\n radio(choicePrefixA.label, ['numbers', 'letters']),\n 'partA.lockChoiceOrder':\n lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),\n 'partA.choicesLayout':\n choicesLayoutA.settings &&\n dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),\n 'partA.gridColumns':\n choicesLayoutA.settings && modelPartA.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partA.length > 0 &&\n dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA)\n },\n [`Properties ${firstPart}`]: {\n 'partA.feedbackEnabled': feedbackA.settings &&\n toggle(feedbackA.label),\n 'partA.promptEnabled':\n promptA.settings && toggle(promptA.label),\n 'partA.teacherInstructionsEnabled':\n teacherInstructionsA.settings &&\n toggle(teacherInstructionsA.label),\n 'partA.studentInstructionsEnabled':\n studentInstructionsA.settings &&\n toggle(studentInstructionsA.label),\n 'partA.rationaleEnabled':\n rationaleA.settings && toggle(rationaleA.label),\n 'partA.spellCheckEnabled':\n spellCheckA.settings && toggle(spellCheckA.label),\n },\n [`Settings ${secondPart}`]: {\n 'partB.choiceMode':\n choiceModeB.settings &&\n radio(choiceModeB.label, ['checkbox', 'radio']),\n 'partB.choicePrefix':\n choicePrefixB.settings &&\n radio(choicePrefixB.label, ['numbers', 'letters']),\n 'partB.lockChoiceOrder':\n lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),\n 'partB.choicesLayout':\n choicesLayoutB.settings &&\n dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),\n 'partB.gridColumns':\n choicesLayoutB.settings && modelPartB.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partB.length > 0 &&\n dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB)\n },\n [`Properties ${secondPart}`]: {\n 'partB.feedbackEnabled':\n feedbackB.settings && toggle(feedbackB.label),\n 'partB.promptEnabled':\n promptB.settings && toggle(promptB.label),\n 'partB.teacherInstructionsEnabled':\n teacherInstructionsB.settings &&\n toggle(teacherInstructionsB.label),\n 'partB.studentInstructionsEnabled':\n studentInstructionsB.settings &&\n toggle(studentInstructionsB.label),\n 'partB.rationaleEnabled':\n rationaleB.settings && toggle(rationaleB.label),\n 'partB.spellCheckEnabled':\n spellCheckB.settings && toggle(spellCheckB.label),\n }\n }}\n />\n }\n >\n <div>\n <div className={classes.part}>\n {model.partLabels && <p>{firstPart}</p>}\n <ebsr-multiple-choice-configure\n id=\"A\"\n key=\"partA\"\n ref={ref => {\n if (ref) {\n // do not use destructuring to get model from props\n this.partA = ref;\n this.partA._model = cloneDeep(this.props.model.partA);\n this.partA.configuration = {\n ...partA,\n ...generalConfiguration\n };\n }\n }}\n />\n </div>\n\n <div className={classes.part}>\n {model.partLabels && <p>{secondPart}</p>}\n <ebsr-multiple-choice-configure\n id=\"B\"\n key=\"partB\"\n ref={ref => {\n if (ref) {\n // do not use destructuring to get model from props\n this.partB = ref;\n this.partB._model = cloneDeep(this.props.model.partB);\n this.partB.configuration = {\n ...partB,\n ...generalConfiguration\n };\n }\n }}\n />\n </div>\n </div>\n </layout.ConfigLayout>\n </div>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","radio","dropdown","styles","theme","design","paddingTop","spacing","unit","part","display","flexDirection","padding","Main","choices","correctFound","map","choice","correct","model","key","onModelChanged","props","partA","choiceMode","removeExtraChoices","partB","classes","configuration","onConfigurationChanged","partLabelType","modelPartA","modelPartB","partialScoring","scoringType","generalConfiguration","feedback","feedbackA","choiceModeA","choicePrefix","choicePrefixA","lockChoiceOrder","lockChoiceOrderA","prompt","promptA","teacherInstructions","teacherInstructionsA","studentInstructions","studentInstructionsA","choicesLayout","choicesLayoutA","gridColumns","gridColumnsA","rationale","rationaleA","spellCheck","spellCheckA","feedbackB","choiceModeB","choicePrefixB","lockChoiceOrderB","promptB","teacherInstructionsB","studentInstructionsB","choicesLayoutB","gridColumnsB","rationaleB","spellCheckB","type","typeIsNumber","firstPart","secondPart","nrOfColumnsAvailable","length","Array","from","_","i","partLabels","label","ref","_model","errors","React","Component","PropTypes","object","func","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAA2CC,kBAA3C,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA2CD,kBAA3C,CAAeC,MAAf;AAAA,IAAuBC,KAAvB,GAA2CF,kBAA3C,CAAuBE,KAAvB;AAAA,IAA8BC,QAA9B,GAA2CH,kBAA3C,CAA8BG,QAA9B;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAD3B,KADe;AAIvBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,aAAa,EAAE,QAFX;AAGJC,MAAAA,OAAO,EAAE;AAHL;AAJiB,GAAL;AAAA,CAApB;;IAWaC,I;;;;;;;;;;;;;;;2GASU,UAACC,OAAD,EAAa;AAChC,UAAIC,YAAY,GAAG,KAAnB;AAEC,aAAO,CAACD,OAAO,IAAI,EAAZ,EAAgBE,GAAhB,CAAoB,UAAAC,MAAM,EAAI;AACpC,YAAIF,YAAJ,EAAkB;AAChBE,UAAAA,MAAM,CAACC,OAAP,GAAiB,KAAjB;AACA,iBAAOD,MAAP;AACD;;AAED,YAAIA,MAAM,CAACC,OAAX,EAAoB;AAClBH,UAAAA,YAAY,GAAG,IAAf;AACD;;AAED,eAAOE,MAAP;AACD,OAXO,CAAP;AAYF,K;uGAEgB,UAACE,KAAD,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U,KAAK,CAAC2D,UAAN,iBAAoB,2CAAIP,UAAJ,CADvB,eAEE;AACE,QAAA,EAAE,EAAC,GADL;AAEE,QAAA,GAAG,EAAC,OAFN;AAGE,QAAA,GAAG,EAAE,aAAAS,KAAG,EAAI;AACV,cAAIA,KAAJ,EAAS;AACP;AACA,YAAA,MAAI,CAACtD,KAAL,GAAasD,KAAb;AACA,YAAA,MAAI,CAACtD,KAAL,CAAWuD,MAAX,mCACK,MAAI,CAAC3D,KAAL,CAAWH,KAAX,CAAiBO,KADtB;AAEEwD,cAAAA,MAAM,EAAE,MAAI,CAAC5D,KAAL,CAAWH,KAAX,CAAiB+D,MAAjB,IAA2B,MAAI,CAAC5D,KAAL,CAAWH,KAAX,CAAiB+D,MAAjB,CAAwBxD,KAAnD,IAA4D;AAFtE;AAIA,YAAA,MAAI,CAACA,KAAL,CAAWE,aAAX,mCACKF,KADL,GAEKS,oBAFL;AAID;AACF;AAhBH,QAFF,CAvBF,CAzFF,CADF,CADF;AA2ID;;;EArOuBgD,kBAAMC,S;;;iCAAnBvE,I,eACQ;AACjBc,EAAAA,OAAO,EAAE0D,sBAAUC,MADF;AAEjB1D,EAAAA,aAAa,EAAEyD,sBAAUC,MAFR;AAGjBnE,EAAAA,KAAK,EAAEkE,sBAAUC,MAHA;AAIjBjE,EAAAA,cAAc,EAAEgE,sBAAUE,IAJT;AAKjB1D,EAAAA,sBAAsB,EAAEwD,sBAAUE;AALjB,C;AAuOrB,IAAMC,MAAM,GAAG,wBAAWrF,MAAX,EAAmBU,IAAnB,CAAf;eAEe2E,M","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { settings, layout } from '@pie-lib/config-ui';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst styles = theme => ({\n design: {\n paddingTop: theme.spacing.unit * 3\n },\n part: {\n display: 'flex',\n flexDirection: 'column',\n padding: '16px 0 32px'\n }\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n configuration: PropTypes.object,\n model: PropTypes.object,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func\n };\n\n removeExtraChoices = (choices) => {\n let correctFound = false;\n\n return (choices || []).map(choice => {\n if (correctFound) {\n choice.correct = false;\n return choice;\n }\n\n if (choice.correct) {\n correctFound = true;\n }\n\n return choice;\n });\n }\n\n onModelChanged = (model, key) => {\n const { onModelChanged } = this.props;\n\n if (key === 'partA.choiceMode' && model.partA.choiceMode === 'radio') {\n model.partA.choices = this.removeExtraChoices(model.partA.choices);\n\n return onModelChanged(model, true);\n }\n\n if (key === 'partB.choiceMode' && model.partB.choiceMode === 'radio') {\n model.partB.choices = this.removeExtraChoices(model.partB.choices);\n\n return onModelChanged(model, true);\n }\n\n return onModelChanged(model);\n }\n\n render() {\n const {\n classes,\n model,\n configuration,\n onConfigurationChanged\n } = this.props;\n const { partLabelType, partA: modelPartA, partB: modelPartB } = model;\n const { partA, partB, partialScoring, scoringType, ...generalConfiguration } = configuration;\n const {\n feedback: feedbackA = {},\n choiceMode: choiceModeA = {},\n choicePrefix: choicePrefixA = {},\n lockChoiceOrder: lockChoiceOrderA = {},\n prompt: promptA = {},\n teacherInstructions: teacherInstructionsA = {},\n studentInstructions: studentInstructionsA = {},\n choicesLayout: choicesLayoutA = {},\n gridColumns: gridColumnsA = {},\n rationale: rationaleA = {},\n spellCheck: spellCheckA = {}\n } = partA || {};\n const {\n feedback: feedbackB = {},\n choiceMode: choiceModeB = {},\n choicePrefix: choicePrefixB = {},\n lockChoiceOrder: lockChoiceOrderB = {},\n prompt: promptB = {},\n teacherInstructions: teacherInstructionsB = {},\n studentInstructions: studentInstructionsB = {},\n choicesLayout: choicesLayoutB = {},\n gridColumns: gridColumnsB = {},\n rationale: rationaleB = {},\n spellCheck: spellCheckB = {}\n } = partB || {};\n const type = partLabelType || 'Numbers';\n const typeIsNumber = type === 'Numbers';\n const firstPart = `Part ${typeIsNumber ? '1' : 'A'}`;\n const secondPart = `Part ${typeIsNumber ? '2' : 'B'}`;\n const nrOfColumnsAvailable = {\n partA: modelPartA.choices && modelPartA.choices.length ?\n Array.from({length: modelPartA.choices.length}, (_, i) => (`${i + 1}`)) : [],\n partB: modelPartB.choices && modelPartB.choices.length ?\n Array.from({length: modelPartB.choices.length}, (_, i) => (`${i + 1}`)) : [],\n };\n\n return (\n <div className={classes.design}>\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={this.onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n 'Settings for both': {\n partLabels:\n generalConfiguration.partLabels.settings &&\n toggle(generalConfiguration.partLabels.label),\n partLabelType:\n model.partLabels && dropdown('', ['Numbers', 'Letters']),\n partialScoring:\n partialScoring.settings && toggle(partialScoring.label),\n scoringType:\n scoringType.settings && radio(scoringType.label, ['auto', 'rubric'])\n },\n [`Settings ${firstPart}`]: {\n 'partA.choiceMode':\n choiceModeA.settings &&\n radio(choiceModeA.label, ['checkbox', 'radio']),\n 'partA.choicePrefix':\n choicePrefixA.settings &&\n radio(choicePrefixA.label, ['numbers', 'letters']),\n 'partA.lockChoiceOrder':\n lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),\n 'partA.choicesLayout':\n choicesLayoutA.settings &&\n dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),\n 'partA.gridColumns':\n choicesLayoutA.settings && modelPartA.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partA.length > 0 &&\n dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA)\n },\n [`Properties ${firstPart}`]: {\n 'partA.feedbackEnabled': feedbackA.settings &&\n toggle(feedbackA.label),\n 'partA.promptEnabled':\n promptA.settings && toggle(promptA.label),\n 'partA.teacherInstructionsEnabled':\n teacherInstructionsA.settings &&\n toggle(teacherInstructionsA.label),\n 'partA.studentInstructionsEnabled':\n studentInstructionsA.settings &&\n toggle(studentInstructionsA.label),\n 'partA.rationaleEnabled':\n rationaleA.settings && toggle(rationaleA.label),\n 'partA.spellCheckEnabled':\n spellCheckA.settings && toggle(spellCheckA.label),\n },\n [`Settings ${secondPart}`]: {\n 'partB.choiceMode':\n choiceModeB.settings &&\n radio(choiceModeB.label, ['checkbox', 'radio']),\n 'partB.choicePrefix':\n choicePrefixB.settings &&\n radio(choicePrefixB.label, ['numbers', 'letters']),\n 'partB.lockChoiceOrder':\n lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),\n 'partB.choicesLayout':\n choicesLayoutB.settings &&\n dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),\n 'partB.gridColumns':\n choicesLayoutB.settings && modelPartB.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partB.length > 0 &&\n dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB)\n },\n [`Properties ${secondPart}`]: {\n 'partB.feedbackEnabled':\n feedbackB.settings && toggle(feedbackB.label),\n 'partB.promptEnabled':\n promptB.settings && toggle(promptB.label),\n 'partB.teacherInstructionsEnabled':\n teacherInstructionsB.settings &&\n toggle(teacherInstructionsB.label),\n 'partB.studentInstructionsEnabled':\n studentInstructionsB.settings &&\n toggle(studentInstructionsB.label),\n 'partB.rationaleEnabled':\n rationaleB.settings && toggle(rationaleB.label),\n 'partB.spellCheckEnabled':\n spellCheckB.settings && toggle(spellCheckB.label),\n }\n }}\n />\n }\n >\n <div>\n <div className={classes.part}>\n {model.partLabels && <p>{firstPart}</p>}\n <ebsr-multiple-choice-configure\n id=\"A\"\n key=\"partA\"\n ref={ref => {\n if (ref) {\n // do not use destructuring to get model from props\n this.partA = ref;\n this.partA._model = {\n ...this.props.model.partA,\n errors: this.props.model.errors && this.props.model.errors.partA || {}\n };\n this.partA.configuration = {\n ...partA,\n ...generalConfiguration\n };\n }\n }}\n />\n </div>\n\n <div className={classes.part}>\n {model.partLabels && <p>{secondPart}</p>}\n <ebsr-multiple-choice-configure\n id=\"B\"\n key=\"partB\"\n ref={ref => {\n if (ref) {\n // do not use destructuring to get model from props\n this.partB = ref;\n this.partB._model ={\n ...this.props.model.partB,\n errors: this.props.model.errors && this.props.model.errors.partB || {}\n };\n this.partB.configuration = {\n ...partB,\n ...generalConfiguration\n };\n }\n }}\n />\n </div>\n </div>\n </layout.ConfigLayout>\n </div>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|