@atlaskit/editor-synced-block-renderer 7.0.0 → 8.1.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 +31 -0
- package/dist/cjs/ui/AKRendererWrapper.js +2 -2
- package/dist/cjs/ui/SyncedBlockEntityNotFoundError.compiled.css +3 -0
- package/dist/cjs/ui/SyncedBlockEntityNotFoundError.js +38 -0
- package/dist/cjs/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/cjs/ui/SyncedBlockGenericError.js +2 -2
- package/dist/cjs/ui/SyncedBlockLoadError.js +2 -2
- package/dist/cjs/ui/SyncedBlockLoadingState.js +2 -2
- package/dist/cjs/ui/SyncedBlockNotFoundError.js +3 -3
- package/dist/cjs/ui/SyncedBlockOfflineError.js +2 -2
- package/dist/cjs/ui/SyncedBlockPermissionDenied.js +2 -2
- package/dist/cjs/ui/SyncedBlockUnpublishedError.js +4 -4
- package/dist/es2019/ui/AKRendererWrapper.js +1 -1
- package/dist/es2019/ui/SyncedBlockEntityNotFoundError.compiled.css +3 -0
- package/dist/es2019/ui/SyncedBlockEntityNotFoundError.js +30 -0
- package/dist/es2019/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/es2019/ui/SyncedBlockGenericError.js +1 -1
- package/dist/es2019/ui/SyncedBlockLoadError.js +1 -1
- package/dist/es2019/ui/SyncedBlockLoadingState.js +1 -1
- package/dist/es2019/ui/SyncedBlockNotFoundError.js +1 -1
- package/dist/es2019/ui/SyncedBlockOfflineError.js +1 -1
- package/dist/es2019/ui/SyncedBlockPermissionDenied.js +1 -1
- package/dist/es2019/ui/SyncedBlockUnpublishedError.js +4 -4
- package/dist/esm/ui/AKRendererWrapper.js +1 -1
- package/dist/esm/ui/SyncedBlockEntityNotFoundError.compiled.css +3 -0
- package/dist/esm/ui/SyncedBlockEntityNotFoundError.js +31 -0
- package/dist/esm/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/esm/ui/SyncedBlockGenericError.js +1 -1
- package/dist/esm/ui/SyncedBlockLoadError.js +1 -1
- package/dist/esm/ui/SyncedBlockLoadingState.js +1 -1
- package/dist/esm/ui/SyncedBlockNotFoundError.js +1 -1
- package/dist/esm/ui/SyncedBlockOfflineError.js +1 -1
- package/dist/esm/ui/SyncedBlockPermissionDenied.js +1 -1
- package/dist/esm/ui/SyncedBlockUnpublishedError.js +4 -4
- package/dist/types/ui/SyncedBlockEntityNotFoundError.d.ts +2 -0
- package/dist/types-ts4.5/ui/SyncedBlockEntityNotFoundError.d.ts +2 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 8.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`fe5309f20a834`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fe5309f20a834) -
|
|
8
|
+
Map EntityNotFound error code to dedicated SyncBlockError.EntityNotFound enum value and add a
|
|
9
|
+
specific error screen for synced blocks not available on the current site
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 8.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- [`901c87a57486e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/901c87a57486e) -
|
|
20
|
+
Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
|
|
21
|
+
|
|
22
|
+
What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
|
|
23
|
+
removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
|
|
24
|
+
to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
|
|
25
|
+
|
|
26
|
+
How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
|
|
27
|
+
`^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
|
|
28
|
+
can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
3
34
|
## 7.0.0
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _reactIntl = require("react-intl");
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
16
|
var _renderer = require("@atlaskit/renderer");
|
|
@@ -35,7 +35,7 @@ var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
|
|
|
35
35
|
var DisabledTaskWithTooltip = function DisabledTaskWithTooltip(_ref2) {
|
|
36
36
|
var componentKey = _ref2.componentKey,
|
|
37
37
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
38
|
-
var _useIntl = (0,
|
|
38
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
39
39
|
formatMessage = _useIntl.formatMessage;
|
|
40
40
|
var tooltipContent = formatMessage(_messages.syncBlockMessages.taskInDestinationSyncedBlockTooltip);
|
|
41
41
|
var Component = _renderer.defaultNodeComponents[componentKey];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* SyncedBlockEntityNotFoundError.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SyncedBlockEntityNotFoundError = void 0;
|
|
9
|
+
require("./SyncedBlockEntityNotFoundError.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
|
+
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
15
|
+
var _linkBroken = _interopRequireDefault(require("@atlaskit/icon/core/link-broken"));
|
|
16
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
+
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
18
|
+
var styles = {
|
|
19
|
+
link: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
20
|
+
};
|
|
21
|
+
var SyncedBlockEntityNotFoundError = exports.SyncedBlockEntityNotFoundError = function SyncedBlockEntityNotFoundError() {
|
|
22
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
23
|
+
formatMessage = _useIntl.formatMessage;
|
|
24
|
+
var description = formatMessage(_messages.syncBlockMessages.entityNotFoundDescription, {
|
|
25
|
+
link: function link(chunks) {
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
27
|
+
href: _syncBlock.SYNCED_BLOCKS_DOCUMENTATION_URL,
|
|
28
|
+
target: "_blank",
|
|
29
|
+
rel: "noopener noreferrer",
|
|
30
|
+
xcss: styles.link
|
|
31
|
+
}, chunks);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
35
|
+
description: description,
|
|
36
|
+
icon: _linkBroken.default
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -10,6 +10,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
10
10
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
11
11
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
12
12
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
13
|
+
var _SyncedBlockEntityNotFoundError = require("./SyncedBlockEntityNotFoundError");
|
|
13
14
|
var _SyncedBlockGenericError = require("./SyncedBlockGenericError");
|
|
14
15
|
var _SyncedBlockLoadError = require("./SyncedBlockLoadError");
|
|
15
16
|
var _SyncedBlockNotFoundError = require("./SyncedBlockNotFoundError");
|
|
@@ -58,6 +59,8 @@ var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function Syn
|
|
|
58
59
|
}, [error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, resourceId, fireAnalyticsEvent]);
|
|
59
60
|
var getErrorContent = (0, _react.useMemo)(function () {
|
|
60
61
|
switch (error === null || error === void 0 ? void 0 : error.type) {
|
|
62
|
+
case _editorSyncedBlockProvider.SyncBlockError.EntityNotFound:
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockEntityNotFoundError.SyncedBlockEntityNotFoundError, null);
|
|
61
64
|
case _editorSyncedBlockProvider.SyncBlockError.Offline:
|
|
62
65
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockOfflineError.SyncedBlockOfflineError, null);
|
|
63
66
|
case _editorSyncedBlockProvider.SyncBlockError.Forbidden:
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SyncedBlockGenericError = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _reactIntl = require("react-intl");
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
12
12
|
var SyncedBlockGenericError = exports.SyncedBlockGenericError = function SyncedBlockGenericError() {
|
|
13
|
-
var _useIntl = (0,
|
|
13
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
14
14
|
formatMessage = _useIntl.formatMessage;
|
|
15
15
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
16
16
|
description: formatMessage(_messages.syncBlockMessages.generalErrorDescription)
|
|
@@ -9,7 +9,7 @@ exports.SyncedBlockLoadError = void 0;
|
|
|
9
9
|
require("./SyncedBlockLoadError.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _reactIntl = require("react-intl");
|
|
13
13
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -20,7 +20,7 @@ var styles = {
|
|
|
20
20
|
var SyncedBlockLoadError = exports.SyncedBlockLoadError = function SyncedBlockLoadError(_ref) {
|
|
21
21
|
var onRetry = _ref.onRetry,
|
|
22
22
|
isLoading = _ref.isLoading;
|
|
23
|
-
var _useIntl = (0,
|
|
23
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
24
24
|
formatMessage = _useIntl.formatMessage;
|
|
25
25
|
var button = /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
26
26
|
appearance: "default",
|
|
@@ -9,7 +9,7 @@ exports.SyncedBlockLoadingState = void 0;
|
|
|
9
9
|
require("./SyncedBlockLoadingState.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _reactIntl = require("react-intl");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
15
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -18,7 +18,7 @@ var styles = {
|
|
|
18
18
|
wrapper: "_1tkevbgk _1e0c1txw _1bah1h6o _4cvr1h6o"
|
|
19
19
|
};
|
|
20
20
|
var SyncedBlockLoadingState = exports.SyncedBlockLoadingState = function SyncedBlockLoadingState() {
|
|
21
|
-
var _useIntl = (0,
|
|
21
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
22
22
|
formatMessage = _useIntl.formatMessage;
|
|
23
23
|
return (
|
|
24
24
|
/*#__PURE__*/
|
|
@@ -13,7 +13,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
13
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
|
-
var
|
|
16
|
+
var _reactIntl = require("react-intl");
|
|
17
17
|
var _new = require("@atlaskit/button/new");
|
|
18
18
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
19
19
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
@@ -53,7 +53,7 @@ var errorMap = {
|
|
|
53
53
|
};
|
|
54
54
|
var useErrorInfo = function useErrorInfo(reason, url, title) {
|
|
55
55
|
var _errorMap;
|
|
56
|
-
var _useIntl = (0,
|
|
56
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
57
57
|
formatMessage = _useIntl.formatMessage;
|
|
58
58
|
if (reason === 'source-document-deleted') {
|
|
59
59
|
var _errorMap$sourceDocu = errorMap['source-document-deleted'],
|
|
@@ -103,7 +103,7 @@ var SyncedBlockNotFoundError = exports.SyncedBlockNotFoundError = function Synce
|
|
|
103
103
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
104
104
|
sourceInfo = _useState2[0],
|
|
105
105
|
setSourceInfo = _useState2[1];
|
|
106
|
-
var _useIntl2 = (0,
|
|
106
|
+
var _useIntl2 = (0, _reactIntl.useIntl)(),
|
|
107
107
|
formatMessage = _useIntl2.formatMessage;
|
|
108
108
|
(0, _react.useEffect)(function () {
|
|
109
109
|
if (!sourceAri ||
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SyncedBlockOfflineError = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _reactIntl = require("react-intl");
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
12
12
|
var SyncedBlockOfflineError = exports.SyncedBlockOfflineError = function SyncedBlockOfflineError() {
|
|
13
|
-
var _useIntl = (0,
|
|
13
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
14
14
|
formatMessage = _useIntl.formatMessage;
|
|
15
15
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
16
16
|
description: formatMessage(_messages.syncBlockMessages.offlineError)
|
|
@@ -12,7 +12,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _SyncedBlockPermissionDeniedRequestAccessMutation2 = _interopRequireDefault(require("./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var
|
|
15
|
+
var _reactIntl = require("react-intl");
|
|
16
16
|
var _reactRelay = require("react-relay");
|
|
17
17
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
@@ -35,7 +35,7 @@ var RequestAccessState = /*#__PURE__*/function (RequestAccessState) {
|
|
|
35
35
|
}(RequestAccessState || {});
|
|
36
36
|
var SyncedBlockPermissionDeniedConfluencePage = function SyncedBlockPermissionDeniedConfluencePage(_ref) {
|
|
37
37
|
var sourceContentId = _ref.sourceContentId;
|
|
38
|
-
var _useIntl = (0,
|
|
38
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
39
39
|
formatMessage = _useIntl.formatMessage;
|
|
40
40
|
var _useState = (0, _react.useState)(RequestAccessState.default),
|
|
41
41
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -9,7 +9,7 @@ exports.SyncedBlockUnpublishedError = void 0;
|
|
|
9
9
|
require("./SyncedBlockUnpublishedError.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
12
|
+
var _reactIntl = require("react-intl");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _eyeOpenStrikethrough = _interopRequireDefault(require("@atlaskit/icon/core/eye-open-strikethrough"));
|
|
15
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -19,16 +19,16 @@ var styles = {
|
|
|
19
19
|
};
|
|
20
20
|
var SyncedBlockUnpublishedError = exports.SyncedBlockUnpublishedError = function SyncedBlockUnpublishedError(_ref) {
|
|
21
21
|
var sourceURL = _ref.sourceURL;
|
|
22
|
-
var _useIntl = (0,
|
|
22
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
23
23
|
formatMessage = _useIntl.formatMessage;
|
|
24
24
|
var description = formatMessage(_messages.syncBlockMessages.unpublishedError, {
|
|
25
25
|
link: function link(chunks) {
|
|
26
|
-
return sourceURL ? /*#__PURE__*/_react.default.createElement(_compiled.
|
|
26
|
+
return sourceURL ? /*#__PURE__*/_react.default.createElement(_compiled.Anchor, {
|
|
27
27
|
href: sourceURL,
|
|
28
28
|
target: "_blank",
|
|
29
29
|
rel: 'noopener noreferrer',
|
|
30
30
|
xcss: styles.link
|
|
31
|
-
}, chunks)
|
|
31
|
+
}, chunks) : chunks;
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { memo, useMemo } from 'react';
|
|
3
|
-
import { useIntl } from 'react-intl
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
4
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* SyncedBlockEntityNotFoundError.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./SyncedBlockEntityNotFoundError.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { SYNCED_BLOCKS_DOCUMENTATION_URL } from '@atlaskit/editor-common/sync-block';
|
|
8
|
+
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
9
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
10
|
+
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
11
|
+
const styles = {
|
|
12
|
+
link: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
13
|
+
};
|
|
14
|
+
export const SyncedBlockEntityNotFoundError = () => {
|
|
15
|
+
const {
|
|
16
|
+
formatMessage
|
|
17
|
+
} = useIntl();
|
|
18
|
+
const description = formatMessage(messages.entityNotFoundDescription, {
|
|
19
|
+
link: chunks => /*#__PURE__*/React.createElement(Anchor, {
|
|
20
|
+
href: SYNCED_BLOCKS_DOCUMENTATION_URL,
|
|
21
|
+
target: "_blank",
|
|
22
|
+
rel: "noopener noreferrer",
|
|
23
|
+
xcss: styles.link
|
|
24
|
+
}, chunks)
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
27
|
+
description: description,
|
|
28
|
+
icon: LinkBrokenIcon
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -3,6 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
|
|
|
3
3
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
4
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
5
|
import { fetchErrorPayload, getContentIdAndProductFromResourceId, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
6
|
+
import { SyncedBlockEntityNotFoundError } from './SyncedBlockEntityNotFoundError';
|
|
6
7
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
7
8
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
8
9
|
import { SyncedBlockNotFoundError } from './SyncedBlockNotFoundError';
|
|
@@ -52,6 +53,8 @@ export const SyncedBlockErrorComponent = ({
|
|
|
52
53
|
}, [error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, resourceId, fireAnalyticsEvent]);
|
|
53
54
|
const getErrorContent = useMemo(() => {
|
|
54
55
|
switch (error === null || error === void 0 ? void 0 : error.type) {
|
|
56
|
+
case SyncBlockError.EntityNotFound:
|
|
57
|
+
return /*#__PURE__*/React.createElement(SyncedBlockEntityNotFoundError, null);
|
|
55
58
|
case SyncBlockError.Offline:
|
|
56
59
|
return /*#__PURE__*/React.createElement(SyncedBlockOfflineError, null);
|
|
57
60
|
case SyncBlockError.Forbidden:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
5
|
export const SyncedBlockGenericError = () => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./SyncedBlockLoadError.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import Button from '@atlaskit/button/new';
|
|
7
7
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./SyncedBlockLoadingState.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./SyncedBlockNotFoundError.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import { IconButton } from '@atlaskit/button/new';
|
|
7
7
|
import commonMessages, { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { useSyncBlockActions } from '@atlaskit/editor-common/sync-block';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
5
|
export const SyncedBlockOfflineError = () => {
|
|
@@ -3,7 +3,7 @@ import "./SyncedBlockPermissionDenied.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import _SyncedBlockPermissionDeniedRequestAccessMutation from "./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql";
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
|
-
import { useIntl } from 'react-intl
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
7
|
import { useMutation, graphql } from 'react-relay';
|
|
8
8
|
import Button from '@atlaskit/button/new';
|
|
9
9
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "./SyncedBlockUnpublishedError.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import EyeOpenStrikethroughIcon from '@atlaskit/icon/core/eye-open-strikethrough';
|
|
8
|
-
import { Anchor
|
|
8
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
10
10
|
const styles = {
|
|
11
11
|
link: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
@@ -17,12 +17,12 @@ export const SyncedBlockUnpublishedError = ({
|
|
|
17
17
|
formatMessage
|
|
18
18
|
} = useIntl();
|
|
19
19
|
const description = formatMessage(messages.unpublishedError, {
|
|
20
|
-
link: chunks => sourceURL ? /*#__PURE__*/React.createElement(
|
|
20
|
+
link: chunks => sourceURL ? /*#__PURE__*/React.createElement(Anchor, {
|
|
21
21
|
href: sourceURL,
|
|
22
22
|
target: "_blank",
|
|
23
23
|
rel: 'noopener noreferrer',
|
|
24
24
|
xcss: styles.link
|
|
25
|
-
}, chunks)
|
|
25
|
+
}, chunks) : chunks
|
|
26
26
|
});
|
|
27
27
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
28
28
|
description: description,
|
|
@@ -5,7 +5,7 @@ var _excluded = ["componentKey"];
|
|
|
5
5
|
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; }
|
|
6
6
|
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) { _defineProperty(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; }
|
|
7
7
|
import React, { memo, useMemo } from 'react';
|
|
8
|
-
import { useIntl } from 'react-intl
|
|
8
|
+
import { useIntl } from 'react-intl';
|
|
9
9
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* SyncedBlockEntityNotFoundError.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./SyncedBlockEntityNotFoundError.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { SYNCED_BLOCKS_DOCUMENTATION_URL } from '@atlaskit/editor-common/sync-block';
|
|
8
|
+
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
9
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
10
|
+
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
11
|
+
var styles = {
|
|
12
|
+
link: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
13
|
+
};
|
|
14
|
+
export var SyncedBlockEntityNotFoundError = function SyncedBlockEntityNotFoundError() {
|
|
15
|
+
var _useIntl = useIntl(),
|
|
16
|
+
formatMessage = _useIntl.formatMessage;
|
|
17
|
+
var description = formatMessage(messages.entityNotFoundDescription, {
|
|
18
|
+
link: function link(chunks) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Anchor, {
|
|
20
|
+
href: SYNCED_BLOCKS_DOCUMENTATION_URL,
|
|
21
|
+
target: "_blank",
|
|
22
|
+
rel: "noopener noreferrer",
|
|
23
|
+
xcss: styles.link
|
|
24
|
+
}, chunks);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
28
|
+
description: description,
|
|
29
|
+
icon: LinkBrokenIcon
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -3,6 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
|
|
|
3
3
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
4
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
5
|
import { fetchErrorPayload, getContentIdAndProductFromResourceId, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
6
|
+
import { SyncedBlockEntityNotFoundError } from './SyncedBlockEntityNotFoundError';
|
|
6
7
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
7
8
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
8
9
|
import { SyncedBlockNotFoundError } from './SyncedBlockNotFoundError';
|
|
@@ -50,6 +51,8 @@ export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref)
|
|
|
50
51
|
}, [error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, resourceId, fireAnalyticsEvent]);
|
|
51
52
|
var getErrorContent = useMemo(function () {
|
|
52
53
|
switch (error === null || error === void 0 ? void 0 : error.type) {
|
|
54
|
+
case SyncBlockError.EntityNotFound:
|
|
55
|
+
return /*#__PURE__*/React.createElement(SyncedBlockEntityNotFoundError, null);
|
|
53
56
|
case SyncBlockError.Offline:
|
|
54
57
|
return /*#__PURE__*/React.createElement(SyncedBlockOfflineError, null);
|
|
55
58
|
case SyncBlockError.Forbidden:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
5
|
export var SyncedBlockGenericError = function SyncedBlockGenericError() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./SyncedBlockLoadError.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import Button from '@atlaskit/button/new';
|
|
7
7
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./SyncedBlockLoadingState.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
@@ -5,7 +5,7 @@ import "./SyncedBlockNotFoundError.compiled.css";
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import { useIntl } from 'react-intl
|
|
8
|
+
import { useIntl } from 'react-intl';
|
|
9
9
|
import { IconButton } from '@atlaskit/button/new';
|
|
10
10
|
import commonMessages, { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { useSyncBlockActions } from '@atlaskit/editor-common/sync-block';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
5
|
export var SyncedBlockOfflineError = function SyncedBlockOfflineError() {
|
|
@@ -4,7 +4,7 @@ import "./SyncedBlockPermissionDenied.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import _SyncedBlockPermissionDeniedRequestAccessMutation from "./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql";
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
|
-
import { useIntl } from 'react-intl
|
|
7
|
+
import { useIntl } from 'react-intl';
|
|
8
8
|
import { useMutation, graphql } from 'react-relay';
|
|
9
9
|
import Button from '@atlaskit/button/new';
|
|
10
10
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "./SyncedBlockUnpublishedError.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from 'react-intl
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
6
6
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import EyeOpenStrikethroughIcon from '@atlaskit/icon/core/eye-open-strikethrough';
|
|
8
|
-
import { Anchor
|
|
8
|
+
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
10
10
|
var styles = {
|
|
11
11
|
link: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
@@ -16,12 +16,12 @@ export var SyncedBlockUnpublishedError = function SyncedBlockUnpublishedError(_r
|
|
|
16
16
|
formatMessage = _useIntl.formatMessage;
|
|
17
17
|
var description = formatMessage(messages.unpublishedError, {
|
|
18
18
|
link: function link(chunks) {
|
|
19
|
-
return sourceURL ? /*#__PURE__*/React.createElement(
|
|
19
|
+
return sourceURL ? /*#__PURE__*/React.createElement(Anchor, {
|
|
20
20
|
href: sourceURL,
|
|
21
21
|
target: "_blank",
|
|
22
22
|
rel: 'noopener noreferrer',
|
|
23
23
|
xcss: styles.link
|
|
24
|
-
}, chunks)
|
|
24
|
+
}, chunks) : chunks;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/button": "^23.11.0",
|
|
32
32
|
"@atlaskit/css": "^0.19.0",
|
|
33
|
-
"@atlaskit/editor-plugin-synced-block": "^
|
|
34
|
-
"@atlaskit/editor-synced-block-provider": "^
|
|
33
|
+
"@atlaskit/editor-plugin-synced-block": "^8.0.0",
|
|
34
|
+
"@atlaskit/editor-synced-block-provider": "^6.1.0",
|
|
35
35
|
"@atlaskit/heading": "^5.4.0",
|
|
36
36
|
"@atlaskit/icon": "^34.2.0",
|
|
37
37
|
"@atlaskit/icon-lab": "^6.5.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^19.0.0",
|
|
41
|
-
"@atlaskit/renderer": "^
|
|
41
|
+
"@atlaskit/renderer": "^130.0.0",
|
|
42
42
|
"@atlaskit/spinner": "^19.1.0",
|
|
43
43
|
"@atlaskit/tokens": "^13.0.0",
|
|
44
44
|
"@atlaskit/tooltip": "^21.1.0",
|
|
@@ -48,11 +48,12 @@
|
|
|
48
48
|
"relay-runtime": "npm:atl-relay-runtime@0.0.0-main-39e79f66"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^
|
|
51
|
+
"@atlaskit/editor-common": "^114.1.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
|
-
"react-intl
|
|
53
|
+
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"react-intl": "^6.6.2",
|
|
56
57
|
"typescript": "5.9.2"
|
|
57
58
|
},
|
|
58
59
|
"techstack": {
|