@pie-element/extended-text-entry 6.7.7 → 6.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/configure/CHANGELOG.md +35 -0
- package/configure/lib/defaults.js +1 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/main.js +3 -3
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +8 -0
- package/controller/lib/index.js +2 -1
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/demo/generate.js +2 -1
- package/docs/pie-schema.json +10 -0
- package/docs/pie-schema.json.md +11 -0
- package/lib/main.js +14 -1
- package/lib/main.js.map +1 -1
- package/module/configure.js +18 -18
- package/module/controller.js +2 -1
- package/module/demo.js +2 -1
- package/module/element.js +99 -100
- package/module/index.html +1 -1
- package/module/manifest.json +5 -5
- package/module/print-demo.js +2 -1
- package/module/print.html +1 -1
- package/module/print.js +99 -100
- package/package.json +3 -3
package/module/print.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.
|
|
2
|
-
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.
|
|
4
|
-
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.
|
|
1
|
+
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.3.1/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.24/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.20/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.22/module/index.js";
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
function getDefaultExportFromCjs(x) {
|
|
7
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -21936,34 +21936,6 @@ function MathPlugin() {
|
|
|
21936
21936
|
}
|
|
21937
21937
|
});
|
|
21938
21938
|
}
|
|
21939
|
-
},
|
|
21940
|
-
normalizeNode: node => {
|
|
21941
|
-
if (node.object !== 'document') {
|
|
21942
|
-
return;
|
|
21943
|
-
}
|
|
21944
|
-
const addSpacesArray = [];
|
|
21945
|
-
const allElements = node.filterDescendants(d => d.type === 'math');
|
|
21946
|
-
allElements.forEach(el => {
|
|
21947
|
-
const prevText = node.getPreviousText(el.key);
|
|
21948
|
-
const lastCharIsNewLine = prevText.text[prevText.text.length - 1] === '\n';
|
|
21949
|
-
if (prevText.text.length === 0 || lastCharIsNewLine) {
|
|
21950
|
-
addSpacesArray.push({
|
|
21951
|
-
nr: lastCharIsNewLine ? 1 : 2,
|
|
21952
|
-
key: prevText.key
|
|
21953
|
-
});
|
|
21954
|
-
}
|
|
21955
|
-
});
|
|
21956
|
-
if (!addSpacesArray.length) {
|
|
21957
|
-
return;
|
|
21958
|
-
}
|
|
21959
|
-
return change => {
|
|
21960
|
-
change.withoutNormalization(() => {
|
|
21961
|
-
addSpacesArray.forEach(({key, nr}) => {
|
|
21962
|
-
const node = change.value.document.getNode(key);
|
|
21963
|
-
change.insertTextByKey(key, node.text.length, ('\u00A0').repeat(nr));
|
|
21964
|
-
});
|
|
21965
|
-
});
|
|
21966
|
-
};
|
|
21967
21939
|
}
|
|
21968
21940
|
};
|
|
21969
21941
|
}
|
|
@@ -21986,6 +21958,18 @@ const htmlDecode = input => {
|
|
|
21986
21958
|
const getTagName = el => {
|
|
21987
21959
|
return (el && el.tagName || '').toLowerCase();
|
|
21988
21960
|
};
|
|
21961
|
+
const lessThanHandling = input => {
|
|
21962
|
+
const arrowSplit = input.split('<');
|
|
21963
|
+
if (input.length > 2) {
|
|
21964
|
+
return arrowSplit.reduce((st, part) => {
|
|
21965
|
+
if (part.match(/<[a-zA-Z/][\s\S]*>/ig)) {
|
|
21966
|
+
return `${st}${st ? '<' : ''}${part}`;
|
|
21967
|
+
}
|
|
21968
|
+
return `${st}${st ? '<' : ''}${part}`;
|
|
21969
|
+
}, '');
|
|
21970
|
+
}
|
|
21971
|
+
return input;
|
|
21972
|
+
};
|
|
21989
21973
|
const serialization$4 = {
|
|
21990
21974
|
deserialize(el) {
|
|
21991
21975
|
const tagName = getTagName(el);
|
|
@@ -22030,14 +22014,14 @@ const serialization$4 = {
|
|
|
22030
22014
|
const l = object.data.get('latex');
|
|
22031
22015
|
const wrapper = object.data.get('wrapper');
|
|
22032
22016
|
log$f('[serialize] latex: ', l);
|
|
22033
|
-
const decoded = htmlDecode(l);
|
|
22017
|
+
const decoded = htmlDecode(lessThanHandling(l));
|
|
22034
22018
|
return React$p.createElement('span', {
|
|
22035
22019
|
'data-latex': "",
|
|
22036
22020
|
'data-raw': decoded,
|
|
22037
22021
|
__self: this,
|
|
22038
22022
|
__source: {
|
|
22039
22023
|
fileName: _jsxFileName$o,
|
|
22040
|
-
lineNumber:
|
|
22024
|
+
lineNumber: 268
|
|
22041
22025
|
}
|
|
22042
22026
|
}, wrapMath(decoded, wrapper));
|
|
22043
22027
|
}
|
|
@@ -22051,7 +22035,7 @@ const serialization$4 = {
|
|
|
22051
22035
|
__self: this,
|
|
22052
22036
|
__source: {
|
|
22053
22037
|
fileName: _jsxFileName$o,
|
|
22054
|
-
lineNumber:
|
|
22038
|
+
lineNumber: 280
|
|
22055
22039
|
}
|
|
22056
22040
|
});
|
|
22057
22041
|
}
|
|
@@ -22438,7 +22422,7 @@ class MediaDialog extends React$o.Component {
|
|
|
22438
22422
|
lineNumber: 347
|
|
22439
22423
|
}
|
|
22440
22424
|
}, "Cancel"), React$o.createElement(Button, {
|
|
22441
|
-
disabled: invalid || url === null,
|
|
22425
|
+
disabled: invalid || url === null || url === undefined,
|
|
22442
22426
|
onClick: () => this.handleDone(true),
|
|
22443
22427
|
color: "primary",
|
|
22444
22428
|
__self: this,
|
|
@@ -30493,6 +30477,17 @@ TableCell.propTypes = {
|
|
|
30493
30477
|
onBlur: PropTypes$a.func,
|
|
30494
30478
|
children: PropTypes$a.oneOfType([PropTypes$a.arrayOf(PropTypes$a.node), PropTypes$a.node]).isRequired
|
|
30495
30479
|
};
|
|
30480
|
+
const moveFocusToBeginningOfTable = change => {
|
|
30481
|
+
const addedTable = change.value.document.findDescendant(d => !!d.data && !!d.data.get('newTable'));
|
|
30482
|
+
if (!addedTable) {
|
|
30483
|
+
return;
|
|
30484
|
+
}
|
|
30485
|
+
change.collapseToStartOf(addedTable);
|
|
30486
|
+
const update = addedTable.data.remove('newTable');
|
|
30487
|
+
change.setNodeByKey(addedTable.key, {
|
|
30488
|
+
data: update
|
|
30489
|
+
});
|
|
30490
|
+
};
|
|
30496
30491
|
var TablePlugin = (opts, toolbarPlugins) => {
|
|
30497
30492
|
const core = _default({
|
|
30498
30493
|
typeContent: 'div'
|
|
@@ -30539,7 +30534,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30539
30534
|
__self: undefined,
|
|
30540
30535
|
__source: {
|
|
30541
30536
|
fileName: _jsxFileName$e,
|
|
30542
|
-
lineNumber:
|
|
30537
|
+
lineNumber: 145
|
|
30543
30538
|
}
|
|
30544
30539
|
}),
|
|
30545
30540
|
onClick: (value, onChange) => {
|
|
@@ -30547,10 +30542,12 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30547
30542
|
const change = value.change();
|
|
30548
30543
|
const newTable = core.utils.createTableWithOptions(2, 2, {
|
|
30549
30544
|
data: {
|
|
30550
|
-
border: '1'
|
|
30545
|
+
border: '1',
|
|
30546
|
+
newTable: true
|
|
30551
30547
|
}
|
|
30552
30548
|
});
|
|
30553
30549
|
change.insertBlock(newTable);
|
|
30550
|
+
moveFocusToBeginningOfTable(change);
|
|
30554
30551
|
onChange(change);
|
|
30555
30552
|
},
|
|
30556
30553
|
supports: (node, value) => node && node.object === 'block' && core.utils.isSelectionInTable(value),
|
|
@@ -30607,7 +30604,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30607
30604
|
__self: undefined,
|
|
30608
30605
|
__source: {
|
|
30609
30606
|
fileName: _jsxFileName$e,
|
|
30610
|
-
lineNumber:
|
|
30607
|
+
lineNumber: 213
|
|
30611
30608
|
}
|
|
30612
30609
|
});
|
|
30613
30610
|
return Tb;
|
|
@@ -30623,7 +30620,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30623
30620
|
__self: undefined,
|
|
30624
30621
|
__source: {
|
|
30625
30622
|
fileName: _jsxFileName$e,
|
|
30626
|
-
lineNumber:
|
|
30623
|
+
lineNumber: 234
|
|
30627
30624
|
}
|
|
30628
30625
|
});
|
|
30629
30626
|
case 'table_row':
|
|
@@ -30632,7 +30629,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30632
30629
|
__self: undefined,
|
|
30633
30630
|
__source: {
|
|
30634
30631
|
fileName: _jsxFileName$e,
|
|
30635
|
-
lineNumber:
|
|
30632
|
+
lineNumber: 236
|
|
30636
30633
|
}
|
|
30637
30634
|
});
|
|
30638
30635
|
case 'table_cell':
|
|
@@ -30643,7 +30640,7 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30643
30640
|
__self: undefined,
|
|
30644
30641
|
__source: {
|
|
30645
30642
|
fileName: _jsxFileName$e,
|
|
30646
|
-
lineNumber:
|
|
30643
|
+
lineNumber: 238
|
|
30647
30644
|
}
|
|
30648
30645
|
});
|
|
30649
30646
|
default:
|
|
@@ -30657,20 +30654,24 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30657
30654
|
if (node.object !== 'document') {
|
|
30658
30655
|
return;
|
|
30659
30656
|
}
|
|
30657
|
+
const tableAdded = node.findDescendant(d => d.data && d.data.get('newTable'));
|
|
30658
|
+
if (!tableAdded) {
|
|
30659
|
+
return;
|
|
30660
|
+
}
|
|
30661
|
+
const nodeToSearch = node.getParent(tableAdded.key) || node;
|
|
30660
30662
|
let shouldAddTextAfterNode = false;
|
|
30661
|
-
const indexToNotHaveTableOn =
|
|
30662
|
-
const indexOfLastTable =
|
|
30663
|
+
const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
|
|
30664
|
+
const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
|
|
30663
30665
|
if (indexOfLastTable === indexToNotHaveTableOn) {
|
|
30664
30666
|
shouldAddTextAfterNode = true;
|
|
30665
30667
|
}
|
|
30666
30668
|
if (!shouldAddTextAfterNode) {
|
|
30667
30669
|
return;
|
|
30668
30670
|
}
|
|
30669
|
-
const tableNode = node.nodes.get(indexOfLastTable);
|
|
30670
30671
|
return change => {
|
|
30671
30672
|
if (shouldAddTextAfterNode) {
|
|
30672
|
-
const tableJSON =
|
|
30673
|
-
change.removeNodeByKey(
|
|
30673
|
+
const tableJSON = tableAdded.toJSON();
|
|
30674
|
+
change.removeNodeByKey(tableAdded.key);
|
|
30674
30675
|
const newBlock = Block.create({
|
|
30675
30676
|
object: 'block',
|
|
30676
30677
|
type: 'div'
|
|
@@ -30681,7 +30682,14 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30681
30682
|
if (prevText) {
|
|
30682
30683
|
change.moveFocusTo(prevText.key, prevText.text.length).moveAnchorTo(prevText.key, prevText.text.length);
|
|
30683
30684
|
}
|
|
30684
|
-
change.insertBlock(
|
|
30685
|
+
change.insertBlock({
|
|
30686
|
+
...tableJSON,
|
|
30687
|
+
data: {
|
|
30688
|
+
...tableJSON.data,
|
|
30689
|
+
newTable: true
|
|
30690
|
+
}
|
|
30691
|
+
});
|
|
30692
|
+
moveFocusToBeginningOfTable(change);
|
|
30685
30693
|
});
|
|
30686
30694
|
}
|
|
30687
30695
|
};
|
|
@@ -30788,13 +30796,13 @@ const serialization$1 = {
|
|
|
30788
30796
|
__self: this,
|
|
30789
30797
|
__source: {
|
|
30790
30798
|
fileName: _jsxFileName$e,
|
|
30791
|
-
lineNumber:
|
|
30799
|
+
lineNumber: 418
|
|
30792
30800
|
}
|
|
30793
30801
|
}, React$f.createElement('tbody', {
|
|
30794
30802
|
__self: this,
|
|
30795
30803
|
__source: {
|
|
30796
30804
|
fileName: _jsxFileName$e,
|
|
30797
|
-
lineNumber:
|
|
30805
|
+
lineNumber: 419
|
|
30798
30806
|
}
|
|
30799
30807
|
}, children));
|
|
30800
30808
|
}
|
|
@@ -30804,7 +30812,7 @@ const serialization$1 = {
|
|
|
30804
30812
|
__self: this,
|
|
30805
30813
|
__source: {
|
|
30806
30814
|
fileName: _jsxFileName$e,
|
|
30807
|
-
lineNumber:
|
|
30815
|
+
lineNumber: 424
|
|
30808
30816
|
}
|
|
30809
30817
|
}, children);
|
|
30810
30818
|
}
|
|
@@ -30818,7 +30826,7 @@ const serialization$1 = {
|
|
|
30818
30826
|
__self: this,
|
|
30819
30827
|
__source: {
|
|
30820
30828
|
fileName: _jsxFileName$e,
|
|
30821
|
-
lineNumber:
|
|
30829
|
+
lineNumber: 430
|
|
30822
30830
|
}
|
|
30823
30831
|
}, children);
|
|
30824
30832
|
} else {
|
|
@@ -30827,7 +30835,7 @@ const serialization$1 = {
|
|
|
30827
30835
|
__self: this,
|
|
30828
30836
|
__source: {
|
|
30829
30837
|
fileName: _jsxFileName$e,
|
|
30830
|
-
lineNumber:
|
|
30838
|
+
lineNumber: 432
|
|
30831
30839
|
}
|
|
30832
30840
|
}, children);
|
|
30833
30841
|
}
|
|
@@ -31448,34 +31456,6 @@ function ResponseAreaPlugin(opts) {
|
|
|
31448
31456
|
});
|
|
31449
31457
|
}
|
|
31450
31458
|
},
|
|
31451
|
-
normalizeNode: node => {
|
|
31452
|
-
if (node.object !== 'document') {
|
|
31453
|
-
return;
|
|
31454
|
-
}
|
|
31455
|
-
const addSpacesArray = [];
|
|
31456
|
-
const allElements = node.filterDescendants(d => elTypesArray.indexOf(d.type) >= 0);
|
|
31457
|
-
allElements.forEach(el => {
|
|
31458
|
-
const prevText = node.getPreviousText(el.key);
|
|
31459
|
-
const lastCharIsNewLine = prevText.text[prevText.text.length - 1] === '\n';
|
|
31460
|
-
if (prevText.text.length === 0 || lastCharIsNewLine) {
|
|
31461
|
-
addSpacesArray.push({
|
|
31462
|
-
nr: lastCharIsNewLine ? 1 : 2,
|
|
31463
|
-
key: prevText.key
|
|
31464
|
-
});
|
|
31465
|
-
}
|
|
31466
|
-
});
|
|
31467
|
-
if (!addSpacesArray.length) {
|
|
31468
|
-
return;
|
|
31469
|
-
}
|
|
31470
|
-
return change => {
|
|
31471
|
-
change.withoutNormalization(() => {
|
|
31472
|
-
addSpacesArray.forEach(({key, nr}) => {
|
|
31473
|
-
const node = change.value.document.getNode(key);
|
|
31474
|
-
change.insertTextByKey(key, node.text.length, ('\u00A0').repeat(nr));
|
|
31475
|
-
});
|
|
31476
|
-
});
|
|
31477
|
-
};
|
|
31478
|
-
},
|
|
31479
31459
|
onDrop(event, change, editor) {
|
|
31480
31460
|
const closestEl = event.target.closest('[data-key]');
|
|
31481
31461
|
const inline = editor.value.document.findDescendant(d => d.key === closestEl.dataset.key);
|
|
@@ -31538,7 +31518,7 @@ const serialization = {
|
|
|
31538
31518
|
__self: this,
|
|
31539
31519
|
__source: {
|
|
31540
31520
|
fileName: _jsxFileName$8,
|
|
31541
|
-
lineNumber:
|
|
31521
|
+
lineNumber: 181
|
|
31542
31522
|
}
|
|
31543
31523
|
});
|
|
31544
31524
|
}
|
|
@@ -31552,7 +31532,7 @@ const serialization = {
|
|
|
31552
31532
|
__self: this,
|
|
31553
31533
|
__source: {
|
|
31554
31534
|
fileName: _jsxFileName$8,
|
|
31555
|
-
lineNumber:
|
|
31535
|
+
lineNumber: 187
|
|
31556
31536
|
}
|
|
31557
31537
|
});
|
|
31558
31538
|
}
|
|
@@ -31568,7 +31548,7 @@ const serialization = {
|
|
|
31568
31548
|
__self: this,
|
|
31569
31549
|
__source: {
|
|
31570
31550
|
fileName: _jsxFileName$8,
|
|
31571
|
-
lineNumber:
|
|
31551
|
+
lineNumber: 198
|
|
31572
31552
|
}
|
|
31573
31553
|
});
|
|
31574
31554
|
}
|
|
@@ -32425,7 +32405,7 @@ const style$1 = {
|
|
|
32425
32405
|
wordBreak: 'break-word',
|
|
32426
32406
|
overflow: 'visible',
|
|
32427
32407
|
maxHeight: '500px',
|
|
32428
|
-
padding: '5px
|
|
32408
|
+
padding: '5px'
|
|
32429
32409
|
}
|
|
32430
32410
|
},
|
|
32431
32411
|
children: {
|
|
@@ -32710,6 +32690,7 @@ class Editor extends React$3.Component {
|
|
|
32710
32690
|
classes: PropTypes$2.object.isRequired,
|
|
32711
32691
|
highlightShape: PropTypes$2.bool,
|
|
32712
32692
|
disabled: PropTypes$2.bool,
|
|
32693
|
+
spellCheck: PropTypes$2.bool,
|
|
32713
32694
|
nonEmpty: PropTypes$2.bool,
|
|
32714
32695
|
disableUnderline: PropTypes$2.bool,
|
|
32715
32696
|
autoWidthToolbar: PropTypes$2.bool,
|
|
@@ -32861,6 +32842,13 @@ class Editor extends React$3.Component {
|
|
|
32861
32842
|
});
|
|
32862
32843
|
}
|
|
32863
32844
|
}
|
|
32845
|
+
componentDidUpdate() {
|
|
32846
|
+
const zeroWidthEls = document.querySelectorAll('[data-slate-zero-width="z"]');
|
|
32847
|
+
Array.from(zeroWidthEls).forEach(el => {
|
|
32848
|
+
el.style.minWidth = '2px';
|
|
32849
|
+
el.style.display = 'inline-block';
|
|
32850
|
+
});
|
|
32851
|
+
}
|
|
32864
32852
|
__init() {
|
|
32865
32853
|
this.onPluginBlur = e => {
|
|
32866
32854
|
log$3('[onPluginBlur]', e && e.relatedTarget);
|
|
@@ -33117,7 +33105,7 @@ class Editor extends React$3.Component {
|
|
|
33117
33105
|
};
|
|
33118
33106
|
}
|
|
33119
33107
|
render() {
|
|
33120
|
-
const {disabled, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33108
|
+
const {disabled, spellCheck, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33121
33109
|
const {value, focusedNode, toolbarOpts} = this.state;
|
|
33122
33110
|
log$3('[render] value: ', value);
|
|
33123
33111
|
const sizeStyle = this.buildSizeStyle();
|
|
@@ -33134,7 +33122,7 @@ class Editor extends React$3.Component {
|
|
|
33134
33122
|
__self: this,
|
|
33135
33123
|
__source: {
|
|
33136
33124
|
fileName: _jsxFileName$2,
|
|
33137
|
-
lineNumber:
|
|
33125
|
+
lineNumber: 545
|
|
33138
33126
|
}
|
|
33139
33127
|
}, React$3.createElement(Editor$2, {
|
|
33140
33128
|
plugins: this.plugins,
|
|
@@ -33159,6 +33147,7 @@ class Editor extends React$3.Component {
|
|
|
33159
33147
|
focusedNode: focusedNode,
|
|
33160
33148
|
normalize: this.normalize,
|
|
33161
33149
|
readOnly: disabled,
|
|
33150
|
+
spellCheck: spellCheck,
|
|
33162
33151
|
className: classes.slateEditor,
|
|
33163
33152
|
style: {
|
|
33164
33153
|
minHeight: sizeStyle.minHeight,
|
|
@@ -33172,7 +33161,7 @@ class Editor extends React$3.Component {
|
|
|
33172
33161
|
__self: this,
|
|
33173
33162
|
__source: {
|
|
33174
33163
|
fileName: _jsxFileName$2,
|
|
33175
|
-
lineNumber:
|
|
33164
|
+
lineNumber: 550
|
|
33176
33165
|
}
|
|
33177
33166
|
}));
|
|
33178
33167
|
}
|
|
@@ -33368,10 +33357,11 @@ class Main extends React$1.Component {
|
|
|
33368
33357
|
}
|
|
33369
33358
|
render() {
|
|
33370
33359
|
const {model, classes, session} = this.props;
|
|
33371
|
-
const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled} = model;
|
|
33360
|
+
const {dimensions, disabled, feedback, teacherInstructions, mathInput, animationsDisabled, playersToolbarPosition} = model;
|
|
33372
33361
|
const {value} = session;
|
|
33373
33362
|
const {width, height} = dimensions || ({});
|
|
33374
33363
|
const maxHeight = '40vh';
|
|
33364
|
+
const toolbarOpts = {};
|
|
33375
33365
|
log$1('[render] disabled? ', disabled);
|
|
33376
33366
|
const teacherInstructionsDiv = React$1.createElement(PreviewPrompt, {
|
|
33377
33367
|
defaultClassName: "teacher-instructions",
|
|
@@ -33379,9 +33369,17 @@ class Main extends React$1.Component {
|
|
|
33379
33369
|
__self: this,
|
|
33380
33370
|
__source: {
|
|
33381
33371
|
fileName: _jsxFileName,
|
|
33382
|
-
lineNumber:
|
|
33372
|
+
lineNumber: 54
|
|
33383
33373
|
}
|
|
33384
33374
|
});
|
|
33375
|
+
switch (playersToolbarPosition) {
|
|
33376
|
+
case 'top':
|
|
33377
|
+
toolbarOpts.position = 'top';
|
|
33378
|
+
break;
|
|
33379
|
+
default:
|
|
33380
|
+
toolbarOpts.position = 'bottom';
|
|
33381
|
+
break;
|
|
33382
|
+
}
|
|
33385
33383
|
return React$1.createElement('div', {
|
|
33386
33384
|
className: classes.main,
|
|
33387
33385
|
ref: ref => {
|
|
@@ -33390,13 +33388,13 @@ class Main extends React$1.Component {
|
|
|
33390
33388
|
__self: this,
|
|
33391
33389
|
__source: {
|
|
33392
33390
|
fileName: _jsxFileName,
|
|
33393
|
-
lineNumber:
|
|
33391
|
+
lineNumber: 66
|
|
33394
33392
|
}
|
|
33395
33393
|
}, teacherInstructions && React$1.createElement('div', {
|
|
33396
33394
|
__self: this,
|
|
33397
33395
|
__source: {
|
|
33398
33396
|
fileName: _jsxFileName,
|
|
33399
|
-
lineNumber:
|
|
33397
|
+
lineNumber: 74
|
|
33400
33398
|
}
|
|
33401
33399
|
}, !animationsDisabled ? React$1.createElement(Collapsible, {
|
|
33402
33400
|
labels: {
|
|
@@ -33407,20 +33405,20 @@ class Main extends React$1.Component {
|
|
|
33407
33405
|
__self: this,
|
|
33408
33406
|
__source: {
|
|
33409
33407
|
fileName: _jsxFileName,
|
|
33410
|
-
lineNumber:
|
|
33408
|
+
lineNumber: 76
|
|
33411
33409
|
}
|
|
33412
33410
|
}, teacherInstructionsDiv) : teacherInstructionsDiv, React$1.createElement('br', {
|
|
33413
33411
|
__self: this,
|
|
33414
33412
|
__source: {
|
|
33415
33413
|
fileName: _jsxFileName,
|
|
33416
|
-
lineNumber:
|
|
33414
|
+
lineNumber: 83
|
|
33417
33415
|
}
|
|
33418
33416
|
})), model.prompt && React$1.createElement(Typography, {
|
|
33419
33417
|
className: classes.prompt,
|
|
33420
33418
|
__self: this,
|
|
33421
33419
|
__source: {
|
|
33422
33420
|
fileName: _jsxFileName,
|
|
33423
|
-
lineNumber:
|
|
33421
|
+
lineNumber: 88
|
|
33424
33422
|
}
|
|
33425
33423
|
}, React$1.createElement(PreviewPrompt, {
|
|
33426
33424
|
defaultClassName: "prompt",
|
|
@@ -33428,7 +33426,7 @@ class Main extends React$1.Component {
|
|
|
33428
33426
|
__self: this,
|
|
33429
33427
|
__source: {
|
|
33430
33428
|
fileName: _jsxFileName,
|
|
33431
|
-
lineNumber:
|
|
33429
|
+
lineNumber: 91
|
|
33432
33430
|
}
|
|
33433
33431
|
})), React$1.createElement(EditableHtml, {
|
|
33434
33432
|
className: "response-area-editor",
|
|
@@ -33439,6 +33437,7 @@ class Main extends React$1.Component {
|
|
|
33439
33437
|
maxHeight: maxHeight,
|
|
33440
33438
|
disabled: disabled,
|
|
33441
33439
|
highlightShape: true,
|
|
33440
|
+
toolbarOpts: toolbarOpts,
|
|
33442
33441
|
pluginProps: {
|
|
33443
33442
|
math: {
|
|
33444
33443
|
disabled: !mathInput,
|
|
@@ -33456,19 +33455,19 @@ class Main extends React$1.Component {
|
|
|
33456
33455
|
__self: this,
|
|
33457
33456
|
__source: {
|
|
33458
33457
|
fileName: _jsxFileName,
|
|
33459
|
-
lineNumber:
|
|
33458
|
+
lineNumber: 94
|
|
33460
33459
|
}
|
|
33461
33460
|
}), feedback && React$1.createElement('div', {
|
|
33462
33461
|
__self: this,
|
|
33463
33462
|
__source: {
|
|
33464
33463
|
fileName: _jsxFileName,
|
|
33465
|
-
lineNumber:
|
|
33464
|
+
lineNumber: 120
|
|
33466
33465
|
}
|
|
33467
33466
|
}, React$1.createElement('br', {
|
|
33468
33467
|
__self: this,
|
|
33469
33468
|
__source: {
|
|
33470
33469
|
fileName: _jsxFileName,
|
|
33471
|
-
lineNumber:
|
|
33470
|
+
lineNumber: 121
|
|
33472
33471
|
}
|
|
33473
33472
|
}), React$1.createElement(Feedback, {
|
|
33474
33473
|
correctness: "correct",
|
|
@@ -33476,7 +33475,7 @@ class Main extends React$1.Component {
|
|
|
33476
33475
|
__self: this,
|
|
33477
33476
|
__source: {
|
|
33478
33477
|
fileName: _jsxFileName,
|
|
33479
|
-
lineNumber:
|
|
33478
|
+
lineNumber: 122
|
|
33480
33479
|
}
|
|
33481
33480
|
})));
|
|
33482
33481
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
13
|
"@material-ui/icons": "^3.0.2",
|
|
14
14
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
15
|
-
"@pie-lib/editable-html": "^7.
|
|
15
|
+
"@pie-lib/editable-html": "^7.18.0",
|
|
16
16
|
"@pie-lib/math-rendering": "^2.3.12",
|
|
17
17
|
"@pie-lib/render-ui": "^4.12.4",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "^16.8.1",
|
|
23
23
|
"react-dom": "^16.8.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "cd1a2efd59f915b882937dea95c2675b2d2a3a50",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"postpublish": "../../scripts/postpublish"
|
|
28
28
|
},
|