@atlaskit/editor-plugin-tasks-and-decisions 11.3.2 → 11.3.4
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 +16 -0
- package/dist/cjs/pm-plugins/actions/move-selected-task-list-items.js +8 -4
- package/dist/cjs/pm-plugins/task-list-indentation.js +9 -9
- package/dist/es2019/pm-plugins/actions/move-selected-task-list-items.js +9 -5
- package/dist/es2019/pm-plugins/task-list-indentation.js +9 -9
- package/dist/esm/pm-plugins/actions/move-selected-task-list-items.js +9 -5
- package/dist/esm/pm-plugins/task-list-indentation.js +9 -9
- package/dist/types/nodeviews/DecisionItemNodeView.d.ts +3 -3
- package/dist/types/nodeviews/TaskItemNodeView.d.ts +2 -2
- package/dist/types/nodeviews/decisionItemNodeSpec.d.ts +2 -2
- package/dist/types/nodeviews/task-node-view.d.ts +1 -1
- package/dist/types/nodeviews/taskItemNodeSpec.d.ts +1 -1
- package/dist/types/pm-plugins/commands.d.ts +1 -1
- package/dist/types/pm-plugins/helpers.d.ts +2 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/pm-plugins/task-list-indentation.d.ts +1 -1
- package/dist/types/pm-plugins/utils/paste.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Task/RequestToEditPopup.d.ts +1 -1
- package/dist/types/ui/Task/index.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/DecisionItemNodeView.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/TaskItemNodeView.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/decisionItemNodeSpec.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/task-node-view.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/taskItemNodeSpec.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/helpers.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/task-list-indentation.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/paste.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Task/RequestToEditPopup.d.ts +1 -1
- package/dist/types-ts4.5/ui/Task/index.d.ts +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 11.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`86fd5ef0f1d07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/86fd5ef0f1d07) -
|
|
8
|
+
Mechanical type-import autofix for text formatting editor plugins.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.3.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`9b33b26d69865`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b33b26d69865) -
|
|
16
|
+
Narrow list replacement range during indent/outdent for collab-friendly cursor preservation
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 11.3.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -47,7 +47,7 @@ function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
47
47
|
// taskItem has inline content, so wrap in a paragraph.
|
|
48
48
|
// blockTaskItem already has paragraph children.
|
|
49
49
|
var blockTaskItem = s.nodes.blockTaskItem;
|
|
50
|
-
if (blockTaskItem
|
|
50
|
+
if (!!blockTaskItem && item.node.type === blockTaskItem) {
|
|
51
51
|
// blockTaskItem children are already paragraphs/extensions
|
|
52
52
|
var children = [];
|
|
53
53
|
item.node.forEach(function (child) {
|
|
@@ -64,15 +64,19 @@ function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
64
64
|
if (fragment.size === 0) {
|
|
65
65
|
return null;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
// Narrow the replacement to the minimal changed range for collab-friendly
|
|
69
|
+
// cursor preservation on unaffected list items.
|
|
70
|
+
var narrowed = (0, _lists.narrowReplacementRange)(tr.doc, rootListStart, rootListEnd, fragment, contentStartOffsets);
|
|
71
|
+
tr.replaceWith(narrowed.start, narrowed.end, narrowed.fragment);
|
|
68
72
|
var _computeSelectionOffs = (0, _lists.computeSelectionOffsets)({
|
|
69
73
|
items: flattenedItems,
|
|
70
74
|
startIndex: startIndex,
|
|
71
75
|
endIndex: endIndex,
|
|
72
76
|
originalFrom: $from.pos,
|
|
73
77
|
originalTo: $to.pos,
|
|
74
|
-
contentStartOffsets:
|
|
75
|
-
rootListStart:
|
|
78
|
+
contentStartOffsets: narrowed.adjustedContentStartOffsets,
|
|
79
|
+
rootListStart: narrowed.start,
|
|
76
80
|
docSize: tr.doc.content.size
|
|
77
81
|
}),
|
|
78
82
|
from = _computeSelectionOffs.from,
|
|
@@ -38,6 +38,15 @@ function flattenTaskList(options) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// Each stack entry collects children for a taskList at a given depth.
|
|
42
|
+
// The root entry (depth -1) is special: its children become the content
|
|
43
|
+
// of the outermost taskList directly (not wrapped in another taskList).
|
|
44
|
+
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
45
|
+
// listAttrs preserves the original parent's attributes when available.
|
|
46
|
+
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
47
|
+
// in this entry, used to decide whether consecutive same-depth items
|
|
48
|
+
// should share a wrapper or be separated.
|
|
49
|
+
|
|
41
50
|
/**
|
|
42
51
|
* Rebuilds a taskList tree from a flattened array of task items.
|
|
43
52
|
* Uses a stack-based approach to create proper nesting.
|
|
@@ -69,15 +78,6 @@ function rebuildTaskList(items, schema) {
|
|
|
69
78
|
return null;
|
|
70
79
|
}
|
|
71
80
|
|
|
72
|
-
// Each stack entry collects children for a taskList at a given depth.
|
|
73
|
-
// The root entry (depth -1) is special: its children become the content
|
|
74
|
-
// of the outermost taskList directly (not wrapped in another taskList).
|
|
75
|
-
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
76
|
-
// listAttrs preserves the original parent's attributes when available.
|
|
77
|
-
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
78
|
-
// in this entry, used to decide whether consecutive same-depth items
|
|
79
|
-
// should share a wrapper or be separated.
|
|
80
|
-
|
|
81
81
|
// Start with the root level (depth -1 represents the root taskList wrapper)
|
|
82
82
|
var stack = [{
|
|
83
83
|
depth: -1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildReplacementFragment, computeSelectionOffsets, restoreSelection } from '@atlaskit/editor-common/lists';
|
|
1
|
+
import { buildReplacementFragment, computeSelectionOffsets, narrowReplacementRange, restoreSelection } from '@atlaskit/editor-common/lists';
|
|
2
2
|
import { findFarthestParentNode } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { flattenTaskList, rebuildTaskList } from '../task-list-indentation';
|
|
4
4
|
const MAX_TASK_LIST_DEPTH = 6;
|
|
@@ -54,7 +54,7 @@ export function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
54
54
|
const {
|
|
55
55
|
blockTaskItem
|
|
56
56
|
} = s.nodes;
|
|
57
|
-
if (blockTaskItem
|
|
57
|
+
if (!!blockTaskItem && item.node.type === blockTaskItem) {
|
|
58
58
|
// blockTaskItem children are already paragraphs/extensions
|
|
59
59
|
const children = [];
|
|
60
60
|
item.node.forEach(child => children.push(child));
|
|
@@ -67,7 +67,11 @@ export function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
67
67
|
if (fragment.size === 0) {
|
|
68
68
|
return null;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
// Narrow the replacement to the minimal changed range for collab-friendly
|
|
72
|
+
// cursor preservation on unaffected list items.
|
|
73
|
+
const narrowed = narrowReplacementRange(tr.doc, rootListStart, rootListEnd, fragment, contentStartOffsets);
|
|
74
|
+
tr.replaceWith(narrowed.start, narrowed.end, narrowed.fragment);
|
|
71
75
|
const {
|
|
72
76
|
from,
|
|
73
77
|
to
|
|
@@ -77,8 +81,8 @@ export function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
77
81
|
endIndex,
|
|
78
82
|
originalFrom: $from.pos,
|
|
79
83
|
originalTo: $to.pos,
|
|
80
|
-
contentStartOffsets,
|
|
81
|
-
rootListStart,
|
|
84
|
+
contentStartOffsets: narrowed.adjustedContentStartOffsets,
|
|
85
|
+
rootListStart: narrowed.start,
|
|
82
86
|
docSize: tr.doc.content.size
|
|
83
87
|
});
|
|
84
88
|
restoreSelection({
|
|
@@ -25,6 +25,15 @@ export function flattenTaskList(options) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// Each stack entry collects children for a taskList at a given depth.
|
|
29
|
+
// The root entry (depth -1) is special: its children become the content
|
|
30
|
+
// of the outermost taskList directly (not wrapped in another taskList).
|
|
31
|
+
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
32
|
+
// listAttrs preserves the original parent's attributes when available.
|
|
33
|
+
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
34
|
+
// in this entry, used to decide whether consecutive same-depth items
|
|
35
|
+
// should share a wrapper or be separated.
|
|
36
|
+
|
|
28
37
|
/**
|
|
29
38
|
* Rebuilds a taskList tree from a flattened array of task items.
|
|
30
39
|
* Uses a stack-based approach to create proper nesting.
|
|
@@ -58,15 +67,6 @@ export function rebuildTaskList(items, schema) {
|
|
|
58
67
|
return null;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
// Each stack entry collects children for a taskList at a given depth.
|
|
62
|
-
// The root entry (depth -1) is special: its children become the content
|
|
63
|
-
// of the outermost taskList directly (not wrapped in another taskList).
|
|
64
|
-
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
65
|
-
// listAttrs preserves the original parent's attributes when available.
|
|
66
|
-
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
67
|
-
// in this entry, used to decide whether consecutive same-depth items
|
|
68
|
-
// should share a wrapper or be separated.
|
|
69
|
-
|
|
70
70
|
// Start with the root level (depth -1 represents the root taskList wrapper)
|
|
71
71
|
const stack = [{
|
|
72
72
|
depth: -1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildReplacementFragment, computeSelectionOffsets, restoreSelection } from '@atlaskit/editor-common/lists';
|
|
1
|
+
import { buildReplacementFragment, computeSelectionOffsets, narrowReplacementRange, restoreSelection } from '@atlaskit/editor-common/lists';
|
|
2
2
|
import { findFarthestParentNode } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { flattenTaskList, rebuildTaskList } from '../task-list-indentation';
|
|
4
4
|
var MAX_TASK_LIST_DEPTH = 6;
|
|
@@ -41,7 +41,7 @@ export function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
41
41
|
// taskItem has inline content, so wrap in a paragraph.
|
|
42
42
|
// blockTaskItem already has paragraph children.
|
|
43
43
|
var blockTaskItem = s.nodes.blockTaskItem;
|
|
44
|
-
if (blockTaskItem
|
|
44
|
+
if (!!blockTaskItem && item.node.type === blockTaskItem) {
|
|
45
45
|
// blockTaskItem children are already paragraphs/extensions
|
|
46
46
|
var children = [];
|
|
47
47
|
item.node.forEach(function (child) {
|
|
@@ -58,15 +58,19 @@ export function moveSelectedTaskListItems(tr, indentDelta) {
|
|
|
58
58
|
if (fragment.size === 0) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
|
+
// Narrow the replacement to the minimal changed range for collab-friendly
|
|
63
|
+
// cursor preservation on unaffected list items.
|
|
64
|
+
var narrowed = narrowReplacementRange(tr.doc, rootListStart, rootListEnd, fragment, contentStartOffsets);
|
|
65
|
+
tr.replaceWith(narrowed.start, narrowed.end, narrowed.fragment);
|
|
62
66
|
var _computeSelectionOffs = computeSelectionOffsets({
|
|
63
67
|
items: flattenedItems,
|
|
64
68
|
startIndex: startIndex,
|
|
65
69
|
endIndex: endIndex,
|
|
66
70
|
originalFrom: $from.pos,
|
|
67
71
|
originalTo: $to.pos,
|
|
68
|
-
contentStartOffsets:
|
|
69
|
-
rootListStart:
|
|
72
|
+
contentStartOffsets: narrowed.adjustedContentStartOffsets,
|
|
73
|
+
rootListStart: narrowed.start,
|
|
70
74
|
docSize: tr.doc.content.size
|
|
71
75
|
}),
|
|
72
76
|
from = _computeSelectionOffs.from,
|
|
@@ -31,6 +31,15 @@ export function flattenTaskList(options) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
// Each stack entry collects children for a taskList at a given depth.
|
|
35
|
+
// The root entry (depth -1) is special: its children become the content
|
|
36
|
+
// of the outermost taskList directly (not wrapped in another taskList).
|
|
37
|
+
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
38
|
+
// listAttrs preserves the original parent's attributes when available.
|
|
39
|
+
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
40
|
+
// in this entry, used to decide whether consecutive same-depth items
|
|
41
|
+
// should share a wrapper or be separated.
|
|
42
|
+
|
|
34
43
|
/**
|
|
35
44
|
* Rebuilds a taskList tree from a flattened array of task items.
|
|
36
45
|
* Uses a stack-based approach to create proper nesting.
|
|
@@ -62,15 +71,6 @@ export function rebuildTaskList(items, schema) {
|
|
|
62
71
|
return null;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
|
-
// Each stack entry collects children for a taskList at a given depth.
|
|
66
|
-
// The root entry (depth -1) is special: its children become the content
|
|
67
|
-
// of the outermost taskList directly (not wrapped in another taskList).
|
|
68
|
-
// Entries at depth >= 0 each produce a nested taskList when popped.
|
|
69
|
-
// listAttrs preserves the original parent's attributes when available.
|
|
70
|
-
// sourceParentAttrs tracks the original parent taskList attrs of the items
|
|
71
|
-
// in this entry, used to decide whether consecutive same-depth items
|
|
72
|
-
// should share a wrapper or be separated.
|
|
73
|
-
|
|
74
74
|
// Start with the root level (depth -1 represents the root taskList wrapper)
|
|
75
75
|
var stack = [{
|
|
76
76
|
depth: -1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
/**
|
|
5
5
|
* NodeView for the DecisionItem node.
|
|
6
6
|
* It renders the decision item with its content and exposes the contentDOM to prosemirror.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
7
7
|
interface TaskItemNodeViewOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
export declare const decisionItemToDOM: (node: PMNode, intl: IntlShape) => [string, {
|
|
4
4
|
class: string;
|
|
5
5
|
"data-decision-local-id": any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Wrapper for ADF taskItem node spec to augment toDOM implementation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
export declare const liftSelection: Command;
|
|
4
4
|
/**
|
|
5
5
|
* Wraps the current selection in a task list, respecting a maximum indentation depth of 6 levels.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NodeRange
|
|
1
|
+
import { NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Node, NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
import type { TaskItemData } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import {
|
|
3
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FlattenedItem, FlattenListOptions, FlattenListResult } from '@atlaskit/editor-common/lists';
|
|
2
2
|
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Flattens a taskList tree into an array of task items with computed depths.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import {
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
/**
|
|
4
4
|
* Transforms a paste slice to handle blockTaskItem nodes when pasting into task items.
|
|
5
5
|
*
|
|
@@ -4,7 +4,7 @@ import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider
|
|
|
4
4
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import {
|
|
7
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
9
9
|
export type TaskDecisionListType = 'taskList' | 'decisionList';
|
|
10
10
|
export type TaskDecisionInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.ELEMENT_BROWSER;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import {
|
|
8
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
10
10
|
interface Props {
|
|
11
11
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
@@ -2,10 +2,10 @@ import type { ReactElement, Ref } from 'react';
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { ContentRef } from '@atlaskit/task-decision';
|
|
7
7
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
8
|
-
import {
|
|
8
|
+
import type { TaskAndDecisionsSharedState } from '../../types';
|
|
9
9
|
export interface TaskProps {
|
|
10
10
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
11
11
|
children?: ReactElement<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
/**
|
|
5
5
|
* NodeView for the DecisionItem node.
|
|
6
6
|
* It renders the decision item with its content and exposes the contentDOM to prosemirror.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
7
7
|
interface TaskItemNodeViewOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
export declare const decisionItemToDOM: (node: PMNode, intl: IntlShape) => [
|
|
4
4
|
string,
|
|
5
5
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Wrapper for ADF taskItem node spec to augment toDOM implementation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
export declare const liftSelection: Command;
|
|
4
4
|
/**
|
|
5
5
|
* Wraps the current selection in a task list, respecting a maximum indentation depth of 6 levels.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NodeRange
|
|
1
|
+
import { NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Node, NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
import type { TaskItemData } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import {
|
|
3
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FlattenedItem, FlattenListOptions, FlattenListResult } from '@atlaskit/editor-common/lists';
|
|
2
2
|
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
/**
|
|
4
4
|
* Flattens a taskList tree into an array of task items with computed depths.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import {
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
/**
|
|
4
4
|
* Transforms a paste slice to handle blockTaskItem nodes when pasting into task items.
|
|
5
5
|
*
|
|
@@ -4,7 +4,7 @@ import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider
|
|
|
4
4
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import {
|
|
7
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
9
9
|
export type TaskDecisionListType = 'taskList' | 'decisionList';
|
|
10
10
|
export type TaskDecisionInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.ELEMENT_BROWSER;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import {
|
|
8
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
10
10
|
interface Props {
|
|
11
11
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
@@ -2,10 +2,10 @@ import type { ReactElement, Ref } from 'react';
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { ContentRef } from '@atlaskit/task-decision';
|
|
7
7
|
import type { TasksAndDecisionsPlugin } from '../../tasksAndDecisionsPluginType';
|
|
8
|
-
import {
|
|
8
|
+
import type { TaskAndDecisionsSharedState } from '../../types';
|
|
9
9
|
export interface TaskProps {
|
|
10
10
|
api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined;
|
|
11
11
|
children?: ReactElement<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.4",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"@atlaskit/heading": "^5.3.0",
|
|
47
47
|
"@atlaskit/icon": "^33.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/primitives": "^18.
|
|
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": "^
|
|
53
|
-
"@atlaskit/tokens": "^11.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^46.0.0",
|
|
53
|
+
"@atlaskit/tokens": "^11.2.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.9.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"
|