@atlaskit/editor-plugin-selection-extension 11.1.3 → 11.1.5
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 +14 -0
- package/dist/cjs/selectionExtensionPlugin.js +10 -3
- package/dist/cjs/ui/extension/SelectionExtensionComponentWrapper.js +7 -3
- package/dist/cjs/ui/utils/registerBlockMenuItems.js +3 -2
- package/dist/es2019/selectionExtensionPlugin.js +10 -3
- package/dist/es2019/ui/extension/SelectionExtensionComponentWrapper.js +7 -3
- package/dist/es2019/ui/utils/registerBlockMenuItems.js +4 -3
- package/dist/esm/selectionExtensionPlugin.js +10 -3
- package/dist/esm/ui/extension/SelectionExtensionComponentWrapper.js +7 -3
- package/dist/esm/ui/utils/registerBlockMenuItems.js +4 -3
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-extension
|
|
2
2
|
|
|
3
|
+
## 11.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
8
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.1.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 11.1.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
12
12
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
13
13
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
14
14
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
16
|
var _insertAdfAtEndOfDoc2 = require("./pm-plugins/actions/insertAdfAtEndOfDoc");
|
|
16
17
|
var _replaceWithAdf2 = require("./pm-plugins/actions/replaceWithAdf");
|
|
17
18
|
var _main = require("./pm-plugins/main");
|
|
@@ -54,7 +55,9 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
if ((0,
|
|
58
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
59
|
+
exposure: true
|
|
60
|
+
})) {
|
|
58
61
|
(0, _registerBlockMenuItems.registerBlockMenuItems)({
|
|
59
62
|
extensionList: extensionList,
|
|
60
63
|
api: api,
|
|
@@ -116,7 +119,9 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
|
|
|
116
119
|
return null;
|
|
117
120
|
}
|
|
118
121
|
var state = editorViewRef.current.state;
|
|
119
|
-
if ((0,
|
|
122
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
123
|
+
exposure: true
|
|
124
|
+
})) {
|
|
120
125
|
var _api$blockControls;
|
|
121
126
|
var selection = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 || (_api$blockControls = _api$blockControls.sharedState.currentState()) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.preservedSelection) || state.selection;
|
|
122
127
|
return (0, _utils.getSelectionAdfInfoNew)(selection);
|
|
@@ -134,7 +139,9 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
|
|
|
134
139
|
return null;
|
|
135
140
|
}
|
|
136
141
|
var state = editorViewRef.current.state;
|
|
137
|
-
if ((0,
|
|
142
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
143
|
+
exposure: true
|
|
144
|
+
})) {
|
|
138
145
|
var _api$blockControls2;
|
|
139
146
|
var selection = (api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || (_api$blockControls2 = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.preservedSelection) || state.selection;
|
|
140
147
|
return (0, _utils.getFragmentInfoFromSelectionNew)(selection);
|
|
@@ -8,7 +8,7 @@ exports.SelectionExtensionComponentWrapper = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
|
-
var
|
|
11
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
13
|
var SelectionExtensionComponentWrapper = exports.SelectionExtensionComponentWrapper = function SelectionExtensionComponentWrapper(_ref) {
|
|
14
14
|
var api = _ref.api,
|
|
@@ -53,7 +53,9 @@ var SelectionExtensionComponentWrapper = exports.SelectionExtensionComponentWrap
|
|
|
53
53
|
if (!extension) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
if (isToolbarAIFCEnabled || (0,
|
|
56
|
+
if (isToolbarAIFCEnabled || (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
57
|
+
exposure: true
|
|
58
|
+
})) {
|
|
57
59
|
var currentComponent;
|
|
58
60
|
if ('contentComponent' in extension && extension.contentComponent !== undefined) {
|
|
59
61
|
currentComponent = extension.contentComponent;
|
|
@@ -92,7 +94,9 @@ var SelectionExtensionComponentWrapper = exports.SelectionExtensionComponentWrap
|
|
|
92
94
|
if (!extension) {
|
|
93
95
|
return null;
|
|
94
96
|
}
|
|
95
|
-
if (isToolbarAIFCEnabled || (0,
|
|
97
|
+
if (isToolbarAIFCEnabled || (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
98
|
+
exposure: true
|
|
99
|
+
})) {
|
|
96
100
|
var hasContentComponent = function hasContentComponent(ext) {
|
|
97
101
|
return 'contentComponent' in ext && ext.contentComponent !== undefined;
|
|
98
102
|
};
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.registerBlockMenuItems = registerBlockMenuItems;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _SelectionExtensionMenuItems = require("../menu/SelectionExtensionMenuItems");
|
|
11
12
|
var _SelectionExtensionComponentContext = require("../SelectionExtensionComponentContext");
|
|
12
13
|
function registerBlockMenuItems(_ref) {
|
|
@@ -34,8 +35,8 @@ function registerBlockMenuItems(_ref) {
|
|
|
34
35
|
key: "selection-extension-".concat(key),
|
|
35
36
|
parent: {
|
|
36
37
|
type: 'block-menu-section',
|
|
37
|
-
key: _blockMenu.BLOCK_ACTIONS_MENU_SECTION.key,
|
|
38
|
-
rank: _blockMenu.BLOCK_ACTIONS_MENU_SECTION_RANK[_blockMenu.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
38
|
+
key: (0, _platformFeatureFlags.fg)('platform_editor_block_menu_divider_patch') ? _blockMenu.TRANSFORM_MENU_SECTION.key : _blockMenu.BLOCK_ACTIONS_MENU_SECTION.key,
|
|
39
|
+
rank: (0, _platformFeatureFlags.fg)('platform_editor_block_menu_divider_patch') ? _blockMenu.TRANSFORM_MENU_SECTION_RANK[_blockMenu.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key] : _blockMenu.BLOCK_ACTIONS_MENU_SECTION_RANK[_blockMenu.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
39
40
|
},
|
|
40
41
|
component: function component() {
|
|
41
42
|
var editorView = editorViewRef === null || editorViewRef === void 0 ? void 0 : editorViewRef.current;
|
|
@@ -4,6 +4,7 @@ import { selectionExtensionMessages } from '@atlaskit/editor-common/messages';
|
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
8
|
import { insertAdfAtEndOfDoc } from './pm-plugins/actions/insertAdfAtEndOfDoc';
|
|
8
9
|
import { replaceWithAdf } from './pm-plugins/actions/replaceWithAdf';
|
|
9
10
|
import { createPlugin, selectionExtensionPluginKey } from './pm-plugins/main';
|
|
@@ -43,7 +44,9 @@ export const selectionExtensionPlugin = ({
|
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
if (
|
|
47
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
48
|
+
exposure: true
|
|
49
|
+
})) {
|
|
47
50
|
registerBlockMenuItems({
|
|
48
51
|
extensionList,
|
|
49
52
|
api,
|
|
@@ -107,7 +110,9 @@ export const selectionExtensionPlugin = ({
|
|
|
107
110
|
const {
|
|
108
111
|
state
|
|
109
112
|
} = editorViewRef.current;
|
|
110
|
-
if (
|
|
113
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
114
|
+
exposure: true
|
|
115
|
+
})) {
|
|
111
116
|
var _api$blockControls, _api$blockControls$sh;
|
|
112
117
|
const selection = (api === null || api === void 0 ? void 0 : (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : (_api$blockControls$sh = _api$blockControls.sharedState.currentState()) === null || _api$blockControls$sh === void 0 ? void 0 : _api$blockControls$sh.preservedSelection) || state.selection;
|
|
113
118
|
return getSelectionAdfInfoNew(selection);
|
|
@@ -128,7 +133,9 @@ export const selectionExtensionPlugin = ({
|
|
|
128
133
|
const {
|
|
129
134
|
state
|
|
130
135
|
} = editorViewRef.current;
|
|
131
|
-
if (
|
|
136
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
137
|
+
exposure: true
|
|
138
|
+
})) {
|
|
132
139
|
var _api$blockControls2, _api$blockControls2$s;
|
|
133
140
|
const selection = (api === null || api === void 0 ? void 0 : (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 ? void 0 : (_api$blockControls2$s = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2$s === void 0 ? void 0 : _api$blockControls2$s.preservedSelection) || state.selection;
|
|
134
141
|
return getFragmentInfoFromSelectionNew(selection);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import {
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
5
|
export const SelectionExtensionComponentWrapper = ({
|
|
6
6
|
api,
|
|
7
7
|
editorAnalyticsAPI
|
|
@@ -47,7 +47,9 @@ export const SelectionExtensionComponentWrapper = ({
|
|
|
47
47
|
if (!extension) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
if (isToolbarAIFCEnabled ||
|
|
50
|
+
if (isToolbarAIFCEnabled || editorExperiment('platform_editor_block_menu', true, {
|
|
51
|
+
exposure: true
|
|
52
|
+
})) {
|
|
51
53
|
let currentComponent;
|
|
52
54
|
if ('contentComponent' in extension && extension.contentComponent !== undefined) {
|
|
53
55
|
currentComponent = extension.contentComponent;
|
|
@@ -86,7 +88,9 @@ export const SelectionExtensionComponentWrapper = ({
|
|
|
86
88
|
if (!extension) {
|
|
87
89
|
return null;
|
|
88
90
|
}
|
|
89
|
-
if (isToolbarAIFCEnabled ||
|
|
91
|
+
if (isToolbarAIFCEnabled || editorExperiment('platform_editor_block_menu', true, {
|
|
92
|
+
exposure: true
|
|
93
|
+
})) {
|
|
90
94
|
const hasContentComponent = ext => {
|
|
91
95
|
return 'contentComponent' in ext && ext.contentComponent !== undefined;
|
|
92
96
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM,
|
|
2
|
+
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_MENU_SECTION_RANK, TRANSFORM_MENU_SECTION, BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_MENU_SECTION_RANK, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION_RANK, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { SelectionExtensionMenuItems } from '../menu/SelectionExtensionMenuItems';
|
|
4
5
|
import { SelectionExtensionComponentContextProvider } from '../SelectionExtensionComponentContext';
|
|
5
6
|
export function registerBlockMenuItems({
|
|
@@ -29,8 +30,8 @@ export function registerBlockMenuItems({
|
|
|
29
30
|
key: `selection-extension-${key}`,
|
|
30
31
|
parent: {
|
|
31
32
|
type: 'block-menu-section',
|
|
32
|
-
key: BLOCK_ACTIONS_MENU_SECTION.key,
|
|
33
|
-
rank: BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
33
|
+
key: fg('platform_editor_block_menu_divider_patch') ? TRANSFORM_MENU_SECTION.key : BLOCK_ACTIONS_MENU_SECTION.key,
|
|
34
|
+
rank: fg('platform_editor_block_menu_divider_patch') ? TRANSFORM_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key] : BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
34
35
|
},
|
|
35
36
|
component: () => {
|
|
36
37
|
const editorView = editorViewRef === null || editorViewRef === void 0 ? void 0 : editorViewRef.current;
|
|
@@ -5,6 +5,7 @@ import { selectionExtensionMessages } from '@atlaskit/editor-common/messages';
|
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
9
|
import { insertAdfAtEndOfDoc as _insertAdfAtEndOfDoc } from './pm-plugins/actions/insertAdfAtEndOfDoc';
|
|
9
10
|
import { replaceWithAdf as _replaceWithAdf } from './pm-plugins/actions/replaceWithAdf';
|
|
10
11
|
import { createPlugin, selectionExtensionPluginKey } from './pm-plugins/main';
|
|
@@ -47,7 +48,9 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
|
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
if (
|
|
51
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
52
|
+
exposure: true
|
|
53
|
+
})) {
|
|
51
54
|
registerBlockMenuItems({
|
|
52
55
|
extensionList: extensionList,
|
|
53
56
|
api: api,
|
|
@@ -109,7 +112,9 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
|
|
|
109
112
|
return null;
|
|
110
113
|
}
|
|
111
114
|
var state = editorViewRef.current.state;
|
|
112
|
-
if (
|
|
115
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
116
|
+
exposure: true
|
|
117
|
+
})) {
|
|
113
118
|
var _api$blockControls;
|
|
114
119
|
var selection = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 || (_api$blockControls = _api$blockControls.sharedState.currentState()) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.preservedSelection) || state.selection;
|
|
115
120
|
return getSelectionAdfInfoNew(selection);
|
|
@@ -127,7 +132,9 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
|
|
|
127
132
|
return null;
|
|
128
133
|
}
|
|
129
134
|
var state = editorViewRef.current.state;
|
|
130
|
-
if (
|
|
135
|
+
if (editorExperiment('platform_editor_block_menu', true, {
|
|
136
|
+
exposure: true
|
|
137
|
+
})) {
|
|
131
138
|
var _api$blockControls2;
|
|
132
139
|
var selection = (api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || (_api$blockControls2 = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.preservedSelection) || state.selection;
|
|
133
140
|
return getFragmentInfoFromSelectionNew(selection);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import {
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
5
|
export var SelectionExtensionComponentWrapper = function SelectionExtensionComponentWrapper(_ref) {
|
|
6
6
|
var api = _ref.api,
|
|
7
7
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI;
|
|
@@ -45,7 +45,9 @@ export var SelectionExtensionComponentWrapper = function SelectionExtensionCompo
|
|
|
45
45
|
if (!extension) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
if (isToolbarAIFCEnabled ||
|
|
48
|
+
if (isToolbarAIFCEnabled || editorExperiment('platform_editor_block_menu', true, {
|
|
49
|
+
exposure: true
|
|
50
|
+
})) {
|
|
49
51
|
var currentComponent;
|
|
50
52
|
if ('contentComponent' in extension && extension.contentComponent !== undefined) {
|
|
51
53
|
currentComponent = extension.contentComponent;
|
|
@@ -84,7 +86,9 @@ export var SelectionExtensionComponentWrapper = function SelectionExtensionCompo
|
|
|
84
86
|
if (!extension) {
|
|
85
87
|
return null;
|
|
86
88
|
}
|
|
87
|
-
if (isToolbarAIFCEnabled ||
|
|
89
|
+
if (isToolbarAIFCEnabled || editorExperiment('platform_editor_block_menu', true, {
|
|
90
|
+
exposure: true
|
|
91
|
+
})) {
|
|
88
92
|
var hasContentComponent = function hasContentComponent(ext) {
|
|
89
93
|
return 'contentComponent' in ext && ext.contentComponent !== undefined;
|
|
90
94
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM,
|
|
2
|
+
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_MENU_SECTION_RANK, TRANSFORM_MENU_SECTION, BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_MENU_SECTION_RANK, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_CREATE_MENU_SECTION_RANK, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { SelectionExtensionMenuItems } from '../menu/SelectionExtensionMenuItems';
|
|
4
5
|
import { SelectionExtensionComponentContextProvider } from '../SelectionExtensionComponentContext';
|
|
5
6
|
export function registerBlockMenuItems(_ref) {
|
|
@@ -27,8 +28,8 @@ export function registerBlockMenuItems(_ref) {
|
|
|
27
28
|
key: "selection-extension-".concat(key),
|
|
28
29
|
parent: {
|
|
29
30
|
type: 'block-menu-section',
|
|
30
|
-
key: BLOCK_ACTIONS_MENU_SECTION.key,
|
|
31
|
-
rank: BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
31
|
+
key: fg('platform_editor_block_menu_divider_patch') ? TRANSFORM_MENU_SECTION.key : BLOCK_ACTIONS_MENU_SECTION.key,
|
|
32
|
+
rank: fg('platform_editor_block_menu_divider_patch') ? TRANSFORM_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key] : BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key]
|
|
32
33
|
},
|
|
33
34
|
component: function component() {
|
|
34
35
|
var editorView = editorViewRef === null || editorViewRef === void 0 ? void 0 : editorViewRef.current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-extension",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.5",
|
|
4
4
|
"description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/lozenge": "^13.5.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/primitives": "^18.0.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^43.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^11.1.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
@@ -127,6 +127,9 @@
|
|
|
127
127
|
},
|
|
128
128
|
"confluence_fronend_labels_categorization_migration": {
|
|
129
129
|
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"platform_editor_block_menu_divider_patch": {
|
|
132
|
+
"type": "boolean"
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
}
|