@pie-element/math-inline 8.4.1-next.22 → 8.4.1-next.5

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/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.2.0/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.9.0/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_pie_framework__mathquill, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.1.1/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.8.1/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) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -11309,11 +11309,10 @@ var en = {};
11309
11309
  primaryCorrectWithAlternates: 'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.'
11310
11310
  },
11311
11311
  multipleChoice: {
11312
- minSelections: 'Select at least {{minSelections}}.',
11312
+ minSelections_one: 'This question requires at least {{minSelections}} answer.',
11313
+ minSelections_other: 'This question requires at least {{minSelections}} answers.',
11313
11314
  maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
11314
- maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
11315
- minmaxSelections_equal: 'Select {{minSelections}}.',
11316
- minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.'
11315
+ maxSelections_other: 'Only {{maxSelections}} answers are allowed.'
11317
11316
  },
11318
11317
  selectText: {
11319
11318
  correctAnswerSelected: 'Correct answer selected',
@@ -11403,11 +11402,10 @@ var es = {};
11403
11402
  primaryCorrectWithAlternates: 'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.'
11404
11403
  },
11405
11404
  multipleChoice: {
11406
- minSelections: 'Seleccione al menos {{minSelections}}.',
11405
+ minSelections_one: 'Esta pregunta requiere al menos {{minSelections}} respuesta.',
11406
+ minSelections_other: 'Esta pregunta requiere al menos {{minSelections}} respuestas.',
11407
11407
  maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
11408
- maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
11409
- minmaxSelections_equal: 'Seleccione {{minSelections}}.',
11410
- minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.'
11408
+ maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.'
11411
11409
  },
11412
11410
  selectText: {
11413
11411
  correctAnswerSelected: 'Respuesta correcta seleccionada',
@@ -11576,16 +11574,6 @@ function generateAdditionalKeys(keyData = []) {
11576
11574
  label: key
11577
11575
  }));
11578
11576
  }
11579
- function isChildOfCurrentPieElement(child, parent) {
11580
- let node = child;
11581
- while (node !== null) {
11582
- if (node === parent) {
11583
- return true;
11584
- }
11585
- node = node.parentNode;
11586
- }
11587
- return false;
11588
- }
11589
11577
  function getKeyPadWidth(additionalKeys = [], equationEditor) {
11590
11578
  return Math.floor(additionalKeys.length / 5) * 30 + (equationEditor === 'miscellaneous' ? 600 : 500);
11591
11579
  }
@@ -11811,14 +11799,10 @@ class Main extends React$1.Component {
11811
11799
  }
