@atlaskit/editor-plugin-block-controls 3.1.3 → 3.1.4

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-controls
2
2
 
3
+ ## 3.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#120000](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120000)
8
+ [`a021079ba8f13`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a021079ba8f13) -
9
+ [ux] Remove copy/delete button from block menu
10
+
3
11
  ## 3.1.3
4
12
 
5
13
  ### Patch Changes
@@ -1,23 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.menuItemsCallback = exports.getBlockMenuItems = void 0;
9
8
  var _react = require("@emotion/react");
10
9
  var _keymaps = require("@atlaskit/editor-common/keymaps");
11
- var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
10
+ var _messages = require("@atlaskit/editor-common/messages");
12
11
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
13
12
  var _arrowDown = _interopRequireDefault(require("@atlaskit/icon/core/arrow-down"));
14
13
  var _arrowUp = _interopRequireDefault(require("@atlaskit/icon/core/arrow-up"));
15
- var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
16
- var _delete2 = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
17
14
  var _moveNode = require("../editor-commands/move-node");
18
15
  var _consts = require("../pm-plugins/utils/consts");
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
16
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
22
17
  /**
23
18
  * @jsxRuntime classic
@@ -55,34 +50,6 @@ var getBlockMenuItems = exports.getBlockMenuItems = function getBlockMenuItems(f
55
50
  css: _shortcut.shortcutStyle
56
51
  }, (0, _keymaps.tooltip)(_keymaps.dragToMoveDown))
57
52
  }]
58
- }, {
59
- items: [{
60
- content: formatMessage(_messages.default.copyToClipboard),
61
- value: {
62
- name: 'copy'
63
- },
64
- elemBefore: (0, _react.jsx)(_copy.default, {
65
- label: ""
66
- }),
67
- key: 'copy',
68
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
69
- elemAfter: (0, _react.jsx)("div", {
70
- css: _shortcut.shortcutStyle
71
- }, (0, _keymaps.tooltip)(_keymaps.copy))
72
- }, {
73
- content: formatMessage(_messages.blockControlsMessages.delete),
74
- value: {
75
- name: 'delete'
76
- },
77
- elemBefore: (0, _react.jsx)(_delete2.default, {
78
- label: ""
79
- }),
80
- key: 'delete',
81
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
82
- elemAfter: (0, _react.jsx)("div", {
83
- css: _shortcut.shortcutStyle
84
- }, (0, _keymaps.tooltip)(_keymaps.deleteKey))
85
- }]
86
53
  }];
87
54
  };
88
55
  var menuItemsCallback = exports.menuItemsCallback = {
@@ -91,13 +58,5 @@ var menuItemsCallback = exports.menuItemsCallback = {
91
58
  },
92
59
  moveDown: function moveDown(api, formatMessage) {
93
60
  return (0, _moveNode.moveNodeViaShortcut)(api, _consts.DIRECTION.DOWN, formatMessage);
94
- },
95
- copy: function copy() {
96
- // TODO: implement copy
97
- // console.log('copy');
98
- },
99
- delete: function _delete() {
100
- // TODO: implement delete
101
- // console.log('delete');
102
61
  }
103
62
  };
@@ -6,13 +6,11 @@
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { copy, deleteKey, dragToMoveDown, dragToMoveUp, tooltip } from '@atlaskit/editor-common/keymaps';
10
- import commonMessages, { blockControlsMessages } from '@atlaskit/editor-common/messages';
9
+ import { dragToMoveDown, dragToMoveUp, tooltip } from '@atlaskit/editor-common/keymaps';
10
+ import { blockControlsMessages } from '@atlaskit/editor-common/messages';
11
11
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
12
12
  import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
13
13
  import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
14
- import CopyIcon from '@atlaskit/icon/core/copy';
15
- import DeleteIcon from '@atlaskit/icon/core/delete';
16
14
  import { moveNodeViaShortcut } from '../editor-commands/move-node';
17
15
  import { DIRECTION } from '../pm-plugins/utils/consts';
18
16
  export const getBlockMenuItems = formatMessage => {
@@ -44,34 +42,6 @@ export const getBlockMenuItems = formatMessage => {
44
42
  css: shortcutStyle
45
43
  }, tooltip(dragToMoveDown))
46
44
  }]
47
- }, {
48
- items: [{
49
- content: formatMessage(commonMessages.copyToClipboard),
50
- value: {
51
- name: 'copy'
52
- },
53
- elemBefore: jsx(CopyIcon, {
54
- label: ""
55
- }),
56
- key: 'copy',
57
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
58
- elemAfter: jsx("div", {
59
- css: shortcutStyle
60
- }, tooltip(copy))
61
- }, {
62
- content: formatMessage(blockControlsMessages.delete),
63
- value: {
64
- name: 'delete'
65
- },
66
- elemBefore: jsx(DeleteIcon, {
67
- label: ""
68
- }),
69
- key: 'delete',
70
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
71
- elemAfter: jsx("div", {
72
- css: shortcutStyle
73
- }, tooltip(deleteKey))
74
- }]
75
45
  }];
76
46
  };
77
47
  export const menuItemsCallback = {
@@ -80,13 +50,5 @@ export const menuItemsCallback = {
80
50
  },
81
51
  moveDown: (api, formatMessage) => {
82
52
  return moveNodeViaShortcut(api, DIRECTION.DOWN, formatMessage);
83
- },
84
- copy: () => {
85
- // TODO: implement copy
86
- // console.log('copy');
87
- },
88
- delete: () => {
89
- // TODO: implement delete
90
- // console.log('delete');
91
53
  }
92
54
  };
@@ -6,13 +6,11 @@
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { copy, deleteKey, dragToMoveDown, dragToMoveUp, tooltip } from '@atlaskit/editor-common/keymaps';
10
- import commonMessages, { blockControlsMessages } from '@atlaskit/editor-common/messages';
9
+ import { dragToMoveDown, dragToMoveUp, tooltip } from '@atlaskit/editor-common/keymaps';
10
+ import { blockControlsMessages } from '@atlaskit/editor-common/messages';
11
11
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
12
12
  import ArrowDownIcon from '@atlaskit/icon/core/arrow-down';
13
13
  import ArrowUpIcon from '@atlaskit/icon/core/arrow-up';
14
- import CopyIcon from '@atlaskit/icon/core/copy';
15
- import DeleteIcon from '@atlaskit/icon/core/delete';
16
14
  import { moveNodeViaShortcut } from '../editor-commands/move-node';
17
15
  import { DIRECTION } from '../pm-plugins/utils/consts';
18
16
  export var getBlockMenuItems = function getBlockMenuItems(formatMessage) {
@@ -44,34 +42,6 @@ export var getBlockMenuItems = function getBlockMenuItems(formatMessage) {
44
42
  css: shortcutStyle
45
43
  }, tooltip(dragToMoveDown))
46
44
  }]
47
- }, {
48
- items: [{
49
- content: formatMessage(commonMessages.copyToClipboard),
50
- value: {
51
- name: 'copy'
52
- },
53
- elemBefore: jsx(CopyIcon, {
54
- label: ""
55
- }),
56
- key: 'copy',
57
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
58
- elemAfter: jsx("div", {
59
- css: shortcutStyle
60
- }, tooltip(copy))
61
- }, {
62
- content: formatMessage(blockControlsMessages.delete),
63
- value: {
64
- name: 'delete'
65
- },
66
- elemBefore: jsx(DeleteIcon, {
67
- label: ""
68
- }),
69
- key: 'delete',
70
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
71
- elemAfter: jsx("div", {
72
- css: shortcutStyle
73
- }, tooltip(deleteKey))
74
- }]
75
45
  }];
76
46
  };
77
47
  export var menuItemsCallback = {
@@ -80,13 +50,5 @@ export var menuItemsCallback = {
80
50
  },
81
51
  moveDown: function moveDown(api, formatMessage) {
82
52
  return moveNodeViaShortcut(api, DIRECTION.DOWN, formatMessage);
83
- },
84
- copy: function copy() {
85
- // TODO: implement copy
86
- // console.log('copy');
87
- },
88
- delete: function _delete() {
89
- // TODO: implement delete
90
- // console.log('delete');
91
53
  }
92
54
  };
@@ -12,6 +12,4 @@ export declare const getBlockMenuItems: (formatMessage: IntlShape['formatMessage
12
12
  export declare const menuItemsCallback: {
13
13
  moveUp: (api: ExtractInjectionAPI<BlockControlsPlugin> | undefined, formatMessage: IntlShape['formatMessage']) => import("@atlaskit/editor-common/types").Command;
14
14
  moveDown: (api: ExtractInjectionAPI<BlockControlsPlugin> | undefined, formatMessage: IntlShape['formatMessage']) => import("@atlaskit/editor-common/types").Command;
15
- copy: () => void;
16
- delete: () => void;
17
15
  };
@@ -12,6 +12,4 @@ export declare const getBlockMenuItems: (formatMessage: IntlShape['formatMessage
12
12
  export declare const menuItemsCallback: {
13
13
  moveUp: (api: ExtractInjectionAPI<BlockControlsPlugin> | undefined, formatMessage: IntlShape['formatMessage']) => import("@atlaskit/editor-common/types").Command;
14
14
  moveDown: (api: ExtractInjectionAPI<BlockControlsPlugin> | undefined, formatMessage: IntlShape['formatMessage']) => import("@atlaskit/editor-common/types").Command;
15
- copy: () => void;
16
- delete: () => void;
17
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",