@atlaskit/editor-plugin-synced-block 5.3.7 → 5.3.9
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 +18 -0
- package/dist/cjs/editor-commands/index.js +34 -2
- package/dist/cjs/nodeviews/syncedBlock.js +19 -7
- package/dist/cjs/pm-plugins/utils/utils.js +32 -1
- package/dist/cjs/ui/DeleteConfirmationModal.js +68 -57
- package/dist/cjs/ui/SyncBlockLabel.js +23 -10
- package/dist/cjs/ui/SyncBlockRendererWrapper.js +6 -2
- package/dist/es2019/editor-commands/index.js +34 -1
- package/dist/es2019/nodeviews/syncedBlock.js +15 -4
- package/dist/es2019/pm-plugins/utils/utils.js +32 -0
- package/dist/es2019/ui/DeleteConfirmationModal.js +25 -31
- package/dist/es2019/ui/SyncBlockLabel.js +24 -11
- package/dist/es2019/ui/SyncBlockRendererWrapper.js +6 -2
- package/dist/esm/editor-commands/index.js +33 -1
- package/dist/esm/nodeviews/syncedBlock.js +20 -8
- package/dist/esm/pm-plugins/utils/utils.js +31 -0
- package/dist/esm/ui/DeleteConfirmationModal.js +68 -57
- package/dist/esm/ui/SyncBlockLabel.js +24 -11
- package/dist/esm/ui/SyncBlockRendererWrapper.js +6 -2
- package/dist/types/editor-commands/index.d.ts +1 -0
- package/dist/types/nodeviews/syncedBlock.d.ts +3 -3
- package/dist/types/pm-plugins/utils/utils.d.ts +2 -0
- package/dist/types/ui/SyncBlockLabel.d.ts +2 -1
- package/dist/types-ts4.5/editor-commands/index.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/syncedBlock.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/utils.d.ts +2 -0
- package/dist/types-ts4.5/ui/SyncBlockLabel.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 5.3.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8782c30447091`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8782c30447091) -
|
|
8
|
+
[ux] EDITOR-4756 Fix convert to synced block logic by expanding selection to block range before
|
|
9
|
+
conversion
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 5.3.8
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`f11ff647ea458`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f11ff647ea458) -
|
|
17
|
+
[ux] [EDITOR-4521] Implement source deleted reference UI, update block deleted/unsynced reference
|
|
18
|
+
UI to add delete button, unsynced label and source title/url
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 5.3.7
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unsync = exports.removeSyncedBlock = exports.editSyncedBlockSource = exports.createSyncedBlock = exports.copySyncedBlockReferenceToClipboardEditorCommand = exports.copySyncedBlockReferenceToClipboard = void 0;
|
|
6
|
+
exports.unsync = exports.removeSyncedBlockAtPos = exports.removeSyncedBlock = exports.editSyncedBlockSource = exports.createSyncedBlock = exports.copySyncedBlockReferenceToClipboardEditorCommand = exports.copySyncedBlockReferenceToClipboard = void 0;
|
|
7
7
|
var _schemaDefault = require("@atlaskit/adf-schema/schema-default");
|
|
8
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
9
|
var _copyButton = require("@atlaskit/editor-common/copy-button");
|
|
@@ -30,6 +30,17 @@ var createSyncedBlock = exports.createSyncedBlock = function createSyncedBlock(_
|
|
|
30
30
|
var paragraphNode = paragraph.createAndFill({});
|
|
31
31
|
var newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(attrs, paragraphNode ? [paragraphNode] : []);
|
|
32
32
|
if (!newBodiedSyncBlockNode) {
|
|
33
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
34
|
+
fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent({
|
|
35
|
+
action: _analytics.ACTION.ERROR,
|
|
36
|
+
actionSubject: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
37
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE,
|
|
38
|
+
attributes: {
|
|
39
|
+
error: 'Create and fill for empty content failed'
|
|
40
|
+
},
|
|
41
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
return false;
|
|
34
45
|
}
|
|
35
46
|
|
|
@@ -60,6 +71,17 @@ var createSyncedBlock = exports.createSyncedBlock = function createSyncedBlock(_
|
|
|
60
71
|
var _attrs = syncBlockStore.sourceManager.generateBodiedSyncBlockAttrs();
|
|
61
72
|
var _newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(_attrs, conversionInfo.contentToInclude);
|
|
62
73
|
if (!_newBodiedSyncBlockNode) {
|
|
74
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
75
|
+
fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent({
|
|
76
|
+
action: _analytics.ACTION.ERROR,
|
|
77
|
+
actionSubject: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
78
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE,
|
|
79
|
+
attributes: {
|
|
80
|
+
error: 'Create and fill for content failed'
|
|
81
|
+
},
|
|
82
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
83
|
+
});
|
|
84
|
+
}
|
|
63
85
|
return false;
|
|
64
86
|
}
|
|
65
87
|
|
|
@@ -178,7 +200,17 @@ var removeSyncedBlock = exports.removeSyncedBlock = function removeSyncedBlock(a
|
|
|
178
200
|
return true;
|
|
179
201
|
};
|
|
180
202
|
};
|
|
181
|
-
|
|
203
|
+
var removeSyncedBlockAtPos = exports.removeSyncedBlockAtPos = function removeSyncedBlockAtPos(api, pos) {
|
|
204
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref4) {
|
|
205
|
+
var tr = _ref4.tr;
|
|
206
|
+
var node = tr.doc.nodeAt(pos);
|
|
207
|
+
if ((node === null || node === void 0 ? void 0 : node.type.name) === 'syncBlock') {
|
|
208
|
+
var _node$nodeSize;
|
|
209
|
+
return tr.replace(pos, pos + ((_node$nodeSize = node === null || node === void 0 ? void 0 : node.nodeSize) !== null && _node$nodeSize !== void 0 ? _node$nodeSize : 0));
|
|
210
|
+
}
|
|
211
|
+
return tr;
|
|
212
|
+
});
|
|
213
|
+
};
|
|
182
214
|
/**
|
|
183
215
|
* Deletes (bodied)SyncBlock node and paste its content to the editor
|
|
184
216
|
*/
|
|
@@ -18,6 +18,7 @@ var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/rea
|
|
|
18
18
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
19
19
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
+
var _editorCommands = require("../editor-commands");
|
|
21
22
|
var _SyncBlockRendererWrapper = require("../ui/SyncBlockRendererWrapper");
|
|
22
23
|
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)); }
|
|
23
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -42,14 +43,15 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
42
43
|
}
|
|
43
44
|
}, {
|
|
44
45
|
key: "render",
|
|
45
|
-
value: function render() {
|
|
46
|
+
value: function render(_ref) {
|
|
46
47
|
var _this$options,
|
|
47
48
|
_this$api$syncedBlock,
|
|
48
49
|
_this$api,
|
|
49
50
|
_this$api2,
|
|
50
|
-
_this$options2,
|
|
51
51
|
_this2 = this,
|
|
52
|
+
_this$options2,
|
|
52
53
|
_this$options3;
|
|
54
|
+
var getPos = _ref.getPos;
|
|
53
55
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.syncedBlockRenderer)) {
|
|
54
56
|
return null;
|
|
55
57
|
}
|
|
@@ -70,6 +72,16 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
70
72
|
component: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
71
73
|
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
74
|
fallbackComponent: null
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_syncBlock.SyncBlockActionsProvider, {
|
|
76
|
+
removeSyncBlock: function removeSyncBlock() {
|
|
77
|
+
var pos = getPos();
|
|
78
|
+
if (pos !== undefined) {
|
|
79
|
+
(0, _editorCommands.removeSyncedBlockAtPos)(_this2.api, pos);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
fetchSyncBlockSourceInfo: function fetchSyncBlockSourceInfo(sourceAri) {
|
|
83
|
+
return syncBlockStore.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri);
|
|
84
|
+
}
|
|
73
85
|
}, /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
|
|
74
86
|
localId: this.node.attrs.localId,
|
|
75
87
|
syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
|
|
@@ -81,7 +93,7 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
81
93
|
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);
|
|
82
94
|
},
|
|
83
95
|
api: this.api
|
|
84
|
-
})) : /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
|
|
96
|
+
}))) : /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
|
|
85
97
|
localId: this.node.attrs.localId,
|
|
86
98
|
syncedBlockRenderer: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.syncedBlockRenderer,
|
|
87
99
|
useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
|
|
@@ -103,10 +115,10 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
103
115
|
}
|
|
104
116
|
}]);
|
|
105
117
|
}(_reactNodeView.default);
|
|
106
|
-
var syncBlockNodeView = exports.syncBlockNodeView = function syncBlockNodeView(
|
|
107
|
-
var options =
|
|
108
|
-
pmPluginFactoryParams =
|
|
109
|
-
api =
|
|
118
|
+
var syncBlockNodeView = exports.syncBlockNodeView = function syncBlockNodeView(_ref2) {
|
|
119
|
+
var options = _ref2.options,
|
|
120
|
+
pmPluginFactoryParams = _ref2.pmPluginFactoryParams,
|
|
121
|
+
api = _ref2.api;
|
|
110
122
|
return function (node, view, getPos) {
|
|
111
123
|
var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
|
|
112
124
|
eventDispatcher = pmPluginFactoryParams.eventDispatcher;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.sliceFullyContainsNode = exports.isBodiedSyncBlockNode = exports.findSyncBlockOrBodiedSyncBlock = exports.findSyncBlock = exports.findBodiedSyncBlock = exports.canBeConvertedToSyncBlock = void 0;
|
|
6
|
+
exports.sliceFullyContainsNode = exports.isBodiedSyncBlockNode = exports.findSyncBlockOrBodiedSyncBlock = exports.findSyncBlock = exports.findBodiedSyncBlock = exports.canBeConvertedToSyncBlockOld = exports.canBeConvertedToSyncBlockNew = exports.canBeConvertedToSyncBlock = void 0;
|
|
7
|
+
var _selection = require("@atlaskit/editor-common/selection");
|
|
7
8
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
8
9
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
10
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
11
|
var _editorTables = require("@atlaskit/editor-tables");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
13
|
var findSyncBlock = exports.findSyncBlock = function findSyncBlock(schema, selection) {
|
|
12
14
|
var syncBlock = schema.nodes.syncBlock;
|
|
13
15
|
return (0, _utils.findSelectedNodeOfType)(syncBlock)(selection);
|
|
@@ -32,6 +34,9 @@ var UNSUPPORTED_NODE_TYPES = new Set(['inlineExtension', 'extension', 'bodiedExt
|
|
|
32
34
|
* or false if conversion is not possible
|
|
33
35
|
*/
|
|
34
36
|
var canBeConvertedToSyncBlock = exports.canBeConvertedToSyncBlock = function canBeConvertedToSyncBlock(selection) {
|
|
37
|
+
return (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding') ? canBeConvertedToSyncBlockNew(selection) : canBeConvertedToSyncBlockOld(selection);
|
|
38
|
+
};
|
|
39
|
+
var canBeConvertedToSyncBlockOld = exports.canBeConvertedToSyncBlockOld = function canBeConvertedToSyncBlockOld(selection) {
|
|
35
40
|
var schema = selection.$from.doc.type.schema;
|
|
36
41
|
var nodes = schema.nodes;
|
|
37
42
|
var from = selection.from;
|
|
@@ -70,6 +75,32 @@ var canBeConvertedToSyncBlock = exports.canBeConvertedToSyncBlock = function can
|
|
|
70
75
|
to: to
|
|
71
76
|
};
|
|
72
77
|
};
|
|
78
|
+
var canBeConvertedToSyncBlockNew = exports.canBeConvertedToSyncBlockNew = function canBeConvertedToSyncBlockNew(selection) {
|
|
79
|
+
var _expandSelectionToBlo = (0, _selection.expandSelectionToBlockRange)(selection),
|
|
80
|
+
$from = _expandSelectionToBlo.$from,
|
|
81
|
+
range = _expandSelectionToBlo.range;
|
|
82
|
+
if (!range) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
var from = range.start;
|
|
86
|
+
var to = range.end;
|
|
87
|
+
var canBeConverted = true;
|
|
88
|
+
$from.doc.nodesBetween(from, to, function (node) {
|
|
89
|
+
if (UNSUPPORTED_NODE_TYPES.has(node.type.name)) {
|
|
90
|
+
canBeConverted = false;
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
if (!canBeConverted) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
var contentToInclude = removeBreakoutMarks($from.doc.slice(from, to).content);
|
|
98
|
+
return {
|
|
99
|
+
contentToInclude: contentToInclude,
|
|
100
|
+
from: from,
|
|
101
|
+
to: to
|
|
102
|
+
};
|
|
103
|
+
};
|
|
73
104
|
var removeBreakoutMarks = function removeBreakoutMarks(content) {
|
|
74
105
|
var nodes = [];
|
|
75
106
|
|
|
@@ -26,10 +26,10 @@ var _main = require("../pm-plugins/main");
|
|
|
26
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
27
|
var modalContentMap = {
|
|
28
28
|
'source-block-deleted': {
|
|
29
|
-
titleMultiple: _messages.syncBlockMessages.
|
|
29
|
+
titleMultiple: _messages.syncBlockMessages.deleteConfirmationModalTitleMultiple,
|
|
30
30
|
titleSingle: _messages.syncBlockMessages.deleteConfirmationModalTitleSingle,
|
|
31
31
|
descriptionSingle: _messages.syncBlockMessages.deleteConfirmationModalDescriptionNoRef,
|
|
32
|
-
descriptionMultiple: _messages.syncBlockMessages.
|
|
32
|
+
descriptionMultiple: _messages.syncBlockMessages.deleteConfirmationModalDescriptionMultiple,
|
|
33
33
|
confirmButtonLabel: _messages.syncBlockMessages.deleteConfirmationModalDeleteButton
|
|
34
34
|
},
|
|
35
35
|
'source-block-unsynced': {
|
|
@@ -63,10 +63,6 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
63
63
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
64
64
|
deleteReason = _useState8[0],
|
|
65
65
|
setDeleteReason = _useState8[1];
|
|
66
|
-
var _useState9 = (0, _react.useState)('none'),
|
|
67
|
-
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
68
|
-
fetchStatus = _useState0[0],
|
|
69
|
-
setFetchStatus = _useState0[1];
|
|
70
66
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['connectivity', 'syncedBlock'], function (states) {
|
|
71
67
|
var _states$connectivityS, _states$syncedBlockSt, _states$syncedBlockSt2;
|
|
72
68
|
return {
|
|
@@ -90,7 +86,6 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
90
86
|
}
|
|
91
87
|
if (!confirm) {
|
|
92
88
|
setIsOpen(false);
|
|
93
|
-
setFetchStatus('none');
|
|
94
89
|
setReferenceCount(undefined);
|
|
95
90
|
}
|
|
96
91
|
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref2) {
|
|
@@ -134,7 +129,6 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
134
129
|
var _api$core5;
|
|
135
130
|
// auto close modal once deletion is successful
|
|
136
131
|
setIsOpen(false);
|
|
137
|
-
setFetchStatus('none');
|
|
138
132
|
api === null || api === void 0 || (_api$core5 = api.core) === null || _api$core5 === void 0 || _api$core5.actions.execute(function (_ref4) {
|
|
139
133
|
var tr = _ref4.tr;
|
|
140
134
|
return tr.setMeta(_main.syncedBlockPluginKey, {
|
|
@@ -146,49 +140,65 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
146
140
|
}, [api === null || api === void 0 || (_api$core6 = api.core) === null || _api$core6 === void 0 ? void 0 : _api$core6.actions, bodiedSyncBlockDeletionStatus, isOpen]);
|
|
147
141
|
(0, _react.useEffect)(function () {
|
|
148
142
|
if (isOpen && syncBlockIds !== undefined && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
var references, _references$reference, _references$reference2;
|
|
155
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
156
|
-
while (1) switch (_context.prev = _context.next) {
|
|
143
|
+
var fetchReferences = /*#__PURE__*/function () {
|
|
144
|
+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
145
|
+
var references, totalCount;
|
|
146
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
147
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
157
148
|
case 0:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
149
|
+
_context2.prev = 0;
|
|
150
|
+
_context2.next = 3;
|
|
151
|
+
return Promise.all(syncBlockIds.map( /*#__PURE__*/function () {
|
|
152
|
+
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(syncBlockId) {
|
|
153
|
+
var _references$reference, _references$reference2;
|
|
154
|
+
var references;
|
|
155
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
156
|
+
while (1) switch (_context.prev = _context.next) {
|
|
157
|
+
case 0:
|
|
158
|
+
_context.next = 2;
|
|
159
|
+
return syncBlockStoreManager.sourceManager.fetchReferences(syncBlockId.resourceId);
|
|
160
|
+
case 2:
|
|
161
|
+
references = _context.sent;
|
|
162
|
+
if (!(references !== null && references !== void 0 && references.error)) {
|
|
163
|
+
_context.next = 5;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
throw new Error();
|
|
167
|
+
case 5:
|
|
168
|
+
return _context.abrupt("return", (_references$reference = (_references$reference2 = references.references) === null || _references$reference2 === void 0 ? void 0 : _references$reference2.length) !== null && _references$reference !== void 0 ? _references$reference : 0);
|
|
169
|
+
case 6:
|
|
170
|
+
case "end":
|
|
171
|
+
return _context.stop();
|
|
172
|
+
}
|
|
173
|
+
}, _callee);
|
|
174
|
+
}));
|
|
175
|
+
return function (_x) {
|
|
176
|
+
return _ref6.apply(this, arguments);
|
|
177
|
+
};
|
|
178
|
+
}()));
|
|
179
|
+
case 3:
|
|
180
|
+
references = _context2.sent;
|
|
181
|
+
totalCount = references.reduce(function (sum, count) {
|
|
182
|
+
return sum + count;
|
|
183
|
+
}, 0);
|
|
184
|
+
setReferenceCount(totalCount);
|
|
185
|
+
_context2.next = 11;
|
|
186
|
+
break;
|
|
187
|
+
case 8:
|
|
188
|
+
_context2.prev = 8;
|
|
189
|
+
_context2.t0 = _context2["catch"](0);
|
|
190
|
+
setReferenceCount(0);
|
|
176
191
|
case 11:
|
|
177
|
-
_referenceCount += (_references$reference = (_references$reference2 = references.references) === null || _references$reference2 === void 0 ? void 0 : _references$reference2.length) !== null && _references$reference !== void 0 ? _references$reference : 0;
|
|
178
|
-
case 12:
|
|
179
192
|
case "end":
|
|
180
|
-
return
|
|
193
|
+
return _context2.stop();
|
|
181
194
|
}
|
|
182
|
-
},
|
|
195
|
+
}, _callee2, null, [[0, 8]]);
|
|
183
196
|
}));
|
|
184
|
-
return function (
|
|
197
|
+
return function fetchReferences() {
|
|
185
198
|
return _ref5.apply(this, arguments);
|
|
186
199
|
};
|
|
187
|
-
}()
|
|
188
|
-
|
|
189
|
-
setReferenceCount(_referenceCount);
|
|
190
|
-
setFetchStatus('success');
|
|
191
|
-
}
|
|
200
|
+
}();
|
|
201
|
+
fetchReferences();
|
|
192
202
|
}
|
|
193
203
|
}, [isOpen, syncBlockIds, syncBlockStoreManager.sourceManager]);
|
|
194
204
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
@@ -207,7 +217,7 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
207
217
|
isDeleting: bodiedSyncBlockDeletionStatus === 'processing',
|
|
208
218
|
isDisabled: (0, _editorPluginConnectivity.isOfflineMode)(mode),
|
|
209
219
|
deleteReason: deleteReason,
|
|
210
|
-
|
|
220
|
+
sourceCount: (syncBlockIds === null || syncBlockIds === void 0 ? void 0 : syncBlockIds.length) || 0
|
|
211
221
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
|
|
212
222
|
hasCloseButton: true
|
|
213
223
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
@@ -225,29 +235,30 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
|
|
|
225
235
|
isLoading: bodiedSyncBlockDeletionStatus === 'processing'
|
|
226
236
|
}, formatMessage(_messages.syncBlockMessages.deleteConfirmationModalDeleteButton))))));
|
|
227
237
|
};
|
|
228
|
-
var ModalContent = function ModalContent(
|
|
229
|
-
var content =
|
|
230
|
-
referenceCount =
|
|
231
|
-
handleClick =
|
|
232
|
-
formatMessage =
|
|
233
|
-
isDeleting =
|
|
234
|
-
isDisabled =
|
|
235
|
-
deleteReason =
|
|
236
|
-
|
|
238
|
+
var ModalContent = function ModalContent(_ref7) {
|
|
239
|
+
var content = _ref7.content,
|
|
240
|
+
referenceCount = _ref7.referenceCount,
|
|
241
|
+
handleClick = _ref7.handleClick,
|
|
242
|
+
formatMessage = _ref7.formatMessage,
|
|
243
|
+
isDeleting = _ref7.isDeleting,
|
|
244
|
+
isDisabled = _ref7.isDisabled,
|
|
245
|
+
deleteReason = _ref7.deleteReason,
|
|
246
|
+
sourceCount = _ref7.sourceCount;
|
|
237
247
|
var titleMultiple = content.titleMultiple,
|
|
238
248
|
titleSingle = content.titleSingle,
|
|
239
249
|
descriptionSingle = content.descriptionSingle,
|
|
240
250
|
descriptionMultiple = content.descriptionMultiple,
|
|
241
251
|
confirmButtonLabel = content.confirmButtonLabel;
|
|
242
|
-
var hasNoReferenceOrFailToFetch = referenceCount === 0
|
|
252
|
+
var hasNoReferenceOrFailToFetch = referenceCount === 0;
|
|
253
|
+
var syncBlockCount = deleteReason === 'source-block-deleted' ? referenceCount + sourceCount : referenceCount;
|
|
243
254
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
|
|
244
255
|
hasCloseButton: true
|
|
245
256
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
246
257
|
appearance: "warning"
|
|
247
258
|
}, hasNoReferenceOrFailToFetch ? formatMessage(titleSingle) : formatMessage(titleMultiple, {
|
|
248
|
-
count:
|
|
259
|
+
count: syncBlockCount
|
|
249
260
|
}))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, hasNoReferenceOrFailToFetch ? formatMessage(descriptionSingle) : formatMessage(descriptionMultiple, {
|
|
250
|
-
syncBlockCount:
|
|
261
|
+
syncBlockCount: syncBlockCount
|
|
251
262
|
}))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
252
263
|
appearance: "subtle",
|
|
253
264
|
onClick: handleClick(false)
|
|
@@ -23,7 +23,8 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
23
23
|
var contentUpdatedAt = _ref.contentUpdatedAt,
|
|
24
24
|
isSource = _ref.isSource,
|
|
25
25
|
localId = _ref.localId,
|
|
26
|
-
title = _ref.title
|
|
26
|
+
title = _ref.title,
|
|
27
|
+
isUnsyncedBlock = _ref.isUnsyncedBlock;
|
|
27
28
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
28
29
|
var formatMessage = intl.formatMessage;
|
|
29
30
|
var _useState = (0, _react.useState)(formatMessage(_messages.syncBlockMessages.defaultSyncBlockTooltip)),
|
|
@@ -60,6 +61,25 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
60
61
|
setTooltipContent(tooltipContent);
|
|
61
62
|
}, [contentUpdatedAt, formatMessage, intl, tooltipMessage]);
|
|
62
63
|
var ariaDescribedById = "sync-block-label-description-".concat(localId);
|
|
64
|
+
var getLabelContent = (0, _react.useMemo)(function () {
|
|
65
|
+
if (isUnsyncedBlock && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
67
|
+
size: "small",
|
|
68
|
+
color: "color.text.subtle"
|
|
69
|
+
}, formatMessage(_messages.syncBlockMessages.unsyncedBlockLabel));
|
|
70
|
+
}
|
|
71
|
+
if (isSource || !title) {
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
73
|
+
size: "small",
|
|
74
|
+
color: "color.text.subtle"
|
|
75
|
+
}, formatMessage(_messages.syncBlockMessages.syncedBlockLabel));
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
78
|
+
maxLines: 1,
|
|
79
|
+
size: "small",
|
|
80
|
+
color: "color.text.subtle"
|
|
81
|
+
}, title);
|
|
82
|
+
}, [formatMessage, isSource, isUnsyncedBlock, title]);
|
|
63
83
|
var label = /*#__PURE__*/_react.default.createElement("div", {
|
|
64
84
|
"data-testid": SyncBlockLabelDataId
|
|
65
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -70,15 +90,8 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
70
90
|
color: "var(--ds-icon-subtle, #505258)",
|
|
71
91
|
size: "small",
|
|
72
92
|
label: ""
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
color: "color.text.subtle"
|
|
76
|
-
}, formatMessage(_messages.syncBlockMessages.syncedBlockLabel)) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
77
|
-
maxLines: 1,
|
|
78
|
-
size: "small",
|
|
79
|
-
color: "color.text.subtle"
|
|
80
|
-
}, title));
|
|
81
|
-
if (isSource && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
93
|
+
}), getLabelContent);
|
|
94
|
+
if ((isSource || isUnsyncedBlock) && (0, _platformFeatureFlags.fg)('platform_synced_block_dogfooding')) {
|
|
82
95
|
return label;
|
|
83
96
|
}
|
|
84
97
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
@@ -7,10 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.SyncBlockRendererWrapper = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
10
|
+
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
10
11
|
var _SyncBlockLabel = require("./SyncBlockLabel");
|
|
11
12
|
var SyncBlockRendererWrapperDataId = 'sync-block-plugin-renderer-wrapper';
|
|
12
13
|
var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperComponent(_ref) {
|
|
13
|
-
var _syncBlockFetchResult;
|
|
14
|
+
var _syncBlockFetchResult, _syncBlockFetchResult2, _syncBlockFetchResult3;
|
|
14
15
|
var syncedBlockRenderer = _ref.syncedBlockRenderer,
|
|
15
16
|
useFetchSyncBlockData = _ref.useFetchSyncBlockData,
|
|
16
17
|
useFetchSyncBlockTitle = _ref.useFetchSyncBlockTitle,
|
|
@@ -19,6 +20,8 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
|
|
|
19
20
|
var syncBlockFetchResult = useFetchSyncBlockData();
|
|
20
21
|
var title = useFetchSyncBlockTitle === null || useFetchSyncBlockTitle === void 0 ? void 0 : useFetchSyncBlockTitle();
|
|
21
22
|
var contentUpdatedAt = syncBlockFetchResult === null || syncBlockFetchResult === void 0 || (_syncBlockFetchResult = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult === void 0 || (_syncBlockFetchResult = _syncBlockFetchResult.data) === null || _syncBlockFetchResult === void 0 ? void 0 : _syncBlockFetchResult.contentUpdatedAt;
|
|
23
|
+
var isUnpublishedBlock = ((_syncBlockFetchResult2 = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult2 === void 0 || (_syncBlockFetchResult2 = _syncBlockFetchResult2.data) === null || _syncBlockFetchResult2 === void 0 ? void 0 : _syncBlockFetchResult2.status) === 'unpublished';
|
|
24
|
+
var isUnsyncedBlock = isUnpublishedBlock || (syncBlockFetchResult === null || syncBlockFetchResult === void 0 || (_syncBlockFetchResult3 = syncBlockFetchResult.syncBlockInstance) === null || _syncBlockFetchResult3 === void 0 || (_syncBlockFetchResult3 = _syncBlockFetchResult3.error) === null || _syncBlockFetchResult3 === void 0 ? void 0 : _syncBlockFetchResult3.type) === _editorSyncedBlockProvider.SyncBlockError.NotFound;
|
|
22
25
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
23
26
|
"data-testid": SyncBlockRendererWrapperDataId
|
|
24
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -31,7 +34,8 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
|
|
|
31
34
|
isSource: false,
|
|
32
35
|
title: title,
|
|
33
36
|
contentUpdatedAt: contentUpdatedAt,
|
|
34
|
-
localId: localId
|
|
37
|
+
localId: localId,
|
|
38
|
+
isUnsyncedBlock: isUnsyncedBlock
|
|
35
39
|
}));
|
|
36
40
|
};
|
|
37
41
|
var SyncBlockRendererWrapper = exports.SyncBlockRendererWrapper = /*#__PURE__*/_react.default.memo(SyncBlockRendererWrapperComponent);
|
|
@@ -30,6 +30,17 @@ export const createSyncedBlock = ({
|
|
|
30
30
|
const paragraphNode = paragraph.createAndFill({});
|
|
31
31
|
const newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(attrs, paragraphNode ? [paragraphNode] : []);
|
|
32
32
|
if (!newBodiedSyncBlockNode) {
|
|
33
|
+
if (fg('platform_synced_block_dogfooding')) {
|
|
34
|
+
fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 ? void 0 : fireAnalyticsEvent({
|
|
35
|
+
action: ACTION.ERROR,
|
|
36
|
+
actionSubject: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
37
|
+
actionSubjectId: ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE,
|
|
38
|
+
attributes: {
|
|
39
|
+
error: 'Create and fill for empty content failed'
|
|
40
|
+
},
|
|
41
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
return false;
|
|
34
45
|
}
|
|
35
46
|
|
|
@@ -60,6 +71,17 @@ export const createSyncedBlock = ({
|
|
|
60
71
|
const attrs = syncBlockStore.sourceManager.generateBodiedSyncBlockAttrs();
|
|
61
72
|
const newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(attrs, conversionInfo.contentToInclude);
|
|
62
73
|
if (!newBodiedSyncBlockNode) {
|
|
74
|
+
if (fg('platform_synced_block_dogfooding')) {
|
|
75
|
+
fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 ? void 0 : fireAnalyticsEvent({
|
|
76
|
+
action: ACTION.ERROR,
|
|
77
|
+
actionSubject: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
78
|
+
actionSubjectId: ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE,
|
|
79
|
+
attributes: {
|
|
80
|
+
error: 'Create and fill for content failed'
|
|
81
|
+
},
|
|
82
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
83
|
+
});
|
|
84
|
+
}
|
|
63
85
|
return false;
|
|
64
86
|
}
|
|
65
87
|
|
|
@@ -180,7 +202,18 @@ export const removeSyncedBlock = api => (state, dispatch, _view) => {
|
|
|
180
202
|
api === null || api === void 0 ? void 0 : api.core.actions.focus();
|
|
181
203
|
return true;
|
|
182
204
|
};
|
|
183
|
-
|
|
205
|
+
export const removeSyncedBlockAtPos = (api, pos) => {
|
|
206
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
207
|
+
tr
|
|
208
|
+
}) => {
|
|
209
|
+
const node = tr.doc.nodeAt(pos);
|
|
210
|
+
if ((node === null || node === void 0 ? void 0 : node.type.name) === 'syncBlock') {
|
|
211
|
+
var _node$nodeSize;
|
|
212
|
+
return tr.replace(pos, pos + ((_node$nodeSize = node === null || node === void 0 ? void 0 : node.nodeSize) !== null && _node$nodeSize !== void 0 ? _node$nodeSize : 0));
|
|
213
|
+
}
|
|
214
|
+
return tr;
|
|
215
|
+
});
|
|
216
|
+
};
|
|
184
217
|
/**
|
|
185
218
|
* Deletes (bodied)SyncBlock node and paste its content to the editor
|
|
186
219
|
*/
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
4
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
5
|
-
import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
|
+
import { SyncBlockSharedCssClassName, SyncBlockActionsProvider } from '@atlaskit/editor-common/sync-block';
|
|
6
6
|
import { useFetchSyncBlockData, useFetchSyncBlockTitle } from '@atlaskit/editor-synced-block-provider';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { removeSyncedBlockAtPos } from '../editor-commands';
|
|
8
9
|
import { SyncBlockRendererWrapper } from '../ui/SyncBlockRendererWrapper';
|
|
9
10
|
export class SyncBlock extends ReactNodeView {
|
|
10
11
|
constructor(props) {
|
|
@@ -18,7 +19,9 @@ export class SyncBlock extends ReactNodeView {
|
|
|
18
19
|
domRef.classList.add(SyncBlockSharedCssClassName.prefix);
|
|
19
20
|
return domRef;
|
|
20
21
|
}
|
|
21
|
-
render(
|
|
22
|
+
render({
|
|
23
|
+
getPos
|
|
24
|
+
}) {
|
|
22
25
|
var _this$options, _this$api$syncedBlock, _this$api, _this$api$syncedBlock2, _this$api$syncedBlock3, _this$api2, _this$api2$analytics, _this$options2, _this$options3;
|
|
23
26
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.syncedBlockRenderer)) {
|
|
24
27
|
return null;
|
|
@@ -41,6 +44,14 @@ export class SyncBlock extends ReactNodeView {
|
|
|
41
44
|
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
42
45
|
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
46
|
fallbackComponent: null
|
|
47
|
+
}, /*#__PURE__*/React.createElement(SyncBlockActionsProvider, {
|
|
48
|
+
removeSyncBlock: () => {
|
|
49
|
+
const pos = getPos();
|
|
50
|
+
if (pos !== undefined) {
|
|
51
|
+
removeSyncedBlockAtPos(this.api, pos);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
fetchSyncBlockSourceInfo: sourceAri => syncBlockStore.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri)
|
|
44
55
|
}, /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
45
56
|
localId: this.node.attrs.localId,
|
|
46
57
|
syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
|
|
@@ -50,7 +61,7 @@ export class SyncBlock extends ReactNodeView {
|
|
|
50
61
|
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
62
|
},
|
|
52
63
|
api: this.api
|
|
53
|
-
})) : /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
64
|
+
}))) : /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
|
|
54
65
|
localId: this.node.attrs.localId,
|
|
55
66
|
syncedBlockRenderer: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.syncedBlockRenderer,
|
|
56
67
|
useFetchSyncBlockTitle: () => useFetchSyncBlockTitle(syncBlockStore, this.node),
|
|
@@ -81,7 +92,7 @@ export const syncBlockNodeView = ({
|
|
|
81
92
|
options,
|
|
82
93
|
node,
|
|
83
94
|
view,
|
|
84
|
-
getPos,
|
|
95
|
+
getPos: getPos,
|
|
85
96
|
portalProviderAPI,
|
|
86
97
|
eventDispatcher
|
|
87
98
|
}).init();
|