@atlaskit/editor-plugin-paste 2.0.15 → 2.0.16

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,14 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 2.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [#102083](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102083)
8
+ [`0b462924a7c7a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0b462924a7c7a) -
9
+ [ux] ED-26221 Reverting changes to nested table paste behaviour for panels in tables as it caused
10
+ some unexpected issues with cell copy/paste
11
+
3
12
  ## 2.0.15
4
13
 
5
14
  ### Patch Changes
@@ -328,11 +328,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
328
328
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
329
329
  slice.openStart = 1;
330
330
  }
331
-
332
- // handle paste of nested tables to ensure nesting limits are respected
333
- if ((0, _analytics2.handleNestedTablePasteWithAnalytics)(editorAnalyticsAPI, (0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
334
- return true;
335
- }
336
331
  if ((0, _analytics2.handlePasteIntoTaskAndDecisionWithAnalytics)(view, event, slice, isPlainText ? _analytics.PasteTypes.plain : _analytics.PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
337
332
  return true;
338
333
  }
@@ -406,6 +401,11 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
406
401
  return true;
407
402
  }
408
403
 
404
+ // handle paste of nested tables to ensure nesting limits are respected
405
+ if ((0, _analytics2.handleNestedTablePasteWithAnalytics)(editorAnalyticsAPI, (0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
406
+ return true;
407
+ }
408
+
409
409
  // handle the case when copy content from a table cell inside bodied extension
410
410
  if ((0, _handlers.handleTableContentPasteInBodiedExtension)(slice)(state, dispatch)) {
411
411
  return true;
@@ -302,11 +302,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
302
302
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
303
303
  slice.openStart = 1;
304
304
  }
305
-
306
- // handle paste of nested tables to ensure nesting limits are respected
307
- if (handleNestedTablePasteWithAnalytics(editorAnalyticsAPI, fg('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
308
- return true;
309
- }
310
305
  if (handlePasteIntoTaskAndDecisionWithAnalytics(view, event, slice, isPlainText ? PasteTypes.plain : PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
311
306
  return true;
312
307
  }
@@ -382,6 +377,11 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
382
377
  return true;
383
378
  }
384
379
 
380
+ // handle paste of nested tables to ensure nesting limits are respected
381
+ if (handleNestedTablePasteWithAnalytics(editorAnalyticsAPI, fg('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
382
+ return true;
383
+ }
384
+
385
385
  // handle the case when copy content from a table cell inside bodied extension
386
386
  if (handleTableContentPasteInBodiedExtension(slice)(state, dispatch)) {
387
387
  return true;
@@ -320,11 +320,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
320
320
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
321
321
  slice.openStart = 1;
322
322
  }
323
-
324
- // handle paste of nested tables to ensure nesting limits are respected
325
- if (handleNestedTablePasteWithAnalytics(editorAnalyticsAPI, fg('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
326
- return true;
327
- }
328
323
  if (handlePasteIntoTaskAndDecisionWithAnalytics(view, event, slice, isPlainText ? PasteTypes.plain : PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
329
324
  return true;
330
325
  }
@@ -398,6 +393,11 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
398
393
  return true;
399
394
  }
400
395
 
396
+ // handle paste of nested tables to ensure nesting limits are respected
397
+ if (handleNestedTablePasteWithAnalytics(editorAnalyticsAPI, fg('platform_editor_use_nested_table_pm_nodes'))(view, event, slice)(state, dispatch)) {
398
+ return true;
399
+ }
400
+
401
401
  // handle the case when copy content from a table cell inside bodied extension
402
402
  if (handleTableContentPasteInBodiedExtension(slice)(state, dispatch)) {
403
403
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",