@pie-element/multiple-choice 6.2.7 → 6.3.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.
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_lodash, _dll_pie_lib__render_ui, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.10/module/index.js";
2
- import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.33/module/index.js";
3
- import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.9/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_lodash, _dll_material_ui__icons, _dll_pie_lib__render_ui, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.17/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.2.4/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.5.4/module/index.js";
4
4
  var lib = {};
5
5
  Object.defineProperty(lib, "__esModule", {
6
6
  value: true
@@ -46,6 +46,13 @@ class InsertImageEvent extends CustomEvent {
46
46
  }
47
47
  InsertImageEvent.TYPE = 'insert.image';
48
48
  var InsertImageEvent_1 = lib.InsertImageEvent = InsertImageEvent;
49
+ const generateValidationMessage = config => {
50
+ const {minAnswerChoices, maxAnswerChoices} = config;
51
+ const answerChoicesMessage = `\nThere should be at least ${minAnswerChoices} ` + (maxAnswerChoices ? `and at most ${maxAnswerChoices} ` : '') + 'answer choices defined.' + '\nEvery answer choice should be non-blank and unique.';
52
+ const correctAnswerMessage = '\nA correct answer must be defined.';
53
+ const message = 'Validation requirements:' + answerChoicesMessage + correctAnswerMessage;
54
+ return message;
55
+ };
49
56
  const React$1 = _dll_react;
50
57
  const PropTypes = _dll_prop_types;
51
58
  const {color: color} = _dll_pie_lib__render_ui;
@@ -55,7 +62,9 @@ const {Tooltip: Tooltip} = _dll_material_ui__core;
55
62
  const {Dialog: Dialog} = _dll_material_ui__core;
56
63
  const {DialogTitle: DialogTitle} = _dll_material_ui__core;
57
64
  const {DialogActions: DialogActions} = _dll_material_ui__core;
65
+ const {Typography: Typography} = _dll_material_ui__core;
58
66
  const {merge: merge} = _dll_lodash;
67
+ const {Info: Info} = _dll_material_ui__icons;
59
68
  const EditableHtml = _dll_pie_lib__editable_html;
60
69
  const {InputContainer: InputContainer} = _dll_pie_lib__config_ui;
61
70
  const {ChoiceConfiguration: ChoiceConfiguration} = _dll_pie_lib__config_ui;
@@ -120,15 +129,15 @@ const styles = theme => ({
120
129
  },
121
130
  flexContainer: {
122
131
  display: 'flex',
123
- alignItems: 'center'
132
+ alignItems: 'center',
133
+ marginBottom: '5px'
124
134
  },
125
135
  titleText: {
126
136
  fontFamily: 'Cerebri Sans',
127
137
  fontSize: '18px',
128
138
  lineHeight: '19px',
129
139
  color: '#495B8F',
130
- marginRight: '5px',
131
- marginBottom: '5px'
140
+ marginRight: '5px'
132
141
  },
133
142
  tooltip: {
134
143
  fontSize: '12px',
@@ -145,7 +154,8 @@ const Design = withStyles(styles)(props => {
145
154
  const {classes, model, configuration, onPromptChanged, onChoiceChanged, onRemoveChoice, onAddChoice, imageSupport, onChangeModel, onConfigurationChanged, onTeacherInstructionsChanged} = props;
146
155
  const {prompt = {}, addChoiceButton = {}, feedback = {}, deleteChoice = {}, choiceMode = {}, choicePrefix = {}, partialScoring = {}, lockChoiceOrder = {}, teacherInstructions = {}, studentInstructions = {}, rationale = {}, accessibility = {}, scoringType = {}, sequentialChoiceLabels = {}, settingsPanelDisabled, choicesLayout, spellCheck = {}, gridColumns} = configuration || ({});
147
156
  let {maxAnswerChoices} = configuration || ({});
148
- const {limitChoicesNumber, teacherInstructionsEnabled, rationaleEnabled, accessibilityLabelsEnabled, feedbackEnabled, promptEnabled, spellCheckEnabled, choices} = model || ({});
157
+ const {limitChoicesNumber, teacherInstructionsEnabled, rationaleEnabled, accessibilityLabelsEnabled, feedbackEnabled, promptEnabled, spellCheckEnabled, choices, errors} = model || ({});
158
+ const {choicesErrors, correctResponseError, answerChoicesError} = errors || ({});
149
159
  const nrOfColumnsAvailable = choices && choices.length ? Array.from({
150
160
  length: choices.length
151
161
  }, (_, i) => `${i + 1}`) : [];
@@ -169,11 +179,12 @@ const Design = withStyles(styles)(props => {
169
179
  if (limitChoicesNumber) {
170
180
  maxAnswerChoices = MAX_CHOICES;
171
181
  }
182
+ const validationMessage = generateValidationMessage(configuration);
172
183
  const Content = React$1.createElement('div', {
173
184
  __self: undefined,
174
185
  __source: {
175
186
  fileName: _jsxFileName,
176
- lineNumber: 178
187
+ lineNumber: 180
177
188
  }
178
189
  }, teacherInstructionsEnabled && React$1.createElement(InputContainer, {
179
190
  label: teacherInstructions.label,
@@ -181,7 +192,7 @@ const Design = withStyles(styles)(props => {
181
192
  __self: undefined,
182
193
  __source: {
183
194
  fileName: _jsxFileName,
184
- lineNumber: 180
195
+ lineNumber: 182
185
196
  }
186
197
  }, React$1.createElement(EditableHtml, {
187
198
  className: classes.prompt,
@@ -194,7 +205,7 @@ const Design = withStyles(styles)(props => {
194
205
  __self: undefined,
195
206
  __source: {
196
207
  fileName: _jsxFileName,
197
- lineNumber: 184
208
+ lineNumber: 186
198
209
  }
199
210
  })), promptEnabled && React$1.createElement(InputContainer, {
200
211
  label: prompt.label,
@@ -202,7 +213,7 @@ const Design = withStyles(styles)(props => {
202
213
  __self: undefined,
203
214
  __source: {
204
215
  fileName: _jsxFileName,
205
- lineNumber: 197
216
+ lineNumber: 199
206
217
  }
207
218
  }, React$1.createElement(EditableHtml, {
208
219
  className: classes.prompt,
@@ -216,15 +227,64 @@ const Design = withStyles(styles)(props => {
216
227
  __self: undefined,
217
228
  __source: {
218
229
  fileName: _jsxFileName,
219
- lineNumber: 198
230
+ lineNumber: 200
231
+ }
232
+ })), React$1.createElement('div', {
233
+ className: classes.flexContainer,
234
+ __self: undefined,
235
+ __source: {
236
+ fileName: _jsxFileName,
237
+ lineNumber: 212
238
+ }
239
+ }, React$1.createElement(Typography, {
240
+ className: classes.titleText,
241
+ __self: undefined,
242
+ __source: {
243
+ fileName: _jsxFileName,
244
+ lineNumber: 213
245
+ }
246
+ }, "Choices"), React$1.createElement(Tooltip, {
247
+ classes: {
248
+ tooltip: classes.tooltip
249
+ },
250
+ disableFocusListener: true,
251
+ disableTouchListener: true,
252
+ placement: 'right',
253
+ title: validationMessage,
254
+ __self: undefined,
255
+ __source: {
256
+ fileName: _jsxFileName,
257
+ lineNumber: 214
258
+ }
259
+ }, React$1.createElement(Info, {
260
+ fontSize: 'small',
261
+ color: 'primary',
262
+ __self: undefined,
263
+ __source: {
264
+ fileName: _jsxFileName,
265
+ lineNumber: 221
266
+ }
267
+ }))), correctResponseError && React$1.createElement('div', {
268
+ className: classes.errorText,
269
+ __self: undefined,
270
+ __source: {
271
+ fileName: _jsxFileName,
272
+ lineNumber: 224
273
+ }
274
+ }, correctResponseError), answerChoicesError && React$1.createElement('div', {
275
+ className: classes.errorText,
276
+ __self: undefined,
277
+ __source: {
278
+ fileName: _jsxFileName,
279
+ lineNumber: 225
220
280
  }
221
- })), choices.map((choice, index) => React$1.createElement('div', {
281
+ }, answerChoicesError), choices.map((choice, index) => React$1.createElement('div', {
222
282
  key: `choice-${index}`,
223
283
  className: classes.choiceConfigurationHolder,
224
284
  __self: undefined,
225
285
  __source: {
226
286
  fileName: _jsxFileName,
227
- lineNumber: 225
287
+ lineNumber: 227
228
288
  }
229
289
  }, React$1.createElement(ChoiceConfiguration, {
230
290
  key: index,
@@ -242,10 +302,12 @@ const Design = withStyles(styles)(props => {
242
302
  noLabels: true,
243
303
  toolbarOpts: toolbarOpts,
244
304
  spellCheck: spellCheckEnabled,
305
+ error: choicesErrors && choicesErrors[choice.value] ? choicesErrors[choice.value] : null,
306
+ noCorrectAnswerError: correctResponseError,
245
307
  __self: undefined,
246
308
  __source: {
247
309
  fileName: _jsxFileName,
248
- lineNumber: 229
310
+ lineNumber: 231
249
311
  }
250
312
  }), rationaleEnabled && React$1.createElement(InputContainer, {
251
313
  key: `rationale-${index}`,
@@ -254,7 +316,7 @@ const Design = withStyles(styles)(props => {
254
316
  __self: undefined,
255
317
  __source: {
256
318
  fileName: _jsxFileName,
257
- lineNumber: 249
319
+ lineNumber: 251
258
320
  }
259
321
  }, React$1.createElement(EditableHtml, {
260
322
  className: classes.rationale,
@@ -270,7 +332,7 @@ const Design = withStyles(styles)(props => {
270
332
  __self: undefined,
271
333
  __source: {
272
334
  fileName: _jsxFileName,
273
- lineNumber: 254
335
+ lineNumber: 256
274
336
  }
275
337
  })), accessibilityLabelsEnabled && React$1.createElement(InputContainer, {
276
338
  key: `accessibility-${index}`,
@@ -279,7 +341,7 @@ const Design = withStyles(styles)(props => {
279
341
  __self: undefined,
280
342
  __source: {
281
343
  fileName: _jsxFileName,
282
- lineNumber: 271
344
+ lineNumber: 273
283
345
  }
284
346
  }, React$1.createElement(EditableHtml, {
285
347
  className: classes.accessibility,
@@ -294,13 +356,13 @@ const Design = withStyles(styles)(props => {
294
356
  __self: undefined,
295
357
  __source: {
296
358
  fileName: _jsxFileName,
297
- lineNumber: 276
359
+ lineNumber: 278
298
360
  }
299
361
  })))), React$1.createElement('br', {
300
362
  __self: undefined,
301
363
  __source: {
302
364
  fileName: _jsxFileName,
303
- lineNumber: 293
365
+ lineNumber: 295
304
366
  }
305
367
  }), addChoiceButton.settings && React$1.createElement(Tooltip, {
306
368
  title: maxAnswerChoices && model.choices.length >= maxAnswerChoices ? `Only ${maxAnswerChoices} allowed maximum` : '',
@@ -310,11 +372,11 @@ const Design = withStyles(styles)(props => {
310
372
  __self: undefined,
311
373
  __source: {
312
374
  fileName: _jsxFileName,
313
- lineNumber: 295
375
+ lineNumber: 297
314
376
  }
315
377
  }, React$1.createElement(Button, {
316
378
  classes: {
317
- root: maxAnswerChoices && model.choices.length >= maxAnswerChoices ? classes.disableButton : undefined
379
+ root: maxAnswerChoices && model.choices.length >= maxAnswerChoices && classes.disableButton
318
380
  },
319
381
  className: classes.addButton,
320
382
  variant: "contained",
@@ -323,7 +385,7 @@ const Design = withStyles(styles)(props => {
323
385
  __self: undefined,
324
386
  __source: {
325
387
  fileName: _jsxFileName,
326
- lineNumber: 303
388
+ lineNumber: 305
327
389
  }
328
390
  }, addChoiceButton.label)));
329
391
  const settingsInPanel = {
@@ -341,7 +403,7 @@ const Design = withStyles(styles)(props => {
341
403
  __self: undefined,
342
404
  __source: {
343
405
  fileName: _jsxFileName,
344
- lineNumber: 345
406
+ lineNumber: 342
345
407
  }
346
408
  }, settingsPanelDisabled ? Content : React$1.createElement(layout.ConfigLayout, {
347
409
  settings: React$1.createElement(Panel, {
@@ -364,13 +426,13 @@ const Design = withStyles(styles)(props => {
364
426
  __self: undefined,
365
427
  __source: {
366
428
  fileName: _jsxFileName,
367
- lineNumber: 351
429
+ lineNumber: 348
368
430
  }
369
431
  }),
370
432
  __self: undefined,
371
433
  __source: {
372
434
  fileName: _jsxFileName,
373
- lineNumber: 349
435
+ lineNumber: 346
374
436
  }
375
437
  }, Content));
376
438
  });
@@ -379,19 +441,19 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
379
441
  __self: undefined,
380
442
  __source: {
381
443
  fileName: _jsxFileName,
382
- lineNumber: 388
444
+ lineNumber: 385
383
445
  }
384
446
  }, React$1.createElement(DialogTitle, {
385
447
  __self: undefined,
386
448
  __source: {
387
449
  fileName: _jsxFileName,
388
- lineNumber: 389
450
+ lineNumber: 386
389
451
  }
390
452
  }, title), React$1.createElement(DialogActions, {
391
453
  __self: undefined,
392
454
  __source: {
393
455
  fileName: _jsxFileName,
394
- lineNumber: 390
456
+ lineNumber: 387
395
457
  }
396
458
  }, onOk && React$1.createElement(Button, {
397
459
  onClick: onOk,
@@ -399,7 +461,7 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
399
461
  __self: undefined,
400
462
  __source: {
401
463
  fileName: _jsxFileName,
402
- lineNumber: 392
464
+ lineNumber: 389
403
465
  }
404
466
  }, "OK"), onCancel && React$1.createElement(Button, {
405
467
  onClick: onCancel,
@@ -407,7 +469,7 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
407
469
  __self: undefined,
408
470
  __source: {
409
471
  fileName: _jsxFileName,
410
- lineNumber: 397
472
+ lineNumber: 394
411
473
  }
412
474
  }, "Cancel")));
413
475
  InfoDialog.propTypes = {
@@ -463,12 +525,7 @@ class Main extends React$1.Component {
463
525
  open: false
464
526
  }
465
527
  });
466
- },
467
- onCancel: () => this.setState({
468
- dialog: {
469
- open: false
470
- }
471
- })
528
+ }
472
529
  }
473
530
  });
474
531
  } else {
@@ -485,35 +542,17 @@ class Main extends React$1.Component {
485
542
  if (limitChoicesNumber) {
486
543
  maxAnswerChoices = MAX_CHOICES;
487
544
  }
488
- if (maxAnswerChoices && model.choices.length === maxAnswerChoices) {
489
- this.setState({
490
- dialog: {
491
- open: true,
492
- message: `There can't be more than ${maxAnswerChoices} choices.`,
493
- onOk: () => {
494
- this.setState({
495
- dialog: {
496
- open: false
497
- }
498
- });
499
- },
500
- onCancel: () => this.setState({
501
- dialog: {
502
- open: false
503
- }
504
- })
505
- }
506
- });
507
- } else {
508
- model.choices.push({
509
- label: '',
510
- value: utils$1.firstAvailableIndex(model.choices.map(c => c.value), 0),
511
- feedback: {
512
- type: 'none'
513
- }
514
- });
515
- this.props.onModelChanged(model);
545
+ if (maxAnswerChoices && model.choices.length >= maxAnswerChoices) {
546
+ return;
516
547
  }
548
+ model.choices.push({
549
+ label: '',
550
+ value: utils$1.firstAvailableIndex(model.choices.map(c => c.value), 0),
551
+ feedback: {
552
+ type: 'none'
553
+ }
554
+ });
555
+ this.props.onModelChanged(model);
517
556
  };
518
557
  }
519
558
  __init4() {
@@ -585,7 +624,7 @@ class Main extends React$1.Component {
585
624
  __self: this,
586
625
  __source: {
587
626
  fileName: _jsxFileName,
588
- lineNumber: 571
627
+ lineNumber: 542
589
628
  }
590
629
  }), React$1.createElement(Design, {
591
630
  ...this.props,
@@ -598,7 +637,7 @@ class Main extends React$1.Component {
598
637
  __self: this,
599
638
  __source: {
600
639
  fileName: _jsxFileName,
601
- lineNumber: 577
640
+ lineNumber: 548
602
641
  }
603
642
  }));
604
643
  }
@@ -20667,7 +20667,7 @@ const validate = (model = {}, config = {}) => {
20667
20667
  const nbOfChoices = (choices || []).length;
20668
20668
 
20669
20669
  if (nbOfChoices < minAnswerChoices) {
20670
- errors.answerChoicesError = `Should be defined at least ${minAnswerChoices} choices.`;
20670
+ errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;
20671
20671
  } else if (nbOfChoices > maxAnswerChoices) {
20672
20672
  errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;
20673
20673
  }
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_prop_types, _dll_react_dom, _dll_react, _dll_material_ui__core_styles, _dll_pie_lib__render_ui, _dll_material_ui__core, _dll_classnames, _dll_pie_lib__correct_answer_toggle, _dll_lodash, _dll_debug} from "../../../@pie-lib/shared-module@^1.4.10/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.35/module/index.js";
1
+ import {_dll_prop_types, _dll_react_dom, _dll_react, _dll_material_ui__core_styles, _dll_pie_lib__render_ui, _dll_material_ui__core, _dll_classnames, _dll_pie_lib__correct_answer_toggle, _dll_lodash, _dll_debug} from "../../../@pie-lib/shared-module@^1.4.17/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.1.5/module/index.js";
3
3
  function getDefaultExportFromCjs(x) {
4
4
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
5
  }
@@ -1259,6 +1259,7 @@ const {color: color$1} = _dll_pie_lib__render_ui;
1259
1259
  const {PreviewPrompt: PreviewPrompt$1} = _dll_pie_lib__render_ui;
1260
1260
  const classNames$3 = _dll_classnames;
1261
1261
  const _jsxFileName$3 = "/home/circleci/repo/packages/multiple-choice/src/choice-input.jsx";
1262
+ const CLASS_NAME = 'multiple-choice-component';
1262
1263
  const styleSheet = () => ({
1263
1264
  row: {
1264
1265
  display: 'flex',
@@ -1273,6 +1274,11 @@ const styleSheet = () => ({
1273
1274
  '& label': {
1274
1275
  color: color$1.text()
1275
1276
  }
1277
+ },
1278
+ horizontalLayout: {
1279
+ [`& .${CLASS_NAME}`]: {
1280
+ paddingRight: '8px'
1281
+ }
1276
1282
  }
1277
1283
  });
1278
1284
  const formStyleSheet = {
@@ -1291,10 +1297,9 @@ const StyledFormControlLabel = withStyles$3(formStyleSheet, {
1291
1297
  __self: undefined,
1292
1298
  __source: {
1293
1299
  fileName: _jsxFileName$3,
1294
- lineNumber: 39
1300
+ lineNumber: 46
1295
1301
  }
1296
1302
  }));
1297
- const CLASS_NAME = 'multiple-choice-component';
1298
1303
  const colorStyle = (varName, fallback) => ({
1299
1304
  [`&.${CLASS_NAME}`]: {
1300
1305
  color: `var(--choice-input-${varName}, ${fallback}) !important`
@@ -1346,7 +1351,7 @@ const StyledCheckbox = withStyles$3(inputStyles)(props => {
1346
1351
  __self: undefined,
1347
1352
  __source: {
1348
1353
  fileName: _jsxFileName$3,
1349
- lineNumber: 92
1354
+ lineNumber: 97
1350
1355
  }
1351
1356
  });
1352
1357
  });
@@ -1375,7 +1380,7 @@ const StyledRadio = withStyles$3(inputStyles)(props => {
1375
1380
  __self: undefined,
1376
1381
  __source: {
1377
1382
  fileName: _jsxFileName$3,
1378
- lineNumber: 125
1383
+ lineNumber: 130
1379
1384
  }
1380
1385
  });
1381
1386
  });
@@ -1396,7 +1401,8 @@ class ChoiceInput extends React$4.Component {
1396
1401
  classes: PropTypes$3.object,
1397
1402
  className: PropTypes$3.string,
1398
1403
  hideTick: PropTypes$3.bool,
1399
- isEvaluateMode: PropTypes$3.bool
1404
+ isEvaluateMode: PropTypes$3.bool,
1405
+ choicesLayout: PropTypes$3.oneOf(['vertical', 'grid', 'horizontal'])
1400
1406
  };
1401
1407
  }
1402
1408
  static __initStatic2() {
@@ -1418,36 +1424,39 @@ class ChoiceInput extends React$4.Component {
1418
1424
  });
1419
1425
  }
1420
1426
  render() {
1421
- const {choiceMode, disabled, displayKey, feedback, label, checked, correctness, classes, className, rationale, accessibility, hideTick, isEvaluateMode} = this.props;
1427
+ const {choiceMode, disabled, displayKey, feedback, label, checked, correctness, classes, className, rationale, accessibility, hideTick, isEvaluateMode, choicesLayout} = this.props;
1422
1428
  const Tag = choiceMode === 'checkbox' ? StyledCheckbox : StyledRadio;
1423
1429
  const classSuffix = choiceMode === 'checkbox' ? 'checkbox' : 'radio-button';
1430
+ const holderClassNames = classNames$3(classes.checkboxHolder, {
1431
+ [classes.horizontalLayout]: choicesLayout === 'horizontal'
1432
+ });
1424
1433
  return React$4.createElement('div', {
1425
1434
  className: classNames$3(className, 'corespring-' + classSuffix, 'choice-input'),
1426
1435
  __self: this,
1427
1436
  __source: {
1428
1437
  fileName: _jsxFileName$3,
1429
- lineNumber: 197
1438
+ lineNumber: 208
1430
1439
  }
1431
1440
  }, React$4.createElement('div', {
1432
1441
  className: classes.row,
1433
1442
  __self: this,
1434
1443
  __source: {
1435
1444
  fileName: _jsxFileName$3,
1436
- lineNumber: 198
1445
+ lineNumber: 209
1437
1446
  }
1438
1447
  }, !hideTick && isEvaluateMode && React$4.createElement(FeedbackTick$1, {
1439
1448
  correctness: correctness,
1440
1449
  __self: this,
1441
1450
  __source: {
1442
1451
  fileName: _jsxFileName$3,
1443
- lineNumber: 199
1452
+ lineNumber: 210
1444
1453
  }
1445
1454
  }), React$4.createElement('div', {
1446
- className: classNames$3(classes.checkboxHolder, 'checkbox-holder'),
1455
+ className: classNames$3(holderClassNames, 'checkbox-holder'),
1447
1456
  __self: this,
1448
1457
  __source: {
1449
1458
  fileName: _jsxFileName$3,
1450
- lineNumber: 200
1459
+ lineNumber: 211
1451
1460
  }
1452
1461
  }, React$4.createElement(StyledFormControlLabel, {
1453
1462
  disabled: disabled,
@@ -1460,13 +1469,13 @@ class ChoiceInput extends React$4.Component {
1460
1469
  __self: this,
1461
1470
  __source: {
1462
1471
  fileName: _jsxFileName$3,
1463
- lineNumber: 205
1472
+ lineNumber: 216
1464
1473
  }
1465
1474
  }),
1466
1475
  __self: this,
1467
1476
  __source: {
1468
1477
  fileName: _jsxFileName$3,
1469
- lineNumber: 201
1478
+ lineNumber: 212
1470
1479
  }
1471
1480
  }), React$4.createElement(PreviewPrompt$1, {
1472
1481
  className: "label",
@@ -1476,7 +1485,7 @@ class ChoiceInput extends React$4.Component {
1476
1485
  __self: this,
1477
1486
  __source: {
1478
1487
  fileName: _jsxFileName$3,
1479
- lineNumber: 213
1488
+ lineNumber: 224
1480
1489
  }
1481
1490
  }))), rationale && React$4.createElement(PreviewPrompt$1, {
1482
1491
  className: "rationale",
@@ -1485,7 +1494,7 @@ class ChoiceInput extends React$4.Component {
1485
1494
  __self: this,
1486
1495
  __source: {
1487
1496
  fileName: _jsxFileName$3,
1488
- lineNumber: 222
1497
+ lineNumber: 233
1489
1498
  }
1490
1499
  }), React$4.createElement(Feedback, {
1491
1500
  feedback: feedback,
@@ -1493,7 +1502,7 @@ class ChoiceInput extends React$4.Component {
1493
1502
  __self: this,
1494
1503
  __source: {
1495
1504
  fileName: _jsxFileName$3,
1496
- lineNumber: 224
1505
+ lineNumber: 235
1497
1506
  }
1498
1507
  }));
1499
1508
  }
@@ -1537,7 +1546,8 @@ class Choice extends React$3.Component {
1537
1546
  isEvaluateMode
1538
1547
  };
1539
1548
  const names = classNames$2(classes.choice, {
1540
- [classes.noBorder]: index === choicesLength - 1 || choicesLayout !== 'vertical'
1549
+ [classes.noBorder]: index === choicesLength - 1 || choicesLayout !== 'vertical',
1550
+ [classes.horizontalLayout]: choicesLayout === 'horizontal'
1541
1551
  });
1542
1552
  return React$3.createElement('div', {
1543
1553
  className: choiceClass,
@@ -1545,7 +1555,7 @@ class Choice extends React$3.Component {
1545
1555
  __self: this,
1546
1556
  __source: {
1547
1557
  fileName: _jsxFileName$2,
1548
- lineNumber: 56
1558
+ lineNumber: 57
1549
1559
  }
1550
1560
  }, React$3.createElement(ChoiceInput$1, {
1551
1561
  ...choiceProps,
@@ -1553,7 +1563,7 @@ class Choice extends React$3.Component {
1553
1563
  __self: this,
1554
1564
  __source: {
1555
1565
  fileName: _jsxFileName$2,
1556
- lineNumber: 57
1566
+ lineNumber: 58
1557
1567
  }
1558
1568
  }));
1559
1569
  }
@@ -1582,6 +1592,12 @@ var StyledChoice = withStyles$2({
1582
1592
  },
1583
1593
  noBorder: {
1584
1594
  borderBottom: 'none'
1595
+ },
1596
+ horizontalLayout: {
1597
+ paddingRight: '20px',
1598
+ '& label': {
1599
+ marginRight: '8px'
1600
+ }
1585
1601
  }
1586
1602
  })(Choice);
1587
1603
  const React$2 = _dll_react;
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/multiple-choice@6.2.6</title>
5
+ <title>@pie-element/multiple-choice@6.3.1</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>
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/multiple-choice",
3
- "version": "6.2.6",
3
+ "version": "6.3.1",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
7
- "version": "^1.4.10"
7
+ "version": "^1.4.17"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/math-rendering-module",
11
- "version": "^1.0.35"
11
+ "version": "^1.1.5"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/multiple-choice@6.2.6</title>
5
+ <title>@pie-element/multiple-choice@6.3.1</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"