@atlaskit/editor-plugin-table 7.2.0 → 7.2.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
+ ## 7.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#70802](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70802) [`ee58189e1b0e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee58189e1b0e) - ED-21911 Adding custom paste handling for content copied from MBE frames.
8
+
3
9
  ## 7.2.0
4
10
 
5
11
  ### Minor Changes
@@ -171,6 +171,9 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
171
171
 
172
172
  /** If a partial paste of bodied extension, paste only text */
173
173
  slice = (0, _transforms.transformSliceToRemoveOpenBodiedExtension)(slice, schema);
174
+
175
+ /** If a partial paste of multi bodied extension, paste only children */
176
+ slice = (0, _transforms.transformSliceToRemoveOpenMultiBodiedExtension)(slice, schema);
174
177
  slice = (0, _utils3.transformSliceToCorrectEmptyTableCells)(slice, schema);
175
178
  if (!pluginConfig.allowColumnResizing) {
176
179
  slice = (0, _misc.transformSliceToRemoveColumnsWidths)(slice, schema);
@@ -1,7 +1,7 @@
1
1
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { insideTable } from '@atlaskit/editor-common/core-utils';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
- import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
4
+ import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes, transformSliceToRemoveOpenMultiBodiedExtension } from '@atlaskit/editor-common/transforms';
5
5
  import { browser, closestElement } from '@atlaskit/editor-common/utils';
6
6
  import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from '../commands';
@@ -163,6 +163,9 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
163
163
 
164
164
  /** If a partial paste of bodied extension, paste only text */
165
165
  slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
166
+
167
+ /** If a partial paste of multi bodied extension, paste only children */
168
+ slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
166
169
  slice = transformSliceToCorrectEmptyTableCells(slice, schema);
167
170
  if (!pluginConfig.allowColumnResizing) {
168
171
  slice = transformSliceToRemoveColumnsWidths(slice, schema);
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import { insideTable } from '@atlaskit/editor-common/core-utils';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
- import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes } from '@atlaskit/editor-common/transforms';
7
+ import { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenLayoutNodes, transformSliceToRemoveOpenMultiBodiedExtension } from '@atlaskit/editor-common/transforms';
8
8
  import { browser, closestElement } from '@atlaskit/editor-common/utils';
9
9
  import { findParentDomRefOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
10
10
  import { addBoldInEmptyHeaderCells, clearHoverSelection, setTableRef } from '../commands';
@@ -164,6 +164,9 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
164
164
 
165
165
  /** If a partial paste of bodied extension, paste only text */
166
166
  slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
167
+
168
+ /** If a partial paste of multi bodied extension, paste only children */
169
+ slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
167
170
  slice = transformSliceToCorrectEmptyTableCells(slice, schema);
168
171
  if (!pluginConfig.allowColumnResizing) {
169
172
  slice = transformSliceToRemoveColumnsWidths(slice, schema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,7 +64,7 @@
64
64
  "react-intl-next": "npm:react-intl@^5.18.1"
65
65
  },
66
66
  "devDependencies": {
67
- "@atlaskit/analytics-next": "^9.1.0",
67
+ "@atlaskit/analytics-next": "^9.2.0",
68
68
  "@atlaskit/editor-plugin-decorations": "^0.2.0",
69
69
  "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
70
70
  "@atlaskit/editor-plugin-grid": "^0.3.0",
@@ -21,6 +21,7 @@ import {
21
21
  transformSliceToRemoveOpenBodiedExtension,
22
22
  transformSliceToRemoveOpenExpand,
23
23
  transformSliceToRemoveOpenLayoutNodes,
24
+ transformSliceToRemoveOpenMultiBodiedExtension,
24
25
  } from '@atlaskit/editor-common/transforms';
25
26
  import type {
26
27
  GetEditorContainerWidth,
@@ -281,6 +282,9 @@ export const createPlugin = (
281
282
  /** If a partial paste of bodied extension, paste only text */
282
283
  slice = transformSliceToRemoveOpenBodiedExtension(slice, schema);
283
284
 
285
+ /** If a partial paste of multi bodied extension, paste only children */
286
+ slice = transformSliceToRemoveOpenMultiBodiedExtension(slice, schema);
287
+
284
288
  slice = transformSliceToCorrectEmptyTableCells(slice, schema);
285
289
 
286
290
  if (!pluginConfig.allowColumnResizing) {