@atlaskit/editor-plugin-tasks-and-decisions 11.4.5 → 11.4.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 +15 -0
- package/dist/cjs/pm-plugins/keymaps.js +13 -1
- package/dist/es2019/pm-plugins/keymaps.js +15 -1
- package/dist/esm/pm-plugins/keymaps.js +13 -1
- package/dist/types/nodeviews/TaskItemNodeView.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/TaskItemNodeView.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 11.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3e18e5bea1aa1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e18e5bea1aa1) -
|
|
8
|
+
Fixed cursor placement when pressing Enter at the start of a nested task item. Fixed extra spacing
|
|
9
|
+
on nested task lists when flexible list indentation is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 11.4.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 11.4.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -606,7 +606,19 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
606
606
|
return tr.insert(blockTaskItemNode.pos, newTaskItem);
|
|
607
607
|
}
|
|
608
608
|
// Current position will point to text node, but we want to insert above the taskItem node
|
|
609
|
-
|
|
609
|
+
var insertPos = $from.pos - 1;
|
|
610
|
+
tr.insert(insertPos, newTask);
|
|
611
|
+
// Place cursor on the newly inserted empty task item above
|
|
612
|
+
// when nested inside another taskList.
|
|
613
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true)) {
|
|
614
|
+
var taskListType = schema.nodes.taskList;
|
|
615
|
+
var parentTaskList = $from.node($from.depth - 1);
|
|
616
|
+
var grandparent = $from.depth >= 3 ? $from.node($from.depth - 2) : null;
|
|
617
|
+
if ((parentTaskList === null || parentTaskList === void 0 ? void 0 : parentTaskList.type) === taskListType && (grandparent === null || grandparent === void 0 ? void 0 : grandparent.type) === taskListType) {
|
|
618
|
+
tr.setSelection(_state2.TextSelection.create(tr.doc, insertPos + 1));
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return tr;
|
|
610
622
|
}
|
|
611
623
|
}
|
|
612
624
|
/**
|
|
@@ -601,7 +601,21 @@ const enter = (editorAnalyticsAPI, getContextIdentifier) => filter(isInsideTaskO
|
|
|
601
601
|
return tr.insert(blockTaskItemNode.pos, newTaskItem);
|
|
602
602
|
}
|
|
603
603
|
// Current position will point to text node, but we want to insert above the taskItem node
|
|
604
|
-
|
|
604
|
+
const insertPos = $from.pos - 1;
|
|
605
|
+
tr.insert(insertPos, newTask);
|
|
606
|
+
// Place cursor on the newly inserted empty task item above
|
|
607
|
+
// when nested inside another taskList.
|
|
608
|
+
if (expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true)) {
|
|
609
|
+
const {
|
|
610
|
+
taskList: taskListType
|
|
611
|
+
} = schema.nodes;
|
|
612
|
+
const parentTaskList = $from.node($from.depth - 1);
|
|
613
|
+
const grandparent = $from.depth >= 3 ? $from.node($from.depth - 2) : null;
|
|
614
|
+
if ((parentTaskList === null || parentTaskList === void 0 ? void 0 : parentTaskList.type) === taskListType && (grandparent === null || grandparent === void 0 ? void 0 : grandparent.type) === taskListType) {
|
|
615
|
+
tr.setSelection(TextSelection.create(tr.doc, insertPos + 1));
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
return tr;
|
|
605
619
|
}
|
|
606
620
|
}
|
|
607
621
|
/**
|
|
@@ -598,7 +598,19 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
598
598
|
return tr.insert(blockTaskItemNode.pos, newTaskItem);
|
|
599
599
|
}
|
|
600
600
|
// Current position will point to text node, but we want to insert above the taskItem node
|
|
601
|
-
|
|
601
|
+
var insertPos = $from.pos - 1;
|
|
602
|
+
tr.insert(insertPos, newTask);
|
|
603
|
+
// Place cursor on the newly inserted empty task item above
|
|
604
|
+
// when nested inside another taskList.
|
|
605
|
+
if (expValEquals('platform_editor_flexible_list_indentation', 'isEnabled', true)) {
|
|
606
|
+
var taskListType = schema.nodes.taskList;
|
|
607
|
+
var parentTaskList = $from.node($from.depth - 1);
|
|
608
|
+
var grandparent = $from.depth >= 3 ? $from.node($from.depth - 2) : null;
|
|
609
|
+
if ((parentTaskList === null || parentTaskList === void 0 ? void 0 : parentTaskList.type) === taskListType && (grandparent === null || grandparent === void 0 ? void 0 : grandparent.type) === taskListType) {
|
|
610
|
+
tr.setSelection(TextSelection.create(tr.doc, insertPos + 1));
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return tr;
|
|
602
614
|
}
|
|
603
615
|
}
|
|
604
616
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
6
5
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
7
6
|
interface TaskItemNodeViewOptions {
|
|
8
7
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
6
5
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
7
6
|
interface TaskItemNodeViewOptions {
|
|
8
7
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.7",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^18.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
51
51
|
"@atlaskit/task-decision": "^19.3.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^54.1.0",
|
|
53
53
|
"@atlaskit/tokens": "^11.4.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@compiled/react": "^0.20.0",
|
|
56
56
|
"bind-event-listener": "^3.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^112.
|
|
59
|
+
"@atlaskit/editor-common": "^112.16.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|