@atlaskit/editor-plugin-list 8.0.7 → 8.1.0

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,25 @@
1
1
  # @atlaskit/editor-plugin-list
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0ac75e0d28c72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ac75e0d28c72) -
8
+ Migrate @atlaskit/editor-prosemirror/history to @atlaskit/prosemirror-history package
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 8.0.8
15
+
16
+ ### Patch Changes
17
+
18
+ - [`26917199e153a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/26917199e153a) -
19
+ ED-29473 Add inputMethod attribute for block menu opened and switch inputMethod and triggeredFrom
20
+ attributes for element converted event
21
+ - Updated dependencies
22
+
3
23
  ## 8.0.7
4
24
 
5
25
  ### Patch Changes
@@ -10,7 +10,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
10
10
  var _lists = require("@atlaskit/editor-common/lists");
11
11
  var _preset = require("@atlaskit/editor-common/preset");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
- var _history = require("@atlaskit/editor-prosemirror/history");
13
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
14
14
  var _types = require("../../types");
15
15
  var _indentListItemsSelected = require("../actions/indent-list-items-selected");
16
16
  var _find = require("../utils/find");
@@ -30,7 +30,7 @@ var indentList = exports.indentList = function indentList(editorAnalyticsAPI) {
30
30
  }
31
31
 
32
32
  // Save the history, so it could undo/revert to the same state before the indent, see https://product-fabric.atlassian.net/browse/ED-14753
33
- (0, _history.closeHistory)(tr);
33
+ (0, _prosemirrorHistory.closeHistory)(tr);
34
34
  var firstListItemSelectedAttributes = (0, _lists.getListItemAttributes)($from);
35
35
  var parentListNode = (0, _find.findFirstParentListNode)($from);
36
36
  if (!parentListNode || firstListItemSelectedAttributes && firstListItemSelectedAttributes.indentLevel === 0 && firstListItemSelectedAttributes.itemIndex === 0) {
@@ -10,7 +10,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
10
10
  var _lists = require("@atlaskit/editor-common/lists");
11
11
  var _preset = require("@atlaskit/editor-common/preset");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
- var _history = require("@atlaskit/editor-prosemirror/history");
13
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
14
14
  var _outdentListItemsSelected = require("../actions/outdent-list-items-selected");
15
15
  var _analytics2 = require("../utils/analytics");
16
16
  var _find = require("../utils/find");
@@ -33,7 +33,7 @@ var outdentList = exports.outdentList = function outdentList(editorAnalyticsAPI)
33
33
  }
34
34
 
35
35
  // Save the history, so it could undo/revert to the same state before the outdent, see https://product-fabric.atlassian.net/browse/ED-14753
36
- (0, _history.closeHistory)(tr);
36
+ (0, _prosemirrorHistory.closeHistory)(tr);
37
37
  var actionSubjectId = (0, _utils.isBulletList)(parentListNode.node) ? _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_BULLET : _analytics.ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
38
38
  var customTr = tr;
39
39
  (0, _outdentListItemsSelected.outdentListItemsSelected)(customTr);
@@ -29,8 +29,8 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
29
29
  var handleClick = function handleClick(event) {
30
30
  if (!bulletListActive) {
31
31
  var _api$blockMenu;
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;
32
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
33
+ var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
34
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
35
  inputMethod: inputMethod,
36
36
  triggeredFrom: triggeredFrom
@@ -27,8 +27,8 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
27
27
  var handleClick = function handleClick(event) {
28
28
  if (!orderedListActive) {
29
29
  var _api$blockMenu;
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;
30
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
31
+ var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
32
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
33
  inputMethod: inputMethod,
34
34
  triggeredFrom: triggeredFrom
@@ -2,7 +2,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
2
2
  import { getCommonListAnalyticsAttributes, getListItemAttributes, hasValidListIndentationLevel } from '@atlaskit/editor-common/lists';
3
3
  import { PassiveTransaction } from '@atlaskit/editor-common/preset';
4
4
  import { isBulletList } from '@atlaskit/editor-common/utils';
5
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
+ import { closeHistory } from '@atlaskit/prosemirror-history';
6
6
  import { MAX_NESTED_LIST_INDENTATION } from '../../types';
7
7
  import { indentListItemsSelected as indentListAction } from '../actions/indent-list-items-selected';
8
8
  import { findFirstParentListNode } from '../utils/find';
@@ -2,7 +2,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, OU
2
2
  import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
3
3
  import { PassiveTransaction } from '@atlaskit/editor-common/preset';
4
4
  import { isBulletList } from '@atlaskit/editor-common/utils';
5
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
+ import { closeHistory } from '@atlaskit/prosemirror-history';
6
6
  import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
7
7
  import { getRestartListsAttributes } from '../utils/analytics';
8
8
  import { findFirstParentListNode } from '../utils/find';
@@ -24,8 +24,8 @@ const BulletedListBlockMenuItem = ({
24
24
  const handleClick = event => {
25
25
  if (!bulletListActive) {
26
26
  var _api$blockMenu;
27
- const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
- const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
27
+ const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
29
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
30
  inputMethod,
31
31
  triggeredFrom
@@ -22,8 +22,8 @@ const NumberedListBlockMenuItem = ({
22
22
  const handleClick = event => {
23
23
  if (!orderedListActive) {
24
24
  var _api$blockMenu;
25
- const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
- const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
25
+ const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
27
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
28
  inputMethod,
29
29
  triggeredFrom
@@ -5,7 +5,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
5
5
  import { getCommonListAnalyticsAttributes, getListItemAttributes, hasValidListIndentationLevel } from '@atlaskit/editor-common/lists';
6
6
  import { PassiveTransaction } from '@atlaskit/editor-common/preset';
7
7
  import { isBulletList } from '@atlaskit/editor-common/utils';
8
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
8
+ import { closeHistory } from '@atlaskit/prosemirror-history';
9
9
  import { MAX_NESTED_LIST_INDENTATION } from '../../types';
10
10
  import { indentListItemsSelected as indentListAction } from '../actions/indent-list-items-selected';
11
11
  import { findFirstParentListNode } from '../utils/find';
@@ -5,7 +5,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, OU
5
5
  import { getCommonListAnalyticsAttributes } from '@atlaskit/editor-common/lists';
6
6
  import { PassiveTransaction } from '@atlaskit/editor-common/preset';
7
7
  import { isBulletList } from '@atlaskit/editor-common/utils';
8
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
8
+ import { closeHistory } from '@atlaskit/prosemirror-history';
9
9
  import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
10
10
  import { getRestartListsAttributes } from '../utils/analytics';
11
11
  import { findFirstParentListNode } from '../utils/find';
@@ -22,8 +22,8 @@ var BulletedListBlockMenuItem = function BulletedListBlockMenuItem(_ref) {
22
22
  var handleClick = function handleClick(event) {
23
23
  if (!bulletListActive) {
24
24
  var _api$blockMenu;
25
- var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
- var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
25
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
26
+ var inputMethod = INPUT_METHOD.BLOCK_MENU;
27
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
28
  inputMethod: inputMethod,
29
29
  triggeredFrom: triggeredFrom
@@ -20,8 +20,8 @@ var NumberedListBlockMenuItem = function NumberedListBlockMenuItem(_ref) {
20
20
  var handleClick = function handleClick(event) {
21
21
  if (!orderedListActive) {
22
22
  var _api$blockMenu;
23
- var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
24
- var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
23
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
24
+ var inputMethod = INPUT_METHOD.BLOCK_MENU;
25
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
26
  inputMethod: inputMethod,
27
27
  triggeredFrom: triggeredFrom
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "8.0.7",
3
+ "version": "8.1.0",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,14 +33,15 @@
33
33
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
34
34
  "@atlaskit/editor-prosemirror": "7.0.0",
35
35
  "@atlaskit/editor-toolbar": "^0.14.0",
36
- "@atlaskit/icon": "^28.4.0",
36
+ "@atlaskit/icon": "^28.5.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
- "@atlaskit/prosemirror-input-rules": "^3.4.0",
39
- "@atlaskit/tmp-editor-statsig": "^13.2.0",
38
+ "@atlaskit/prosemirror-history": "^0.2.0",
39
+ "@atlaskit/prosemirror-input-rules": "^3.5.0",
40
+ "@atlaskit/tmp-editor-statsig": "^13.6.0",
40
41
  "@babel/runtime": "^7.0.0"
41
42
  },
42
43
  "peerDependencies": {
43
- "@atlaskit/editor-common": "^110.4.0",
44
+ "@atlaskit/editor-common": "^110.10.0",
44
45
  "react": "^18.2.0",
45
46
  "react-intl-next": "npm:react-intl@^5.18.1"
46
47
  },