@atlaskit/editor-plugin-collab-edit 3.1.1 → 3.2.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,17 @@
1
1
  # @atlaskit/editor-plugin-collab-edit
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#120472](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120472)
8
+ [`73c800ab5f2fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73c800ab5f2fc) -
9
+ ED-26766 update adf-schema from 47.2.1 to 47.6.0 and adf-schema-json from 1.27.0 to 1.31.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.1.1
4
16
 
5
17
  ### Patch Changes
@@ -36,7 +36,8 @@ function mergeUnconfirmedSteps(steps, api) {
36
36
  var mergedSteps = steps.reduce(function (acc, rebaseable) {
37
37
  var _api$connectivity;
38
38
  var lastStep = acc[acc.length - 1];
39
- if ((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) === 'offline' && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
39
+ 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) === 'offline';
40
+ if (isOffline && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
40
41
  var mergedStep = lastStep.step.merge(rebaseable.step);
41
42
  var _inverted = rebaseable.inverted.merge(lastStep.inverted);
42
43
  // Always take the origin of the new step.
@@ -45,11 +46,11 @@ function mergeUnconfirmedSteps(steps, api) {
45
46
  // As we want to wait until all the transactions have been pushed through
46
47
  var _origin = lastStep.origin;
47
48
  if (mergedStep && _inverted) {
48
- acc[acc.length - 1] = new LockableRebaseable(mergedStep, _inverted, _origin);
49
+ acc[acc.length - 1] = new LockableRebaseable(mergedStep, _inverted, _origin instanceof _state.Transaction ? _origin.setMeta('isOffline', isOffline) : _origin);
49
50
  return acc;
50
51
  }
51
52
  }
52
- return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin));
53
+ return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin instanceof _state.Transaction ? rebaseable.origin.setMeta('isOffline', isOffline) : rebaseable.origin));
53
54
  }, []);
54
55
  return mergedSteps;
55
56
  }
@@ -28,7 +28,8 @@ export function mergeUnconfirmedSteps(steps, api) {
28
28
  const mergedSteps = steps.reduce((acc, rebaseable) => {
29
29
  var _api$connectivity, _api$connectivity$sha;
30
30
  const lastStep = acc[acc.length - 1];
31
- if ((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) === 'offline' && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
31
+ 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) === 'offline';
32
+ if (isOffline && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
32
33
  const mergedStep = lastStep.step.merge(rebaseable.step);
33
34
  const inverted = rebaseable.inverted.merge(lastStep.inverted);
34
35
  // Always take the origin of the new step.
@@ -37,11 +38,11 @@ export function mergeUnconfirmedSteps(steps, api) {
37
38
  // As we want to wait until all the transactions have been pushed through
38
39
  const origin = lastStep.origin;
39
40
  if (mergedStep && inverted) {
40
- acc[acc.length - 1] = new LockableRebaseable(mergedStep, inverted, origin);
41
+ acc[acc.length - 1] = new LockableRebaseable(mergedStep, inverted, origin instanceof Transaction ? origin.setMeta('isOffline', isOffline) : origin);
41
42
  return acc;
42
43
  }
43
44
  }
44
- return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin));
45
+ return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin instanceof Transaction ? rebaseable.origin.setMeta('isOffline', isOffline) : rebaseable.origin));
45
46
  }, []);
46
47
  return mergedSteps;
47
48
  }
@@ -29,7 +29,8 @@ export function mergeUnconfirmedSteps(steps, api) {
29
29
  var mergedSteps = steps.reduce(function (acc, rebaseable) {
30
30
  var _api$connectivity;
31
31
  var lastStep = acc[acc.length - 1];
32
- if ((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) === 'offline' && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
32
+ 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) === 'offline';
33
+ if (isOffline && lastStep && !isLocked(lastStep) && !isLocked(rebaseable)) {
33
34
  var mergedStep = lastStep.step.merge(rebaseable.step);
34
35
  var _inverted = rebaseable.inverted.merge(lastStep.inverted);
35
36
  // Always take the origin of the new step.
@@ -38,11 +39,11 @@ export function mergeUnconfirmedSteps(steps, api) {
38
39
  // As we want to wait until all the transactions have been pushed through
39
40
  var _origin = lastStep.origin;
40
41
  if (mergedStep && _inverted) {
41
- acc[acc.length - 1] = new LockableRebaseable(mergedStep, _inverted, _origin);
42
+ acc[acc.length - 1] = new LockableRebaseable(mergedStep, _inverted, _origin instanceof Transaction ? _origin.setMeta('isOffline', isOffline) : _origin);
42
43
  return acc;
43
44
  }
44
45
  }
45
- return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin));
46
+ return acc.concat(new LockableRebaseable(rebaseable.step, rebaseable.inverted, rebaseable.origin instanceof Transaction ? rebaseable.origin.setMeta('isOffline', isOffline) : rebaseable.origin));
46
47
  }, []);
47
48
  return mergedSteps;
48
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-collab-edit",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "Collab Edit plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,18 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^47.2.1",
35
- "@atlaskit/custom-steps": "^0.10.0",
36
- "@atlaskit/editor-common": "^100.4.0",
37
- "@atlaskit/editor-json-transformer": "^8.23.0",
38
- "@atlaskit/editor-plugin-analytics": "2.0.0",
34
+ "@atlaskit/adf-schema": "^47.6.0",
35
+ "@atlaskit/custom-steps": "^0.11.0",
36
+ "@atlaskit/editor-common": "^100.5.0",
37
+ "@atlaskit/editor-json-transformer": "^8.24.0",
38
+ "@atlaskit/editor-plugin-analytics": "2.1.0",
39
39
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
41
41
  "@atlaskit/editor-plugin-feature-flags": "^1.3.0",
42
42
  "@atlaskit/editor-prosemirror": "7.0.0",
43
43
  "@atlaskit/editor-shared-styles": "^3.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/prosemirror-collab": "^0.14.0",
45
+ "@atlaskit/prosemirror-collab": "^0.15.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "memoize-one": "^6.0.0"
48
48
  },
@@ -53,11 +53,11 @@
53
53
  "devDependencies": {
54
54
  "@af/integration-testing": "*",
55
55
  "@af/visual-regression": "*",
56
- "@atlaskit/editor-plugin-mentions": "^4.0.0",
57
- "@atlaskit/editor-plugin-text-formatting": "^2.0.0",
58
- "@atlaskit/editor-plugin-type-ahead": "^2.0.0",
59
- "@atlaskit/editor-plugin-unsupported-content": "^2.0.0",
60
- "@atlaskit/editor-test-helpers": "^22.0.0",
56
+ "@atlaskit/editor-plugin-mentions": "^4.1.0",
57
+ "@atlaskit/editor-plugin-text-formatting": "^2.1.0",
58
+ "@atlaskit/editor-plugin-type-ahead": "^2.1.0",
59
+ "@atlaskit/editor-plugin-unsupported-content": "^2.1.0",
60
+ "@atlaskit/editor-test-helpers": "^22.1.0",
61
61
  "@atlaskit/ssr": "*",
62
62
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
63
63
  "@atlaskit/util-data-test": "^18.0.0",