@atlaskit/editor-plugin-panel 21.0.0 → 21.0.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-panel
2
2
 
3
+ ## 21.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 21.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
14
+ Clean up shipped experiment `platform_editor_block_menu`
15
+ - Updated dependencies
16
+
3
17
  ## 21.0.0
4
18
 
5
19
  ### Patch Changes
@@ -19,7 +19,6 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
19
19
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
20
20
  var _fg = require("@atlaskit/platform-feature-flags/fg");
21
21
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
23
22
  var _createPanelAction = require("./pm-plugins/commands/create-panel-action");
24
23
  var _keymaps = _interopRequireDefault(require("./pm-plugins/keymaps"));
25
24
  var _main = require("./pm-plugins/main");
@@ -30,6 +29,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
30
29
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31
30
  var PANEL_NODE_NAME = 'panel';
32
31
  var panelPlugin = function panelPlugin(_ref) {
32
+ var _api$blockMenu;
33
33
  var _ref$config = _ref.config,
34
34
  _ref$config2 = _ref$config === void 0 ? {} : _ref$config,
35
35
  _ref$config2$allowCus = _ref$config2.allowCustomPanel,
@@ -37,23 +37,20 @@ var panelPlugin = function panelPlugin(_ref) {
37
37
  _ref$config2$allowCus2 = _ref$config2.allowCustomPanelEdit,
38
38
  allowCustomPanelEdit = _ref$config2$allowCus2 === void 0 ? false : _ref$config2$allowCus2,
39
39
  api = _ref.api;
40
- if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
41
- var _api$blockMenu;
42
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
43
- type: 'block-menu-item',
44
- key: _blockMenu.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
45
- parent: {
46
- type: 'block-menu-section',
47
- key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
48
- rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
49
- },
50
- component: (0, _panelBlockMenuItem.createPanelBlockMenuItem)(api),
51
- isHidden: function isHidden() {
52
- var _api$blockMenu2;
53
- return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
54
- }
55
- }]);
56
- }
40
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
41
+ type: 'block-menu-item',
42
+ key: _blockMenu.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
43
+ parent: {
44
+ type: 'block-menu-section',
45
+ key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
46
+ rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
47
+ },
48
+ component: (0, _panelBlockMenuItem.createPanelBlockMenuItem)(api),
49
+ isHidden: function isHidden() {
50
+ var _api$blockMenu2;
51
+ return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
52
+ }
53
+ }]);
57
54
  var isRegisteredSlashCommandEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command');
58
55
  if (isRegisteredSlashCommandEnabled) {
59
56
  var _api$uiControlRegistr;
@@ -12,12 +12,12 @@ var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
13
13
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
14
14
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
15
- var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/core/check-circle"));
16
- var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/information-circle"));
17
- var _note = _interopRequireDefault(require("@atlaskit/icon/core/note"));
18
15
  var _pencil = _interopRequireDefault(require("@atlaskit/icon-lab/core/pencil"));
19
16
  var _statusWorkflowCancelled = _interopRequireDefault(require("@atlaskit/icon-lab/core/status-workflow-cancelled"));
20
17
  var _warningOutline = _interopRequireDefault(require("@atlaskit/icon-lab/core/warning-outline"));
18
+ var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/core/check-circle"));
19
+ var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/information-circle"));
20
+ var _note = _interopRequireDefault(require("@atlaskit/icon/core/note"));
21
21
  var _PanelQuickInsertMenuItem = require("./PanelQuickInsertMenuItem");
22
22
  var standardPanelItems = [{
23
23
  description: _messages.blockTypeMessages.infoPanelDescription,
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { default as panelPlugin } from '../panelPlugin';
@@ -10,7 +10,6 @@ import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuc
10
10
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
11
11
  import { fg } from '@atlaskit/platform-feature-flags/fg';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
14
13
  import { createPanelAction } from './pm-plugins/commands/create-panel-action';
15
14
  import keymap from './pm-plugins/keymaps';
16
15
  import { createPlugin } from './pm-plugins/main';
@@ -25,23 +24,21 @@ const panelPlugin = ({
25
24
  } = {},
26
25
  api
27
26
  }) => {
28
- if (editorExperiment('platform_editor_block_menu', true)) {
29
- var _api$blockMenu;
30
- api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
31
- type: 'block-menu-item',
32
- key: TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
33
- parent: {
34
- type: 'block-menu-section',
35
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
36
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
37
- },
38
- component: createPanelBlockMenuItem(api),
39
- isHidden: () => {
40
- var _api$blockMenu2;
41
- return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
42
- }
43
- }]);
44
- }
27
+ var _api$blockMenu;
28
+ api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
29
+ type: 'block-menu-item',
30
+ key: TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
31
+ parent: {
32
+ type: 'block-menu-section',
33
+ key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
34
+ rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
35
+ },
36
+ component: createPanelBlockMenuItem(api),
37
+ isHidden: () => {
38
+ var _api$blockMenu2;
39
+ return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
40
+ }
41
+ }]);
45
42
  const isRegisteredSlashCommandEnabled = isExperimentEnabled('platform_editor_slash_command');
