@atlaskit/editor-plugin-table 9.5.9 → 10.0.0

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,34 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
8
+ [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
9
+ This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
10
+ status of only supporting React 18 going forward. No explicit breaking change to React support has
11
+ been made in this release, but this is to signify going forward, breaking changes for React 16 or
12
+ React 17 may come via non-major semver releases.
13
+
14
+ Please refer this community post for more details:
15
+ https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
21
+ ## 9.5.10
22
+
23
+ ### Patch Changes
24
+
25
+ - [#116555](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116555)
26
+ [`ee0cb1bc42e39`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee0cb1bc42e39) -
27
+ [ux] ED-26663 Bugfix for a regression introduced by nested tables - when nested table nodes are
28
+ enabled but the nested table experiment is disabled, copying table content inside a bodied
29
+ extension and pasting it in the table results in the content being pasted under the table and
30
+ wrapped in a table
31
+
3
32
  ## 9.5.9
4
33
 
5
34
  ### Patch Changes
@@ -193,11 +193,21 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
193
193
  // This needs to go before `transformSliceToRemoveOpenTable`
194
194
  slice = (0, _transforms.transformSliceToRemoveOpenExpand)(slice, schema);
195
195
 
196
- /** If a partial paste of table, paste only table's content */
197
- slice = (0, _paste.transformSliceToRemoveOpenTable)(slice, schema);
196
+ // transformSliceToRemoveOpenTable() transforms based on the depth of the root node, assuming that the tables will be at the root
197
+ // Bodied extensions will contribute to the depth of the table selection so we need to remove them first
198
+ if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_bodied_extension_fix')) {
199
+ /** If a partial paste of bodied extension, paste only text */
200
+ slice = (0, _transforms.transformSliceToRemoveOpenBodiedExtension)(slice, schema);
198
201
 
199
- /** If a partial paste of bodied extension, paste only text */
200
- slice = (0, _transforms.transformSliceToRemoveOpenBodiedExtension)(slice, schema);
202
+ /** If a partial paste of table, paste only table's content */
203
+ slice = (0, _paste.transformSliceToRemoveOpenTable)(slice, schema);
204
+ } else {
205
+ /** If a partial paste of table, paste only table's content */
206
+ slice = (0, _paste.transformSliceToRemoveOpenTable)(slice, schema);
207
+
208
+ /** If a partial paste of bodied extension, paste only text */
209
+ slice = (0, _transforms.transformSliceToRemoveOpenBodiedExtension)(slice, schema);
210
+ }
201
211
 
202
212
  /** If a partial paste of multi bodied extension, paste only children */
203
213
  slice = (0, _transforms.transformSliceToRemoveOpenMultiBodiedExtension)(slice, schema);
@@ -195,8 +195,8 @@ var containsNonTableBlockChildren = function containsNonTableBlockChildren(fragm
195
195
  var transformSliceToRemoveOpenTable = exports.transformSliceToRemoveOpenTable = function transformSliceToRemoveOpenTable(slice, schema) {
196
196
  var _slice$content$firstC4;
197
197
  if ((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_paste_wrap_fix')) {
198
- // Case 1: A slice of a textblock selection inside a nested table
199
- // Prosemirror wraps nested textblock selections in their respective tables
198
+ // Case 1: A slice of a block selection inside a nested table
199
+ // Prosemirror wraps nested block selections in their respective tables
200
200
  // We are using `safeInsert` to paste nested tables, so we do not want to preserve this wrapping
201
201
 
202
202
  // slice starts and ends inside a nested table at the same depth
@@ -208,7 +208,7 @@ var transformSliceToRemoveOpenTable = exports.transformSliceToRemoveOpenTable =
208
208
  // if the slice is a single cell table and contains cells with single cell tables, descend into it until we find textblock children
209
209
  if (isFragmentSingleCellTable(slice.content, schema)) {
210
210
  var _slice$content$firstC2;
211
- (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 || _slice$content$firstC2.descendants(function (node, _pos, parent) {
211
+ (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 || _slice$content$firstC2.descendants(function (node) {
212
212
  if (isNodeSingleCellTable(node, schema)) {
213
213
  descendedDepth += tableDepthDecrement;
214
214
  } else if (node.type === schema.nodes.table) {
@@ -22,13 +22,13 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
22
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
23
23
  var _tableMap = require("@atlaskit/editor-tables/table-map");
24
24
  var _utils3 = require("@atlaskit/editor-tables/utils");
25
- var _contentAlignCenter = _interopRequireDefault(require("@atlaskit/icon/core/content-align-center"));
26
- var _contentAlignLeft = _interopRequireDefault(require("@atlaskit/icon/core/content-align-left"));
25
+ var _alignImageCenter = _interopRequireDefault(require("@atlaskit/icon/core/align-image-center"));
26
+ var _alignImageLeft = _interopRequireDefault(require("@atlaskit/icon/core/align-image-left"));
27
27
  var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
28
28
  var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
29
29
  var _tableColumnsDistribute = _interopRequireDefault(require("@atlaskit/icon/core/table-columns-distribute"));
30
- var _alignImageCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-center"));
31
- var _alignImageLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-left"));
30
+ var _alignImageCenter2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-center"));
31
+ var _alignImageLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-left"));
32
32
  var _layoutThreeEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-equal"));
33
33
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
34
34
  var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
@@ -625,22 +625,22 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
625
625
  id: 'editor.table.alignLeft',
626
626
  value: 'align-start',
627
627
  icon: function icon() {
628
- return (0, _react.jsx)(_contentAlignLeft.default, {
628
+ return (0, _react.jsx)(_alignImageLeft.default, {
629
629
  color: "currentColor",
630
630
  spacing: "spacious",
631
631
  label: "table-align-start-icon",
632
- LEGACY_fallbackIcon: _alignImageLeft.default
632
+ LEGACY_fallbackIcon: _alignImageLeft2.default
633
633
  });
634
634
  }
635
635
  }, {
636
636
  id: 'editor.table.alignCenter',
637
637
  value: 'center',
638
638
  icon: function icon() {
639
- return (0, _react.jsx)(_contentAlignCenter.default, {
639
+ return (0, _react.jsx)(_alignImageCenter.default, {
640
640
  color: "currentColor",
641
641
  spacing: "spacious",
642
642
  label: "table-align-center-icon",
643
- LEGACY_fallbackIcon: _alignImageCenter.default
643
+ LEGACY_fallbackIcon: _alignImageCenter2.default
644
644
  });
645
645
  }
646
646
  }];
@@ -185,11 +185,21 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
185
185
  // This needs to go before `transformSliceToRemoveOpenTable`
186
186
  slice = transformSliceToRemoveOpenExpand(slice, schema);
187
187
 
188
- /** If a partial paste of table, paste only table's content */
189
- slice = transformSliceToRemoveOpenTable(slice, schema);
188
+ // transformSliceToRemoveOpenTable() transforms based on the depth of the root node, assuming that the tables will be at the root
189
+ // Bodied extensions will contribute to the depth of the table selection so we need to remove them first
190
+ if (fg('platform_editor_nested_tables_bodied_extension_fix')) {
191
+ /** If a partial paste of bodied extension, paste only text */
192
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
190
193
 
191
- /** If a partial paste of bodied extension, paste only text */
192
- slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
194
+ /** If a partial paste of table, paste only table's content */
195
+ slice = transformSliceToRemoveOpenTable(slice, schema);
196
+ } else {
197
+ /** If a partial paste of table, paste only table's content */
198
+ slice = transformSliceToRemoveOpenTable(slice, schema);
199
+
200
+ /** If a partial paste of bodied extension, paste only text */
201
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
202
+ }
193
203
 
194
204
  /** If a partial paste of multi bodied extension, paste only children */
195
205
  slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
@@ -187,8 +187,8 @@ const containsNonTableBlockChildren = (fragment, schema) => {
187
187
  export const transformSliceToRemoveOpenTable = (slice, schema) => {
188
188
  var _slice$content$firstC8;
189
189
  if (fg('platform_editor_nested_tables_paste_wrap_fix')) {
190
- // Case 1: A slice of a textblock selection inside a nested table
191
- // Prosemirror wraps nested textblock selections in their respective tables
190
+ // Case 1: A slice of a block selection inside a nested table
191
+ // Prosemirror wraps nested block selections in their respective tables
192
192
  // We are using `safeInsert` to paste nested tables, so we do not want to preserve this wrapping
193
193
 
194
194
  // slice starts and ends inside a nested table at the same depth
@@ -200,7 +200,7 @@ export const transformSliceToRemoveOpenTable = (slice, schema) => {
200
200
  // if the slice is a single cell table and contains cells with single cell tables, descend into it until we find textblock children
201
201
  if (isFragmentSingleCellTable(slice.content, schema)) {
202
202
  var _slice$content$firstC2;
203
- (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.descendants((node, _pos, parent) => {
203
+ (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.descendants(node => {
204
204
  if (isNodeSingleCellTable(node, schema)) {
205
205
  descendedDepth += tableDepthDecrement;
206
206
  } else if (node.type === schema.nodes.table) {
@@ -17,8 +17,8 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
17
17
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
18
18
  import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
19
19
  import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
20
- import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
21
- import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
20
+ import AlignImageCenterIcon from '@atlaskit/icon/core/align-image-center';
21
+ import AlignImageLeftIcon from '@atlaskit/icon/core/align-image-left';
22
22
  import CustomizeIcon from '@atlaskit/icon/core/customize';
23
23
  import DeleteIcon from '@atlaskit/icon/core/delete';
24
24
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
@@ -579,7 +579,7 @@ const getAlignmentOptionsConfig = (editorState, {
579
579
  const alignmentIcons = [{
580
580
  id: 'editor.table.alignLeft',
581
581
  value: 'align-start',
582
- icon: () => jsx(ContentAlignLeftIcon, {
582
+ icon: () => jsx(AlignImageLeftIcon, {
583
583
  color: "currentColor",
584
584
  spacing: "spacious",
585
585
  label: "table-align-start-icon",
@@ -588,7 +588,7 @@ const getAlignmentOptionsConfig = (editorState, {
588
588
  }, {
589
589
  id: 'editor.table.alignCenter',
590
590
  value: 'center',
591
- icon: () => jsx(ContentAlignCenterIcon, {
591
+ icon: () => jsx(AlignImageCenterIcon, {
592
592
  color: "currentColor",
593
593
  spacing: "spacious",
594
594
  label: "table-align-center-icon",
@@ -186,11 +186,21 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
186
186
  // This needs to go before `transformSliceToRemoveOpenTable`
187
187
  slice = transformSliceToRemoveOpenExpand(slice, schema);
188
188
 
189
- /** If a partial paste of table, paste only table's content */
190
- slice = transformSliceToRemoveOpenTable(slice, schema);
189
+ // transformSliceToRemoveOpenTable() transforms based on the depth of the root node, assuming that the tables will be at the root
190
+ // Bodied extensions will contribute to the depth of the table selection so we need to remove them first
191
+ if (fg('platform_editor_nested_tables_bodied_extension_fix')) {
192
+ /** If a partial paste of bodied extension, paste only text */
193
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
191
194
 
192
- /** If a partial paste of bodied extension, paste only text */
193
- slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
195
+ /** If a partial paste of table, paste only table's content */
196
+ slice = transformSliceToRemoveOpenTable(slice, schema);
197
+ } else {
198
+ /** If a partial paste of table, paste only table's content */
199
+ slice = transformSliceToRemoveOpenTable(slice, schema);
200
+
201
+ /** If a partial paste of bodied extension, paste only text */
202
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
203
+ }
194
204
 
195
205
  /** If a partial paste of multi bodied extension, paste only children */
196
206
  slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
@@ -188,8 +188,8 @@ var containsNonTableBlockChildren = function containsNonTableBlockChildren(fragm
188
188
  export var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpenTable(slice, schema) {
189
189
  var _slice$content$firstC4;
190
190
  if (fg('platform_editor_nested_tables_paste_wrap_fix')) {
191
- // Case 1: A slice of a textblock selection inside a nested table
192
- // Prosemirror wraps nested textblock selections in their respective tables
191
+ // Case 1: A slice of a block selection inside a nested table
192
+ // Prosemirror wraps nested block selections in their respective tables
193
193
  // We are using `safeInsert` to paste nested tables, so we do not want to preserve this wrapping
194
194
 
195
195
  // slice starts and ends inside a nested table at the same depth
@@ -201,7 +201,7 @@ export var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpen
201
201
  // if the slice is a single cell table and contains cells with single cell tables, descend into it until we find textblock children
202
202
  if (isFragmentSingleCellTable(slice.content, schema)) {
203
203
  var _slice$content$firstC2;
204
- (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 || _slice$content$firstC2.descendants(function (node, _pos, parent) {
204
+ (_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 || _slice$content$firstC2.descendants(function (node) {
205
205
  if (isNodeSingleCellTable(node, schema)) {
206
206
  descendedDepth += tableDepthDecrement;
207
207
  } else if (node.type === schema.nodes.table) {
@@ -21,8 +21,8 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
21
21
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
22
22
  import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
23
23
  import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
24
- import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
25
- import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
24
+ import AlignImageCenterIcon from '@atlaskit/icon/core/align-image-center';
25
+ import AlignImageLeftIcon from '@atlaskit/icon/core/align-image-left';
26
26
  import CustomizeIcon from '@atlaskit/icon/core/customize';
27
27
  import DeleteIcon from '@atlaskit/icon/core/delete';
28
28
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
@@ -617,7 +617,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
617
617
  id: 'editor.table.alignLeft',
618
618
  value: 'align-start',
619
619
  icon: function icon() {
620
- return jsx(ContentAlignLeftIcon, {
620
+ return jsx(AlignImageLeftIcon, {
621
621
  color: "currentColor",
622
622
  spacing: "spacious",
623
623
  label: "table-align-start-icon",
@@ -628,7 +628,7 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
628
628
  id: 'editor.table.alignCenter',
629
629
  value: 'center',
630
630
  icon: function icon() {
631
- return jsx(ContentAlignCenterIcon, {
631
+ return jsx(AlignImageCenterIcon, {
632
632
  color: "currentColor",
633
633
  spacing: "spacious",
634
634
  label: "table-align-center-icon",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "9.5.9",
3
+ "version": "10.0.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,33 +28,33 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^47.2.1",
31
- "@atlaskit/button": "^20.5.0",
31
+ "@atlaskit/button": "^21.0.0",
32
32
  "@atlaskit/custom-steps": "^0.10.0",
33
- "@atlaskit/editor-common": "^99.18.0",
34
- "@atlaskit/editor-palette": "1.7.0",
35
- "@atlaskit/editor-plugin-accessibility-utils": "^1.4.0",
36
- "@atlaskit/editor-plugin-analytics": "^1.12.0",
37
- "@atlaskit/editor-plugin-batch-attribute-updates": "1.3.1",
38
- "@atlaskit/editor-plugin-content-insertion": "^1.13.0",
39
- "@atlaskit/editor-plugin-editor-viewmode": "^2.2.0",
40
- "@atlaskit/editor-plugin-guideline": "^1.4.0",
41
- "@atlaskit/editor-plugin-selection": "^1.8.0",
42
- "@atlaskit/editor-plugin-width": "^2.1.0",
33
+ "@atlaskit/editor-common": "^100.0.0",
34
+ "@atlaskit/editor-palette": "2.0.0",
35
+ "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
36
+ "@atlaskit/editor-plugin-analytics": "^2.0.0",
37
+ "@atlaskit/editor-plugin-batch-attribute-updates": "2.0.0",
38
+ "@atlaskit/editor-plugin-content-insertion": "^2.0.0",
39
+ "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
40
+ "@atlaskit/editor-plugin-guideline": "^2.0.0",
41
+ "@atlaskit/editor-plugin-selection": "^2.0.0",
42
+ "@atlaskit/editor-plugin-width": "^3.0.0",
43
43
  "@atlaskit/editor-prosemirror": "7.0.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.3.0",
45
45
  "@atlaskit/editor-tables": "^2.9.0",
46
- "@atlaskit/icon": "^23.10.0",
47
- "@atlaskit/menu": "^2.14.0",
46
+ "@atlaskit/icon": "^24.0.0",
47
+ "@atlaskit/menu": "^3.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
50
50
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
51
51
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
52
- "@atlaskit/primitives": "^13.6.0",
53
- "@atlaskit/theme": "^16.0.0",
54
- "@atlaskit/tmp-editor-statsig": "^2.47.0",
55
- "@atlaskit/toggle": "^14.2.0",
56
- "@atlaskit/tokens": "^3.3.0",
57
- "@atlaskit/tooltip": "^19.2.0",
52
+ "@atlaskit/primitives": "^14.0.0",
53
+ "@atlaskit/theme": "^17.0.0",
54
+ "@atlaskit/tmp-editor-statsig": "^3.0.0",
55
+ "@atlaskit/toggle": "^15.0.0",
56
+ "@atlaskit/tokens": "^4.0.0",
57
+ "@atlaskit/tooltip": "^20.0.0",
58
58
  "@babel/runtime": "^7.0.0",
59
59
  "@emotion/react": "^11.7.1",
60
60
  "classnames": "^2.2.5",
@@ -64,8 +64,8 @@
64
64
  "uuid": "^3.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
68
- "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
67
+ "react": "^18.2.0",
68
+ "react-dom": "^18.2.0",
69
69
  "react-intl-next": "npm:react-intl@^5.18.1"
70
70
  },
71
71
  "devDependencies": {
@@ -164,6 +164,9 @@
164
164
  },
165
165
  "platform_editor_react18_stickyheaders_fix": {
166
166
  "type": "boolean"
167
+ },
168
+ "platform_editor_nested_tables_bodied_extension_fix": {
169
+ "type": "boolean"
167
170
  }
168
171
  }
169
172
  }
@@ -287,11 +287,21 @@ export const createPlugin = (
287
287
  // This needs to go before `transformSliceToRemoveOpenTable`
288
288
  slice = transformSliceToRemoveOpenExpand(slice, schema);
289
289
 
290
- /** If a partial paste of table, paste only table's content */
291
- slice = transformSliceToRemoveOpenTable(slice, schema);
292
-
293
- /** If a partial paste of bodied extension, paste only text */
294
- slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
290
+ // transformSliceToRemoveOpenTable() transforms based on the depth of the root node, assuming that the tables will be at the root
291
+ // Bodied extensions will contribute to the depth of the table selection so we need to remove them first
292
+ if (fg('platform_editor_nested_tables_bodied_extension_fix')) {
293
+ /** If a partial paste of bodied extension, paste only text */
294
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
295
+
296
+ /** If a partial paste of table, paste only table's content */
297
+ slice = transformSliceToRemoveOpenTable(slice, schema);
298
+ } else {
299
+ /** If a partial paste of table, paste only table's content */
300
+ slice = transformSliceToRemoveOpenTable(slice, schema);
301
+
302
+ /** If a partial paste of bodied extension, paste only text */
303
+ slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
304
+ }
295
305
 
296
306
  /** If a partial paste of multi bodied extension, paste only children */
297
307
  slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
@@ -244,8 +244,8 @@ const containsNonTableBlockChildren = (fragment: Fragment, schema: Schema): bool
244
244
 
245
245
  export const transformSliceToRemoveOpenTable = (slice: Slice, schema: Schema): Slice => {
246
246
  if (fg('platform_editor_nested_tables_paste_wrap_fix')) {
247
- // Case 1: A slice of a textblock selection inside a nested table
248
- // Prosemirror wraps nested textblock selections in their respective tables
247
+ // Case 1: A slice of a block selection inside a nested table
248
+ // Prosemirror wraps nested block selections in their respective tables
249
249
  // We are using `safeInsert` to paste nested tables, so we do not want to preserve this wrapping
250
250
 
251
251
  // slice starts and ends inside a nested table at the same depth
@@ -256,7 +256,7 @@ export const transformSliceToRemoveOpenTable = (slice: Slice, schema: Schema): S
256
256
 
257
257
  // if the slice is a single cell table and contains cells with single cell tables, descend into it until we find textblock children
258
258
  if (isFragmentSingleCellTable(slice.content, schema)) {
259
- slice.content.firstChild?.descendants((node, _pos, parent) => {
259
+ slice.content.firstChild?.descendants((node) => {
260
260
  if (isNodeSingleCellTable(node, schema)) {
261
261
  descendedDepth += tableDepthDecrement;
262
262
  } else if (node.type === schema.nodes.table) {
@@ -46,8 +46,8 @@ import {
46
46
  isSelectionType,
47
47
  splitCell,
48
48
  } from '@atlaskit/editor-tables/utils';
49
- import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
50
- import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
49
+ import AlignImageCenterIcon from '@atlaskit/icon/core/align-image-center';
50
+ import AlignImageLeftIcon from '@atlaskit/icon/core/align-image-left';
51
51
  import CustomizeIcon from '@atlaskit/icon/core/customize';
52
52
  import DeleteIcon from '@atlaskit/icon/core/delete';
53
53
  import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
@@ -901,7 +901,7 @@ const getAlignmentOptionsConfig = (
901
901
  id: 'editor.table.alignLeft',
902
902
  value: 'align-start',
903
903
  icon: () => (
904
- <ContentAlignLeftIcon
904
+ <AlignImageLeftIcon
905
905
  color="currentColor"
906
906
  spacing="spacious"
907
907
  label="table-align-start-icon"
@@ -913,7 +913,7 @@ const getAlignmentOptionsConfig = (
913
913
  id: 'editor.table.alignCenter',
914
914
  value: 'center',
915
915
  icon: () => (
916
- <ContentAlignCenterIcon
916
+ <AlignImageCenterIcon
917
917
  color="currentColor"
918
918
  spacing="spacious"
919
919
  label="table-align-center-icon"