@atlaskit/editor-plugin-table 10.4.0 → 10.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 10.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 10.4.0
4
10
 
5
11
  ### Minor Changes
@@ -90,7 +90,7 @@ var transformSliceToRemoveNestedTables = exports.transformSliceToRemoveNestedTab
90
90
  var _slice$content$firstC, _slice$content$lastCh;
91
91
  var isPasteInTable = (0, _utils2.hasParentNodeOfType)([table, tableCell, tableHeader])(selection);
92
92
  var isPasteInNestedTable = (0, _nesting.getParentOfTypeCount)(schema.nodes.table)(selection.$from) > 1;
93
- var isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table;
93
+ var isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table && slice.openStart !== 0 && slice.openEnd !== 0;
94
94
 
95
95
  // if nesting is allowed we bump up the default nesting allowance to 2 to support
96
96
  // two levels of nesting in nodes that support table nesting already such as layoutSection and expands
@@ -80,7 +80,7 @@ export const transformSliceToRemoveNestedTables = (slice, schema, selection) =>
80
80
  var _slice$content$firstC, _slice$content$lastCh;
81
81
  const isPasteInTable = hasParentNodeOfType([table, tableCell, tableHeader])(selection);
82
82
  const isPasteInNestedTable = getParentOfTypeCount(schema.nodes.table)(selection.$from) > 1;
83
- const isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table;
83
+ const isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table && slice.openStart !== 0 && slice.openEnd !== 0;
84
84
 
85
85
  // if nesting is allowed we bump up the default nesting allowance to 2 to support
86
86
  // two levels of nesting in nodes that support table nesting already such as layoutSection and expands
@@ -83,7 +83,7 @@ export var transformSliceToRemoveNestedTables = function transformSliceToRemoveN
83
83
  var _slice$content$firstC, _slice$content$lastCh;
84
84
  var isPasteInTable = hasParentNodeOfType([table, tableCell, tableHeader])(selection);
85
85
  var isPasteInNestedTable = getParentOfTypeCount(schema.nodes.table)(selection.$from) > 1;
86
- var isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table;
86
+ var isCellPaste = isPasteInTable && slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === table && slice.openStart !== 0 && slice.openEnd !== 0;
87
87
 
88
88
  // if nesting is allowed we bump up the default nesting allowance to 2 to support
89
89
  // two levels of nesting in nodes that support table nesting already such as layoutSection and expands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "10.4.0",
3
+ "version": "10.4.1",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/adf-schema": "^47.6.0",
33
33
  "@atlaskit/button": "^21.1.0",
34
34
  "@atlaskit/custom-steps": "^0.11.0",
35
- "@atlaskit/editor-common": "^102.3.0",
35
+ "@atlaskit/editor-common": "^102.4.0",
36
36
  "@atlaskit/editor-palette": "^2.0.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.1.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/editor-prosemirror": "7.0.0",
46
46
  "@atlaskit/editor-shared-styles": "^3.4.0",
47
47
  "@atlaskit/editor-tables": "^2.9.0",
48
- "@atlaskit/icon": "^24.1.0",
48
+ "@atlaskit/icon": "^25.0.0",
49
49
  "@atlaskit/menu": "^3.1.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
@@ -53,9 +53,9 @@
53
53
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
54
54
  "@atlaskit/primitives": "^14.1.0",
55
55
  "@atlaskit/theme": "^18.0.0",
56
- "@atlaskit/tmp-editor-statsig": "^3.5.0",
56
+ "@atlaskit/tmp-editor-statsig": "^3.6.0",
57
57
  "@atlaskit/toggle": "^15.0.0",
58
- "@atlaskit/tokens": "^4.3.0",
58
+ "@atlaskit/tokens": "^4.4.0",
59
59
  "@atlaskit/tooltip": "^20.0.0",
60
60
  "@babel/runtime": "^7.0.0",
61
61
  "@emotion/react": "^11.7.1",
@@ -109,7 +109,9 @@ export const transformSliceToRemoveNestedTables = (
109
109
  const isCellPaste =
110
110
  isPasteInTable &&
111
111
  slice.content.childCount === 1 &&
112
- slice.content.firstChild?.type === table;
112
+ slice.content.firstChild?.type === table &&
113
+ slice.openStart !== 0 &&
114
+ slice.openEnd !== 0;
113
115
 
114
116
  // if nesting is allowed we bump up the default nesting allowance to 2 to support
115
117
  // two levels of nesting in nodes that support table nesting already such as layoutSection and expands