@atlaskit/editor-synced-block-renderer 5.3.2 → 5.4.1
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 +17 -0
- package/dist/cjs/getSyncedBlockRenderer.js +2 -2
- package/dist/cjs/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/cjs/ui/SyncedBlockRenderer.js +10 -11
- package/dist/es2019/getSyncedBlockRenderer.js +2 -2
- package/dist/es2019/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/es2019/ui/SyncedBlockRenderer.js +8 -8
- package/dist/esm/getSyncedBlockRenderer.js +2 -2
- package/dist/esm/ui/SyncedBlockNodeComponentRenderer.js +4 -3
- package/dist/esm/ui/SyncedBlockRenderer.js +10 -11
- package/dist/types/getSyncedBlockRenderer.d.ts +1 -1
- package/dist/types/ui/SyncedBlockRenderer.d.ts +3 -3
- package/dist/types-ts4.5/getSyncedBlockRenderer.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockRenderer.d.ts +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 5.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`870c3baec758b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/870c3baec758b) -
|
|
14
|
+
Enable consumers to use GraphQL subscription for fetching the block data when the block changes
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 5.3.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -11,11 +11,11 @@ var _SyncedBlockRenderer = require("./ui/SyncedBlockRenderer");
|
|
|
11
11
|
var getSyncedBlockRenderer = exports.getSyncedBlockRenderer = function getSyncedBlockRenderer(_ref) {
|
|
12
12
|
var syncBlockRendererOptions = _ref.syncBlockRendererOptions;
|
|
13
13
|
return function (_ref2) {
|
|
14
|
-
var
|
|
14
|
+
var syncBlockFetchResult = _ref2.syncBlockFetchResult,
|
|
15
15
|
api = _ref2.api;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockRenderer.SyncedBlockRenderer, {
|
|
17
17
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
18
|
-
|
|
18
|
+
syncBlockFetchResult: syncBlockFetchResult,
|
|
19
19
|
api: api
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -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,
|
|
@@ -19,15 +19,14 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
21
|
var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
22
|
-
var
|
|
23
|
-
|
|
22
|
+
var syncBlockRendererOptions = _ref.syncBlockRendererOptions,
|
|
23
|
+
syncBlockFetchResult = _ref.syncBlockFetchResult,
|
|
24
24
|
api = _ref.api;
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ssrProviders = _useFetchSyncBlockDat.ssrProviders;
|
|
25
|
+
var isLoading = syncBlockFetchResult.isLoading,
|
|
26
|
+
providerFactory = syncBlockFetchResult.providerFactory,
|
|
27
|
+
reloadData = syncBlockFetchResult.reloadData,
|
|
28
|
+
ssrProviders = syncBlockFetchResult.ssrProviders,
|
|
29
|
+
syncBlockInstance = syncBlockFetchResult.syncBlockInstance;
|
|
31
30
|
var rendererOptions = (0, _react.useMemo)(function () {
|
|
32
31
|
var _syncBlockRendererOpt, _ssrProviders$media;
|
|
33
32
|
if (!(0, _coreUtils.isSSR)() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
|
|
@@ -60,10 +59,10 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
60
59
|
if (!syncBlockInstance) {
|
|
61
60
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
62
61
|
}
|
|
63
|
-
if (syncBlockInstance.error || !syncBlockInstance.data) {
|
|
64
|
-
var _syncBlockInstance$er, _api$analytics;
|
|
62
|
+
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
63
|
+
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
65
64
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
66
|
-
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : _editorSyncedBlockProvider.SyncBlockError.Errored,
|
|
65
|
+
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
66
|
resourceId: syncBlockInstance.resourceId,
|
|
68
67
|
onRetry: reloadData,
|
|
69
68
|
isLoading: isLoading,
|
|
@@ -4,12 +4,12 @@ import { SyncedBlockRenderer } from './ui/SyncedBlockRenderer';
|
|
|
4
4
|
export const getSyncedBlockRenderer = ({
|
|
5
5
|
syncBlockRendererOptions
|
|
6
6
|
}) => ({
|
|
7
|
-
|
|
7
|
+
syncBlockFetchResult,
|
|
8
8
|
api
|
|
9
9
|
}) => {
|
|
10
10
|
return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
|
|
11
11
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
12
|
-
|
|
12
|
+
syncBlockFetchResult: syncBlockFetchResult,
|
|
13
13
|
api: api
|
|
14
14
|
});
|
|
15
15
|
};
|
|
@@ -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,
|
|
@@ -7,17 +7,17 @@ import { AKRendererWrapper } from './AKRendererWrapper';
|
|
|
7
7
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
8
8
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
9
9
|
const SyncedBlockRendererComponent = ({
|
|
10
|
-
useFetchSyncBlockData,
|
|
11
10
|
syncBlockRendererOptions,
|
|
11
|
+
syncBlockFetchResult,
|
|
12
12
|
api
|
|
13
13
|
}) => {
|
|
14
14
|
const {
|
|
15
|
-
syncBlockInstance,
|
|
16
|
-
providerFactory,
|
|
17
15
|
isLoading,
|
|
16
|
+
providerFactory,
|
|
18
17
|
reloadData,
|
|
19
|
-
ssrProviders
|
|
20
|
-
|
|
18
|
+
ssrProviders,
|
|
19
|
+
syncBlockInstance
|
|
20
|
+
} = syncBlockFetchResult;
|
|
21
21
|
const rendererOptions = useMemo(() => {
|
|
22
22
|
var _syncBlockRendererOpt, _ssrProviders$media;
|
|
23
23
|
if (!isSSR() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
|
|
@@ -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,
|
|
@@ -4,11 +4,11 @@ import { SyncedBlockRenderer } from './ui/SyncedBlockRenderer';
|
|
|
4
4
|
export var getSyncedBlockRenderer = function getSyncedBlockRenderer(_ref) {
|
|
5
5
|
var syncBlockRendererOptions = _ref.syncBlockRendererOptions;
|
|
6
6
|
return function (_ref2) {
|
|
7
|
-
var
|
|
7
|
+
var syncBlockFetchResult = _ref2.syncBlockFetchResult,
|
|
8
8
|
api = _ref2.api;
|
|
9
9
|
return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
|
|
10
10
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
11
|
-
|
|
11
|
+
syncBlockFetchResult: syncBlockFetchResult,
|
|
12
12
|
api: api
|
|
13
13
|
});
|
|
14
14
|
};
|
|
@@ -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,
|
|
@@ -10,15 +10,14 @@ import { AKRendererWrapper } from './AKRendererWrapper';
|
|
|
10
10
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
11
11
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
12
12
|
var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var syncBlockRendererOptions = _ref.syncBlockRendererOptions,
|
|
14
|
+
syncBlockFetchResult = _ref.syncBlockFetchResult,
|
|
15
15
|
api = _ref.api;
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ssrProviders = _useFetchSyncBlockDat.ssrProviders;
|
|
16
|
+
var isLoading = syncBlockFetchResult.isLoading,
|
|
17
|
+
providerFactory = syncBlockFetchResult.providerFactory,
|
|
18
|
+
reloadData = syncBlockFetchResult.reloadData,
|
|
19
|
+
ssrProviders = syncBlockFetchResult.ssrProviders,
|
|
20
|
+
syncBlockInstance = syncBlockFetchResult.syncBlockInstance;
|
|
22
21
|
var rendererOptions = useMemo(function () {
|
|
23
22
|
var _syncBlockRendererOpt, _ssrProviders$media;
|
|
24
23
|
if (!isSSR() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
|
|
@@ -51,10 +50,10 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
51
50
|
if (!syncBlockInstance) {
|
|
52
51
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
53
52
|
}
|
|
54
|
-
if (syncBlockInstance.error || !syncBlockInstance.data) {
|
|
55
|
-
var _syncBlockInstance$er, _api$analytics;
|
|
53
|
+
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
54
|
+
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
56
55
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
57
|
-
error: (_syncBlockInstance$er = syncBlockInstance.error) !== null && _syncBlockInstance$er !== void 0 ? _syncBlockInstance$er : SyncBlockError.Errored,
|
|
56
|
+
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
57
|
resourceId: syncBlockInstance.resourceId,
|
|
59
58
|
onRetry: reloadData,
|
|
60
59
|
isLoading: isLoading,
|
|
@@ -4,5 +4,5 @@ import type { SyncedBlockRendererOptions } from './types';
|
|
|
4
4
|
type GetSyncedBlockRendererProps = {
|
|
5
5
|
syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
|
|
6
6
|
};
|
|
7
|
-
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({
|
|
7
|
+
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ syncBlockFetchResult, api }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -5,7 +5,7 @@ import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-
|
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type SyncedBlockRendererProps = {
|
|
7
7
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
syncBlockFetchResult: UseFetchSyncBlockDataResult;
|
|
9
|
+
syncBlockRendererOptions?: SyncedBlockRendererOptions;
|
|
10
10
|
};
|
|
11
|
-
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({
|
|
11
|
+
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ syncBlockRendererOptions, syncBlockFetchResult, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
|
|
@@ -4,5 +4,5 @@ import type { SyncedBlockRendererOptions } from './types';
|
|
|
4
4
|
type GetSyncedBlockRendererProps = {
|
|
5
5
|
syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
|
|
6
6
|
};
|
|
7
|
-
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({
|
|
7
|
+
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ syncBlockFetchResult, api }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -5,7 +5,7 @@ import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-
|
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type SyncedBlockRendererProps = {
|
|
7
7
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
syncBlockFetchResult: UseFetchSyncBlockDataResult;
|
|
9
|
+
syncBlockRendererOptions?: SyncedBlockRendererOptions;
|
|
10
10
|
};
|
|
11
|
-
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({
|
|
11
|
+
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ syncBlockRendererOptions, syncBlockFetchResult, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
|
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.1",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,10 +30,10 @@
|
|
|
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
|
-
"@atlaskit/icon": "^
|
|
36
|
+
"@atlaskit/icon": "^30.0.0",
|
|
37
37
|
"@atlaskit/icon-lab": "^5.14.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|