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