@pie-lib/math-toolbar 1.27.1-next.0 → 1.28.1

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/esm/index.js ADDED
@@ -0,0 +1,985 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import cx from 'classnames';
4
+ import debug from 'debug';
5
+ import Button from '@material-ui/core/Button';
6
+ import { withStyles } from '@material-ui/core/styles';
7
+ import MenuItem from '@material-ui/core/MenuItem';
8
+ import Select from '@material-ui/core/Select';
9
+ import isEqual from 'lodash/isEqual';
10
+ import { mq, updateSpans, HorizontalKeypad } from '@pie-lib/math-input';
11
+ import { InputContainer, color } from '@pie-lib/render-ui';
12
+ import IconButton from '@material-ui/core/IconButton';
13
+ import Check from '@material-ui/icons/Check';
14
+
15
+ function _extends() {
16
+ _extends = Object.assign || function (target) {
17
+ for (var i = 1; i < arguments.length; i++) {
18
+ var source = arguments[i];
19
+
20
+ for (var key in source) {
21
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
22
+ target[key] = source[key];
23
+ }
24
+ }
25
+ }
26
+
27
+ return target;
28
+ };
29
+
30
+ return _extends.apply(this, arguments);
31
+ }
32
+
33
+ const markFractionBaseSuperscripts = () => {
34
+ document.querySelectorAll('.mq-supsub.mq-sup-only').forEach(supsub => {
35
+ const prev = supsub.previousElementSibling;
36
+
37
+ if (prev && prev.classList.contains('mq-non-leaf') && prev.querySelector('.mq-fraction')) {
38
+ supsub.classList.add('mq-after-fraction-group');
39
+ } else {
40
+ supsub.classList.remove('mq-after-fraction-group');
41
+ }
42
+ });
43
+ };
44
+
45
+ const {
46
+ commonMqFontStyles: commonMqFontStyles$1,
47
+ commonMqKeyboardStyles,
48
+ longdivStyles: longdivStyles$1,
49
+ supsubStyles: supsubStyles$1
50
+ } = mq.CommonMqStyles;
51
+ const log$1 = debug('@pie-lib:math-toolbar:editor-and-pad');
52
+ const decimalRegex = /\.|,/g;
53
+
54
+ const toNodeData = data => {
55
+ if (!data) {
56
+ return;
57
+ }
58
+
59
+ const {
60
+ type,
61
+ value
62
+ } = data;
63
+
64
+ if (type === 'command' || type === 'cursor') {
65
+ return data;
66
+ } else if (type === 'answer') {
67
+ return _extends({
68
+ type: 'answer'
69
+ }, data);
70
+ } else if (value === 'clear') {
71
+ return {
72
+ type: 'clear'
73
+ };
74
+ } else {
75
+ return {
76
+ type: 'write',
77
+ value
78
+ };
79
+ }
80
+ };
81
+
82
+ class EditorAndPad extends React.Component {
83
+ constructor(props) {
84
+ super(props);
85
+
86
+ this.onClick = data => {
87
+ const {
88
+ noDecimal,
89
+ noLatexHandling,
90
+ onChange
91
+ } = this.props;
92
+ const c = toNodeData(data);
93
+ log$1('mathChange: ', c);
94
+
95
+ if (noLatexHandling) {
96
+ onChange(c.value);
97
+ return;
98
+ } // if decimals are not allowed for this response, we discard the input
99
+
100
+
101
+ if (noDecimal && (c.value === '.' || c.value === ',')) {
102
+ return;
103
+ }
104
+
105
+ if (!c) {
106
+ return;
107
+ }
108
+
109
+ if (c.type === 'clear') {
110
+ log$1('call clear...');
111
+ this.input.clear();
112
+ } else if (c.type === 'command') {
113
+ this.input.command(c.value);
114
+ } else if (c.type === 'cursor') {
115
+ this.input.keystroke(c.value);
116
+ } else if (c.type === 'answer') {
117
+ this.input.write('%response%');
118
+ } else {
119
+ this.input.write(c.value);
120
+ }
121
+ };
122
+
123
+ this.updateDisable = isEdit => {
124
+ const {
125
+ maxResponseAreas
126
+ } = this.props;
127
+
128
+ if (maxResponseAreas) {
129
+ const shouldDisable = this.checkResponseAreasNumber(maxResponseAreas, isEdit);
130
+ this.setState({
131
+ addDisabled: shouldDisable
132
+ });
133
+ }
134
+ };
135
+
136
+ this.onAnswerBlockClick = () => {
137
+ this.props.onAnswerBlockAdd();
138
+ this.onClick({
139
+ type: 'answer'
140
+ });
141
+ this.updateDisable(true);
142
+ };
143
+
144
+ this.onEditorChange = latex => {
145
+ const {
146
+ onChange,
147
+ noDecimal
148
+ } = this.props;
149
+ updateSpans();
150
+ markFractionBaseSuperscripts();
151
+ this.updateDisable(true); // if no decimals are allowed and the last change is a decimal dot, discard the change
152
+
153
+ if (noDecimal && (latex.indexOf('.') !== -1 || latex.indexOf(',') !== -1) && this.input) {
154
+ this.input.clear();
155
+ this.input.write(latex.replace(decimalRegex, ''));
156
+ return;
157
+ } // eslint-disable-next-line no-useless-escape
158
+
159
+
160
+ const regexMatch = latex.match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);
161
+
162
+ if (this.input && regexMatch && regexMatch != null && regexMatch.length) {
163
+ try {
164
+ this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent);
165
+
166
+ this.input.mathField.el().dispatchEvent(new KeyboardEvent('keydown', {
167
+ keyCode: 8
168
+ }));
169
+ } catch (e) {
170
+ // eslint-disable-next-line no-console
171
+ console.error(e.toString());
172
+ }
173
+
174
+ return;
175
+ }
176
+
177
+ onChange(latex);
178
+ };
179
+
180
+ this.onEditorTypeChange = evt => {
181
+ this.setState({
182
+ equationEditor: evt.target.value
183
+ });
184
+ };
185
+
186
+ this.checkResponseAreasNumber = (maxResponseAreas, isEdit) => {
187
+ const {
188
+ latex
189
+ } = this.input && this.input.props || {};
190
+
191
+ if (latex) {
192
+ const count = (latex.match(/answerBlock/g) || []).length;
193
+ return isEdit ? count === maxResponseAreas - 1 : count === maxResponseAreas;
194
+ }
195
+
196
+ return false;
197
+ };
198
+
199
+ this.state = {
200
+ equationEditor: 'item-authoring',
201
+ addDisabled: false
202
+ };
203
+ }
204
+
205
+ componentDidMount() {
206
+ if (this.input && this.props.autoFocus) {
207
+ this.input.focus();
208
+ }
209
+ }
210
+
211
+ /** Only render if the mathquill instance's latex is different
212
+ * or the keypad state changed from one state to the other (shown / hidden) */
213
+ shouldComponentUpdate(nextProps, nextState) {
214
+ const inputIsDifferent = this.input.mathField.latex() !== nextProps.latex;
215
+ log$1('[shouldComponentUpdate] ', 'inputIsDifferent: ', inputIsDifferent);
216
+
217
+ if (!isEqual(this.props.error, nextProps.error)) {
218
+ return true;
219
+ }
220
+
221
+ if (!inputIsDifferent && this.props.keypadMode !== nextProps.keypadMode) {
222
+ return true;
223
+ }
224
+
225
+ if (!inputIsDifferent && this.props.noDecimal !== nextProps.noDecimal) {
226
+ return true;
227
+ }
228
+
229
+ if (!inputIsDifferent && this.state.equationEditor !== nextState.equationEditor) {
230
+ return true;
231
+ }
232
+
233
+ if (!inputIsDifferent && this.props.controlledKeypad) {
234
+ return this.props.showKeypad !== nextProps.showKeypad;
235
+ }
236
+
237
+ return inputIsDifferent;
238
+ }
239
+
240
+ render() {
241
+ const {
242
+ classNames,
243
+ keypadMode,
244
+ allowAnswerBlock,
245
+ additionalKeys,
246
+ controlledKeypad,
247
+ controlledKeypadMode,
248
+ showKeypad,
249
+ setKeypadInteraction,
250
+ noDecimal,
251
+ hideInput,
252
+ layoutForKeyPad,
253
+ latex,
254
+ onFocus,
255
+ onBlur,
256
+ classes,
257
+ error
258
+ } = this.props;
259
+ const shouldShowKeypad = !controlledKeypad || controlledKeypad && showKeypad;
260
+ const {
261
+ addDisabled
262
+ } = this.state;
263
+ log$1('[render]', latex);
264
+ return /*#__PURE__*/React.createElement("div", {
265
+ className: cx(classes.mathToolbar, classNames.mathToolbar)
266
+ }, /*#__PURE__*/React.createElement("div", {
267
+ className: cx(classes.inputAndTypeContainer, {
268
+ [classes.hide]: hideInput
269
+ })
270
+ }, controlledKeypadMode && /*#__PURE__*/React.createElement(InputContainer, {
271
+ label: "Equation Editor",
272
+ className: classes.selectContainer
273
+ }, /*#__PURE__*/React.createElement(Select, {
274
+ className: classes.select,
275
+ onChange: this.onEditorTypeChange,
276
+ value: this.state.equationEditor
277
+ }, /*#__PURE__*/React.createElement(MenuItem, {
278
+ value: "non-negative-integers"
279
+ }, "Numeric - Non-Negative Integers"), /*#__PURE__*/React.createElement(MenuItem, {
280
+ value: "integers"
281
+ }, "Numeric - Integers"), /*#__PURE__*/React.createElement(MenuItem, {
282
+ value: "decimals"
283
+ }, "Numeric - Decimals"), /*#__PURE__*/React.createElement(MenuItem, {
284
+ value: "fractions"
285
+ }, "Numeric - Fractions"), /*#__PURE__*/React.createElement(MenuItem, {
286
+ value: 1
287
+ }, "Grade 1 - 2"), /*#__PURE__*/React.createElement(MenuItem, {
288
+ value: 3
289
+ }, "Grade 3 - 5"), /*#__PURE__*/React.createElement(MenuItem, {
290
+ value: 6
291
+ }, "Grade 6 - 7"), /*#__PURE__*/React.createElement(MenuItem, {
292
+ value: 8
293
+ }, "Grade 8 - HS"), /*#__PURE__*/React.createElement(MenuItem, {
294
+ value: 'geometry'
295
+ }, "Geometry"), /*#__PURE__*/React.createElement(MenuItem, {
296
+ value: 'advanced-algebra'
297
+ }, "Advanced Algebra"), /*#__PURE__*/React.createElement(MenuItem, {
298
+ value: 'statistics'
299
+ }, "Statistics"), /*#__PURE__*/React.createElement(MenuItem, {
300
+ value: 'item-authoring'
301
+ }, "Item Authoring"))), /*#__PURE__*/React.createElement("div", {
302
+ className: cx(classes.inputContainer, error ? classes.error : '')
303
+ }, /*#__PURE__*/React.createElement(mq.Input, {
304
+ onFocus: () => {
305
+ onFocus && onFocus();
306
+ this.updateDisable(false);
307
+ },
308
+ onBlur: event => {
309
+ this.updateDisable(false);
310
+ onBlur && onBlur(event);
311
+ },
312
+ className: cx(classes.mathEditor, classNames.editor, !controlledKeypadMode ? classes.longMathEditor : ''),
313
+ innerRef: r => this.input = r,
314
+ latex: latex,
315
+ onChange: this.onEditorChange
316
+ }))), allowAnswerBlock && /*#__PURE__*/React.createElement(Button, {
317
+ className: classes.addAnswerBlockButton,
318
+ type: "primary",
319
+ style: {
320
+ bottom: shouldShowKeypad ? '320px' : '20px'
321
+ },
322
+ onClick: this.onAnswerBlockClick,
323
+ disabled: addDisabled
324
+ }, "+ Response Area"), /*#__PURE__*/React.createElement("hr", {
325
+ className: classes.hr
326
+ }), shouldShowKeypad && /*#__PURE__*/React.createElement(HorizontalKeypad, {
327
+ className: cx(classes[keypadMode], classes.keyboard),
328
+ controlledKeypadMode: controlledKeypadMode,
329
+ layoutForKeyPad: layoutForKeyPad,
330
+ additionalKeys: additionalKeys,
331
+ mode: controlledKeypadMode ? this.state.equationEditor : keypadMode,
332
+ onClick: this.onClick,
333
+ noDecimal: noDecimal,
334
+ setKeypadInteraction: setKeypadInteraction
335
+ }));
336
+ }
337
+
338
+ }
339
+ EditorAndPad.propTypes = {
340
+ classNames: PropTypes.object,
341
+ keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
342
+ autoFocus: PropTypes.bool,
343
+ allowAnswerBlock: PropTypes.bool,
344
+ showKeypad: PropTypes.bool,
345
+ controlledKeypad: PropTypes.bool,
346
+ controlledKeypadMode: PropTypes.bool,
347
+ error: PropTypes.string,
348
+ noDecimal: PropTypes.bool,
349
+ hideInput: PropTypes.bool,
350
+ noLatexHandling: PropTypes.bool,
351
+ layoutForKeyPad: PropTypes.object,
352
+ maxResponseAreas: PropTypes.number,
353
+ additionalKeys: PropTypes.array,
354
+ latex: PropTypes.string.isRequired,
355
+ onAnswerBlockAdd: PropTypes.func,
356
+ onFocus: PropTypes.func,
357
+ onBlur: PropTypes.func,
358
+ onChange: PropTypes.func.isRequired,
359
+ classes: PropTypes.object,
360
+ setKeypadInteraction: PropTypes.func
361
+ };
362
+
363
+ const styles$2 = theme => ({
364
+ inputAndTypeContainer: {
365
+ display: 'flex',
366
+ alignItems: 'center',
367
+ '& .mq-editable-field .mq-cursor': {
368
+ top: '-4px'
369
+ },
370
+ '& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection': {
371
+ paddingTop: '18px'
372
+ },
373
+ '& .mq-math-mode .mq-overarrow': {
374
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
375
+ },
376
+ '& .mq-math-mode .mq-overline .mq-overline-inner': {
377
+ paddingTop: '0.4em !important'
378
+ },
379
+ '& .mq-overarrow.mq-arrow-both': {
380
+ minWidth: '1.23em',
381
+ '& *': {
382
+ lineHeight: '1 !important'
383
+ },
384
+ '&:before': {
385
+ top: '-0.45em',
386
+ left: '-1px'
387
+ },
388
+ '&:after': {
389
+ position: 'absolute !important',
390
+ top: '0px !important',
391
+ right: '-2px'
392
+ },
393
+ '&.mq-empty:after': {
394
+ top: '-0.45em'
395
+ }
396
+ },
397
+ '& .mq-overarrow.mq-arrow-right': {
398
+ '&:before': {
399
+ top: '-0.4em',
400
+ right: '-1px'
401
+ }
402
+ },
403
+ '& *': _extends({}, commonMqFontStyles$1, supsubStyles$1, longdivStyles$1, {
404
+ '& .mq-math-mode .mq-sqrt-prefix': {
405
+ verticalAlign: 'baseline !important',
406
+ top: '1px !important',
407
+ left: '-0.1em !important'
408
+ },
409
+ '& .mq-math-mode .mq-overarc ': {
410
+ paddingTop: '0.45em !important'
411
+ },
412
+ '& .mq-math-mode .mq-empty': {
413
+ padding: '9px 1px !important'
414
+ },
415
+ '& .mq-math-mode .mq-root-block': {
416
+ paddingTop: '10px'
417
+ },
418
+ '& .mq-scaled .mq-sqrt-prefix': {
419
+ top: '0 !important'
420
+ },
421
+ '& .mq-math-mode .mq-longdiv .mq-longdiv-inner': {
422
+ marginLeft: '4px !important',
423
+ paddingTop: '6px !important',
424
+ paddingLeft: '6px !important'
425
+ },
426
+ '& .mq-math-mode .mq-paren': {
427
+ verticalAlign: 'top !important',
428
+ padding: '1px 0.1em !important'
429
+ },
430
+ '& .mq-math-mode .mq-sqrt-stem': {
431
+ borderTop: '0.07em solid',
432
+ marginLeft: '-1.5px',
433
+ marginTop: '-2px !important',
434
+ paddingTop: '5px !important'
435
+ },
436
+ '& .mq-math-mode .mq-denominator': {
437
+ marginTop: '-5px !important',
438
+ padding: '0.5em 0.1em 0.1em !important'
439
+ },
440
+ '& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {
441
+ padding: '0 0.1em !important',
442
+ paddingBottom: '0 !important',
443
+ marginBottom: '-2px'
444
+ }
445
+ }),
446
+ '& span[data-prime="true"]': {
447
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
448
+ }
449
+ },
450
+ hide: {
451
+ display: 'none'
452
+ },
453
+ selectContainer: {
454
+ flex: 'initial',
455
+ width: '25%',
456
+ minWidth: '100px',
457
+ marginLeft: '15px',
458
+ marginTop: '5px',
459
+ marginBottom: '5px',
460
+ marginRight: '5px',
461
+ '& label': {
462
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
463
+ },
464
+ '& div': {
465
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
466
+ }
467
+ },
468
+ mathEditor: {
469
+ maxWidth: '400px',
470
+ color: color.text(),
471
+ backgroundColor: color.background(),
472
+ padding: '2px'
473
+ },
474
+ longMathEditor: {
475
+ maxWidth: '500px'
476
+ },
477
+ addAnswerBlockButton: {
478
+ position: 'absolute',
479
+ right: '12px',
480
+ border: '1px solid lightgrey'
481
+ },
482
+ hr: {
483
+ padding: 0,
484
+ margin: 0,
485
+ height: '1px',
486
+ border: 'none',
487
+ borderBottom: `solid 1px ${theme.palette.primary.main}`
488
+ },
489
+ mathToolbar: {
490
+ zIndex: 9,
491
+ position: 'relative',
492
+ textAlign: 'center',
493
+ width: 'auto',
494
+ '& > .mq-math-mode': {
495
+ border: 'solid 1px lightgrey'
496
+ },
497
+ '& > .mq-focused': {
498
+ outline: 'none',
499
+ boxShadow: 'none',
500
+ border: `dotted 1px ${theme.palette.primary.main}`,
501
+ borderRadius: '0px'
502
+ },
503
+ '& .mq-overarrow-inner': {
504
+ border: 'none !important',
505
+ paddingTop: '0 !important'
506
+ },
507
+ '& .mq-overarrow-inner-right': {
508
+ display: 'none !important'
509
+ },
510
+ '& .mq-overarrow-inner-left': {
511
+ display: 'none !important'
512
+ },
513
+ '& .mq-longdiv-inner': {
514
+ borderTop: '1px solid !important',
515
+ paddingTop: '1.5px !important'
516
+ },
517
+ '& .mq-overarrow.mq-arrow-both': {
518
+ top: '7.8px',
519
+ marginTop: '0px',
520
+ minWidth: '1.23em'
521
+ },
522
+ '& .mq-parallelogram': {
523
+ lineHeight: 0.85
524
+ }
525
+ },
526
+ inputContainer: {
527
+ minWidth: '500px',
528
+ maxWidth: '900px',
529
+ minHeight: '30px',
530
+ width: '100%',
531
+ display: 'flex',
532
+ marginTop: theme.spacing.unit,
533
+ marginBottom: theme.spacing.unit,
534
+ '& .mq-sqrt-prefix .mq-scaled': {
535
+ verticalAlign: 'middle !important'
536
+ }
537
+ },
538
+ error: {
539
+ border: '2px solid red'
540
+ },
541
+ keyboard: commonMqKeyboardStyles,
542
+ language: {
543
+ '& *': {
544
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
545
+ }
546
+ }
547
+ });
548
+
549
+ var EditorAndPad$1 = withStyles(styles$2)(EditorAndPad);
550
+
551
+ const RawDoneButton = ({
552
+ classes,
553
+ onClick,
554
+ hideBackground
555
+ }) => /*#__PURE__*/React.createElement(IconButton, {
556
+ "aria-label": "Done",
557
+ className: classes.iconRoot,
558
+ onClick: onClick,
559
+ classes: {
560
+ label: classes.label,
561
+ root: cx(classes.iconRoot, {
562
+ [classes.hideBackground]: hideBackground
563
+ })
564
+ }
565
+ }, /*#__PURE__*/React.createElement(Check, null));
566
+ RawDoneButton.propTypes = {
567
+ classes: PropTypes.object.isRequired,
568
+ onClick: PropTypes.func
569
+ };
570
+
571
+ const styles$1 = theme => ({
572
+ iconRoot: {
573
+ verticalAlign: 'top',
574
+ width: '28px',
575
+ height: '28px',
576
+ color: '#00bb00'
577
+ },
578
+ hideBackground: {
579
+ backgroundColor: theme.palette.common.white,
580
+ '&:hover': {
581
+ backgroundColor: theme.palette.grey[200]
582
+ }
583
+ },
584
+ label: {
585
+ position: 'absolute',
586
+ top: '2px'
587
+ }
588
+ });
589
+
590
+ const DoneButton = withStyles(styles$1)(RawDoneButton);
591
+
592
+ const {
593
+ commonMqFontStyles,
594
+ longdivStyles,
595
+ supsubStyles
596
+ } = mq.CommonMqStyles;
597
+ const log = debug('@pie-lib:math-toolbar:math-preview');
598
+ class RawMathPreview extends React.Component {
599
+ componentDidMount() {
600
+ markFractionBaseSuperscripts();
601
+ }
602
+
603
+ componentDidUpdate(prevProps) {
604
+ // Re-run only if LaTeX changed
605
+ if (this.props.node.data.get('latex') !== prevProps.node.data.get('latex')) {
606
+ markFractionBaseSuperscripts();
607
+ }
608
+ }
609
+
610
+ render() {
611
+ log('[render] data: ', this.props.node.data);
612
+ const latex = this.props.node.data.get('latex');
613
+ const {
614
+ classes,
615
+ isSelected,
616
+ onFocus,
617
+ onBlur
618
+ } = this.props;
619
+ return /*#__PURE__*/React.createElement("div", {
620
+ className: cx(classes.root, isSelected && classes.selected)
621
+ }, ' ', /*#__PURE__*/React.createElement("span", {
622
+ className: classes.insideOverlay
623
+ }), /*#__PURE__*/React.createElement(mq.Static, {
624
+ latex: latex,
625
+ onFocus: onFocus,
626
+ onBlur: onBlur
627
+ }));
628
+ }
629
+
630
+ }
631
+ RawMathPreview.propTypes = {
632
+ latex: PropTypes.string,
633
+ node: PropTypes.object,
634
+ classes: PropTypes.object,
635
+ isSelected: PropTypes.bool,
636
+ onFocus: PropTypes.func,
637
+ onBlur: PropTypes.func
638
+ };
639
+
640
+ const mp = theme => ({
641
+ root: _extends({
642
+ display: 'inline-flex',
643
+ alignItems: 'center',
644
+ position: 'relative',
645
+ '& *': commonMqFontStyles
646
+ }, supsubStyles, longdivStyles, {
647
+ '& > .mq-math-mode': {
648
+ border: 'solid 1px lightgrey'
649
+ },
650
+ '& > .mq-focused': {
651
+ outline: 'none',
652
+ boxShadow: 'none',
653
+ border: 'solid 1px black',
654
+ borderRadius: '0px'
655
+ },
656
+ '& > .mq-math-mode .mq-root-block': {
657
+ paddingTop: '7px !important'
658
+ },
659
+ '& > .mq-math-mode .mq-overarc ': {
660
+ paddingTop: '0.45em !important'
661
+ },
662
+ '& > .mq-math-mode .mq-sqrt-prefix': {
663
+ verticalAlign: 'baseline !important',
664
+ top: '1px !important',
665
+ left: '-0.1em !important'
666
+ },
667
+ '& > .mq-math-mode .mq-denominator': {
668
+ marginTop: '-5px !important',
669
+ padding: '0.5em 0.1em 0.1em !important'
670
+ },
671
+ '& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {
672
+ padding: '0 0.1em !important',
673
+ paddingBottom: '0 !important',
674
+ marginBottom: '-2px'
675
+ },
676
+ '& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty': {
677
+ paddingTop: '6px !important',
678
+ paddingLeft: '4px !important'
679
+ },
680
+ '& > .mq-math-mode .mq-longdiv .mq-longdiv-inner': {
681
+ marginLeft: '0 !important'
682
+ },
683
+ '& > .mq-math-mode .mq-overarrow': {
684
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
685
+ },
686
+ '& > .mq-math-mode .mq-paren': {
687
+ verticalAlign: 'top !important',
688
+ padding: '1px 0.1em !important'
689
+ },
690
+ '& > .mq-math-mode .mq-sqrt-stem': {
691
+ borderTop: '0.07em solid',
692
+ marginLeft: '-1.5px',
693
+ marginTop: '-2px !important',
694
+ paddingTop: '5px !important'
695
+ },
696
+ '& .mq-overarrow-inner': {
697
+ paddingTop: '0 !important',
698
+ border: 'none !important'
699
+ },
700
+ '& .mq-editable-field .mq-cursor': {
701
+ marginTop: '-15px !important'
702
+ },
703
+ '& .mq-overarrow.mq-arrow-both': {
704
+ top: '7.5px',
705
+ marginTop: '0px',
706
+ minWidth: '1.23em',
707
+ '& *': {
708
+ lineHeight: '1 !important'
709
+ },
710
+ '&:before': {
711
+ top: '-0.4em',
712
+ left: '-1px'
713
+ },
714
+ // NOTE: This workaround adds `!important` to enforce the correct positioning and styling
715
+ // of `.mq-overarrow.mq-arrow-both` elements in MathQuill. This ensures consistent display
716
+ // regardless of the order in which MathQuill is initialized on our websites.
717
+ //
718
+ // In the future, investigate why MathQuill scripts and styles are being initialized
719
+ // more than once and address the root cause to prevent potential conflicts and ensure
720
+ // optimal performance.
721
+ '&:after': {
722
+ top: '0px !important',
723
+ position: 'absolute !important',
724
+ right: '-2px'
725
+ },
726
+ '&.mq-empty:after': {
727
+ top: '-0.45em'
728
+ }
729
+ },
730
+ '& .mq-overarrow.mq-arrow-right': {
731
+ '&:before': {
732
+ top: '-0.4em',
733
+ right: '-1px'
734
+ }
735
+ },
736
+ '& .mq-overarrow-inner-right': {
737
+ display: 'none !important'
738
+ },
739
+ '& .mq-overarrow-inner-left': {
740
+ display: 'none !important'
741
+ },
742
+ '& .mq-longdiv-inner': {
743
+ borderTop: '1px solid !important',
744
+ paddingTop: '1.5px !important'
745
+ },
746
+ '& .mq-parallelogram': {
747
+ lineHeight: 0.85
748
+ },
749
+ '& span[data-prime="true"]': {
750
+ fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
751
+ }
752
+ }),
753
+ selected: {
754
+ border: `solid 1px ${theme.palette.primary.main}`,
755
+ '& > .mq-math-mode': {
756
+ border: 'solid 0px lightgrey'
757
+ }
758
+ },
759
+ insideOverlay: {
760
+ position: 'absolute',
761
+ bottom: 0,
762
+ left: 0,
763
+ right: 0,
764
+ top: 0
765
+ }
766
+ });
767
+
768
+ var mathPreview = withStyles(mp)(RawMathPreview);
769
+
770
+ class MathToolbar extends React.Component {
771
+ constructor(props) {
772
+ super(props);
773
+
774
+ this.done = () => {
775
+ this.props.onDone(this.state.latex);
776
+ };
777
+
778
+ this.onChange = latex => {
779
+ this.setState({
780
+ latex
781
+ });
782
+ this.props.onChange(latex);
783
+ };
784
+
785
+ this.state = {
786
+ latex: props.latex
787
+ };
788
+ }
789
+
790
+ UNSAFE_componentWillReceiveProps(nextProps) {
791
+ this.setState({
792
+ latex: nextProps.latex
793
+ });
794
+ }
795
+
796
+ render() {
797
+ const {
798
+ latex
799
+ } = this.state;
800
+ const {
801
+ classNames,
802
+ autoFocus,
803
+ allowAnswerBlock,
804
+ onAnswerBlockAdd,
805
+ controlledKeypad,
806
+ controlledKeypadMode,
807
+ keypadMode,
808
+ noDecimal,
809
+ additionalKeys,
810
+ showKeypad,
811
+ onFocus,
812
+ onBlur,
813
+ hideDoneButton,
814
+ error,
815
+ keyPadCharacterRef,
816
+ setKeypadInteraction,
817
+ maxResponseAreas
818
+ } = this.props;
819
+ return /*#__PURE__*/React.createElement(PureToolbar, {
820
+ autoFocus: autoFocus,
821
+ classNames: classNames,
822
+ onAnswerBlockAdd: onAnswerBlockAdd,
823
+ allowAnswerBlock: allowAnswerBlock,
824
+ latex: latex,
825
+ additionalKeys: additionalKeys,
826
+ noDecimal: noDecimal,
827
+ keypadMode: keypadMode,
828
+ keyPadCharacterRef: keyPadCharacterRef,
829
+ setKeypadInteraction: setKeypadInteraction,
830
+ onChange: this.onChange,
831
+ onDone: this.done,
832
+ onFocus: onFocus,
833
+ onBlur: onBlur,
834
+ showKeypad: showKeypad,
835
+ controlledKeypad: controlledKeypad,
836
+ controlledKeypadMode: controlledKeypadMode,
837
+ hideDoneButton: hideDoneButton,
838
+ error: error,
839
+ maxResponseAreas: maxResponseAreas
840
+ });
841
+ }
842
+
843
+ }
844
+ MathToolbar.propTypes = {
845
+ autoFocus: PropTypes.bool,
846
+ allowAnswerBlock: PropTypes.bool,
847
+ controlledKeypad: PropTypes.bool,
848
+ controlledKeypadMode: PropTypes.bool,
849
+ keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
850
+ classNames: PropTypes.object,
851
+ error: PropTypes.string,
852
+ maxResponseAreas: PropTypes.number,
853
+ showKeypad: PropTypes.bool,
854
+ noDecimal: PropTypes.bool,
855
+ additionalKeys: PropTypes.array,
856
+ latex: PropTypes.string.isRequired,
857
+ onAnswerBlockAdd: PropTypes.func,
858
+ onChange: PropTypes.func,
859
+ onDone: PropTypes.func.isRequired,
860
+ onFocus: PropTypes.func,
861
+ onBlur: PropTypes.func,
862
+ hideDoneButton: PropTypes.bool,
863
+ keyPadCharacterRef: PropTypes.func,
864
+ setKeypadInteraction: PropTypes.func
865
+ };
866
+ MathToolbar.defaultProps = {
867
+ classNames: {},
868
+ keypadMode: 'item-authoring',
869
+ autoFocus: false,
870
+ allowAnswerBlock: false,
871
+ controlledKeypad: false,
872
+ controlledKeypadMode: false,
873
+ noDecimal: false,
874
+ showKeypad: true,
875
+ additionalKeys: [],
876
+ onChange: () => {},
877
+ onAnswerBlockAdd: () => {},
878
+ onFocus: () => {},
879
+ hideDoneButton: false
880
+ };
881
+ class RawPureToolbar extends React.Component {
882
+ render() {
883
+ const {
884
+ classNames,
885
+ autoFocus,
886
+ allowAnswerBlock,
887
+ onAnswerBlockAdd,
888
+ controlledKeypad,
889
+ controlledKeypadMode,
890
+ additionalKeys,
891
+ showKeypad,
892
+ keypadMode,
893
+ noDecimal,
894
+ hideInput,
895
+ noLatexHandling,
896
+ layoutForKeyPad,
897
+ keyPadCharacterRef,
898
+ setKeypadInteraction,
899
+ latex,
900
+ onChange,
901
+ onDone,
902
+ onFocus,
903
+ onBlur,
904
+ hideDoneButton,
905
+ hideDoneButtonBackground,
906
+ classes,
907
+ error,
908
+ maxResponseAreas
909
+ } = this.props;
910
+ return /*#__PURE__*/React.createElement("div", {
911
+ className: cx(classes.pureToolbar, (classNames || {}).toolbar),
912
+ ref: keyPadCharacterRef
913
+ }, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(EditorAndPad$1, {
914
+ autoFocus: autoFocus,
915
+ keypadMode: keypadMode,
916
+ classNames: classNames || {},
917
+ controlledKeypad: controlledKeypad,
918
+ controlledKeypadMode: controlledKeypadMode,
919
+ noDecimal: noDecimal,
920
+ hideInput: hideInput,
921
+ noLatexHandling: noLatexHandling,
922
+ layoutForKeyPad: layoutForKeyPad,
923
+ showKeypad: showKeypad,
924
+ additionalKeys: additionalKeys,
925
+ allowAnswerBlock: allowAnswerBlock,
926
+ onAnswerBlockAdd: onAnswerBlockAdd,
927
+ latex: latex,
928
+ onChange: onChange,
929
+ onFocus: onFocus,
930
+ onBlur: onBlur,
931
+ error: error,
932
+ maxResponseAreas: maxResponseAreas,
933
+ setKeypadInteraction: setKeypadInteraction
934
+ }), (!controlledKeypad || controlledKeypad && showKeypad) && !hideDoneButton && /*#__PURE__*/React.createElement(DoneButton, {
935
+ hideBackground: hideDoneButtonBackground,
936
+ onClick: onDone
937
+ }));
938
+ }
939
+
940
+ }
941
+ RawPureToolbar.propTypes = {
942
+ classNames: PropTypes.object,
943
+ latex: PropTypes.string.isRequired,
944
+ keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
945
+ hideInput: PropTypes.bool,
946
+ noLatexHandling: PropTypes.bool,
947
+ layoutForKeyPad: PropTypes.object,
948
+ onChange: PropTypes.func.isRequired,
949
+ onDone: PropTypes.func.isRequired,
950
+ onBlur: PropTypes.func,
951
+ onAnswerBlockAdd: PropTypes.func,
952
+ additionalKeys: PropTypes.array,
953
+ onFocus: PropTypes.func,
954
+ classes: PropTypes.object.isRequired,
955
+ autoFocus: PropTypes.bool,
956
+ noDecimal: PropTypes.bool,
957
+ allowAnswerBlock: PropTypes.bool,
958
+ controlledKeypad: PropTypes.bool,
959
+ controlledKeypadMode: PropTypes.bool,
960
+ showKeypad: PropTypes.bool,
961
+ hideDoneButton: PropTypes.bool,
962
+ hideDoneButtonBackground: PropTypes.bool,
963
+ error: PropTypes.any,
964
+ maxResponseAreas: PropTypes.number,
965
+ keyPadCharacterRef: PropTypes.object,
966
+ setKeypadInteraction: PropTypes.func
967
+ };
968
+ RawPureToolbar.defaultProps = {
969
+ classNames: {},
970
+ hideDoneButtonBackground: false
971
+ };
972
+
973
+ const styles = () => ({
974
+ pureToolbar: {
975
+ display: 'flex',
976
+ width: '100%',
977
+ zIndex: 8,
978
+ alignItems: 'center'
979
+ }
980
+ });
981
+
982
+ const PureToolbar = withStyles(styles)(RawPureToolbar);
983
+
984
+ export { mathPreview as MathPreview, MathToolbar, PureToolbar, RawPureToolbar };
985
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/utils.js","../src/editor-and-pad.jsx","../src/done-button.jsx","../src/math-preview.jsx","../src/index.jsx"],"sourcesContent":["export const markFractionBaseSuperscripts = () => {\n document.querySelectorAll('.mq-supsub.mq-sup-only').forEach((supsub) => {\n const prev = supsub.previousElementSibling;\n\n if (prev && prev.classList.contains('mq-non-leaf') && prev.querySelector('.mq-fraction')) {\n supsub.classList.add('mq-after-fraction-group');\n } else {\n supsub.classList.remove('mq-after-fraction-group');\n }\n });\n};\n","import React from 'react';\nimport debug from 'debug';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport Button from '@material-ui/core/Button';\nimport { withStyles } from '@material-ui/core/styles';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport isEqual from 'lodash/isEqual';\n\nimport { HorizontalKeypad, mq, updateSpans } from '@pie-lib/math-input';\nimport { color, InputContainer } from '@pie-lib/render-ui';\nimport { markFractionBaseSuperscripts } from './utils';\n\nconst { commonMqFontStyles, commonMqKeyboardStyles, longdivStyles, supsubStyles } = mq.CommonMqStyles;\nconst log = debug('@pie-lib:math-toolbar:editor-and-pad');\n\nconst decimalRegex = /\\.|,/g;\n\nconst toNodeData = (data) => {\n if (!data) {\n return;\n }\n\n const { type, value } = data;\n\n if (type === 'command' || type === 'cursor') {\n return data;\n } else if (type === 'answer') {\n return { type: 'answer', ...data };\n } else if (value === 'clear') {\n return { type: 'clear' };\n } else {\n return { type: 'write', value };\n }\n};\n\nexport class EditorAndPad extends React.Component {\n static propTypes = {\n classNames: PropTypes.object,\n keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n autoFocus: PropTypes.bool,\n allowAnswerBlock: PropTypes.bool,\n showKeypad: PropTypes.bool,\n controlledKeypad: PropTypes.bool,\n controlledKeypadMode: PropTypes.bool,\n error: PropTypes.string,\n noDecimal: PropTypes.bool,\n hideInput: PropTypes.bool,\n noLatexHandling: PropTypes.bool,\n layoutForKeyPad: PropTypes.object,\n maxResponseAreas: PropTypes.number,\n additionalKeys: PropTypes.array,\n latex: PropTypes.string.isRequired,\n onAnswerBlockAdd: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n classes: PropTypes.object,\n setKeypadInteraction: PropTypes.func,\n };\n\n constructor(props) {\n super(props);\n\n this.state = { equationEditor: 'item-authoring', addDisabled: false };\n }\n\n componentDidMount() {\n if (this.input && this.props.autoFocus) {\n this.input.focus();\n }\n }\n\n onClick = (data) => {\n const { noDecimal, noLatexHandling, onChange } = this.props;\n const c = toNodeData(data);\n log('mathChange: ', c);\n\n if (noLatexHandling) {\n onChange(c.value);\n return;\n }\n\n // if decimals are not allowed for this response, we discard the input\n if (noDecimal && (c.value === '.' || c.value === ',')) {\n return;\n }\n\n if (!c) {\n return;\n }\n\n if (c.type === 'clear') {\n log('call clear...');\n this.input.clear();\n } else if (c.type === 'command') {\n this.input.command(c.value);\n } else if (c.type === 'cursor') {\n this.input.keystroke(c.value);\n } else if (c.type === 'answer') {\n this.input.write('%response%');\n } else {\n this.input.write(c.value);\n }\n };\n\n updateDisable = (isEdit) => {\n const { maxResponseAreas } = this.props;\n\n if (maxResponseAreas) {\n const shouldDisable = this.checkResponseAreasNumber(maxResponseAreas, isEdit);\n\n this.setState({ addDisabled: shouldDisable });\n }\n };\n\n onAnswerBlockClick = () => {\n this.props.onAnswerBlockAdd();\n this.onClick({\n type: 'answer',\n });\n\n this.updateDisable(true);\n };\n\n onEditorChange = (latex) => {\n const { onChange, noDecimal } = this.props;\n\n updateSpans();\n markFractionBaseSuperscripts();\n\n this.updateDisable(true);\n\n // if no decimals are allowed and the last change is a decimal dot, discard the change\n if (noDecimal && (latex.indexOf('.') !== -1 || latex.indexOf(',') !== -1) && this.input) {\n this.input.clear();\n this.input.write(latex.replace(decimalRegex, ''));\n return;\n }\n\n // eslint-disable-next-line no-useless-escape\n const regexMatch = latex.match(/[0-9]\\\\ \\\\frac\\{[^\\{]*\\}\\{ \\}/);\n\n if (this.input && regexMatch && regexMatch?.length) {\n try {\n this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent);\n this.input.mathField.el().dispatchEvent(new KeyboardEvent('keydown', { keyCode: 8 }));\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(e.toString());\n }\n\n return;\n }\n\n onChange(latex);\n };\n\n /** Only render if the mathquill instance's latex is different\n * or the keypad state changed from one state to the other (shown / hidden) */\n shouldComponentUpdate(nextProps, nextState) {\n const inputIsDifferent = this.input.mathField.latex() !== nextProps.latex;\n log('[shouldComponentUpdate] ', 'inputIsDifferent: ', inputIsDifferent);\n\n if (!isEqual(this.props.error, nextProps.error)) {\n return true;\n }\n\n if (!inputIsDifferent && this.props.keypadMode !== nextProps.keypadMode) {\n return true;\n }\n\n if (!inputIsDifferent && this.props.noDecimal !== nextProps.noDecimal) {\n return true;\n }\n\n if (!inputIsDifferent && this.state.equationEditor !== nextState.equationEditor) {\n return true;\n }\n\n if (!inputIsDifferent && this.props.controlledKeypad) {\n return this.props.showKeypad !== nextProps.showKeypad;\n }\n\n return inputIsDifferent;\n }\n\n onEditorTypeChange = (evt) => {\n this.setState({ equationEditor: evt.target.value });\n };\n\n checkResponseAreasNumber = (maxResponseAreas, isEdit) => {\n const { latex } = (this.input && this.input.props) || {};\n\n if (latex) {\n const count = (latex.match(/answerBlock/g) || []).length;\n\n return isEdit ? count === maxResponseAreas - 1 : count === maxResponseAreas;\n }\n\n return false;\n };\n\n render() {\n const {\n classNames,\n keypadMode,\n allowAnswerBlock,\n additionalKeys,\n controlledKeypad,\n controlledKeypadMode,\n showKeypad,\n setKeypadInteraction,\n noDecimal,\n hideInput,\n layoutForKeyPad,\n latex,\n onFocus,\n onBlur,\n classes,\n error,\n } = this.props;\n const shouldShowKeypad = !controlledKeypad || (controlledKeypad && showKeypad);\n const { addDisabled } = this.state;\n\n log('[render]', latex);\n\n return (\n <div className={cx(classes.mathToolbar, classNames.mathToolbar)}>\n <div className={cx(classes.inputAndTypeContainer, { [classes.hide]: hideInput })}>\n {controlledKeypadMode && (\n <InputContainer label=\"Equation Editor\" className={classes.selectContainer}>\n <Select className={classes.select} onChange={this.onEditorTypeChange} value={this.state.equationEditor}>\n <MenuItem value=\"non-negative-integers\">Numeric - Non-Negative Integers</MenuItem>\n <MenuItem value=\"integers\">Numeric - Integers</MenuItem>\n <MenuItem value=\"decimals\">Numeric - Decimals</MenuItem>\n <MenuItem value=\"fractions\">Numeric - Fractions</MenuItem>\n <MenuItem value={1}>Grade 1 - 2</MenuItem>\n <MenuItem value={3}>Grade 3 - 5</MenuItem>\n <MenuItem value={6}>Grade 6 - 7</MenuItem>\n <MenuItem value={8}>Grade 8 - HS</MenuItem>\n <MenuItem value={'geometry'}>Geometry</MenuItem>\n <MenuItem value={'advanced-algebra'}>Advanced Algebra</MenuItem>\n <MenuItem value={'statistics'}>Statistics</MenuItem>\n <MenuItem value={'item-authoring'}>Item Authoring</MenuItem>\n </Select>\n </InputContainer>\n )}\n <div className={cx(classes.inputContainer, error ? classes.error : '')}>\n <mq.Input\n onFocus={() => {\n onFocus && onFocus();\n this.updateDisable(false);\n }}\n onBlur={(event) => {\n this.updateDisable(false);\n onBlur && onBlur(event);\n }}\n className={cx(classes.mathEditor, classNames.editor, !controlledKeypadMode ? classes.longMathEditor : '')}\n innerRef={(r) => (this.input = r)}\n latex={latex}\n onChange={this.onEditorChange}\n />\n </div>\n </div>\n {allowAnswerBlock && (\n <Button\n className={classes.addAnswerBlockButton}\n type=\"primary\"\n style={{ bottom: shouldShowKeypad ? '320px' : '20px' }}\n onClick={this.onAnswerBlockClick}\n disabled={addDisabled}\n >\n + Response Area\n </Button>\n )}\n <hr className={classes.hr} />\n {shouldShowKeypad && (\n <HorizontalKeypad\n className={cx(classes[keypadMode], classes.keyboard)}\n controlledKeypadMode={controlledKeypadMode}\n layoutForKeyPad={layoutForKeyPad}\n additionalKeys={additionalKeys}\n mode={controlledKeypadMode ? this.state.equationEditor : keypadMode}\n onClick={this.onClick}\n noDecimal={noDecimal}\n setKeypadInteraction={setKeypadInteraction}\n />\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n inputAndTypeContainer: {\n display: 'flex',\n alignItems: 'center',\n '& .mq-editable-field .mq-cursor': {\n top: '-4px',\n },\n '& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection': {\n paddingTop: '18px',\n },\n '& .mq-math-mode .mq-overarrow': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n '& .mq-math-mode .mq-overline .mq-overline-inner': {\n paddingTop: '0.4em !important',\n },\n '& .mq-overarrow.mq-arrow-both': {\n minWidth: '1.23em',\n '& *': {\n lineHeight: '1 !important',\n },\n '&:before': {\n top: '-0.45em',\n left: '-1px',\n },\n '&:after': {\n position: 'absolute !important',\n top: '0px !important',\n right: '-2px',\n },\n '&.mq-empty:after': {\n top: '-0.45em',\n },\n },\n '& .mq-overarrow.mq-arrow-right': {\n '&:before': {\n top: '-0.4em',\n right: '-1px',\n },\n },\n\n '& *': {\n ...commonMqFontStyles,\n ...supsubStyles,\n ...longdivStyles,\n '& .mq-math-mode .mq-sqrt-prefix': {\n verticalAlign: 'baseline !important',\n top: '1px !important',\n left: '-0.1em !important',\n },\n\n '& .mq-math-mode .mq-overarc ': {\n paddingTop: '0.45em !important',\n },\n\n '& .mq-math-mode .mq-empty': {\n padding: '9px 1px !important',\n },\n\n '& .mq-math-mode .mq-root-block': {\n paddingTop: '10px',\n },\n\n '& .mq-scaled .mq-sqrt-prefix': {\n top: '0 !important',\n },\n\n '& .mq-math-mode .mq-longdiv .mq-longdiv-inner': {\n marginLeft: '4px !important',\n paddingTop: '6px !important',\n paddingLeft: '6px !important',\n },\n\n '& .mq-math-mode .mq-paren': {\n verticalAlign: 'top !important',\n padding: '1px 0.1em !important',\n },\n\n '& .mq-math-mode .mq-sqrt-stem': {\n borderTop: '0.07em solid',\n marginLeft: '-1.5px',\n marginTop: '-2px !important',\n paddingTop: '5px !important',\n },\n\n '& .mq-math-mode .mq-denominator': {\n marginTop: '-5px !important',\n padding: '0.5em 0.1em 0.1em !important',\n },\n\n '& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {\n padding: '0 0.1em !important',\n paddingBottom: '0 !important',\n marginBottom: '-2px',\n },\n },\n\n '& span[data-prime=\"true\"]': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n },\n hide: {\n display: 'none',\n },\n selectContainer: {\n flex: 'initial',\n width: '25%',\n minWidth: '100px',\n marginLeft: '15px',\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n\n '& label': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n\n '& div': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n },\n mathEditor: {\n maxWidth: '400px',\n color: color.text(),\n backgroundColor: color.background(),\n padding: '2px',\n },\n longMathEditor: {\n maxWidth: '500px',\n },\n addAnswerBlockButton: {\n position: 'absolute',\n right: '12px',\n border: '1px solid lightgrey',\n },\n hr: {\n padding: 0,\n margin: 0,\n height: '1px',\n border: 'none',\n borderBottom: `solid 1px ${theme.palette.primary.main}`,\n },\n mathToolbar: {\n zIndex: 9,\n position: 'relative',\n textAlign: 'center',\n width: 'auto',\n '& > .mq-math-mode': {\n border: 'solid 1px lightgrey',\n },\n '& > .mq-focused': {\n outline: 'none',\n boxShadow: 'none',\n border: `dotted 1px ${theme.palette.primary.main}`,\n borderRadius: '0px',\n },\n '& .mq-overarrow-inner': {\n border: 'none !important',\n paddingTop: '0 !important',\n },\n '& .mq-overarrow-inner-right': {\n display: 'none !important',\n },\n '& .mq-overarrow-inner-left': {\n display: 'none !important',\n },\n '& .mq-longdiv-inner': {\n borderTop: '1px solid !important',\n paddingTop: '1.5px !important',\n },\n '& .mq-overarrow.mq-arrow-both': {\n top: '7.8px',\n marginTop: '0px',\n minWidth: '1.23em',\n },\n '& .mq-parallelogram': {\n lineHeight: 0.85,\n },\n },\n inputContainer: {\n minWidth: '500px',\n maxWidth: '900px',\n minHeight: '30px',\n width: '100%',\n display: 'flex',\n marginTop: theme.spacing.unit,\n marginBottom: theme.spacing.unit,\n\n '& .mq-sqrt-prefix .mq-scaled': {\n verticalAlign: 'middle !important',\n },\n },\n error: {\n border: '2px solid red',\n },\n keyboard: commonMqKeyboardStyles,\n language: {\n '& *': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n },\n});\n\nexport default withStyles(styles)(EditorAndPad);\n","import React from 'react';\n\nimport IconButton from '@material-ui/core/IconButton';\nimport Check from '@material-ui/icons/Check';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport const RawDoneButton = ({ classes, onClick, hideBackground }) => (\n <IconButton\n aria-label=\"Done\"\n className={classes.iconRoot}\n onClick={onClick}\n classes={{\n label: classes.label,\n root: classNames(classes.iconRoot, { [classes.hideBackground]: hideBackground }),\n }}\n >\n <Check />\n </IconButton>\n);\n\nRawDoneButton.propTypes = {\n classes: PropTypes.object.isRequired,\n onClick: PropTypes.func,\n};\n\nconst styles = (theme) => ({\n iconRoot: {\n verticalAlign: 'top',\n width: '28px',\n height: '28px',\n color: '#00bb00',\n },\n hideBackground: {\n backgroundColor: theme.palette.common.white,\n\n '&:hover': {\n backgroundColor: theme.palette.grey[200],\n },\n },\n label: {\n position: 'absolute',\n top: '2px',\n },\n});\nexport const DoneButton = withStyles(styles)(RawDoneButton);\n","import React from 'react';\nimport classNames from 'classnames';\nimport debug from 'debug';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport { mq } from '@pie-lib/math-input';\nimport { markFractionBaseSuperscripts } from './utils';\n\nconst { commonMqFontStyles, longdivStyles, supsubStyles } = mq.CommonMqStyles;\n\nconst log = debug('@pie-lib:math-toolbar:math-preview');\n\nexport class RawMathPreview extends React.Component {\n static propTypes = {\n latex: PropTypes.string,\n node: PropTypes.object,\n classes: PropTypes.object,\n isSelected: PropTypes.bool,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n };\n\n componentDidMount() {\n markFractionBaseSuperscripts();\n }\n\n componentDidUpdate(prevProps) {\n // Re-run only if LaTeX changed\n if (this.props.node.data.get('latex') !== prevProps.node.data.get('latex')) {\n markFractionBaseSuperscripts();\n }\n }\n\n render() {\n log('[render] data: ', this.props.node.data);\n const latex = this.props.node.data.get('latex');\n const { classes, isSelected, onFocus, onBlur } = this.props;\n return (\n <div className={classNames(classes.root, isSelected && classes.selected)}>\n {' '}\n <span className={classes.insideOverlay} />\n <mq.Static latex={latex} onFocus={onFocus} onBlur={onBlur} />\n </div>\n );\n }\n}\n\nconst mp = (theme) => ({\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n position: 'relative',\n '& *': commonMqFontStyles,\n ...supsubStyles,\n ...longdivStyles,\n '& > .mq-math-mode': {\n border: 'solid 1px lightgrey',\n },\n '& > .mq-focused': {\n outline: 'none',\n boxShadow: 'none',\n border: 'solid 1px black',\n borderRadius: '0px',\n },\n '& > .mq-math-mode .mq-root-block': {\n paddingTop: '7px !important',\n },\n '& > .mq-math-mode .mq-overarc ': {\n paddingTop: '0.45em !important',\n },\n '& > .mq-math-mode .mq-sqrt-prefix': {\n verticalAlign: 'baseline !important',\n top: '1px !important',\n left: '-0.1em !important',\n },\n '& > .mq-math-mode .mq-denominator': {\n marginTop: '-5px !important',\n padding: '0.5em 0.1em 0.1em !important',\n },\n '& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over': {\n padding: '0 0.1em !important',\n paddingBottom: '0 !important',\n marginBottom: '-2px',\n },\n '& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty': {\n paddingTop: '6px !important',\n paddingLeft: '4px !important',\n },\n '& > .mq-math-mode .mq-longdiv .mq-longdiv-inner': {\n marginLeft: '0 !important',\n },\n '& > .mq-math-mode .mq-overarrow': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n '& > .mq-math-mode .mq-paren': {\n verticalAlign: 'top !important',\n padding: '1px 0.1em !important',\n },\n\n '& > .mq-math-mode .mq-sqrt-stem': {\n borderTop: '0.07em solid',\n marginLeft: '-1.5px',\n marginTop: '-2px !important',\n paddingTop: '5px !important',\n },\n\n '& .mq-overarrow-inner': {\n paddingTop: '0 !important',\n border: 'none !important',\n },\n '& .mq-editable-field .mq-cursor': {\n marginTop: '-15px !important',\n },\n '& .mq-overarrow.mq-arrow-both': {\n top: '7.5px',\n marginTop: '0px',\n minWidth: '1.23em',\n '& *': {\n lineHeight: '1 !important',\n },\n '&:before': {\n top: '-0.4em',\n left: '-1px',\n },\n // NOTE: This workaround adds `!important` to enforce the correct positioning and styling\n // of `.mq-overarrow.mq-arrow-both` elements in MathQuill. This ensures consistent display\n // regardless of the order in which MathQuill is initialized on our websites.\n //\n // In the future, investigate why MathQuill scripts and styles are being initialized\n // more than once and address the root cause to prevent potential conflicts and ensure\n // optimal performance.\n '&:after': {\n top: '0px !important',\n position: 'absolute !important',\n right: '-2px',\n },\n '&.mq-empty:after': {\n top: '-0.45em',\n },\n },\n '& .mq-overarrow.mq-arrow-right': {\n '&:before': {\n top: '-0.4em',\n right: '-1px',\n },\n },\n '& .mq-overarrow-inner-right': {\n display: 'none !important',\n },\n '& .mq-overarrow-inner-left': {\n display: 'none !important',\n },\n '& .mq-longdiv-inner': {\n borderTop: '1px solid !important',\n paddingTop: '1.5px !important',\n },\n '& .mq-parallelogram': {\n lineHeight: 0.85,\n },\n '& span[data-prime=\"true\"]': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important',\n },\n },\n selected: {\n border: `solid 1px ${theme.palette.primary.main}`,\n '& > .mq-math-mode': {\n border: 'solid 0px lightgrey',\n },\n },\n insideOverlay: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n },\n});\n\nexport default withStyles(mp)(RawMathPreview);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport EditorAndPad from './editor-and-pad';\nimport { DoneButton } from './done-button';\nimport { withStyles } from '@material-ui/core/styles';\nimport MathPreview from './math-preview';\n\nexport { MathPreview };\n\nexport class MathToolbar extends React.Component {\n static propTypes = {\n autoFocus: PropTypes.bool,\n allowAnswerBlock: PropTypes.bool,\n controlledKeypad: PropTypes.bool,\n controlledKeypadMode: PropTypes.bool,\n keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n classNames: PropTypes.object,\n error: PropTypes.string,\n maxResponseAreas: PropTypes.number,\n showKeypad: PropTypes.bool,\n noDecimal: PropTypes.bool,\n additionalKeys: PropTypes.array,\n latex: PropTypes.string.isRequired,\n onAnswerBlockAdd: PropTypes.func,\n onChange: PropTypes.func,\n onDone: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n hideDoneButton: PropTypes.bool,\n keyPadCharacterRef: PropTypes.func,\n setKeypadInteraction: PropTypes.func,\n };\n\n static defaultProps = {\n classNames: {},\n keypadMode: 'item-authoring',\n autoFocus: false,\n allowAnswerBlock: false,\n controlledKeypad: false,\n controlledKeypadMode: false,\n noDecimal: false,\n showKeypad: true,\n additionalKeys: [],\n onChange: () => {},\n onAnswerBlockAdd: () => {},\n onFocus: () => {},\n hideDoneButton: false,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n latex: props.latex,\n };\n }\n\n done = () => {\n this.props.onDone(this.state.latex);\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.setState({ latex: nextProps.latex });\n }\n\n onChange = (latex) => {\n this.setState({ latex });\n this.props.onChange(latex);\n };\n\n render() {\n const { latex } = this.state;\n const {\n classNames,\n autoFocus,\n allowAnswerBlock,\n onAnswerBlockAdd,\n controlledKeypad,\n controlledKeypadMode,\n keypadMode,\n noDecimal,\n additionalKeys,\n showKeypad,\n onFocus,\n onBlur,\n hideDoneButton,\n error,\n keyPadCharacterRef,\n setKeypadInteraction,\n maxResponseAreas,\n } = this.props;\n\n return (\n <PureToolbar\n autoFocus={autoFocus}\n classNames={classNames}\n onAnswerBlockAdd={onAnswerBlockAdd}\n allowAnswerBlock={allowAnswerBlock}\n latex={latex}\n additionalKeys={additionalKeys}\n noDecimal={noDecimal}\n keypadMode={keypadMode}\n keyPadCharacterRef={keyPadCharacterRef}\n setKeypadInteraction={setKeypadInteraction}\n onChange={this.onChange}\n onDone={this.done}\n onFocus={onFocus}\n onBlur={onBlur}\n showKeypad={showKeypad}\n controlledKeypad={controlledKeypad}\n controlledKeypadMode={controlledKeypadMode}\n hideDoneButton={hideDoneButton}\n error={error}\n maxResponseAreas={maxResponseAreas}\n />\n );\n }\n}\n\nexport class RawPureToolbar extends React.Component {\n static propTypes = {\n classNames: PropTypes.object,\n latex: PropTypes.string.isRequired,\n keypadMode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n hideInput: PropTypes.bool,\n noLatexHandling: PropTypes.bool,\n layoutForKeyPad: PropTypes.object,\n onChange: PropTypes.func.isRequired,\n onDone: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n onAnswerBlockAdd: PropTypes.func,\n additionalKeys: PropTypes.array,\n onFocus: PropTypes.func,\n classes: PropTypes.object.isRequired,\n autoFocus: PropTypes.bool,\n noDecimal: PropTypes.bool,\n allowAnswerBlock: PropTypes.bool,\n controlledKeypad: PropTypes.bool,\n controlledKeypadMode: PropTypes.bool,\n showKeypad: PropTypes.bool,\n hideDoneButton: PropTypes.bool,\n hideDoneButtonBackground: PropTypes.bool,\n error: PropTypes.any,\n maxResponseAreas: PropTypes.number,\n keyPadCharacterRef: PropTypes.object,\n setKeypadInteraction: PropTypes.func,\n };\n\n static defaultProps = {\n classNames: {},\n hideDoneButtonBackground: false,\n };\n\n render() {\n const {\n classNames,\n autoFocus,\n allowAnswerBlock,\n onAnswerBlockAdd,\n controlledKeypad,\n controlledKeypadMode,\n additionalKeys,\n showKeypad,\n keypadMode,\n noDecimal,\n hideInput,\n noLatexHandling,\n layoutForKeyPad,\n keyPadCharacterRef,\n setKeypadInteraction,\n latex,\n onChange,\n onDone,\n onFocus,\n onBlur,\n hideDoneButton,\n hideDoneButtonBackground,\n classes,\n error,\n maxResponseAreas,\n } = this.props;\n\n return (\n <div className={cx(classes.pureToolbar, (classNames || {}).toolbar)} ref={keyPadCharacterRef}>\n <div />\n <EditorAndPad\n autoFocus={autoFocus}\n keypadMode={keypadMode}\n classNames={classNames || {}}\n controlledKeypad={controlledKeypad}\n controlledKeypadMode={controlledKeypadMode}\n noDecimal={noDecimal}\n hideInput={hideInput}\n noLatexHandling={noLatexHandling}\n layoutForKeyPad={layoutForKeyPad}\n showKeypad={showKeypad}\n additionalKeys={additionalKeys}\n allowAnswerBlock={allowAnswerBlock}\n onAnswerBlockAdd={onAnswerBlockAdd}\n latex={latex}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n error={error}\n maxResponseAreas={maxResponseAreas}\n setKeypadInteraction={setKeypadInteraction}\n />\n {(!controlledKeypad || (controlledKeypad && showKeypad)) && !hideDoneButton && (\n <DoneButton hideBackground={hideDoneButtonBackground} onClick={onDone} />\n )}\n </div>\n );\n }\n}\nconst styles = () => ({\n pureToolbar: {\n display: 'flex',\n width: '100%',\n zIndex: 8,\n alignItems: 'center',\n },\n});\n\nexport const PureToolbar = withStyles(styles)(RawPureToolbar);\n"],"names":["markFractionBaseSuperscripts","document","querySelectorAll","forEach","supsub","prev","previousElementSibling","classList","contains","querySelector","add","remove","commonMqFontStyles","commonMqKeyboardStyles","longdivStyles","supsubStyles","mq","CommonMqStyles","log","debug","decimalRegex","toNodeData","data","type","value","EditorAndPad","React","Component","constructor","props","onClick","noDecimal","noLatexHandling","onChange","c","input","clear","command","keystroke","write","updateDisable","isEdit","maxResponseAreas","shouldDisable","checkResponseAreasNumber","setState","addDisabled","onAnswerBlockClick","onAnswerBlockAdd","onEditorChange","latex","updateSpans","indexOf","replace","regexMatch","match","length","mathField","__controller","cursor","insLeftOf","parent","el","dispatchEvent","KeyboardEvent","keyCode","e","console","error","toString","onEditorTypeChange","evt","equationEditor","target","count","state","componentDidMount","autoFocus","focus","shouldComponentUpdate","nextProps","nextState","inputIsDifferent","isEqual","keypadMode","controlledKeypad","showKeypad","render","classNames","allowAnswerBlock","additionalKeys","controlledKeypadMode","setKeypadInteraction","hideInput","layoutForKeyPad","onFocus","onBlur","classes","shouldShowKeypad","cx","mathToolbar","inputAndTypeContainer","hide","selectContainer","select","inputContainer","event","mathEditor","editor","longMathEditor","r","addAnswerBlockButton","bottom","hr","keyboard","propTypes","PropTypes","object","oneOfType","string","number","bool","array","isRequired","func","styles","theme","display","alignItems","top","paddingTop","fontFamily","minWidth","lineHeight","left","position","right","verticalAlign","padding","marginLeft","paddingLeft","borderTop","marginTop","paddingBottom","marginBottom","flex","width","marginRight","maxWidth","color","text","backgroundColor","background","border","margin","height","borderBottom","palette","primary","main","zIndex","textAlign","outline","boxShadow","borderRadius","minHeight","spacing","unit","language","withStyles","RawDoneButton","hideBackground","iconRoot","label","root","common","white","grey","DoneButton","RawMathPreview","componentDidUpdate","prevProps","node","get","isSelected","selected","insideOverlay","mp","MathToolbar","done","onDone","UNSAFE_componentWillReceiveProps","hideDoneButton","keyPadCharacterRef","defaultProps","RawPureToolbar","hideDoneButtonBackground","pureToolbar","toolbar","any","PureToolbar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,4BAA4B,GAAG,MAAM;AAChDC,EAAAA,QAAQ,CAACC,gBAAT,CAA0B,wBAA1B,CAAA,CAAoDC,OAApD,CAA6DC,MAAD,IAAY;AACtE,IAAA,MAAMC,IAAI,GAAGD,MAAM,CAACE,sBAApB;;AAEA,IAAA,IAAID,IAAI,IAAIA,IAAI,CAACE,SAAL,CAAeC,QAAf,CAAwB,aAAxB,CAAR,IAAkDH,IAAI,CAACI,aAAL,CAAmB,cAAnB,CAAtD,EAA0F;AACxFL,MAAAA,MAAM,CAACG,SAAP,CAAiBG,GAAjB,CAAqB,yBAArB,CAAA;AACD,IAAA,CAFD,MAEO;AACLN,MAAAA,MAAM,CAACG,SAAP,CAAiBI,MAAjB,CAAwB,yBA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;AAgBjBhC,EAAAA,gBAAgB,EAAE2B,SAAS,CAACK,IAhBX;AAiBjBpC,EAAAA,gBAAgB,EAAE+B,SAAS,CAACK,IAjBX;AAkBjB9B,EAAAA,oBAAoB,EAAEyB,SAAS,CAACK,IAlBf;AAmBjBnC,EAAAA,UAAU,EAAE8B,SAAS,CAACK,IAnBL;AAoBjBuE,EAAAA,cAAc,EAAE5E,SAAS,CAACK,IApBT;AAqBjB2E,EAAAA,wBAAwB,EAAEhF,SAAS,CAACK,IArBnB;AAsBjBrD,EAAAA,KAAK,EAAEgD,SAAS,CAACmF,GAtBA;AAuBjB7J,EAAAA,gBAAgB,EAAE0E,SAAS,CAACI,MAvBX;AAwBjByE,EAAAA,kBAAkB,EAAE7E,SAAS,CAACC,MAxBb;AAyBjBzB,EAAAA,oBAAoB,EAAEwB,SAAS,CAACQ;AAzBf;AADRuE,eA6BJD,eAAe;AACpB1G,EAAAA,UAAU,EAAE,EADQ;AAEpB4G,EAAAA,wBAAwB,EAAE;AAFN;;AAkExB,MAAMvE,MAAM,GAAG,OAAO;AACpBwE,EAAAA,WAAW,EAAE;AACXtE,IAAAA,OAAO,EAAE,MADE;AAEXmB,IAAAA,KAAK,EAAE,MAFI;AAGXc,IAAAA,MAAM,EAAE,CAHG;AAIXhC,IAAAA,UAAU,EAAE;AAJD;AADO,CAAP,CAAf;;AASO,MAAMwE,WAAW,GAAG/B,UAAU,CAAC5C,MAAD,CAAV,CAAmBsE,cAAnB;;;;"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.27.1-next.0+a5d1550f",
6
+ "version": "1.28.1",
7
7
  "description": "Math toolbar for editing math equations",
8
8
  "keywords": [
9
9
  "math",
@@ -19,8 +19,8 @@
19
19
  "dependencies": {
20
20
  "@material-ui/core": "^3.8.3",
21
21
  "@material-ui/icons": "^3.0.2",
22
- "@pie-lib/math-input": "^6.27.1-next.0+a5d1550f",
23
- "@pie-lib/render-ui": "^4.31.1-next.0+a5d1550f",
22
+ "@pie-lib/math-input": "^6.28.1",
23
+ "@pie-lib/render-ui": "^4.32.1",
24
24
  "classnames": "^2.2.6",
25
25
  "debug": "^4.1.1",
26
26
  "keycode": "^2.2.0",
@@ -32,8 +32,15 @@
32
32
  "react-dom": "^16.9.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@pie-lib/test-utils": "^0.18.1-next.0+a5d1550f"
35
+ "@pie-lib/test-utils": "^0.19.1"
36
36
  },
37
37
  "scripts": {},
38
- "gitHead": "a5d1550faec7e27c8824e5aa4b4ef29ad4ee525a"
38
+ "gitHead": "be0b7951407a81d53b8b8b4861b8407b31728809",
39
+ "exports": {
40
+ ".": {
41
+ "import": "./esm/index.js",
42
+ "require": "./lib/index.js",
43
+ "default": "./esm/index.js"
44
+ }
45
+ }
39
46
  }