@pie-element/math-inline 7.26.1-next.0 → 7.26.1-next.7
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/lib/main.js +75 -10
- package/lib/main.js.map +1 -1
- package/lib/simple-question-block.js +10 -20
- package/lib/simple-question-block.js.map +1 -1
- package/module/element.js +134 -76
- package/module/print.js +134 -76
- package/package.json +2 -2
package/module/element.js
CHANGED
|
@@ -8398,7 +8398,9 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8398
8398
|
model: PropTypes$1.object.isRequired,
|
|
8399
8399
|
emptyResponse: PropTypes$1.bool,
|
|
8400
8400
|
session: PropTypes$1.object.isRequired,
|
|
8401
|
-
showCorrect: PropTypes$1.bool
|
|
8401
|
+
showCorrect: PropTypes$1.bool,
|
|
8402
|
+
onSubFieldFocus: PropTypes$1.func.isRequired,
|
|
8403
|
+
showKeypad: PropTypes$1.bool.isRequired
|
|
8402
8404
|
};
|
|
8403
8405
|
}
|
|
8404
8406
|
constructor(props) {
|
|
@@ -8406,17 +8408,8 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8406
8408
|
SimpleQuestionBlockRaw.prototype.__init.call(this);
|
|
8407
8409
|
SimpleQuestionBlockRaw.prototype.__init2.call(this);
|
|
8408
8410
|
SimpleQuestionBlockRaw.prototype.__init3.call(this);
|
|
8409
|
-
this.state = {
|
|
8410
|
-
showKeypad: true
|
|
8411
|
-
};
|
|
8412
8411
|
this.mathToolBarId = `math-toolbar-${new Date().getTime()}`;
|
|
8413
8412
|
}
|
|
8414
|
-
componentDidMount() {
|
|
8415
|
-
window.addEventListener('click', this.handleClick);
|
|
8416
|
-
}
|
|
8417
|
-
componentWillUnmount() {
|
|
8418
|
-
window.removeEventListener('click', this.handleClick);
|
|
8419
|
-
}
|
|
8420
8413
|
__init() {
|
|
8421
8414
|
this.mathToolBarContainsTarget = e => document.getElementById(this.mathToolBarId).contains(e.target);
|
|
8422
8415
|
}
|
|
@@ -8432,12 +8425,13 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8432
8425
|
};
|
|
8433
8426
|
}
|
|
8434
8427
|
__init3() {
|
|
8435
|
-
this.onFocus = () =>
|
|
8436
|
-
|
|
8437
|
-
|
|
8428
|
+
this.onFocus = () => {
|
|
8429
|
+
const {onSubFieldFocus} = this.props;
|
|
8430
|
+
onSubFieldFocus(this.mathToolBarId);
|
|
8431
|
+
};
|
|
8438
8432
|
}
|
|
8439
8433
|
render() {
|
|
8440
|
-
const {classes, model, showCorrect, session, emptyResponse, onSimpleResponseChange} = this.props;
|
|
8434
|
+
const {classes, model, showCorrect, session, emptyResponse, onSimpleResponseChange, showKeypad} = this.props;
|
|
8441
8435
|
const {config, disabled, correctness} = model || ({});
|
|
8442
8436
|
if (!config) {
|
|
8443
8437
|
return;
|
|
@@ -8446,10 +8440,11 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8446
8440
|
const {responses, equationEditor} = config;
|
|
8447
8441
|
return React$2.createElement('div', {
|
|
8448
8442
|
className: classes.expression,
|
|
8443
|
+
'data-keypad': true,
|
|
8449
8444
|
__self: this,
|
|
8450
8445
|
__source: {
|
|
8451
8446
|
fileName: _jsxFileName$1,
|
|
8452
|
-
lineNumber:
|
|
8447
|
+
lineNumber: 57
|
|
8453
8448
|
}
|
|
8454
8449
|
}, showCorrect || disabled ? React$2.createElement('div', {
|
|
8455
8450
|
className: cx$1(classes.static, {
|
|
@@ -8459,21 +8454,21 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8459
8454
|
__self: this,
|
|
8460
8455
|
__source: {
|
|
8461
8456
|
fileName: _jsxFileName$1,
|
|
8462
|
-
lineNumber:
|
|
8457
|
+
lineNumber: 59
|
|
8463
8458
|
}
|
|
8464
8459
|
}, React$2.createElement(mq$1.Static, {
|
|
8465
8460
|
latex: showCorrect ? responses && responses.length && responses[0].answer : session.response || '',
|
|
8466
8461
|
__self: this,
|
|
8467
8462
|
__source: {
|
|
8468
8463
|
fileName: _jsxFileName$1,
|
|
8469
|
-
lineNumber:
|
|
8464
|
+
lineNumber: 65
|
|
8470
8465
|
}
|
|
8471
8466
|
})) : React$2.createElement('div', {
|
|
8472
8467
|
id: this.mathToolBarId,
|
|
8473
8468
|
__self: this,
|
|
8474
8469
|
__source: {
|
|
8475
8470
|
fileName: _jsxFileName$1,
|
|
8476
|
-
lineNumber:
|
|
8471
|
+
lineNumber: 70
|
|
8477
8472
|
}
|
|
8478
8473
|
}, React$2.createElement(MathToolbar, {
|
|
8479
8474
|
classNames: {
|
|
@@ -8485,12 +8480,12 @@ class SimpleQuestionBlockRaw extends React$2.Component {
|
|
|
8485
8480
|
onDone: () => {},
|
|
8486
8481
|
onFocus: this.onFocus,
|
|
8487
8482
|
controlledKeypad: true,
|
|
8488
|
-
showKeypad:
|
|
8483
|
+
showKeypad: showKeypad,
|
|
8489
8484
|
hideDoneButton: true,
|
|
8490
8485
|
__self: this,
|
|
8491
8486
|
__source: {
|
|
8492
8487
|
fileName: _jsxFileName$1,
|
|
8493
|
-
lineNumber:
|
|
8488
|
+
lineNumber: 71
|
|
8494
8489
|
}
|
|
8495
8490
|
})));
|
|
8496
8491
|
}
|
|
@@ -11874,6 +11869,9 @@ class Main extends React$1.Component {
|
|
|
11874
11869
|
Main.prototype.__init11.call(this);
|
|
11875
11870
|
Main.prototype.__init12.call(this);
|
|
11876
11871
|
Main.prototype.__init13.call(this);
|
|
11872
|
+
Main.prototype.__init14.call(this);
|
|
11873
|
+
Main.prototype.__init15.call(this);
|
|
11874
|
+
Main.prototype.__init16.call(this);
|
|
11877
11875
|
const answers = {};
|
|
11878
11876
|
if (props.model.config && props.model.config.expression) {
|
|
11879
11877
|
let answerBlocks = 1;
|
|
@@ -11890,7 +11888,8 @@ class Main extends React$1.Component {
|
|
|
11890
11888
|
answers
|
|
11891
11889
|
},
|
|
11892
11890
|
activeAnswerBlock: '',
|
|
11893
|
-
showCorrect: this.props.model.config.alwaysShowCorrect || false
|
|
11891
|
+
showCorrect: this.props.model.config.alwaysShowCorrect || false,
|
|
11892
|
+
tooltipContainerRef: React$1.createRef()
|
|
11894
11893
|
};
|
|
11895
11894
|
}
|
|
11896
11895
|
UNSAFE_componentWillMount() {
|
|
@@ -11997,8 +11996,13 @@ class Main extends React$1.Component {
|
|
|
11997
11996
|
this.updateAria();
|
|
11998
11997
|
setTimeout(() => renderMath(this.root), 100);
|
|
11999
11998
|
}
|
|
12000
|
-
componentDidUpdate() {
|
|
11999
|
+
componentDidUpdate(prevProps, prevState) {
|
|
12001
12000
|
this.handleAnswerBlockDomUpdate();
|
|
12001
|
+
const prevResponseType = _optionalChain([prevProps, 'access', _7 => _7.model, 'optionalAccess', _8 => _8.config, 'optionalAccess', _9 => _9.responseType]);
|
|
12002
|
+
const currentResponseType = _optionalChain([this, 'access', _10 => _10.props, 'access', _11 => _11.model, 'optionalAccess', _12 => _12.config, 'optionalAccess', _13 => _13.responseType]);
|
|
12003
|
+
if (prevResponseType !== currentResponseType) {
|
|
12004
|
+
this.updateAria();
|
|
12005
|
+
}
|
|
12002
12006
|
}
|
|
12003
12007
|
__init2() {
|
|
12004
12008
|
this.updateAria = () => {
|
|
@@ -12017,7 +12021,7 @@ class Main extends React$1.Component {
|
|
|
12017
12021
|
instructionsElement = document.createElement('span');
|
|
12018
12022
|
instructionsElement.id = instructionsId;
|
|
12019
12023
|
instructionsElement.className = classes.srOnly;
|
|
12020
|
-
instructionsElement.textContent = 'This field
|
|
12024
|
+
instructionsElement.textContent = 'This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.';
|
|
12021
12025
|
parent.insertBefore(instructionsElement, elem);
|
|
12022
12026
|
}
|
|
12023
12027
|
elem.setAttribute('aria-describedby', instructionsId);
|
|
@@ -12027,9 +12031,64 @@ class Main extends React$1.Component {
|
|
|
12027
12031
|
};
|
|
12028
12032
|
}
|
|
12029
12033
|
__init3() {
|
|
12030
|
-
this.
|
|
12034
|
+
this.focusFirstKeypadElement = () => {
|
|
12035
|
+
setTimeout(() => {
|
|
12036
|
+
const keypadElement = document.querySelector('[data-keypad]');
|
|
12037
|
+
if (keypadElement) {
|
|
12038
|
+
const firstButton = keypadElement.querySelector("button, [role='button']");
|
|
12039
|
+
if (firstButton) {
|
|
12040
|
+
firstButton.focus();
|
|
12041
|
+
}
|
|
12042
|
+
}
|
|
12043
|
+
}, 0);
|
|
12044
|
+
};
|
|
12031
12045
|
}
|
|
12032
12046
|
__init4() {
|
|
12047
|
+
this.handleKeyDown = (event, id) => {
|
|
12048
|
+
const isAnswerInputFocused = document.activeElement.getAttribute('aria-label') === 'Enter answer.';
|
|
12049
|
+
const isClickOrTouchEvent = event.type === 'click' || event.type === 'touchstart';
|
|
12050
|
+
if (isAnswerInputFocused && (event.key === 'ArrowDown' || isClickOrTouchEvent)) {
|
|
12051
|
+
this.setState({
|
|
12052
|
+
activeAnswerBlock: id
|
|
12053
|
+
}, () => {
|
|
12054
|
+
if (event.key === 'ArrowDown') {
|
|
12055
|
+
this.focusFirstKeypadElement();
|
|
12056
|
+
}
|
|
12057
|
+
});
|
|
12058
|
+
}
|
|
12059
|
+
if (!isAnswerInputFocused && isClickOrTouchEvent || event.key === 'Escape') {
|
|
12060
|
+
this.setState({
|
|
12061
|
+
activeAnswerBlock: ''
|
|
12062
|
+
});
|
|
12063
|
+
}
|
|
12064
|
+
};
|
|
12065
|
+
}
|
|
12066
|
+
__init5() {
|
|
12067
|
+
this.onSubFieldFocus = id => {
|
|
12068
|
+
const handleEvent = event => {
|
|
12069
|
+
this.handleKeyDown(event, id);
|
|
12070
|
+
};
|
|
12071
|
+
document.addEventListener('keydown', handleEvent);
|
|
12072
|
+
document.addEventListener('click', handleEvent);
|
|
12073
|
+
document.addEventListener('touchstart', handleEvent);
|
|
12074
|
+
};
|
|
12075
|
+
}
|
|
12076
|
+
__init6() {
|
|
12077
|
+
this.cleanupKeyDownListener = () => {
|
|
12078
|
+
document.removeEventListener('keydown', this.handleEvent);
|
|
12079
|
+
document.removeEventListener('click', this.handleEvent);
|
|
12080
|
+
document.removeEventListener('touchstart', this.handleEvent);
|
|
12081
|
+
};
|
|
12082
|
+
}
|
|
12083
|
+
componentWillUnmount() {
|
|
12084
|
+
if (this.cleanupKeyDownListener) {
|
|
12085
|
+
this.cleanupKeyDownListener();
|
|
12086
|
+
}
|
|
12087
|
+
}
|
|
12088
|
+
__init7() {
|
|
12089
|
+
this.onDone = () => {};
|
|
12090
|
+
}
|
|
12091
|
+
__init8() {
|
|
12033
12092
|
this.onSimpleResponseChange = response => {
|
|
12034
12093
|
this.setState(state => ({
|
|
12035
12094
|
session: {
|
|
@@ -12039,14 +12098,7 @@ class Main extends React$1.Component {
|
|
|
12039
12098
|
}), this.callOnSessionChange);
|
|
12040
12099
|
};
|
|
12041
12100
|
}
|
|
12042
|
-
|
|
12043
|
-
this.onSubFieldFocus = id => {
|
|
12044
|
-
this.setState({
|
|
12045
|
-
activeAnswerBlock: id
|
|
12046
|
-
});
|
|
12047
|
-
};
|
|
12048
|
-
}
|
|
12049
|
-
__init6() {
|
|
12101
|
+
__init9() {
|
|
12050
12102
|
this.toNodeData = data => {
|
|
12051
12103
|
if (!data) {
|
|
12052
12104
|
return;
|
|
@@ -12071,12 +12123,12 @@ class Main extends React$1.Component {
|
|
|
12071
12123
|
}
|
|
12072
12124
|
};
|
|
12073
12125
|
}
|
|
12074
|
-
|
|
12126
|
+
__init10() {
|
|
12075
12127
|
this.setInput = input => {
|
|
12076
12128
|
this.input = input;
|
|
12077
12129
|
};
|
|
12078
12130
|
}
|
|
12079
|
-
|
|
12131
|
+
__init11() {
|
|
12080
12132
|
this.onClick = data => {
|
|
12081
12133
|
const c = this.toNodeData(data);
|
|
12082
12134
|
if (c.type === 'clear') {
|
|
@@ -12097,7 +12149,7 @@ class Main extends React$1.Component {
|
|
|
12097
12149
|
this.input.focus();
|
|
12098
12150
|
};
|
|
12099
12151
|
}
|
|
12100
|
-
|
|
12152
|
+
__init12() {
|
|
12101
12153
|
this.callOnSessionChange = () => {
|
|
12102
12154
|
const {onSessionChange} = this.props;
|
|
12103
12155
|
if (onSessionChange) {
|
|
@@ -12105,14 +12157,14 @@ class Main extends React$1.Component {
|
|
|
12105
12157
|
}
|
|
12106
12158
|
};
|
|
12107
12159
|
}
|
|
12108
|
-
|
|
12160
|
+
__init13() {
|
|
12109
12161
|
this.toggleShowCorrect = show => {
|
|
12110
12162
|
this.setState({
|
|
12111
12163
|
showCorrect: show
|
|
12112
12164
|
}, this.handleAnswerBlockDomUpdate);
|
|
12113
12165
|
};
|
|
12114
12166
|
}
|
|
12115
|
-
|
|
12167
|
+
__init14() {
|
|
12116
12168
|
this.subFieldChanged = (name, subfieldValue) => {
|
|
12117
12169
|
updateSpans();
|
|
12118
12170
|
if (name) {
|
|
@@ -12131,7 +12183,7 @@ class Main extends React$1.Component {
|
|
|
12131
12183
|
}
|
|
12132
12184
|
};
|
|
12133
12185
|
}
|
|
12134
|
-
|
|
12186
|
+
__init15() {
|
|
12135
12187
|
this.getFieldName = (changeField, fields) => {
|
|
12136
12188
|
const {answers} = this.state.session;
|
|
12137
12189
|
if (Object.keys(answers || ({})).length) {
|
|
@@ -12143,7 +12195,7 @@ class Main extends React$1.Component {
|
|
|
12143
12195
|
}
|
|
12144
12196
|
};
|
|
12145
12197
|
}
|
|
12146
|
-
|
|
12198
|
+
__init16() {
|
|
12147
12199
|
this.onBlur = e => {
|
|
12148
12200
|
const {relatedTarget, currentTarget} = e || ({});
|
|
12149
12201
|
function getParentWithRoleTooltip(element, depth = 0) {
|
|
@@ -12157,7 +12209,7 @@ class Main extends React$1.Component {
|
|
|
12157
12209
|
}
|
|
12158
12210
|
function getDeepChildDataKeypad(element, depth = 0) {
|
|
12159
12211
|
if (!element || depth >= 4) return null;
|
|
12160
|
-
const child = _optionalChain([element, 'optionalAccess',
|
|
12212
|
+
const child = _optionalChain([element, 'optionalAccess', _14 => _14.children, 'optionalAccess', _15 => _15[0]]);
|
|
12161
12213
|
if (!child) return null;
|
|
12162
12214
|
if (child.attributes && child.attributes['data-keypad']) {
|
|
12163
12215
|
return child;
|
|
@@ -12166,7 +12218,7 @@ class Main extends React$1.Component {
|
|
|
12166
12218
|
}
|
|
12167
12219
|
const parentWithTooltipRole = getParentWithRoleTooltip(relatedTarget);
|
|
12168
12220
|
const childWithDataKeypad = parentWithTooltipRole ? getDeepChildDataKeypad(parentWithTooltipRole) : null;
|
|
12169
|
-
if (!relatedTarget || !currentTarget || !_optionalChain([childWithDataKeypad, 'optionalAccess',
|
|
12221
|
+
if (!relatedTarget || !currentTarget || !_optionalChain([childWithDataKeypad, 'optionalAccess', _16 => _16.attributes, 'access', _17 => _17['data-keypad']])) {
|
|
12170
12222
|
this.setState({
|
|
12171
12223
|
activeAnswerBlock: ''
|
|
12172
12224
|
});
|
|
@@ -12186,7 +12238,7 @@ class Main extends React$1.Component {
|
|
|
12186
12238
|
}
|
|
12187
12239
|
render() {
|
|
12188
12240
|
const {model, classes} = this.props;
|
|
12189
|
-
const {activeAnswerBlock, showCorrect, session} = this.state;
|
|
12241
|
+
const {activeAnswerBlock, showCorrect, session, tooltipContainerRef} = this.state;
|
|
12190
12242
|
const {config, correctness, disabled, view, teacherInstructions, rationale, feedback, animationsDisabled, printMode, alwaysShowCorrect, language} = model || ({});
|
|
12191
12243
|
if (!config) {
|
|
12192
12244
|
return null;
|
|
@@ -12206,7 +12258,7 @@ class Main extends React$1.Component {
|
|
|
12206
12258
|
__self: this,
|
|
12207
12259
|
__source: {
|
|
12208
12260
|
fileName: _jsxFileName,
|
|
12209
|
-
lineNumber:
|
|
12261
|
+
lineNumber: 569
|
|
12210
12262
|
}
|
|
12211
12263
|
}, React$1.createElement(mq.Static, {
|
|
12212
12264
|
className: classes.static,
|
|
@@ -12220,7 +12272,7 @@ class Main extends React$1.Component {
|
|
|
12220
12272
|
__self: this,
|
|
12221
12273
|
__source: {
|
|
12222
12274
|
fileName: _jsxFileName,
|
|
12223
|
-
lineNumber:
|
|
12275
|
+
lineNumber: 570
|
|
12224
12276
|
}
|
|
12225
12277
|
}));
|
|
12226
12278
|
const midContent = React$1.createElement('div', {
|
|
@@ -12228,14 +12280,14 @@ class Main extends React$1.Component {
|
|
|
12228
12280
|
__self: this,
|
|
12229
12281
|
__source: {
|
|
12230
12282
|
fileName: _jsxFileName,
|
|
12231
|
-
lineNumber:
|
|
12283
|
+
lineNumber: 584
|
|
12232
12284
|
}
|
|
12233
12285
|
}, mode === 'gather' && React$1.createElement('h2', {
|
|
12234
12286
|
className: classes.srOnly,
|
|
12235
12287
|
__self: this,
|
|
12236
12288
|
__source: {
|
|
12237
12289
|
fileName: _jsxFileName,
|
|
12238
|
-
lineNumber:
|
|
12290
|
+
lineNumber: 585
|
|
12239
12291
|
}
|
|
12240
12292
|
}, "Math Equation Response Question"), viewMode && teacherInstructions && hasText(teacherInstructions) && (!animationsDisabled ? React$1.createElement(Collapsible, {
|
|
12241
12293
|
className: classes.collapsible,
|
|
@@ -12246,7 +12298,7 @@ class Main extends React$1.Component {
|
|
|
12246
12298
|
__self: this,
|
|
12247
12299
|
__source: {
|
|
12248
12300
|
fileName: _jsxFileName,
|
|
12249
|
-
lineNumber:
|
|
12301
|
+
lineNumber: 591
|
|
12250
12302
|
}
|
|
12251
12303
|
}, React$1.createElement('div', {
|
|
12252
12304
|
dangerouslySetInnerHTML: {
|
|
@@ -12255,7 +12307,7 @@ class Main extends React$1.Component {
|
|
|
12255
12307
|
__self: this,
|
|
12256
12308
|
__source: {
|
|
12257
12309
|
fileName: _jsxFileName,
|
|
12258
|
-
lineNumber:
|
|
12310
|
+
lineNumber: 595
|
|
12259
12311
|
}
|
|
12260
12312
|
})) : React$1.createElement('div', {
|
|
12261
12313
|
dangerouslySetInnerHTML: {
|
|
@@ -12264,28 +12316,28 @@ class Main extends React$1.Component {
|
|
|
12264
12316
|
__self: this,
|
|
12265
12317
|
__source: {
|
|
12266
12318
|
fileName: _jsxFileName,
|
|
12267
|
-
lineNumber:
|
|
12319
|
+
lineNumber: 598
|
|
12268
12320
|
}
|
|
12269
12321
|
})), prompt && React$1.createElement('div', {
|
|
12270
12322
|
className: classes.promptContainer,
|
|
12271
12323
|
__self: this,
|
|
12272
12324
|
__source: {
|
|
12273
12325
|
fileName: _jsxFileName,
|
|
12274
|
-
lineNumber:
|
|
12326
|
+
lineNumber: 602
|
|
12275
12327
|
}
|
|
12276
12328
|
}, React$1.createElement(PreviewPrompt, {
|
|
12277
12329
|
prompt: prompt,
|
|
12278
12330
|
__self: this,
|
|
12279
12331
|
__source: {
|
|
12280
12332
|
fileName: _jsxFileName,
|
|
12281
|
-
lineNumber:
|
|
12333
|
+
lineNumber: 603
|
|
12282
12334
|
}
|
|
12283
12335
|
})), studentPrintMode ? printView : React$1.createElement(Readable, {
|
|
12284
12336
|
false: true,
|
|
12285
12337
|
__self: this,
|
|
12286
12338
|
__source: {
|
|
12287
12339
|
fileName: _jsxFileName,
|
|
12288
|
-
lineNumber:
|
|
12340
|
+
lineNumber: 610
|
|
12289
12341
|
}
|
|
12290
12342
|
}, React$1.createElement('div', {
|
|
12291
12343
|
className: classes.inputAndKeypadContainer,
|
|
@@ -12293,7 +12345,7 @@ class Main extends React$1.Component {
|
|
|
12293
12345
|
__self: this,
|
|
12294
12346
|
__source: {
|
|
12295
12347
|
fileName: _jsxFileName,
|
|
12296
|
-
lineNumber:
|
|
12348
|
+
lineNumber: 611
|
|
12297
12349
|
}
|
|
12298
12350
|
}, responseType === ResponseTypes.simple && React$1.createElement(SimpleQuestionBlock, {
|
|
12299
12351
|
onSimpleResponseChange: this.onSimpleResponseChange,
|
|
@@ -12301,12 +12353,15 @@ class Main extends React$1.Component {
|
|
|
12301
12353
|
emptyResponse: emptyResponse,
|
|
12302
12354
|
model: model,
|
|
12303
12355
|
session: session,
|
|
12356
|
+
onSubFieldFocus: this.onSubFieldFocus,
|
|
12357
|
+
showKeypad: !!activeAnswerBlock,
|
|
12304
12358
|
__self: this,
|
|
12305
12359
|
__source: {
|
|
12306
12360
|
fileName: _jsxFileName,
|
|
12307
|
-
lineNumber:
|
|
12361
|
+
lineNumber: 613
|
|
12308
12362
|
}
|
|
12309
12363
|
}), responseType === ResponseTypes.advanced && React$1.createElement('div', {
|
|
12364
|
+
ref: tooltipContainerRef,
|
|
12310
12365
|
className: cx(classes.expression, {
|
|
12311
12366
|
[classes.incorrect]: !emptyResponse && !correct && !showCorrect,
|
|
12312
12367
|
[classes.correct]: !emptyResponse && (correct || showCorrect),
|
|
@@ -12317,7 +12372,7 @@ class Main extends React$1.Component {
|
|
|
12317
12372
|
__self: this,
|
|
12318
12373
|
__source: {
|
|
12319
12374
|
fileName: _jsxFileName,
|
|
12320
|
-
lineNumber:
|
|
12375
|
+
lineNumber: 625
|
|
12321
12376
|
}
|
|
12322
12377
|
}, React$1.createElement(Tooltip, {
|
|
12323
12378
|
ref: ref => this.setTooltipRef(ref),
|
|
@@ -12328,6 +12383,9 @@ class Main extends React$1.Component {
|
|
|
12328
12383
|
tooltip: classes.keypadTooltip,
|
|
12329
12384
|
popper: classes.keypadTooltipPopper
|
|
12330
12385
|
},
|
|
12386
|
+
PopperProps: {
|
|
12387
|
+
container: _optionalChain([tooltipContainerRef, 'optionalAccess', _18 => _18.current]) || undefined
|
|
12388
|
+
},
|
|
12331
12389
|
title: Object.keys(session.answers).map(answerId => answerId === activeAnswerBlock && !(showCorrect || disabled) && React$1.createElement('div', {
|
|
12332
12390
|
'data-keypad': true,
|
|
12333
12391
|
key: answerId,
|
|
@@ -12338,7 +12396,7 @@ class Main extends React$1.Component {
|
|
|
12338
12396
|
__self: this,
|
|
12339
12397
|
__source: {
|
|
12340
12398
|
fileName: _jsxFileName,
|
|
12341
|
-
lineNumber:
|
|
12399
|
+
lineNumber: 650
|
|
12342
12400
|
}
|
|
12343
12401
|
}, React$1.createElement(HorizontalKeypad, {
|
|
12344
12402
|
additionalKeys: additionalKeys,
|
|
@@ -12347,13 +12405,13 @@ class Main extends React$1.Component {
|
|
|
12347
12405
|
__self: this,
|
|
12348
12406
|
__source: {
|
|
12349
12407
|
fileName: _jsxFileName,
|
|
12350
|
-
lineNumber:
|
|
12408
|
+
lineNumber: 659
|
|
12351
12409
|
}
|
|
12352
12410
|
})) || null),
|
|
12353
12411
|
__self: this,
|
|
12354
12412
|
__source: {
|
|
12355
12413
|
fileName: _jsxFileName,
|
|
12356
|
-
lineNumber:
|
|
12414
|
+
lineNumber: 635
|
|
12357
12415
|
}
|
|
12358
12416
|
}, React$1.createElement(mq.Static, {
|
|
12359
12417
|
className: classes.static,
|
|
@@ -12367,7 +12425,7 @@ class Main extends React$1.Component {
|
|
|
12367
12425
|
__self: this,
|
|
12368
12426
|
__source: {
|
|
12369
12427
|
fileName: _jsxFileName,
|
|
12370
|
-
lineNumber:
|
|
12428
|
+
lineNumber: 669
|
|
12371
12429
|
}
|
|
12372
12430
|
}))))), viewMode && displayNote && React$1.createElement('div', {
|
|
12373
12431
|
className: classes.note,
|
|
@@ -12377,7 +12435,7 @@ class Main extends React$1.Component {
|
|
|
12377
12435
|
__self: this,
|
|
12378
12436
|
__source: {
|
|
12379
12437
|
fileName: _jsxFileName,
|
|
12380
|
-
lineNumber:
|
|
12438
|
+
lineNumber: 687
|
|
12381
12439
|
}
|
|
12382
12440
|
}), viewMode && rationale && hasText(rationale) && (!animationsDisabled ? React$1.createElement(Collapsible, {
|
|
12383
12441
|
labels: {
|
|
@@ -12387,7 +12445,7 @@ class Main extends React$1.Component {
|
|
|
12387
12445
|
__self: this,
|
|
12388
12446
|
__source: {
|
|
12389
12447
|
fileName: _jsxFileName,
|
|
12390
|
-
lineNumber:
|
|
12448
|
+
lineNumber: 694
|
|
12391
12449
|
}
|
|
12392
12450
|
}, React$1.createElement('div', {
|
|
12393
12451
|
dangerouslySetInnerHTML: {
|
|
@@ -12396,7 +12454,7 @@ class Main extends React$1.Component {
|
|
|
12396
12454
|
__self: this,
|
|
12397
12455
|
__source: {
|
|
12398
12456
|
fileName: _jsxFileName,
|
|
12399
|
-
lineNumber:
|
|
12457
|
+
lineNumber: 695
|
|
12400
12458
|
}
|
|
12401
12459
|
})) : React$1.createElement('div', {
|
|
12402
12460
|
dangerouslySetInnerHTML: {
|
|
@@ -12405,7 +12463,7 @@ class Main extends React$1.Component {
|
|
|
12405
12463
|
__self: this,
|
|
12406
12464
|
__source: {
|
|
12407
12465
|
fileName: _jsxFileName,
|
|
12408
|
-
lineNumber:
|
|
12466
|
+
lineNumber: 698
|
|
12409
12467
|
}
|
|
12410
12468
|
})));
|
|
12411
12469
|
if (tooltipModeEnabled && (showCorrectAnswerToggle || teacherInstructions && hasText(teacherInstructions) || rationale && hasText(rationale) || feedback)) {
|
|
@@ -12420,14 +12478,14 @@ class Main extends React$1.Component {
|
|
|
12420
12478
|
__self: this,
|
|
12421
12479
|
__source: {
|
|
12422
12480
|
fileName: _jsxFileName,
|
|
12423
|
-
lineNumber:
|
|
12481
|
+
lineNumber: 719
|
|
12424
12482
|
}
|
|
12425
12483
|
}, React$1.createElement('div', {
|
|
12426
12484
|
className: classes.main,
|
|
12427
12485
|
__self: this,
|
|
12428
12486
|
__source: {
|
|
12429
12487
|
fileName: _jsxFileName,
|
|
12430
|
-
lineNumber:
|
|
12488
|
+
lineNumber: 720
|
|
12431
12489
|
}
|
|
12432
12490
|
}, showCorrectAnswerToggle && React$1.createElement(CorrectAnswerToggle, {
|
|
12433
12491
|
language: language,
|
|
@@ -12438,7 +12496,7 @@ class Main extends React$1.Component {
|
|
|
12438
12496
|
__self: this,
|
|
12439
12497
|
__source: {
|
|
12440
12498
|
fileName: _jsxFileName,
|
|
12441
|
-
lineNumber:
|
|
12499
|
+
lineNumber: 722
|
|
12442
12500
|
}
|
|
12443
12501
|
})), teacherInstructions && hasText(teacherInstructions) && React$1.createElement(Collapsible, {
|
|
12444
12502
|
className: classes.collapsible,
|
|
@@ -12450,14 +12508,14 @@ class Main extends React$1.Component {
|
|
|
12450
12508
|
__self: this,
|
|
12451
12509
|
__source: {
|
|
12452
12510
|
fileName: _jsxFileName,
|
|
12453
|
-
lineNumber:
|
|
12511
|
+
lineNumber: 733
|
|
12454
12512
|
}
|
|
12455
12513
|
}, React$1.createElement(PreviewPrompt, {
|
|
12456
12514
|
prompt: teacherInstructions,
|
|
12457
12515
|
__self: this,
|
|
12458
12516
|
__source: {
|
|
12459
12517
|
fileName: _jsxFileName,
|
|
12460
|
-
lineNumber:
|
|
12518
|
+
lineNumber: 741
|
|
12461
12519
|
}
|
|
12462
12520
|
})), displayNote && hasText(note) && React$1.createElement(Collapsible, {
|
|
12463
12521
|
className: classes.collapsible,
|
|
@@ -12473,14 +12531,14 @@ class Main extends React$1.Component {
|
|
|
12473
12531
|
__self: this,
|
|
12474
12532
|
__source: {
|
|
12475
12533
|
fileName: _jsxFileName,
|
|
12476
|
-
lineNumber:
|
|
12534
|
+
lineNumber: 745
|
|
12477
12535
|
}
|
|
12478
12536
|
}, React$1.createElement(PreviewPrompt, {
|
|
12479
12537
|
prompt: note,
|
|
12480
12538
|
__self: this,
|
|
12481
12539
|
__source: {
|
|
12482
12540
|
fileName: _jsxFileName,
|
|
12483
|
-
lineNumber:
|
|
12541
|
+
lineNumber: 753
|
|
12484
12542
|
}
|
|
12485
12543
|
})), rationale && hasText(rationale) && React$1.createElement(Collapsible, {
|
|
12486
12544
|
className: classes.collapsible,
|
|
@@ -12492,14 +12550,14 @@ class Main extends React$1.Component {
|
|
|
12492
12550
|
__self: this,
|
|
12493
12551
|
__source: {
|
|
12494
12552
|
fileName: _jsxFileName,
|
|
12495
|
-
lineNumber:
|
|
12553
|
+
lineNumber: 758
|
|
12496
12554
|
}
|
|
12497
12555
|
}, React$1.createElement(PreviewPrompt, {
|
|
12498
12556
|
prompt: rationale,
|
|
12499
12557
|
__self: this,
|
|
12500
12558
|
__source: {
|
|
12501
12559
|
fileName: _jsxFileName,
|
|
12502
|
-
lineNumber:
|
|
12560
|
+
lineNumber: 766
|
|
12503
12561
|
}
|
|
12504
12562
|
})), feedback && React$1.createElement(Feedback, {
|
|
12505
12563
|
correctness: correctness.correctness,
|
|
@@ -12507,13 +12565,13 @@ class Main extends React$1.Component {
|
|
|
12507
12565
|
__self: this,
|
|
12508
12566
|
__source: {
|
|
12509
12567
|
fileName: _jsxFileName,
|
|
12510
|
-
lineNumber:
|
|
12568
|
+
lineNumber: 770
|
|
12511
12569
|
}
|
|
12512
12570
|
})),
|
|
12513
12571
|
__self: this,
|
|
12514
12572
|
__source: {
|
|
12515
12573
|
fileName: _jsxFileName,
|
|
12516
|
-
lineNumber:
|
|
12574
|
+
lineNumber: 711
|
|
12517
12575
|
}
|
|
12518
12576
|
}, React$1.createElement('div', {
|
|
12519
12577
|
className: classes.mainContainer,
|
|
@@ -12521,7 +12579,7 @@ class Main extends React$1.Component {
|
|
|
12521
12579
|
__self: this,
|
|
12522
12580
|
__source: {
|
|
12523
12581
|
fileName: _jsxFileName,
|
|
12524
|
-
lineNumber:
|
|
12582
|
+
lineNumber: 774
|
|
12525
12583
|
}
|
|
12526
12584
|
}, midContent));
|
|
12527
12585
|
}
|
|
@@ -12531,7 +12589,7 @@ class Main extends React$1.Component {
|
|
|
12531
12589
|
__self: this,
|
|
12532
12590
|
__source: {
|
|
12533
12591
|
fileName: _jsxFileName,
|
|
12534
|
-
lineNumber:
|
|
12592
|
+
lineNumber: 782
|
|
12535
12593
|
}
|
|
12536
12594
|
}, midContent);
|
|
12537
12595
|
}
|