@atlaskit/editor-plugin-list 8.2.21 → 8.2.22

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-list
2
2
 
3
+ ## 8.2.22
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b5d004bf834f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b5d004bf834f8) -
8
+ [ux] Adds block menu action to check if 'Turn into' item should be rendered or not.
9
+ - Updated dependencies
10
+
3
11
  ## 8.2.21
4
12
 
5
13
  ### Patch Changes
@@ -9,44 +9,36 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
- var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
13
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
14
13
  var _listBulleted = _interopRequireDefault(require("@atlaskit/icon/core/list-bulleted"));
15
- // BulletedListBlockMenuItem.tsx
16
-
14
+ var nodeName = 'bulletList';
17
15
  var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
16
+ var _api$blockMenu2;
18
17
  var api = _ref.api;
19
18
  var _useIntl = (0, _reactIntlNext.useIntl)(),
20
19
  formatMessage = _useIntl.formatMessage;
21
- var bulletListActive = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'list.bulletListActive');
22
- var currentSelectedNodeName = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockMenu.currentSelectedNodeName');
23
-
24
- // Check if a blockquote is currently selected
25
- var isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
26
-
27
- // Only show as selected if bullet list is active AND we're not selecting a blockquote
28
- var isSelected = bulletListActive && !isBlockquoteSelected;
29
20
  var handleClick = function handleClick(event) {
30
- if (!bulletListActive) {
31
- var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
32
- var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
33
- api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
34
- var _api$blockMenu;
35
- var tr = _ref2.tr;
36
- var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
37
- inputMethod: inputMethod,
38
- triggeredFrom: triggeredFrom,
39
- targetTypeName: 'bulletList'
40
- });
41
- return command ? command({
42
- tr: tr
43
- }) : null;
21
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
22
+ var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
23
+ api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
24
+ var _api$blockMenu;
25
+ var tr = _ref2.tr;
26
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
27
+ inputMethod: inputMethod,
28
+ triggeredFrom: triggeredFrom,
29
+ targetTypeName: nodeName
44
30
  });
45
- }
31
+ return command ? command({
32
+ tr: tr
33
+ }) : null;
34
+ });
46
35
  };
36
+ var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
37
+ if (isTransfromToPanelDisabled) {
38
+ return null;
39
+ }
47
40
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
48
41
  onClick: handleClick,
49
- isSelected: isSelected,
50
42
  elemBefore: /*#__PURE__*/_react.default.createElement(_listBulleted.default, {
51
43
  label: ""
52
44
  })
@@ -9,42 +9,36 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
- var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
13
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
14
13
  var _listNumbered = _interopRequireDefault(require("@atlaskit/icon/core/list-numbered"));
14
+ var nodeName = 'orderedList';
15
15
  var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
16
+ var _api$blockMenu2;
16
17
  var api = _ref.api;
17
18
  var _useIntl = (0, _reactIntlNext.useIntl)(),
18
19
  formatMessage = _useIntl.formatMessage;
19
- var orderedListActive = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'list.orderedListActive');
20
- var currentSelectedNodeName = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockMenu.currentSelectedNodeName');
21
-
22
- // Check if a blockquote is currently selected
23
- var isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
24
-
25
- // Only show as selected if ordered list is active AND we're not selecting a blockquote
26
- var isSelected = orderedListActive && !isBlockquoteSelected;
27
20
  var handleClick = function handleClick(event) {
28
- if (!orderedListActive) {
29
- var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
30
- var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
31
- api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
32
- var _api$blockMenu;
33
- var tr = _ref2.tr;
34
- var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
35
- inputMethod: inputMethod,
36
- triggeredFrom: triggeredFrom,
37
- targetTypeName: 'orderedList'
38
- });
39
- return command ? command({
40
- tr: tr
41
- }) : null;
21
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
22
+ var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
23
+ api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
24
+ var _api$blockMenu;
25
+ var tr = _ref2.tr;
26
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
27
+ inputMethod: inputMethod,
28
+ triggeredFrom: triggeredFrom,
29
+ targetTypeName: nodeName
42
30
  });
43
- }
31
+ return command ? command({
32
+ tr: tr
33
+ }) : null;
34
+ });
44
35
  };
36
+ var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
37
+ if (isTransfromToPanelDisabled) {
38
+ return null;
39
+ }
45
40
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
46
41
  onClick: handleClick,
47
- isSelected: isSelected,
48
42
  elemBefore: /*#__PURE__*/_react.default.createElement(_listNumbered.default, {
49
43
  label: ""
50
44
  })
@@ -1,48 +1,40 @@
1
- // BulletedListBlockMenuItem.tsx
2
-
3
1
  import React from 'react';
4
2
  import { useIntl } from 'react-intl-next';
5
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
4
  import { listMessages } from '@atlaskit/editor-common/messages';
7
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
8
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
9
6
  import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
