@atlaskit/editor-synced-block-renderer 3.4.0 → 3.4.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/getSyncedBlockNodeComponent.js +1 -1
- package/dist/cjs/ui/SyncedBlockErrorComponent.js +3 -2
- package/dist/cjs/ui/SyncedBlockNodeComponentRenderer.js +1 -1
- package/dist/cjs/ui/SyncedBlockRenderer.js +1 -1
- package/dist/es2019/getSyncedBlockNodeComponent.js +1 -1
- package/dist/es2019/ui/SyncedBlockErrorComponent.js +4 -3
- package/dist/es2019/ui/SyncedBlockNodeComponentRenderer.js +1 -1
- package/dist/es2019/ui/SyncedBlockRenderer.js +1 -1
- package/dist/esm/getSyncedBlockNodeComponent.js +1 -1
- package/dist/esm/ui/SyncedBlockErrorComponent.js +4 -3
- package/dist/esm/ui/SyncedBlockNodeComponentRenderer.js +1 -1
- package/dist/esm/ui/SyncedBlockRenderer.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 3.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`964b980644f9d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/964b980644f9d) -
|
|
8
|
+
EDITOR-3348 Refactor Synced Block Store Manager
|
|
9
|
+
- [`caa54ec7bac4c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/caa54ec7bac4c) -
|
|
10
|
+
EDITOR-3312 Refactor and restructure synced block provider
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 3.4.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 3.4.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -25,7 +25,7 @@ var getSyncedBlockNodeComponent = exports.getSyncedBlockNodeComponent = function
|
|
|
25
25
|
var syncBlockStoreManager = new _editorSyncedBlockProvider.SyncBlockStoreManager(syncBlockProvider);
|
|
26
26
|
|
|
27
27
|
// Pre-fetch sync block data
|
|
28
|
-
syncBlockStoreManager.
|
|
28
|
+
syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
|
|
29
29
|
return function (props) {
|
|
30
30
|
return (0, _SyncedBlockNodeComponentRenderer.SyncedBlockNodeComponentRenderer)({
|
|
31
31
|
nodeProps: props,
|
|
@@ -25,7 +25,8 @@ var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function Syn
|
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockGenericError.SyncedBlockGenericError, null);
|
|
26
26
|
}
|
|
27
27
|
if (documentAri) {
|
|
28
|
-
|
|
28
|
+
// TODO: EDITOR-3312 - make this product agnostic
|
|
29
|
+
var _getPageIdAndTypeFrom = (0, _editorSyncedBlockProvider.getPageIdAndTypeFromConfluencePageAri)(documentAri),
|
|
29
30
|
_contentId = _getPageIdAndTypeFrom.id;
|
|
30
31
|
if (_contentId) {
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockPermissionDenied.SyncedBlockPermissionDenied, {
|
|
@@ -33,7 +34,7 @@ var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function Syn
|
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
var _getPageIdAndTypeFrom2 = (0, _editorSyncedBlockProvider.
|
|
37
|
+
var _getPageIdAndTypeFrom2 = (0, _editorSyncedBlockProvider.getPageIdAndTypeFromConfluencePageAri)(resourceId),
|
|
37
38
|
contentId = _getPageIdAndTypeFrom2.id;
|
|
38
39
|
if (contentId) {
|
|
39
40
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockPermissionDenied.SyncedBlockPermissionDenied, {
|
|
@@ -31,7 +31,7 @@ var SyncedBlockNodeComponentRenderer = exports.SyncedBlockNodeComponentRenderer
|
|
|
31
31
|
resourceId: resourceId,
|
|
32
32
|
onRetry: reloadData,
|
|
33
33
|
isLoading: isLoading,
|
|
34
|
-
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
34
|
+
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
var syncBlockDoc = {
|
|
@@ -29,7 +29,7 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
29
29
|
resourceId: syncBlockInstance.resourceId,
|
|
30
30
|
onRetry: reloadData,
|
|
31
31
|
isLoading: isLoading,
|
|
32
|
-
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
32
|
+
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
var syncBlockDoc = {
|
|
@@ -18,7 +18,7 @@ export const getSyncedBlockNodeComponent = ({
|
|
|
18
18
|
const syncBlockStoreManager = new SyncBlockStoreManager(syncBlockProvider);
|
|
19
19
|
|
|
20
20
|
// Pre-fetch sync block data
|
|
21
|
-
syncBlockStoreManager.
|
|
21
|
+
syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
|
|
22
22
|
return props => SyncedBlockNodeComponentRenderer({
|
|
23
23
|
nodeProps: props,
|
|
24
24
|
syncBlockStoreManager,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
3
|
-
import {
|
|
3
|
+
import { getPageIdAndTypeFromConfluencePageAri, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
5
5
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
6
6
|
import { SyncedBlockPermissionDenied } from './SyncedBlockPermissionDenied';
|
|
@@ -18,9 +18,10 @@ export const SyncedBlockErrorComponent = ({
|
|
|
18
18
|
return /*#__PURE__*/React.createElement(SyncedBlockGenericError, null);
|
|
19
19
|
}
|
|
20
20
|
if (documentAri) {
|
|
21
|
+
// TODO: EDITOR-3312 - make this product agnostic
|
|
21
22
|
const {
|
|
22
23
|
id: contentId
|
|
23
|
-
} =
|
|
24
|
+
} = getPageIdAndTypeFromConfluencePageAri(documentAri);
|
|
24
25
|
if (contentId) {
|
|
25
26
|
return /*#__PURE__*/React.createElement(SyncedBlockPermissionDenied, {
|
|
26
27
|
contentId: contentId
|
|
@@ -29,7 +30,7 @@ export const SyncedBlockErrorComponent = ({
|
|
|
29
30
|
}
|
|
30
31
|
const {
|
|
31
32
|
id: contentId
|
|
32
|
-
} =
|
|
33
|
+
} = getPageIdAndTypeFromConfluencePageAri(resourceId);
|
|
33
34
|
if (contentId) {
|
|
34
35
|
return /*#__PURE__*/React.createElement(SyncedBlockPermissionDenied, {
|
|
35
36
|
contentId: contentId
|
|
@@ -28,7 +28,7 @@ export const SyncedBlockNodeComponentRenderer = ({
|
|
|
28
28
|
resourceId: resourceId,
|
|
29
29
|
onRetry: reloadData,
|
|
30
30
|
isLoading: isLoading,
|
|
31
|
-
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
31
|
+
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
const syncBlockDoc = {
|
|
@@ -23,7 +23,7 @@ const SyncedBlockRendererComponent = ({
|
|
|
23
23
|
resourceId: syncBlockInstance.resourceId,
|
|
24
24
|
onRetry: reloadData,
|
|
25
25
|
isLoading: isLoading,
|
|
26
|
-
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
26
|
+
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
const syncBlockDoc = {
|
|
@@ -19,7 +19,7 @@ export var getSyncedBlockNodeComponent = function getSyncedBlockNodeComponent(_r
|
|
|
19
19
|
var syncBlockStoreManager = new SyncBlockStoreManager(syncBlockProvider);
|
|
20
20
|
|
|
21
21
|
// Pre-fetch sync block data
|
|
22
|
-
syncBlockStoreManager.
|
|
22
|
+
syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
|
|
23
23
|
return function (props) {
|
|
24
24
|
return SyncedBlockNodeComponentRenderer({
|
|
25
25
|
nodeProps: props,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
3
|
-
import {
|
|
3
|
+
import { getPageIdAndTypeFromConfluencePageAri, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
5
5
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
6
6
|
import { SyncedBlockPermissionDenied } from './SyncedBlockPermissionDenied';
|
|
@@ -17,7 +17,8 @@ export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref)
|
|
|
17
17
|
return /*#__PURE__*/React.createElement(SyncedBlockGenericError, null);
|
|
18
18
|
}
|
|
19
19
|
if (documentAri) {
|
|
20
|
-
|
|
20
|
+
// TODO: EDITOR-3312 - make this product agnostic
|
|
21
|
+
var _getPageIdAndTypeFrom = getPageIdAndTypeFromConfluencePageAri(documentAri),
|
|
21
22
|
_contentId = _getPageIdAndTypeFrom.id;
|
|
22
23
|
if (_contentId) {
|
|
23
24
|
return /*#__PURE__*/React.createElement(SyncedBlockPermissionDenied, {
|
|
@@ -25,7 +26,7 @@ export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref)
|
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
var _getPageIdAndTypeFrom2 =
|
|
29
|
+
var _getPageIdAndTypeFrom2 = getPageIdAndTypeFromConfluencePageAri(resourceId),
|
|
29
30
|
contentId = _getPageIdAndTypeFrom2.id;
|
|
30
31
|
if (contentId) {
|
|
31
32
|
return /*#__PURE__*/React.createElement(SyncedBlockPermissionDenied, {
|
|
@@ -24,7 +24,7 @@ export var SyncedBlockNodeComponentRenderer = function SyncedBlockNodeComponentR
|
|
|
24
24
|
resourceId: resourceId,
|
|
25
25
|
onRetry: reloadData,
|
|
26
26
|
isLoading: isLoading,
|
|
27
|
-
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
27
|
+
documentAri: syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
var syncBlockDoc = {
|
|
@@ -21,7 +21,7 @@ var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
|
21
21
|
resourceId: syncBlockInstance.resourceId,
|
|
22
22
|
onRetry: reloadData,
|
|
23
23
|
isLoading: isLoading,
|
|
24
|
-
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.
|
|
24
|
+
documentAri: (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.sourceAri
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
var syncBlockDoc = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/button": "^23.6.0",
|
|
32
|
-
"@atlaskit/css": "^0.
|
|
32
|
+
"@atlaskit/css": "^0.16.0",
|
|
33
33
|
"@atlaskit/editor-plugin-synced-block": "^4.2.0",
|
|
34
34
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
35
35
|
"@atlaskit/editor-synced-block-provider": "^2.10.0",
|
|
36
36
|
"@atlaskit/heading": "^5.2.0",
|
|
37
37
|
"@atlaskit/icon": "^29.0.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
|
-
"@atlaskit/primitives": "^16.
|
|
40
|
-
"@atlaskit/renderer": "^124.
|
|
39
|
+
"@atlaskit/primitives": "^16.2.0",
|
|
40
|
+
"@atlaskit/renderer": "^124.16.0",
|
|
41
41
|
"@atlaskit/spinner": "^19.0.0",
|
|
42
|
-
"@atlaskit/tokens": "^8.
|
|
42
|
+
"@atlaskit/tokens": "^8.1.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"react-relay": "npm:atl-react-relay@0.0.0-main-39e79f66",
|
|
45
45
|
"relay-runtime": "npm:atl-relay-compiler@0.0.0-main-39e79f66"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^110.
|
|
48
|
+
"@atlaskit/editor-common": "^110.33.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
51
51
|
},
|