@pie-element/ebsr 10.3.13-next.2 → 10.3.13-next.4
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 +22 -18
- package/module/print.js +22 -18
- package/package.json +3 -3
package/module/element.js
CHANGED
|
@@ -12698,7 +12698,11 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12698
12698
|
isSelectionButtonBelow: PropTypes$1.bool,
|
|
12699
12699
|
minSelections: PropTypes$1.number,
|
|
12700
12700
|
maxSelections: PropTypes$1.number,
|
|
12701
|
-
autoplayAudioEnabled: PropTypes$1.bool
|
|
12701
|
+
autoplayAudioEnabled: PropTypes$1.bool,
|
|
12702
|
+
customAudioButton: {
|
|
12703
|
+
playImage: PropTypes$1.string,
|
|
12704
|
+
pauseImage: PropTypes$1.string
|
|
12705
|
+
}
|
|
12702
12706
|
};
|
|
12703
12707
|
}
|
|
12704
12708
|
constructor(props) {
|
|
@@ -12815,19 +12819,19 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12815
12819
|
__self: this,
|
|
12816
12820
|
__source: {
|
|
12817
12821
|
fileName: _jsxFileName$1,
|
|
12818
|
-
lineNumber:
|
|
12822
|
+
lineNumber: 215
|
|
12819
12823
|
}
|
|
12820
12824
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
12821
12825
|
className: classes.srOnly,
|
|
12822
12826
|
__self: this,
|
|
12823
12827
|
__source: {
|
|
12824
12828
|
fileName: _jsxFileName$1,
|
|
12825
|
-
lineNumber:
|
|
12829
|
+
lineNumber: 217
|
|
12826
12830
|
}
|
|
12827
12831
|
}, "Multiple Select Question");
|
|
12828
12832
|
}
|
|
12829
12833
|
render() {
|
|
12830
|
-
const {mode, disabled, className, choices = [], choiceMode, gridColumns, partLabel, prompt, responseCorrect, teacherInstructions, classes, alwaysShowCorrect, animationsDisabled, language, isSelectionButtonBelow, minSelections, maxSelections, autoplayAudioEnabled, session} = this.props;
|
|
12834
|
+
const {mode, disabled, className, choices = [], choiceMode, gridColumns, partLabel, prompt, responseCorrect, teacherInstructions, classes, alwaysShowCorrect, animationsDisabled, language, isSelectionButtonBelow, minSelections, maxSelections, autoplayAudioEnabled, session, customAudioButton} = this.props;
|
|
12831
12835
|
const {showCorrect, maxSelectionsErrorState} = this.state;
|
|
12832
12836
|
const isEvaluateMode = mode === 'evaluate';
|
|
12833
12837
|
const showCorrectAnswerToggle = isEvaluateMode && !responseCorrect;
|
|
@@ -12835,7 +12839,6 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12835
12839
|
gridTemplateColumns: `repeat(${gridColumns}, 1fr)`
|
|
12836
12840
|
} : undefined;
|
|
12837
12841
|
const selections = session.value && session.value.length || 0;
|
|
12838
|
-
const addAutoplayAudio = autoplayAudioEnabled && !((/Safari|Firefox|Edg/).test(navigator.userAgent) && !(/Chrome/).test(navigator.userAgent));
|
|
12839
12842
|
const teacherInstructionsDiv = React$2.createElement(PreviewPrompt, {
|
|
12840
12843
|
tagName: "div",
|
|
12841
12844
|
className: "prompt",
|
|
@@ -12844,7 +12847,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12844
12847
|
__self: this,
|
|
12845
12848
|
__source: {
|
|
12846
12849
|
fileName: _jsxFileName$1,
|
|
12847
|
-
lineNumber:
|
|
12850
|
+
lineNumber: 251
|
|
12848
12851
|
}
|
|
12849
12852
|
});
|
|
12850
12853
|
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
@@ -12872,21 +12875,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12872
12875
|
__self: this,
|
|
12873
12876
|
__source: {
|
|
12874
12877
|
fileName: _jsxFileName$1,
|
|
12875
|
-
lineNumber:
|
|
12878
|
+
lineNumber: 274
|
|
12876
12879
|
}
|
|
12877
12880
|
}, partLabel && React$2.createElement('h3', {
|
|
12878
12881
|
className: classes.partLabel,
|
|
12879
12882
|
__self: this,
|
|
12880
12883
|
__source: {
|
|
12881
12884
|
fileName: _jsxFileName$1,
|
|
12882
|
-
lineNumber:
|
|
12885
|
+
lineNumber: 275
|
|
12883
12886
|
}
|
|
12884
12887
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12885
12888
|
className: classes.teacherInstructions,
|
|
12886
12889
|
__self: this,
|
|
12887
12890
|
__source: {
|
|
12888
12891
|
fileName: _jsxFileName$1,
|
|
12889
|
-
lineNumber:
|
|
12892
|
+
lineNumber: 280
|
|
12890
12893
|
}
|
|
12891
12894
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12892
12895
|
labels: {
|
|
@@ -12896,25 +12899,26 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12896
12899
|
__self: this,
|
|
12897
12900
|
__source: {
|
|
12898
12901
|
fileName: _jsxFileName$1,
|
|
12899
|
-
lineNumber:
|
|
12902
|
+
lineNumber: 282
|
|
12900
12903
|
}
|
|
12901
12904
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12902
12905
|
className: classes.fieldset,
|
|
12903
12906
|
__self: this,
|
|
12904
12907
|
__source: {
|
|
12905
12908
|
fileName: _jsxFileName$1,
|
|
12906
|
-
lineNumber:
|
|
12909
|
+
lineNumber: 296
|
|
12907
12910
|
}
|
|
12908
12911
|
}, React$2.createElement(PreviewPrompt, {
|
|
12909
12912
|
className: "prompt",
|
|
12910
12913
|
defaultClassName: "prompt",
|
|
12911
12914
|
prompt: prompt,
|
|
12912
12915
|
tagName: 'legend',
|
|
12913
|
-
autoplayAudioEnabled:
|
|
12916
|
+
autoplayAudioEnabled: autoplayAudioEnabled,
|
|
12917
|
+
customAudioButton: customAudioButton,
|
|
12914
12918
|
__self: this,
|
|
12915
12919
|
__source: {
|
|
12916
12920
|
fileName: _jsxFileName$1,
|
|
12917
|
-
lineNumber:
|
|
12921
|
+
lineNumber: 297
|
|
12918
12922
|
}
|
|
12919
12923
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12920
12924
|
show: showCorrectAnswerToggle,
|
|
@@ -12924,7 +12928,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12924
12928
|
__self: this,
|
|
12925
12929
|
__source: {
|
|
12926
12930
|
fileName: _jsxFileName$1,
|
|
12927
|
-
lineNumber:
|
|
12931
|
+
lineNumber: 307
|
|
12928
12932
|
}
|
|
12929
12933
|
}), React$2.createElement('div', {
|
|
12930
12934
|
className: classNames({
|
|
@@ -12935,7 +12939,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12935
12939
|
__self: this,
|
|
12936
12940
|
__source: {
|
|
12937
12941
|
fileName: _jsxFileName$1,
|
|
12938
|
-
lineNumber:
|
|
12942
|
+
lineNumber: 315
|
|
12939
12943
|
}
|
|
12940
12944
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12941
12945
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12958,21 +12962,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12958
12962
|
__self: this,
|
|
12959
12963
|
__source: {
|
|
12960
12964
|
fileName: _jsxFileName$1,
|
|
12961
|
-
lineNumber:
|
|
12965
|
+
lineNumber: 323
|
|
12962
12966
|
}
|
|
12963
12967
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12964
12968
|
className: classes.errorText,
|
|
12965
12969
|
__self: this,
|
|
12966
12970
|
__source: {
|
|
12967
12971
|
fileName: _jsxFileName$1,
|
|
12968
|
-
lineNumber:
|
|
12972
|
+
lineNumber: 347
|
|
12969
12973
|
}
|
|
12970
12974
|
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12971
12975
|
className: classes.errorText,
|
|
12972
12976
|
__self: this,
|
|
12973
12977
|
__source: {
|
|
12974
12978
|
fileName: _jsxFileName$1,
|
|
12975
|
-
lineNumber:
|
|
12979
|
+
lineNumber: 352
|
|
12976
12980
|
}
|
|
12977
12981
|
}, translator.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12978
12982
|
lng: language,
|
package/module/print.js
CHANGED
|
@@ -12661,7 +12661,11 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12661
12661
|
isSelectionButtonBelow: PropTypes$1.bool,
|
|
12662
12662
|
minSelections: PropTypes$1.number,
|
|
12663
12663
|
maxSelections: PropTypes$1.number,
|
|
12664
|
-
autoplayAudioEnabled: PropTypes$1.bool
|
|
12664
|
+
autoplayAudioEnabled: PropTypes$1.bool,
|
|
12665
|
+
customAudioButton: {
|
|
12666
|
+
playImage: PropTypes$1.string,
|
|
12667
|
+
pauseImage: PropTypes$1.string
|
|
12668
|
+
}
|
|
12665
12669
|
};
|
|
12666
12670
|
}
|
|
12667
12671
|
constructor(props) {
|
|
@@ -12778,19 +12782,19 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12778
12782
|
__self: this,
|
|
12779
12783
|
__source: {
|
|
12780
12784
|
fileName: _jsxFileName$1,
|
|
12781
|
-
lineNumber:
|
|
12785
|
+
lineNumber: 215
|
|
12782
12786
|
}
|
|
12783
12787
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
12784
12788
|
className: classes.srOnly,
|
|
12785
12789
|
__self: this,
|
|
12786
12790
|
__source: {
|
|
12787
12791
|
fileName: _jsxFileName$1,
|
|
12788
|
-
lineNumber:
|
|
12792
|
+
lineNumber: 217
|
|
12789
12793
|
}
|
|
12790
12794
|
}, "Multiple Select Question");
|
|
12791
12795
|
}
|
|
12792
12796
|
render() {
|
|
12793
|
-
const {mode, disabled, className, choices = [], choiceMode, gridColumns, partLabel, prompt, responseCorrect, teacherInstructions, classes, alwaysShowCorrect, animationsDisabled, language, isSelectionButtonBelow, minSelections, maxSelections, autoplayAudioEnabled, session} = this.props;
|
|
12797
|
+
const {mode, disabled, className, choices = [], choiceMode, gridColumns, partLabel, prompt, responseCorrect, teacherInstructions, classes, alwaysShowCorrect, animationsDisabled, language, isSelectionButtonBelow, minSelections, maxSelections, autoplayAudioEnabled, session, customAudioButton} = this.props;
|
|
12794
12798
|
const {showCorrect, maxSelectionsErrorState} = this.state;
|
|
12795
12799
|
const isEvaluateMode = mode === 'evaluate';
|
|
12796
12800
|
const showCorrectAnswerToggle = isEvaluateMode && !responseCorrect;
|
|
@@ -12798,7 +12802,6 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12798
12802
|
gridTemplateColumns: `repeat(${gridColumns}, 1fr)`
|
|
12799
12803
|
} : undefined;
|
|
12800
12804
|
const selections = session.value && session.value.length || 0;
|
|
12801
|
-
const addAutoplayAudio = autoplayAudioEnabled && !((/Safari|Firefox|Edg/).test(navigator.userAgent) && !(/Chrome/).test(navigator.userAgent));
|
|
12802
12805
|
const teacherInstructionsDiv = React$2.createElement(PreviewPrompt, {
|
|
12803
12806
|
tagName: "div",
|
|
12804
12807
|
className: "prompt",
|
|
@@ -12807,7 +12810,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12807
12810
|
__self: this,
|
|
12808
12811
|
__source: {
|
|
12809
12812
|
fileName: _jsxFileName$1,
|
|
12810
|
-
lineNumber:
|
|
12813
|
+
lineNumber: 251
|
|
12811
12814
|
}
|
|
12812
12815
|
});
|
|
12813
12816
|
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
@@ -12835,21 +12838,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12835
12838
|
__self: this,
|
|
12836
12839
|
__source: {
|
|
12837
12840
|
fileName: _jsxFileName$1,
|
|
12838
|
-
lineNumber:
|
|
12841
|
+
lineNumber: 274
|
|
12839
12842
|
}
|
|
12840
12843
|
}, partLabel && React$2.createElement('h3', {
|
|
12841
12844
|
className: classes.partLabel,
|
|
12842
12845
|
__self: this,
|
|
12843
12846
|
__source: {
|
|
12844
12847
|
fileName: _jsxFileName$1,
|
|
12845
|
-
lineNumber:
|
|
12848
|
+
lineNumber: 275
|
|
12846
12849
|
}
|
|
12847
12850
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12848
12851
|
className: classes.teacherInstructions,
|
|
12849
12852
|
__self: this,
|
|
12850
12853
|
__source: {
|
|
12851
12854
|
fileName: _jsxFileName$1,
|
|
12852
|
-
lineNumber:
|
|
12855
|
+
lineNumber: 280
|
|
12853
12856
|
}
|
|
12854
12857
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12855
12858
|
labels: {
|
|
@@ -12859,25 +12862,26 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12859
12862
|
__self: this,
|
|
12860
12863
|
__source: {
|
|
12861
12864
|
fileName: _jsxFileName$1,
|
|
12862
|
-
lineNumber:
|
|
12865
|
+
lineNumber: 282
|
|
12863
12866
|
}
|
|
12864
12867
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12865
12868
|
className: classes.fieldset,
|
|
12866
12869
|
__self: this,
|
|
12867
12870
|
__source: {
|
|
12868
12871
|
fileName: _jsxFileName$1,
|
|
12869
|
-
lineNumber:
|
|
12872
|
+
lineNumber: 296
|
|
12870
12873
|
}
|
|
12871
12874
|
}, React$2.createElement(PreviewPrompt, {
|
|
12872
12875
|
className: "prompt",
|
|
12873
12876
|
defaultClassName: "prompt",
|
|
12874
12877
|
prompt: prompt,
|
|
12875
12878
|
tagName: 'legend',
|
|
12876
|
-
autoplayAudioEnabled:
|
|
12879
|
+
autoplayAudioEnabled: autoplayAudioEnabled,
|
|
12880
|
+
customAudioButton: customAudioButton,
|
|
12877
12881
|
__self: this,
|
|
12878
12882
|
__source: {
|
|
12879
12883
|
fileName: _jsxFileName$1,
|
|
12880
|
-
lineNumber:
|
|
12884
|
+
lineNumber: 297
|
|
12881
12885
|
}
|
|
12882
12886
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12883
12887
|
show: showCorrectAnswerToggle,
|
|
@@ -12887,7 +12891,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12887
12891
|
__self: this,
|
|
12888
12892
|
__source: {
|
|
12889
12893
|
fileName: _jsxFileName$1,
|
|
12890
|
-
lineNumber:
|
|
12894
|
+
lineNumber: 307
|
|
12891
12895
|
}
|
|
12892
12896
|
}), React$2.createElement('div', {
|
|
12893
12897
|
className: classNames({
|
|
@@ -12898,7 +12902,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12898
12902
|
__self: this,
|
|
12899
12903
|
__source: {
|
|
12900
12904
|
fileName: _jsxFileName$1,
|
|
12901
|
-
lineNumber:
|
|
12905
|
+
lineNumber: 315
|
|
12902
12906
|
}
|
|
12903
12907
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12904
12908
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12921,21 +12925,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12921
12925
|
__self: this,
|
|
12922
12926
|
__source: {
|
|
12923
12927
|
fileName: _jsxFileName$1,
|
|
12924
|
-
lineNumber:
|
|
12928
|
+
lineNumber: 323
|
|
12925
12929
|
}
|
|
12926
12930
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12927
12931
|
className: classes.errorText,
|
|
12928
12932
|
__self: this,
|
|
12929
12933
|
__source: {
|
|
12930
12934
|
fileName: _jsxFileName$1,
|
|
12931
|
-
lineNumber:
|
|
12935
|
+
lineNumber: 347
|
|
12932
12936
|
}
|
|
12933
12937
|
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12934
12938
|
className: classes.errorText,
|
|
12935
12939
|
__self: this,
|
|
12936
12940
|
__source: {
|
|
12937
12941
|
fileName: _jsxFileName$1,
|
|
12938
|
-
lineNumber:
|
|
12942
|
+
lineNumber: 352
|
|
12939
12943
|
}
|
|
12940
12944
|
}, translator$1.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12941
12945
|
lng: language,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr",
|
|
3
|
-
"version": "10.3.13-next.
|
|
3
|
+
"version": "10.3.13-next.4+dd3fde7ef",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-element/multiple-choice": "^9.12.8-next.
|
|
10
|
+
"@pie-element/multiple-choice": "^9.12.8-next.4+dd3fde7ef",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
12
|
"@pie-lib/pie-toolbox": "2.9.5",
|
|
13
13
|
"classnames": "^2.2.5",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"author": "pie framework developers",
|
|
18
18
|
"license": "ISC",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "dd3fde7ef95879ed17976bb057963dae43a601df",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|