@atlaskit/editor-synced-block-renderer 5.6.1 → 5.6.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 +11 -0
- package/dist/cjs/ui/AKRendererWrapper.js +3 -9
- package/dist/cjs/ui/SyncedBlockNodeComponentRenderer.js +6 -0
- package/dist/cjs/ui/SyncedBlockRenderer.js +6 -0
- package/dist/es2019/ui/AKRendererWrapper.js +2 -5
- package/dist/es2019/ui/SyncedBlockNodeComponentRenderer.js +6 -0
- package/dist/es2019/ui/SyncedBlockRenderer.js +6 -0
- package/dist/esm/ui/AKRendererWrapper.js +3 -9
- package/dist/esm/ui/SyncedBlockNodeComponentRenderer.js +6 -0
- package/dist/esm/ui/SyncedBlockRenderer.js +6 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 5.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`74c826b26352b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/74c826b26352b) -
|
|
8
|
+
[ux] EDITOR-4765 In SSR, if server returned error, we should render loading state instead of error
|
|
9
|
+
state
|
|
10
|
+
- [`a372f642e42a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a372f642e42a5) -
|
|
11
|
+
[ux] EDITOR-4716 Fix content shifting when tooltip is shown for tasks in Synced Block
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 5.6.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -40,15 +40,9 @@ var DisabledTaskWithTooltip = function DisabledTaskWithTooltip(_ref2) {
|
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
41
41
|
content: tooltipContent,
|
|
42
42
|
position: "auto-start"
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
47
|
-
_react.default.createElement("div", tooltipProps, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, {
|
|
48
|
-
disableOnChange: true
|
|
49
|
-
})))
|
|
50
|
-
);
|
|
51
|
-
});
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, {
|
|
44
|
+
disableOnChange: true
|
|
45
|
+
})));
|
|
52
46
|
};
|
|
53
47
|
var defaultOptions = {
|
|
54
48
|
appearance: 'full-width',
|
|
@@ -53,6 +53,12 @@ var SyncedBlockNodeComponentRenderer = exports.SyncedBlockNodeComponentRenderer
|
|
|
53
53
|
if (isLoading && !syncBlockInstance) {
|
|
54
54
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
58
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
59
|
+
if ((0, _coreUtils.isSSR)() && syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
61
|
+
}
|
|
56
62
|
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')) {
|
|
57
63
|
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
58
64
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
@@ -64,6 +64,12 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
64
64
|
if (!syncBlockInstance) {
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
69
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
70
|
+
if ((0, _coreUtils.isSSR)() && syncBlockInstance.error && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
72
|
+
}
|
|
67
73
|
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
68
74
|
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
69
75
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
@@ -27,12 +27,9 @@ const DisabledTaskWithTooltip = ({
|
|
|
27
27
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
28
28
|
content: tooltipContent,
|
|
29
29
|
position: "auto-start"
|
|
30
|
-
},
|
|
31
|
-
/*#__PURE__*/
|
|
32
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
|
-
React.createElement("div", tooltipProps, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
34
31
|
disableOnChange: true
|
|
35
|
-
})))
|
|
32
|
+
})));
|
|
36
33
|
};
|
|
37
34
|
const defaultOptions = {
|
|
38
35
|
appearance: 'full-width',
|
|
@@ -46,6 +46,12 @@ export const SyncedBlockNodeComponentRenderer = ({
|
|
|
46
46
|
if (isLoading && !syncBlockInstance) {
|
|
47
47
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
51
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
52
|
+
if (isSSR() && syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error && fg('platform_synced_block_dogfooding')) {
|
|
53
|
+
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
54
|
+
}
|
|
49
55
|
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')) {
|
|
50
56
|
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
51
57
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
@@ -57,6 +57,12 @@ const SyncedBlockRendererComponent = ({
|
|
|
57
57
|
if (!syncBlockInstance) {
|
|
58
58
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
62
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
63
|
+
if (isSSR() && syncBlockInstance.error && fg('platform_synced_block_dogfooding')) {
|
|
64
|
+
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
65
|
+
}
|
|
60
66
|
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
61
67
|
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
62
68
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
@@ -31,15 +31,9 @@ var DisabledTaskWithTooltip = function DisabledTaskWithTooltip(_ref2) {
|
|
|
31
31
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
32
32
|
content: tooltipContent,
|
|
33
33
|
position: "auto-start"
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
|
-
React.createElement("div", tooltipProps, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
39
|
-
disableOnChange: true
|
|
40
|
-
})))
|
|
41
|
-
);
|
|
42
|
-
});
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
35
|
+
disableOnChange: true
|
|
36
|
+
})));
|
|
43
37
|
};
|
|
44
38
|
var defaultOptions = {
|
|
45
39
|
appearance: 'full-width',
|
|
@@ -44,6 +44,12 @@ export var SyncedBlockNodeComponentRenderer = function SyncedBlockNodeComponentR
|
|
|
44
44
|
if (isLoading && !syncBlockInstance) {
|
|
45
45
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
49
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
50
|
+
if (isSSR() && syncBlockInstance !== null && syncBlockInstance !== void 0 && syncBlockInstance.error && fg('platform_synced_block_dogfooding')) {
|
|
51
|
+
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
52
|
+
}
|
|
47
53
|
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')) {
|
|
48
54
|
var _syncBlockInstance$er, _syncBlockInstance$da;
|
|
49
55
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
@@ -55,6 +55,12 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
55
55
|
if (!syncBlockInstance) {
|
|
56
56
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
// In SSR, if server returned error, we should render loading state instead of error state
|
|
60
|
+
// since FE will do another fetch and render the error state or proper data then
|
|
61
|
+
if (isSSR() && syncBlockInstance.error && fg('platform_synced_block_dogfooding')) {
|
|
62
|
+
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
63
|
+
}
|
|
58
64
|
if (syncBlockInstance.error || !syncBlockInstance.data || syncBlockInstance.data.status === 'deleted' && fg('platform_synced_block_dogfooding')) {
|
|
59
65
|
var _syncBlockInstance$er, _syncBlockInstance$da, _api$analytics;
|
|
60
66
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.2",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@atlaskit/editor-synced-block-provider": "^3.14.0",
|
|
35
35
|
"@atlaskit/heading": "^5.2.0",
|
|
36
36
|
"@atlaskit/icon": "^30.0.0",
|
|
37
|
-
"@atlaskit/icon-lab": "^5.
|
|
37
|
+
"@atlaskit/icon-lab": "^5.15.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^17.1.0",
|
|
41
|
-
"@atlaskit/renderer": "^126.
|
|
41
|
+
"@atlaskit/renderer": "^126.2.0",
|
|
42
42
|
"@atlaskit/spinner": "^19.0.0",
|
|
43
43
|
"@atlaskit/tokens": "^10.1.0",
|
|
44
44
|
"@atlaskit/tooltip": "^20.14.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"relay-runtime": "npm:atl-relay-runtime@0.0.0-main-39e79f66"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^111.
|
|
50
|
+
"@atlaskit/editor-common": "^111.9.0",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
53
53
|
},
|