@atlaskit/editor-synced-block-renderer 4.0.2 → 4.0.3
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 +9 -0
- package/afm-cc/tsconfig.json +11 -3
- package/afm-products/tsconfig.json +2 -1
- package/dist/cjs/getSyncedBlockRenderer.js +4 -2
- package/dist/cjs/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/cjs/ui/SyncedBlockErrorStateCard.compiled.css +4 -7
- package/dist/cjs/ui/SyncedBlockErrorStateCard.js +8 -21
- package/dist/cjs/ui/SyncedBlockGenericError.js +1 -3
- package/dist/cjs/ui/SyncedBlockLoadError.js +1 -4
- package/dist/cjs/ui/SyncedBlockLoadingState.compiled.css +0 -2
- package/dist/cjs/ui/SyncedBlockLoadingState.js +14 -7
- package/dist/cjs/ui/SyncedBlockOfflineError.js +18 -0
- package/dist/cjs/ui/SyncedBlockPermissionDenied.compiled.css +8 -0
- package/dist/cjs/ui/SyncedBlockPermissionDenied.js +23 -8
- package/dist/cjs/ui/SyncedBlockRenderer.js +15 -1
- package/dist/es2019/getSyncedBlockRenderer.js +4 -2
- package/dist/es2019/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/es2019/ui/SyncedBlockErrorStateCard.compiled.css +4 -7
- package/dist/es2019/ui/SyncedBlockErrorStateCard.js +9 -22
- package/dist/es2019/ui/SyncedBlockGenericError.js +1 -3
- package/dist/es2019/ui/SyncedBlockLoadError.js +1 -4
- package/dist/es2019/ui/SyncedBlockLoadingState.compiled.css +0 -2
- package/dist/es2019/ui/SyncedBlockLoadingState.js +14 -7
- package/dist/es2019/ui/SyncedBlockOfflineError.js +12 -0
- package/dist/es2019/ui/SyncedBlockPermissionDenied.compiled.css +8 -0
- package/dist/es2019/ui/SyncedBlockPermissionDenied.js +24 -9
- package/dist/es2019/ui/SyncedBlockRenderer.js +15 -1
- package/dist/esm/getSyncedBlockRenderer.js +4 -2
- package/dist/esm/ui/SyncedBlockErrorComponent.js +3 -0
- package/dist/esm/ui/SyncedBlockErrorStateCard.compiled.css +4 -7
- package/dist/esm/ui/SyncedBlockErrorStateCard.js +9 -22
- package/dist/esm/ui/SyncedBlockGenericError.js +1 -3
- package/dist/esm/ui/SyncedBlockLoadError.js +1 -4
- package/dist/esm/ui/SyncedBlockLoadingState.compiled.css +0 -2
- package/dist/esm/ui/SyncedBlockLoadingState.js +14 -7
- package/dist/esm/ui/SyncedBlockOfflineError.js +11 -0
- package/dist/esm/ui/SyncedBlockPermissionDenied.compiled.css +8 -0
- package/dist/esm/ui/SyncedBlockPermissionDenied.js +24 -9
- package/dist/esm/ui/SyncedBlockRenderer.js +15 -1
- package/dist/types/getSyncedBlockRenderer.d.ts +1 -1
- package/dist/types/ui/SyncedBlockErrorStateCard.d.ts +2 -5
- package/dist/types/ui/SyncedBlockOfflineError.d.ts +2 -0
- package/dist/types/ui/SyncedBlockRenderer.d.ts +4 -1
- package/dist/types-ts4.5/getSyncedBlockRenderer.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockErrorStateCard.d.ts +2 -5
- package/dist/types-ts4.5/ui/SyncedBlockOfflineError.d.ts +2 -0
- package/dist/types-ts4.5/ui/SyncedBlockRenderer.d.ts +4 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dcc6a3e73f414`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dcc6a3e73f414) -
|
|
8
|
+
[ux] EDITOR-3304 add offline error state for sync blocks and update other error UI to match new
|
|
9
|
+
designs
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.0.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"target": "es5",
|
|
5
5
|
"outDir": "../../../../../confluence/tsDist/@atlaskit__editor-synced-block-renderer",
|
|
6
6
|
"rootDir": "../",
|
|
7
|
-
"composite": true
|
|
7
|
+
"composite": true,
|
|
8
|
+
"noCheck": true
|
|
8
9
|
},
|
|
9
10
|
"include": [
|
|
10
11
|
"../src/**/*.ts",
|
|
@@ -14,8 +15,12 @@
|
|
|
14
15
|
"../src/**/__tests__/*",
|
|
15
16
|
"../src/**/*.test.*",
|
|
16
17
|
"../src/**/test.*",
|
|
17
|
-
"../src/**/
|
|
18
|
-
"../src/**/examples
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
19
24
|
],
|
|
20
25
|
"references": [
|
|
21
26
|
{
|
|
@@ -36,6 +41,9 @@
|
|
|
36
41
|
{
|
|
37
42
|
"path": "../../../design-system/icon/afm-cc/tsconfig.json"
|
|
38
43
|
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../design-system/icon-lab/afm-cc/tsconfig.json"
|
|
46
|
+
},
|
|
39
47
|
{
|
|
40
48
|
"path": "../../../design-system/image/afm-cc/tsconfig.json"
|
|
41
49
|
},
|
|
@@ -11,10 +11,12 @@ 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 useFetchSyncBlockData = _ref2.useFetchSyncBlockData
|
|
14
|
+
var useFetchSyncBlockData = _ref2.useFetchSyncBlockData,
|
|
15
|
+
api = _ref2.api;
|
|
15
16
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockRenderer.SyncedBlockRenderer, {
|
|
16
17
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
17
|
-
useFetchSyncBlockData: useFetchSyncBlockData
|
|
18
|
+
useFetchSyncBlockData: useFetchSyncBlockData,
|
|
19
|
+
api: api
|
|
18
20
|
});
|
|
19
21
|
};
|
|
20
22
|
};
|
|
@@ -10,6 +10,7 @@ var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
|
10
10
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
11
11
|
var _SyncedBlockGenericError = require("./SyncedBlockGenericError");
|
|
12
12
|
var _SyncedBlockLoadError = require("./SyncedBlockLoadError");
|
|
13
|
+
var _SyncedBlockOfflineError = require("./SyncedBlockOfflineError");
|
|
13
14
|
var _SyncedBlockPermissionDenied = require("./SyncedBlockPermissionDenied");
|
|
14
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
16
|
var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref) {
|
|
@@ -20,6 +21,8 @@ var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function Syn
|
|
|
20
21
|
sourceProduct = _ref.sourceProduct;
|
|
21
22
|
var getErrorContent = (0, _react.useMemo)(function () {
|
|
22
23
|
switch (error) {
|
|
24
|
+
case _editorSyncedBlockProvider.SyncBlockError.Offline:
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockOfflineError.SyncedBlockOfflineError, null);
|
|
23
26
|
case _editorSyncedBlockProvider.SyncBlockError.Forbidden:
|
|
24
27
|
if (!sourceAri || !sourceProduct) {
|
|
25
28
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockGenericError.SyncedBlockGenericError, null);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
3
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
4
|
-
._19bvxy5q{padding-left:var(--ds-space-400,2pc)}
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
3
|
._1bahv2br{justify-content:start}
|
|
6
4
|
._1e0c1txw{display:flex}
|
|
7
5
|
._4cvr1h6o{align-items:center}
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
.
|
|
11
|
-
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
6
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
7
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
8
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
@@ -9,33 +9,20 @@ exports.SyncedBlockErrorStateCard = void 0;
|
|
|
9
9
|
require("./SyncedBlockErrorStateCard.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
13
|
-
var _image = _interopRequireDefault(require("@atlaskit/image"));
|
|
12
|
+
var _warningOutline = _interopRequireDefault(require("@atlaskit/icon-lab/core/warning-outline"));
|
|
14
13
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
14
|
var styles = {
|
|
16
|
-
wrapper: "
|
|
17
|
-
textWrapper: "_18u0u2gc"
|
|
15
|
+
wrapper: "_zulppxbi _ca0qu2gc _n3tdu2gc _19bvpxbi _u5f3pxbi _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
18
16
|
};
|
|
19
17
|
var SyncedBlockErrorStateCard = exports.SyncedBlockErrorStateCard = function SyncedBlockErrorStateCard(_ref) {
|
|
20
18
|
var children = _ref.children,
|
|
21
|
-
|
|
22
|
-
imageSrc = _ref.imageSrc,
|
|
23
|
-
primaryMessage = _ref.primaryMessage,
|
|
24
|
-
secondaryMessage = _ref.secondaryMessage;
|
|
19
|
+
description = _ref.description;
|
|
25
20
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
26
21
|
xcss: styles.wrapper
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
height: "48"
|
|
32
|
-
}), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
33
|
-
space: "space.100",
|
|
34
|
-
alignInline: "start",
|
|
35
|
-
xcss: styles.textWrapper
|
|
36
|
-
}, primaryMessage && /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
37
|
-
size: "xsmall"
|
|
38
|
-
}, primaryMessage), secondaryMessage && /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_warningOutline.default, {
|
|
23
|
+
color: "var(--ds-icon-subtle, #505258)",
|
|
24
|
+
label: ""
|
|
25
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
39
26
|
color: "color.text.subtle"
|
|
40
|
-
},
|
|
27
|
+
}, description), children);
|
|
41
28
|
};
|
|
@@ -8,13 +8,11 @@ exports.SyncedBlockGenericError = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
|
-
var _ExclamationWarning = _interopRequireDefault(require("./assets/ExclamationWarning.svg"));
|
|
12
11
|
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
13
12
|
var SyncedBlockGenericError = exports.SyncedBlockGenericError = function SyncedBlockGenericError() {
|
|
14
13
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
15
14
|
formatMessage = _useIntl.formatMessage;
|
|
16
15
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
17
|
-
|
|
18
|
-
secondaryMessage: formatMessage(_messages.syncBlockMessages.generalErrorDescription)
|
|
16
|
+
description: formatMessage(_messages.syncBlockMessages.generalErrorDescription)
|
|
19
17
|
});
|
|
20
18
|
};
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
|
-
var _ExclamationWarning = _interopRequireDefault(require("./assets/ExclamationWarning.svg"));
|
|
13
12
|
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
14
13
|
var SyncedBlockLoadError = exports.SyncedBlockLoadError = function SyncedBlockLoadError(_ref) {
|
|
15
14
|
var onRetry = _ref.onRetry,
|
|
@@ -17,9 +16,7 @@ var SyncedBlockLoadError = exports.SyncedBlockLoadError = function SyncedBlockLo
|
|
|
17
16
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
18
17
|
formatMessage = _useIntl.formatMessage;
|
|
19
18
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
20
|
-
|
|
21
|
-
imageAltText: formatMessage(_messages.syncBlockMessages.notFoundAltText),
|
|
22
|
-
secondaryMessage: formatMessage(_messages.syncBlockMessages.notFoundDescription)
|
|
19
|
+
description: formatMessage(_messages.syncBlockMessages.generalErrorDescription)
|
|
23
20
|
}, onRetry && /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
24
21
|
appearance: "default",
|
|
25
22
|
spacing: "compact",
|
|
@@ -9,16 +9,23 @@ 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 _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
12
13
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
14
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
14
15
|
var styles = {
|
|
15
|
-
wrapper: "
|
|
16
|
+
wrapper: "_1tkevbgk _1e0c1txw _1bah1h6o _4cvr1h6o"
|
|
16
17
|
};
|
|
17
18
|
var SyncedBlockLoadingState = exports.SyncedBlockLoadingState = function SyncedBlockLoadingState() {
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
return (
|
|
20
|
+
/*#__PURE__*/
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
|
|
22
|
+
_react.default.createElement("div", {
|
|
23
|
+
className: _syncBlock.SyncBlockSharedCssClassName.loading
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
25
|
+
xcss: styles.wrapper
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
27
|
+
size: "small",
|
|
28
|
+
label: "Loading synced content"
|
|
29
|
+
})))
|
|
30
|
+
);
|
|
24
31
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SyncedBlockOfflineError = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactIntlNext = require("react-intl-next");
|
|
10
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
|
+
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
12
|
+
var SyncedBlockOfflineError = exports.SyncedBlockOfflineError = function SyncedBlockOfflineError() {
|
|
13
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
14
|
+
formatMessage = _useIntl.formatMessage;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorStateCard.SyncedBlockErrorStateCard, {
|
|
16
|
+
description: formatMessage(_messages.syncBlockMessages.offlineError)
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
3
|
+
._1bahv2br{justify-content:start}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._4cvr1h6o{align-items:center}
|
|
6
|
+
._ca0qv47k{padding-top:var(--ds-space-250,20px)}
|
|
7
|
+
._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
|
|
8
|
+
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* SyncedBlockPermissionDenied.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.SyncedBlockPermissionDenied = void 0;
|
|
10
|
+
require("./SyncedBlockPermissionDenied.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
13
|
var _SyncedBlockPermissionDeniedRequestAccessMutation2 = _interopRequireDefault(require("./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql"));
|
|
11
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -14,12 +17,16 @@ var _reactRelay = require("react-relay");
|
|
|
14
17
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
15
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
16
19
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
20
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
17
21
|
var _statusSuccess = _interopRequireDefault(require("@atlaskit/icon/core/status-success"));
|
|
22
|
+
var _image = _interopRequireDefault(require("@atlaskit/image"));
|
|
18
23
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
24
|
var _PermissionDenied = _interopRequireDefault(require("./assets/PermissionDenied.svg"));
|
|
20
|
-
var _SyncedBlockErrorStateCard = require("./SyncedBlockErrorStateCard");
|
|
21
25
|
var _SyncedBlockGenericError = require("./SyncedBlockGenericError");
|
|
22
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
|
+
var styles = {
|
|
28
|
+
wrapper: "_zulppxbi _ca0qv47k _n3tdv47k _19bvv47k _u5f3v47k _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
29
|
+
};
|
|
23
30
|
var RequestAccessState = /*#__PURE__*/function (RequestAccessState) {
|
|
24
31
|
RequestAccessState["default"] = "default";
|
|
25
32
|
RequestAccessState["errored"] = "errored";
|
|
@@ -60,12 +67,20 @@ var SyncedBlockPermissionDeniedConfluencePage = function SyncedBlockPermissionDe
|
|
|
60
67
|
onError: handleRequestError
|
|
61
68
|
});
|
|
62
69
|
};
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
71
|
+
xcss: styles.wrapper
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
73
|
+
src: _PermissionDenied.default,
|
|
74
|
+
alt: formatMessage(_messages.syncBlockMessages.permissionDeniedAltText),
|
|
75
|
+
width: "48",
|
|
76
|
+
height: "48"
|
|
77
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
78
|
+
space: "space.100"
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
80
|
+
size: "xsmall"
|
|
81
|
+
}, formatMessage(_messages.syncBlockMessages.permissionDeniedHeading)), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
82
|
+
color: "color.text.subtle"
|
|
83
|
+
}, formatMessage(_messages.syncBlockMessages.permissionDeniedDescription)), requestAccessState === RequestAccessState.pending ? /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
69
84
|
columnGap: "space.050",
|
|
70
85
|
alignItems: "center"
|
|
71
86
|
}, /*#__PURE__*/_react.default.createElement(_statusSuccess.default, {
|
|
@@ -88,7 +103,7 @@ var SyncedBlockPermissionDeniedConfluencePage = function SyncedBlockPermissionDe
|
|
|
88
103
|
}, formatMessage(_messages.syncBlockMessages.requestAccessButton)), requestAccessState === RequestAccessState.errored && /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
89
104
|
color: "color.text.warning",
|
|
90
105
|
testId: "sync-block-access-error-msg"
|
|
91
|
-
}, formatMessage(_messages.syncBlockMessages.requestAccessError))));
|
|
106
|
+
}, formatMessage(_messages.syncBlockMessages.requestAccessError)))));
|
|
92
107
|
};
|
|
93
108
|
var SyncedBlockPermissionDenied = exports.SyncedBlockPermissionDenied = function SyncedBlockPermissionDenied(_ref2) {
|
|
94
109
|
var sourceAri = _ref2.sourceAri,
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SyncedBlockRenderer = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
9
10
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
10
11
|
var _AKRendererWrapper = require("./AKRendererWrapper");
|
|
11
12
|
var _SyncedBlockErrorComponent = require("./SyncedBlockErrorComponent");
|
|
@@ -13,12 +14,25 @@ var _SyncedBlockLoadingState = require("./SyncedBlockLoadingState");
|
|
|
13
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
15
|
var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
15
16
|
var useFetchSyncBlockData = _ref.useFetchSyncBlockData,
|
|
16
|
-
syncBlockRendererOptions = _ref.syncBlockRendererOptions
|
|
17
|
+
syncBlockRendererOptions = _ref.syncBlockRendererOptions,
|
|
18
|
+
api = _ref.api;
|
|
17
19
|
var _useFetchSyncBlockDat = useFetchSyncBlockData(),
|
|
18
20
|
syncBlockInstance = _useFetchSyncBlockDat.syncBlockInstance,
|
|
19
21
|
providerFactory = _useFetchSyncBlockDat.providerFactory,
|
|
20
22
|
isLoading = _useFetchSyncBlockDat.isLoading,
|
|
21
23
|
reloadData = _useFetchSyncBlockDat.reloadData;
|
|
24
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['connectivity'], function (_ref2) {
|
|
25
|
+
var connectivityState = _ref2.connectivityState;
|
|
26
|
+
return {
|
|
27
|
+
isOffline: (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline'
|
|
28
|
+
};
|
|
29
|
+
}),
|
|
30
|
+
isOffline = _useSharedPluginState.isOffline;
|
|
31
|
+
if (isOffline) {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
33
|
+
error: _editorSyncedBlockProvider.SyncBlockError.Offline
|
|
34
|
+
});
|
|
35
|
+
}
|
|
22
36
|
if (!syncBlockInstance) {
|
|
23
37
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockLoadingState.SyncedBlockLoadingState, null);
|
|
24
38
|
}
|
|
@@ -4,10 +4,12 @@ import { SyncedBlockRenderer } from './ui/SyncedBlockRenderer';
|
|
|
4
4
|
export const getSyncedBlockRenderer = ({
|
|
5
5
|
syncBlockRendererOptions
|
|
6
6
|
}) => ({
|
|
7
|
-
useFetchSyncBlockData
|
|
7
|
+
useFetchSyncBlockData,
|
|
8
|
+
api
|
|
8
9
|
}) => {
|
|
9
10
|
return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
|
|
10
11
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
11
|
-
useFetchSyncBlockData: useFetchSyncBlockData
|
|
12
|
+
useFetchSyncBlockData: useFetchSyncBlockData,
|
|
13
|
+
api: api
|
|
12
14
|
});
|
|
13
15
|
};
|
|
@@ -3,6 +3,7 @@ import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block'
|
|
|
3
3
|
import { SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
5
5
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
6
|
+
import { SyncedBlockOfflineError } from './SyncedBlockOfflineError';
|
|
6
7
|
import { SyncedBlockPermissionDenied } from './SyncedBlockPermissionDenied';
|
|
7
8
|
export const SyncedBlockErrorComponent = ({
|
|
8
9
|
error,
|
|
@@ -13,6 +14,8 @@ export const SyncedBlockErrorComponent = ({
|
|
|
13
14
|
}) => {
|
|
14
15
|
const getErrorContent = useMemo(() => {
|
|
15
16
|
switch (error) {
|
|
17
|
+
case SyncBlockError.Offline:
|
|
18
|
+
return /*#__PURE__*/React.createElement(SyncedBlockOfflineError, null);
|
|
16
19
|
case SyncBlockError.Forbidden:
|
|
17
20
|
if (!sourceAri || !sourceProduct) {
|
|
18
21
|
return /*#__PURE__*/React.createElement(SyncedBlockGenericError, null);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
3
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
4
|
-
._19bvxy5q{padding-left:var(--ds-space-400,2pc)}
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
3
|
._1bahv2br{justify-content:start}
|
|
6
4
|
._1e0c1txw{display:flex}
|
|
7
5
|
._4cvr1h6o{align-items:center}
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
.
|
|
11
|
-
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
6
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
7
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
8
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
@@ -2,34 +2,21 @@
|
|
|
2
2
|
import "./SyncedBlockErrorStateCard.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import WarningOutlineIcon from '@atlaskit/icon-lab/core/warning-outline';
|
|
6
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
8
7
|
const styles = {
|
|
9
|
-
wrapper: "
|
|
10
|
-
textWrapper: "_18u0u2gc"
|
|
8
|
+
wrapper: "_zulppxbi _ca0qu2gc _n3tdu2gc _19bvpxbi _u5f3pxbi _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
11
9
|
};
|
|
12
10
|
export const SyncedBlockErrorStateCard = ({
|
|
13
11
|
children,
|
|
14
|
-
|
|
15
|
-
imageSrc,
|
|
16
|
-
primaryMessage,
|
|
17
|
-
secondaryMessage
|
|
12
|
+
description
|
|
18
13
|
}) => {
|
|
19
14
|
return /*#__PURE__*/React.createElement(Box, {
|
|
20
15
|
xcss: styles.wrapper
|
|
21
|
-
}, /*#__PURE__*/React.createElement(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
height: "48"
|
|
26
|
-
}), /*#__PURE__*/React.createElement(Stack, {
|
|
27
|
-
space: "space.100",
|
|
28
|
-
alignInline: "start",
|
|
29
|
-
xcss: styles.textWrapper
|
|
30
|
-
}, primaryMessage && /*#__PURE__*/React.createElement(Heading, {
|
|
31
|
-
size: "xsmall"
|
|
32
|
-
}, primaryMessage), secondaryMessage && /*#__PURE__*/React.createElement(Text, {
|
|
16
|
+
}, /*#__PURE__*/React.createElement(WarningOutlineIcon, {
|
|
17
|
+
color: "var(--ds-icon-subtle, #505258)",
|
|
18
|
+
label: ""
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
33
20
|
color: "color.text.subtle"
|
|
34
|
-
},
|
|
21
|
+
}, description), children);
|
|
35
22
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import ExclamationWarning from './assets/ExclamationWarning.svg';
|
|
5
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
6
5
|
export const SyncedBlockGenericError = () => {
|
|
7
6
|
const {
|
|
8
7
|
formatMessage
|
|
9
8
|
} = useIntl();
|
|
10
9
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
11
|
-
|
|
12
|
-
secondaryMessage: formatMessage(messages.generalErrorDescription)
|
|
10
|
+
description: formatMessage(messages.generalErrorDescription)
|
|
13
11
|
});
|
|
14
12
|
};
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import Button from '@atlaskit/button/new';
|
|
4
4
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import ExclamationWarning from './assets/ExclamationWarning.svg';
|
|
6
5
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
7
6
|
export const SyncedBlockLoadError = ({
|
|
8
7
|
onRetry,
|
|
@@ -12,9 +11,7 @@ export const SyncedBlockLoadError = ({
|
|
|
12
11
|
formatMessage
|
|
13
12
|
} = useIntl();
|
|
14
13
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
15
|
-
|
|
16
|
-
imageAltText: formatMessage(messages.notFoundAltText),
|
|
17
|
-
secondaryMessage: formatMessage(messages.notFoundDescription)
|
|
14
|
+
description: formatMessage(messages.generalErrorDescription)
|
|
18
15
|
}, onRetry && /*#__PURE__*/React.createElement(Button, {
|
|
19
16
|
appearance: "default",
|
|
20
17
|
spacing: "compact",
|
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
import "./SyncedBlockLoadingState.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
7
|
import Spinner from '@atlaskit/spinner';
|
|
7
8
|
const styles = {
|
|
8
|
-
wrapper: "
|
|
9
|
+
wrapper: "_1tkevbgk _1e0c1txw _1bah1h6o _4cvr1h6o"
|
|
9
10
|
};
|
|
10
11
|
export const SyncedBlockLoadingState = () => {
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return (
|
|
13
|
+
/*#__PURE__*/
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
|
|
15
|
+
React.createElement("div", {
|
|
16
|
+
className: SyncBlockSharedCssClassName.loading
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
18
|
+
xcss: styles.wrapper
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
20
|
+
size: "small",
|
|
21
|
+
label: "Loading synced content"
|
|
22
|
+
})))
|
|
23
|
+
);
|
|
17
24
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
+
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
|
+
export const SyncedBlockOfflineError = () => {
|
|
6
|
+
const {
|
|
7
|
+
formatMessage
|
|
8
|
+
} = useIntl();
|
|
9
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
10
|
+
description: formatMessage(messages.offlineError)
|
|
11
|
+
});
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
3
|
+
._1bahv2br{justify-content:start}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._4cvr1h6o{align-items:center}
|
|
6
|
+
._ca0qv47k{padding-top:var(--ds-space-250,20px)}
|
|
7
|
+
._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
|
|
8
|
+
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* SyncedBlockPermissionDenied.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import "./SyncedBlockPermissionDenied.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import _SyncedBlockPermissionDeniedRequestAccessMutation from "./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql";
|
|
2
5
|
import React, { useState } from 'react';
|
|
3
6
|
import { useIntl } from 'react-intl-next';
|
|
@@ -5,11 +8,15 @@ import { useMutation, graphql } from 'react-relay';
|
|
|
5
8
|
import Button from '@atlaskit/button/new';
|
|
6
9
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
10
|
import { getPageIdAndTypeFromConfluencePageAri } from '@atlaskit/editor-synced-block-provider';
|
|
11
|
+
import Heading from '@atlaskit/heading';
|
|
8
12
|
import StatusSuccessIcon from '@atlaskit/icon/core/status-success';
|
|
9
|
-
import
|
|
13
|
+
import Image from '@atlaskit/image';
|
|
14
|
+
import { Text, Flex, Stack, Box } from '@atlaskit/primitives/compiled';
|
|
10
15
|
import PermissionDenied from './assets/PermissionDenied.svg';
|
|
11
|
-
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
12
16
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
17
|
+
const styles = {
|
|
18
|
+
wrapper: "_zulppxbi _ca0qv47k _n3tdv47k _19bvv47k _u5f3v47k _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
19
|
+
};
|
|
13
20
|
var RequestAccessState = /*#__PURE__*/function (RequestAccessState) {
|
|
14
21
|
RequestAccessState["default"] = "default";
|
|
15
22
|
RequestAccessState["errored"] = "errored";
|
|
@@ -47,12 +54,20 @@ const SyncedBlockPermissionDeniedConfluencePage = ({
|
|
|
47
54
|
onError: handleRequestError
|
|
48
55
|
});
|
|
49
56
|
};
|
|
50
|
-
return /*#__PURE__*/React.createElement(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
58
|
+
xcss: styles.wrapper
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
60
|
+
src: PermissionDenied,
|
|
61
|
+
alt: formatMessage(messages.permissionDeniedAltText),
|
|
62
|
+
width: "48",
|
|
63
|
+
height: "48"
|
|
64
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
65
|
+
space: "space.100"
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
67
|
+
size: "xsmall"
|
|
68
|
+
}, formatMessage(messages.permissionDeniedHeading)), /*#__PURE__*/React.createElement(Text, {
|
|
69
|
+
color: "color.text.subtle"
|
|
70
|
+
}, formatMessage(messages.permissionDeniedDescription)), requestAccessState === RequestAccessState.pending ? /*#__PURE__*/React.createElement(Flex, {
|
|
56
71
|
columnGap: "space.050",
|
|
57
72
|
alignItems: "center"
|
|
58
73
|
}, /*#__PURE__*/React.createElement(StatusSuccessIcon, {
|
|
@@ -75,7 +90,7 @@ const SyncedBlockPermissionDeniedConfluencePage = ({
|
|
|
75
90
|
}, formatMessage(messages.requestAccessButton)), requestAccessState === RequestAccessState.errored && /*#__PURE__*/React.createElement(Text, {
|
|
76
91
|
color: "color.text.warning",
|
|
77
92
|
testId: "sync-block-access-error-msg"
|
|
78
|
-
}, formatMessage(messages.requestAccessError))));
|
|
93
|
+
}, formatMessage(messages.requestAccessError)))));
|
|
79
94
|
};
|
|
80
95
|
export const SyncedBlockPermissionDenied = ({
|
|
81
96
|
sourceAri,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
2
3
|
import { SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
3
4
|
import { AKRendererWrapper } from './AKRendererWrapper';
|
|
4
5
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
5
6
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
6
7
|
const SyncedBlockRendererComponent = ({
|
|
7
8
|
useFetchSyncBlockData,
|
|
8
|
-
syncBlockRendererOptions
|
|
9
|
+
syncBlockRendererOptions,
|
|
10
|
+
api
|
|
9
11
|
}) => {
|
|
10
12
|
const {
|
|
11
13
|
syncBlockInstance,
|
|
@@ -13,6 +15,18 @@ const SyncedBlockRendererComponent = ({
|
|
|
13
15
|
isLoading,
|
|
14
16
|
reloadData
|
|
15
17
|
} = useFetchSyncBlockData();
|
|
18
|
+
const {
|
|
19
|
+
isOffline
|
|
20
|
+
} = useSharedPluginStateWithSelector(api, ['connectivity'], ({
|
|
21
|
+
connectivityState
|
|
22
|
+
}) => ({
|
|
23
|
+
isOffline: (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline'
|
|
24
|
+
}));
|
|
25
|
+
if (isOffline) {
|
|
26
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
27
|
+
error: SyncBlockError.Offline
|
|
28
|
+
});
|
|
29
|
+
}
|
|
16
30
|
if (!syncBlockInstance) {
|
|
17
31
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
18
32
|
}
|
|
@@ -4,10 +4,12 @@ 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 useFetchSyncBlockData = _ref2.useFetchSyncBlockData
|
|
7
|
+
var useFetchSyncBlockData = _ref2.useFetchSyncBlockData,
|
|
8
|
+
api = _ref2.api;
|
|
8
9
|
return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
|
|
9
10
|
syncBlockRendererOptions: syncBlockRendererOptions,
|
|
10
|
-
useFetchSyncBlockData: useFetchSyncBlockData
|
|
11
|
+
useFetchSyncBlockData: useFetchSyncBlockData,
|
|
12
|
+
api: api
|
|
11
13
|
});
|
|
12
14
|
};
|
|
13
15
|
};
|
|
@@ -3,6 +3,7 @@ import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block'
|
|
|
3
3
|
import { SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
5
5
|
import { SyncedBlockLoadError } from './SyncedBlockLoadError';
|
|
6
|
+
import { SyncedBlockOfflineError } from './SyncedBlockOfflineError';
|
|
6
7
|
import { SyncedBlockPermissionDenied } from './SyncedBlockPermissionDenied';
|
|
7
8
|
export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref) {
|
|
8
9
|
var error = _ref.error,
|
|
@@ -12,6 +13,8 @@ export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref)
|
|
|
12
13
|
sourceProduct = _ref.sourceProduct;
|
|
13
14
|
var getErrorContent = useMemo(function () {
|
|
14
15
|
switch (error) {
|
|
16
|
+
case SyncBlockError.Offline:
|
|
17
|
+
return /*#__PURE__*/React.createElement(SyncedBlockOfflineError, null);
|
|
15
18
|
case SyncBlockError.Forbidden:
|
|
16
19
|
if (!sourceAri || !sourceProduct) {
|
|
17
20
|
return /*#__PURE__*/React.createElement(SyncedBlockGenericError, null);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
3
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
4
|
-
._19bvxy5q{padding-left:var(--ds-space-400,2pc)}
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
5
3
|
._1bahv2br{justify-content:start}
|
|
6
4
|
._1e0c1txw{display:flex}
|
|
7
5
|
._4cvr1h6o{align-items:center}
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
.
|
|
11
|
-
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
6
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
7
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
8
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
@@ -2,33 +2,20 @@
|
|
|
2
2
|
import "./SyncedBlockErrorStateCard.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import WarningOutlineIcon from '@atlaskit/icon-lab/core/warning-outline';
|
|
6
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
8
7
|
var styles = {
|
|
9
|
-
wrapper: "
|
|
10
|
-
textWrapper: "_18u0u2gc"
|
|
8
|
+
wrapper: "_zulppxbi _ca0qu2gc _n3tdu2gc _19bvpxbi _u5f3pxbi _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
11
9
|
};
|
|
12
10
|
export var SyncedBlockErrorStateCard = function SyncedBlockErrorStateCard(_ref) {
|
|
13
11
|
var children = _ref.children,
|
|
14
|
-
|
|
15
|
-
imageSrc = _ref.imageSrc,
|
|
16
|
-
primaryMessage = _ref.primaryMessage,
|
|
17
|
-
secondaryMessage = _ref.secondaryMessage;
|
|
12
|
+
description = _ref.description;
|
|
18
13
|
return /*#__PURE__*/React.createElement(Box, {
|
|
19
14
|
xcss: styles.wrapper
|
|
20
|
-
}, /*#__PURE__*/React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
height: "48"
|
|
25
|
-
}), /*#__PURE__*/React.createElement(Stack, {
|
|
26
|
-
space: "space.100",
|
|
27
|
-
alignInline: "start",
|
|
28
|
-
xcss: styles.textWrapper
|
|
29
|
-
}, primaryMessage && /*#__PURE__*/React.createElement(Heading, {
|
|
30
|
-
size: "xsmall"
|
|
31
|
-
}, primaryMessage), secondaryMessage && /*#__PURE__*/React.createElement(Text, {
|
|
15
|
+
}, /*#__PURE__*/React.createElement(WarningOutlineIcon, {
|
|
16
|
+
color: "var(--ds-icon-subtle, #505258)",
|
|
17
|
+
label: ""
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
32
19
|
color: "color.text.subtle"
|
|
33
|
-
},
|
|
20
|
+
}, description), children);
|
|
34
21
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import ExclamationWarning from './assets/ExclamationWarning.svg';
|
|
5
4
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
6
5
|
export var SyncedBlockGenericError = function SyncedBlockGenericError() {
|
|
7
6
|
var _useIntl = useIntl(),
|
|
8
7
|
formatMessage = _useIntl.formatMessage;
|
|
9
8
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
10
|
-
|
|
11
|
-
secondaryMessage: formatMessage(messages.generalErrorDescription)
|
|
9
|
+
description: formatMessage(messages.generalErrorDescription)
|
|
12
10
|
});
|
|
13
11
|
};
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import Button from '@atlaskit/button/new';
|
|
4
4
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
-
import ExclamationWarning from './assets/ExclamationWarning.svg';
|
|
6
5
|
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
7
6
|
export var SyncedBlockLoadError = function SyncedBlockLoadError(_ref) {
|
|
8
7
|
var onRetry = _ref.onRetry,
|
|
@@ -10,9 +9,7 @@ export var SyncedBlockLoadError = function SyncedBlockLoadError(_ref) {
|
|
|
10
9
|
var _useIntl = useIntl(),
|
|
11
10
|
formatMessage = _useIntl.formatMessage;
|
|
12
11
|
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
13
|
-
|
|
14
|
-
imageAltText: formatMessage(messages.notFoundAltText),
|
|
15
|
-
secondaryMessage: formatMessage(messages.notFoundDescription)
|
|
12
|
+
description: formatMessage(messages.generalErrorDescription)
|
|
16
13
|
}, onRetry && /*#__PURE__*/React.createElement(Button, {
|
|
17
14
|
appearance: "default",
|
|
18
15
|
spacing: "compact",
|
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
import "./SyncedBlockLoadingState.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
7
|
import Spinner from '@atlaskit/spinner';
|
|
7
8
|
var styles = {
|
|
8
|
-
wrapper: "
|
|
9
|
+
wrapper: "_1tkevbgk _1e0c1txw _1bah1h6o _4cvr1h6o"
|
|
9
10
|
};
|
|
10
11
|
export var SyncedBlockLoadingState = function SyncedBlockLoadingState() {
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return (
|
|
13
|
+
/*#__PURE__*/
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides
|
|
15
|
+
React.createElement("div", {
|
|
16
|
+
className: SyncBlockSharedCssClassName.loading
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
18
|
+
xcss: styles.wrapper
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
20
|
+
size: "small",
|
|
21
|
+
label: "Loading synced content"
|
|
22
|
+
})))
|
|
23
|
+
);
|
|
17
24
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
+
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
5
|
+
export var SyncedBlockOfflineError = function SyncedBlockOfflineError() {
|
|
6
|
+
var _useIntl = useIntl(),
|
|
7
|
+
formatMessage = _useIntl.formatMessage;
|
|
8
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorStateCard, {
|
|
9
|
+
description: formatMessage(messages.offlineError)
|
|
10
|
+
});
|
|
11
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
3
|
+
._1bahv2br{justify-content:start}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._4cvr1h6o{align-items:center}
|
|
6
|
+
._ca0qv47k{padding-top:var(--ds-space-250,20px)}
|
|
7
|
+
._n3tdv47k{padding-bottom:var(--ds-space-250,20px)}
|
|
8
|
+
._u5f3v47k{padding-right:var(--ds-space-250,20px)}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
/* SyncedBlockPermissionDenied.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "./SyncedBlockPermissionDenied.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
5
|
import _SyncedBlockPermissionDeniedRequestAccessMutation from "./__generated__/SyncedBlockPermissionDeniedRequestAccessMutation.graphql";
|
|
3
6
|
import React, { useState } from 'react';
|
|
4
7
|
import { useIntl } from 'react-intl-next';
|
|
@@ -6,11 +9,15 @@ import { useMutation, graphql } from 'react-relay';
|
|
|
6
9
|
import Button from '@atlaskit/button/new';
|
|
7
10
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
11
|
import { getPageIdAndTypeFromConfluencePageAri } from '@atlaskit/editor-synced-block-provider';
|
|
12
|
+
import Heading from '@atlaskit/heading';
|
|
9
13
|
import StatusSuccessIcon from '@atlaskit/icon/core/status-success';
|
|
10
|
-
import
|
|
14
|
+
import Image from '@atlaskit/image';
|
|
15
|
+
import { Text, Flex, Stack, Box } from '@atlaskit/primitives/compiled';
|
|
11
16
|
import PermissionDenied from './assets/PermissionDenied.svg';
|
|
12
|
-
import { SyncedBlockErrorStateCard } from './SyncedBlockErrorStateCard';
|
|
13
17
|
import { SyncedBlockGenericError } from './SyncedBlockGenericError';
|
|
18
|
+
var styles = {
|
|
19
|
+
wrapper: "_zulppxbi _ca0qv47k _n3tdv47k _19bvv47k _u5f3v47k _1e0c1txw _1bahv2br _4cvr1h6o"
|
|
20
|
+
};
|
|
14
21
|
var RequestAccessState = /*#__PURE__*/function (RequestAccessState) {
|
|
15
22
|
RequestAccessState["default"] = "default";
|
|
16
23
|
RequestAccessState["errored"] = "errored";
|
|
@@ -51,12 +58,20 @@ var SyncedBlockPermissionDeniedConfluencePage = function SyncedBlockPermissionDe
|
|
|
51
58
|
onError: handleRequestError
|
|
52
59
|
});
|
|
53
60
|
};
|
|
54
|
-
return /*#__PURE__*/React.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
62
|
+
xcss: styles.wrapper
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
64
|
+
src: PermissionDenied,
|
|
65
|
+
alt: formatMessage(messages.permissionDeniedAltText),
|
|
66
|
+
width: "48",
|
|
67
|
+
height: "48"
|
|
68
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
69
|
+
space: "space.100"
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
71
|
+
size: "xsmall"
|
|
72
|
+
}, formatMessage(messages.permissionDeniedHeading)), /*#__PURE__*/React.createElement(Text, {
|
|
73
|
+
color: "color.text.subtle"
|
|
74
|
+
}, formatMessage(messages.permissionDeniedDescription)), requestAccessState === RequestAccessState.pending ? /*#__PURE__*/React.createElement(Flex, {
|
|
60
75
|
columnGap: "space.050",
|
|
61
76
|
alignItems: "center"
|
|
62
77
|
}, /*#__PURE__*/React.createElement(StatusSuccessIcon, {
|
|
@@ -79,7 +94,7 @@ var SyncedBlockPermissionDeniedConfluencePage = function SyncedBlockPermissionDe
|
|
|
79
94
|
}, formatMessage(messages.requestAccessButton)), requestAccessState === RequestAccessState.errored && /*#__PURE__*/React.createElement(Text, {
|
|
80
95
|
color: "color.text.warning",
|
|
81
96
|
testId: "sync-block-access-error-msg"
|
|
82
|
-
}, formatMessage(messages.requestAccessError))));
|
|
97
|
+
}, formatMessage(messages.requestAccessError)))));
|
|
83
98
|
};
|
|
84
99
|
export var SyncedBlockPermissionDenied = function SyncedBlockPermissionDenied(_ref2) {
|
|
85
100
|
var sourceAri = _ref2.sourceAri,
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
2
3
|
import { SyncBlockError } from '@atlaskit/editor-synced-block-provider';
|
|
3
4
|
import { AKRendererWrapper } from './AKRendererWrapper';
|
|
4
5
|
import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
|
|
5
6
|
import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
|
|
6
7
|
var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
|
|
7
8
|
var useFetchSyncBlockData = _ref.useFetchSyncBlockData,
|
|
8
|
-
syncBlockRendererOptions = _ref.syncBlockRendererOptions
|
|
9
|
+
syncBlockRendererOptions = _ref.syncBlockRendererOptions,
|
|
10
|
+
api = _ref.api;
|
|
9
11
|
var _useFetchSyncBlockDat = useFetchSyncBlockData(),
|
|
10
12
|
syncBlockInstance = _useFetchSyncBlockDat.syncBlockInstance,
|
|
11
13
|
providerFactory = _useFetchSyncBlockDat.providerFactory,
|
|
12
14
|
isLoading = _useFetchSyncBlockDat.isLoading,
|
|
13
15
|
reloadData = _useFetchSyncBlockDat.reloadData;
|
|
16
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['connectivity'], function (_ref2) {
|
|
17
|
+
var connectivityState = _ref2.connectivityState;
|
|
18
|
+
return {
|
|
19
|
+
isOffline: (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline'
|
|
20
|
+
};
|
|
21
|
+
}),
|
|
22
|
+
isOffline = _useSharedPluginState.isOffline;
|
|
23
|
+
if (isOffline) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
25
|
+
error: SyncBlockError.Offline
|
|
26
|
+
});
|
|
27
|
+
}
|
|
14
28
|
if (!syncBlockInstance) {
|
|
15
29
|
return /*#__PURE__*/React.createElement(SyncedBlockLoadingState, null);
|
|
16
30
|
}
|
|
@@ -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) => ({ useFetchSyncBlockData }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
7
|
+
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ useFetchSyncBlockData, api }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface SyncedBlockErrorStateCardProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
|
|
5
|
-
imageSrc: string;
|
|
6
|
-
primaryMessage?: string;
|
|
7
|
-
secondaryMessage?: string;
|
|
4
|
+
description: string;
|
|
8
5
|
}
|
|
9
|
-
export declare const SyncedBlockErrorStateCard: ({ children,
|
|
6
|
+
export declare const SyncedBlockErrorStateCard: ({ children, description, }: SyncedBlockErrorStateCardProps) => React.JSX.Element;
|
|
10
7
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block';
|
|
2
4
|
import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
|
|
3
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
4
6
|
export type SyncedBlockRendererProps = {
|
|
7
|
+
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
5
8
|
syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
|
|
6
9
|
useFetchSyncBlockData: () => UseFetchSyncBlockDataResult;
|
|
7
10
|
};
|
|
8
|
-
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, }: SyncedBlockRendererProps) => React.JSX.Element>;
|
|
11
|
+
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, 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) => ({ useFetchSyncBlockData }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
7
|
+
export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ useFetchSyncBlockData, api }: SyncedBlockRendererProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface SyncedBlockErrorStateCardProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
|
|
5
|
-
imageSrc: string;
|
|
6
|
-
primaryMessage?: string;
|
|
7
|
-
secondaryMessage?: string;
|
|
4
|
+
description: string;
|
|
8
5
|
}
|
|
9
|
-
export declare const SyncedBlockErrorStateCard: ({ children,
|
|
6
|
+
export declare const SyncedBlockErrorStateCard: ({ children, description, }: SyncedBlockErrorStateCardProps) => React.JSX.Element;
|
|
10
7
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block';
|
|
2
4
|
import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
|
|
3
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
4
6
|
export type SyncedBlockRendererProps = {
|
|
7
|
+
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
5
8
|
syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
|
|
6
9
|
useFetchSyncBlockData: () => UseFetchSyncBlockDataResult;
|
|
7
10
|
};
|
|
8
|
-
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, }: SyncedBlockRendererProps) => React.JSX.Element>;
|
|
11
|
+
export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, 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": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/button": "^23.
|
|
31
|
+
"@atlaskit/button": "^23.7.0",
|
|
32
32
|
"@atlaskit/css": "^0.17.0",
|
|
33
|
-
"@atlaskit/editor-plugin-synced-block": "^4.
|
|
33
|
+
"@atlaskit/editor-plugin-synced-block": "^4.5.0",
|
|
34
34
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
35
|
-
"@atlaskit/editor-synced-block-provider": "^2.
|
|
35
|
+
"@atlaskit/editor-synced-block-provider": "^2.15.0",
|
|
36
36
|
"@atlaskit/heading": "^5.2.0",
|
|
37
37
|
"@atlaskit/icon": "^29.0.0",
|
|
38
|
+
"@atlaskit/icon-lab": "^5.12.0",
|
|
38
39
|
"@atlaskit/image": "^3.0.0",
|
|
39
40
|
"@atlaskit/primitives": "^16.4.0",
|
|
40
41
|
"@atlaskit/renderer": "^124.17.0",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"relay-runtime": "npm:atl-relay-runtime@0.0.0-main-39e79f66"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^110.
|
|
49
|
+
"@atlaskit/editor-common": "^110.41.0",
|
|
49
50
|
"react": "^18.2.0",
|
|
50
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
51
52
|
},
|