46
43
  if (isRegisteredSlashCommandEnabled) {
47
44
  var _api$uiControlRegistr;
@@ -4,12 +4,12 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
4
4
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
5
5
  import { CUSTOM_PANEL_MENU_ITEM, ERROR_PANEL_MENU_ITEM, INFO_PANEL_MENU_ITEM, NOTE_PANEL_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
6
6
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
7
- import CheckCircleIcon from '@atlaskit/icon/core/check-circle';
8
- import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
9
- import NoteIcon from '@atlaskit/icon/core/note';
10
7
  import PencilIcon from '@atlaskit/icon-lab/core/pencil';
11
8
  import StatusWorkflowCancelledIcon from '@atlaskit/icon-lab/core/status-workflow-cancelled';
12
9
  import WarningOutlineIcon from '@atlaskit/icon-lab/core/warning-outline';
10
+ import CheckCircleIcon from '@atlaskit/icon/core/check-circle';
11
+ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
12
+ import NoteIcon from '@atlaskit/icon/core/note';
13
13
  import { PanelQuickInsertMenuItem } from './PanelQuickInsertMenuItem';
14
14
  const standardPanelItems = [{
15
15
  description: blockTypeMessages.infoPanelDescription,
@@ -1,2 +1,3 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
+
2
3
  export { default as panelPlugin } from '../panelPlugin';
@@ -14,7 +14,6 @@ import { IconCustomPanel, IconPanel, IconPanelError, IconPanelNote, IconPanelSuc
14
14
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
15
15
  import { fg } from '@atlaskit/platform-feature-flags/fg';
16
16
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
18
17
  import { createPanelAction } from './pm-plugins/commands/create-panel-action';
19
18
  import keymap from './pm-plugins/keymaps';
20
19
  import { createPlugin } from './pm-plugins/main';
@@ -23,6 +22,7 @@ import { getPanelQuickInsertComponents } from './ui/quick-insert/getPanelQuickIn
23
22
  import { getToolbarConfig } from './ui/toolbar';
24
23
  var PANEL_NODE_NAME = 'panel';
25
24
  var panelPlugin = function panelPlugin(_ref) {
25
+ var _api$blockMenu;
26
26
  var _ref$config = _ref.config,
27
27
  _ref$config2 = _ref$config === void 0 ? {} : _ref$config,
28
28
  _ref$config2$allowCus = _ref$config2.allowCustomPanel,
@@ -30,23 +30,20 @@ var panelPlugin = function panelPlugin(_ref) {
30
30
  _ref$config2$allowCus2 = _ref$config2.allowCustomPanelEdit,
31
31
  allowCustomPanelEdit = _ref$config2$allowCus2 === void 0 ? false : _ref$config2$allowCus2,
32
32
  api = _ref.api;
33
- if (editorExperiment('platform_editor_block_menu', true)) {
34
- var _api$blockMenu;
35
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
36
- type: 'block-menu-item',
37
- key: TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
38
- parent: {
39
- type: 'block-menu-section',
40
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
41
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
42
- },
43
- component: createPanelBlockMenuItem(api),
44
- isHidden: function isHidden() {
45
- var _api$blockMenu2;
46
- return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
47
- }
48
- }]);
49
- }
33
+ api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
34
+ type: 'block-menu-item',
35
+ key: TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key,
36
+ parent: {
37
+ type: 'block-menu-section',
38
+ key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
39
+ rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]
40
+ },
41
+ component: createPanelBlockMenuItem(api),
42
+ isHidden: function isHidden() {
43
+ var _api$blockMenu2;
44
+ return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(PANEL_NODE_NAME));
45
+ }
46
+ }]);
50
47
  var isRegisteredSlashCommandEnabled = isExperimentEnabled('platform_editor_slash_command');
