@atlaskit/editor-synced-block-renderer 5.3.2 → 5.4.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 +11 -0
- package/dist/cjs/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/cjs/ui/SyncedBlockRenderer.js +3 -3
- package/dist/es2019/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/es2019/ui/SyncedBlockRenderer.js +3 -3
- package/dist/esm/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/esm/ui/SyncedBlockRenderer.js +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 5.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`870c3baec758b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/870c3baec758b) -
|
|
8
|
+
Enable consumers to use GraphQL subscription for fetching the block data when the block changes
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 5.3.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
12
12
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _AKRendererWrapper = require("./AKRendererWrapper");
|
|
14
15
|
var _SyncedBlockErrorComponent = require("./SyncedBlockErrorComponent");
|
|
15
16
|
var _SyncedBlockLoadingState = require("./SyncedBlockLoadingState");
|
|
@@ -29,10 +30,10 @@ var SyncedBlockNodeComponentRenderer = exports.SyncedBlockNodeComponentRenderer
|
|
|
29
30
|
if (isLoading && !syncBlockInstance) {
|
|
30
31
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
31
32
|
}
|
|
32
|
-
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data)) {
|
|
33
|
-
var _syncBlockInstance$er;
|
|
33
|
+
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data) || syncBlockInstance.data.status === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
34
|
+
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
34
35
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
35
|
-
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : _editorSyncedBlockProvider.SyncBlockError.Errored,
|
|
36
|
+
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') ? _editorSyncedBlockProvider.SyncBlockError.NotFound : _editorSyncedBlockProvider.SyncBlockError.Errored,
|
|
36
37
|
resourceId: syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.resourceId,
|
|
37
38
|
onRetry: reloadData,
|
|
38
39
|
isLoading: isLoading,
|
|
@@ -60,10 +60,10 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
60
60
|
if (!syncBlockInstance) {
|
|
61
61
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
62
62
|
}
|
|
63
|
-
if (syncBlockInstance.error || !syncBlockInstance.data) {
|
|
64
|
-
var _syncBlockInstance$er, _api$analytics;
|
|
63
|
+
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
64
|
+
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
66
|
-
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : _editorSyncedBlockProvider.SyncBlockError.Errored,
|
|
66
|
+
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') ? _editorSyncedBlockProvider.SyncBlockError.NotFound : _editorSyncedBlockProvider.SyncBlockError.Errored,
|
|
67
67
|
resourceId: syncBlockInstance.resourceId,
|
|
68
68
|
onRetry: reloadData,
|
|
69
69
|
isLoading: isLoading,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SyncBlockSharedCssClassName, SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
|
|
3
3
|
import { SyncBlockError, useFetchSyncBlockData } from '@atlaskit/editor-synced-block-provider';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { AKRendererWrapper } from './AKRendererWrapper';
|
|
5
6
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
6
7
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
@@ -24,10 +25,10 @@ export const SyncedBlockNodeComponentRenderer = ({
|
|
|
24
25
|
if (isLoading && !syncBlockInstance) {
|
|
25
26
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
26
27
|
}
|
|
27
|
-
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data)) {
|
|
28
|
-
var _syncBlockInstance$er;
|
|
28
|
+
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data) || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
29
|
+
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
29
30
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
30
|
-
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : SyncBlockError.Errored,
|
|
31
|
+
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && fg('platform_synced_block_dogfooding') ? SyncBlockError.NotFound : SyncBlockError.Errored,
|
|
31
32
|
resourceId: syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.resourceId,
|
|
32
33
|
onRetry: reloadData,
|
|
33
34
|
isLoading: isLoading,
|
|
@@ -52,10 +52,10 @@ const SyncedBlockRendererComponent = ({
|
|
|
52
52
|
if (!syncBlockInstance) {
|
|
53
53
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
54
54
|
}
|
|
55
|
-
if (syncBlockInstance.error || !syncBlockInstance.data) {
|
|
56
|
-
var _syncBlockInstance$er, _api$analytics;
|
|
55
|
+
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
56
|
+
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
57
57
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
58
|
-
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : SyncBlockError.Errored,
|
|
58
|
+
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && fg('platform_synced_block_dogfooding') ? SyncBlockError.NotFound : SyncBlockError.Errored,
|
|
59
59
|
resourceId: syncBlockInstance.resourceId,
|
|
60
60
|
onRetry: reloadData,
|
|
61
61
|
isLoading: isLoading,
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { SyncBlockSharedCssClassName, SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
|
|
5
5
|
import { SyncBlockError, useFetchSyncBlockData } from '@atlaskit/editor-synced-block-provider';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { AKRendererWrapper } from './AKRendererWrapper';
|
|
7
8
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
8
9
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
@@ -22,10 +23,10 @@ export var SyncedBlockNodeComponentRenderer = function SyncedBlockNodeComponentR
|
|
|
22
23
|
if (isLoading && !syncBlockInstance) {
|
|
23
24
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
24
25
|
}
|
|
25
|
-
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data)) {
|
|
26
|
-
var _syncBlockInstance$er;
|
|
26
|
+
if (!resourceId || syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error || !(syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.data) || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
27
|
+
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
27
28
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
28
|
-
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : SyncBlockError.Errored,
|
|
29
|
+
error: (_syncBlockInstance$er = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && fg('platform_synced_block_dogfooding') ? SyncBlockError.NotFound : SyncBlockError.Errored,
|
|
29
30
|
resourceId: syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.resourceId,
|
|
30
31
|
onRetry: reloadData,
|
|
31
32
|
isLoading: isLoading,
|
|
@@ -51,10 +51,10 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
51
51
|
if (!syncBlockInstance) {
|
|
52
52
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
53
53
|
}
|
|
54
|
-
if (syncBlockInstance.error || !syncBlockInstance.data) {
|
|
55
|
-
var _syncBlockInstance$er, _api$analytics;
|
|
54
|
+
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
55
|
+
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
56
56
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
57
|
-
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : SyncBlockError.Errored,
|
|
57
|
+
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : (syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'deleted' && fg('platform_synced_block_dogfooding') ? SyncBlockError.NotFound : SyncBlockError.Errored,
|
|
58
58
|
resourceId: syncBlockInstance.resourceId,
|
|
59
59
|
onRetry: reloadData,
|
|
60
60
|
isLoading: isLoading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/button": "^23.9.0",
|
|
32
32
|
"@atlaskit/css": "^0.19.0",
|
|
33
|
-
"@atlaskit/editor-plugin-synced-block": "^5.
|
|
34
|
-
"@atlaskit/editor-synced-block-provider": "^3.
|
|
33
|
+
"@atlaskit/editor-plugin-synced-block": "^5.3.0",
|
|
34
|
+
"@atlaskit/editor-synced-block-provider": "^3.13.0",
|
|
35
35
|
"@atlaskit/heading": "^5.2.0",
|
|
36
36
|
"@atlaskit/icon": "^29.4.0",
|
|
37
37
|
"@atlaskit/icon-lab": "^5.14.0",
|