@pie-element/extended-text-entry 6.5.4-next.598 → 6.5.4-next.615

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.
@@ -10,8 +10,8 @@
10
10
  "dependencies": {
11
11
  "@material-ui/core": "^3.9.2",
12
12
  "@pie-framework/pie-configure-events": "^1.2.0",
13
- "@pie-lib/config-ui": "^10.10.18",
14
- "@pie-lib/editable-html": "^7.17.18",
13
+ "@pie-lib/config-ui": "^10.10.20",
14
+ "@pie-lib/editable-html": "^7.18.0",
15
15
  "lodash": "^4.17.15",
16
16
  "prop-types": "^15.6.2",
17
17
  "react": "^16.8.1",
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2.19/module/index.js";
2
- import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.20/module/index.js";
3
- import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.20/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.3.1/module/index.js";
2
+ import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.22/module/index.js";
3
+ import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.0.22/module/index.js";
4
4
  var lib = {};
5
5
  Object.defineProperty(lib, "__esModule", {
6
6
  value: true
package/module/element.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.19/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.22/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.18/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.20/module/index.js";
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;
@@ -30654,20 +30654,24 @@ var TablePlugin = (opts, toolbarPlugins) => {
30654
30654
  if (node.object !== 'document') {
30655
30655
  return;
30656
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;
30657
30662
  let shouldAddTextAfterNode = false;
30658
- const indexToNotHaveTableOn = node.nodes.size - 1;
30659
- const indexOfLastTable = node.nodes.findLastIndex(d => d.type === 'table');
30663
+ const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
30664
+ const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
30660
30665
  if (indexOfLastTable === indexToNotHaveTableOn) {
30661
30666
  shouldAddTextAfterNode = true;
30662
30667
  }
30663
30668
  if (!shouldAddTextAfterNode) {
30664
30669
  return;
30665
30670
  }
30666
- const tableNode = node.nodes.get(indexOfLastTable);
30667
30671
  return change => {
30668
30672
  if (shouldAddTextAfterNode) {
30669
- const tableJSON = tableNode.toJSON();
30670
- change.removeNodeByKey(tableNode.key);
30673
+ const tableJSON = tableAdded.toJSON();
30674
+ change.removeNodeByKey(tableAdded.key);
30671
30675
  const newBlock = Block.create({
30672
30676
  object: 'block',
30673
30677
  type: 'div'
@@ -30792,13 +30796,13 @@ const serialization$1 = {
30792
30796
  __self: this,
30793
30797
  __source: {
30794
30798
  fileName: _jsxFileName$e,
30795
- lineNumber: 413
30799
+ lineNumber: 418
30796
30800
  }
30797
30801
  }, React$f.createElement('tbody', {
30798
30802
  __self: this,
30799
30803
  __source: {
30800
30804
  fileName: _jsxFileName$e,
30801
- lineNumber: 414
30805
+ lineNumber: 419
30802
30806
  }
30803
30807
  }, children));
30804
30808
  }
@@ -30808,7 +30812,7 @@ const serialization$1 = {
30808
30812
  __self: this,
30809
30813
  __source: {
30810
30814
  fileName: _jsxFileName$e,
30811
- lineNumber: 419
30815
+ lineNumber: 424
30812
30816
  }
30813
30817
  }, children);
30814
30818
  }
@@ -30822,7 +30826,7 @@ const serialization$1 = {
30822
30826
  __self: this,
30823
30827
  __source: {
30824
30828
  fileName: _jsxFileName$e,
30825
- lineNumber: 425
30829
+ lineNumber: 430
30826
30830
  }
30827
30831
  }, children);
30828
30832
  } else {
@@ -30831,7 +30835,7 @@ const serialization$1 = {
30831
30835
  __self: this,
30832
30836
  __source: {
30833
30837
  fileName: _jsxFileName$e,
30834
- lineNumber: 427
30838
+ lineNumber: 432
30835
30839
  }
30836
30840
  }, children);
30837
30841
  }
@@ -32686,6 +32690,7 @@ class Editor extends React$3.Component {
32686
32690
  classes: PropTypes$2.object.isRequired,
32687
32691
  highlightShape: PropTypes$2.bool,
32688
32692
  disabled: PropTypes$2.bool,
32693
+ spellCheck: PropTypes$2.bool,
32689
32694
  nonEmpty: PropTypes$2.bool,
32690
32695
  disableUnderline: PropTypes$2.bool,
32691
32696
  autoWidthToolbar: PropTypes$2.bool,
@@ -33100,7 +33105,7 @@ class Editor extends React$3.Component {
33100
33105
  };
33101
33106
  }
33102
33107
  render() {
33103
- const {disabled, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
33108
+ const {disabled, spellCheck, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
33104
33109
  const {value, focusedNode, toolbarOpts} = this.state;
33105
33110
  log$3('[render] value: ', value);
33106
33111
  const sizeStyle = this.buildSizeStyle();
@@ -33117,7 +33122,7 @@ class Editor extends React$3.Component {
33117
33122
  __self: this,
33118
33123
  __source: {
33119
33124
  fileName: _jsxFileName$2,
33120
- lineNumber: 542
33125
+ lineNumber: 545
33121
33126
  }
33122
33127
  }, React$3.createElement(Editor$2, {
33123
33128
  plugins: this.plugins,
@@ -33142,6 +33147,7 @@ class Editor extends React$3.Component {
33142
33147
  focusedNode: focusedNode,
33143
33148
  normalize: this.normalize,
33144
33149
  readOnly: disabled,
33150
+ spellCheck: spellCheck,
33145
33151
  className: classes.slateEditor,
33146
33152
  style: {
33147
33153
  minHeight: sizeStyle.minHeight,
@@ -33155,7 +33161,7 @@ class Editor extends React$3.Component {
33155
33161
  __self: this,
33156
33162
  __source: {
33157
33163
  fileName: _jsxFileName$2,
33158
- lineNumber: 547
33164
+ lineNumber: 550
33159
33165
  }
33160
33166
  }));
33161
33167
  }
@@ -4,19 +4,19 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/shared-module",
7
- "version": "^1.2.19"
7
+ "version": "^1.3.1"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/math-rendering-module",
11
- "version": "^1.0.22"
11
+ "version": "^1.0.24"
12
12
  },
13
13
  {
14
14
  "name": "@pie-lib/math-edit-module",
15
- "version": "^1.1.18"
15
+ "version": "^1.1.20"
16
16
  },
17
17
  {
18
18
  "name": "@pie-lib/drag-module",
19
- "version": "^1.0.20"
19
+ "version": "^1.0.22"
20
20
  }
21
21
  ]
22
22
  }
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.19/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.22/module/index.js";
3
- import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.18/module/index.js";
4
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.20/module/index.js";
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;
@@ -30654,20 +30654,24 @@ var TablePlugin = (opts, toolbarPlugins) => {
30654
30654
  if (node.object !== 'document') {
30655
30655
  return;
30656
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;
30657
30662
  let shouldAddTextAfterNode = false;
30658
- const indexToNotHaveTableOn = node.nodes.size - 1;
30659
- const indexOfLastTable = node.nodes.findLastIndex(d => d.type === 'table');
30663
+ const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
30664
+ const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
30660
30665
  if (indexOfLastTable === indexToNotHaveTableOn) {
30661
30666
  shouldAddTextAfterNode = true;
30662
30667
  }
30663
30668
  if (!shouldAddTextAfterNode) {
30664
30669
  return;
30665
30670
  }
30666
- const tableNode = node.nodes.get(indexOfLastTable);
30667
30671
  return change => {
30668
30672
  if (shouldAddTextAfterNode) {
30669
- const tableJSON = tableNode.toJSON();
30670
- change.removeNodeByKey(tableNode.key);
30673
+ const tableJSON = tableAdded.toJSON();
30674
+ change.removeNodeByKey(tableAdded.key);
30671
30675
  const newBlock = Block.create({
30672
30676
  object: 'block',
30673
30677
  type: 'div'
@@ -30792,13 +30796,13 @@ const serialization$1 = {
30792
30796
  __self: this,
30793
30797
  __source: {
30794
30798
  fileName: _jsxFileName$e,
30795
- lineNumber: 413
30799
+ lineNumber: 418
30796
30800
  }
30797
30801
  }, React$f.createElement('tbody', {
30798
30802
  __self: this,
30799
30803
  __source: {
30800
30804
  fileName: _jsxFileName$e,
30801
- lineNumber: 414
30805
+ lineNumber: 419
30802
30806
  }
30803
30807
  }, children));
30804
30808
  }
@@ -30808,7 +30812,7 @@ const serialization$1 = {
30808
30812
  __self: this,
30809
30813
  __source: {
30810
30814
  fileName: _jsxFileName$e,
30811
- lineNumber: 419
30815
+ lineNumber: 424
30812
30816
  }
30813
30817
  }, children);
30814
30818
  }
@@ -30822,7 +30826,7 @@ const serialization$1 = {
30822
30826
  __self: this,
30823
30827
  __source: {
30824
30828
  fileName: _jsxFileName$e,
30825
- lineNumber: 425
30829
+ lineNumber: 430
30826
30830
  }
30827
30831
  }, children);
30828
30832
  } else {
@@ -30831,7 +30835,7 @@ const serialization$1 = {
30831
30835
  __self: this,
30832
30836
  __source: {
30833
30837
  fileName: _jsxFileName$e,
30834
- lineNumber: 427
30838
+ lineNumber: 432
30835
30839
  }
30836
30840
  }, children);
30837
30841
  }
@@ -32686,6 +32690,7 @@ class Editor extends React$3.Component {
32686
32690
  classes: PropTypes$2.object.isRequired,
32687
32691
  highlightShape: PropTypes$2.bool,
32688
32692
  disabled: PropTypes$2.bool,
32693
+ spellCheck: PropTypes$2.bool,
32689
32694
  nonEmpty: PropTypes$2.bool,
32690
32695
  disableUnderline: PropTypes$2.bool,
32691
32696
  autoWidthToolbar: PropTypes$2.bool,
@@ -33100,7 +33105,7 @@ class Editor extends React$3.Component {
33100
33105
  };
33101
33106
  }
33102
33107
  render() {
33103
- const {disabled, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
33108
+ const {disabled, spellCheck, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
33104
33109
  const {value, focusedNode, toolbarOpts} = this.state;
33105
33110
  log$3('[render] value: ', value);
33106
33111
  const sizeStyle = this.buildSizeStyle();
@@ -33117,7 +33122,7 @@ class Editor extends React$3.Component {
33117
33122
  __self: this,
33118
33123
  __source: {
33119
33124
  fileName: _jsxFileName$2,
33120
- lineNumber: 542
33125
+ lineNumber: 545
33121
33126
  }
33122
33127
  }, React$3.createElement(Editor$2, {
33123
33128
  plugins: this.plugins,
@@ -33142,6 +33147,7 @@ class Editor extends React$3.Component {
33142
33147
  focusedNode: focusedNode,
33143
33148
  normalize: this.normalize,
33144
33149
  readOnly: disabled,
33150
+ spellCheck: spellCheck,
33145
33151
  className: classes.slateEditor,
33146
33152
  style: {
33147
33153
  minHeight: sizeStyle.minHeight,
@@ -33155,7 +33161,7 @@ class Editor extends React$3.Component {
33155
33161
  __self: this,
33156
33162
  __source: {
33157
33163
  fileName: _jsxFileName$2,
33158
- lineNumber: 547
33164
+ lineNumber: 550
33159
33165
  }
33160
33166
  }));
33161
33167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/extended-text-entry",
3
- "version": "6.5.4-next.598+ee11c797b",
3
+ "version": "6.5.4-next.615+ee25d1a10",
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.17.18",
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": "ee11c797b50eb23033fb60914d44b47be5210833",
25
+ "gitHead": "ee25d1a10653a2036d869c107ca1b097750829eb",
26
26
  "scripts": {
27
27
  "postpublish": "../../scripts/postpublish"
28
28
  },