@atlaskit/editor-plugin-extension 1.18.2 → 1.18.3

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-extension
2
2
 
3
+ ## 1.18.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#170141](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170141)
8
+ [`ffd83c94a6a9d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ffd83c94a6a9d) -
9
+ Wrap handleDrop logic added as part of the legacy content macro on the extension in a feature
10
+ gate.
11
+
3
12
  ## 1.18.2
4
13
 
5
14
  ### Patch Changes
@@ -352,13 +352,16 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
352
352
  useLongPressSelection: useLongPressSelection
353
353
  }),
354
354
  handleDrop: function handleDrop(view, event, slice, moved) {
355
- if (!allowDragAndDrop) {
356
- var _slice$content$firstC;
357
- // Completely disable DND for extension nodes when allowDragAndDrop is false
358
- var isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
359
- return isExtension;
355
+ if ((0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro')) {
356
+ if (!allowDragAndDrop) {
357
+ var _slice$content$firstC;
358
+ // Completely disable DND for extension nodes when allowDragAndDrop is false
359
+ var isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
360
+ return isExtension;
361
+ }
362
+ return false;
360
363
  }
361
- return true;
364
+ return false;
362
365
  }
363
366
  }
364
367
  });
@@ -286,13 +286,16 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
286
286
  useLongPressSelection
287
287
  }),
288
288
  handleDrop(view, event, slice, moved) {
289
- if (!allowDragAndDrop) {
290
- var _slice$content$firstC;
291
- // Completely disable DND for extension nodes when allowDragAndDrop is false
292
- const isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
293
- return isExtension;
289
+ if (fg('platform_editor_legacy_content_macro')) {
290
+ if (!allowDragAndDrop) {
291
+ var _slice$content$firstC;
292
+ // Completely disable DND for extension nodes when allowDragAndDrop is false
293
+ const isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
294
+ return isExtension;
295
+ }
296
+ return false;
294
297
  }
295
- return true;
298
+ return false;
296
299
  }
297
300
  }
298
301
  });
@@ -326,13 +326,16 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
326
326
  useLongPressSelection: useLongPressSelection
327
327
  }),
328
328
  handleDrop: function handleDrop(view, event, slice, moved) {
329
- if (!allowDragAndDrop) {
330
- var _slice$content$firstC;
331
- // Completely disable DND for extension nodes when allowDragAndDrop is false
332
- var isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
333
- return isExtension;
329
+ if (fg('platform_editor_legacy_content_macro')) {
330
+ if (!allowDragAndDrop) {
331
+ var _slice$content$firstC;
332
+ // Completely disable DND for extension nodes when allowDragAndDrop is false
333
+ var isExtension = slice.content.childCount === 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === view.state.schema.nodes.extension;
334
+ return isExtension;
335
+ }
336
+ return false;
334
337
  }
335
- return true;
338
+ return false;
336
339
  }
337
340
  }
338
341
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "1.18.2",
3
+ "version": "1.18.3",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/heading": "3.1.0",
47
47
  "@atlaskit/icon": "^22.26.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
- "@atlaskit/primitives": "^13.2.0",
49
+ "@atlaskit/primitives": "^13.3.0",
50
50
  "@atlaskit/radio": "^6.6.0",
51
51
  "@atlaskit/section-message": "^6.7.0",
52
52
  "@atlaskit/select": "^18.6.0",