@atlaskit/editor-plugin-collab-edit 1.3.0 → 1.3.2
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,224 +1,309 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#95356](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95356)
|
|
8
|
+
[`33e92aec7cbb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/33e92aec7cbb) -
|
|
9
|
+
MODES-4413: Recursively check for remote transaction due to auto steps added through wrapping
|
|
10
|
+
transaction with appendTransaction
|
|
11
|
+
|
|
12
|
+
## 1.3.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#94901](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94901)
|
|
17
|
+
[`da964fcdc828`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da964fcdc828) -
|
|
18
|
+
[ED-23097] Bump ADF schema to version 35.12.1
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.3.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
6
24
|
|
|
7
|
-
-
|
|
25
|
+
- [#86433](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86433)
|
|
26
|
+
[`88ca3b199a49`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/88ca3b199a49) -
|
|
27
|
+
[ux] EDF-412 Collaborators avatars and telepointer colors are tokenised.
|
|
8
28
|
|
|
9
29
|
### Patch Changes
|
|
10
30
|
|
|
11
|
-
-
|
|
31
|
+
- Updated dependencies
|
|
12
32
|
|
|
13
33
|
## 1.2.1
|
|
14
34
|
|
|
15
35
|
### Patch Changes
|
|
16
36
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
37
|
+
- [#93689](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93689)
|
|
38
|
+
[`5ba5d2b4a9ac`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ba5d2b4a9ac) -
|
|
39
|
+
Updating adf-schema version to 35.10.0
|
|
40
|
+
- Updated dependencies
|
|
19
41
|
|
|
20
42
|
## 1.2.0
|
|
21
43
|
|
|
22
44
|
### Minor Changes
|
|
23
45
|
|
|
24
|
-
-
|
|
46
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
47
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
48
|
+
bumped editor-prosemirror version to 4.0.0
|
|
25
49
|
|
|
26
50
|
### Patch Changes
|
|
27
51
|
|
|
28
|
-
-
|
|
52
|
+
- Updated dependencies
|
|
29
53
|
|
|
30
54
|
## 1.1.14
|
|
31
55
|
|
|
32
56
|
### Patch Changes
|
|
33
57
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
58
|
+
- [#92426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92426)
|
|
59
|
+
[`32c76c7c225c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32c76c7c225c) -
|
|
60
|
+
Bump adf-schema to 35.9.2 to support table alignment options
|
|
61
|
+
- Updated dependencies
|
|
36
62
|
|
|
37
63
|
## 1.1.13
|
|
38
64
|
|
|
39
65
|
### Patch Changes
|
|
40
66
|
|
|
41
|
-
-
|
|
67
|
+
- Updated dependencies
|
|
42
68
|
|
|
43
69
|
## 1.1.12
|
|
44
70
|
|
|
45
71
|
### Patch Changes
|
|
46
72
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
73
|
+
- [#91106](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91106)
|
|
74
|
+
[`b6ffa30186b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6ffa30186b9) -
|
|
75
|
+
Bump ADF-schema package to version 35.0.0
|
|
76
|
+
- Updated dependencies
|
|
49
77
|
|
|
50
78
|
## 1.1.11
|
|
51
79
|
|
|
52
80
|
### Patch Changes
|
|
53
81
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
82
|
+
- [#86724](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86724)
|
|
83
|
+
[`718a9aa2424d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/718a9aa2424d) -
|
|
84
|
+
[ED-22607] Remove references to maxFrames for multi bodied extensions and bump adf-schema from
|
|
85
|
+
35.7.0 to 35.8.0
|
|
86
|
+
- Updated dependencies
|
|
56
87
|
|
|
57
88
|
## 1.1.10
|
|
58
89
|
|
|
59
90
|
### Patch Changes
|
|
60
91
|
|
|
61
|
-
-
|
|
92
|
+
- [#84283](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84283)
|
|
93
|
+
[`fcc12bc22e37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcc12bc22e37) -
|
|
94
|
+
Clean up platform.editor.enable-map-selection-backward FE FF
|
|
62
95
|
|
|
63
96
|
## 1.1.9
|
|
64
97
|
|
|
65
98
|
### Patch Changes
|
|
66
99
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
100
|
+
- [#81777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81777)
|
|
101
|
+
[`c6d7a5378751`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c6d7a5378751) -
|
|
102
|
+
Bump adf-schema to 35.7.0
|
|
103
|
+
- Updated dependencies
|
|
69
104
|
|
|
70
105
|
## 1.1.8
|
|
71
106
|
|
|
72
107
|
### Patch Changes
|
|
73
108
|
|
|
74
|
-
-
|
|
109
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
110
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
111
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
75
112
|
|
|
76
113
|
## 1.1.7
|
|
77
114
|
|
|
78
115
|
### Patch Changes
|
|
79
116
|
|
|
80
|
-
-
|
|
117
|
+
- [#82658](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82658)
|
|
118
|
+
[`9302baf5248c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9302baf5248c) -
|
|
119
|
+
Improve Custom Step registration
|
|
81
120
|
|
|
82
121
|
## 1.1.6
|
|
83
122
|
|
|
84
123
|
### Patch Changes
|
|
85
124
|
|
|
86
|
-
-
|
|
125
|
+
- [#82308](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82308)
|
|
126
|
+
[`26970b6663ae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/26970b6663ae) -
|
|
127
|
+
Register the custom prosemirror within the collab PM plugin
|
|
87
128
|
|
|
88
129
|
## 1.1.5
|
|
89
130
|
|
|
90
131
|
### Patch Changes
|
|
91
132
|
|
|
92
|
-
-
|
|
93
|
-
-
|
|
133
|
+
- [#80679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80679)
|
|
134
|
+
[`104eb9443b7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/104eb9443b7e) -
|
|
135
|
+
ED-22553 Updating adf-schema version to 35.6.0
|
|
136
|
+
- Updated dependencies
|
|
94
137
|
|
|
95
138
|
## 1.1.4
|
|
96
139
|
|
|
97
140
|
### Patch Changes
|
|
98
141
|
|
|
99
|
-
-
|
|
142
|
+
- [#75947](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75947)
|
|
143
|
+
[`43549c3789b1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/43549c3789b1) -
|
|
144
|
+
Migrate @atlaskit/editor-core to use declarative entry points
|
|
100
145
|
|
|
101
146
|
## 1.1.3
|
|
102
147
|
|
|
103
148
|
### Patch Changes
|
|
104
149
|
|
|
105
|
-
-
|
|
150
|
+
- [#79350](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79350)
|
|
151
|
+
[`ba4e64dca012`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba4e64dca012) -
|
|
152
|
+
Add FF to enable mapSelectionBackward to fix the cursor position
|
|
106
153
|
|
|
107
154
|
## 1.1.2
|
|
108
155
|
|
|
109
156
|
### Patch Changes
|
|
110
157
|
|
|
111
|
-
-
|
|
112
|
-
-
|
|
158
|
+
- [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224)
|
|
159
|
+
[`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) -
|
|
160
|
+
ED-22219: adf-schema updated to 35.5.2
|
|
161
|
+
- Updated dependencies
|
|
113
162
|
|
|
114
163
|
## 1.1.1
|
|
115
164
|
|
|
116
165
|
### Patch Changes
|
|
117
166
|
|
|
118
|
-
-
|
|
167
|
+
- [#74185](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/74185)
|
|
168
|
+
[`bdf01577a3b3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bdf01577a3b3) -
|
|
169
|
+
Exclude remote changes from firstContentBodyChange field
|
|
119
170
|
|
|
120
171
|
## 1.1.0
|
|
121
172
|
|
|
122
173
|
### Minor Changes
|
|
123
174
|
|
|
124
|
-
-
|
|
175
|
+
- [#72920](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72920)
|
|
176
|
+
[`8fafb6fc0bc6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8fafb6fc0bc6) -
|
|
177
|
+
Add extra field to collabTrackNCSInitializationPlugin which indicates if the document was
|
|
178
|
+
changed excluding inline comments
|
|
125
179
|
|
|
126
180
|
## 1.0.2
|
|
127
181
|
|
|
128
182
|
### Patch Changes
|
|
129
183
|
|
|
130
|
-
-
|
|
184
|
+
- Updated dependencies
|
|
131
185
|
|
|
132
186
|
## 1.0.1
|
|
133
187
|
|
|
134
188
|
### Patch Changes
|
|
135
189
|
|
|
136
|
-
-
|
|
190
|
+
- Updated dependencies
|
|
137
191
|
|
|
138
192
|
## 1.0.0
|
|
139
193
|
|
|
140
194
|
### Major Changes
|
|
141
195
|
|
|
142
|
-
-
|
|
196
|
+
- [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
|
|
197
|
+
[`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
|
|
198
|
+
This changeset exists to bump all editor plugins that currently don't have a major version. This
|
|
199
|
+
is to address an issue with Jira plugin consumption.
|
|
143
200
|
|
|
144
201
|
### Patch Changes
|
|
145
202
|
|
|
146
|
-
-
|
|
203
|
+
- Updated dependencies
|
|
147
204
|
|
|
148
205
|
## 0.1.12
|
|
149
206
|
|
|
150
207
|
### Patch Changes
|
|
151
208
|
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
209
|
+
- [#69825](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69825)
|
|
210
|
+
[`e2363da4f6a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e2363da4f6a1) -
|
|
211
|
+
[No Issue] Replace View Mode API for annotations
|
|
212
|
+
- [#69825](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69825)
|
|
213
|
+
[`e2363da4f6a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e2363da4f6a1) -
|
|
214
|
+
[No Issue] Replace View Mode API for annotations
|
|
215
|
+
- [#69825](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69825)
|
|
216
|
+
[`e2363da4f6a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e2363da4f6a1) -
|
|
217
|
+
[No Issue] Replace View Mode API for annotations
|
|
155
218
|
|
|
156
219
|
## 0.1.11
|
|
157
220
|
|
|
158
221
|
### Patch Changes
|
|
159
222
|
|
|
160
|
-
-
|
|
223
|
+
- [#72026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72026)
|
|
224
|
+
[`0a0cc061a8a7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0a0cc061a8a7) -
|
|
225
|
+
[No Issue] Improve Confluence Integration tests precision with data-has-collab-initialised
|
|
161
226
|
|
|
162
227
|
## 0.1.10
|
|
163
228
|
|
|
164
229
|
### Patch Changes
|
|
165
230
|
|
|
166
|
-
-
|
|
231
|
+
- [#71133](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71133)
|
|
232
|
+
[`22d7f6ed1f02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/22d7f6ed1f02) -
|
|
233
|
+
revert prosemirror-collab unfork
|
|
167
234
|
|
|
168
235
|
## 0.1.9
|
|
169
236
|
|
|
170
237
|
### Patch Changes
|
|
171
238
|
|
|
172
|
-
-
|
|
173
|
-
-
|
|
239
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
|
|
240
|
+
[`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
|
|
241
|
+
Upgrading @atlaskit/editor-prosemirror dependency
|
|
242
|
+
- Updated dependencies
|
|
174
243
|
|
|
175
244
|
## 0.1.8
|
|
176
245
|
|
|
177
246
|
### Patch Changes
|
|
178
247
|
|
|
179
|
-
-
|
|
180
|
-
-
|
|
248
|
+
- [#70152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70152)
|
|
249
|
+
[`53ed3673df28`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53ed3673df28) -
|
|
250
|
+
Updating adf-schema version to 35.5.1
|
|
251
|
+
- Updated dependencies
|
|
181
252
|
|
|
182
253
|
## 0.1.7
|
|
183
254
|
|
|
184
255
|
### Patch Changes
|
|
185
256
|
|
|
186
|
-
-
|
|
187
|
-
-
|
|
257
|
+
- [#70084](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70084)
|
|
258
|
+
[`4d651eb93ab5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d651eb93ab5) -
|
|
259
|
+
Add editor-plugin-annotation pr and create shared utils for it in editor-test-helpers
|
|
260
|
+
- Updated dependencies
|
|
188
261
|
|
|
189
262
|
## 0.1.6
|
|
190
263
|
|
|
191
264
|
### Patch Changes
|
|
192
265
|
|
|
193
|
-
-
|
|
266
|
+
- Updated dependencies
|
|
194
267
|
|
|
195
268
|
## 0.1.5
|
|
196
269
|
|
|
197
270
|
### Patch Changes
|
|
198
271
|
|
|
199
|
-
-
|
|
272
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238)
|
|
273
|
+
[`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) -
|
|
274
|
+
[ED-21835] Change EditorAPI type to always union with undefined
|
|
200
275
|
|
|
201
276
|
## 0.1.4
|
|
202
277
|
|
|
203
278
|
### Patch Changes
|
|
204
279
|
|
|
205
|
-
-
|
|
206
|
-
|
|
280
|
+
- [#65788](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65788)
|
|
281
|
+
[`be744e423e9f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be744e423e9f) -
|
|
282
|
+
ED-21700 Extraction of avatar group plugin
|
|
283
|
+
- [#67194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67194)
|
|
284
|
+
[`37379761475c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/37379761475c) -
|
|
285
|
+
[ED-21806] Skip changes from NCS and tinted transactions.
|
|
207
286
|
|
|
208
287
|
## 0.1.3
|
|
209
288
|
|
|
210
289
|
### Patch Changes
|
|
211
290
|
|
|
212
|
-
-
|
|
291
|
+
- [#66406](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66406)
|
|
292
|
+
[`10b691d11788`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10b691d11788) -
|
|
293
|
+
[ED-21806] Add collab initialization metadata into shared state
|
|
213
294
|
|
|
214
295
|
## 0.1.2
|
|
215
296
|
|
|
216
297
|
### Patch Changes
|
|
217
298
|
|
|
218
|
-
-
|
|
299
|
+
- [#66119](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66119)
|
|
300
|
+
[`3f87176f284d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f87176f284d) -
|
|
301
|
+
[ED-21806] Refactoring plugin to match NextEditorPlugin standard
|
|
219
302
|
|
|
220
303
|
## 0.1.1
|
|
221
304
|
|
|
222
305
|
### Patch Changes
|
|
223
306
|
|
|
224
|
-
-
|
|
307
|
+
- [#65802](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65802)
|
|
308
|
+
[`438ead060875`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/438ead060875) -
|
|
309
|
+
Ensure all editor plugins are marked as singletons
|
|
@@ -11,6 +11,17 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
13
13
|
var trackNCSInitializationPluginKey = exports.trackNCSInitializationPluginKey = new _state.PluginKey('collabTrackNCSInitializationPlugin');
|
|
14
|
+
var originalTransactionHasMeta = function originalTransactionHasMeta(transaction, metaTag) {
|
|
15
|
+
var hasMetaTag = Boolean(transaction.getMeta(metaTag));
|
|
16
|
+
if (hasMetaTag) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
var appendedTransaction = transaction.getMeta('appendedTransaction');
|
|
20
|
+
if (appendedTransaction instanceof _state.Transaction) {
|
|
21
|
+
return originalTransactionHasMeta(appendedTransaction, metaTag);
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
14
25
|
var createPlugin = exports.createPlugin = function createPlugin() {
|
|
15
26
|
return new _safePlugin.SafePlugin({
|
|
16
27
|
key: trackNCSInitializationPluginKey,
|
|
@@ -34,8 +45,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
|
|
|
34
45
|
if (!shouldCheckDocument) {
|
|
35
46
|
return prevPluginState;
|
|
36
47
|
}
|
|
37
|
-
var isRemote =
|
|
38
|
-
var isDocumentReplaceFromRemote = isRemote &&
|
|
48
|
+
var isRemote = originalTransactionHasMeta(transaction, 'isRemote');
|
|
49
|
+
var isDocumentReplaceFromRemote = isRemote && originalTransactionHasMeta(transaction, 'replaceDocument');
|
|
39
50
|
if (isDocumentReplaceFromRemote) {
|
|
40
51
|
return prevPluginState;
|
|
41
52
|
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import { PluginKey, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
export const trackNCSInitializationPluginKey = new PluginKey('collabTrackNCSInitializationPlugin');
|
|
6
|
+
const originalTransactionHasMeta = (transaction, metaTag) => {
|
|
7
|
+
const hasMetaTag = Boolean(transaction.getMeta(metaTag));
|
|
8
|
+
if (hasMetaTag) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
const appendedTransaction = transaction.getMeta('appendedTransaction');
|
|
12
|
+
if (appendedTransaction instanceof Transaction) {
|
|
13
|
+
return originalTransactionHasMeta(appendedTransaction, metaTag);
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
6
17
|
export const createPlugin = () => {
|
|
7
18
|
return new SafePlugin({
|
|
8
19
|
key: trackNCSInitializationPluginKey,
|
|
@@ -26,8 +37,8 @@ export const createPlugin = () => {
|
|
|
26
37
|
if (!shouldCheckDocument) {
|
|
27
38
|
return prevPluginState;
|
|
28
39
|
}
|
|
29
|
-
const isRemote =
|
|
30
|
-
const isDocumentReplaceFromRemote = isRemote &&
|
|
40
|
+
const isRemote = originalTransactionHasMeta(transaction, 'isRemote');
|
|
41
|
+
const isDocumentReplaceFromRemote = isRemote && originalTransactionHasMeta(transaction, 'replaceDocument');
|
|
31
42
|
if (isDocumentReplaceFromRemote) {
|
|
32
43
|
return prevPluginState;
|
|
33
44
|
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import { PluginKey, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
export var trackNCSInitializationPluginKey = new PluginKey('collabTrackNCSInitializationPlugin');
|
|
7
|
+
var originalTransactionHasMeta = function originalTransactionHasMeta(transaction, metaTag) {
|
|
8
|
+
var hasMetaTag = Boolean(transaction.getMeta(metaTag));
|
|
9
|
+
if (hasMetaTag) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
var appendedTransaction = transaction.getMeta('appendedTransaction');
|
|
13
|
+
if (appendedTransaction instanceof Transaction) {
|
|
14
|
+
return originalTransactionHasMeta(appendedTransaction, metaTag);
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
};
|
|
7
18
|
export var createPlugin = function createPlugin() {
|
|
8
19
|
return new SafePlugin({
|
|
9
20
|
key: trackNCSInitializationPluginKey,
|
|
@@ -27,8 +38,8 @@ export var createPlugin = function createPlugin() {
|
|
|
27
38
|
if (!shouldCheckDocument) {
|
|
28
39
|
return prevPluginState;
|
|
29
40
|
}
|
|
30
|
-
var isRemote =
|
|
31
|
-
var isDocumentReplaceFromRemote = isRemote &&
|
|
41
|
+
var isRemote = originalTransactionHasMeta(transaction, 'isRemote');
|
|
42
|
+
var isDocumentReplaceFromRemote = isRemote && originalTransactionHasMeta(transaction, 'replaceDocument');
|
|
32
43
|
if (isDocumentReplaceFromRemote) {
|
|
33
44
|
return prevPluginState;
|
|
34
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^35.
|
|
35
|
+
"@atlaskit/adf-schema": "^35.12.1",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.1.0",
|
|
37
|
-
"@atlaskit/editor-common": "^78.
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "1.1.
|
|
37
|
+
"@atlaskit/editor-common": "^78.36.0",
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "1.1.2",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "4.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.10.0",
|