@atlaskit/editor-plugin-block-controls 7.17.2 → 7.18.0
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-block-controls
|
|
2
2
|
|
|
3
|
+
## 7.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6668fda9b38d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6668fda9b38d7) -
|
|
8
|
+
ED-29716 add limited mode support to native anchor
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 7.17.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
|
+
var _nodeAnchor = require("@atlaskit/editor-common/node-anchor");
|
|
12
13
|
var _performanceMeasures = require("@atlaskit/editor-common/performance-measures");
|
|
13
14
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
14
15
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
@@ -738,10 +739,17 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
738
739
|
}
|
|
739
740
|
},
|
|
740
741
|
mouseover: function mouseover(view, event) {
|
|
741
|
-
var _api$limitedMode6;
|
|
742
|
+
var _api$limitedMode6, _getNodeIdProvider;
|
|
742
743
|
if (api !== null && api !== void 0 && (_api$limitedMode6 = api.limitedMode) !== null && _api$limitedMode6 !== void 0 && (_api$limitedMode6 = _api$limitedMode6.sharedState.currentState()) !== null && _api$limitedMode6 !== void 0 && _api$limitedMode6.enabled) {
|
|
743
744
|
return;
|
|
744
745
|
}
|
|
746
|
+
|
|
747
|
+
// another layer of protection to prevent handling mouseover
|
|
748
|
+
// when native anchor with dnd is enabled in limited mode
|
|
749
|
+
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
750
|
+
if ((_getNodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_native_anchor_patch_2')) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
745
753
|
(0, _handleMouseOver.handleMouseOver)(view, event, api);
|
|
746
754
|
return false;
|
|
747
755
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import rafSchedule from 'raf-schd';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
4
|
+
import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
|
|
4
5
|
import { isMeasuring, startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
7
|
import { DRAG_HANDLE_SELECTOR } from '@atlaskit/editor-common/styles';
|
|
@@ -742,10 +743,17 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
742
743
|
}
|
|
743
744
|
},
|
|
744
745
|
mouseover: (view, event) => {
|
|
745
|
-
var _api$limitedMode6, _api$limitedMode6$sha;
|
|
746
|
+
var _api$limitedMode6, _api$limitedMode6$sha, _getNodeIdProvider;
|
|
746
747
|
if (api !== null && api !== void 0 && (_api$limitedMode6 = api.limitedMode) !== null && _api$limitedMode6 !== void 0 && (_api$limitedMode6$sha = _api$limitedMode6.sharedState.currentState()) !== null && _api$limitedMode6$sha !== void 0 && _api$limitedMode6$sha.enabled) {
|
|
747
748
|
return;
|
|
748
749
|
}
|
|
750
|
+
|
|
751
|
+
// another layer of protection to prevent handling mouseover
|
|
752
|
+
// when native anchor with dnd is enabled in limited mode
|
|
753
|
+
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
754
|
+
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_2')) {
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
749
757
|
handleMouseOver(view, event, api);
|
|
750
758
|
return false;
|
|
751
759
|
},
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
7
|
+
import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
|
|
7
8
|
import { isMeasuring, startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
8
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
10
|
import { DRAG_HANDLE_SELECTOR } from '@atlaskit/editor-common/styles';
|
|
@@ -732,10 +733,17 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
732
733
|
}
|
|
733
734
|
},
|
|
734
735
|
mouseover: function mouseover(view, event) {
|
|
735
|
-
var _api$limitedMode6;
|
|
736
|
+
var _api$limitedMode6, _getNodeIdProvider;
|
|
736
737
|
if (api !== null && api !== void 0 && (_api$limitedMode6 = api.limitedMode) !== null && _api$limitedMode6 !== void 0 && (_api$limitedMode6 = _api$limitedMode6.sharedState.currentState()) !== null && _api$limitedMode6 !== void 0 && _api$limitedMode6.enabled) {
|
|
737
738
|
return;
|
|
738
739
|
}
|
|
740
|
+
|
|
741
|
+
// another layer of protection to prevent handling mouseover
|
|
742
|
+
// when native anchor with dnd is enabled in limited mode
|
|
743
|
+
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
744
|
+
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_2')) {
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
739
747
|
handleMouseOver(view, event, api);
|
|
740
748
|
return false;
|
|
741
749
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-feature-flags": "^5.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-interaction": "^11.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-limited-mode": "^3.
|
|
38
|
+
"@atlaskit/editor-plugin-limited-mode": "^3.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-metrics": "^7.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-quick-insert": "^6.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"uuid": "^3.1.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@atlaskit/editor-common": "^110.
|
|
69
|
+
"@atlaskit/editor-common": "^110.49.0",
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
72
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -151,6 +151,9 @@
|
|
|
151
151
|
},
|
|
152
152
|
"platform_editor_native_anchor_patch_1": {
|
|
153
153
|
"type": "boolean"
|
|
154
|
+
},
|
|
155
|
+
"platform_editor_native_anchor_patch_2": {
|
|
156
|
+
"type": "boolean"
|
|
154
157
|
}
|
|
155
158
|
}
|
|
156
159
|
}
|