@atlaskit/editor-plugin-block-controls 1.7.2 → 1.8.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,25 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#123768](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/123768)
8
+ [`f1c6cc33e33bb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f1c6cc33e33bb) -
9
+ ED-24227 disable drag handle for wrapped media
10
+
11
+ ## 1.8.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#122895](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122895)
16
+ [`49b8c7658f3b5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/49b8c7658f3b5) -
17
+ [ED-24173] bump @atlaskit/adf-schema to 40.3.0 and @atlassian/adf-schema-json to 1.18.0
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 1.7.2
4
24
 
5
25
  ### Patch Changes
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.handleMouseOver = void 0;
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
7
8
  var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, event, api) {
8
9
  var _api$blockControls;
9
10
  var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
@@ -24,6 +25,9 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
24
25
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.anchorName) === anchorName) {
25
26
  return false;
26
27
  }
28
+ if (['wrap-right', 'wrap-left'].includes(rootElement.getAttribute('layout') || '') && (0, _platformFeatureFlags.fg)('platform_editor_element_drag_and_drop_ed_24227')) {
29
+ return false;
30
+ }
27
31
  var pos = view.posAtDOM(rootElement, 0, 0);
28
32
  var rootPos = view.state.doc.resolve(pos).start(1) - 1;
29
33
  var nodeType = rootElement.getAttribute('data-drag-handler-node-type');
@@ -1,3 +1,4 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  export const handleMouseOver = (view, event, api) => {
2
3
  var _api$blockControls;
3
4
  const {
@@ -19,6 +20,9 @@ export const handleMouseOver = (view, event, api) => {
19
20
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.anchorName) === anchorName) {
20
21
  return false;
21
22
  }
23
+ if (['wrap-right', 'wrap-left'].includes(rootElement.getAttribute('layout') || '') && fg('platform_editor_element_drag_and_drop_ed_24227')) {
24
+ return false;
25
+ }
22
26
  const pos = view.posAtDOM(rootElement, 0, 0);
23
27
  const rootPos = view.state.doc.resolve(pos).start(1) - 1;
24
28
  const nodeType = rootElement.getAttribute('data-drag-handler-node-type');
@@ -1,3 +1,4 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  export var handleMouseOver = function handleMouseOver(view, event, api) {
2
3
  var _api$blockControls;
3
4
  var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
@@ -18,6 +19,9 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
18
19
  if ((activeNode === null || activeNode === void 0 ? void 0 : activeNode.anchorName) === anchorName) {
19
20
  return false;
20
21
  }
22
+ if (['wrap-right', 'wrap-left'].includes(rootElement.getAttribute('layout') || '') && fg('platform_editor_element_drag_and_drop_ed_24227')) {
23
+ return false;
24
+ }
21
25
  var pos = view.posAtDOM(rootElement, 0, 0);
22
26
  var rootPos = view.state.doc.resolve(pos).start(1) - 1;
23
27
  var nodeType = rootElement.getAttribute('data-drag-handler-node-type');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.7.2",
3
+ "version": "1.8.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,9 +31,9 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^39.0.3",
35
- "@atlaskit/editor-common": "^86.6.0",
36
- "@atlaskit/editor-plugin-analytics": "^1.4.0",
34
+ "@atlaskit/adf-schema": "^40.3.0",
35
+ "@atlaskit/editor-common": "^86.7.0",
36
+ "@atlaskit/editor-plugin-analytics": "^1.5.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.5",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
39
39
  "@atlaskit/editor-plugin-width": "^1.1.0",
@@ -160,6 +160,9 @@
160
160
  },
161
161
  "platform_editor_element_drag_and_drop_ed_24330": {
162
162
  "type": "boolean"
163
+ },
164
+ "platform_editor_element_drag_and_drop_ed_24227": {
165
+ "type": "boolean"
163
166
  }
164
167
  }
165
168
  }