@atlaskit/editor-plugin-paste 2.0.13 → 2.0.14

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,16 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 2.0.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#102083](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102083)
8
+ [`7dfb89f8b8a19`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7dfb89f8b8a19) -
9
+ [ux] ED-26221 Changed order of paste handlers so that nested tables are handled before panels and
10
+ decisions. This prevents incorrect handling of nested tables when pasting a table into a panel
11
+ inside a table
12
+ - Updated dependencies
13
+
3
14
  ## 2.0.13
4
15
 
5
16
  ### Patch Changes
@@ -328,6 +328,11 @@ 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
+ }
331
336
  if ((0, _analytics2.handlePasteIntoTaskAndDecisionWithAnalytics)(view, event, slice, isPlainText ? _analytics.PasteTypes.plain : _analytics.PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
332
337
  return true;
333
338
  }
@@ -401,11 +406,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
401
406
  return true;
402
407
  }
403
408
 
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,6 +302,11 @@ 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
+ }
305
310
  if (handlePasteIntoTaskAndDecisionWithAnalytics(view, event, slice, isPlainText ? PasteTypes.plain : PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
306
311
  return true;
307
312
  }
@@ -377,11 +382,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
377
382
  return true;
378
383
  }
379
384
 
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,6 +320,11 @@ 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
+ }
323
328
  if (handlePasteIntoTaskAndDecisionWithAnalytics(view, event, slice, isPlainText ? PasteTypes.plain : PasteTypes.richText, pluginInjectionApi)(state, dispatch)) {
324
329
  return true;
325
330
  }
@@ -393,11 +398,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
393
398
  return true;
394
399
  }
395
400
 
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.13",
3
+ "version": "2.0.14",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/editor-common": "^98.0.0",
34
+ "@atlaskit/editor-common": "^99.0.0",
35
35
  "@atlaskit/editor-markdown-transformer": "^5.13.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-annotation": "^1.26.0",
@@ -39,14 +39,14 @@
39
39
  "@atlaskit/editor-plugin-card": "^4.5.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
41
41
  "@atlaskit/editor-plugin-list": "^3.9.0",
42
- "@atlaskit/editor-plugin-media": "^1.43.0",
43
- "@atlaskit/editor-plugin-mentions": "^2.10.0",
42
+ "@atlaskit/editor-plugin-media": "^1.44.0",
43
+ "@atlaskit/editor-plugin-mentions": "^2.11.0",
44
44
  "@atlaskit/editor-prosemirror": "6.2.1",
45
45
  "@atlaskit/editor-tables": "^2.8.0",
46
46
  "@atlaskit/media-client": "^29.0.0",
47
47
  "@atlaskit/media-common": "^11.7.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
- "@atlaskit/tmp-editor-statsig": "^2.31.0",
49
+ "@atlaskit/tmp-editor-statsig": "^2.33.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "lodash": "^4.17.21",
52
52
  "uuid": "^3.1.0"