@atlaskit/editor-plugin-expand 13.0.6 → 13.1.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,24 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 13.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`b483e293da76f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b483e293da76f) -
14
+ Add a gated `isSuggested` attribute to block menu element transformed analytics events so
15
+ suggested and non-suggested transform selections can be distinguished. The event attribute is
16
+ gated behind the `platform_editor_blocks_patch_2` feature gate.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 13.0.6
4
23
 
5
24
  ### Patch Changes
@@ -13,7 +13,8 @@ var _editorToolbar = require("@atlaskit/editor-toolbar");
13
13
  var _expandElement = _interopRequireDefault(require("@atlaskit/icon-lab/core/expand-element"));
14
14
  var NODE_NAME = 'expand';
15
15
  var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
16
- var api = _ref.api;
16
+ var api = _ref.api,
17
+ isSuggested = _ref.isSuggested;
17
18
  var _useIntl = (0, _reactIntl.useIntl)(),
18
19
  formatMessage = _useIntl.formatMessage;
19
20
  var handleClick = function handleClick(event) {
@@ -24,6 +25,7 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
24
25
  var tr = _ref2.tr;
25
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.expand, {
26
27
  inputMethod: inputMethod,
28
+ isSuggested: isSuggested,
27
29
  triggeredFrom: triggeredFrom,
28
30
  targetTypeName: NODE_NAME
29
31
  });
@@ -42,8 +44,11 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
42
44
  };
43
45
  var createExpandBlockMenuItem = exports.createExpandBlockMenuItem = function createExpandBlockMenuItem(api) {
44
46
  return function () {
47
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
48
+ isSuggested = _ref3.isSuggested;
45
49
  return /*#__PURE__*/_react.default.createElement(ExpandBlockMenuItem, {
46
- api: api
50
+ api: api,
51
+ isSuggested: isSuggested
47
52
  });
48
53
  };
49
54
  };
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
7
7
  const NODE_NAME = 'expand';
8
8
  const ExpandBlockMenuItem = ({
9
- api
9
+ api,
10
+ isSuggested
10
11
  }) => {
11
12
  const {
12
13
  formatMessage
@@ -20,6 +21,7 @@ const ExpandBlockMenuItem = ({
20
21
  var _api$blockMenu;
21
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.expand, {
22
23
  inputMethod,
24
+ isSuggested,
23
25
  triggeredFrom,
24
26
  targetTypeName: NODE_NAME
25
27
  });
@@ -37,7 +39,10 @@ const ExpandBlockMenuItem = ({
37
39
  }, formatMessage(toolbarInsertBlockMessages.expand));
38
40
  };
39
41
  export const createExpandBlockMenuItem = api => {
40
- return () => /*#__PURE__*/React.createElement(ExpandBlockMenuItem, {
41
- api: api
42
+ return ({
43
+ isSuggested
44
+ } = {}) => /*#__PURE__*/React.createElement(ExpandBlockMenuItem, {
45
+ api: api,
46
+ isSuggested: isSuggested
42
47
  });
43
48
  };
@@ -6,7 +6,8 @@ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
6
6
  import ExpandElementIcon from '@atlaskit/icon-lab/core/expand-element';
7
7
  var NODE_NAME = 'expand';
8
8
  var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
9
- var api = _ref.api;
9
+ var api = _ref.api,
10
+ isSuggested = _ref.isSuggested;
10
11
  var _useIntl = useIntl(),
11
12
  formatMessage = _useIntl.formatMessage;
12
13
  var handleClick = function handleClick(event) {
@@ -17,6 +18,7 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
17
18
  var tr = _ref2.tr;
18
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.expand, {
19
20
  inputMethod: inputMethod,
21
+ isSuggested: isSuggested,
20
22
  triggeredFrom: triggeredFrom,
21
23
  targetTypeName: NODE_NAME
22
24
  });
@@ -35,8 +37,11 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
35
37
  };
36
38
  export var createExpandBlockMenuItem = function createExpandBlockMenuItem(api) {
37
39
  return function () {
40
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
41
+ isSuggested = _ref3.isSuggested;
38
42
  return /*#__PURE__*/React.createElement(ExpandBlockMenuItem, {
39
- api: api
43
+ api: api,
44
+ isSuggested: isSuggested
40
45
  });
41
46
  };
42
47
  };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
3
4
  import type { ExpandPlugin } from '../types';
4
- export declare const createExpandBlockMenuItem: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => () => React.JSX.Element;
5
+ export declare const createExpandBlockMenuItem: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "13.0.6",
3
+ "version": "13.1.1",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -24,8 +24,8 @@
24
24
  "@atlaskit/adf-schema": "^56.0.0",
25
25
  "@atlaskit/button": "^24.1.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^12.0.0",
27
- "@atlaskit/editor-plugin-block-controls": "^13.0.0",
28
- "@atlaskit/editor-plugin-block-menu": "^11.0.0",
27
+ "@atlaskit/editor-plugin-block-controls": "^13.1.0",
28
+ "@atlaskit/editor-plugin-block-menu": "^11.1.0",
29
29
  "@atlaskit/editor-plugin-decorations": "^12.0.0",
30
30
  "@atlaskit/editor-plugin-editor-disabled": "^12.0.0",
31
31
  "@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
@@ -37,11 +37,11 @@
37
37
  "@atlaskit/editor-tables": "^3.0.0",
38
38
  "@atlaskit/editor-toolbar": "^2.0.0",
39
39
  "@atlaskit/icon": "^36.0.0",
40
- "@atlaskit/icon-lab": "^7.0.0",
40
+ "@atlaskit/icon-lab": "^7.1.0",
41
41
  "@atlaskit/platform-feature-flags": "^2.0.0",
42
42
  "@atlaskit/prosemirror-history": "^1.0.0",
43
- "@atlaskit/tmp-editor-statsig": "^109.0.0",
44
- "@atlaskit/tokens": "^14.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^111.0.0",
44
+ "@atlaskit/tokens": "^15.0.0",
45
45
  "@atlaskit/tooltip": "^23.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@emotion/react": "^11.7.1",
@@ -49,7 +49,7 @@
49
49
  "w3c-keyname": "^2.1.8"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^116.6.0",
52
+ "@atlaskit/editor-common": "^116.11.0",
53
53
  "react": "^18.2.0",
54
54
  "react-dom": "^18.2.0",
55
55
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -58,7 +58,7 @@
58
58
  "@testing-library/react": "^16.3.0",
59
59
  "react": "^18.2.0",
60
60
  "react-dom": "^18.2.0",
61
- "react-intl": "^6.6.2",
61
+ "react-intl": "^7.0.0",
62
62
  "react-test-renderer": "^18.2.0"
63
63
  },
64
64
  "techstack": {