@atlaskit/editor-plugin-tasks-and-decisions 21.0.1 → 21.0.3
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 21.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 21.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`077f0fa90b5c9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/077f0fa90b5c9) -
|
|
14
|
+
Clean up experiment `platform_editor_prevent_taskitem_remount`
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 21.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -135,29 +135,20 @@ var TaskItemNodeView = exports.TaskItemNodeView = /*#__PURE__*/function () {
|
|
|
135
135
|
}, {
|
|
136
136
|
key: "update",
|
|
137
137
|
value: function update(node) {
|
|
138
|
-
if (!(0, _expValEquals.expValEquals)('platform_editor_prevent_taskitem_remount', 'isEnabled', true)) {
|
|
139
|
-
var isValidUpdate = node.type === this.node.type && !!(node.attrs.state === this.node.attrs.state);
|
|
140
|
-
if (!isValidUpdate) {
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
138
|
// Only return false if this is a completely different task
|
|
146
139
|
if (this.node.attrs.localId !== node.attrs.localId) {
|
|
147
140
|
return false;
|
|
148
141
|
}
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var stateChanged = node.type === this.node.type && !!(node.attrs.state !== this.node.attrs.state);
|
|
142
|
+
if (node.type !== this.node.type) {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
var stateChanged = node.attrs.state !== this.node.attrs.state;
|
|
154
146
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
147
|
+
// Update task checkbox state to match document state.
|
|
148
|
+
// It's possible the state may have changed from a collab edit and not from a checkbox click
|
|
149
|
+
// so we need to update the checkbox to match.
|
|
150
|
+
if (stateChanged && this.input) {
|
|
151
|
+
this.input.checked = node.attrs.state === 'DONE';
|
|
161
152
|
}
|
|
162
153
|
this.updatePlaceholder(node);
|
|
163
154
|
if (this.domElement && !node.sameMarkup(this.node)) {
|
|
@@ -119,29 +119,20 @@ export class TaskItemNodeView {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
update(node) {
|
|
122
|
-
if (!expValEquals('platform_editor_prevent_taskitem_remount', 'isEnabled', true)) {
|
|
123
|
-
const isValidUpdate = node.type === this.node.type && !!(node.attrs.state === this.node.attrs.state);
|
|
124
|
-
if (!isValidUpdate) {
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
122
|
// Only return false if this is a completely different task
|
|
130
123
|
if (this.node.attrs.localId !== node.attrs.localId) {
|
|
131
124
|
return false;
|
|
132
125
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const stateChanged = node.type === this.node.type && !!(node.attrs.state !== this.node.attrs.state);
|
|
126
|
+
if (node.type !== this.node.type) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
const stateChanged = node.attrs.state !== this.node.attrs.state;
|
|
138
130
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
131
|
+
// Update task checkbox state to match document state.
|
|
132
|
+
// It's possible the state may have changed from a collab edit and not from a checkbox click
|
|
133
|
+
// so we need to update the checkbox to match.
|
|
134
|
+
if (stateChanged && this.input) {
|
|
135
|
+
this.input.checked = node.attrs.state === 'DONE';
|
|
145
136
|
}
|
|
146
137
|
this.updatePlaceholder(node);
|
|
147
138
|
if (this.domElement && !node.sameMarkup(this.node)) {
|
|
@@ -128,29 +128,20 @@ export var TaskItemNodeView = /*#__PURE__*/function () {
|
|
|
128
128
|
}, {
|
|
129
129
|
key: "update",
|
|
130
130
|
value: function update(node) {
|
|
131
|
-
if (!expValEquals('platform_editor_prevent_taskitem_remount', 'isEnabled', true)) {
|
|
132
|
-
var isValidUpdate = node.type === this.node.type && !!(node.attrs.state === this.node.attrs.state);
|
|
133
|
-
if (!isValidUpdate) {
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
131
|
// Only return false if this is a completely different task
|
|
139
132
|
if (this.node.attrs.localId !== node.attrs.localId) {
|
|
140
133
|
return false;
|
|
141
134
|
}
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var stateChanged = node.type === this.node.type && !!(node.attrs.state !== this.node.attrs.state);
|
|
135
|
+
if (node.type !== this.node.type) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
var stateChanged = node.attrs.state !== this.node.attrs.state;
|
|
147
139
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
140
|
+
// Update task checkbox state to match document state.
|
|
141
|
+
// It's possible the state may have changed from a collab edit and not from a checkbox click
|
|
142
|
+
// so we need to update the checkbox to match.
|
|
143
|
+
if (stateChanged && this.input) {
|
|
144
|
+
this.input.checked = node.attrs.state === 'DONE';
|
|
154
145
|
}
|
|
155
146
|
this.updatePlaceholder(node);
|
|
156
147
|
if (this.domElement && !node.sameMarkup(this.node)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.3",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/primitives": "^22.5.0",
|
|
43
43
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
44
|
-
"@atlaskit/task-decision": "^21.
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
44
|
+
"@atlaskit/task-decision": "^21.10.0",
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^191.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^16.12.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@compiled/react": "^1.0.2",
|
|
49
49
|
"bind-event-listener": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^122.
|
|
52
|
+
"@atlaskit/editor-common": "^122.3.0",
|
|
53
53
|
"react": "^18.2.0 || ^19.2.0",
|
|
54
54
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
55
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|