@atlaskit/editor-plugin-block-menu 4.0.17 → 4.0.18

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,13 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 4.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`64b94b53839de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/64b94b53839de) -
8
+ Fix the outdated Turn into disabled state in block menu
9
+ - Updated dependencies
10
+
3
11
  ## 4.0.17
4
12
 
5
13
  ### Patch Changes
@@ -24,9 +24,7 @@ var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuCompo
24
24
  var _useIntl = (0, _reactIntlNext.useIntl)(),
25
25
  formatMessage = _useIntl.formatMessage;
26
26
  var text = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_patch_1') ? formatMessage(_messages.blockMenuMessages.turnInto) : formatMessage(_blockMenu.messages.turnInto);
27
- var isDisabled = (0, _react.useMemo)(function () {
28
- return (0, _platformFeatureFlags.fg)('platform_editor_block_menu_for_disabled_nodes') ? (0, _checkIsFormatMenuHidden.checkIsFormatMenuHidden)(api) : false;
29
- }, [api]);
27
+ var isDisabled = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_for_disabled_nodes') ? (0, _checkIsFormatMenuHidden.checkIsFormatMenuHidden)(api) : false;
30
28
  var handleClick = (0, _react.useCallback)(function () {
31
29
  api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
32
30
  var _api$analytics;
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useCallback } from 'react';
1
+ import React, { useCallback } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
4
4
  import { messages } from '@atlaskit/editor-common/block-menu';
@@ -17,9 +17,7 @@ export const FormatMenuComponent = ({
17
17
  formatMessage
18
18
  } = useIntl();
19
19
  const text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.turnInto) : formatMessage(messages.turnInto);
20
- const isDisabled = useMemo(() => {
21
- return fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
22
- }, [api]);
20
+ const isDisabled = fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
23
21
  const handleClick = useCallback(() => {
24
22
  api === null || api === void 0 ? void 0 : api.core.actions.execute(({
25
23
  tr
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useCallback } from 'react';
1
+ import React, { useCallback } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
4
4
  import { messages } from '@atlaskit/editor-common/block-menu';
@@ -15,9 +15,7 @@ export var FormatMenuComponent = function FormatMenuComponent(_ref) {
15
15
  var _useIntl = useIntl(),
16
16
  formatMessage = _useIntl.formatMessage;
17
17
  var text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.turnInto) : formatMessage(messages.turnInto);
18
- var isDisabled = useMemo(function () {
19
- return fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
20
- }, [api]);
18
+ var isDisabled = fg('platform_editor_block_menu_for_disabled_nodes') ? checkIsFormatMenuHidden(api) : false;
21
19
  var handleClick = useCallback(function () {
22
20
  api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
23
21
  var _api$analytics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "4.0.17",
3
+ "version": "4.0.18",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,8 +39,8 @@
39
39
  "@atlaskit/editor-shared-styles": "^3.6.0",
40
40
  "@atlaskit/editor-tables": "^2.9.0",
41
41
  "@atlaskit/editor-toolbar": "^0.14.0",
42
- "@atlaskit/icon": "^28.4.0",
43
- "@atlaskit/icon-lab": "^5.9.0",
42
+ "@atlaskit/icon": "^28.5.0",
43
+ "@atlaskit/icon-lab": "^5.10.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^14.15.0",
46
46
  "@atlaskit/tmp-editor-statsig": "^13.4.0",