@pie-element/ebsr 10.3.4-next.3 → 10.3.5-next.0
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/package.json +2 -2
- package/module/element.js +49 -15
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/module/print.js +49 -15
- package/package.json +3 -3
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
|
+
## [10.3.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr@10.3.3...@pie-element/ebsr@10.3.4) (2025-02-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/ebsr
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [10.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr@10.3.2...@pie-element/ebsr@10.3.3) (2025-02-06)
|
|
7
15
|
|
|
8
16
|
|
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
|
+
## [10.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-configure@10.2.3...@pie-element/ebsr-configure@10.2.4) (2025-02-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/ebsr-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [10.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/ebsr-configure@10.2.2...@pie-element/ebsr-configure@10.2.3) (2025-02-06)
|
|
7
15
|
|
|
8
16
|
|
package/configure/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "10.2.
|
|
4
|
+
"version": "10.2.4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"author": "",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
|
-
"@pie-element/multiple-choice": "^9.
|
|
11
|
+
"@pie-element/multiple-choice": "^9.11.0",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
13
13
|
"@pie-lib/pie-toolbox": "2.9.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
package/module/element.js
CHANGED
|
@@ -12719,6 +12719,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12719
12719
|
this.handleChange = event => {
|
|
12720
12720
|
const {value, checked} = event.target;
|
|
12721
12721
|
const {maxSelections, onChoiceChanged, session} = this.props;
|
|
12722
|
+
const {detail} = event.nativeEvent;
|
|
12723
|
+
let selector = detail ? 'Mouse' : 'Keyboard';
|
|
12722
12724
|
if (session.value && session.value.length >= maxSelections) {
|
|
12723
12725
|
this.setState({
|
|
12724
12726
|
maxSelectionsErrorState: checked
|
|
@@ -12729,7 +12731,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12729
12731
|
}
|
|
12730
12732
|
onChoiceChanged({
|
|
12731
12733
|
value,
|
|
12732
|
-
selected: checked
|
|
12734
|
+
selected: checked,
|
|
12735
|
+
selector
|
|
12733
12736
|
});
|
|
12734
12737
|
};
|
|
12735
12738
|
}
|
|
@@ -12813,14 +12816,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12813
12816
|
__self: this,
|
|
12814
12817
|
__source: {
|
|
12815
12818
|
fileName: _jsxFileName$1,
|
|
12816
|
-
lineNumber:
|
|
12819
|
+
lineNumber: 214
|
|
12817
12820
|
}
|
|
12818
12821
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
12819
12822
|
className: classes.srOnly,
|
|
12820
12823
|
__self: this,
|
|
12821
12824
|
__source: {
|
|
12822
12825
|
fileName: _jsxFileName$1,
|
|
12823
|
-
lineNumber:
|
|
12826
|
+
lineNumber: 216
|
|
12824
12827
|
}
|
|
12825
12828
|
}, "Multiple Select Question");
|
|
12826
12829
|
}
|
|
@@ -12842,7 +12845,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12842
12845
|
__self: this,
|
|
12843
12846
|
__source: {
|
|
12844
12847
|
fileName: _jsxFileName$1,
|
|
12845
|
-
lineNumber:
|
|
12848
|
+
lineNumber: 251
|
|
12846
12849
|
}
|
|
12847
12850
|
});
|
|
12848
12851
|
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
@@ -12869,21 +12872,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12869
12872
|
__self: this,
|
|
12870
12873
|
__source: {
|
|
12871
12874
|
fileName: _jsxFileName$1,
|
|
12872
|
-
lineNumber:
|
|
12875
|
+
lineNumber: 274
|
|
12873
12876
|
}
|
|
12874
12877
|
}, partLabel && React$2.createElement('h3', {
|
|
12875
12878
|
className: classes.partLabel,
|
|
12876
12879
|
__self: this,
|
|
12877
12880
|
__source: {
|
|
12878
12881
|
fileName: _jsxFileName$1,
|
|
12879
|
-
lineNumber:
|
|
12882
|
+
lineNumber: 275
|
|
12880
12883
|
}
|
|
12881
12884
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12882
12885
|
className: classes.teacherInstructions,
|
|
12883
12886
|
__self: this,
|
|
12884
12887
|
__source: {
|
|
12885
12888
|
fileName: _jsxFileName$1,
|
|
12886
|
-
lineNumber:
|
|
12889
|
+
lineNumber: 280
|
|
12887
12890
|
}
|
|
12888
12891
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12889
12892
|
labels: {
|
|
@@ -12893,14 +12896,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12893
12896
|
__self: this,
|
|
12894
12897
|
__source: {
|
|
12895
12898
|
fileName: _jsxFileName$1,
|
|
12896
|
-
lineNumber:
|
|
12899
|
+
lineNumber: 282
|
|
12897
12900
|
}
|
|
12898
12901
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12899
12902
|
className: classes.fieldset,
|
|
12900
12903
|
__self: this,
|
|
12901
12904
|
__source: {
|
|
12902
12905
|
fileName: _jsxFileName$1,
|
|
12903
|
-
lineNumber:
|
|
12906
|
+
lineNumber: 296
|
|
12904
12907
|
}
|
|
12905
12908
|
}, React$2.createElement(PreviewPrompt, {
|
|
12906
12909
|
className: "prompt",
|
|
@@ -12911,7 +12914,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12911
12914
|
__self: this,
|
|
12912
12915
|
__source: {
|
|
12913
12916
|
fileName: _jsxFileName$1,
|
|
12914
|
-
lineNumber:
|
|
12917
|
+
lineNumber: 297
|
|
12915
12918
|
}
|
|
12916
12919
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12917
12920
|
show: showCorrectAnswerToggle,
|
|
@@ -12921,7 +12924,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12921
12924
|
__self: this,
|
|
12922
12925
|
__source: {
|
|
12923
12926
|
fileName: _jsxFileName$1,
|
|
12924
|
-
lineNumber:
|
|
12927
|
+
lineNumber: 306
|
|
12925
12928
|
}
|
|
12926
12929
|
}), React$2.createElement('div', {
|
|
12927
12930
|
className: classNames({
|
|
@@ -12932,7 +12935,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12932
12935
|
__self: this,
|
|
12933
12936
|
__source: {
|
|
12934
12937
|
fileName: _jsxFileName$1,
|
|
12935
|
-
lineNumber:
|
|
12938
|
+
lineNumber: 314
|
|
12936
12939
|
}
|
|
12937
12940
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12938
12941
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12955,21 +12958,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12955
12958
|
__self: this,
|
|
12956
12959
|
__source: {
|
|
12957
12960
|
fileName: _jsxFileName$1,
|
|
12958
|
-
lineNumber:
|
|
12961
|
+
lineNumber: 322
|
|
12959
12962
|
}
|
|
12960
12963
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12961
12964
|
className: classes.errorText,
|
|
12962
12965
|
__self: this,
|
|
12963
12966
|
__source: {
|
|
12964
12967
|
fileName: _jsxFileName$1,
|
|
12965
|
-
lineNumber:
|
|
12968
|
+
lineNumber: 346
|
|
12966
12969
|
}
|
|
12967
12970
|
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12968
12971
|
className: classes.errorText,
|
|
12969
12972
|
__self: this,
|
|
12970
12973
|
__source: {
|
|
12971
12974
|
fileName: _jsxFileName$1,
|
|
12972
|
-
lineNumber:
|
|
12975
|
+
lineNumber: 351
|
|
12973
12976
|
}
|
|
12974
12977
|
}, translator.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12975
12978
|
lng: language,
|
|
@@ -13080,6 +13083,7 @@ function updateSessionValue(session, choiceMode, data) {
|
|
|
13080
13083
|
session.value = [];
|
|
13081
13084
|
}
|
|
13082
13085
|
}
|
|
13086
|
+
session.selector = data.selector;
|
|
13083
13087
|
}
|
|
13084
13088
|
const React = _dll_react;
|
|
13085
13089
|
const ReactDOM = _dll_react_dom;
|
|
@@ -13126,6 +13130,9 @@ class MultipleChoice extends HTMLElement {
|
|
|
13126
13130
|
log$1('render complete - render math');
|
|
13127
13131
|
renderMath(this);
|
|
13128
13132
|
});
|
|
13133
|
+
if (this._model.keyboardEventsEnabled === true) {
|
|
13134
|
+
this.enableKeyboardEvents();
|
|
13135
|
+
}
|
|
13129
13136
|
} else {
|
|
13130
13137
|
log$1('skip');
|
|
13131
13138
|
}
|
|
@@ -13238,6 +13245,33 @@ class MultipleChoice extends HTMLElement {
|
|
|
13238
13245
|
subtree: true
|
|
13239
13246
|
});
|
|
13240
13247
|
}
|
|
13248
|
+
enableKeyboardEvents() {
|
|
13249
|
+
window.addEventListener('keydown', this.handleKeyDown.bind(this));
|
|
13250
|
+
}
|
|
13251
|
+
disconnectedCallback() {
|
|
13252
|
+
window.removeEventListener('keydown', this.handleKeyDown.bind(this));
|
|
13253
|
+
}
|
|
13254
|
+
handleKeyDown(event) {
|
|
13255
|
+
if (!this._model || !this._session) {
|
|
13256
|
+
return;
|
|
13257
|
+
}
|
|
13258
|
+
const keyToIndex = key => {
|
|
13259
|
+
const numOffset = key >= '1' && key <= '9' ? key - '1' : key === '0' ? 9 : -1;
|
|
13260
|
+
const letterOffset = (/^[a-jA-J]$/).test(key) ? key.toLowerCase().charCodeAt(0) - ('a').charCodeAt(0) : -1;
|
|
13261
|
+
return numOffset >= 0 ? numOffset : letterOffset;
|
|
13262
|
+
};
|
|
13263
|
+
const choiceIndex = keyToIndex(event.key);
|
|
13264
|
+
if (choiceIndex === undefined || choiceIndex >= this._model.choices.length) {
|
|
13265
|
+
return;
|
|
13266
|
+
}
|
|
13267
|
+
const currentValue = this._session.value || [];
|
|
13268
|
+
const choiceId = this._model.choices[choiceIndex].value;
|
|
13269
|
+
const newValue = {
|
|
13270
|
+
value: choiceId,
|
|
13271
|
+
selected: !currentValue.includes(choiceId)
|
|
13272
|
+
};
|
|
13273
|
+
this._onChange(newValue);
|
|
13274
|
+
}
|
|
13241
13275
|
}
|
|
13242
13276
|
const {get: get} = _dll_lodash;
|
|
13243
13277
|
const debug = _dll_debug;
|
package/module/index.html
CHANGED
package/module/manifest.json
CHANGED
package/module/print.html
CHANGED
package/module/print.js
CHANGED
|
@@ -12682,6 +12682,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12682
12682
|
this.handleChange = event => {
|
|
12683
12683
|
const {value, checked} = event.target;
|
|
12684
12684
|
const {maxSelections, onChoiceChanged, session} = this.props;
|
|
12685
|
+
const {detail} = event.nativeEvent;
|
|
12686
|
+
let selector = detail ? 'Mouse' : 'Keyboard';
|
|
12685
12687
|
if (session.value && session.value.length >= maxSelections) {
|
|
12686
12688
|
this.setState({
|
|
12687
12689
|
maxSelectionsErrorState: checked
|
|
@@ -12692,7 +12694,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12692
12694
|
}
|
|
12693
12695
|
onChoiceChanged({
|
|
12694
12696
|
value,
|
|
12695
|
-
selected: checked
|
|
12697
|
+
selected: checked,
|
|
12698
|
+
selector
|
|
12696
12699
|
});
|
|
12697
12700
|
};
|
|
12698
12701
|
}
|
|
@@ -12776,14 +12779,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12776
12779
|
__self: this,
|
|
12777
12780
|
__source: {
|
|
12778
12781
|
fileName: _jsxFileName$1,
|
|
12779
|
-
lineNumber:
|
|
12782
|
+
lineNumber: 214
|
|
12780
12783
|
}
|
|
12781
12784
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
12782
12785
|
className: classes.srOnly,
|
|
12783
12786
|
__self: this,
|
|
12784
12787
|
__source: {
|
|
12785
12788
|
fileName: _jsxFileName$1,
|
|
12786
|
-
lineNumber:
|
|
12789
|
+
lineNumber: 216
|
|
12787
12790
|
}
|
|
12788
12791
|
}, "Multiple Select Question");
|
|
12789
12792
|
}
|
|
@@ -12805,7 +12808,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12805
12808
|
__self: this,
|
|
12806
12809
|
__source: {
|
|
12807
12810
|
fileName: _jsxFileName$1,
|
|
12808
|
-
lineNumber:
|
|
12811
|
+
lineNumber: 251
|
|
12809
12812
|
}
|
|
12810
12813
|
});
|
|
12811
12814
|
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
@@ -12832,21 +12835,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12832
12835
|
__self: this,
|
|
12833
12836
|
__source: {
|
|
12834
12837
|
fileName: _jsxFileName$1,
|
|
12835
|
-
lineNumber:
|
|
12838
|
+
lineNumber: 274
|
|
12836
12839
|
}
|
|
12837
12840
|
}, partLabel && React$2.createElement('h3', {
|
|
12838
12841
|
className: classes.partLabel,
|
|
12839
12842
|
__self: this,
|
|
12840
12843
|
__source: {
|
|
12841
12844
|
fileName: _jsxFileName$1,
|
|
12842
|
-
lineNumber:
|
|
12845
|
+
lineNumber: 275
|
|
12843
12846
|
}
|
|
12844
12847
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12845
12848
|
className: classes.teacherInstructions,
|
|
12846
12849
|
__self: this,
|
|
12847
12850
|
__source: {
|
|
12848
12851
|
fileName: _jsxFileName$1,
|
|
12849
|
-
lineNumber:
|
|
12852
|
+
lineNumber: 280
|
|
12850
12853
|
}
|
|
12851
12854
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12852
12855
|
labels: {
|
|
@@ -12856,14 +12859,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12856
12859
|
__self: this,
|
|
12857
12860
|
__source: {
|
|
12858
12861
|
fileName: _jsxFileName$1,
|
|
12859
|
-
lineNumber:
|
|
12862
|
+
lineNumber: 282
|
|
12860
12863
|
}
|
|
12861
12864
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12862
12865
|
className: classes.fieldset,
|
|
12863
12866
|
__self: this,
|
|
12864
12867
|
__source: {
|
|
12865
12868
|
fileName: _jsxFileName$1,
|
|
12866
|
-
lineNumber:
|
|
12869
|
+
lineNumber: 296
|
|
12867
12870
|
}
|
|
12868
12871
|
}, React$2.createElement(PreviewPrompt, {
|
|
12869
12872
|
className: "prompt",
|
|
@@ -12874,7 +12877,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12874
12877
|
__self: this,
|
|
12875
12878
|
__source: {
|
|
12876
12879
|
fileName: _jsxFileName$1,
|
|
12877
|
-
lineNumber:
|
|
12880
|
+
lineNumber: 297
|
|
12878
12881
|
}
|
|
12879
12882
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12880
12883
|
show: showCorrectAnswerToggle,
|
|
@@ -12884,7 +12887,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12884
12887
|
__self: this,
|
|
12885
12888
|
__source: {
|
|
12886
12889
|
fileName: _jsxFileName$1,
|
|
12887
|
-
lineNumber:
|
|
12890
|
+
lineNumber: 306
|
|
12888
12891
|
}
|
|
12889
12892
|
}), React$2.createElement('div', {
|
|
12890
12893
|
className: classNames({
|
|
@@ -12895,7 +12898,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12895
12898
|
__self: this,
|
|
12896
12899
|
__source: {
|
|
12897
12900
|
fileName: _jsxFileName$1,
|
|
12898
|
-
lineNumber:
|
|
12901
|
+
lineNumber: 314
|
|
12899
12902
|
}
|
|
12900
12903
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12901
12904
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12918,21 +12921,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12918
12921
|
__self: this,
|
|
12919
12922
|
__source: {
|
|
12920
12923
|
fileName: _jsxFileName$1,
|
|
12921
|
-
lineNumber:
|
|
12924
|
+
lineNumber: 322
|
|
12922
12925
|
}
|
|
12923
12926
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12924
12927
|
className: classes.errorText,
|
|
12925
12928
|
__self: this,
|
|
12926
12929
|
__source: {
|
|
12927
12930
|
fileName: _jsxFileName$1,
|
|
12928
|
-
lineNumber:
|
|
12931
|
+
lineNumber: 346
|
|
12929
12932
|
}
|
|
12930
12933
|
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12931
12934
|
className: classes.errorText,
|
|
12932
12935
|
__self: this,
|
|
12933
12936
|
__source: {
|
|
12934
12937
|
fileName: _jsxFileName$1,
|
|
12935
|
-
lineNumber:
|
|
12938
|
+
lineNumber: 351
|
|
12936
12939
|
}
|
|
12937
12940
|
}, translator$1.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12938
12941
|
lng: language,
|
|
@@ -13080,6 +13083,7 @@ function updateSessionValue(session, choiceMode, data) {
|
|
|
13080
13083
|
session.value = [];
|
|
13081
13084
|
}
|
|
13082
13085
|
}
|
|
13086
|
+
session.selector = data.selector;
|
|
13083
13087
|
}
|
|
13084
13088
|
const React = _dll_react;
|
|
13085
13089
|
const ReactDOM = _dll_react_dom;
|
|
@@ -13126,6 +13130,9 @@ class MultipleChoice extends HTMLElement {
|
|
|
13126
13130
|
log$1('render complete - render math');
|
|
13127
13131
|
renderMath(this);
|
|
13128
13132
|
});
|
|
13133
|
+
if (this._model.keyboardEventsEnabled === true) {
|
|
13134
|
+
this.enableKeyboardEvents();
|
|
13135
|
+
}
|
|
13129
13136
|
} else {
|
|
13130
13137
|
log$1('skip');
|
|
13131
13138
|
}
|
|
@@ -13238,6 +13245,33 @@ class MultipleChoice extends HTMLElement {
|
|
|
13238
13245
|
subtree: true
|
|
13239
13246
|
});
|
|
13240
13247
|
}
|
|
13248
|
+
enableKeyboardEvents() {
|
|
13249
|
+
window.addEventListener('keydown', this.handleKeyDown.bind(this));
|
|
13250
|
+
}
|
|
13251
|
+
disconnectedCallback() {
|
|
13252
|
+
window.removeEventListener('keydown', this.handleKeyDown.bind(this));
|
|
13253
|
+
}
|
|
13254
|
+
handleKeyDown(event) {
|
|
13255
|
+
if (!this._model || !this._session) {
|
|
13256
|
+
return;
|
|
13257
|
+
}
|
|
13258
|
+
const keyToIndex = key => {
|
|
13259
|
+
const numOffset = key >= '1' && key <= '9' ? key - '1' : key === '0' ? 9 : -1;
|
|
13260
|
+
const letterOffset = (/^[a-jA-J]$/).test(key) ? key.toLowerCase().charCodeAt(0) - ('a').charCodeAt(0) : -1;
|
|
13261
|
+
return numOffset >= 0 ? numOffset : letterOffset;
|
|
13262
|
+
};
|
|
13263
|
+
const choiceIndex = keyToIndex(event.key);
|
|
13264
|
+
if (choiceIndex === undefined || choiceIndex >= this._model.choices.length) {
|
|
13265
|
+
return;
|
|
13266
|
+
}
|
|
13267
|
+
const currentValue = this._session.value || [];
|
|
13268
|
+
const choiceId = this._model.choices[choiceIndex].value;
|
|
13269
|
+
const newValue = {
|
|
13270
|
+
value: choiceId,
|
|
13271
|
+
selected: !currentValue.includes(choiceId)
|
|
13272
|
+
};
|
|
13273
|
+
this._onChange(newValue);
|
|
13274
|
+
}
|
|
13241
13275
|
}
|
|
13242
13276
|
const {cloneDeep: cloneDeep} = _dll_lodash;
|
|
13243
13277
|
const {get: get} = _dll_lodash;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.5-next.0+907167450",
|
|
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.
|
|
10
|
+
"@pie-element/multiple-choice": "^9.11.1-next.0+907167450",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
12
|
"@pie-lib/pie-toolbox": "2.9.0",
|
|
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": "9071674501549a147810c5932d1d45a99eeab4d2",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|