@atlaskit/editor-plugin-tasks-and-decisions 11.0.3 → 11.1.1
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,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 11.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`71fb8b5aa2558`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71fb8b5aa2558) -
|
|
14
|
+
[FFCLEANUP-79003] clean up feature flag platform_editor_blocktaskitem_patch_2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 11.0.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -606,7 +606,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
606
606
|
var tr = _ref.tr,
|
|
607
607
|
itemLocalId = _ref.itemLocalId;
|
|
608
608
|
// ED-8932: When cursor is at the beginning of a task item, instead of split, we insert above.
|
|
609
|
-
if ($from.pos === $to.pos && $from.parentOffset === 0 && (
|
|
609
|
+
if ($from.pos === $to.pos && $from.parentOffset === 0 && (nodeType !== blockTaskItem || !$from.parent.isTextblock || (0, _helpers.isInFirstTextblockOfBlockTaskItem)(state))) {
|
|
610
610
|
var newTask = nodeType.createAndFill({
|
|
611
611
|
localId: itemLocalId
|
|
612
612
|
});
|
|
@@ -640,7 +640,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
640
640
|
|
|
641
641
|
// If the selection is a gap cursor at the end of the blockTaskItem,
|
|
642
642
|
// we should insert a new taskItem.
|
|
643
|
-
if ((
|
|
643
|
+
if ((!$from.parent.isTextblock || (0, _helpers.isInLastTextblockOfBlockTaskItem)(state)) && $from.parentOffset === $from.parent.nodeSize - 2) {
|
|
644
644
|
var _newTaskItem = taskItem.createAndFill({
|
|
645
645
|
localId: itemLocalId
|
|
646
646
|
});
|
|
@@ -654,7 +654,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
// Split near the depth of the current selection
|
|
657
|
-
return tr.split($from.pos,
|
|
657
|
+
return tr.split($from.pos, $from !== null && $from !== void 0 && (_$from$parent = $from.parent) !== null && _$from$parent !== void 0 && _$from$parent.isTextblock ? 2 : 1, [{
|
|
658
658
|
type: blockTaskItem,
|
|
659
659
|
attrs: {
|
|
660
660
|
localId: itemLocalId
|
|
@@ -596,7 +596,7 @@ const enter = (editorAnalyticsAPI, getContextIdentifier) => filter(isInsideTaskO
|
|
|
596
596
|
itemLocalId
|
|
597
597
|
}) => {
|
|
598
598
|
// ED-8932: When cursor is at the beginning of a task item, instead of split, we insert above.
|
|
599
|
-
if ($from.pos === $to.pos && $from.parentOffset === 0 && (
|
|
599
|
+
if ($from.pos === $to.pos && $from.parentOffset === 0 && (nodeType !== blockTaskItem || !$from.parent.isTextblock || isInFirstTextblockOfBlockTaskItem(state))) {
|
|
600
600
|
const newTask = nodeType.createAndFill({
|
|
601
601
|
localId: itemLocalId
|
|
602
602
|
});
|
|
@@ -630,7 +630,7 @@ const enter = (editorAnalyticsAPI, getContextIdentifier) => filter(isInsideTaskO
|
|
|
630
630
|
|
|
631
631
|
// If the selection is a gap cursor at the end of the blockTaskItem,
|
|
632
632
|
// we should insert a new taskItem.
|
|
633
|
-
if ((
|
|
633
|
+
if ((!$from.parent.isTextblock || isInLastTextblockOfBlockTaskItem(state)) && $from.parentOffset === $from.parent.nodeSize - 2) {
|
|
634
634
|
const newTaskItem = taskItem.createAndFill({
|
|
635
635
|
localId: itemLocalId
|
|
636
636
|
});
|
|
@@ -644,7 +644,7 @@ const enter = (editorAnalyticsAPI, getContextIdentifier) => filter(isInsideTaskO
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
// Split near the depth of the current selection
|
|
647
|
-
return tr.split($from.pos,
|
|
647
|
+
return tr.split($from.pos, $from !== null && $from !== void 0 && (_$from$parent = $from.parent) !== null && _$from$parent !== void 0 && _$from$parent.isTextblock ? 2 : 1, [{
|
|
648
648
|
type: blockTaskItem,
|
|
649
649
|
attrs: {
|
|
650
650
|
localId: itemLocalId
|
|
@@ -598,7 +598,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
598
598
|
var tr = _ref.tr,
|
|
599
599
|
itemLocalId = _ref.itemLocalId;
|
|
600
600
|
// ED-8932: When cursor is at the beginning of a task item, instead of split, we insert above.
|
|
601
|
-
if ($from.pos === $to.pos && $from.parentOffset === 0 && (
|
|
601
|
+
if ($from.pos === $to.pos && $from.parentOffset === 0 && (nodeType !== blockTaskItem || !$from.parent.isTextblock || isInFirstTextblockOfBlockTaskItem(state))) {
|
|
602
602
|
var newTask = nodeType.createAndFill({
|
|
603
603
|
localId: itemLocalId
|
|
604
604
|
});
|
|
@@ -632,7 +632,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
632
632
|
|
|
633
633
|
// If the selection is a gap cursor at the end of the blockTaskItem,
|
|
634
634
|
// we should insert a new taskItem.
|
|
635
|
-
if ((
|
|
635
|
+
if ((!$from.parent.isTextblock || isInLastTextblockOfBlockTaskItem(state)) && $from.parentOffset === $from.parent.nodeSize - 2) {
|
|
636
636
|
var _newTaskItem = taskItem.createAndFill({
|
|
637
637
|
localId: itemLocalId
|
|
638
638
|
});
|
|
@@ -646,7 +646,7 @@ var enter = function enter(editorAnalyticsAPI, getContextIdentifier) {
|
|
|
646
646
|
}
|
|
647
647
|
|
|
648
648
|
// Split near the depth of the current selection
|
|
649
|
-
return tr.split($from.pos,
|
|
649
|
+
return tr.split($from.pos, $from !== null && $from !== void 0 && (_$from$parent = $from.parent) !== null && _$from$parent !== void 0 && _$from$parent.isTextblock ? 2 : 1, [{
|
|
650
650
|
type: blockTaskItem,
|
|
651
651
|
attrs: {
|
|
652
652
|
localId: itemLocalId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.3.0",
|
|
33
33
|
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
34
34
|
"@atlaskit/css": "^0.19.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^8.0.0",
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
46
46
|
"@atlaskit/heading": "^5.3.0",
|
|
47
|
-
"@atlaskit/icon": "^32.
|
|
47
|
+
"@atlaskit/icon": "^32.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^18.0.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": "^39.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^11.1.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.3.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"
|
|
@@ -104,9 +104,6 @@
|
|
|
104
104
|
"platform_editor_element_browser_analytic": {
|
|
105
105
|
"type": "boolean"
|
|
106
106
|
},
|
|
107
|
-
"platform_editor_blocktaskitem_patch_2": {
|
|
108
|
-
"type": "boolean"
|
|
109
|
-
},
|
|
110
107
|
"platform_editor_blocktaskitem_patch_3": {
|
|
111
108
|
"type": "boolean"
|
|
112
109
|
},
|