@atlaskit/editor-plugin-block-menu 5.0.19 → 5.0.20
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 +8 -0
- package/afm-cc/tsconfig.json +4 -4
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/ui/format-menu-nested.js +0 -3
- package/dist/cjs/ui/format-menu-section.js +1 -4
- package/dist/es2019/ui/format-menu-nested.js +0 -3
- package/dist/es2019/ui/format-menu-section.js +1 -4
- package/dist/esm/ui/format-menu-nested.js +0 -3
- package/dist/esm/ui/format-menu-section.js +1 -4
- package/package.json +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 5.0.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a26ad89b7926c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a26ad89b7926c) -
|
|
8
|
+
[ux] FG cleanup platform_editor_block_menu_for_disabled_nodes
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 5.0.19
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
"rootDir": "../",
|
|
7
7
|
"composite": true
|
|
8
8
|
},
|
|
9
|
-
"include": [
|
|
9
|
+
"include": [
|
|
10
|
+
"../src/**/*.ts",
|
|
11
|
+
"../src/**/*.tsx"
|
|
12
|
+
],
|
|
10
13
|
"exclude": [
|
|
11
14
|
"../src/**/__tests__/*",
|
|
12
15
|
"../src/**/*.test.*",
|
|
@@ -47,9 +50,6 @@
|
|
|
47
50
|
{
|
|
48
51
|
"path": "../../../design-system/icon/afm-cc/tsconfig.json"
|
|
49
52
|
},
|
|
50
|
-
{
|
|
51
|
-
"path": "../../../design-system/icon-lab/afm-cc/tsconfig.json"
|
|
52
|
-
},
|
|
53
53
|
{
|
|
54
54
|
"path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
|
|
55
55
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -15,14 +15,12 @@ var _changes = _interopRequireDefault(require("@atlaskit/icon/core/changes"));
|
|
|
15
15
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _consts = require("./consts");
|
|
18
|
-
var _checkIsFormatMenuHidden = require("./utils/checkIsFormatMenuHidden");
|
|
19
18
|
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); }
|
|
20
19
|
var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuComponent(_ref) {
|
|
21
20
|
var api = _ref.api,
|
|
22
21
|
children = _ref.children;
|
|
23
22
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
24
23
|
formatMessage = _useIntl.formatMessage;
|
|
25
|
-
var isDisabled = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_for_disabled_nodes') ? (0, _checkIsFormatMenuHidden.checkIsFormatMenuHidden)(api) : false;
|
|
26
24
|
var handleClick = (0, _react.useCallback)(function () {
|
|
27
25
|
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
28
26
|
var _api$analytics;
|
|
@@ -48,7 +46,6 @@ var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuCompo
|
|
|
48
46
|
label: ""
|
|
49
47
|
}),
|
|
50
48
|
enableMaxHeight: true,
|
|
51
|
-
isDisabled: isDisabled,
|
|
52
49
|
onClick: handleClick,
|
|
53
50
|
dropdownTestId: "editor-nested-turn-into-menu",
|
|
54
51
|
shouldFitContainer: (0, _platformFeatureFlags.fg)('platform_editor_block_menu_shouldfitcontainer') ? true : undefined
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.FormatMenuSection = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _checkIsFormatMenuHidden = require("./utils/checkIsFormatMenuHidden");
|
|
12
11
|
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
12
|
var FormatMenuSection = exports.FormatMenuSection = function FormatMenuSection(_ref) {
|
|
@@ -16,9 +15,7 @@ var FormatMenuSection = exports.FormatMenuSection = function FormatMenuSection(_
|
|
|
16
15
|
var isFormatMenuHidden = (0, _react.useCallback)(function () {
|
|
17
16
|
return (0, _checkIsFormatMenuHidden.checkIsFormatMenuHidden)(api);
|
|
18
17
|
}, [api]);
|
|
19
|
-
|
|
20
|
-
// When platform_editor_block_menu_for_disabled_nodes feature flag is OFF, use the original behavior (hide the menu)
|
|
21
|
-
if (isFormatMenuHidden() && !(0, _platformFeatureFlags.fg)('platform_editor_block_menu_for_disabled_nodes')) {
|
|
18
|
+
if (isFormatMenuHidden()) {
|
|
22
19
|
return null;
|
|
23
20
|
}
|
|
24
21
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, null, children);
|
|
@@ -7,7 +7,6 @@ import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
|
7
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
10
|
-
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
11
10
|
export const FormatMenuComponent = ({
|
|
12
11
|
api,
|
|
13
12
|
children
|
|
@@ -15,7 +14,6 @@ export const FormatMenuComponent = ({
|
|
|
15
14
|
const {
|
|
16
15
|
formatMessage
|
|
17
16
|
} = useIntl();
|
|
18
|
-
const isDisabled = fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
|
|
19
17
|
const handleClick = useCallback(() => {
|
|
20
18
|
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
21
19
|
tr
|
|
@@ -42,7 +40,6 @@ export const FormatMenuComponent = ({
|
|
|
42
40
|
label: ""
|
|
43
41
|
}),
|
|
44
42
|
enableMaxHeight: true,
|
|
45
|
-
isDisabled: isDisabled,
|
|
46
43
|
onClick: handleClick,
|
|
47
44
|
dropdownTestId: "editor-nested-turn-into-menu",
|
|
48
45
|
shouldFitContainer: fg('platform_editor_block_menu_shouldfitcontainer') ? true : undefined
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
5
4
|
export const FormatMenuSection = ({
|
|
6
5
|
children,
|
|
@@ -9,9 +8,7 @@ export const FormatMenuSection = ({
|
|
|
9
8
|
const isFormatMenuHidden = useCallback(() => {
|
|
10
9
|
return checkIsFormatMenuHidden(api);
|
|
11
10
|
}, [api]);
|
|
12
|
-
|
|
13
|
-
// When platform_editor_block_menu_for_disabled_nodes feature flag is OFF, use the original behavior (hide the menu)
|
|
14
|
-
if (isFormatMenuHidden() && !fg('platform_editor_block_menu_for_disabled_nodes')) {
|
|
11
|
+
if (isFormatMenuHidden()) {
|
|
15
12
|
return null;
|
|
16
13
|
}
|
|
17
14
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, children);
|
|
@@ -7,13 +7,11 @@ import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
|
7
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { BLOCK_MENU_ITEM_NAME } from './consts';
|
|
10
|
-
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
11
10
|
export var FormatMenuComponent = function FormatMenuComponent(_ref) {
|
|
12
11
|
var api = _ref.api,
|
|
13
12
|
children = _ref.children;
|
|
14
13
|
var _useIntl = useIntl(),
|
|
15
14
|
formatMessage = _useIntl.formatMessage;
|
|
16
|
-
var isDisabled = fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
|
|
17
15
|
var handleClick = useCallback(function () {
|
|
18
16
|
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
19
17
|
var _api$analytics;
|
|
@@ -39,7 +37,6 @@ export var FormatMenuComponent = function FormatMenuComponent(_ref) {
|
|
|
39
37
|
label: ""
|
|
40
38
|
}),
|
|
41
39
|
enableMaxHeight: true,
|
|
42
|
-
isDisabled: isDisabled,
|
|
43
40
|
onClick: handleClick,
|
|
44
41
|
dropdownTestId: "editor-nested-turn-into-menu",
|
|
45
42
|
shouldFitContainer: fg('platform_editor_block_menu_shouldfitcontainer') ? true : undefined
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { checkIsFormatMenuHidden } from './utils/checkIsFormatMenuHidden';
|
|
5
4
|
export var FormatMenuSection = function FormatMenuSection(_ref) {
|
|
6
5
|
var children = _ref.children,
|
|
@@ -8,9 +7,7 @@ export var FormatMenuSection = function FormatMenuSection(_ref) {
|
|
|
8
7
|
var isFormatMenuHidden = useCallback(function () {
|
|
9
8
|
return checkIsFormatMenuHidden(api);
|
|
10
9
|
}, [api]);
|
|
11
|
-
|
|
12
|
-
// When platform_editor_block_menu_for_disabled_nodes feature flag is OFF, use the original behavior (hide the menu)
|
|
13
|
-
if (isFormatMenuHidden() && !fg('platform_editor_block_menu_for_disabled_nodes')) {
|
|
10
|
+
if (isFormatMenuHidden()) {
|
|
14
11
|
return null;
|
|
15
12
|
}
|
|
16
13
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, null, children);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.20",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/css": "^0.17.0",
|
|
32
32
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
34
|
-
"@atlaskit/editor-plugin-block-controls": "^7.
|
|
34
|
+
"@atlaskit/editor-plugin-block-controls": "^7.10.0",
|
|
35
35
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-user-intent": "^4.0.0",
|
|
@@ -40,16 +40,15 @@
|
|
|
40
40
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
41
41
|
"@atlaskit/editor-toolbar": "^0.17.0",
|
|
42
42
|
"@atlaskit/icon": "^29.0.0",
|
|
43
|
-
"@atlaskit/icon-lab": "^5.12.0",
|
|
44
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
44
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
46
45
|
"@atlaskit/primitives": "^16.4.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^14.0.0",
|
|
48
47
|
"@atlaskit/tokens": "^8.4.0",
|
|
49
48
|
"@babel/runtime": "^7.0.0"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^110.
|
|
51
|
+
"@atlaskit/editor-common": "^110.36.0",
|
|
53
52
|
"react": "^18.2.0",
|
|
54
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
55
54
|
},
|
|
@@ -96,9 +95,6 @@
|
|
|
96
95
|
"platform_editor_block_menu_transform_nested_node": {
|
|
97
96
|
"type": "boolean"
|
|
98
97
|
},
|
|
99
|
-
"platform_editor_block_menu_for_disabled_nodes": {
|
|
100
|
-
"type": "boolean"
|
|
101
|
-
},
|
|
102
98
|
"platform_editor_block_menu_shouldfitcontainer": {
|
|
103
99
|
"type": "boolean"
|
|
104
100
|
},
|