@atlaskit/editor-plugin-expand 7.0.1 → 7.0.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 7.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`51d46145cda56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51d46145cda56) -
14
+ Adds additional attributes to Element Converted event and fires the event for the empty line
15
+ transforms
16
+ - Updated dependencies
17
+
3
18
  ## 7.0.1
4
19
 
5
20
  ### Patch Changes
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.createExpandBlockMenuItem = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactIntlNext = require("react-intl-next");
11
+ var _analytics = require("@atlaskit/editor-common/analytics");
11
12
  var _messages = require("@atlaskit/editor-common/messages");
12
13
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
13
14
  var _state = require("@atlaskit/editor-prosemirror/state");
@@ -29,9 +30,14 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
29
30
  }
30
31
  return false;
31
32
  }, [selection]);
32
- var handleClick = function handleClick() {
33
+ var handleClick = function handleClick(event) {
33
34
  var _api$blockMenu;
34
- api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
35
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
36
+ var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
37
+ api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
38
+ inputMethod: inputMethod,
39
+ triggeredFrom: triggeredFrom
40
+ }));
35
41
  };
36
42
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
37
43
  onClick: handleClick,
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
4
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
4
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
6
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
@@ -22,9 +23,14 @@ const ExpandBlockMenuItem = ({
22
23
  }
23
24
  return false;
24
25
  }, [selection]);
25
- const handleClick = () => {
26
+ const handleClick = event => {
26
27
  var _api$blockMenu;
27
- api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
28
+ const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
29
+ const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
30
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
31
+ inputMethod,
32
+ triggeredFrom
33
+ }));
28
34
  };
29
35
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
30
36
  onClick: handleClick,
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
4
  import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
4
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
6
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
@@ -20,9 +21,14 @@ var ExpandBlockMenuItem = function ExpandBlockMenuItem(_ref) {
20
21
  }
21
22
  return false;
22
23
  }, [selection]);
23
- var handleClick = function handleClick() {
24
+ var handleClick = function handleClick(event) {
24
25
  var _api$blockMenu;
25
- api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName));
26
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
27
+ var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
28
+ api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
29
+ inputMethod: inputMethod,
30
+ triggeredFrom: triggeredFrom
31
+ }));
26
32
  };
27
33
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
28
34
  onClick: handleClick,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,12 +31,12 @@
31
31
  "dependencies": {
32
32
  "@atlaskit/adf-schema": "^51.2.0",
33
33
  "@atlaskit/button": "^23.4.0",
34
- "@atlaskit/editor-plugin-analytics": "^6.0.0",
34
+ "@atlaskit/editor-plugin-analytics": "^6.1.0",
35
35
  "@atlaskit/editor-plugin-block-menu": "^4.0.0",
36
36
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
38
38
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
39
- "@atlaskit/editor-plugin-local-id": "^4.0.0",
39
+ "@atlaskit/editor-plugin-local-id": "^4.1.0",
40
40
  "@atlaskit/editor-plugin-selection": "^6.0.0",
41
41
  "@atlaskit/editor-plugin-selection-marker": "^6.1.0",
42
42
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -44,18 +44,18 @@
44
44
  "@atlaskit/editor-tables": "^2.9.0",
45
45
  "@atlaskit/editor-toolbar": "^0.10.0",
46
46
  "@atlaskit/icon": "^28.3.0",
47
- "@atlaskit/icon-lab": "^5.7.0",
47
+ "@atlaskit/icon-lab": "^5.8.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/tmp-editor-statsig": "^12.32.0",
50
- "@atlaskit/tokens": "^6.3.0",
51
- "@atlaskit/tooltip": "^20.4.0",
49
+ "@atlaskit/tmp-editor-statsig": "^13.0.0",
50
+ "@atlaskit/tokens": "^6.4.0",
51
+ "@atlaskit/tooltip": "^20.5.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@emotion/react": "^11.7.1",
54
54
  "uuid": "^3.1.0",
55
55
  "w3c-keyname": "^2.1.8"
56
56
  },
57
57
  "peerDependencies": {
58
- "@atlaskit/editor-common": "^110.1.0",
58
+ "@atlaskit/editor-common": "^110.4.0",
59
59
  "react": "^18.2.0",
60
60
  "react-dom": "^18.2.0",
61
61
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/editor-plugin-guideline": "^6.0.0",
67
67
  "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
68
68
  "@atlaskit/editor-plugin-table": "^15.0.0",
69
- "@atlaskit/editor-plugin-type-ahead": "^6.0.0",
69
+ "@atlaskit/editor-plugin-type-ahead": "^6.1.0",
70
70
  "@atlaskit/editor-plugin-width": "^7.0.0",
71
71
  "@testing-library/react": "^13.4.0",
72
72
  "react-test-renderer": "^18.2.0"