@atlaskit/editor-plugin-list 3.1.5 → 3.1.7

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,17 @@
1
1
  # @atlaskit/editor-plugin-list
2
2
 
3
+ ## 3.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#71503](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71503) [`2e81432d605a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e81432d605a) - [ux] ED-21943 Fixed outdent behaviour when multiple lists at same level including TaskList, and add relevant testcases.
8
+
9
+ ## 3.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152) [`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) - Updating adf-schema version to 35.5.1
14
+
3
15
  ## 3.1.5
4
16
 
5
17
  ### Patch Changes
@@ -68,6 +68,7 @@ var outdentListItemsSelected = exports.outdentListItemsSelected = function outde
68
68
  hasNormalizedFromPositionLiftedOut: hasNormalizedFromPositionLiftedOut
69
69
  });
70
70
  tr.setSelection(nextSelection);
71
+ (0, _lists.processNestedTaskListsInSameLevel)(tr);
71
72
  (0, _lists.joinSiblingLists)({
72
73
  tr: tr,
73
74
  direction: _lists.JoinDirection.RIGHT
@@ -1,5 +1,5 @@
1
1
  import { OUTDENT_SCENARIOS } from '@atlaskit/editor-common/analytics';
2
- import { JoinDirection, joinSiblingLists, normalizeListItemsSelection } from '@atlaskit/editor-common/lists';
2
+ import { JoinDirection, joinSiblingLists, normalizeListItemsSelection, processNestedTaskListsInSameLevel } from '@atlaskit/editor-common/lists';
3
3
  import { GapCursorSelection } from '@atlaskit/editor-common/selection';
4
4
  import { getOrderFromOrderedListNode, isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
5
5
  import { Fragment, NodeRange, Slice } from '@atlaskit/editor-prosemirror/model';
@@ -60,6 +60,7 @@ export const outdentListItemsSelected = tr => {
60
60
  hasNormalizedFromPositionLiftedOut
61
61
  });
62
62
  tr.setSelection(nextSelection);
63
+ processNestedTaskListsInSameLevel(tr);
63
64
  joinSiblingLists({
64
65
  tr,
65
66
  direction: JoinDirection.RIGHT
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { OUTDENT_SCENARIOS } from '@atlaskit/editor-common/analytics';
5
- import { JoinDirection, joinSiblingLists, normalizeListItemsSelection } from '@atlaskit/editor-common/lists';
5
+ import { JoinDirection, joinSiblingLists, normalizeListItemsSelection, processNestedTaskListsInSameLevel } from '@atlaskit/editor-common/lists';
6
6
  import { GapCursorSelection } from '@atlaskit/editor-common/selection';
7
7
  import { getOrderFromOrderedListNode, isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
8
8
  import { Fragment, NodeRange, Slice } from '@atlaskit/editor-prosemirror/model';
@@ -61,6 +61,7 @@ export var outdentListItemsSelected = function outdentListItemsSelected(tr) {
61
61
  hasNormalizedFromPositionLiftedOut: hasNormalizedFromPositionLiftedOut
62
62
  });
63
63
  tr.setSelection(nextSelection);
64
+ processNestedTaskListsInSameLevel(tr);
64
65
  joinSiblingLists({
65
66
  tr: tr,
66
67
  direction: JoinDirection.RIGHT
@@ -4,7 +4,6 @@ import type { CommandDispatch } from '@atlaskit/editor-common/types';
4
4
  import type { WalkNode } from '@atlaskit/editor-common/utils';
5
5
  import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
7
- type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_TO_SIBLING_DESCENDANT;
7
+ export type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_TO_SIBLING_DESCENDANT;
8
8
  export declare const calcJoinListScenario: (walkNode: WalkNode, $head: ResolvedPos, tr: Transaction) => [ScenariosAllowed, ResolvedPos | null] | false;
9
9
  export declare const listBackspace: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (state: EditorState, dispatch?: CommandDispatch) => boolean;
10
- export {};
@@ -4,10 +4,9 @@ import type { CommandDispatch } from '@atlaskit/editor-common/types';
4
4
  import type { WalkNode } from '@atlaskit/editor-common/utils';
5
5
  import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
7
- type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_TO_SIBLING_DESCENDANT;
7
+ export type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_TO_SIBLING_DESCENDANT;
8
8
  export declare const calcJoinListScenario: (walkNode: WalkNode, $head: ResolvedPos, tr: Transaction) => [
9
9
  ScenariosAllowed,
10
10
  ResolvedPos | null
11
11
  ] | false;
12
12
  export declare const listBackspace: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (state: EditorState, dispatch?: CommandDispatch) => boolean;
13
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "3.1.5",
3
+ "version": "3.1.7",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,8 +32,8 @@
32
32
  ".": "./src/index.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/adf-schema": "^35.3.0",
36
- "@atlaskit/editor-common": "^77.0.0",
35
+ "@atlaskit/adf-schema": "^35.5.1",
36
+ "@atlaskit/editor-common": "^77.3.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
39
39
  "@atlaskit/editor-prosemirror": "1.1.0",
@@ -46,12 +46,8 @@
46
46
  "react-intl-next": "npm:react-intl@^5.18.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@af/visual-regression": "*",
50
49
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
51
- "@testing-library/react": "^12.1.5",
52
- "react-dom": "^16.8.0",
53
- "typescript": "~4.9.5",
54
- "wait-for-expect": "^1.2.0"
50
+ "typescript": "~4.9.5"
55
51
  },
56
52
  "techstack": {
57
53
  "@atlassian/frontend": {
@@ -89,6 +85,11 @@
89
85
  }
90
86
  },
91
87
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
88
+ "stricter": {
89
+ "no-unused-dependencies": {
90
+ "checkDevDependencies": true
91
+ }
92
+ },
92
93
  "platform-feature-flags": {
93
94
  "platform.editor.ordered-list-auto-join-improvements_mrlv5": {
94
95
  "type": "boolean"
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.messages = void 0;
7
- var _reactIntlNext = require("react-intl-next");
8
- // Common Translations will live here
9
-
10
- var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
11
- unorderedList: {
12
- id: 'fabric.editor.unorderedList',
13
- defaultMessage: 'Bullet list',
14
- description: 'A list with bullets. Also known as an “unordered” list'
15
- },
16
- unorderedListDescription: {
17
- id: 'fabric.editor.unorderedList.description',
18
- defaultMessage: 'Create an unordered list',
19
- description: ''
20
- },
21
- orderedList: {
22
- id: 'fabric.editor.orderedList',
23
- defaultMessage: 'Numbered list',
24
- description: 'A list with ordered items 1… 2… 3…'
25
- },
26
- orderedListDescription: {
27
- id: 'fabric.editor.orderedList.description',
28
- defaultMessage: 'Create an ordered list',
29
- description: ''
30
- },
31
- lists: {
32
- id: 'fabric.editor.lists',
33
- defaultMessage: 'Lists',
34
- description: 'Menu shows ordered/bullet list and unordered/numbered lists'
35
- }
36
- });
@@ -1,29 +0,0 @@
1
- // Common Translations will live here
2
- import { defineMessages } from 'react-intl-next';
3
- export const messages = defineMessages({
4
- unorderedList: {
5
- id: 'fabric.editor.unorderedList',
6
- defaultMessage: 'Bullet list',
7
- description: 'A list with bullets. Also known as an “unordered” list'
8
- },
9
- unorderedListDescription: {
10
- id: 'fabric.editor.unorderedList.description',
11
- defaultMessage: 'Create an unordered list',
12
- description: ''
13
- },
14
- orderedList: {
15
- id: 'fabric.editor.orderedList',
16
- defaultMessage: 'Numbered list',
17
- description: 'A list with ordered items 1… 2… 3…'
18
- },
19
- orderedListDescription: {
20
- id: 'fabric.editor.orderedList.description',
21
- defaultMessage: 'Create an ordered list',
22
- description: ''
23
- },
24
- lists: {
25
- id: 'fabric.editor.lists',
26
- defaultMessage: 'Lists',
27
- description: 'Menu shows ordered/bullet list and unordered/numbered lists'
28
- }
29
- });
@@ -1,29 +0,0 @@
1
- // Common Translations will live here
2
- import { defineMessages } from 'react-intl-next';
3
- export var messages = defineMessages({
4
- unorderedList: {
5
- id: 'fabric.editor.unorderedList',
6
- defaultMessage: 'Bullet list',
7
- description: 'A list with bullets. Also known as an “unordered” list'
8
- },
9
- unorderedListDescription: {
10
- id: 'fabric.editor.unorderedList.description',
11
- defaultMessage: 'Create an unordered list',
12
- description: ''
13
- },
14
- orderedList: {
15
- id: 'fabric.editor.orderedList',
16
- defaultMessage: 'Numbered list',
17
- description: 'A list with ordered items 1… 2… 3…'
18
- },
19
- orderedListDescription: {
20
- id: 'fabric.editor.orderedList.description',
21
- defaultMessage: 'Create an ordered list',
22
- description: ''
23
- },
24
- lists: {
25
- id: 'fabric.editor.lists',
26
- defaultMessage: 'Lists',
27
- description: 'Menu shows ordered/bullet list and unordered/numbered lists'
28
- }
29
- });
@@ -1,27 +0,0 @@
1
- export declare const messages: {
2
- unorderedList: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- unorderedListDescription: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- orderedList: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- orderedListDescription: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- lists: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- };
@@ -1,27 +0,0 @@
1
- export declare const messages: {
2
- unorderedList: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- unorderedListDescription: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- orderedList: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- orderedListDescription: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- lists: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- };