@pie-element/ebsr 14.3.2-beta.4 → 14.3.2-beta.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.
@@ -1,222 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Main = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
- var _configUi = require("@pie-lib/config-ui");
12
- var _styles = require("@mui/material/styles");
13
- const {
14
- Panel,
15
- toggle,
16
- radio,
17
- dropdown
18
- } = _configUi.settings;
19
- const PartLabel = (0, _styles.styled)('div')(({
20
- theme
21
- }) => ({
22
- paddingBottom: theme.spacing(2)
23
- }));
24
- const Divider = (0, _styles.styled)('div')(({
25
- theme
26
- }) => ({
27
- flex: 1,
28
- height: theme.spacing(2.5)
29
- }));
30
- class Main extends _react.default.Component {
31
- constructor(...args) {
32
- super(...args);
33
- (0, _defineProperty2.default)(this, "removeExtraChoices", choices => {
34
- let correctFound = false;
35
- return (choices || []).map(choice => {
36
- if (correctFound) {
37
- choice.correct = false;
38
- return choice;
39
- }
40
- if (choice.correct) {
41
- correctFound = true;
42
- }
43
- return choice;
44
- });
45
- });
46
- (0, _defineProperty2.default)(this, "onModelChanged", (model, key) => {
47
- const {
48
- onModelChanged
49
- } = this.props;
50
- if (key === 'partA.choiceMode' && model.partA.choiceMode === 'radio') {
51
- model.partA.choices = this.removeExtraChoices(model.partA.choices);
52
- return onModelChanged(model, true);
53
- }
54
- if (key === 'partB.choiceMode' && model.partB.choiceMode === 'radio') {
55
- model.partB.choices = this.removeExtraChoices(model.partB.choices);
56
- return onModelChanged(model, true);
57
- }
58
- return onModelChanged(model);
59
- });
60
- }
61
- render() {
62
- const {
63
- model,
64
- configuration,
65
- onConfigurationChanged
66
- } = this.props;
67
- const {
68
- partLabelType,
69
- partA: modelPartA,
70
- partB: modelPartB,
71
- extraCSSRules
72
- } = model;
73
- const {
74
- contentDimensions = {},
75
- partA = {},
76
- partB = {},
77
- partialScoring = {},
78
- settingsPanelDisabled,
79
- scoringType = {},
80
- language = {},
81
- languageChoices = {},
82
- ...generalConfiguration
83
- } = configuration;
84
- const {
85
- feedback: feedbackA = {},
86
- choiceMode: choiceModeA = {},
87
- choicePrefix: choicePrefixA = {},
88
- lockChoiceOrder: lockChoiceOrderA = {},
89
- prompt: promptA = {},
90
- teacherInstructions: teacherInstructionsA = {},
91
- studentInstructions: studentInstructionsA = {},
92
- choicesLayout: choicesLayoutA = {},
93
- gridColumns: gridColumnsA = {},
94
- rationale: rationaleA = {},
95
- spellCheck: spellCheckA = {}
96
- } = partA || {};
97
- const {
98
- feedback: feedbackB = {},
99
- choiceMode: choiceModeB = {},
100
- choicePrefix: choicePrefixB = {},
101
- lockChoiceOrder: lockChoiceOrderB = {},
102
- prompt: promptB = {},
103
- teacherInstructions: teacherInstructionsB = {},
104
- studentInstructions: studentInstructionsB = {},
105
- choicesLayout: choicesLayoutB = {},
106
- gridColumns: gridColumnsB = {},
107
- rationale: rationaleB = {},
108
- spellCheck: spellCheckB = {}
109
- } = partB || {};
110
- const type = partLabelType || 'Numbers';
111
- const typeIsNumber = type === 'Numbers';
112
- const firstPart = `Part ${typeIsNumber ? '1' : 'A'}`;
113
- const secondPart = `Part ${typeIsNumber ? '2' : 'B'}`;
114
- const nrOfColumnsAvailable = {
115
- partA: modelPartA.choices && modelPartA.choices.length ? Array.from({
116
- length: modelPartA.choices.length
117
- }, (_, i) => `${i + 1}`) : [],
118
- partB: modelPartB.choices && modelPartB.choices.length ? Array.from({
119
- length: modelPartB.choices.length
120
- }, (_, i) => `${i + 1}`) : []
121
- };
122
- const panelSettings = {
123
- partLabels: generalConfiguration.partLabels.settings && toggle(generalConfiguration.partLabels.label),
124
- partLabelType: model.partLabels && dropdown('', ['Numbers', 'Letters']),
125
- partialScoring: partialScoring.settings && toggle(partialScoring.label),
126
- scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),
127
- 'language.enabled': language.settings && toggle(language.label, true),
128
- language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
129
- };
130
- const panelSettingsPartA = {
131
- 'partA.choiceMode': choiceModeA.settings && radio(choiceModeA.label, ['checkbox', 'radio']),
132
- 'partA.choicePrefix': choicePrefixA.settings && radio(choicePrefixA.label, ['numbers', 'letters']),
133
- 'partA.lockChoiceOrder': lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),
134
- 'partA.choicesLayout': choicesLayoutA.settings && dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),
135
- 'partA.gridColumns': choicesLayoutA.settings && modelPartA.choicesLayout === 'grid' && nrOfColumnsAvailable.partA.length > 0 && dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA)
136
- };
137
- const panelPropertiesPartA = {
138
- 'partA.feedbackEnabled': feedbackA.settings && toggle(feedbackA.label),
139
- 'partA.promptEnabled': promptA.settings && toggle(promptA.label),
140
- 'partA.teacherInstructionsEnabled': teacherInstructionsA.settings && toggle(teacherInstructionsA.label),
141
- 'partA.studentInstructionsEnabled': studentInstructionsA.settings && toggle(studentInstructionsA.label),
142
- 'partA.rationaleEnabled': rationaleA.settings && toggle(rationaleA.label),
143
- 'partA.spellCheckEnabled': spellCheckA.settings && toggle(spellCheckA.label)
144
- };
145
- const panelSettingsPartB = {
146
- 'partB.choiceMode': choiceModeB.settings && radio(choiceModeB.label, ['checkbox', 'radio']),
147
- 'partB.choicePrefix': choicePrefixB.settings && radio(choicePrefixB.label, ['numbers', 'letters']),
148
- 'partB.lockChoiceOrder': lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),
149
- 'partB.choicesLayout': choicesLayoutB.settings && dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),
150
- 'partB.gridColumns': choicesLayoutB.settings && modelPartB.choicesLayout === 'grid' && nrOfColumnsAvailable.partB.length > 0 && dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB)
151
- };
152
- const panelPropertiesPartB = {
153
- 'partB.feedbackEnabled': feedbackB.settings && toggle(feedbackB.label),
154
- 'partB.promptEnabled': promptB.settings && toggle(promptB.label),
155
- 'partB.teacherInstructionsEnabled': teacherInstructionsB.settings && toggle(teacherInstructionsB.label),
156
- 'partB.studentInstructionsEnabled': studentInstructionsB.settings && toggle(studentInstructionsB.label),
157
- 'partB.rationaleEnabled': rationaleB.settings && toggle(rationaleB.label),
158
- 'partB.spellCheckEnabled': spellCheckB.settings && toggle(spellCheckB.label)
159
- };
160
- return /*#__PURE__*/_react.default.createElement(_configUi.layout.ConfigLayout, {
161
- extraCSSRules: extraCSSRules,
162
- dimensions: contentDimensions,
163
- hideSettings: settingsPanelDisabled,
164
- settings: /*#__PURE__*/_react.default.createElement(Panel, {
165
- model: model,
166
- onChangeModel: this.onModelChanged,
167
- configuration: configuration,
168
- onChangeConfiguration: onConfigurationChanged,
169
- groups: {
170
- 'Settings for both': panelSettings,
171
- [`Settings ${firstPart}`]: panelSettingsPartA,
172
- [`Properties ${firstPart}`]: panelPropertiesPartA,
173
- [`Settings ${secondPart}`]: panelSettingsPartB,
174
- [`Properties ${secondPart}`]: panelPropertiesPartB
175
- }
176
- })
177
- }, model.partLabels && /*#__PURE__*/_react.default.createElement(PartLabel, null, firstPart), /*#__PURE__*/_react.default.createElement("ebsr-multiple-choice-configure", {
178
- id: "A",
179
- key: "partA",
180
- ref: ref => {
181
- if (ref) {
182
- // do not use destructuring to get model from props
183
- this.partA = ref;
184
- this.partA._model = {
185
- ...this.props.model.partA,
186
- errors: this.props.model.errors && this.props.model.errors.partA || {}
187
- };
188
- this.partA.configuration = {
189
- ...partA,
190
- ...generalConfiguration
191
- };
192
- }
193
- }
194
- }), /*#__PURE__*/_react.default.createElement(Divider, null), model.partLabels && /*#__PURE__*/_react.default.createElement(PartLabel, null, secondPart), /*#__PURE__*/_react.default.createElement("ebsr-multiple-choice-configure", {
195
- id: "B",
196
- key: "partB",
197
- ref: ref => {
198
- if (ref) {
199
- // do not use destructuring to get model from props
200
- this.partB = ref;
201
- this.partB._model = {
202
- ...this.props.model.partB,
203
- errors: this.props.model.errors && this.props.model.errors.partB || {}
204
- };
205
- this.partB.configuration = {
206
- ...partB,
207
- ...generalConfiguration
208
- };
209
- }
210
- }
211
- }));
212
- }
213
- }
214
- exports.Main = Main;
215
- (0, _defineProperty2.default)(Main, "propTypes", {
216
- configuration: _propTypes.default.object,
217
- model: _propTypes.default.object,
218
- onModelChanged: _propTypes.default.func,
219
- onConfigurationChanged: _propTypes.default.func
220
- });
221
- var _default = exports.default = Main;
222
- //# sourceMappingURL=main.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_propTypes","_configUi","_styles","Panel","toggle","radio","dropdown","settings","PartLabel","styled","theme","paddingBottom","spacing","Divider","flex","height","Main","React","Component","constructor","args","_defineProperty2","default","choices","correctFound","map","choice","correct","model","key","onModelChanged","props","partA","choiceMode","removeExtraChoices","partB","render","configuration","onConfigurationChanged","partLabelType","modelPartA","modelPartB","extraCSSRules","contentDimensions","partialScoring","settingsPanelDisabled","scoringType","language","languageChoices","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","panelSettings","partLabels","label","enabled","options","panelSettingsPartA","panelPropertiesPartA","panelSettingsPartB","panelPropertiesPartB","createElement","layout","ConfigLayout","dimensions","hideSettings","onChangeModel","onChangeConfiguration","groups","id","ref","_model","errors","exports","PropTypes","object","func","_default"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { settings, layout } from '@pie-lib/config-ui';\nimport { styled } from '@mui/material/styles';\n\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst PartLabel = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n}));\n\nconst Divider = styled('div')(({ theme }) => ({\n flex: 1,\n height: theme.spacing(2.5),\n}));\n\nexport class Main extends React.Component {\n static propTypes = {\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\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 { model, configuration, onConfigurationChanged } = this.props;\n const { partLabelType, partA: modelPartA, partB: modelPartB, extraCSSRules } = model;\n const {\n contentDimensions = {},\n partA = {},\n partB = {},\n partialScoring = {},\n settingsPanelDisabled,\n scoringType = {},\n language = {},\n languageChoices = {},\n ...generalConfiguration\n } = 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\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:\n modelPartA.choices && modelPartA.choices.length\n ? Array.from({ length: modelPartA.choices.length }, (_, i) => `${i + 1}`)\n : [],\n partB:\n modelPartB.choices && modelPartB.choices.length\n ? Array.from({ length: modelPartB.choices.length }, (_, i) => `${i + 1}`)\n : [],\n };\n\n const panelSettings = {\n partLabels: generalConfiguration.partLabels.settings && toggle(generalConfiguration.partLabels.label),\n partLabelType: model.partLabels && dropdown('', ['Numbers', 'Letters']),\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const panelSettingsPartA = {\n 'partA.choiceMode': choiceModeA.settings && radio(choiceModeA.label, ['checkbox', 'radio']),\n 'partA.choicePrefix': choicePrefixA.settings && radio(choicePrefixA.label, ['numbers', 'letters']),\n 'partA.lockChoiceOrder': lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),\n 'partA.choicesLayout':\n choicesLayoutA.settings && dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),\n 'partA.gridColumns':\n choicesLayoutA.settings &&\n modelPartA.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partA.length > 0 &&\n dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA),\n };\n const panelPropertiesPartA = {\n 'partA.feedbackEnabled': feedbackA.settings && toggle(feedbackA.label),\n 'partA.promptEnabled': promptA.settings && toggle(promptA.label),\n 'partA.teacherInstructionsEnabled': teacherInstructionsA.settings && toggle(teacherInstructionsA.label),\n 'partA.studentInstructionsEnabled': studentInstructionsA.settings && toggle(studentInstructionsA.label),\n 'partA.rationaleEnabled': rationaleA.settings && toggle(rationaleA.label),\n 'partA.spellCheckEnabled': spellCheckA.settings && toggle(spellCheckA.label),\n };\n\n const panelSettingsPartB = {\n 'partB.choiceMode': choiceModeB.settings && radio(choiceModeB.label, ['checkbox', 'radio']),\n 'partB.choicePrefix': choicePrefixB.settings && radio(choicePrefixB.label, ['numbers', 'letters']),\n 'partB.lockChoiceOrder': lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),\n 'partB.choicesLayout':\n choicesLayoutB.settings && dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),\n 'partB.gridColumns':\n choicesLayoutB.settings &&\n modelPartB.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.partB.length > 0 &&\n dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB),\n };\n const panelPropertiesPartB = {\n 'partB.feedbackEnabled': feedbackB.settings && toggle(feedbackB.label),\n 'partB.promptEnabled': promptB.settings && toggle(promptB.label),\n 'partB.teacherInstructionsEnabled': teacherInstructionsB.settings && toggle(teacherInstructionsB.label),\n 'partB.studentInstructionsEnabled': studentInstructionsB.settings && toggle(studentInstructionsB.label),\n 'partB.rationaleEnabled': rationaleB.settings && toggle(rationaleB.label),\n 'partB.spellCheckEnabled': spellCheckB.settings && toggle(spellCheckB.label),\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n 'Settings for both': panelSettings,\n [`Settings ${firstPart}`]: panelSettingsPartA,\n [`Properties ${firstPart}`]: panelPropertiesPartA,\n [`Settings ${secondPart}`]: panelSettingsPartB,\n [`Properties ${secondPart}`]: panelPropertiesPartB,\n }}\n />\n }\n >\n {model.partLabels && <PartLabel>{firstPart}</PartLabel>}\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\n <Divider />\n\n {model.partLabels && <PartLabel>{secondPart}</PartLabel>}\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 </layout.ConfigLayout>\n );\n }\n}\n\nexport default Main;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,MAAM;EAAEI,KAAK;EAAEC,MAAM;EAAEC,KAAK;EAAEC;AAAS,CAAC,GAAGC,kBAAQ;AAEnD,MAAMC,SAAS,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC9CC,aAAa,EAAED,KAAK,CAACE,OAAO,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;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,OAAA,CAAA+E,aAAA;MACEQ,EAAE,EAAC,GAAG;MACNhF,GAAG,EAAC,OAAO;MACXiF,GAAG,EAAGA,GAAG,IAAK;QACZ,IAAIA,GAAG,EAAE;UACP;UACA,IAAI,CAAC3E,KAAK,GAAG2E,GAAG;UAChB,IAAI,CAAC3E,KAAK,CAAC4E,MAAM,GAAG;YAClB,GAAG,IAAI,CAAChF,KAAK,CAACH,KAAK,CAACO,KAAK;YACzB6E,MAAM,EAAG,IAAI,CAACjF,KAAK,CAACH,KAAK,CAACoF,MAAM,IAAI,IAAI,CAACjF,KAAK,CAACH,KAAK,CAACoF,MAAM,CAAC7E,KAAK,IAAK,CAAC;UACzE,CAAC;UACD,IAAI,CAACA,KAAK,CAACE,aAAa,GAAG;YACzB,GAAGF,KAAK;YACR,GAAGc;UACL,CAAC;QACH;MACF;IAAE,CACH,CACkB,CAAC;EAE1B;AACF;AAACgE,OAAA,CAAAjG,IAAA,GAAAA,IAAA;AAAA,IAAAK,gBAAA,CAAAC,OAAA,EAxNYN,IAAI,eACI;EACjBqB,aAAa,EAAE6E,kBAAS,CAACC,MAAM;EAC/BvF,KAAK,EAAEsF,kBAAS,CAACC,MAAM;EACvBrF,cAAc,EAAEoF,kBAAS,CAACE,IAAI;EAC9B9E,sBAAsB,EAAE4E,kBAAS,CAACE;AACpC,CAAC;AAAA,IAAAC,QAAA,GAAAJ,OAAA,CAAA3F,OAAA,GAoNYN,IAAI","ignoreList":[]}
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const partModel = base => ({
8
- choiceMode: 'radio',
9
- choicePrefix: 'letters',
10
- choices: [],
11
- choicesLayout: 'vertical',
12
- feedbackEnabled: false,
13
- gridColumns: 2,
14
- prompt: '',
15
- promptEnabled: true,
16
- rationale: '',
17
- rationaleEnabled: true,
18
- spellCheckEnabled: true,
19
- studentInstructionsEnabled: true,
20
- teacherInstructions: '',
21
- teacherInstructionsEnabled: true,
22
- toolbarEditorPosition: 'bottom',
23
- ...base
24
- });
25
- var _default = exports.default = {
26
- partLabels: true,
27
- partLabelType: 'Letters',
28
- partA: partModel(),
29
- partB: partModel()
30
- };
31
- //# sourceMappingURL=defaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.js","names":["partModel","base","choiceMode","choicePrefix","choices","choicesLayout","feedbackEnabled","gridColumns","prompt","promptEnabled","rationale","rationaleEnabled","spellCheckEnabled","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","_default","exports","default","partLabels","partLabelType","partA","partB"],"sources":["../src/defaults.js"],"sourcesContent":["const partModel = (base) => ({\n choiceMode: 'radio',\n choicePrefix: 'letters',\n choices: [],\n choicesLayout: 'vertical',\n feedbackEnabled: false,\n gridColumns: 2,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n spellCheckEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n ...base,\n});\n\nexport default {\n partLabels: true,\n partLabelType: 'Letters',\n partA: partModel(),\n partB: partModel(),\n};\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAIC,IAAI,KAAM;EAC3BC,UAAU,EAAE,OAAO;EACnBC,YAAY,EAAE,SAAS;EACvBC,OAAO,EAAE,EAAE;EACXC,aAAa,EAAE,UAAU;EACzBC,eAAe,EAAE,KAAK;EACtBC,WAAW,EAAE,CAAC;EACdC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,iBAAiB,EAAE,IAAI;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,qBAAqB,EAAE,QAAQ;EAC/B,GAAGf;AACL,CAAC,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEY;EACbC,UAAU,EAAE,IAAI;EAChBC,aAAa,EAAE,SAAS;EACxBC,KAAK,EAAEtB,SAAS,CAAC,CAAC;EAClBuB,KAAK,EAAEvB,SAAS,CAAC;AACnB,CAAC","ignoreList":[]}