11812
11800
  __init4() {
11813
11801
  this.handleKeyDown = (event, id) => {
11814
- const {config} = this.props.model;
11815
- const myElement = document.getElementById(config.id);
11816
- let isTrigerredFromActualPieElement = true;
11817
- isTrigerredFromActualPieElement = isChildOfCurrentPieElement(event.target, myElement);
11818
11802
  const isAnswerInputFocused = document.activeElement.getAttribute('aria-label') === 'Enter answer.';
11819
11803
  const isClickOrTouchEvent = event.type === 'click' || event.type === 'touchstart';
11820
11804
  if (isAnswerInputFocused && (event.key === 'ArrowDown' || isClickOrTouchEvent)) {
11821
- if (this.state.activeAnswerBlock !== id && isTrigerredFromActualPieElement) {
11805
+ if (this.state.activeAnswerBlock !== id) {
11822
11806
  this.cleanupKeyDownListener();
11823
11807
  this.setState({
11824
11808
  activeAnswerBlock: id
@@ -11974,7 +11958,6 @@ class Main extends React$1.Component {
11974
11958
  __init16() {
11975
11959
  this.onBlur = e => {
11976
11960
  const {relatedTarget, currentTarget} = e || ({});
11977
- const isKeypadOpen = currentTarget && currentTarget.closest('[role=tooltip]');
11978
11961
  function getParentWithRoleTooltip(element, depth = 0) {
11979
11962
  if (!element || depth >= 16) return null;
11980
11963
  const parent = element.offsetParent;
@@ -11996,11 +11979,9 @@ class Main extends React$1.Component {
11996
11979
  const parentWithTooltipRole = getParentWithRoleTooltip(relatedTarget);
11997
11980
  const childWithDataKeypad = parentWithTooltipRole ? getDeepChildDataKeypad(parentWithTooltipRole) : null;
11998
11981
  if (!relatedTarget || !currentTarget || !_optionalChain([childWithDataKeypad, 'optionalAccess', _16 => _16.attributes, 'access', _17 => _17['data-keypad']])) {
11999
- if (!isKeypadOpen) {
12000
- this.setState({
12001
- activeAnswerBlock: ''
12002
- });
12003
- }
11982
+ this.setState({
11983
+ activeAnswerBlock: ''
11984
+ });
12004
11985
  }
12005
11986
  };
12006
11987
  }
@@ -12022,7 +12003,7 @@ class Main extends React$1.Component {
12022
12003
  if (!config) {
12023
12004
  return null;
12024
12005
  }
12025
- const {showNote, note, prompt, responses, responseType, equationEditor, customKeys, id, env: {mode, role} = {}} = config || ({});
12006
+ const {showNote, note, prompt, responses, responseType, equationEditor, customKeys, env: {mode, role} = {}} = config || ({});
12026
12007
  const displayNote = (showCorrect || mode === 'view' && role === 'instructor') && showNote && note;
12027
12008
  const emptyResponse = isEmpty(responses);
12028
12009
  const showCorrectAnswerToggle = !emptyResponse && correctness && correctness.correctness !== 'correct';
@@ -12037,7 +12018,7 @@ class Main extends React$1.Component {
12037
12018
  __self: this,
12038
12019
  __source: {
12039
12020
  fileName: _jsxFileName,
12040
- lineNumber: 604
12021
+ lineNumber: 578
12041
12022
  }
12042
12023
  }, React$1.createElement(mq.Static, {
12043
12024
  className: classes.static,
@@ -12051,7 +12032,7 @@ class Main extends React$1.Component {
12051
12032
  __self: this,
12052
12033
  __source: {
12053
12034
  fileName: _jsxFileName,
12054
- lineNumber: 605
12035
+ lineNumber: 579
12055
12036
  }
12056
12037
  }));
12057
12038
  const midContent = React$1.createElement('div', {
@@ -12059,14 +12040,14 @@ class Main extends React$1.Component {
12059
12040
  __self: this,
12060
12041
  __source: {
12061
12042
  fileName: _jsxFileName,
12062
- lineNumber: 619
12043
+ lineNumber: 593
12063
12044
  }
12064
12045
  }, mode === 'gather' && React$1.createElement('h2', {
12065
12046
  className: classes.srOnly,
12066
12047
  __self: this,
12067
12048
  __source: {
12068
12049
  fileName: _jsxFileName,
12069
- lineNumber: 620
12050
+ lineNumber: 594
12070
12051
  }
12071
12052
  }, "Math Equation Response Question"), viewMode && teacherInstructions && hasText(teacherInstructions) && (!animationsDisabled ? React$1.createElement(Collapsible, {
12072
12053
  className: classes.collapsible,
@@ -12077,7 +12058,7 @@ class Main extends React$1.Component {
12077
12058
  __self: this,
12078
12059
  __source: {
12079
12060
  fileName: _jsxFileName,
12080
- lineNumber: 626
12061
+ lineNumber: 600
12081
12062
  }
12082
12063
  }, React$1.createElement('div', {
12083
12064
  dangerouslySetInnerHTML: {
@@ -12086,7 +12067,7 @@ class Main extends React$1.Component {
12086
12067
  __self: this,
12087
12068
  __source: {
12088
12069
  fileName: _jsxFileName,
12089
- lineNumber: 630
12070
+ lineNumber: 604
12090
12071
  }
12091
12072
  })) : React$1.createElement('div', {
12092
12073
  dangerouslySetInnerHTML: {
@@ -12095,28 +12076,28 @@ class Main extends React$1.Component {
12095
12076
  __self: this,
12096
12077
  __source: {
12097
12078
  fileName: _jsxFileName,
12098
- lineNumber: 633
12079
+ lineNumber: 607
12099
12080
  }
12100
12081
  })), prompt && React$1.createElement('div', {
12101
12082
  className: classes.promptContainer,
12102
12083
  __self: this,
12103
12084
  __source: {
12104
12085
  fileName: _jsxFileName,
12105
- lineNumber: 637
12086
+ lineNumber: 611
12106
12087
  }
12107
12088
  }, React$1.createElement(PreviewPrompt, {
12108
12089
  prompt: prompt,
12109
12090
  __self: this,
12110
12091
  __source: {
12111
12092
  fileName: _jsxFileName,
12112
- lineNumber: 638
12093
+ lineNumber: 612
12113
12094
  }
12114
12095
  })), studentPrintMode ? printView : React$1.createElement(Readable, {
12115
12096
  false: true,
12116
12097
  __self: this,
12117
12098
  __source: {
12118
12099
  fileName: _jsxFileName,
12119
- lineNumber: 645
12100
+ lineNumber: 619
12120
12101
  }
12121
12102
  }, React$1.createElement('div', {
12122
12103
  className: classes.inputAndKeypadContainer,
@@ -12124,7 +12105,7 @@ class Main extends React$1.Component {
12124
12105
  __self: this,
12125
12106
  __source: {
12126
12107
  fileName: _jsxFileName,
12127
- lineNumber: 646
12108
+ lineNumber: 620
12128
12109
  }
12129
12110
  }, responseType === ResponseTypes.simple && React$1.createElement(SimpleQuestionBlock, {
12130
12111
  onSimpleResponseChange: this.onSimpleResponseChange,
@@ -12137,7 +12118,7 @@ class Main extends React$1.Component {
12137
12118
  __self: this,
12138
12119
  __source: {
12139
12120
  fileName: _jsxFileName,
12140
- lineNumber: 648
12121
+ lineNumber: 622
12141
12122
  }
12142
12123
  }), responseType === ResponseTypes.advanced && React$1.createElement('div', {
12143
12124
  ref: tooltipContainerRef,
@@ -12151,7 +12132,7 @@ class Main extends React$1.Component {
12151
12132
  __self: this,
12152
12133
  __source: {
12153
12134
  fileName: _jsxFileName,
12154
- lineNumber: 660
12135
+ lineNumber: 634
12155
12136
  }
12156
12137
  }, React$1.createElement(Tooltip, {
12157
12138
  ref: ref => this.setTooltipRef(ref),
@@ -12185,7 +12166,7 @@ class Main extends React$1.Component {
12185
12166
  __self: this,
12186
12167
  __source: {
12187
12168
  fileName: _jsxFileName,
12188
- lineNumber: 695
12169
+ lineNumber: 669
12189
12170
  }
12190
12171
  }, React$1.createElement(HorizontalKeypad, {
12191
12172
  additionalKeys: additionalKeys,
@@ -12194,13 +12175,13 @@ class Main extends React$1.Component {
12194
12175
  __self: this,
12195
12176
  __source: {
12196
12177
  fileName: _jsxFileName,
12197
- lineNumber: 704
12178
+ lineNumber: 678
12198
12179
  }
12199
12180
  })) || null),
12200
12181
  __self: this,
12201
12182
  __source: {
12202
12183
  fileName: _jsxFileName,
12203
- lineNumber: 670
12184
+ lineNumber: 644
12204
12185
  }
12205
12186
  }, React$1.createElement(mq.Static, {
12206
12187
  className: classes.static,
@@ -12214,7 +12195,7 @@ class Main extends React$1.Component {
12214
12195
  __self: this,
12215
12196
  __source: {
12216
12197
  fileName: _jsxFileName,
12217
- lineNumber: 714
12198
+ lineNumber: 688
12218
12199
  }
12219
12200
  }))))), viewMode && displayNote && React$1.createElement('div', {
12220
12201
  className: classes.note,
@@ -12224,7 +12205,7 @@ class Main extends React$1.Component {
12224
12205
  __self: this,
12225
12206
  __source: {
12226
12207
  fileName: _jsxFileName,
12227
- lineNumber: 732
12208
+ lineNumber: 706
12228
12209
  }
12229
12210
  }), viewMode && rationale && hasText(rationale) && (!animationsDisabled ? React$1.createElement(Collapsible, {
12230
12211
  labels: {
@@ -12234,7 +12215,7 @@ class Main extends React$1.Component {
12234
12215
  __self: this,
12235
12216
  __source: {
12236
12217
  fileName: _jsxFileName,
12237
- lineNumber: 739
12218
+ lineNumber: 713
12238
12219
  }
12239
12220
  }, React$1.createElement('div', {
12240
12221
  dangerouslySetInnerHTML: {
@@ -12243,7 +12224,7 @@ class Main extends React$1.Component {
12243
12224
  __self: this,
12244
12225
  __source: {
12245
12226
  fileName: _jsxFileName,
12246
- lineNumber: 740
12227
+ lineNumber: 714
12247
12228
  }
12248
12229
  })) : React$1.createElement('div', {
12249
12230
  dangerouslySetInnerHTML: {
@@ -12252,17 +12233,16 @@ class Main extends React$1.Component {
12252
12233
  __self: this,
12253
12234
  __source: {
12254
12235
  fileName: _jsxFileName,
12255
- lineNumber: 743
12236
+ lineNumber: 717
12256
12237
  }
12257
12238
  })));
12258
12239
  if (tooltipModeEnabled && (showCorrectAnswerToggle || teacherInstructions && hasText(teacherInstructions) || rationale && hasText(rationale) || feedback)) {
12259
12240
  return React$1.createElement(UiLayout, {
12260
12241
  extraCSSRules: extraCSSRules,
12261
- id: id,
12262
12242
  __self: this,
12263
12243
  __source: {
12264
12244
  fileName: _jsxFileName,
12265
- lineNumber: 756
12245
+ lineNumber: 730
12266
12246
  }
12267
12247
  }, React$1.createElement(Tooltip, {
12268
12248
  interactive: true,
@@ -12275,14 +12255,14 @@ class Main extends React$1.Component {
12275
12255
  __self: this,
12276
12256
  __source: {
12277
12257
  fileName: _jsxFileName,
12278
- lineNumber: 765
12258
+ lineNumber: 739
12279
12259
  }
12280
12260
  }, React$1.createElement('div', {
12281
12261
  className: classes.main,
12282
12262
  __self: this,
12283
12263
  __source: {
12284
12264
  fileName: _jsxFileName,
12285
- lineNumber: 766
12265
+ lineNumber: 740
12286
12266
  }
12287
12267
  }, showCorrectAnswerToggle && React$1.createElement(CorrectAnswerToggle, {
12288
12268
  language: language,
@@ -12293,7 +12273,7 @@ class Main extends React$1.Component {
12293
12273
  __self: this,
12294
12274
  __source: {
12295
12275
  fileName: _jsxFileName,
12296
- lineNumber: 768
12276
+ lineNumber: 742
12297
12277
  }
12298
12278
  })), teacherInstructions && hasText(teacherInstructions) && React$1.createElement(Collapsible, {
12299
12279
  className: classes.collapsible,
@@ -12305,14 +12285,14 @@ class Main extends React$1.Component {
12305
12285
  __self: this,
12306
12286
  __source: {
12307
12287
  fileName: _jsxFileName,
12308
- lineNumber: 779
12288
+ lineNumber: 753
12309
12289
  }
12310
12290
  }, React$1.createElement(PreviewPrompt, {
12311
12291
  prompt: teacherInstructions,
12312
12292
  __self: this,
12313
12293
  __source: {
12314
12294
  fileName: _jsxFileName,
12315
- lineNumber: 787
12295
+ lineNumber: 761
12316
12296
  }
12317
12297
  })), displayNote && hasText(note) && React$1.createElement(Collapsible, {
12318
12298
  className: classes.collapsible,
@@ -12328,14 +12308,14 @@ class Main extends React$1.Component {
12328
12308
  __self: this,
12329
12309
  __source: {
12330
12310
  fileName: _jsxFileName,
12331
- lineNumber: 791
12311
+ lineNumber: 765
12332
12312
  }
12333
12313
  }, React$1.createElement(PreviewPrompt, {
12334
12314
  prompt: note,
12335
12315
  __self: this,
12336
12316
  __source: {
12337
12317
  fileName: _jsxFileName,
12338
- lineNumber: 799
12318
+ lineNumber: 773
12339
12319
  }
12340
12320
  })), rationale && hasText(rationale) && React$1.createElement(Collapsible, {
12341
12321
  className: classes.collapsible,
@@ -12347,14 +12327,14 @@ class Main extends React$1.Component {
12347
12327
  __self: this,
12348
12328
  __source: {
12349
12329
  fileName: _jsxFileName,
12350
- lineNumber: 804
12330
+ lineNumber: 778
12351
12331
  }
12352
12332
  }, React$1.createElement(PreviewPrompt, {
12353
12333
  prompt: rationale,
12354
12334
  __self: this,
12355
12335
  __source: {
12356
12336
  fileName: _jsxFileName,
12357
- lineNumber: 812
12337
+ lineNumber: 786
12358
12338
  }
12359
12339
  })), feedback && React$1.createElement(Feedback, {
12360
12340
  correctness: correctness.correctness,
@@ -12362,13 +12342,13 @@ class Main extends React$1.Component {
12362
12342
  __self: this,
12363
12343
  __source: {
12364
12344
  fileName: _jsxFileName,
12365
- lineNumber: 816
12345
+ lineNumber: 790
12366
12346
  }
12367
12347
  })),
12368
12348
  __self: this,
12369
12349
  __source: {
12370
12350
  fileName: _jsxFileName,
12371
- lineNumber: 757
12351
+ lineNumber: 731
12372
12352
  }
12373
12353
  }, React$1.createElement('div', {
12374
12354
  className: classes.mainContainer,
@@ -12376,12 +12356,11 @@ class Main extends React$1.Component {
12376
12356
  __self: this,
12377
12357
  __source: {
12378
12358
  fileName: _jsxFileName,
12379
- lineNumber: 820
12359
+ lineNumber: 794
12380
12360
  }
12381
12361
  }, midContent)));
12382
12362
  }
12383
12363
  return React$1.createElement(UiLayout, {
12384
- id: id,
12385
12364
  extraCSSRules: extraCSSRules,
12386
12365
  className: classes.mainContainer,
12387
12366
  ref: r => {
@@ -12391,7 +12370,7 @@ class Main extends React$1.Component {
12391
12370
  __self: this,
12392
12371
  __source: {
12393
12372
  fileName: _jsxFileName,
12394
- lineNumber: 829
12373
+ lineNumber: 803
12395
12374
  }
12396
12375
  }, midContent);
12397
12376
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "8.4.1-next.22+87b282e00",
7
+ "version": "8.4.1-next.5+e1143f1fb",
8
8
  "main": "lib/index.js",
9
9
  "description": "",
10
10
  "scripts": {
@@ -14,7 +14,7 @@
14
14
  "@material-ui/core": "^3.9.2",
15
15
  "@pie-framework/mathquill": "^1.1.3",
16
16
  "@pie-framework/pie-player-events": "^0.1.0",
17
- "@pie-lib/pie-toolbox": "2.9.0",
17
+ "@pie-lib/pie-toolbox": "2.8.0",
18
18
  "classnames": "^2.2.5",
19
19
  "debug": "^4.1.1",
20
20
  "lodash": "^4.17.10",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "author": "",
26
26
  "license": "ISC",
27
- "gitHead": "87b282e0032de66385a8d361264a31d2b18a72ae",
27
+ "gitHead": "e1143f1fbc95c5de63c62abdf0d0bc8231f80995",
28
28
  "module": "src/index.js",
29
29
  "exports": {
30
30
  ".": "./src/index.js",