@atlaskit/editor-plugin-synced-block 5.1.10 → 5.1.11
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 +8 -0
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/cjs/nodeviews/syncedBlock.js +21 -2
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/es2019/nodeviews/syncedBlock.js +19 -4
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/esm/nodeviews/syncedBlock.js +21 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 5.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1f4c761b661e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f4c761b661e1) -
|
|
8
|
+
[ux] EDITOR-4174 wrap synced block and bodied sync block with sentry error boundaries
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 5.1.10
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -11,10 +11,13 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
15
|
+
var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
|
|
14
16
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
15
17
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
16
18
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
17
19
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
21
|
var _BodiedSyncBlockWrapper = require("../ui/BodiedSyncBlockWrapper");
|
|
19
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -89,12 +92,20 @@ var BodiedSyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
89
92
|
}, {
|
|
90
93
|
key: "render",
|
|
91
94
|
value: function render(_props, forwardRef) {
|
|
92
|
-
var _this$api5;
|
|
95
|
+
var _this$api5, _this$api6;
|
|
93
96
|
var syncBlockStore = (_this$api5 = this.api) === null || _this$api5 === void 0 || (_this$api5 = _this$api5.syncedBlock.sharedState) === null || _this$api5 === void 0 || (_this$api5 = _this$api5.currentState()) === null || _this$api5 === void 0 ? void 0 : _this$api5.syncBlockStore;
|
|
94
97
|
if (!syncBlockStore) {
|
|
95
98
|
return null;
|
|
96
99
|
}
|
|
97
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
100
|
+
return (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') ? /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
|
|
101
|
+
component: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
102
|
+
dispatchAnalyticsEvent: (_this$api6 = this.api) === null || _this$api6 === void 0 || (_this$api6 = _this$api6.analytics) === null || _this$api6 === void 0 ? void 0 : _this$api6.actions.fireAnalyticsEvent,
|
|
103
|
+
fallbackComponent: null
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_BodiedSyncBlockWrapper.BodiedSyncBlockWrapper, {
|
|
105
|
+
ref: forwardRef,
|
|
106
|
+
syncBlockStore: syncBlockStore,
|
|
107
|
+
node: this.node
|
|
108
|
+
})) : /*#__PURE__*/_react.default.createElement(_BodiedSyncBlockWrapper.BodiedSyncBlockWrapper, {
|
|
98
109
|
ref: forwardRef,
|
|
99
110
|
syncBlockStore: syncBlockStore,
|
|
100
111
|
node: this.node
|
|
@@ -12,6 +12,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
16
|
+
var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
|
|
15
17
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
16
18
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
17
19
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
@@ -44,8 +46,10 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
44
46
|
var _this$options,
|
|
45
47
|
_this$api$syncedBlock,
|
|
46
48
|
_this$api,
|
|
49
|
+
_this$api2,
|
|
47
50
|
_this$options2,
|
|
48
|
-
_this2 = this
|
|
51
|
+
_this2 = this,
|
|
52
|
+
_this$options3;
|
|
49
53
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.syncedBlockRenderer)) {
|
|
50
54
|
return null;
|
|
51
55
|
}
|
|
@@ -62,7 +66,11 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
// get document node from data provider
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
69
|
+
return (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') ? /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
|
|
70
|
+
component: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
71
|
+
dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 || (_this$api2 = _this$api2.analytics) === null || _this$api2 === void 0 ? void 0 : _this$api2.actions.fireAnalyticsEvent,
|
|
72
|
+
fallbackComponent: null
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
|
|
66
74
|
localId: this.node.attrs.localId,
|
|
67
75
|
syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
|
|
68
76
|
useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
|
|
@@ -73,6 +81,17 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
73
81
|
return (0, _editorSyncedBlockProvider.useFetchSyncBlockData)(syncBlockStore, resourceId, localId, (_this2$api = _this2.api) === null || _this2$api === void 0 || (_this2$api = _this2$api.analytics) === null || _this2$api === void 0 || (_this2$api = _this2$api.actions) === null || _this2$api === void 0 ? void 0 : _this2$api.fireAnalyticsEvent);
|
|
74
82
|
},
|
|
75
83
|
api: this.api
|
|
84
|
+
})) : /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
|
|
85
|
+
localId: this.node.attrs.localId,
|
|
86
|
+
syncedBlockRenderer: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.syncedBlockRenderer,
|
|
87
|
+
useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
|
|
88
|
+
return (0, _editorSyncedBlockProvider.useFetchSyncBlockTitle)(syncBlockStore, _this2.node);
|
|
89
|
+
},
|
|
90
|
+
useFetchSyncBlockData: function useFetchSyncBlockData() {
|
|
91
|
+
var _this2$api2;
|
|
92
|
+
return (0, _editorSyncedBlockProvider.useFetchSyncBlockData)(syncBlockStore, resourceId, localId, (_this2$api2 = _this2.api) === null || _this2$api2 === void 0 || (_this2$api2 = _this2$api2.analytics) === null || _this2$api2 === void 0 || (_this2$api2 = _this2$api2.actions) === null || _this2$api2 === void 0 ? void 0 : _this2$api2.fireAnalyticsEvent);
|
|
93
|
+
},
|
|
94
|
+
api: this.api
|
|
76
95
|
});
|
|
77
96
|
}
|
|
78
97
|
}, {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
2
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
3
5
|
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
4
6
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
5
7
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
9
|
import { BodiedSyncBlockWrapper } from '../ui/BodiedSyncBlockWrapper';
|
|
7
10
|
const toDOM = () => ['div', {
|
|
8
11
|
class: BodiedSyncBlockSharedCssClassName.content,
|
|
@@ -60,12 +63,20 @@ class BodiedSyncBlock extends ReactNodeView {
|
|
|
60
63
|
return domRef;
|
|
61
64
|
}
|
|
62
65
|
render(_props, forwardRef) {
|
|
63
|
-
var _this$api5, _this$api5$syncedBloc, _this$api5$syncedBloc2;
|
|
66
|
+
var _this$api5, _this$api5$syncedBloc, _this$api5$syncedBloc2, _this$api6, _this$api6$analytics;
|
|
64
67
|
const syncBlockStore = (_this$api5 = this.api) === null || _this$api5 === void 0 ? void 0 : (_this$api5$syncedBloc = _this$api5.syncedBlock.sharedState) === null || _this$api5$syncedBloc === void 0 ? void 0 : (_this$api5$syncedBloc2 = _this$api5$syncedBloc.currentState()) === null || _this$api5$syncedBloc2 === void 0 ? void 0 : _this$api5$syncedBloc2.syncBlockStore;
|
|
65
68
|
if (!syncBlockStore) {
|
|
66
69
|
return null;
|
|
67
70
|
}
|
|
68
|
-
return /*#__PURE__*/React.createElement(
|
|
71
|
+
return fg('platform_synced_block_dogfooding') ? /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
72
|
+
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
73
|
+
dispatchAnalyticsEvent: (_this$api6 = this.api) === null || _this$api6 === void 0 ? void 0 : (_this$api6$analytics = _this$api6.analytics) === null || _this$api6$analytics === void 0 ? void 0 : _this$api6$analytics.actions.fireAnalyticsEvent,
|
|
74
|
+
fallbackComponent: null
|
|
75
|
+
}, /*#__PURE__*/React.createElement(BodiedSyncBlockWrapper, {
|
|
76
|
+
ref: forwardRef,
|
|
77
|
+
syncBlockStore: syncBlockStore,
|
|
78
|
+
node: this.node
|
|
79
|
+
})) : /*#__PURE__*/React.createElement(BodiedSyncBlockWrapper, {
|
|
69
80
|
ref: forwardRef,
|
|
70
81
|
syncBlockStore: syncBlockStore,
|
|
71
82
|
node: this.node
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
2
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
3
5
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
4
6
|
import { useFetchSyncBlockData, useFetchSyncBlockTitle } from '@atlaskit/editor-synced-block-provider';
|
|
@@ -17,7 +19,7 @@ export class SyncBlock extends ReactNodeView {
|
|
|
17
19
|
return domRef;
|
|
18
20
|
}
|
|
19
21
|
render() {
|
|
20
|
-
var _this$options, _this$api$syncedBlock, _this$api, _this$api$syncedBlock2, _this$api$syncedBlock3, _this$options2;
|
|
22
|
+
var _this$options, _this$api$syncedBlock, _this$api, _this$api$syncedBlock2, _this$api$syncedBlock3, _this$api2, _this$api2$analytics, _this$options2, _this$options3;
|
|
21
23
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.syncedBlockRenderer)) {
|
|
22
24
|
return null;
|
|
23
25
|
}
|
|
@@ -35,13 +37,26 @@ export class SyncBlock extends ReactNodeView {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
// get document node from data provider
|
|
38
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
+
return fg('platform_synced_block_dogfooding') ? /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
41
|
+
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
42
|
+
dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 ? void 0 : (_this$api2$analytics = _this$api2.analytics) === null || _this$api2$analytics === void 0 ? void 0 : _this$api2$analytics.actions.fireAnalyticsEvent,
|
|
43
|
+
fallbackComponent: null
|
|
44
|
+
}, /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
39
45
|
localId: this.node.attrs.localId,
|
|
40
46
|
syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
|
|
41
47
|
useFetchSyncBlockTitle: () => useFetchSyncBlockTitle(syncBlockStore, this.node),
|
|
42
48
|
useFetchSyncBlockData: () => {
|
|
43
|
-
var _this$
|
|
44
|
-
return useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this$
|
|
49
|
+
var _this$api3, _this$api3$analytics, _this$api3$analytics$;
|
|
50
|
+
return useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this$api3 = this.api) === null || _this$api3 === void 0 ? void 0 : (_this$api3$analytics = _this$api3.analytics) === null || _this$api3$analytics === void 0 ? void 0 : (_this$api3$analytics$ = _this$api3$analytics.actions) === null || _this$api3$analytics$ === void 0 ? void 0 : _this$api3$analytics$.fireAnalyticsEvent);
|
|
51
|
+
},
|
|
52
|
+
api: this.api
|
|
53
|
+
})) : /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
54
|
+
localId: this.node.attrs.localId,
|
|
55
|
+
syncedBlockRenderer: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.syncedBlockRenderer,
|
|
56
|
+
useFetchSyncBlockTitle: () => useFetchSyncBlockTitle(syncBlockStore, this.node),
|
|
57
|
+
useFetchSyncBlockData: () => {
|
|
58
|
+
var _this$api4, _this$api4$analytics, _this$api4$analytics$;
|
|
59
|
+
return useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this$api4 = this.api) === null || _this$api4 === void 0 ? void 0 : (_this$api4$analytics = _this$api4.analytics) === null || _this$api4$analytics === void 0 ? void 0 : (_this$api4$analytics$ = _this$api4$analytics.actions) === null || _this$api4$analytics$ === void 0 ? void 0 : _this$api4$analytics$.fireAnalyticsEvent);
|
|
45
60
|
},
|
|
46
61
|
api: this.api
|
|
47
62
|
});
|
|
@@ -6,10 +6,13 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
9
11
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
10
12
|
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
11
13
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
12
14
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
16
|
import { BodiedSyncBlockWrapper } from '../ui/BodiedSyncBlockWrapper';
|
|
14
17
|
var toDOM = function toDOM() {
|
|
15
18
|
return ['div', {
|
|
@@ -82,12 +85,20 @@ var BodiedSyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
82
85
|
}, {
|
|
83
86
|
key: "render",
|
|
84
87
|
value: function render(_props, forwardRef) {
|
|
85
|
-
var _this$api5;
|
|
88
|
+
var _this$api5, _this$api6;
|
|
86
89
|
var syncBlockStore = (_this$api5 = this.api) === null || _this$api5 === void 0 || (_this$api5 = _this$api5.syncedBlock.sharedState) === null || _this$api5 === void 0 || (_this$api5 = _this$api5.currentState()) === null || _this$api5 === void 0 ? void 0 : _this$api5.syncBlockStore;
|
|
87
90
|
if (!syncBlockStore) {
|
|
88
91
|
return null;
|
|
89
92
|
}
|
|
90
|
-
return /*#__PURE__*/React.createElement(
|
|
93
|
+
return fg('platform_synced_block_dogfooding') ? /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
94
|
+
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
95
|
+
dispatchAnalyticsEvent: (_this$api6 = this.api) === null || _this$api6 === void 0 || (_this$api6 = _this$api6.analytics) === null || _this$api6 === void 0 ? void 0 : _this$api6.actions.fireAnalyticsEvent,
|
|
96
|
+
fallbackComponent: null
|
|
97
|
+
}, /*#__PURE__*/React.createElement(BodiedSyncBlockWrapper, {
|
|
98
|
+
ref: forwardRef,
|
|
99
|
+
syncBlockStore: syncBlockStore,
|
|
100
|
+
node: this.node
|
|
101
|
+
})) : /*#__PURE__*/React.createElement(BodiedSyncBlockWrapper, {
|
|
91
102
|
ref: forwardRef,
|
|
92
103
|
syncBlockStore: syncBlockStore,
|
|
93
104
|
node: this.node
|
|
@@ -8,6 +8,8 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
12
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
11
13
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
12
14
|
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
13
15
|
import { useFetchSyncBlockData as _useFetchSyncBlockData, useFetchSyncBlockTitle as _useFetchSyncBlockTitle } from '@atlaskit/editor-synced-block-provider';
|
|
@@ -37,8 +39,10 @@ export var SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
37
39
|
var _this$options,
|
|
38
40
|
_this$api$syncedBlock,
|
|
39
41
|
_this$api,
|
|
42
|
+
_this$api2,
|
|
40
43
|
_this$options2,
|
|
41
|
-
_this2 = this
|
|
44
|
+
_this2 = this,
|
|
45
|
+
_this$options3;
|
|
42
46
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.syncedBlockRenderer)) {
|
|
43
47
|
return null;
|
|
44
48
|
}
|
|
@@ -55,7 +59,11 @@ export var SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
// get document node from data provider
|
|
58
|
-
return /*#__PURE__*/React.createElement(
|
|
62
|
+
return fg('platform_synced_block_dogfooding') ? /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
63
|
+
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
64
|
+
dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 || (_this$api2 = _this$api2.analytics) === null || _this$api2 === void 0 ? void 0 : _this$api2.actions.fireAnalyticsEvent,
|
|
65
|
+
fallbackComponent: null
|
|
66
|
+
}, /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
59
67
|
localId: this.node.attrs.localId,
|
|
60
68
|
syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
|
|
61
69
|
useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
|
|
@@ -66,6 +74,17 @@ export var SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
66
74
|
return _useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this2$api = _this2.api) === null || _this2$api === void 0 || (_this2$api = _this2$api.analytics) === null || _this2$api === void 0 || (_this2$api = _this2$api.actions) === null || _this2$api === void 0 ? void 0 : _this2$api.fireAnalyticsEvent);
|
|
67
75
|
},
|
|
68
76
|
api: this.api
|
|
77
|
+
})) : /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
78
|
+
localId: this.node.attrs.localId,
|
|
79
|
+
syncedBlockRenderer: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.syncedBlockRenderer,
|
|
80
|
+
useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
|
|
81
|
+
return _useFetchSyncBlockTitle(syncBlockStore, _this2.node);
|
|
82
|
+
},
|
|
83
|
+
useFetchSyncBlockData: function useFetchSyncBlockData() {
|
|
84
|
+
var _this2$api2;
|
|
85
|
+
return _useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this2$api2 = _this2.api) === null || _this2$api2 === void 0 || (_this2$api2 = _this2$api2.analytics) === null || _this2$api2 === void 0 || (_this2$api2 = _this2$api2.actions) === null || _this2$api2 === void 0 ? void 0 : _this2$api2.fireAnalyticsEvent);
|
|
86
|
+
},
|
|
87
|
+
api: this.api
|
|
69
88
|
});
|
|
70
89
|
}
|
|
71
90
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.11",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^17.0.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^16.21.0",
|
|
53
53
|
"@atlaskit/tokens": "9.1.2",
|
|
54
54
|
"@atlaskit/tooltip": "^20.14.0",
|
|
55
55
|
"@atlaskit/visually-hidden": "^3.0.0",
|