@atlaskit/editor-synced-block-provider 3.14.5 → 3.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 +19 -0
- package/dist/cjs/clients/block-service/blockSubscription.js +2 -1
- package/dist/cjs/common/types.js +1 -0
- package/dist/es2019/clients/block-service/blockSubscription.js +2 -1
- package/dist/es2019/common/types.js +1 -0
- package/dist/esm/clients/block-service/blockSubscription.js +2 -1
- package/dist/esm/common/types.js +1 -0
- package/dist/types/common/types.d.ts +2 -1
- package/dist/types-ts4.5/common/types.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-provider
|
|
2
2
|
|
|
3
|
+
## 3.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`04b96fcb2ac43`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/04b96fcb2ac43) -
|
|
8
|
+
Use existing function to check if SSR
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 3.14.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`faddbf566c913`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/faddbf566c913) -
|
|
19
|
+
[ux] Add error message in reference sync block when source is unpublished
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 3.14.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.subscribeToBlockUpdates = void 0;
|
|
7
7
|
var _graphqlWs = require("graphql-ws");
|
|
8
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
8
9
|
var _utils = require("../../utils/utils");
|
|
9
10
|
var GRAPHQL_WS_ENDPOINT = '/gateway/api/graphql/subscriptions';
|
|
10
11
|
var blockServiceClient = null;
|
|
11
12
|
var getBlockServiceClient = function getBlockServiceClient() {
|
|
12
13
|
// Don't create client during SSR
|
|
13
|
-
if (
|
|
14
|
+
if ((0, _coreUtils.isSSR)()) {
|
|
14
15
|
return null;
|
|
15
16
|
}
|
|
16
17
|
if (!blockServiceClient) {
|
package/dist/cjs/common/types.js
CHANGED
|
@@ -16,5 +16,6 @@ var SyncBlockError = exports.SyncBlockError = /*#__PURE__*/function (SyncBlockEr
|
|
|
16
16
|
SyncBlockError["InvalidContent"] = "invalid_content";
|
|
17
17
|
// content is not a valid JSON
|
|
18
18
|
SyncBlockError["Offline"] = "offline";
|
|
19
|
+
SyncBlockError["Unpublished"] = "unpublished";
|
|
19
20
|
return SyncBlockError;
|
|
20
21
|
}({});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createClient } from 'graphql-ws';
|
|
2
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
2
3
|
import { convertContentUpdatedAt } from '../../utils/utils';
|
|
3
4
|
const GRAPHQL_WS_ENDPOINT = '/gateway/api/graphql/subscriptions';
|
|
4
5
|
let blockServiceClient = null;
|
|
5
6
|
const getBlockServiceClient = () => {
|
|
6
7
|
// Don't create client during SSR
|
|
7
|
-
if (
|
|
8
|
+
if (isSSR()) {
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
11
|
if (!blockServiceClient) {
|
|
@@ -10,5 +10,6 @@ export let SyncBlockError = /*#__PURE__*/function (SyncBlockError) {
|
|
|
10
10
|
SyncBlockError["InvalidContent"] = "invalid_content";
|
|
11
11
|
// content is not a valid JSON
|
|
12
12
|
SyncBlockError["Offline"] = "offline";
|
|
13
|
+
SyncBlockError["Unpublished"] = "unpublished";
|
|
13
14
|
return SyncBlockError;
|
|
14
15
|
}({});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createClient } from 'graphql-ws';
|
|
2
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
2
3
|
import { convertContentUpdatedAt } from '../../utils/utils';
|
|
3
4
|
var GRAPHQL_WS_ENDPOINT = '/gateway/api/graphql/subscriptions';
|
|
4
5
|
var blockServiceClient = null;
|
|
5
6
|
var getBlockServiceClient = function getBlockServiceClient() {
|
|
6
7
|
// Don't create client during SSR
|
|
7
|
-
if (
|
|
8
|
+
if (isSSR()) {
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
11
|
if (!blockServiceClient) {
|
package/dist/esm/common/types.js
CHANGED
|
@@ -10,5 +10,6 @@ export var SyncBlockError = /*#__PURE__*/function (SyncBlockError) {
|
|
|
10
10
|
SyncBlockError["InvalidContent"] = "invalid_content";
|
|
11
11
|
// content is not a valid JSON
|
|
12
12
|
SyncBlockError["Offline"] = "offline";
|
|
13
|
+
SyncBlockError["Unpublished"] = "unpublished";
|
|
13
14
|
return SyncBlockError;
|
|
14
15
|
}({});
|
|
@@ -24,7 +24,8 @@ export declare enum SyncBlockError {
|
|
|
24
24
|
Conflict = "conflict",// attempt to create block that already exists
|
|
25
25
|
ServerError = "server_error",
|
|
26
26
|
InvalidContent = "invalid_content",// content is not a valid JSON
|
|
27
|
-
Offline = "offline"
|
|
27
|
+
Offline = "offline",
|
|
28
|
+
Unpublished = "unpublished"
|
|
28
29
|
}
|
|
29
30
|
export interface SyncBlockData {
|
|
30
31
|
blockInstanceId: BlockInstanceId;
|
|
@@ -24,7 +24,8 @@ export declare enum SyncBlockError {
|
|
|
24
24
|
Conflict = "conflict",// attempt to create block that already exists
|
|
25
25
|
ServerError = "server_error",
|
|
26
26
|
InvalidContent = "invalid_content",// content is not a valid JSON
|
|
27
|
-
Offline = "offline"
|
|
27
|
+
Offline = "offline",
|
|
28
|
+
Unpublished = "unpublished"
|
|
28
29
|
}
|
|
29
30
|
export interface SyncBlockData {
|
|
30
31
|
blockInstanceId: BlockInstanceId;
|
package/package.json
CHANGED