7
+ const nodeName = 'bulletList';
10
8
  const BulletedListBlockMenuItem = ({
11
9
  api
12
10
  }) => {
11
+ var _api$blockMenu2;
13
12
  const {
14
13
  formatMessage
15
14
  } = useIntl();
16
- const bulletListActive = useSharedPluginStateSelector(api, 'list.bulletListActive');
17
- const currentSelectedNodeName = useSharedPluginStateSelector(api, 'blockMenu.currentSelectedNodeName');
18
-
19
- // Check if a blockquote is currently selected
20
- const isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
21
-
22
- // Only show as selected if bullet list is active AND we're not selecting a blockquote
23
- const isSelected = bulletListActive && !isBlockquoteSelected;
24
15
  const handleClick = event => {
25
- if (!bulletListActive) {
26
- const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
27
- const inputMethod = INPUT_METHOD.BLOCK_MENU;
28
- api === null || api === void 0 ? void 0 : api.core.actions.execute(({
29
- tr
30
- }) => {
31
- var _api$blockMenu;
32
- const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
33
- inputMethod,
34
- triggeredFrom,
35
- targetTypeName: 'bulletList'
36
- });
37
- return command ? command({
38
- tr
39
- }) : null;
16
+ const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
17
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
18
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(({
19
+ tr
20
+ }) => {
21
+ var _api$blockMenu;
22
+ const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
23
+ inputMethod,
24
+ triggeredFrom,
25
+ targetTypeName: nodeName
40
26
  });
41
- }
27
+ return command ? command({
28
+ tr
29
+ }) : null;
30
+ });
42
31
  };
32
+ const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
33
+ if (isTransfromToPanelDisabled) {
34
+ return null;
35
+ }
43
36
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
44
37
  onClick: handleClick,
45
- isSelected: isSelected,
46
38
  elemBefore: /*#__PURE__*/React.createElement(ListBulletedIcon, {
47
39
  label: ""
48
40
  })
@@ -2,45 +2,39 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { listMessages } from '@atlaskit/editor-common/messages';
5
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
6
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
7
6
  import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
7
+ const nodeName = 'orderedList';
8
8
  const NumberedListBlockMenuItem = ({
9
9
  api
10
10
  }) => {
11
+ var _api$blockMenu2;
11
12
  const {
12
13
  formatMessage
13
14
  } = useIntl();
14
- const orderedListActive = useSharedPluginStateSelector(api, 'list.orderedListActive');
15
- const currentSelectedNodeName = useSharedPluginStateSelector(api, 'blockMenu.currentSelectedNodeName');
16
-
17
- // Check if a blockquote is currently selected
18
- const isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
19
-
20
- // Only show as selected if ordered list is active AND we're not selecting a blockquote
21
- const isSelected = orderedListActive && !isBlockquoteSelected;
22
15
  const handleClick = event => {
23
- if (!orderedListActive) {
24
- const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
25
- const inputMethod = INPUT_METHOD.BLOCK_MENU;
26
- api === null || api === void 0 ? void 0 : api.core.actions.execute(({
27
- tr
28
- }) => {
29
- var _api$blockMenu;
30
- const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
31
- inputMethod,
32
- triggeredFrom,
33
- targetTypeName: 'orderedList'
34
- });
35
- return command ? command({
36
- tr
37
- }) : null;
16
+ const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
17
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
18
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(({
19
+ tr
20
+ }) => {
21
+ var _api$blockMenu;
22
+ const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
23
+ inputMethod,
24
+ triggeredFrom,
25
+ targetTypeName: nodeName
38
26
  });
39
- }
27
+ return command ? command({
28
+ tr
29
+ }) : null;
30
+ });
40
31
  };
32
+ const isTransfromToPanelDisabled = api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
33
+ if (isTransfromToPanelDisabled) {
34
+ return null;
35
+ }
41
36
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
42
37
  onClick: handleClick,
43
- isSelected: isSelected,
44
38
  elemBefore: /*#__PURE__*/React.createElement(ListNumberedIcon, {
45
39
  label: ""
46
40
  })
@@ -1,45 +1,37 @@
1
- // BulletedListBlockMenuItem.tsx
2
-
3
1
  import React from 'react';
4
2
  import { useIntl } from 'react-intl-next';
5
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
4
  import { listMessages } from '@atlaskit/editor-common/messages';
7
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
8
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
9
6
  import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
7
+ var nodeName = 'bulletList';
10
8
  var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
9
+ var _api$blockMenu2;
11
10
  var api = _ref.api;
12
11
  var _useIntl = useIntl(),
13
12
  formatMessage = _useIntl.formatMessage;