51
48
  if (isRegisteredSlashCommandEnabled) {
52
49
  var _api$uiControlRegistr;
@@ -5,12 +5,12 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
5
5
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
6
6
  import { CUSTOM_PANEL_MENU_ITEM, ERROR_PANEL_MENU_ITEM, INFO_PANEL_MENU_ITEM, NOTE_PANEL_MENU_ITEM, STRUCTURE_SECTION, SUCCESS_PANEL_MENU_ITEM, WARNING_PANEL_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
7
7
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
8
- import CheckCircleIcon from '@atlaskit/icon/core/check-circle';
9
- import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
10
- import NoteIcon from '@atlaskit/icon/core/note';
11
8
  import PencilIcon from '@atlaskit/icon-lab/core/pencil';
12
9
  import StatusWorkflowCancelledIcon from '@atlaskit/icon-lab/core/status-workflow-cancelled';
13
10
  import WarningOutlineIcon from '@atlaskit/icon-lab/core/warning-outline';
11
+ import CheckCircleIcon from '@atlaskit/icon/core/check-circle';
12
+ import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
13
+ import NoteIcon from '@atlaskit/icon/core/note';
14
14
  import { PanelQuickInsertMenuItem } from './PanelQuickInsertMenuItem';
15
15
  var standardPanelItems = [{
16
16
  description: blockTypeMessages.infoPanelDescription,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "21.0.0",
3
+ "version": "21.0.2",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,20 +30,20 @@
30
30
  "@atlaskit/editor-plugin-ui-control-registry": "^13.0.0",
31
31
  "@atlaskit/editor-prosemirror": "^9.0.0",
32
32
  "@atlaskit/editor-shared-styles": "^4.3.0",
33
- "@atlaskit/editor-toolbar": "^2.6.0",
33
+ "@atlaskit/editor-toolbar": "^2.7.0",
34
34
  "@atlaskit/editor-ui-control-model": "^2.9.0",
35
35
  "@atlaskit/emoji": "^72.4.0",
36
36
  "@atlaskit/icon": "^37.7.0",
37
37
  "@atlaskit/icon-lab": "^7.9.0",
38
38
  "@atlaskit/platform-feature-experiments": "^0.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.2.0",
40
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
40
+ "@atlaskit/tmp-editor-statsig": "^201.0.0",
41
41
  "@atlaskit/tokens": "^18.2.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "uuid": "^11.1.1"
44
44
  },
45
45
  "peerDependencies": {
46
- "@atlaskit/editor-common": "^123.0.0",
46
+ "@atlaskit/editor-common": "^123.2.0",
47
47
  "react": "^18.2.0 || ^19.2.0",
48
48
  "react-dom": "^18.2.0 || ^19.2.0",
49
49
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"