@atlaskit/editor-plugin-panel 21.0.0 → 21.0.1

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-panel
2
2
 
3
+ ## 21.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
8
+ Clean up shipped experiment `platform_editor_block_menu`
9
+ - Updated dependencies
10
+
3
11
  ## 21.0.0
4
12
 
5
13
  ### 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;
@@ -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;
@@ -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;
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.1",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
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": "^200.0.0",
41
41
  "@atlaskit/tokens": "^18.2.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "uuid": "^11.1.1"