@pie-element/multiple-choice 9.16.2-next.7 → 9.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.5/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.7/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.4/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -12608,7 +12608,10 @@ const styles$1 = theme => ({
12608
12608
  '& *': {
12609
12609
  '-webkit-font-smoothing': 'antialiased'
12610
12610
  },
12611
- position: 'relative'
12611
+ position: 'relative',
12612
+ '& legend': {
12613
+ border: 'none !important'
12614
+ }
12612
12615
  },
12613
12616
  partLabel: {
12614
12617
  display: 'block',
@@ -12796,14 +12799,14 @@ class MultipleChoice$1 extends React$2.Component {
12796
12799
  __self: this,
12797
12800
  __source: {
12798
12801
  fileName: _jsxFileName$1,
12799
- lineNumber: 215
12802
+ lineNumber: 219
12800
12803
  }
12801
12804
  }, "Multiple Choice Question") : React$2.createElement('h2', {
12802
12805
  className: classes.srOnly,
12803
12806
  __self: this,
12804
12807
  __source: {
12805
12808
  fileName: _jsxFileName$1,
12806
- lineNumber: 217
12809
+ lineNumber: 221
12807
12810
  }
12808
12811
  }, "Multiple Select Question");
12809
12812
  }
@@ -12824,7 +12827,7 @@ class MultipleChoice$1 extends React$2.Component {
12824
12827
  __self: this,
12825
12828
  __source: {
12826
12829
  fileName: _jsxFileName$1,
12827
- lineNumber: 251
12830
+ lineNumber: 255
12828
12831
  }
12829
12832
  });
