@pie-element/extended-text-entry 6.8.5 → 6.8.6
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 +8 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/lib/defaults.js +8 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +2 -2
- package/configure/lib/main.js +7 -4
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +1 -1
- package/controller/CHANGELOG.md +8 -0
- package/controller/lib/index.js +9 -6
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/config-schema.json +16 -0
- package/docs/config-schema.json.md +12 -0
- package/docs/demo/generate.js +1 -1
- package/docs/pie-schema.json +7 -1
- package/docs/pie-schema.json.md +5 -1
- package/lib/index.js +2 -2
- package/lib/main.js +1 -1
- package/lib/main.js.map +1 -1
- package/lib/print.js +2 -2
- package/module/configure.js +25 -18
- package/module/controller.js +2 -1
- package/module/demo.js +1 -1
- package/module/element.js +15 -15
- package/module/index.html +1 -1
- package/module/manifest.json +4 -4
- package/module/print-demo.js +1 -1
- package/module/print.html +1 -1
- package/module/print.js +15 -15
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [6.8.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.5...@pie-element/extended-text-entry@6.8.6) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [6.8.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.4...@pie-element/extended-text-entry@6.8.5) (2022-03-22)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.4.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.14...@pie-element/extended-text-entry-configure@5.4.15) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [5.4.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.13...@pie-element/extended-text-entry-configure@5.4.14) (2022-03-22)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
@@ -18,7 +18,8 @@ var _default = {
|
|
|
18
18
|
promptEnabled: true,
|
|
19
19
|
teacherInstructionsEnabled: true,
|
|
20
20
|
studentInstructionsEnabled: true,
|
|
21
|
-
spellCheckEnabled:
|
|
21
|
+
spellCheckEnabled: true,
|
|
22
|
+
playerSpellCheckEnabled: true,
|
|
22
23
|
toolbarEditorPosition: 'bottom'
|
|
23
24
|
},
|
|
24
25
|
configuration: {
|
|
@@ -27,7 +28,12 @@ var _default = {
|
|
|
27
28
|
label: 'Text-Entry Display Size'
|
|
28
29
|
},
|
|
29
30
|
spellCheck: {
|
|
30
|
-
label:
|
|
31
|
+
label: 'Spellcheck',
|
|
32
|
+
settings: false,
|
|
33
|
+
enabled: true
|
|
34
|
+
},
|
|
35
|
+
playerSpellCheck: {
|
|
36
|
+
label: 'Student Spellcheck',
|
|
31
37
|
settings: true,
|
|
32
38
|
enabled: true
|
|
33
39
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","feedback","multiple","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,cAAc,EAAE,cAPX;AAQLC,IAAAA,eAAe,EAAE,IARZ;AASLC,IAAAA,gBAAgB,EAAE,IATb;AAULC,IAAAA,aAAa,EAAE,IAVV;AAWLC,IAAAA,0BAA0B,EAAE,IAXvB;AAYLC,IAAAA,0BAA0B,EAAE,IAZvB;AAaLC,IAAAA,iBAAiB,EAAC,
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckEnabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","multiple","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,cAAc,EAAE,cAPX;AAQLC,IAAAA,eAAe,EAAE,IARZ;AASLC,IAAAA,gBAAgB,EAAE,IATb;AAULC,IAAAA,aAAa,EAAE,IAVV;AAWLC,IAAAA,0BAA0B,EAAE,IAXvB;AAYLC,IAAAA,0BAA0B,EAAE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BR,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY;AA1CR;AAlBF,C","sourcesContent":["export default {\n model: {\n dimensions: {\n height: 100,\n width: 500\n },\n prompt: 'This is the question prompt',\n mathInput: false,\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n spellCheckEnabled:true,\n playerSpellCheckEnabled:true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n playerSpellCheck: {\n label: 'Student Spellcheck',\n settings:true,\n enabled:true\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback'\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n multiple: {\n settings: false,\n label: 'Multiple Parts',\n enabled: false,\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions'\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n }\n};\n"],"file":"defaults.js"}
|
package/configure/lib/index.js
CHANGED
|
@@ -31,9 +31,9 @@ var _main = _interopRequireDefault(require("./main"));
|
|
|
31
31
|
|
|
32
32
|
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
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; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
37
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
39
39
|
|
package/configure/lib/main.js
CHANGED
|
@@ -39,9 +39,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
39
39
|
|
|
40
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
41
|
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
42
|
+
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; }
|
|
43
43
|
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
44
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
45
|
|
|
46
46
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
47
47
|
|
|
@@ -131,7 +131,9 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
131
131
|
_ref$equationEditor = _ref.equationEditor,
|
|
132
132
|
equationEditor = _ref$equationEditor === void 0 ? {} : _ref$equationEditor,
|
|
133
133
|
_ref$spellCheck = _ref.spellCheck,
|
|
134
|
-
spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck
|
|
134
|
+
spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
|
|
135
|
+
_ref$playerSpellCheck = _ref.playerSpellCheck,
|
|
136
|
+
playerSpellCheck = _ref$playerSpellCheck === void 0 ? {} : _ref$playerSpellCheck;
|
|
135
137
|
|
|
136
138
|
var _ref2 = model || {},
|
|
137
139
|
teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
|
|
@@ -182,7 +184,8 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
182
184
|
'multiple.enabled': multiple.settings && toggle(multiple.label, true),
|
|
183
185
|
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
184
186
|
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
185
|
-
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
|
|
187
|
+
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
188
|
+
playerSpellCheckEnabled: playerSpellCheck.settings && toggle(playerSpellCheck.label)
|
|
186
189
|
},
|
|
187
190
|
Properties: {
|
|
188
191
|
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","numberFields","dropdown","defaultFeedback","type","Main","props","markup","onModelChanged","model","prompt","feedback","update","teacherInstructions","state","setDimensions","classes","configuration","onConfigurationChanged","imageSupport","multiple","studentInstructions","mathInput","dimensions","equationEditor","spellCheck","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","spellCheckEnabled","toolbarOpts","toolbarEditorPosition","position","config","Settings","label","enabled","width","suffix","min","max","height","Properties","studentInstructionsEnabled","promptContainer","changeTeacherInstructions","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom","promptInput","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAAkDC,kBAAlD,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAkDD,kBAAlD,CAAeC,MAAf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,CAAcC;AAFjB,KATuB;AAapCI,IAAAA,KAAK,EAAE;AACL1B,MAAAA,KAAK,EAAE;AADF;AAb6B,GAAZ;AAAA,CAAX,EAgBXhC,IAhBW,C","sourcesContent":["import React from 'react';\nimport {\n FeedbackSelector,\n InputContainer,\n settings,\n layout,\n} from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n\nconst { Panel, toggle, numberFields, dropdown } = settings;\n\nconst defaultFeedback = {\n type: 'default',\n default: 'Your answer has been submitted',\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n setDimensions: true,\n };\n }\n\n onPromptChange = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({\n ...model,\n prompt: markup,\n });\n };\n\n changeFeedback = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n onModelChanged(update);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n onModelChanged(update);\n };\n\n render() {\n const {\n model,\n classes,\n onModelChanged,\n configuration,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const {\n multiple = {},\n feedback = {},\n teacherInstructions = {},\n prompt = {},\n studentInstructions = {},\n mathInput = {},\n dimensions = {},\n equationEditor = {},\n spellCheck = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled, spellCheckEnabled } =\n model || {};\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor:\n equationEditor.enabled &&\n model.mathInput &&\n dropdown(equationEditor.label, [\n 'non-negative-integers',\n 'integers',\n 'decimals',\n 'fractions',\n 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'item-authoring',\n ]),\n dimensions: numberFields(dimensions.label, {\n width: {\n label: 'Width (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n height: {\n label: 'Height (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n }),\n 'multiple.enabled':\n multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n },\n }}\n />\n }\n >\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptContainer}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n <br />\n\n {promptEnabled && (\n <InputContainer\n label={prompt.label}\n className={classes.promptContainer}\n >\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n className={classes.prompt}\n markup={model.prompt || ''}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n {feedbackEnabled && (\n <React.Fragment>\n <Typography className={classes.header} variant=\"subheading\">\n Feedback\n </Typography>\n\n <FeedbackSelector\n label=\"When submitted, show\"\n feedback={model.feedback || defaultFeedback}\n onChange={this.changeFeedback}\n toolbarOpts={toolbarOpts}\n />\n </React.Fragment>\n )}\n </div>\n </layout.ConfigLayout>\n );\n }\n}\nexport default withStyles((theme) => ({\n header: {\n paddingBottom: theme.spacing.unit,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n promptInput: {\n width: '100%',\n marginBottom: theme.spacing.unit,\n },\n field: {\n width: '200px',\n },\n}))(Main);\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","numberFields","dropdown","defaultFeedback","type","Main","props","markup","onModelChanged","model","prompt","feedback","update","teacherInstructions","state","setDimensions","classes","configuration","onConfigurationChanged","imageSupport","multiple","studentInstructions","mathInput","dimensions","equationEditor","spellCheck","playerSpellCheck","teacherInstructionsEnabled","promptEnabled","feedbackEnabled","spellCheckEnabled","toolbarOpts","toolbarEditorPosition","position","config","Settings","label","enabled","width","suffix","min","max","height","playerSpellCheckEnabled","Properties","studentInstructionsEnabled","promptContainer","changeTeacherInstructions","ALL_PLUGINS","onPromptChange","header","changeFeedback","React","Component","PropTypes","func","isRequired","object","theme","paddingBottom","spacing","unit","paddingTop","marginBottom","promptInput","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAQA,KAAR,GAAkDC,kBAAlD,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAkDD,kBAAlD,CAAeC,MAAf;AAAA,IAAuBC,YAAvB,GAAkDF,kBAAlD,CAAuBE,YAAvB;AAAA,IAAqCC,QAArC,GAAkDH,kBAA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ACX1B,MAAAA,KAAK,EAAE,MADI;AAEXyB,MAAAA,YAAY,EAAEL,KAAK,CAACE,OAAN,CAAcC;AAFjB,KATuB;AAapCI,IAAAA,KAAK,EAAE;AACL3B,MAAAA,KAAK,EAAE;AADF;AAb6B,GAAZ;AAAA,CAAX,EAgBXjC,IAhBW,C","sourcesContent":["import React from 'react';\nimport {\n FeedbackSelector,\n InputContainer,\n settings,\n layout,\n} from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n\nconst { Panel, toggle, numberFields, dropdown } = settings;\n\nconst defaultFeedback = {\n type: 'default',\n default: 'Your answer has been submitted',\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n setDimensions: true,\n };\n }\n\n onPromptChange = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({\n ...model,\n prompt: markup,\n });\n };\n\n changeFeedback = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n onModelChanged(update);\n };\n\n changeTeacherInstructions = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n onModelChanged(update);\n };\n\n render() {\n const {\n model,\n classes,\n onModelChanged,\n configuration,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const {\n multiple = {},\n feedback = {},\n teacherInstructions = {},\n prompt = {},\n studentInstructions = {},\n mathInput = {},\n dimensions = {},\n equationEditor = {},\n spellCheck = {},\n playerSpellCheck = {}\n } = configuration || {};\n const { teacherInstructionsEnabled, promptEnabled, feedbackEnabled, spellCheckEnabled } =\n model || {};\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor:\n equationEditor.enabled &&\n model.mathInput &&\n dropdown(equationEditor.label, [\n 'non-negative-integers',\n 'integers',\n 'decimals',\n 'fractions',\n 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'item-authoring',\n ]),\n dimensions: numberFields(dimensions.label, {\n width: {\n label: 'Width (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n height: {\n label: 'Height (px)',\n suffix: 'px',\n min: 100,\n max: 500,\n },\n }),\n 'multiple.enabled':\n multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckEnabled:\n playerSpellCheck.settings && toggle(playerSpellCheck.label),\n },\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n },\n }}\n />\n }\n >\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptContainer}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n <br />\n\n {promptEnabled && (\n <InputContainer\n label={prompt.label}\n className={classes.promptContainer}\n >\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n className={classes.prompt}\n markup={model.prompt || ''}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n {feedbackEnabled && (\n <React.Fragment>\n <Typography className={classes.header} variant=\"subheading\">\n Feedback\n </Typography>\n\n <FeedbackSelector\n label=\"When submitted, show\"\n feedback={model.feedback || defaultFeedback}\n onChange={this.changeFeedback}\n toolbarOpts={toolbarOpts}\n />\n </React.Fragment>\n )}\n </div>\n </layout.ConfigLayout>\n );\n }\n}\nexport default withStyles((theme) => ({\n header: {\n paddingBottom: theme.spacing.unit,\n },\n promptContainer: {\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n width: '100%',\n },\n promptInput: {\n width: '100%',\n marginBottom: theme.spacing.unit,\n },\n field: {\n width: '200px',\n },\n}))(Main);\n"],"file":"main.js"}
|
package/configure/package.json
CHANGED
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [4.1.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.20...@pie-element/extended-text-entry-controller@4.1.21) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.1.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-controller@4.1.19...@pie-element/extended-text-entry-controller@4.1.20) (2022-03-22)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/extended-text-entry-controller
|
package/controller/lib/index.js
CHANGED
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.createDefaultModel = createDefaultModel;
|
|
9
9
|
exports.model = model;
|
|
10
|
-
exports.outcome = outcome;
|
|
11
10
|
exports.normalize = void 0;
|
|
11
|
+
exports.outcome = outcome;
|
|
12
12
|
|
|
13
13
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
14
14
|
|
|
@@ -22,9 +22,9 @@ var _feedback = require("@pie-lib/feedback");
|
|
|
22
22
|
|
|
23
23
|
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
24
24
|
|
|
25
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
25
|
+
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; }
|
|
26
26
|
|
|
27
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
27
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
28
|
|
|
29
29
|
var log = (0, _debug["default"])('@pie-element:extended-text-entry:controller');
|
|
30
30
|
|
|
@@ -60,7 +60,8 @@ var normalize = function normalize(question) {
|
|
|
60
60
|
rationaleEnabled: true,
|
|
61
61
|
promptEnabled: true,
|
|
62
62
|
teacherInstructionsEnabled: true,
|
|
63
|
-
studentInstructionsEnabled: true
|
|
63
|
+
studentInstructionsEnabled: true,
|
|
64
|
+
playerSpellCheckEnabled: true
|
|
64
65
|
}, question);
|
|
65
66
|
};
|
|
66
67
|
|
|
@@ -123,7 +124,7 @@ function _model() {
|
|
|
123
124
|
teacherInstructions: teacherInstructions,
|
|
124
125
|
mathInput: normalizedQuestion.mathInput,
|
|
125
126
|
equationEditor: equationEditor,
|
|
126
|
-
spellCheckEnabled: normalizedQuestion.
|
|
127
|
+
spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,
|
|
127
128
|
playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'
|
|
128
129
|
};
|
|
129
130
|
}));
|
|
@@ -138,7 +139,9 @@ function _model() {
|
|
|
138
139
|
return _model.apply(this, arguments);
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
function
|
|
142
|
+
function
|
|
143
|
+
/*question, session, env*/
|
|
144
|
+
outcome() {
|
|
142
145
|
return _outcome.apply(this, arguments);
|
|
143
146
|
}
|
|
144
147
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","spellCheckEnabled","playersToolbarPosition","outcome","score","completed","note"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;;;;;AAHA,IAAMA,GAAG,GAAG,uBAAM,6CAAN,CAAZ;;SAKsBC,kB;;;;;sGAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkCC,YAAAA,KAAlC,2DAA0C,EAA1C;AACLF,YAAAA,GAAG,CAAC,sBAAD,EAAyBE,KAAzB,CAAH;AADK,6EAIAC,oBAJA,GAKAD,KALA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AASA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AAAA,yCAC5BF,oBAD4B;AAE/BG,IAAAA,eAAe,EAAE,IAFc;AAG/BC,IAAAA,gBAAgB,EAAE,IAHa;AAI/BC,IAAAA,aAAa,EAAE,IAJgB;AAK/BC,IAAAA,0BAA0B,EAAE,IALG;AAM/BC,IAAAA,0BAA0B,EAAE;
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["log","createDefaultModel","model","defaults","normalize","question","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","playerSpellCheckEnabled","session","env","normalizedQuestion","fb","mode","feedback","Promise","resolve","undefined","teacherInstructions","role","equationEditor","then","prompt","dimensions","customKeys","disabled","mathInput","spellCheckEnabled","playersToolbarPosition","outcome","score","completed","note"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AAEA;;;;;;AAHA,IAAMA,GAAG,GAAG,uBAAM,6CAAN,CAAZ;;SAKsBC,kB;;;;;sGAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkCC,YAAAA,KAAlC,2DAA0C,EAA1C;AACLF,YAAAA,GAAG,CAAC,sBAAD,EAAyBE,KAAzB,CAAH;AADK,6EAIAC,oBAJA,GAKAD,KALA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AASA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AAAA,yCAC5BF,oBAD4B;AAE/BG,IAAAA,eAAe,EAAE,IAFc;AAG/BC,IAAAA,gBAAgB,EAAE,IAHa;AAI/BC,IAAAA,aAAa,EAAE,IAJgB;AAK/BC,IAAAA,0BAA0B,EAAE,IALG;AAM/BC,IAAAA,0BAA0B,EAAE,IANG;AAO/BC,IAAAA,uBAAuB,EAAE;AAPM,KAQ5BN,QAR4B;AAAA,CAA1B;;;;SAYeH,K;;;;;yFAAf,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BAAkB,CAACW,MAAtD,GAA+D,IAD7C;AAE1BC,gBAAAA,UAAU,EAAEZ,kBAAkB,CAACY,UAFL;AAG1BC,gBAAAA,UAAU,EAAEb,kBAAkB,CAACa,UAAnB,IAAiC,EAHnB;AAI1BC,gBAAAA,QAAQ,EAAEf,GAAG,CAACG,IAAJ,KAAa,QAJG;AAK1BC,gBAAAA,QAAQ,EAARA,QAL0B;AAM1BI,gBAAAA,mBAAmB,EAAnBA,mBAN0B;AAO1BQ,gBAAAA,SAAS,EAAEf,kBAAkB,CAACe,SAPJ;AAQ1BN,gBAAAA,cAAc,EAAdA,cAR0B;AAS1BO,gBAAAA,iBAAiB,EAAEhB,kBAAkB,CAACH,uBATZ;AAU1BoB,gBAAAA,sBAAsB,EAAEjB,kBAAkB,CAACiB,sBAAnB,IAA6C;AAV3C,eAAL;AAAA,aAAhB,CAnCF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;;AAiDuB;AAARC,O;;;;;2FAAf;AAAA;AAAA;AAAA;AAAA;AAAA,8CACE;AACLC,cAAAA,KAAK,EAAE,CADF;AAELC,cAAAA,SAAS,EAAE,KAFN;AAGLC,cAAAA,IAAI,EAAE;AAHD,aADF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["import debug from 'debug';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\nimport { getFeedback } from '@pie-lib/feedback';\n\nimport defaults from './defaults';\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return {\n ...defaults,\n ...model,\n };\n}\n\nexport const normalize = question => ({\n ...defaults,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n playerSpellCheckEnabled: true,\n ...question,\n});\n\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n return fb.then(feedback => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n mathInput: normalizedQuestion.mathInput,\n equationEditor, \n spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,\n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring'\n };\n}\n"],"file":"index.js"}
|
package/controller/package.json
CHANGED
package/docs/config-schema.json
CHANGED
|
@@ -104,6 +104,22 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
+
"playerSpellCheck": {
|
|
108
|
+
"title": "ConfigureProp",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"settings": {
|
|
112
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel",
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"title": "settings"
|
|
115
|
+
},
|
|
116
|
+
"label": {
|
|
117
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel",
|
|
118
|
+
"type": "string",
|
|
119
|
+
"title": "label"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
107
123
|
"dimensions": {
|
|
108
124
|
"title": "ConfigureProp",
|
|
109
125
|
"type": "object",
|
|
@@ -79,6 +79,18 @@ Indicates if the item has to be displayed in the Settings Panel
|
|
|
79
79
|
|
|
80
80
|
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
81
81
|
|
|
82
|
+
# `playerSpellCheck` (object)
|
|
83
|
+
|
|
84
|
+
Properties of the `playerSpellCheck` object:
|
|
85
|
+
|
|
86
|
+
## `settings` (boolean)
|
|
87
|
+
|
|
88
|
+
Indicates if the item has to be displayed in the Settings Panel
|
|
89
|
+
|
|
90
|
+
## `label` (string)
|
|
91
|
+
|
|
92
|
+
Indicates the label for the item that has to be displayed in the Settings Panel
|
|
93
|
+
|
|
82
94
|
# `dimensions` (object)
|
|
83
95
|
|
|
84
96
|
Properties of the `dimensions` object:
|
package/docs/demo/generate.js
CHANGED
package/docs/pie-schema.json
CHANGED
|
@@ -99,10 +99,15 @@
|
|
|
99
99
|
"title": "rationaleEnabled"
|
|
100
100
|
},
|
|
101
101
|
"spellCheckEnabled": {
|
|
102
|
-
"description": "Indicates if spellcheck is enabled",
|
|
102
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true",
|
|
103
103
|
"type": "boolean",
|
|
104
104
|
"title": "spellCheckEnabled"
|
|
105
105
|
},
|
|
106
|
+
"playerSpellCheckEnabled": {
|
|
107
|
+
"description": "Indicates if spellcheck is enabled for the player. Default value is true",
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"title": "playerSpellCheckEnabled"
|
|
110
|
+
},
|
|
106
111
|
"studentInstructionsEnabled": {
|
|
107
112
|
"description": "Indicates if Student Instructions are enabled",
|
|
108
113
|
"type": "boolean",
|
|
@@ -147,6 +152,7 @@
|
|
|
147
152
|
"element",
|
|
148
153
|
"feedbackEnabled",
|
|
149
154
|
"id",
|
|
155
|
+
"playerSpellCheckEnabled",
|
|
150
156
|
"rationaleEnabled",
|
|
151
157
|
"spellCheckEnabled",
|
|
152
158
|
"studentInstructionsEnabled",
|
package/docs/pie-schema.json.md
CHANGED
|
@@ -82,7 +82,11 @@ Indicates if Rationale are enabled
|
|
|
82
82
|
|
|
83
83
|
# `spellCheckEnabled` (boolean, required)
|
|
84
84
|
|
|
85
|
-
Indicates if spellcheck is enabled
|
|
85
|
+
Indicates if spellcheck is enabled for the author. Default value is true
|
|
86
|
+
|
|
87
|
+
# `playerSpellCheckEnabled` (boolean, required)
|
|
88
|
+
|
|
89
|
+
Indicates if spellcheck is enabled for the player. Default value is true
|
|
86
90
|
|
|
87
91
|
# `studentInstructionsEnabled` (boolean, required)
|
|
88
92
|
|
package/lib/index.js
CHANGED
|
@@ -5,9 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.textContent = textContent;
|
|
9
|
-
exports.isComplete = isComplete;
|
|
10
8
|
exports["default"] = void 0;
|
|
9
|
+
exports.isComplete = isComplete;
|
|
10
|
+
exports.textContent = textContent;
|
|
11
11
|
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
package/lib/main.js
CHANGED
|
@@ -111,7 +111,6 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
111
111
|
|
|
112
112
|
var maxHeight = '40vh';
|
|
113
113
|
var toolbarOpts = {};
|
|
114
|
-
console.log(spellCheckEnabled, "spellcheck");
|
|
115
114
|
log('[render] disabled? ', disabled);
|
|
116
115
|
|
|
117
116
|
var teacherInstructionsDiv = /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
|
|
@@ -141,6 +140,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
141
140
|
},
|
|
142
141
|
className: classes.collapsible
|
|
143
142
|
}, teacherInstructionsDiv) : teacherInstructionsDiv, /*#__PURE__*/_react["default"].createElement("br", null)), model.prompt && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
143
|
+
component: 'span',
|
|
144
144
|
className: classes.prompt
|
|
145
145
|
}, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
|
|
146
146
|
defaultClassName: "prompt",
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","height","maxHeight","toolbarOpts","
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["log","style","theme","main","backgroundColor","color","background","text","prompt","width","marginBottom","spacing","unit","fontSize","Main","props","onChange","containerRef","model","classes","session","dimensions","disabled","feedback","teacherInstructions","mathInput","animationsDisabled","playersToolbarPosition","spellCheckEnabled","value","height","maxHeight","toolbarOpts","teacherInstructionsDiv","position","ref","hidden","visible","collapsible","changeSession","toString","math","customKeys","keypadMode","equationEditor","controlledKeypadMode","video","audio","React","Component","PropTypes","func","isRequired","object","shape","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEA,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAAAC,KAAK;AAAA,SAAK;AACtBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EADb;AAEJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAFH,KADgB;AAKtBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,MADD;AAENJ,MAAAA,KAAK,EAAEA,gBAAME,IA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AAUE,QAAA,UAAU,EAAEJ,iBAVd;AAWE,QAAA,WAAW,EAAE;AACXa,UAAAA,IAAI,EAAE;AACJnB,YAAAA,QAAQ,EAAE,CAACG,SADP;AAEJiB,YAAAA,UAAU,EAAE,KAAK3B,KAAL,CAAWG,KAAX,CAAiBwB,UAFzB;AAGJC,YAAAA,UAAU,EAAE,KAAK5B,KAAL,CAAWG,KAAX,CAAiB0B,cAHzB;AAIJC,YAAAA,oBAAoB,EAAE;AAJlB,WADK;AAOXC,UAAAA,KAAK,EAAE;AACLxB,YAAAA,QAAQ,EAAE;AADL,WAPI;AAUVyB,UAAAA,KAAK,EAAE;AACNzB,YAAAA,QAAQ,EAAE;AADJ;AAVG;AAXf,QA7BF,EAuDGC,QAAQ,iBACP,0DACE,2CADF,eAEE,gCAAC,kBAAD;AAAU,QAAA,WAAW,EAAC,SAAtB;AAAgC,QAAA,QAAQ,EAAEA;AAA1C,QAFF,CAxDJ,CADF;AAgED;;;EAvGuByB,kBAAMC,S;;;iCAAnBnC,I,eACQ;AACjBE,EAAAA,QAAQ,EAAEkC,sBAAUC,IAAV,CAAeC,UADR;AAEjBlC,EAAAA,KAAK,EAAEgC,sBAAUG,MAFA;AAGjBlC,EAAAA,OAAO,EAAE+B,sBAAUG,MAAV,CAAiBD,UAHT;AAIjBhC,EAAAA,OAAO,EAAE8B,sBAAUI,KAAV,CAAgB;AACvBzB,IAAAA,KAAK,EAAEqB,sBAAUK;AADM,GAAhB,EAENH;AANc,C;;eAyGN,wBAAWnD,KAAX,EAAkBa,IAAlB,C","sourcesContent":["import React from 'react';\nimport EditableHTML from '@pie-lib/editable-html';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport debug from 'debug';\nimport debounce from 'lodash/debounce';\nimport {color, Feedback, Collapsible, PreviewPrompt} from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nconst log = debug('@pie-ui:extended-text-entry');\n\nconst style = theme => ({\n main: {\n backgroundColor: color.background(),\n color: color.text()\n },\n prompt: {\n width: '100%',\n color: color.text(),\n marginBottom: theme.spacing.unit * 2,\n fontSize: 'inherit'\n }\n});\n\nexport class Main extends React.Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n model: PropTypes.object,\n classes: PropTypes.object.isRequired,\n session: PropTypes.shape({\n value: PropTypes.string\n }).isRequired\n };\n\n componentDidUpdate() {\n if (this.containerRef) {\n renderMath(this.containerRef);\n }\n }\n\n changeSession = debounce(this.props.onChange, 1500);\n\n render() {\n const { model, classes, session } = this.props;\n const { dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled, playersToolbarPosition, spellCheckEnabled } = model;\n const { value } = session;\n const { width, height } = dimensions || {};\n const maxHeight = '40vh';\n const toolbarOpts = {};\n\n log('[render] disabled? ', disabled);\n\n const teacherInstructionsDiv = <PreviewPrompt defaultClassName=\"teacher-instructions\" prompt={teacherInstructions} />;\n\n switch (playersToolbarPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n return (\n <div\n className={classes.main}\n ref={ref => {\n this.containerRef = ref;\n }}\n >\n {\n teacherInstructions && (\n <div>\n {!animationsDisabled ? (\n <Collapsible\n labels={{hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions'}}\n className={classes.collapsible}\n >\n {teacherInstructionsDiv}\n </Collapsible>\n ) : teacherInstructionsDiv }\n <br/>\n </div>\n )\n }\n {model.prompt && (\n <Typography\n component={'span'}\n className={classes.prompt}\n >\n <PreviewPrompt defaultClassName=\"prompt\" prompt={model.prompt} />\n </Typography>\n )}\n <EditableHTML\n className=\"response-area-editor\"\n onChange={this.changeSession}\n markup={value || ''}\n width={width && width.toString()}\n minHeight={height && height.toString()}\n maxHeight={maxHeight}\n disabled={disabled}\n highlightShape={true}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n pluginProps={{\n math: {\n disabled: !mathInput,\n customKeys: this.props.model.customKeys,\n keypadMode: this.props.model.equationEditor,\n controlledKeypadMode: false\n },\n video: {\n disabled: true\n },\n audio: {\n disabled: true\n }\n }}\n />\n {feedback && (\n <div>\n <br />\n <Feedback correctness=\"correct\" feedback={feedback}/>\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default withStyles(style)(Main);\n"],"file":"main.js"}
|
package/lib/print.js
CHANGED
|
@@ -39,9 +39,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
42
|
+
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; }
|
|
43
43
|
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
44
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
45
|
|
|
46
46
|
var log = (0, _debug["default"])('pie-element:extended-text-entry:print');
|
|
47
47
|
|
package/module/configure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.
|
|
2
|
-
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.9/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.32/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.8/module/index.js";
|
|
4
4
|
var lib = {};
|
|
5
5
|
Object.defineProperty(lib, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -113,7 +113,7 @@ class Main extends React$1.Component {
|
|
|
113
113
|
}
|
|
114
114
|
render() {
|
|
115
115
|
const {model, classes, onModelChanged, configuration, onConfigurationChanged, imageSupport} = this.props;
|
|
116
|
-
const {multiple = {}, feedback = {}, teacherInstructions = {}, prompt = {}, studentInstructions = {}, mathInput = {}, dimensions = {}, equationEditor = {}, spellCheck = {}} = configuration || ({});
|
|
116
|
+
const {multiple = {}, feedback = {}, teacherInstructions = {}, prompt = {}, studentInstructions = {}, mathInput = {}, dimensions = {}, equationEditor = {}, spellCheck = {}, playerSpellCheck = {}} = configuration || ({});
|
|
117
117
|
const {teacherInstructionsEnabled, promptEnabled, feedbackEnabled, spellCheckEnabled} = model || ({});
|
|
118
118
|
const toolbarOpts = {};
|
|
119
119
|
switch (model.toolbarEditorPosition) {
|
|
@@ -151,7 +151,8 @@ class Main extends React$1.Component {
|
|
|
151
151
|
'multiple.enabled': multiple.settings && toggle(multiple.label, true),
|
|
152
152
|
promptEnabled: prompt.settings && toggle(prompt.label),
|
|
153
153
|
feedbackEnabled: feedback.settings && toggle(feedback.label),
|
|
154
|
-
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
|
|
154
|
+
spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
|
|
155
|
+
playerSpellCheckEnabled: playerSpellCheck.settings && toggle(playerSpellCheck.label)
|
|
155
156
|
},
|
|
156
157
|
Properties: {
|
|
157
158
|
teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
|
|
@@ -161,19 +162,19 @@ class Main extends React$1.Component {
|
|
|
161
162
|
__self: this,
|
|
162
163
|
__source: {
|
|
163
164
|
fileName: _jsxFileName,
|
|
164
|
-
lineNumber:
|
|
165
|
+
lineNumber: 94
|
|
165
166
|
}
|
|
166
167
|
}),
|
|
167
168
|
__self: this,
|
|
168
169
|
__source: {
|
|
169
170
|
fileName: _jsxFileName,
|
|
170
|
-
lineNumber:
|
|
171
|
+
lineNumber: 92
|
|
171
172
|
}
|
|
172
173
|
}, React$1.createElement('div', {
|
|
173
174
|
__self: this,
|
|
174
175
|
__source: {
|
|
175
176
|
fileName: _jsxFileName,
|
|
176
|
-
lineNumber:
|
|
177
|
+
lineNumber: 154
|
|
177
178
|
}
|
|
178
179
|
}, teacherInstructionsEnabled && React$1.createElement(InputContainer, {
|
|
179
180
|
label: teacherInstructions.label,
|
|
@@ -181,7 +182,7 @@ class Main extends React$1.Component {
|
|
|
181
182
|
__self: this,
|
|
182
183
|
__source: {
|
|
183
184
|
fileName: _jsxFileName,
|
|
184
|
-
lineNumber:
|
|
185
|
+
lineNumber: 156
|
|
185
186
|
}
|
|
186
187
|
}, React$1.createElement(EditableHtml, {
|
|
187
188
|
className: classes.prompt,
|
|
@@ -194,13 +195,13 @@ class Main extends React$1.Component {
|
|
|
194
195
|
__self: this,
|
|
195
196
|
__source: {
|
|
196
197
|
fileName: _jsxFileName,
|
|
197
|
-
lineNumber:
|
|
198
|
+
lineNumber: 160
|
|
198
199
|
}
|
|
199
200
|
})), React$1.createElement('br', {
|
|
200
201
|
__self: this,
|
|
201
202
|
__source: {
|
|
202
203
|
fileName: _jsxFileName,
|
|
203
|
-
lineNumber:
|
|
204
|
+
lineNumber: 172
|
|
204
205
|
}
|
|
205
206
|
}), promptEnabled && React$1.createElement(InputContainer, {
|
|
206
207
|
label: prompt.label,
|
|
@@ -208,7 +209,7 @@ class Main extends React$1.Component {
|
|
|
208
209
|
__self: this,
|
|
209
210
|
__source: {
|
|
210
211
|
fileName: _jsxFileName,
|
|
211
|
-
lineNumber:
|
|
212
|
+
lineNumber: 175
|
|
212
213
|
}
|
|
213
214
|
}, React$1.createElement(EditableHtml, {
|
|
214
215
|
activePlugins: ALL_PLUGINS,
|
|
@@ -222,13 +223,13 @@ class Main extends React$1.Component {
|
|
|
222
223
|
__self: this,
|
|
223
224
|
__source: {
|
|
224
225
|
fileName: _jsxFileName,
|
|
225
|
-
lineNumber:
|
|
226
|
+
lineNumber: 179
|
|
226
227
|
}
|
|
227
228
|
})), feedbackEnabled && React$1.createElement(React$1.Fragment, {
|
|
228
229
|
__self: this,
|
|
229
230
|
__source: {
|
|
230
231
|
fileName: _jsxFileName,
|
|
231
|
-
lineNumber:
|
|
232
|
+
lineNumber: 193
|
|
232
233
|
}
|
|
233
234
|
}, React$1.createElement(Typography, {
|
|
234
235
|
className: classes.header,
|
|
@@ -236,7 +237,7 @@ class Main extends React$1.Component {
|
|
|
236
237
|
__self: this,
|
|
237
238
|
__source: {
|
|
238
239
|
fileName: _jsxFileName,
|
|
239
|
-
lineNumber:
|
|
240
|
+
lineNumber: 194
|
|
240
241
|
}
|
|
241
242
|
}, "Feedback"), React$1.createElement(FeedbackSelector, {
|
|
242
243
|
label: "When submitted, show",
|
|
@@ -246,7 +247,7 @@ class Main extends React$1.Component {
|
|
|
246
247
|
__self: this,
|
|
247
248
|
__source: {
|
|
248
249
|
fileName: _jsxFileName,
|
|
249
|
-
lineNumber:
|
|
250
|
+
lineNumber: 198
|
|
250
251
|
}
|
|
251
252
|
}))));
|
|
252
253
|
}
|
|
@@ -283,7 +284,8 @@ var defaults = {
|
|
|
283
284
|
promptEnabled: true,
|
|
284
285
|
teacherInstructionsEnabled: true,
|
|
285
286
|
studentInstructionsEnabled: true,
|
|
286
|
-
spellCheckEnabled:
|
|
287
|
+
spellCheckEnabled: true,
|
|
288
|
+
playerSpellCheckEnabled: true,
|
|
287
289
|
toolbarEditorPosition: 'bottom'
|
|
288
290
|
},
|
|
289
291
|
configuration: {
|
|
@@ -292,7 +294,12 @@ var defaults = {
|
|
|
292
294
|
label: 'Text-Entry Display Size'
|
|
293
295
|
},
|
|
294
296
|
spellCheck: {
|
|
295
|
-
label:
|
|
297
|
+
label: 'Spellcheck',
|
|
298
|
+
settings: false,
|
|
299
|
+
enabled: true
|
|
300
|
+
},
|
|
301
|
+
playerSpellCheck: {
|
|
302
|
+
label: 'Student Spellcheck',
|
|
296
303
|
settings: true,
|
|
297
304
|
enabled: true
|
|
298
305
|
},
|
package/module/controller.js
CHANGED
|
@@ -37,6 +37,7 @@ const normalize = question => ({
|
|
|
37
37
|
promptEnabled: true,
|
|
38
38
|
teacherInstructionsEnabled: true,
|
|
39
39
|
studentInstructionsEnabled: true,
|
|
40
|
+
playerSpellCheckEnabled: true,
|
|
40
41
|
...question,
|
|
41
42
|
});
|
|
42
43
|
|
|
@@ -82,7 +83,7 @@ async function model(question, session, env) {
|
|
|
82
83
|
teacherInstructions,
|
|
83
84
|
mathInput: normalizedQuestion.mathInput,
|
|
84
85
|
equationEditor,
|
|
85
|
-
spellCheckEnabled: normalizedQuestion.
|
|
86
|
+
spellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,
|
|
86
87
|
playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom'
|
|
87
88
|
}));
|
|
88
89
|
}
|
package/module/demo.js
CHANGED
package/module/element.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.
|
|
2
|
-
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.
|
|
3
|
-
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.9/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.8/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.34/module/index.js";
|
|
4
4
|
const React$1 = _dll_react;
|
|
5
5
|
const PropTypes = _dll_prop_types;
|
|
6
6
|
const {Typography: Typography} = _dll_material_ui__core;
|
|
@@ -57,7 +57,6 @@ class Main extends React$1.Component {
|
|
|
57
57
|
const {width, height} = dimensions || ({});
|
|
58
58
|
const maxHeight = '40vh';
|
|
59
59
|
const toolbarOpts = {};
|
|
60
|
-
console.log(spellCheckEnabled, "spellcheck");
|
|
61
60
|
log$1('[render] disabled? ', disabled);
|
|
62
61
|
const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
|
|
63
62
|
defaultClassName: "teacher-instructions",
|
|
@@ -65,7 +64,7 @@ class Main extends React$1.Component {
|
|
|
65
64
|
__self: this,
|
|
66
65
|
__source: {
|
|
67
66
|
fileName: _jsxFileName,
|
|
68
|
-
lineNumber:
|
|
67
|
+
lineNumber: 54
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
switch (playersToolbarPosition) {
|
|
@@ -84,13 +83,13 @@ class Main extends React$1.Component {
|
|
|
84
83
|
__self: this,
|
|
85
84
|
__source: {
|
|
86
85
|
fileName: _jsxFileName,
|
|
87
|
-
lineNumber:
|
|
86
|
+
lineNumber: 66
|
|
88
87
|
}
|
|
89
88
|
}, teacherInstructions && React$1.createElement('div', {
|
|
90
89
|
__self: this,
|
|
91
90
|
__source: {
|
|
92
91
|
fileName: _jsxFileName,
|
|
93
|
-
lineNumber:
|
|
92
|
+
lineNumber: 74
|
|
94
93
|
}
|
|
95
94
|
}, !animationsDisabled ? React$1.createElement(Collapsible, {
|
|
96
95
|
labels: {
|
|
@@ -101,20 +100,21 @@ class Main extends React$1.Component {
|
|
|
101
100
|
__self: this,
|
|
102
101
|
__source: {
|
|
103
102
|
fileName: _jsxFileName,
|
|
104
|
-
lineNumber:
|
|
103
|
+
lineNumber: 76
|
|
105
104
|
}
|
|
106
105
|
}, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
|
|
107
106
|
__self: this,
|
|
108
107
|
__source: {
|
|
109
108
|
fileName: _jsxFileName,
|
|
110
|
-
lineNumber:
|
|
109
|
+
lineNumber: 83
|
|
111
110
|
}
|
|
112
111
|
})), model.prompt && React$1.createElement(Typography, {
|
|
112
|
+
component: 'span',
|
|
113
113
|
className: classes.prompt,
|
|
114
114
|
__self: this,
|
|
115
115
|
__source: {
|
|
116
116
|
fileName: _jsxFileName,
|
|
117
|
-
lineNumber:
|
|
117
|
+
lineNumber: 88
|
|
118
118
|
}
|
|
119
119
|
}, React$1.createElement(PreviewPrompt, {
|
|
120
120
|
defaultClassName: "prompt",
|
|
@@ -122,7 +122,7 @@ class Main extends React$1.Component {
|
|
|
122
122
|
__self: this,
|
|
123
123
|
__source: {
|
|
124
124
|
fileName: _jsxFileName,
|
|
125
|
-
lineNumber:
|
|
125
|
+
lineNumber: 92
|
|
126
126
|
}
|
|
127
127
|
})), React$1.createElement(EditableHTML, {
|
|
128
128
|
className: "response-area-editor",
|
|
@@ -152,19 +152,19 @@ class Main extends React$1.Component {
|
|
|
152
152
|
__self: this,
|
|
153
153
|
__source: {
|
|
154
154
|
fileName: _jsxFileName,
|
|
155
|
-
lineNumber:
|
|
155
|
+
lineNumber: 95
|
|
156
156
|
}
|
|
157
157
|
}), feedback && React$1.createElement('div', {
|
|
158
158
|
__self: this,
|
|
159
159
|
__source: {
|
|
160
160
|
fileName: _jsxFileName,
|
|
161
|
-
lineNumber:
|
|
161
|
+
lineNumber: 122
|
|
162
162
|
}
|
|
163
163
|
}, React$1.createElement('br', {
|
|
164
164
|
__self: this,
|
|
165
165
|
__source: {
|
|
166
166
|
fileName: _jsxFileName,
|
|
167
|
-
lineNumber:
|
|
167
|
+
lineNumber: 123
|
|
168
168
|
}
|
|
169
169
|
}), React$1.createElement(Feedback, {
|
|
170
170
|
correctness: "correct",
|
|
@@ -172,7 +172,7 @@ class Main extends React$1.Component {
|
|
|
172
172
|
__self: this,
|
|
173
173
|
__source: {
|
|
174
174
|
fileName: _jsxFileName,
|
|
175
|
-
lineNumber:
|
|
175
|
+
lineNumber: 124
|
|
176
176
|
}
|
|
177
177
|
})));
|
|
178
178
|
}
|
package/module/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
|
-
<title>@pie-element/extended-text-entry@6.8.
|
|
5
|
+
<title>@pie-element/extended-text-entry@6.8.5</title>
|
|
6
6
|
<script
|
|
7
7
|
type="module"
|
|
8
8
|
src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
|
package/module/manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.5",
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"name": "@pie-lib/shared-module",
|
|
7
|
-
"version": "^1.4.
|
|
7
|
+
"version": "^1.4.9"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@pie-lib/math-rendering-module",
|
|
11
|
-
"version": "^1.0.
|
|
11
|
+
"version": "^1.0.34"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "@pie-lib/editable-html-module",
|
|
15
|
-
"version": "^1.2.
|
|
15
|
+
"version": "^1.2.8"
|
|
16
16
|
}
|
|
17
17
|
]
|
|
18
18
|
}
|
package/module/print-demo.js
CHANGED
package/module/print.html
CHANGED
package/module/print.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.
|
|
2
|
-
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_debug, _dll_lodash, _dll_pie_lib__render_ui, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.9/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.34/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.8/module/index.js";
|
|
4
4
|
const React$1 = _dll_react;
|
|
5
5
|
const PropTypes = _dll_prop_types;
|
|
6
6
|
const {Typography: Typography} = _dll_material_ui__core;
|
|
@@ -57,7 +57,6 @@ class Main extends React$1.Component {
|
|
|
57
57
|
const {width, height} = dimensions || ({});
|
|
58
58
|
const maxHeight = '40vh';
|
|
59
59
|
const toolbarOpts = {};
|
|
60
|
-
console.log(spellCheckEnabled, "spellcheck");
|
|
61
60
|
log$1('[render] disabled? ', disabled);
|
|
62
61
|
const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
|
|
63
62
|
defaultClassName: "teacher-instructions",
|
|
@@ -65,7 +64,7 @@ class Main extends React$1.Component {
|
|
|
65
64
|
__self: this,
|
|
66
65
|
__source: {
|
|
67
66
|
fileName: _jsxFileName,
|
|
68
|
-
lineNumber:
|
|
67
|
+
lineNumber: 54
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
switch (playersToolbarPosition) {
|
|
@@ -84,13 +83,13 @@ class Main extends React$1.Component {
|
|
|
84
83
|
__self: this,
|
|
85
84
|
__source: {
|
|
86
85
|
fileName: _jsxFileName,
|
|
87
|
-
lineNumber:
|
|
86
|
+
lineNumber: 66
|
|
88
87
|
}
|
|
89
88
|
}, teacherInstructions && React$1.createElement('div', {
|
|
90
89
|
__self: this,
|
|
91
90
|
__source: {
|
|
92
91
|
fileName: _jsxFileName,
|
|
93
|
-
lineNumber:
|
|
92
|
+
lineNumber: 74
|
|
94
93
|
}
|
|
95
94
|
}, !animationsDisabled ? React$1.createElement(Collapsible, {
|
|
96
95
|
labels: {
|
|
@@ -101,20 +100,21 @@ class Main extends React$1.Component {
|
|
|
101
100
|
__self: this,
|
|
102
101
|
__source: {
|
|
103
102
|
fileName: _jsxFileName,
|
|
104
|
-
lineNumber:
|
|
103
|
+
lineNumber: 76
|
|
105
104
|
}
|
|
106
105
|
}, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
|
|
107
106
|
__self: this,
|
|
108
107
|
__source: {
|
|
109
108
|
fileName: _jsxFileName,
|
|
110
|
-
lineNumber:
|
|
109
|
+
lineNumber: 83
|
|
111
110
|
}
|
|
112
111
|
})), model.prompt && React$1.createElement(Typography, {
|
|
112
|
+
component: 'span',
|
|
113
113
|
className: classes.prompt,
|
|
114
114
|
__self: this,
|
|
115
115
|
__source: {
|
|
116
116
|
fileName: _jsxFileName,
|
|
117
|
-
lineNumber:
|
|
117
|
+
lineNumber: 88
|
|
118
118
|
}
|
|
119
119
|
}, React$1.createElement(PreviewPrompt, {
|
|
120
120
|
defaultClassName: "prompt",
|
|
@@ -122,7 +122,7 @@ class Main extends React$1.Component {
|
|
|
122
122
|
__self: this,
|
|
123
123
|
__source: {
|
|
124
124
|
fileName: _jsxFileName,
|
|
125
|
-
lineNumber:
|
|
125
|
+
lineNumber: 92
|
|
126
126
|
}
|
|
127
127
|
})), React$1.createElement(EditableHTML, {
|
|
128
128
|
className: "response-area-editor",
|
|
@@ -152,19 +152,19 @@ class Main extends React$1.Component {
|
|
|
152
152
|
__self: this,
|
|
153
153
|
__source: {
|
|
154
154
|
fileName: _jsxFileName,
|
|
155
|
-
lineNumber:
|
|
155
|
+
lineNumber: 95
|
|
156
156
|
}
|
|
157
157
|
}), feedback && React$1.createElement('div', {
|
|
158
158
|
__self: this,
|
|
159
159
|
__source: {
|
|
160
160
|
fileName: _jsxFileName,
|
|
161
|
-
lineNumber:
|
|
161
|
+
lineNumber: 122
|
|
162
162
|
}
|
|
163
163
|
}, React$1.createElement('br', {
|
|
164
164
|
__self: this,
|
|
165
165
|
__source: {
|
|
166
166
|
fileName: _jsxFileName,
|
|
167
|
-
lineNumber:
|
|
167
|
+
lineNumber: 123
|
|
168
168
|
}
|
|
169
169
|
}), React$1.createElement(Feedback, {
|
|
170
170
|
correctness: "correct",
|
|
@@ -172,7 +172,7 @@ class Main extends React$1.Component {
|
|
|
172
172
|
__self: this,
|
|
173
173
|
__source: {
|
|
174
174
|
fileName: _jsxFileName,
|
|
175
|
-
lineNumber:
|
|
175
|
+
lineNumber: 124
|
|
176
176
|
}
|
|
177
177
|
})));
|
|
178
178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "^16.8.1",
|
|
23
23
|
"react-dom": "^16.8.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "92cd24e6736b2eed8f82ac44ba775ad4f2080ade",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"postpublish": "../../scripts/postpublish"
|
|
28
28
|
},
|