@atlaskit/collab-provider 10.14.0 → 10.14.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 +15 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/dist/cjs/document/document-service.js +4 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/document/document-service.js +4 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/document/document-service.js +4 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +5 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 10.14.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.14.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#140813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140813)
|
|
14
|
+
[`c4756a5c1a4ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4756a5c1a4ae) -
|
|
15
|
+
Migrating offline editing feature gates to a new experiment "platform_editor_offline_editing_web"
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 10.14.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -11,11 +11,11 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
15
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
17
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
17
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
18
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
19
|
var _const = require("../helpers/const");
|
|
20
20
|
var _performance = require("../analytics/performance");
|
|
21
21
|
var _internalErrors = require("../errors/internal-errors");
|
|
@@ -764,7 +764,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
764
764
|
*/
|
|
765
765
|
function notifyReconnectionConflict(steps) {
|
|
766
766
|
var _this$getState7, _getCollabState;
|
|
767
|
-
if (
|
|
767
|
+
if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', false)) {
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
770
|
var state = (_this$getState7 = this.getState) === null || _this$getState7 === void 0 ? void 0 : _this$getState7.call(this);
|
|
@@ -902,7 +902,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
902
902
|
var version = this.getVersionFromCollabState(newState, 'collab-provider: send');
|
|
903
903
|
|
|
904
904
|
// Don't send any steps before we're ready.
|
|
905
|
-
if ((0,
|
|
905
|
+
if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
|
|
906
906
|
if (!unconfirmedStepsData || !this.getConnected()) {
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
@@ -945,7 +945,7 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
945
945
|
// If we are going to commit unconfirmed steps
|
|
946
946
|
// we need to lock them to ensure they don't get
|
|
947
947
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
948
|
-
if ((0,
|
|
948
|
+
if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
|
|
949
949
|
unconfirmedStepsData.origins.forEach(function (origin) {
|
|
950
950
|
if (origin instanceof _state.Transaction) {
|
|
951
951
|
return origin.setMeta('mergeIsLocked', true);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/collab-provider";
|
|
8
|
-
var version = exports.version = "10.14.
|
|
8
|
+
var version = exports.version = "10.14.2";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import throttle from 'lodash/throttle';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
4
|
import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
6
5
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
6
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
|
|
9
9
|
import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
|
|
10
10
|
import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
|
|
@@ -651,7 +651,7 @@ export class DocumentService {
|
|
|
651
651
|
*/
|
|
652
652
|
notifyReconnectionConflict(steps) {
|
|
653
653
|
var _this$getState7, _getCollabState;
|
|
654
|
-
if (
|
|
654
|
+
if (editorExperiment('platform_editor_offline_editing_web', false)) {
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
657
657
|
const state = (_this$getState7 = this.getState) === null || _this$getState7 === void 0 ? void 0 : _this$getState7.call(this);
|
|
@@ -776,7 +776,7 @@ export class DocumentService {
|
|
|
776
776
|
const version = this.getVersionFromCollabState(newState, 'collab-provider: send');
|
|
777
777
|
|
|
778
778
|
// Don't send any steps before we're ready.
|
|
779
|
-
if (
|
|
779
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
780
780
|
if (!unconfirmedStepsData || !this.getConnected()) {
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
@@ -819,7 +819,7 @@ export class DocumentService {
|
|
|
819
819
|
// If we are going to commit unconfirmed steps
|
|
820
820
|
// we need to lock them to ensure they don't get
|
|
821
821
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
822
|
-
if (
|
|
822
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
823
823
|
unconfirmedStepsData.origins.forEach(origin => {
|
|
824
824
|
if (origin instanceof Transaction) {
|
|
825
825
|
return origin.setMeta('mergeIsLocked', true);
|
|
@@ -6,11 +6,11 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import throttle from 'lodash/throttle';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
|
|
11
10
|
import { getCollabState, sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
12
11
|
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
13
12
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
14
|
import { ACK_MAX_TRY, EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
|
|
15
15
|
import { MEASURE_NAME, startMeasure, stopMeasure } from '../analytics/performance';
|
|
16
16
|
import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
|
|
@@ -757,7 +757,7 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
757
757
|
*/
|
|
758
758
|
function notifyReconnectionConflict(steps) {
|
|
759
759
|
var _this$getState7, _getCollabState;
|
|
760
|
-
if (
|
|
760
|
+
if (editorExperiment('platform_editor_offline_editing_web', false)) {
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
763
|
var state = (_this$getState7 = this.getState) === null || _this$getState7 === void 0 ? void 0 : _this$getState7.call(this);
|
|
@@ -895,7 +895,7 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
895
895
|
var version = this.getVersionFromCollabState(newState, 'collab-provider: send');
|
|
896
896
|
|
|
897
897
|
// Don't send any steps before we're ready.
|
|
898
|
-
if (
|
|
898
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
899
899
|
if (!unconfirmedStepsData || !this.getConnected()) {
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
@@ -938,7 +938,7 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
938
938
|
// If we are going to commit unconfirmed steps
|
|
939
939
|
// we need to lock them to ensure they don't get
|
|
940
940
|
// mutated in: `packages/editor/editor-plugin-collab-edit/src/pm-plugins/mergeUnconfirmed.ts`
|
|
941
|
-
if (
|
|
941
|
+
if (editorExperiment('platform_editor_offline_editing_web', true)) {
|
|
942
942
|
unconfirmedStepsData.origins.forEach(function (origin) {
|
|
943
943
|
if (origin instanceof Transaction) {
|
|
944
944
|
return origin.setMeta('mergeIsLocked', true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "10.14.
|
|
3
|
+
"version": "10.14.2",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,13 +35,14 @@
|
|
|
35
35
|
"@atlaskit/adf-utils": "^19.19.0",
|
|
36
36
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
37
37
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
38
|
+
"@atlaskit/editor-common": "^104.0.0",
|
|
39
39
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
|
-
"@atlaskit/feature-gate-js-client": "^5.
|
|
41
|
+
"@atlaskit/feature-gate-js-client": "^5.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
43
|
"@atlaskit/prosemirror-collab": "^0.16.0",
|
|
44
|
-
"@atlaskit/react-ufo": "^3.
|
|
44
|
+
"@atlaskit/react-ufo": "^3.9.0",
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
45
46
|
"@atlaskit/ufo": "^0.4.0",
|
|
46
47
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
47
48
|
"@babel/runtime": "^7.0.0",
|
|
@@ -74,12 +75,6 @@
|
|
|
74
75
|
"platform.editor.live-pages-expand-divergence": {
|
|
75
76
|
"type": "boolean"
|
|
76
77
|
},
|
|
77
|
-
"platform_editor_merge_unconfirmed_steps": {
|
|
78
|
-
"type": "boolean"
|
|
79
|
-
},
|
|
80
|
-
"platform_editor_offline_conflict_resolution": {
|
|
81
|
-
"type": "boolean"
|
|
82
|
-
},
|
|
83
78
|
"platform_collab_provider_tracingheaders": {
|
|
84
79
|
"type": "boolean"
|
|
85
80
|
},
|