@atlaskit/editor-plugin-collab-edit 7.2.2 → 8.0.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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`82d57d01a0f61`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/82d57d01a0f61) -
|
|
14
|
+
Distinguish between collab offline and internet offline cases for connectivity mode
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 7.2.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mergeUnconfirmedSteps = mergeUnconfirmedSteps;
|
|
7
|
+
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
7
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
9
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
9
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -28,7 +29,7 @@ function mergeUnconfirmedSteps(steps, api) {
|
|
|
28
29
|
var mergedSteps = steps.reduce(function (acc, rebaseable) {
|
|
29
30
|
var _api$connectivity;
|
|
30
31
|
var lastStep = acc[acc.length - 1];
|
|
31
|
-
var isOffline = (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode)
|
|
32
|
+
var isOffline = (0, _editorPluginConnectivity.isOfflineMode)(api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode);
|
|
32
33
|
var isOnlineMergeEnabled = (0, _expValEquals.expValEquals)('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
|
|
33
34
|
var isMergingEnabled = isOffline || isOnlineMergeEnabled;
|
|
34
35
|
if (isMergingEnabled && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
1
2
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
3
|
import { Rebaseable } from '@atlaskit/prosemirror-collab';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -22,7 +23,7 @@ export function mergeUnconfirmedSteps(steps, api) {
|
|
|
22
23
|
const mergedSteps = steps.reduce((acc, rebaseable) => {
|
|
23
24
|
var _api$connectivity, _api$connectivity$sha;
|
|
24
25
|
const lastStep = acc[acc.length - 1];
|
|
25
|
-
const isOffline = (api === null || api === void 0 ? void 0 : (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : (_api$connectivity$sha = _api$connectivity.sharedState.currentState()) === null || _api$connectivity$sha === void 0 ? void 0 : _api$connectivity$sha.mode)
|
|
26
|
+
const isOffline = isOfflineMode(api === null || api === void 0 ? void 0 : (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : (_api$connectivity$sha = _api$connectivity.sharedState.currentState()) === null || _api$connectivity$sha === void 0 ? void 0 : _api$connectivity$sha.mode);
|
|
26
27
|
const isOnlineMergeEnabled = expValEquals('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
|
|
27
28
|
const isMergingEnabled = isOffline || isOnlineMergeEnabled;
|
|
28
29
|
if (isMergingEnabled && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
1
2
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
3
|
import { Rebaseable } from '@atlaskit/prosemirror-collab';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -22,7 +23,7 @@ export function mergeUnconfirmedSteps(steps, api) {
|
|
|
22
23
|
var mergedSteps = steps.reduce(function (acc, rebaseable) {
|
|
23
24
|
var _api$connectivity;
|
|
24
25
|
var lastStep = acc[acc.length - 1];
|
|
25
|
-
var isOffline = (api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode)
|
|
26
|
+
var isOffline = isOfflineMode(api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 || (_api$connectivity = _api$connectivity.sharedState.currentState()) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.mode);
|
|
26
27
|
var isOnlineMergeEnabled = expValEquals('platform_editor_enable_single_player_step_merging', 'isEnabled', true);
|
|
27
28
|
var isMergingEnabled = isOffline || isOnlineMergeEnabled;
|
|
28
29
|
if (isMergingEnabled && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
31
31
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
32
32
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
34
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
35
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
36
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-connectivity": "^7.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-feature-flags": "^6.0.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
39
39
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
41
|
"@atlaskit/prosemirror-collab": "^0.22.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^16.3.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"memoize-one": "^6.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/editor-common": "^
|
|
47
|
+
"@atlaskit/editor-common": "^111.0.0",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-dom": "^18.2.0"
|
|
50
50
|
},
|