@atlaskit/editor-plugin-layout 6.0.1 → 6.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-layout
2
2
 
3
+ ## 6.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
  ## 6.0.1
4
13
 
5
14
  ### Patch Changes
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.createLayoutBlockMenuItem = 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");
@@ -28,9 +29,14 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
28
29
  }
29
30
  return false;
30
31
  }, [selection]);
31
- var handleClick = function handleClick() {
32
+ var handleClick = function handleClick(event) {
32
33
  var _api$blockMenu;
33
- 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('layoutSection'));
34
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
35
+ var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
36
+ 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('layoutSection', {
37
+ inputMethod: inputMethod,
38
+ triggeredFrom: triggeredFrom
39
+ }));
34
40
  };
35
41
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
36
42
  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 { blockMenuMessages } 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 @@ const LayoutBlockMenuItem = ({
21
22
  }
22
23
  return false;
23
24
  }, [selection]);
24
- const handleClick = () => {
25
+ const handleClick = event => {
25
26
  var _api$blockMenu;
26
- 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('layoutSection'));
27
+ const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
+ const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
29
+ 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('layoutSection', {
30
+ inputMethod,
31
+ triggeredFrom
32
+ }));
27
33
  };
28
34
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
29
35
  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 { blockMenuMessages } 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';
@@ -19,9 +20,14 @@ var LayoutBlockMenuItem = function LayoutBlockMenuItem(_ref) {
19
20
  }
20
21
  return false;
21
22
  }, [selection]);
22
- var handleClick = function handleClick() {
23
+ var handleClick = function handleClick(event) {
23
24
  var _api$blockMenu;
24
- 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('layoutSection'));
25
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
+ var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
27
+ 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('layoutSection', {
28
+ inputMethod: inputMethod,
29
+ triggeredFrom: triggeredFrom
30
+ }));
25
31
  };
26
32
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
27
33
  onClick: handleClick,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,7 +30,7 @@
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
32
  "@atlaskit/adf-schema": "^51.2.0",
33
- "@atlaskit/editor-plugin-analytics": "^6.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^6.1.0",
34
34
  "@atlaskit/editor-plugin-block-menu": "^4.0.0",
35
35
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
36
36
  "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
@@ -42,15 +42,15 @@
42
42
  "@atlaskit/editor-shared-styles": "^3.6.0",
43
43
  "@atlaskit/editor-toolbar": "^0.10.0",
44
44
  "@atlaskit/icon": "^28.3.0",
45
- "@atlaskit/icon-lab": "^5.7.0",
45
+ "@atlaskit/icon-lab": "^5.8.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
47
  "@atlaskit/tmp-editor-statsig": "^12.32.0",
48
- "@atlaskit/tokens": "^6.3.0",
48
+ "@atlaskit/tokens": "^6.4.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^110.1.0",
53
+ "@atlaskit/editor-common": "^110.4.0",
54
54
  "react": "^18.2.0",
55
55
  "react-intl-next": "npm:react-intl@^5.18.1"
56
56
  },