@atlaskit/editor-plugin-panel 8.0.1 → 8.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,14 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 8.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`51d46145cda56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51d46145cda56) -
8
+ Adds additional attributes to Element Converted event and fires the event for the empty line
9
+ transforms
10
+ - Updated dependencies
11
+
3
12
  ## 8.0.1
4
13
 
5
14
  ### Patch Changes
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.createPanelBlockMenuItem = 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");
@@ -30,9 +31,14 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
30
31
  }
31
32
  return false;
32
33
  }, [selection]);
33
- var handleClick = function handleClick() {
34
+ var handleClick = function handleClick(event) {
34
35
  var _api$blockMenu;
35
- 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));
36
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
37
+ var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
38
+ 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, {
39
+ inputMethod: inputMethod,
40
+ triggeredFrom: triggeredFrom
41
+ }));
36
42
  };
37
43
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
38
44
  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 { blockTypeMessages } 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';
@@ -23,9 +24,14 @@ const PanelBlockMenuItem = ({
23
24
  }
24
25
  return false;
25
26
  }, [selection]);
26
- const handleClick = () => {
27
+ const handleClick = event => {
27
28
  var _api$blockMenu;
28
- 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));
29
+ const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
30
+ const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
31
+ 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, {
32
+ inputMethod,
33
+ triggeredFrom
34
+ }));
29
35
  };
30
36
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
31
37
  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 { blockTypeMessages } 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';
@@ -21,9 +22,14 @@ var PanelBlockMenuItem = function PanelBlockMenuItem(_ref) {
21
22
  }
22
23
  return false;
23
24
  }, [selection]);
24
- var handleClick = function handleClick() {
25
+ var handleClick = function handleClick(event) {
25
26
  var _api$blockMenu;
26
- 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));
27
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
+ var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
29
+ 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, {
30
+ inputMethod: inputMethod,
31
+ triggeredFrom: triggeredFrom
32
+ }));
27
33
  };
28
34
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
29
35
  onClick: handleClick,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "8.0.1",
3
+ "version": "8.0.2",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,10 +29,10 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^51.2.0",
31
31
  "@atlaskit/editor-palette": "^2.1.0",
32
- "@atlaskit/editor-plugin-analytics": "^6.0.0",
32
+ "@atlaskit/editor-plugin-analytics": "^6.1.0",
33
33
  "@atlaskit/editor-plugin-block-menu": "^4.0.0",
34
34
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
35
- "@atlaskit/editor-plugin-emoji": "^7.0.0",
35
+ "@atlaskit/editor-plugin-emoji": "^7.1.0",
36
36
  "@atlaskit/editor-plugin-selection": "^6.0.0",
37
37
  "@atlaskit/editor-plugin-toolbar": "^3.0.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -43,12 +43,12 @@
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
44
  "@atlaskit/theme": "^21.0.0",
45
45
  "@atlaskit/tmp-editor-statsig": "^12.32.0",
46
- "@atlaskit/tokens": "^6.3.0",
46
+ "@atlaskit/tokens": "^6.4.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "uuid": "^3.1.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@atlaskit/editor-common": "^110.1.0",
51
+ "@atlaskit/editor-common": "^110.4.0",
52
52
  "react": "^18.2.0",
53
53
  "react-dom": "^18.2.0",
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"