14
- var bulletListActive = useSharedPluginStateSelector(api, 'list.bulletListActive');
15
- var currentSelectedNodeName = useSharedPluginStateSelector(api, 'blockMenu.currentSelectedNodeName');
16
-
17
- // Check if a blockquote is currently selected
18
- var isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
19
-
20
- // Only show as selected if bullet list is active AND we're not selecting a blockquote
21
- var isSelected = bulletListActive && !isBlockquoteSelected;
22
13
  var handleClick = function handleClick(event) {
23
- if (!bulletListActive) {
24
- var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
25
- var inputMethod = INPUT_METHOD.BLOCK_MENU;
26
- api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
27
- var _api$blockMenu;
28
- var tr = _ref2.tr;
29
- var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
30
- inputMethod: inputMethod,
31
- triggeredFrom: triggeredFrom,
32
- targetTypeName: 'bulletList'
33
- });
34
- return command ? command({
35
- tr: tr
36
- }) : null;
14
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
15
+ var inputMethod = INPUT_METHOD.BLOCK_MENU;
16
+ api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
17
+ var _api$blockMenu;
18
+ var tr = _ref2.tr;
19
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.bulletList, {
20
+ inputMethod: inputMethod,
21
+ triggeredFrom: triggeredFrom,
22
+ targetTypeName: nodeName
37
23
  });
38
- }
24
+ return command ? command({
25
+ tr: tr
26
+ }) : null;
27
+ });
39
28
  };
29
+ var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
30
+ if (isTransfromToPanelDisabled) {
31
+ return null;
32
+ }
40
33
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
41
34
  onClick: handleClick,
42
- isSelected: isSelected,
43
35
  elemBefore: /*#__PURE__*/React.createElement(ListBulletedIcon, {
44
36
  label: ""
45
37
  })
@@ -2,42 +2,36 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
3
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { listMessages } from '@atlaskit/editor-common/messages';
5
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
6
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
7
6
  import ListNumberedIcon from '@atlaskit/icon/core/list-numbered';
7
+ var nodeName = 'orderedList';
8
8
  var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
9
+ var _api$blockMenu2;
9
10
  var api = _ref.api;
10
11
  var _useIntl = useIntl(),
11
12
  formatMessage = _useIntl.formatMessage;
12
- var orderedListActive = useSharedPluginStateSelector(api, 'list.orderedListActive');
13
- var currentSelectedNodeName = useSharedPluginStateSelector(api, 'blockMenu.currentSelectedNodeName');
14
-
15
- // Check if a blockquote is currently selected
16
- var isBlockquoteSelected = currentSelectedNodeName === null || currentSelectedNodeName === void 0 ? void 0 : currentSelectedNodeName.includes('blockquote');
17
-
18
- // Only show as selected if ordered list is active AND we're not selecting a blockquote
19
- var isSelected = orderedListActive && !isBlockquoteSelected;
20
13
  var handleClick = function handleClick(event) {
21
- if (!orderedListActive) {
22
- var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
23
- var inputMethod = INPUT_METHOD.BLOCK_MENU;
24
- api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
25
- var _api$blockMenu;
26
- var tr = _ref2.tr;
27
- var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
28
- inputMethod: inputMethod,
29
- triggeredFrom: triggeredFrom,
30
- targetTypeName: 'orderedList'
31
- });
32
- return command ? command({
33
- tr: tr
34
- }) : null;
14
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
15
+ var inputMethod = INPUT_METHOD.BLOCK_MENU;
16
+ api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
17
+ var _api$blockMenu;
18
+ var tr = _ref2.tr;
19
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.orderedList, {
20
+ inputMethod: inputMethod,
21
+ triggeredFrom: triggeredFrom,
22
+ targetTypeName: nodeName
35
23
  });
36
- }
24
+ return command ? command({
25
+ tr: tr
26
+ }) : null;
27
+ });
37
28
  };
29
+ var isTransfromToPanelDisabled = api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(nodeName);
30
+ if (isTransfromToPanelDisabled) {
31
+ return null;
32
+ }
38
33
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
39
34
  onClick: handleClick,
40
- isSelected: isSelected,
41
35
  elemBefore: /*#__PURE__*/React.createElement(ListNumberedIcon, {
42
36
  label: ""
43
37
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "8.2.21",
3
+ "version": "8.2.22",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,18 @@
31
31
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
32
32
  "@atlaskit/editor-plugin-block-menu": "^5.2.0",
33
33
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
34
- "@atlaskit/editor-plugin-toolbar": "^3.4.0",
34
+ "@atlaskit/editor-plugin-toolbar": "^3.5.0",
35
35
  "@atlaskit/editor-prosemirror": "^7.2.0",
36
36
  "@atlaskit/editor-toolbar": "^0.18.0",
37
37
  "@atlaskit/icon": "^29.3.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/prosemirror-history": "^0.2.0",
40
40
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
41
- "@atlaskit/tmp-editor-statsig": "^16.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^16.1.0",
42
42
  "@babel/runtime": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^110.46.0",
45
+ "@atlaskit/editor-common": "^110.48.0",
46
46
  "react": "^18.2.0",
47
47
  "react-intl-next": "npm:react-intl@^5.18.1"
48
48
  },