12830
12833
  const getMultipleChoiceMinSelectionErrorMessage = () => {
@@ -12852,21 +12855,21 @@ class MultipleChoice$1 extends React$2.Component {
12852
12855
  __self: this,
12853
12856
  __source: {
12854
12857
  fileName: _jsxFileName$1,
12855
- lineNumber: 274
12858
+ lineNumber: 278
12856
12859
  }
12857
12860
  }, partLabel && React$2.createElement('h3', {
12858
12861
  className: classes.partLabel,
12859
12862
  __self: this,
12860
12863
  __source: {
12861
12864
  fileName: _jsxFileName$1,
12862
- lineNumber: 275
12865
+ lineNumber: 279
12863
12866
  }
12864
12867
  }, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
12865
12868
  className: classes.teacherInstructions,
12866
12869
  __self: this,
12867
12870
  __source: {
12868
12871
  fileName: _jsxFileName$1,
12869
- lineNumber: 280
12872
+ lineNumber: 284
12870
12873
  }
12871
12874
  }, !animationsDisabled ? React$2.createElement(Collapsible, {
12872
12875
  labels: {
@@ -12876,7 +12879,7 @@ class MultipleChoice$1 extends React$2.Component {
12876
12879
  __self: this,
12877
12880
  __source: {
12878
12881
  fileName: _jsxFileName$1,
12879
- lineNumber: 282
12882
+ lineNumber: 286
12880
12883
  }
12881
12884
  }, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
12882
12885
  tabIndex: 0,
@@ -12885,7 +12888,7 @@ class MultipleChoice$1 extends React$2.Component {
12885
12888
  __self: this,
12886
12889
  __source: {
12887
12890
  fileName: _jsxFileName$1,
12888
- lineNumber: 296
12891
+ lineNumber: 300
12889
12892
  }
12890
12893
  }, React$2.createElement(PreviewPrompt, {
12891
12894
  className: "prompt",
@@ -12897,7 +12900,7 @@ class MultipleChoice$1 extends React$2.Component {
12897
12900
  __self: this,
12898
12901
  __source: {
12899
12902
  fileName: _jsxFileName$1,
12900
- lineNumber: 297
12903
+ lineNumber: 301
12901
12904
  }
12902
12905
  }), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
12903
12906
  show: showCorrectAnswerToggle,
@@ -12907,7 +12910,7 @@ class MultipleChoice$1 extends React$2.Component {
12907
12910
  __self: this,
12908
12911
  __source: {
12909
12912
  fileName: _jsxFileName$1,
12910
- lineNumber: 307
12913
+ lineNumber: 311
12911
12914
  }
12912
12915
  }), React$2.createElement('div', {
12913
12916
  className: classNames({
@@ -12918,7 +12921,7 @@ class MultipleChoice$1 extends React$2.Component {
12918
12921
  __self: this,
12919
12922
  __source: {
12920
12923
  fileName: _jsxFileName$1,
12921
- lineNumber: 315
12924
+ lineNumber: 319
12922
12925
  }
12923
12926
  }, choices.map((choice, index) => React$2.createElement(StyledChoice, {
12924
12927
  choicesLayout: this.props.choicesLayout,
@@ -12942,21 +12945,21 @@ class MultipleChoice$1 extends React$2.Component {
12942
12945
  __self: this,
12943
12946
  __source: {
12944
12947
  fileName: _jsxFileName$1,
12945
- lineNumber: 323
12948
+ lineNumber: 327
12946
12949
  }
12947
12950
  })))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
12948
12951
  className: classes.errorText,
12949
12952
  __self: this,
12950
12953
  __source: {
12951
12954
  fileName: _jsxFileName$1,
12952
- lineNumber: 348
12955
+ lineNumber: 352
12953
12956
  }
12954
12957
  }, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
12955
12958
  className: classes.errorText,
12956
12959
  __self: this,
12957
12960
  __source: {
12958
12961
  fileName: _jsxFileName$1,
12959
- lineNumber: 353
12962
+ lineNumber: 357
12960
12963
  }
12961
12964
  }, translator.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
12962
12965
  lng: language,
@@ -13085,16 +13088,13 @@ class SessionChangedEvent extends CustomEvent {
13085
13088
  }
13086
13089
  SessionChangedEvent.TYPE = 'session-changed';
13087
13090
  var SessionChangedEvent_1 = lib.SessionChangedEvent = SessionChangedEvent;
13088
- const {concat: concat} = _dll_lodash;
13089
- const {uniq: uniq} = _dll_lodash;
13090
- const {without: without} = _dll_lodash;
13091
13091
  function updateSessionValue(session, choiceMode, data) {
13092
13092
  session.value = session.value || [];
13093
13093
  if (choiceMode === 'checkbox') {
13094
13094
  if (data.selected) {
13095
- session.value = uniq(concat(session.value, [data.value]));
13095
+ session.value = Array.from(new Set([...session.value, data.value]));
13096
13096
  } else {
13097
- session.value = without(session.value, data.value);
13097
+ session.value = session.value.filter(v => v !== data.value);
13098
13098
  }
13099
13099
  }
13100
13100
  if (choiceMode === 'radio') {
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "4.1.5"
7
+ "version": "4.1.7"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.5/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_pie_lib__pie_toolbox_math_rendering, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.7/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.4/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -12608,7 +12608,10 @@ const styles$1 = theme => ({
12608
12608
  '& *': {
12609
12609
  '-webkit-font-smoothing': 'antialiased'
12610
12610
  },
12611
- position: 'relative'
12611
+ position: 'relative',
12612
+ '& legend': {
12613
+ border: 'none !important'
12614
+ }
12612
12615
  },
12613
12616
  partLabel: {
12614
12617
  display: 'block',
@@ -12796,14 +12799,14 @@ class MultipleChoice extends React$2.Component {
12796
12799
  __self: this,
12797
12800
  __source: {
12798
12801
  fileName: _jsxFileName$1,
12799
- lineNumber: 215
12802
+ lineNumber: 219
12800
12803
  }
12801
12804
  }, "Multiple Choice Question") : React$2.createElement('h2', {
12802
12805
  className: classes.srOnly,
12803
12806
  __self: this,
12804
12807
  __source: {
12805
12808
  fileName: _jsxFileName$1,
12806
- lineNumber: 217
12809
+ lineNumber: 221
12807
12810
  }
12808
12811
  }, "Multiple Select Question");
12809
12812
  }
@@ -12824,7 +12827,7 @@ class MultipleChoice extends React$2.Component {
12824
12827
  __self: this,
12825
12828
  __source: {
12826
12829
  fileName: _jsxFileName$1,
12827
- lineNumber: 251
12830
+ lineNumber: 255
12828
12831
  }
12829
12832
  });
12830
12833
  const getMultipleChoiceMinSelectionErrorMessage = () => {
@@ -12852,21 +12855,21 @@ class MultipleChoice extends React$2.Component {
12852
12855
  __self: this,
12853
12856
  __source: {
12854
12857
  fileName: _jsxFileName$1,
12855
- lineNumber: 274
12858
+ lineNumber: 278
12856
12859
  }
12857
12860
  }, partLabel && React$2.createElement('h3', {
12858
12861
  className: classes.partLabel,
12859
12862
  __self: this,
12860
12863
  __source: {
12861
12864
  fileName: _jsxFileName$1,
12862
- lineNumber: 275
12865
+ lineNumber: 279
12863
12866
  }
12864
12867
  }, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
12865
12868
  className: classes.teacherInstructions,
12866
12869
  __self: this,
12867
12870
  __source: {
12868
12871
  fileName: _jsxFileName$1,
12869
- lineNumber: 280
12872
+ lineNumber: 284
12870
12873
  }
12871
12874
  }, !animationsDisabled ? React$2.createElement(Collapsible, {
12872
12875
  labels: {
@@ -12876,7 +12879,7 @@ class MultipleChoice extends React$2.Component {
12876
12879
  __self: this,
12877
12880
  __source: {
12878
12881
  fileName: _jsxFileName$1,
12879
- lineNumber: 282
12882
+ lineNumber: 286
12880
12883
  }
12881
12884
  }, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
12882
12885
  tabIndex: 0,
@@ -12885,7 +12888,7 @@ class MultipleChoice extends React$2.Component {
12885
12888
  __self: this,
12886
12889
  __source: {
12887
12890
  fileName: _jsxFileName$1,
12888
- lineNumber: 296
12891
+ lineNumber: 300
12889
12892
  }
12890
12893
  }, React$2.createElement(PreviewPrompt, {
12891
12894
  className: "prompt",
@@ -12897,7 +12900,7 @@ class MultipleChoice extends React$2.Component {
12897
12900
  __self: this,
12898
12901
  __source: {
12899
12902
  fileName: _jsxFileName$1,
12900
- lineNumber: 297
12903
+ lineNumber: 301
12901
12904
  }
12902
12905
  }), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
12903
12906
  show: showCorrectAnswerToggle,
@@ -12907,7 +12910,7 @@ class MultipleChoice extends React$2.Component {
12907
12910
  __self: this,
12908
12911
  __source: {
12909
12912
  fileName: _jsxFileName$1,
12910
- lineNumber: 307
12913
+ lineNumber: 311
12911
12914
  }
12912
12915
  }), React$2.createElement('div', {
12913
12916
  className: classNames({
@@ -12918,7 +12921,7 @@ class MultipleChoice extends React$2.Component {
12918
12921
  __self: this,
12919
12922
  __source: {
12920
12923
  fileName: _jsxFileName$1,
12921
- lineNumber: 315
12924
+ lineNumber: 319
12922
12925
  }
12923
12926
  }, choices.map((choice, index) => React$2.createElement(StyledChoice, {
12924
12927
  choicesLayout: this.props.choicesLayout,
@@ -12942,21 +12945,21 @@ class MultipleChoice extends React$2.Component {
12942
12945
  __self: this,
12943
12946
  __source: {
12944
12947
  fileName: _jsxFileName$1,
12945
- lineNumber: 323
12948
+ lineNumber: 327
12946
12949
  }
12947
12950
  })))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
12948
12951
  className: classes.errorText,
12949
12952
  __self: this,
12950
12953
  __source: {
12951
12954
  fileName: _jsxFileName$1,
12952
- lineNumber: 348
12955
+ lineNumber: 352
12953
12956
  }
12954
12957
  }, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
12955
12958
  className: classes.errorText,
12956
12959
  __self: this,
12957
12960
  __source: {
12958
12961
  fileName: _jsxFileName$1,
12959
- lineNumber: 353
12962
+ lineNumber: 357
12960
12963
  }
12961
12964
  }, translator.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
12962
12965
  lng: language,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/multiple-choice",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "9.16.2-next.7+ea1831187",
4
+ "version": "9.16.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-player-events": "^0.1.0",
11
- "@pie-lib/pie-toolbox": "2.17.6",
11
+ "@pie-lib/pie-toolbox": "2.18.0",
12
12
  "classnames": "^2.2.5",
13
13
  "debug": "^4.1.1",
14
14
  "enzyme-to-json": "^3.3.3",
@@ -19,7 +19,7 @@
19
19
  "react-test-renderer": "^16.3.2",
20
20
  "react-transition-group": "^2.3.1"
21
21
  },
22
- "gitHead": "ea18311870fbffe39749d88765a5118d9ff00b21",
22
+ "gitHead": "e8f3c4c4569ee20e507671b02df1499daf3cfb71",
23
23
  "scripts": {
24
24
  "postpublish": "../../scripts/postpublish"
25
25
  },