@atlaskit/collab-provider 10.1.0 → 10.1.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 +16 -0
- package/dist/cjs/analytics/analytics-helper.js +1 -1
- package/dist/cjs/document/document-service.js +5 -0
- package/dist/cjs/document/null-document-service.js +5 -0
- package/dist/cjs/provider/index.js +9 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/analytics/analytics-helper.js +1 -1
- package/dist/es2019/document/document-service.js +3 -0
- package/dist/es2019/document/null-document-service.js +3 -0
- package/dist/es2019/provider/index.js +6 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/analytics/analytics-helper.js +1 -1
- package/dist/esm/document/document-service.js +5 -0
- package/dist/esm/document/null-document-service.js +5 -0
- package/dist/esm/provider/index.js +9 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/document/document-service.d.ts +1 -0
- package/dist/types/document/interface-document-service.d.ts +1 -0
- package/dist/types/document/null-document-service.d.ts +1 -0
- package/dist/types/provider/index.d.ts +4 -0
- package/dist/types-ts4.5/document/document-service.d.ts +1 -0
- package/dist/types-ts4.5/document/interface-document-service.d.ts +1 -0
- package/dist/types-ts4.5/document/null-document-service.d.ts +1 -0
- package/dist/types-ts4.5/provider/index.d.ts +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 10.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168141](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168141)
|
|
8
|
+
[`7f239fc40666c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7f239fc40666c) -
|
|
9
|
+
CP getIsNamespaceLocked API
|
|
10
|
+
|
|
11
|
+
## 10.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#168466](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168466)
|
|
16
|
+
[`c99d4b41e3ddd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c99d4b41e3ddd) -
|
|
17
|
+
ED-25632 Allow node nesting transform errors to be logged in Editor collab-provider
|
|
18
|
+
|
|
3
19
|
## 10.1.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ var _customErrors = require("../errors/custom-errors");
|
|
|
17
17
|
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; }
|
|
18
18
|
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) { (0, _defineProperty2.default)(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; }
|
|
19
19
|
var EVENT_SUBJECT = 'collab';
|
|
20
|
-
var loggableErrorName = ['RangeError', 'TypeError', 'TransformError'];
|
|
20
|
+
var loggableErrorName = ['RangeError', 'TypeError', 'TransformError', 'NodeNestingTransformError'];
|
|
21
21
|
var COLLAB_SERVICE = /*#__PURE__*/function (COLLAB_SERVICE) {
|
|
22
22
|
COLLAB_SERVICE["NCS"] = "ncs";
|
|
23
23
|
COLLAB_SERVICE["SYNCHRONY"] = "synchrony";
|
|
@@ -717,6 +717,11 @@ var DocumentService = exports.DocumentService = /*#__PURE__*/function () {
|
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
+
}, {
|
|
721
|
+
key: "getIsNamespaceLocked",
|
|
722
|
+
value: function getIsNamespaceLocked() {
|
|
723
|
+
return this.isNameSpaceLocked();
|
|
724
|
+
}
|
|
720
725
|
}, {
|
|
721
726
|
key: "setup",
|
|
722
727
|
value: function setup(_ref12) {
|
|
@@ -49,6 +49,11 @@ var NullDocumentService = exports.NullDocumentService = /*#__PURE__*/function ()
|
|
|
49
49
|
value: function getFinalAcknowledgedState() {
|
|
50
50
|
return Promise.resolve({});
|
|
51
51
|
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "getIsNamespaceLocked",
|
|
54
|
+
value: function getIsNamespaceLocked() {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
52
57
|
}, {
|
|
53
58
|
key: "getUnconfirmedSteps",
|
|
54
59
|
value: function getUnconfirmedSteps() {
|
|
@@ -616,6 +616,15 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
616
616
|
throw new _customErrors.SetMetadataError('Error while setting metadata', error);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
+
}, {
|
|
620
|
+
key: "getIsNamespaceLocked",
|
|
621
|
+
value:
|
|
622
|
+
/**
|
|
623
|
+
* Returns the namespace locking status via true/false
|
|
624
|
+
*/
|
|
625
|
+
function getIsNamespaceLocked() {
|
|
626
|
+
return this.namespaceService.getIsNamespaceLocked();
|
|
627
|
+
}
|
|
619
628
|
}]);
|
|
620
629
|
return Provider;
|
|
621
630
|
}(_emitter.Emitter);
|
|
@@ -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.1.
|
|
8
|
+
var version = exports.version = "10.1.2";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -3,7 +3,7 @@ import { name as packageName, version as packageVersion } from '../version-wrapp
|
|
|
3
3
|
import { network } from '../connectivity/singleton';
|
|
4
4
|
import { CustomError } from '../errors/custom-errors';
|
|
5
5
|
const EVENT_SUBJECT = 'collab';
|
|
6
|
-
const loggableErrorName = ['RangeError', 'TypeError', 'TransformError'];
|
|
6
|
+
const loggableErrorName = ['RangeError', 'TypeError', 'TransformError', 'NodeNestingTransformError'];
|
|
7
7
|
var COLLAB_SERVICE = /*#__PURE__*/function (COLLAB_SERVICE) {
|
|
8
8
|
COLLAB_SERVICE["NCS"] = "ncs";
|
|
9
9
|
COLLAB_SERVICE["SYNCHRONY"] = "synchrony";
|
|
@@ -543,6 +543,12 @@ export class Provider extends Emitter {
|
|
|
543
543
|
throw new SetMetadataError('Error while setting metadata', error);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
+
/**
|
|
547
|
+
* Returns the namespace locking status via true/false
|
|
548
|
+
*/
|
|
549
|
+
getIsNamespaceLocked() {
|
|
550
|
+
return this.namespaceService.getIsNamespaceLocked();
|
|
551
|
+
}
|
|
546
552
|
}
|
|
547
553
|
|
|
548
554
|
/**
|
|
@@ -10,7 +10,7 @@ import { name as packageName, version as packageVersion } from '../version-wrapp
|
|
|
10
10
|
import { network } from '../connectivity/singleton';
|
|
11
11
|
import { CustomError } from '../errors/custom-errors';
|
|
12
12
|
var EVENT_SUBJECT = 'collab';
|
|
13
|
-
var loggableErrorName = ['RangeError', 'TypeError', 'TransformError'];
|
|
13
|
+
var loggableErrorName = ['RangeError', 'TypeError', 'TransformError', 'NodeNestingTransformError'];
|
|
14
14
|
var COLLAB_SERVICE = /*#__PURE__*/function (COLLAB_SERVICE) {
|
|
15
15
|
COLLAB_SERVICE["NCS"] = "ncs";
|
|
16
16
|
COLLAB_SERVICE["SYNCHRONY"] = "synchrony";
|
|
@@ -710,6 +710,11 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
+
}, {
|
|
714
|
+
key: "getIsNamespaceLocked",
|
|
715
|
+
value: function getIsNamespaceLocked() {
|
|
716
|
+
return this.isNameSpaceLocked();
|
|
717
|
+
}
|
|
713
718
|
}, {
|
|
714
719
|
key: "setup",
|
|
715
720
|
value: function setup(_ref12) {
|
|
@@ -42,6 +42,11 @@ export var NullDocumentService = /*#__PURE__*/function () {
|
|
|
42
42
|
value: function getFinalAcknowledgedState() {
|
|
43
43
|
return Promise.resolve({});
|
|
44
44
|
}
|
|
45
|
+
}, {
|
|
46
|
+
key: "getIsNamespaceLocked",
|
|
47
|
+
value: function getIsNamespaceLocked() {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
45
50
|
}, {
|
|
46
51
|
key: "getUnconfirmedSteps",
|
|
47
52
|
value: function getUnconfirmedSteps() {
|
|
@@ -609,6 +609,15 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
609
609
|
throw new SetMetadataError('Error while setting metadata', error);
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
+
}, {
|
|
613
|
+
key: "getIsNamespaceLocked",
|
|
614
|
+
value:
|
|
615
|
+
/**
|
|
616
|
+
* Returns the namespace locking status via true/false
|
|
617
|
+
*/
|
|
618
|
+
function getIsNamespaceLocked() {
|
|
619
|
+
return this.namespaceService.getIsNamespaceLocked();
|
|
620
|
+
}
|
|
612
621
|
}]);
|
|
613
622
|
return Provider;
|
|
614
623
|
}(Emitter);
|
|
@@ -73,6 +73,7 @@ export declare class DocumentService implements DocumentServiceInterface {
|
|
|
73
73
|
onStepsAdded: (data: StepsPayload) => void;
|
|
74
74
|
onRestore: ({ doc, version, metadata, targetClientId }: CollabInitPayload) => Promise<void>;
|
|
75
75
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
76
|
+
getIsNamespaceLocked(): boolean;
|
|
76
77
|
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
77
78
|
private updateDocumentAnalytics;
|
|
78
79
|
private validatePMJSONDocument;
|
|
@@ -29,6 +29,7 @@ export interface DocumentServiceInterface {
|
|
|
29
29
|
throttledCatchupv2(): void;
|
|
30
30
|
getCurrentState(): Promise<ResolvedEditorState>;
|
|
31
31
|
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
32
|
+
getIsNamespaceLocked(): boolean;
|
|
32
33
|
getUnconfirmedSteps(): readonly ProseMirrorStep[] | undefined;
|
|
33
34
|
getCurrentPmVersion(): number;
|
|
34
35
|
onErrorHandled: (error: InternalError) => void;
|
|
@@ -11,6 +11,7 @@ export declare class NullDocumentService implements DocumentServiceInterface {
|
|
|
11
11
|
throttledCatchupv2(): void;
|
|
12
12
|
getCurrentState(): Promise<ResolvedEditorState>;
|
|
13
13
|
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
14
|
+
getIsNamespaceLocked(): boolean;
|
|
14
15
|
getUnconfirmedSteps(): undefined;
|
|
15
16
|
getCurrentPmVersion(): number;
|
|
16
17
|
onErrorHandled: () => void;
|
|
@@ -153,6 +153,10 @@ export declare class Provider extends Emitter<CollabEvents> implements BaseEvent
|
|
|
153
153
|
* @throws {GetFinalAcknowledgedStateError} Something went wrong while returning the acknowledged state
|
|
154
154
|
*/
|
|
155
155
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the namespace locking status via true/false
|
|
158
|
+
*/
|
|
159
|
+
getIsNamespaceLocked(): boolean;
|
|
156
160
|
getUnconfirmedSteps: () => readonly ProseMirrorStep[] | undefined;
|
|
157
161
|
/**
|
|
158
162
|
* Provides a synchronous method to retreive the version from the Document Service / Editor State
|
|
@@ -73,6 +73,7 @@ export declare class DocumentService implements DocumentServiceInterface {
|
|
|
73
73
|
onStepsAdded: (data: StepsPayload) => void;
|
|
74
74
|
onRestore: ({ doc, version, metadata, targetClientId }: CollabInitPayload) => Promise<void>;
|
|
75
75
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
76
|
+
getIsNamespaceLocked(): boolean;
|
|
76
77
|
updateDocument: ({ doc, version, metadata, reserveCursor }: CollabInitPayload) => void;
|
|
77
78
|
private updateDocumentAnalytics;
|
|
78
79
|
private validatePMJSONDocument;
|
|
@@ -29,6 +29,7 @@ export interface DocumentServiceInterface {
|
|
|
29
29
|
throttledCatchupv2(): void;
|
|
30
30
|
getCurrentState(): Promise<ResolvedEditorState>;
|
|
31
31
|
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
32
|
+
getIsNamespaceLocked(): boolean;
|
|
32
33
|
getUnconfirmedSteps(): readonly ProseMirrorStep[] | undefined;
|
|
33
34
|
getCurrentPmVersion(): number;
|
|
34
35
|
onErrorHandled: (error: InternalError) => void;
|
|
@@ -11,6 +11,7 @@ export declare class NullDocumentService implements DocumentServiceInterface {
|
|
|
11
11
|
throttledCatchupv2(): void;
|
|
12
12
|
getCurrentState(): Promise<ResolvedEditorState>;
|
|
13
13
|
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
14
|
+
getIsNamespaceLocked(): boolean;
|
|
14
15
|
getUnconfirmedSteps(): undefined;
|
|
15
16
|
getCurrentPmVersion(): number;
|
|
16
17
|
onErrorHandled: () => void;
|
|
@@ -153,6 +153,10 @@ export declare class Provider extends Emitter<CollabEvents> implements BaseEvent
|
|
|
153
153
|
* @throws {GetFinalAcknowledgedStateError} Something went wrong while returning the acknowledged state
|
|
154
154
|
*/
|
|
155
155
|
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the namespace locking status via true/false
|
|
158
|
+
*/
|
|
159
|
+
getIsNamespaceLocked(): boolean;
|
|
156
160
|
getUnconfirmedSteps: () => readonly ProseMirrorStep[] | undefined;
|
|
157
161
|
/**
|
|
158
162
|
* Provides a synchronous method to retreive the version from the Document Service / Editor State
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
36
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
37
|
-
"@atlaskit/editor-common": "^95.
|
|
36
|
+
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
37
|
+
"@atlaskit/editor-common": "^95.6.0",
|
|
38
38
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^4.22.0",
|