@atlaskit/editor-plugin-block-menu 11.1.0 → 11.1.2
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 11.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b2f53114889ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2f53114889ac) -
|
|
8
|
+
Clean up feature gate `platform_editor_block_menu_jira_patch_1`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 11.1.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -14,7 +14,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
14
14
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
15
15
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
16
16
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _box = require("@atlaskit/primitives/box");
|
|
19
18
|
var _text = _interopRequireDefault(require("@atlaskit/primitives/text"));
|
|
20
19
|
var _consts = require("./consts");
|
|
@@ -65,7 +64,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
65
64
|
})({
|
|
66
65
|
tr: tr
|
|
67
66
|
});
|
|
68
|
-
if (preservedSelection
|
|
67
|
+
if (preservedSelection) {
|
|
69
68
|
var _api$blockControls3;
|
|
70
69
|
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || (_api$blockControls3 = _api$blockControls3.commands) === null || _api$blockControls3 === void 0 || _api$blockControls3.stopPreservingSelection()({
|
|
71
70
|
tr: tr
|
|
@@ -79,12 +78,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
79
78
|
api === null || api === void 0 || api.core.actions.execute(function (_ref3) {
|
|
80
79
|
var _api$blockControls4, _api$decorations, _api$decorations$hove;
|
|
81
80
|
var tr = _ref3.tr;
|
|
82
|
-
|
|
83
|
-
// Passes preservedSelection (NodeSelection) to hoverDecoration so paragraph nodes
|
|
84
|
-
// are correctly highlighted on hover over Delete. Without this, tr.selection is a
|
|
85
|
-
// collapsed TextSelection which produces no decorations for paragraphs.
|
|
86
|
-
// To clean up: always pass preservedSelection, remove the feature flag check.
|
|
87
|
-
var preservedSelection = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_jira_patch_1') ? api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || (_api$blockControls4 = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4 === void 0 ? void 0 : _api$blockControls4.preservedSelection : undefined;
|
|
81
|
+
var preservedSelection = api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || (_api$blockControls4 = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4 === void 0 ? void 0 : _api$blockControls4.preservedSelection;
|
|
88
82
|
api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 || (_api$decorations = _api$decorations.commands) === null || _api$decorations === void 0 || (_api$decorations$hove = _api$decorations.hoverDecoration) === null || _api$decorations$hove === void 0 || _api$decorations$hove.call(_api$decorations, {
|
|
89
83
|
add: true,
|
|
90
84
|
selection: preservedSelection
|
|
@@ -6,7 +6,6 @@ import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection';
|
|
7
7
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/box';
|
|
11
10
|
import Text from '@atlaskit/primitives/text';
|
|
12
11
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
@@ -59,7 +58,7 @@ const DeleteDropdownItemContent = ({
|
|
|
59
58
|
})({
|
|
60
59
|
tr
|
|
61
60
|
});
|
|
62
|
-
if (preservedSelection
|
|
61
|
+
if (preservedSelection) {
|
|
63
62
|
var _api$blockControls3, _api$blockControls3$c;
|
|
64
63
|
api === null || api === void 0 ? void 0 : (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 ? void 0 : (_api$blockControls3$c = _api$blockControls3.commands) === null || _api$blockControls3$c === void 0 ? void 0 : _api$blockControls3$c.stopPreservingSelection()({
|
|
65
64
|
tr
|
|
@@ -74,12 +73,7 @@ const DeleteDropdownItemContent = ({
|
|
|
74
73
|
tr
|
|
75
74
|
}) => {
|
|
76
75
|
var _api$blockControls4, _api$blockControls4$s, _api$decorations, _api$decorations$comm, _api$decorations$comm2;
|
|
77
|
-
|
|
78
|
-
// Passes preservedSelection (NodeSelection) to hoverDecoration so paragraph nodes
|
|
79
|
-
// are correctly highlighted on hover over Delete. Without this, tr.selection is a
|
|
80
|
-
// collapsed TextSelection which produces no decorations for paragraphs.
|
|
81
|
-
// To clean up: always pass preservedSelection, remove the feature flag check.
|
|
82
|
-
const preservedSelection = fg('platform_editor_block_menu_jira_patch_1') ? api === null || api === void 0 ? void 0 : (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 ? void 0 : (_api$blockControls4$s = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4$s === void 0 ? void 0 : _api$blockControls4$s.preservedSelection : undefined;
|
|
76
|
+
const preservedSelection = api === null || api === void 0 ? void 0 : (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 ? void 0 : (_api$blockControls4$s = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4$s === void 0 ? void 0 : _api$blockControls4$s.preservedSelection;
|
|
83
77
|
api === null || api === void 0 ? void 0 : (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : (_api$decorations$comm = _api$decorations.commands) === null || _api$decorations$comm === void 0 ? void 0 : (_api$decorations$comm2 = _api$decorations$comm.hoverDecoration) === null || _api$decorations$comm2 === void 0 ? void 0 : _api$decorations$comm2.call(_api$decorations$comm, {
|
|
84
78
|
add: true,
|
|
85
79
|
selection: preservedSelection
|
|
@@ -6,7 +6,6 @@ import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { deleteSelectedRange, getSourceNodesFromSelectionRange } from '@atlaskit/editor-common/selection';
|
|
7
7
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
8
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/box';
|
|
11
10
|
import Text from '@atlaskit/primitives/text';
|
|
12
11
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
@@ -56,7 +55,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
56
55
|
})({
|
|
57
56
|
tr: tr
|
|
58
57
|
});
|
|
59
|
-
if (preservedSelection
|
|
58
|
+
if (preservedSelection) {
|
|
60
59
|
var _api$blockControls3;
|
|
61
60
|
api === null || api === void 0 || (_api$blockControls3 = api.blockControls) === null || _api$blockControls3 === void 0 || (_api$blockControls3 = _api$blockControls3.commands) === null || _api$blockControls3 === void 0 || _api$blockControls3.stopPreservingSelection()({
|
|
62
61
|
tr: tr
|
|
@@ -70,12 +69,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
70
69
|
api === null || api === void 0 || api.core.actions.execute(function (_ref3) {
|
|
71
70
|
var _api$blockControls4, _api$decorations, _api$decorations$hove;
|
|
72
71
|
var tr = _ref3.tr;
|
|
73
|
-
|
|
74
|
-
// Passes preservedSelection (NodeSelection) to hoverDecoration so paragraph nodes
|
|
75
|
-
// are correctly highlighted on hover over Delete. Without this, tr.selection is a
|
|
76
|
-
// collapsed TextSelection which produces no decorations for paragraphs.
|
|
77
|
-
// To clean up: always pass preservedSelection, remove the feature flag check.
|
|
78
|
-
var preservedSelection = fg('platform_editor_block_menu_jira_patch_1') ? api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || (_api$blockControls4 = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4 === void 0 ? void 0 : _api$blockControls4.preservedSelection : undefined;
|
|
72
|
+
var preservedSelection = api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || (_api$blockControls4 = _api$blockControls4.sharedState.currentState()) === null || _api$blockControls4 === void 0 ? void 0 : _api$blockControls4.preservedSelection;
|
|
79
73
|
api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 || (_api$decorations = _api$decorations.commands) === null || _api$decorations === void 0 || (_api$decorations$hove = _api$decorations.hoverDecoration) === null || _api$decorations$hove === void 0 || _api$decorations$hove.call(_api$decorations, {
|
|
80
74
|
add: true,
|
|
81
75
|
selection: preservedSelection
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.2",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@atlaskit/browser-apis": "^1.0.0",
|
|
24
24
|
"@atlaskit/css": "^1.0.0",
|
|
25
25
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
26
|
-
"@atlaskit/editor-plugin-block-controls": "^13.
|
|
26
|
+
"@atlaskit/editor-plugin-block-controls": "^13.1.0",
|
|
27
27
|
"@atlaskit/editor-plugin-decorations": "^12.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
29
29
|
"@atlaskit/editor-plugin-user-intent": "^10.0.0",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
37
37
|
"@atlaskit/primitives": "^20.0.0",
|
|
38
38
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^112.0.0",
|
|
40
40
|
"@atlaskit/tokens": "^15.0.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"bind-event-listener": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^116.
|
|
45
|
+
"@atlaskit/editor-common": "^116.12.0",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
48
48
|
},
|
|
@@ -86,9 +86,6 @@
|
|
|
86
86
|
"platform_editor_adf_with_localid": {
|
|
87
87
|
"type": "boolean"
|
|
88
88
|
},
|
|
89
|
-
"platform_editor_block_menu_jira_patch_1": {
|
|
90
|
-
"type": "boolean"
|
|
91
|
-
},
|
|
92
89
|
"platform_editor_block_menu_jira_patch_3": {
|
|
93
90
|
"type": "boolean"
|
|
94
91
|
},
|