@atlaskit/editor-plugin-panel 12.2.2 → 12.2.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,19 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 12.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.2.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`78c42f10ef772`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/78c42f10ef772) -
14
+ Add support in block menu for new panel_c1 variant which allows tables inside
15
+ - Updated dependencies
16
+
3
17
  ## 12.2.2
4
18
 
5
19
  ### Patch Changes
@@ -11,6 +11,8 @@ var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _editorToolbar = require("@atlaskit/editor-toolbar");
13
13
  var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/information-circle"));
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
+ var _utils = require("../pm-plugins/utils/utils");
14
16
  var NODE_NAME = 'panel';
15
17
  var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
16
18
  var api = _ref.api;
@@ -22,7 +24,8 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
22
24
  api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
23
25
  var _api$blockMenu;
24
26
  var tr = _ref2.tr;
25
- 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.panel, {
27
+ var panelNodeType = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _utils.pickPanelTypeForInsertion)(tr.selection) : tr.doc.type.schema.nodes.panel;
28
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
26
29
  inputMethod: inputMethod,
27
30
  triggeredFrom: triggeredFrom,
28
31
  targetTypeName: NODE_NAME
@@ -4,6 +4,8 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { blockTypeMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
+ import { pickPanelTypeForInsertion } from '../pm-plugins/utils/utils';
7
9
  const NODE_NAME = 'panel';
8
10
  const PanelBlockMenuItem = ({
9
11
  api
@@ -18,7 +20,8 @@ const PanelBlockMenuItem = ({
18
20
  tr
19
21
  }) => {
20
22
  var _api$blockMenu;
21
- 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.panel, {
23
+ const panelNodeType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? pickPanelTypeForInsertion(tr.selection) : tr.doc.type.schema.nodes.panel;
24
+ const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
22
25
  inputMethod,
23
26
  triggeredFrom,
24
27
  targetTypeName: NODE_NAME
@@ -4,6 +4,8 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { blockTypeMessages } from '@atlaskit/editor-common/messages';
5
5
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import InformationCircleIcon from '@atlaskit/icon/core/information-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
+ import { pickPanelTypeForInsertion } from '../pm-plugins/utils/utils';
7
9
  var NODE_NAME = 'panel';
8
10
  var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
9
11
  var api = _ref.api;
@@ -15,7 +17,8 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
15
17
  api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
16
18
  var _api$blockMenu;
17
19
  var tr = _ref2.tr;
18
- 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.panel, {
20
+ var panelNodeType = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? pickPanelTypeForInsertion(tr.selection) : tr.doc.type.schema.nodes.panel;
21
+ var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(panelNodeType, {
19
22
  inputMethod: inputMethod,
20
23
  triggeredFrom: triggeredFrom,
21
24
  targetTypeName: NODE_NAME
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "12.2.2",
3
+ "version": "12.2.4",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "sideEffects": false,
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^52.14.0",
30
+ "@atlaskit/adf-schema": "^52.15.0",
31
31
  "@atlaskit/editor-palette": "^2.2.0",
32
32
  "@atlaskit/editor-plugin-analytics": "^10.1.0",
33
33
  "@atlaskit/editor-plugin-block-menu": "^9.2.0",
@@ -37,17 +37,17 @@
37
37
  "@atlaskit/editor-plugin-toolbar": "^7.3.0",
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
39
  "@atlaskit/editor-shared-styles": "^3.11.0",
40
- "@atlaskit/editor-toolbar": "^1.7.0",
41
- "@atlaskit/emoji": "^70.10.0",
40
+ "@atlaskit/editor-toolbar": "^1.8.0",
41
+ "@atlaskit/emoji": "^70.11.0",
42
42
  "@atlaskit/icon": "^35.3.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
- "@atlaskit/tmp-editor-statsig": "^84.0.0",
45
- "@atlaskit/tokens": "^13.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^85.0.0",
45
+ "@atlaskit/tokens": "^13.1.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "uuid": "^3.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^114.47.0",
50
+ "@atlaskit/editor-common": "^114.50.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"