@atlaskit/editor-plugin-collab-edit 1.14.1 → 1.15.0
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 +17 -0
- package/dist/cjs/events/send-transaction.js +1 -2
- package/dist/cjs/pm-plugins/track-last-organic-change.js +5 -2
- package/dist/es2019/events/send-transaction.js +1 -2
- package/dist/es2019/pm-plugins/track-last-organic-change.js +6 -3
- package/dist/esm/events/send-transaction.js +1 -2
- package/dist/esm/pm-plugins/track-last-organic-change.js +6 -3
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 1.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#133504](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133504)
|
|
8
|
+
[`024439741fcdc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/024439741fcdc) -
|
|
9
|
+
Replaced usage of `originalTransactionHasMeta` to avoid infinite loop issue
|
|
10
|
+
|
|
11
|
+
## 1.14.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#132735](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/132735)
|
|
16
|
+
[`aeedd1a35ba9f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aeedd1a35ba9f) -
|
|
17
|
+
[ED-23805] Cleanup FF platform.editor.no-telecursors-for-viewmode-users_hok8o
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 1.14.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.sendTransaction = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var _actions = require("../actions");
|
|
9
8
|
var _pluginKey = require("../pm-plugins/main/plugin-key");
|
|
10
9
|
var sendTransaction = exports.sendTransaction = function sendTransaction(_ref) {
|
|
@@ -37,7 +36,7 @@ var sendTransaction = exports.sendTransaction = function sendTransaction(_ref) {
|
|
|
37
36
|
sessionId = currentPluginState.sessionId;
|
|
38
37
|
var selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
|
|
39
38
|
var participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
|
|
40
|
-
if (sessionId &&
|
|
39
|
+
if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged)) {
|
|
41
40
|
var selection = (0, _actions.getSendableSelection)(newEditorState.selection);
|
|
42
41
|
var message = {
|
|
43
42
|
type: 'telepointer',
|
|
@@ -20,8 +20,11 @@ var createPlugin = exports.createPlugin = function createPlugin() {
|
|
|
20
20
|
};
|
|
21
21
|
},
|
|
22
22
|
apply: function apply(transaction, prevPluginState) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (Boolean(transaction.getMeta('appendedTransaction'))) {
|
|
24
|
+
return prevPluginState;
|
|
25
|
+
}
|
|
26
|
+
var isRemote = Boolean(transaction.getMeta('isRemote'));
|
|
27
|
+
var isDocumentReplaceFromRemote = isRemote && Boolean(transaction.getMeta('replaceDocument'));
|
|
25
28
|
if (isDocumentReplaceFromRemote) {
|
|
26
29
|
return prevPluginState;
|
|
27
30
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { getSendableSelection } from '../actions';
|
|
3
2
|
import { pluginKey } from '../pm-plugins/main/plugin-key';
|
|
4
3
|
export const sendTransaction = ({
|
|
@@ -32,7 +31,7 @@ export const sendTransaction = ({
|
|
|
32
31
|
} = currentPluginState;
|
|
33
32
|
const selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
|
|
34
33
|
const participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
|
|
35
|
-
if (sessionId &&
|
|
34
|
+
if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged)) {
|
|
36
35
|
const selection = getSendableSelection(newEditorState.selection);
|
|
37
36
|
const message = {
|
|
38
37
|
type: 'telepointer',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { isOrganicChange
|
|
4
|
+
import { isOrganicChange } from '../utils';
|
|
5
5
|
export const trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
|
|
6
6
|
export const createPlugin = () => {
|
|
7
7
|
return new SafePlugin({
|
|
@@ -14,8 +14,11 @@ export const createPlugin = () => {
|
|
|
14
14
|
};
|
|
15
15
|
},
|
|
16
16
|
apply(transaction, prevPluginState) {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
if (Boolean(transaction.getMeta('appendedTransaction'))) {
|
|
18
|
+
return prevPluginState;
|
|
19
|
+
}
|
|
20
|
+
const isRemote = Boolean(transaction.getMeta('isRemote'));
|
|
21
|
+
const isDocumentReplaceFromRemote = isRemote && Boolean(transaction.getMeta('replaceDocument'));
|
|
19
22
|
if (isDocumentReplaceFromRemote) {
|
|
20
23
|
return prevPluginState;
|
|
21
24
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { getSendableSelection } from '../actions';
|
|
3
2
|
import { pluginKey } from '../pm-plugins/main/plugin-key';
|
|
4
3
|
export var sendTransaction = function sendTransaction(_ref) {
|
|
@@ -31,7 +30,7 @@ export var sendTransaction = function sendTransaction(_ref) {
|
|
|
31
30
|
sessionId = currentPluginState.sessionId;
|
|
32
31
|
var selectionChanged = !oldEditorState.selection.eq(newEditorState.selection);
|
|
33
32
|
var participantsChanged = prevActiveParticipants && !prevActiveParticipants.eq(activeParticipants);
|
|
34
|
-
if (sessionId &&
|
|
33
|
+
if (sessionId && viewMode === 'edit' && (selectionChanged && !docChangedTransaction || participantsChanged)) {
|
|
35
34
|
var selection = getSendableSelection(newEditorState.selection);
|
|
36
35
|
var message = {
|
|
37
36
|
type: 'telepointer',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { isOrganicChange
|
|
4
|
+
import { isOrganicChange } from '../utils';
|
|
5
5
|
export var trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
|
|
6
6
|
export var createPlugin = function createPlugin() {
|
|
7
7
|
return new SafePlugin({
|
|
@@ -14,8 +14,11 @@ export var createPlugin = function createPlugin() {
|
|
|
14
14
|
};
|
|
15
15
|
},
|
|
16
16
|
apply: function apply(transaction, prevPluginState) {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
if (Boolean(transaction.getMeta('appendedTransaction'))) {
|
|
18
|
+
return prevPluginState;
|
|
19
|
+
}
|
|
20
|
+
var isRemote = Boolean(transaction.getMeta('isRemote'));
|
|
21
|
+
var isDocumentReplaceFromRemote = isRemote && Boolean(transaction.getMeta('replaceDocument'));
|
|
19
22
|
if (isDocumentReplaceFromRemote) {
|
|
20
23
|
return prevPluginState;
|
|
21
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^40.8.1",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.7.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "1.8.
|
|
37
|
+
"@atlaskit/editor-common": "^88.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "1.8.1",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@af/integration-testing": "*",
|
|
53
53
|
"@af/visual-regression": "*",
|
|
54
|
-
"@atlaskit/editor-plugin-mentions": "^2.
|
|
55
|
-
"@atlaskit/editor-plugin-text-formatting": "^1.
|
|
54
|
+
"@atlaskit/editor-plugin-mentions": "^2.5.0",
|
|
55
|
+
"@atlaskit/editor-plugin-text-formatting": "^1.14.0",
|
|
56
56
|
"@atlaskit/editor-plugin-type-ahead": "^1.8.0",
|
|
57
57
|
"@atlaskit/editor-plugin-unsupported-content": "^1.8.0",
|
|
58
58
|
"@atlaskit/editor-test-helpers": "^18.31.0",
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"platform-feature-flags": {
|
|
103
|
-
"platform.editor.no-telecursors-for-viewmode-users_hok8o": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_last_organic_change": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
}
|