@atlaskit/editor-plugin-list 8.0.0 → 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,20 @@
1
1
  # @atlaskit/editor-plugin-list
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
+
12
+ ## 8.0.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 8.0.0
4
19
 
5
20
  ### Patch Changes
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createBulletedListBlockMenuItem = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
+ var _analytics = require("@atlaskit/editor-common/analytics");
10
11
  var _messages = require("@atlaskit/editor-common/messages");
11
12
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
12
13
  var _editorToolbar = require("@atlaskit/editor-toolbar");
@@ -25,10 +26,15 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
25
26
 
26
27
  // Only show as selected if bullet list is active AND we're not selecting a blockquote
27
28
  var isSelected = bulletListActive && !isBlockquoteSelected;
28
- var handleClick = function handleClick() {
29
+ var handleClick = function handleClick(event) {
29
30
  if (!bulletListActive) {
30
31
  var _api$blockMenu;
31
- 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("bulletList"));
32
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
33
+ var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
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("bulletList", {
35
+ inputMethod: inputMethod,
36
+ triggeredFrom: triggeredFrom
37
+ }));
32
38
  }
33
39
  };
34
40
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createNumberedListBlockMenuItem = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
+ var _analytics = require("@atlaskit/editor-common/analytics");
10
11
  var _messages = require("@atlaskit/editor-common/messages");
11
12
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
12
13
  var _editorToolbar = require("@atlaskit/editor-toolbar");
@@ -23,10 +24,15 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
23
24
 
24
25
  // Only show as selected if ordered list is active AND we're not selecting a blockquote
25
26
  var isSelected = orderedListActive && !isBlockquoteSelected;
26
- var handleClick = function handleClick() {
27
+ var handleClick = function handleClick(event) {
27
28
  if (!orderedListActive) {
28
29
  var _api$blockMenu;
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("orderedList"));
30
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
31
+ var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
32
+ 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("orderedList", {
33
+ inputMethod: inputMethod,
34
+ triggeredFrom: triggeredFrom
35
+ }));
30
36
  }
31
37
  };
32
38
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
@@ -2,6 +2,7 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { useIntl } from 'react-intl-next';
5
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
6
  import { listMessages } from '@atlaskit/editor-common/messages';
6
7
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
7
8
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
@@ -20,10 +21,15 @@ const BulletedListBlockMenuItem = ({
20
21
 
21
22
  // Only show as selected if bullet list is active AND we're not selecting a blockquote
22
23
  const isSelected = bulletListActive && !isBlockquoteSelected;
23
- const handleClick = () => {
24
+ const handleClick = event => {
24
25
  if (!bulletListActive) {
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(`bulletList`));
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(`bulletList`, {
30
+ inputMethod,
31
+ triggeredFrom
32
+ }));
27
33
  }
28
34
  };
29
35
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
4
  import { listMessages } from '@atlaskit/editor-common/messages';
4
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
6
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
@@ -18,10 +19,15 @@ const NumberedListBlockMenuItem = ({
18
19
 
19
20
  // Only show as selected if ordered list is active AND we're not selecting a blockquote
20
21
  const isSelected = orderedListActive && !isBlockquoteSelected;
21
- const handleClick = () => {
22
+ const handleClick = event => {
22
23
  if (!orderedListActive) {
23
24
  var _api$blockMenu;
24
- 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(`orderedList`));
25
+ const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
+ const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
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(`orderedList`, {
28
+ inputMethod,
29
+ triggeredFrom
30
+ }));
25
31
  }
26
32
  };
27
33
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
@@ -2,6 +2,7 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { useIntl } from 'react-intl-next';
5
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
6
  import { listMessages } from '@atlaskit/editor-common/messages';
6
7
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
7
8
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
@@ -18,10 +19,15 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
18
19
 
19
20
  // Only show as selected if bullet list is active AND we're not selecting a blockquote
20
21
  var isSelected = bulletListActive && !isBlockquoteSelected;
21
- var handleClick = function handleClick() {
22
+ var handleClick = function handleClick(event) {
22
23
  if (!bulletListActive) {
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("bulletList"));
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("bulletList", {
28
+ inputMethod: inputMethod,
29
+ triggeredFrom: triggeredFrom
30
+ }));
25
31
  }
26
32
  };
27
33
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
4
  import { listMessages } from '@atlaskit/editor-common/messages';
4
5
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
5
6
  import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
@@ -16,10 +17,15 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
16
17
 
17
18
  // Only show as selected if ordered list is active AND we're not selecting a blockquote
18
19
  var isSelected = orderedListActive && !isBlockquoteSelected;
19
- var handleClick = function handleClick() {
20
+ var handleClick = function handleClick(event) {
20
21
  if (!orderedListActive) {
21
22
  var _api$blockMenu;
22
- 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("orderedList"));
23
+ var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
24
+ var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
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("orderedList", {
26
+ inputMethod: inputMethod,
27
+ triggeredFrom: triggeredFrom
28
+ }));
23
29
  }
24
30
  };
25
31
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,19 +28,19 @@
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^51.2.0",
31
- "@atlaskit/editor-plugin-analytics": "^6.0.0",
31
+ "@atlaskit/editor-plugin-analytics": "^6.1.0",
32
32
  "@atlaskit/editor-plugin-block-menu": "^4.0.0",
33
33
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
34
34
  "@atlaskit/editor-prosemirror": "7.0.0",
35
- "@atlaskit/editor-toolbar": "^0.9.0",
35
+ "@atlaskit/editor-toolbar": "^0.10.0",
36
36
  "@atlaskit/icon": "^28.3.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
39
- "@atlaskit/tmp-editor-statsig": "^12.31.0",
39
+ "@atlaskit/tmp-editor-statsig": "^12.32.0",
40
40
  "@babel/runtime": "^7.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@atlaskit/editor-common": "^110.0.0",
43
+ "@atlaskit/editor-common": "^110.4.0",
44
44
  "react": "^18.2.0",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
46
46
  },