@atlaskit/editor-plugin-synced-block 8.3.3 → 8.3.5
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/AGENTS.md +1 -2
- package/CHANGELOG.md +14 -0
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +7 -25
- package/dist/cjs/nodeviews/syncedBlock.js +1 -4
- package/dist/cjs/pm-plugins/main.js +54 -60
- package/dist/cjs/pm-plugins/menu-and-toolbar-experiences.js +10 -19
- package/dist/cjs/pm-plugins/utils/utils.js +3 -10
- package/dist/cjs/syncedBlockPlugin.js +1 -7
- package/dist/cjs/ui/DeleteConfirmationModal.js +29 -93
- package/dist/cjs/ui/SyncBlockLabel.js +1 -4
- package/dist/cjs/ui/SyncedLocationDropdown.js +2 -2
- package/dist/cjs/ui/floating-toolbar.js +1 -2
- package/dist/cjs/ui/quick-insert.js +2 -3
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +7 -23
- package/dist/es2019/nodeviews/syncedBlock.js +1 -4
- package/dist/es2019/pm-plugins/main.js +42 -48
- package/dist/es2019/pm-plugins/menu-and-toolbar-experiences.js +7 -19
- package/dist/es2019/pm-plugins/utils/utils.js +3 -11
- package/dist/es2019/syncedBlockPlugin.js +1 -7
- package/dist/es2019/ui/DeleteConfirmationModal.js +36 -77
- package/dist/es2019/ui/SyncBlockLabel.js +1 -4
- package/dist/es2019/ui/SyncedLocationDropdown.js +2 -2
- package/dist/es2019/ui/floating-toolbar.js +1 -2
- package/dist/es2019/ui/quick-insert.js +2 -2
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +7 -25
- package/dist/esm/nodeviews/syncedBlock.js +1 -4
- package/dist/esm/pm-plugins/main.js +54 -60
- package/dist/esm/pm-plugins/menu-and-toolbar-experiences.js +10 -19
- package/dist/esm/pm-plugins/utils/utils.js +3 -11
- package/dist/esm/syncedBlockPlugin.js +1 -7
- package/dist/esm/ui/DeleteConfirmationModal.js +29 -93
- package/dist/esm/ui/SyncBlockLabel.js +1 -4
- package/dist/esm/ui/SyncedLocationDropdown.js +2 -2
- package/dist/esm/ui/floating-toolbar.js +1 -2
- package/dist/esm/ui/quick-insert.js +2 -3
- package/dist/types/nodeviews/bodiedSyncedBlock.d.ts +1 -3
- package/dist/types-ts4.5/nodeviews/bodiedSyncedBlock.d.ts +1 -3
- package/docs/0-intro.tsx +1 -1
- package/package.json +6 -21
- package/dist/cjs/nodeviews/bodiedSyncBlockNodeWithToDOMFixed.js +0 -35
- package/dist/es2019/nodeviews/bodiedSyncBlockNodeWithToDOMFixed.js +0 -27
- package/dist/esm/nodeviews/bodiedSyncBlockNodeWithToDOMFixed.js +0 -28
- package/dist/types/nodeviews/bodiedSyncBlockNodeWithToDOMFixed.d.ts +0 -6
- package/dist/types-ts4.5/nodeviews/bodiedSyncBlockNodeWithToDOMFixed.d.ts +0 -6
|
@@ -14,33 +14,9 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
14
14
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
16
16
|
import ModalDialog, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import { Text, Box } from '@atlaskit/primitives/compiled';
|
|
19
18
|
import Spinner from '@atlaskit/spinner';
|
|
20
19
|
import { syncedBlockPluginKey } from '../pm-plugins/main';
|
|
21
|
-
var modalContentMapOld = {
|
|
22
|
-
'source-block-deleted': {
|
|
23
|
-
titleMultiple: messages.deleteConfirmationModalTitleMultiple,
|
|
24
|
-
titleSingle: messages.deletionConfirmationModalTitleSingle,
|
|
25
|
-
descriptionSingle: messages.deletionConfirmationModalDescriptionNoRef,
|
|
26
|
-
descriptionMultiple: messages.deletionConfirmationModalDescription,
|
|
27
|
-
confirmButtonLabel: messages.deleteConfirmationModalDeleteButton
|
|
28
|
-
},
|
|
29
|
-
'source-block-unpublished': {
|
|
30
|
-
titleMultiple: messages.deleteConfirmationModalTitleMultiple,
|
|
31
|
-
titleSingle: messages.deletionConfirmationModalTitleSingle,
|
|
32
|
-
descriptionSingle: messages.deletionConfirmationModalDescriptionNoRef,
|
|
33
|
-
descriptionMultiple: messages.deletionConfirmationModalDescription,
|
|
34
|
-
confirmButtonLabel: messages.deleteConfirmationModalDeleteButton
|
|
35
|
-
},
|
|
36
|
-
'source-block-unsynced': {
|
|
37
|
-
titleMultiple: messages.unsyncConfirmationModalTitle,
|
|
38
|
-
titleSingle: messages.unsyncConfirmationModalTitle,
|
|
39
|
-
descriptionSingle: messages.unsyncConfirmModalDescriptionSingle,
|
|
40
|
-
descriptionMultiple: messages.unsyncConfirmModalDescriptionMultiple,
|
|
41
|
-
confirmButtonLabel: messages.deleteConfirmationModalUnsyncButton
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
20
|
var modalContentMap = {
|
|
45
21
|
'source-block-deleted': {
|
|
46
22
|
titleMultiple: messages.deleteConfirmationModalTitleMultiple,
|
|
@@ -102,10 +78,9 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
102
78
|
formatMessage = _useIntl.formatMessage;
|
|
103
79
|
var resolverRef = React.useRef(undefined);
|
|
104
80
|
|
|
105
|
-
// When
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
// close the modal (which was never open).
|
|
81
|
+
// When a source block with no references is deleted, the modal is never shown but
|
|
82
|
+
// onDeleteCompleted still sets bodiedSyncBlockDeletionStatus to 'completed'. This ref signals
|
|
83
|
+
// the useEffect to silently reset the status without trying to close the modal (which was never open).
|
|
109
84
|
var skipModalOnCompletedRef = React.useRef(false);
|
|
110
85
|
var handleClick = useCallback(function (confirm) {
|
|
111
86
|
return function () {
|
|
@@ -197,24 +172,20 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
197
172
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
198
173
|
while (1) switch (_context3.prev = _context3.next) {
|
|
199
174
|
case 0:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
_context3.prev = 1;
|
|
205
|
-
_context3.next = 4;
|
|
175
|
+
_context3.prev = 0;
|
|
176
|
+
_context3.next = 3;
|
|
206
177
|
return fetchReferenceCountRef.current(syncBlockIds);
|
|
207
|
-
case
|
|
178
|
+
case 3:
|
|
208
179
|
count = _context3.sent;
|
|
209
|
-
_context3.next =
|
|
180
|
+
_context3.next = 9;
|
|
210
181
|
break;
|
|
211
|
-
case
|
|
212
|
-
_context3.prev =
|
|
213
|
-
_context3.t0 = _context3["catch"](
|
|
182
|
+
case 6:
|
|
183
|
+
_context3.prev = 6;
|
|
184
|
+
_context3.t0 = _context3["catch"](0);
|
|
214
185
|
count = 1;
|
|
215
|
-
case
|
|
186
|
+
case 9:
|
|
216
187
|
if (!(count === 0)) {
|
|
217
|
-
_context3.next =
|
|
188
|
+
_context3.next = 13;
|
|
218
189
|
break;
|
|
219
190
|
}
|
|
220
191
|
// No references — auto-confirm without showing the modal.
|
|
@@ -231,9 +202,8 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
231
202
|
} : {}));
|
|
232
203
|
});
|
|
233
204
|
return _context3.abrupt("return", true);
|
|
234
|
-
case
|
|
205
|
+
case 13:
|
|
235
206
|
setReferenceCount(count);
|
|
236
|
-
case 15:
|
|
237
207
|
setIsOpen(true);
|
|
238
208
|
setSyncBlockIds(syncBlockIds);
|
|
239
209
|
if (deleteReason) {
|
|
@@ -252,11 +222,11 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
252
222
|
});
|
|
253
223
|
}
|
|
254
224
|
return _context3.abrupt("return", confirmedPromise);
|
|
255
|
-
case
|
|
225
|
+
case 20:
|
|
256
226
|
case "end":
|
|
257
227
|
return _context3.stop();
|
|
258
228
|
}
|
|
259
|
-
}, _callee3, null, [[
|
|
229
|
+
}, _callee3, null, [[0, 6]]);
|
|
260
230
|
}));
|
|
261
231
|
return function (_x3, _x4) {
|
|
262
232
|
return _ref5.apply(this, arguments);
|
|
@@ -273,7 +243,7 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
273
243
|
};
|
|
274
244
|
}, [syncBlockStoreManager, confirmationCallback]);
|
|
275
245
|
useEffect(function () {
|
|
276
|
-
if (skipModalOnCompletedRef.current
|
|
246
|
+
if (skipModalOnCompletedRef.current) {
|
|
277
247
|
if (bodiedSyncBlockDeletionStatus === 'completed') {
|
|
278
248
|
var _api$core6;
|
|
279
249
|
// Deletion was auto-confirmed without showing the modal (no references).
|
|
@@ -308,44 +278,10 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
308
278
|
});
|
|
309
279
|
}
|
|
310
280
|
}, [api === null || api === void 0 || (_api$core8 = api.core) === null || _api$core8 === void 0 ? void 0 : _api$core8.actions, bodiedSyncBlockDeletionStatus, isOpen]);
|
|
311
|
-
useEffect(function () {
|
|
312
|
-
// When the flag is off, fetch references after the modal opens (original behaviour).
|
|
313
|
-
// When the flag is on, references are fetched and set before the modal opens in
|
|
314
|
-
// confirmationCallback, so this useEffect is skipped to avoid a duplicate fetch.
|
|
315
|
-
if (isOpen && syncBlockIds !== undefined && !fg('platform_synced_block_patch_9')) {
|
|
316
|
-
var fetchReferences = /*#__PURE__*/function () {
|
|
317
|
-
var _ref0 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
318
|
-
var totalCount;
|
|
319
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
320
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
321
|
-
case 0:
|
|
322
|
-
_context4.prev = 0;
|
|
323
|
-
_context4.next = 3;
|
|
324
|
-
return fetchReferenceCountRef.current(syncBlockIds);
|
|
325
|
-
case 3:
|
|
326
|
-
totalCount = _context4.sent;
|
|
327
|
-
setReferenceCount(totalCount);
|
|
328
|
-
_context4.next = 10;
|
|
329
|
-
break;
|
|
330
|
-
case 7:
|
|
331
|
-
_context4.prev = 7;
|
|
332
|
-
_context4.t0 = _context4["catch"](0);
|
|
333
|
-
setReferenceCount(0);
|
|
334
|
-
case 10:
|
|
335
|
-
case "end":
|
|
336
|
-
return _context4.stop();
|
|
337
|
-
}
|
|
338
|
-
}, _callee4, null, [[0, 7]]);
|
|
339
|
-
}));
|
|
340
|
-
return function fetchReferences() {
|
|
341
|
-
return _ref0.apply(this, arguments);
|
|
342
|
-
};
|
|
343
|
-
}();
|
|
344
281
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}, [isOpen, syncBlockIds]);
|
|
282
|
+
// References are fetched and set before the modal opens in
|
|
283
|
+
// confirmationCallback, so no additional fetch is needed here.
|
|
284
|
+
|
|
349
285
|
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
350
286
|
onClose: handleClick(false),
|
|
351
287
|
testId: "sync-block-delete-confirmation",
|
|
@@ -355,7 +291,7 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
355
291
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
356
292
|
size: "large"
|
|
357
293
|
})) : /*#__PURE__*/React.createElement(ModalContent, {
|
|
358
|
-
content:
|
|
294
|
+
content: modalContentMap[deleteReason],
|
|
359
295
|
referenceCount: referenceCount,
|
|
360
296
|
handleClick: handleClick,
|
|
361
297
|
formatMessage: formatMessage,
|
|
@@ -365,15 +301,15 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
|
|
|
365
301
|
sourceCount: (syncBlockIds === null || syncBlockIds === void 0 ? void 0 : syncBlockIds.length) || 0
|
|
366
302
|
}))));
|
|
367
303
|
};
|
|
368
|
-
var ModalContent = function ModalContent(
|
|
369
|
-
var content =
|
|
370
|
-
referenceCount =
|
|
371
|
-
handleClick =
|
|
372
|
-
formatMessage =
|
|
373
|
-
isDeleting =
|
|
374
|
-
isDisabled =
|
|
375
|
-
deleteReason =
|
|
376
|
-
sourceCount =
|
|
304
|
+
var ModalContent = function ModalContent(_ref0) {
|
|
305
|
+
var content = _ref0.content,
|
|
306
|
+
referenceCount = _ref0.referenceCount,
|
|
307
|
+
handleClick = _ref0.handleClick,
|
|
308
|
+
formatMessage = _ref0.formatMessage,
|
|
309
|
+
isDeleting = _ref0.isDeleting,
|
|
310
|
+
isDisabled = _ref0.isDisabled,
|
|
311
|
+
deleteReason = _ref0.deleteReason,
|
|
312
|
+
sourceCount = _ref0.sourceCount;
|
|
377
313
|
var titleMultiple = content.titleMultiple,
|
|
378
314
|
titleSingle = content.titleSingle,
|
|
379
315
|
descriptionSingle = content.descriptionSingle,
|
|
@@ -5,7 +5,6 @@ import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
5
5
|
import { SyncBlockLabelSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
6
6
|
import BlockSyncedIcon from '@atlaskit/icon-lab/core/block-synced';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
11
10
|
import { formatElapsedTime } from './utils/time';
|
|
@@ -71,9 +70,7 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
71
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
72
71
|
,
|
|
73
72
|
className: SyncBlockLabelSharedCssClassName.labelClassName,
|
|
74
|
-
"aria-describedby":
|
|
75
|
-
exposure: true
|
|
76
|
-
}) ? undefined : ariaDescribedById
|
|
73
|
+
"aria-describedby": isSource || isUnsyncedBlock ? undefined : ariaDescribedById
|
|
77
74
|
}, /*#__PURE__*/React.createElement(BlockSyncedIcon, {
|
|
78
75
|
color: "var(--ds-icon-subtle, #505258)",
|
|
79
76
|
size: "small",
|
|
@@ -269,7 +269,7 @@ export var processReferenceData = function processReferenceData(referenceData, i
|
|
|
269
269
|
var references = _step.value;
|
|
270
270
|
if (references.length > 1) {
|
|
271
271
|
references.forEach(function (reference, index) {
|
|
272
|
-
return reference.title = "".concat(reference.title === '' && reference.hasAccess
|
|
272
|
+
return reference.title = "".concat(reference.title === '' && reference.hasAccess ? formatMessage(messages.syncedLocationDropdownUntitledPage) : reference.title, ": ").concat(formatMessage(messages.syncedLocationDropdownTitleBlockIndex, {
|
|
273
273
|
index: index + 1
|
|
274
274
|
}));
|
|
275
275
|
});
|
|
@@ -419,7 +419,7 @@ var DropdownContent = function DropdownContent(_ref7) {
|
|
|
419
419
|
count: "".concat(referenceData.length > 99 ? '99+' : referenceData.length)
|
|
420
420
|
})
|
|
421
421
|
}, referenceData.map(function (reference) {
|
|
422
|
-
var title = reference.title === '' && reference.hasAccess
|
|
422
|
+
var title = reference.title === '' && reference.hasAccess ? formatMessage(messages.syncedLocationDropdownUntitledPage) : reference.title || reference.url || '';
|
|
423
423
|
return /*#__PURE__*/React.createElement("div", {
|
|
424
424
|
key: reference.title,
|
|
425
425
|
className: ax(["_2ll012x7"])
|
|
@@ -12,7 +12,6 @@ import CopyIcon from '@atlaskit/icon/core/copy';
|
|
|
12
12
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
13
13
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
14
14
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock, unsync } from '../editor-commands';
|
|
17
16
|
import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
18
17
|
import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
|
|
@@ -78,7 +77,7 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
78
77
|
var _syncBlockInstance$da;
|
|
79
78
|
return /*#__PURE__*/React.createElement(Button, {
|
|
80
79
|
areAnyNewToolbarFlagsEnabled: true,
|
|
81
|
-
disabled:
|
|
80
|
+
disabled: (syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da = syncBlockInstance.data) === null || _syncBlockInstance$da === void 0 ? void 0 : _syncBlockInstance$da.status) === 'unpublished',
|
|
82
81
|
icon: /*#__PURE__*/React.createElement(LinkBrokenIcon, {
|
|
83
82
|
label: ""
|
|
84
83
|
}),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* quick-insert.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
2
|
import "./quick-insert.compiled.css";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -20,8 +19,8 @@ export var getQuickInsertConfig = function getQuickInsertConfig(config, api, syn
|
|
|
20
19
|
id: 'syncBlock',
|
|
21
20
|
title: formatMessage(blockTypeMessages.syncedBlock),
|
|
22
21
|
description: formatMessage(blockTypeMessages.syncedBlockDescription),
|
|
23
|
-
priority:
|
|
24
|
-
keywords: ['synced', 'block', 'synced-block', 'sync', 'sync-block', 'auto', 'update', 'excerpt', 'connect'
|
|
22
|
+
priority: 400,
|
|
23
|
+
keywords: ['synced', 'block', 'synced-block', 'sync', 'sync-block', 'auto', 'update', 'excerpt', 'connect', 'create'],
|
|
25
24
|
isDisabledOffline: true,
|
|
26
25
|
keyshortcut: '',
|
|
27
26
|
lozenge: /*#__PURE__*/React.createElement("span", {
|
|
@@ -31,15 +31,13 @@ export declare class BodiedSyncBlock implements NodeView {
|
|
|
31
31
|
getPos: getPosHandlerNode;
|
|
32
32
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
33
33
|
private api?;
|
|
34
|
-
private syncBlockStore?;
|
|
35
34
|
private cleanupConnectivityModeListener?;
|
|
36
35
|
private cleanupViewModeListener?;
|
|
37
36
|
private labelKey;
|
|
38
|
-
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI
|
|
37
|
+
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI);
|
|
39
38
|
private updateContentEditable;
|
|
40
39
|
private handleConnectivityModeChange;
|
|
41
40
|
private handleViewModeChange;
|
|
42
|
-
private get syncedBlockStore();
|
|
43
41
|
update(node: PMNode): boolean;
|
|
44
42
|
ignoreMutation(mutation: MutationRecord | {
|
|
45
43
|
target: Node;
|
|
@@ -31,15 +31,13 @@ export declare class BodiedSyncBlock implements NodeView {
|
|
|
31
31
|
getPos: getPosHandlerNode;
|
|
32
32
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
33
33
|
private api?;
|
|
34
|
-
private syncBlockStore?;
|
|
35
34
|
private cleanupConnectivityModeListener?;
|
|
36
35
|
private cleanupViewModeListener?;
|
|
37
36
|
private labelKey;
|
|
38
|
-
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI
|
|
37
|
+
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI);
|
|
39
38
|
private updateContentEditable;
|
|
40
39
|
private handleConnectivityModeChange;
|
|
41
40
|
private handleViewModeChange;
|
|
42
|
-
private get syncedBlockStore();
|
|
43
41
|
update(node: PMNode): boolean;
|
|
44
42
|
ignoreMutation(mutation: MutationRecord | {
|
|
45
43
|
target: Node;
|
package/docs/0-intro.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.5",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@atlaskit/adf-schema": "^52.11.0",
|
|
32
32
|
"@atlaskit/button": "23.11.5",
|
|
33
33
|
"@atlaskit/dropdown-menu": "16.8.11",
|
|
34
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^10.
|
|
34
|
+
"@atlaskit/editor-json-transformer": "^8.32.0",
|
|
35
|
+
"@atlaskit/editor-plugin-analytics": "^10.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-menu": "^9.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-connectivity": "10.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-format": "^4.1.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
45
45
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
46
46
|
"@atlaskit/editor-synced-block-provider": "^6.6.0",
|
|
47
|
-
"@atlaskit/editor-toolbar": "^1.
|
|
47
|
+
"@atlaskit/editor-toolbar": "^1.5.0",
|
|
48
48
|
"@atlaskit/flag": "^17.11.0",
|
|
49
49
|
"@atlaskit/icon": "34.5.0",
|
|
50
50
|
"@atlaskit/icon-lab": "^6.9.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
55
|
"@atlaskit/primitives": "^19.0.0",
|
|
56
56
|
"@atlaskit/spinner": "19.1.2",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^81.0.0",
|
|
58
58
|
"@atlaskit/tokens": "13.0.4",
|
|
59
59
|
"@atlaskit/tooltip": "^22.2.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"date-fns": "^2.17.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^114.
|
|
67
|
+
"@atlaskit/editor-common": "^114.32.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|
|
@@ -112,21 +112,6 @@
|
|
|
112
112
|
"confluence_fronend_labels_categorization_migration": {
|
|
113
113
|
"type": "boolean"
|
|
114
114
|
},
|
|
115
|
-
"platform_synced_block_fix_experience_tracking": {
|
|
116
|
-
"type": "boolean"
|
|
117
|
-
},
|
|
118
|
-
"platform_synced_block_update_refactor": {
|
|
119
|
-
"type": "boolean"
|
|
120
|
-
},
|
|
121
|
-
"platform_synced_block_patch_8": {
|
|
122
|
-
"type": "boolean"
|
|
123
|
-
},
|
|
124
|
-
"platform_synced_block_patch_9": {
|
|
125
|
-
"type": "boolean"
|
|
126
|
-
},
|
|
127
|
-
"platform_synced_block_patch_10": {
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
115
|
"platform_synced_block_patch_11": {
|
|
131
116
|
"type": "boolean"
|
|
132
117
|
},
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.bodiedSyncBlockNodeWithToDOMFixed = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
-
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
11
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
/**
|
|
14
|
-
* Based on packages/editor/editor-plugin-synced-block/src/nodeviews/bodiedSyncedBlock.tsx
|
|
15
|
-
* Adding correct classnames and structure to the toDOM, necessary for SSR rendering
|
|
16
|
-
*/
|
|
17
|
-
var bodiedSyncBlockNodeWithToDOMFixed = exports.bodiedSyncBlockNodeWithToDOMFixed = function bodiedSyncBlockNodeWithToDOMFixed() {
|
|
18
|
-
return _objectSpread(_objectSpread({}, _adfSchema.bodiedSyncBlock), {}, {
|
|
19
|
-
toDOM: function toDOM(node) {
|
|
20
|
-
var _node$attrs = node.attrs,
|
|
21
|
-
localId = _node$attrs.localId,
|
|
22
|
-
resourceId = _node$attrs.resourceId;
|
|
23
|
-
var outerAttrs = {
|
|
24
|
-
class: _syncBlock.BodiedSyncBlockSharedCssClassName.prefix,
|
|
25
|
-
'data-bodied-sync-block': '',
|
|
26
|
-
'data-local-id': localId,
|
|
27
|
-
'data-resource-id': resourceId
|
|
28
|
-
};
|
|
29
|
-
var innerAttrs = {
|
|
30
|
-
class: _syncBlock.BodiedSyncBlockSharedCssClassName.content
|
|
31
|
-
};
|
|
32
|
-
return ['div', outerAttrs, ['div', innerAttrs, 0]];
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { bodiedSyncBlock } from '@atlaskit/adf-schema';
|
|
2
|
-
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
3
|
-
/**
|
|
4
|
-
* Based on packages/editor/editor-plugin-synced-block/src/nodeviews/bodiedSyncedBlock.tsx
|
|
5
|
-
* Adding correct classnames and structure to the toDOM, necessary for SSR rendering
|
|
6
|
-
*/
|
|
7
|
-
export const bodiedSyncBlockNodeWithToDOMFixed = () => {
|
|
8
|
-
return {
|
|
9
|
-
...bodiedSyncBlock,
|
|
10
|
-
toDOM: node => {
|
|
11
|
-
const {
|
|
12
|
-
localId,
|
|
13
|
-
resourceId
|
|
14
|
-
} = node.attrs;
|
|
15
|
-
const outerAttrs = {
|
|
16
|
-
class: BodiedSyncBlockSharedCssClassName.prefix,
|
|
17
|
-
'data-bodied-sync-block': '',
|
|
18
|
-
'data-local-id': localId,
|
|
19
|
-
'data-resource-id': resourceId
|
|
20
|
-
};
|
|
21
|
-
const innerAttrs = {
|
|
22
|
-
class: BodiedSyncBlockSharedCssClassName.content
|
|
23
|
-
};
|
|
24
|
-
return ['div', outerAttrs, ['div', innerAttrs, 0]];
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { bodiedSyncBlock } from '@atlaskit/adf-schema';
|
|
5
|
-
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
6
|
-
/**
|
|
7
|
-
* Based on packages/editor/editor-plugin-synced-block/src/nodeviews/bodiedSyncedBlock.tsx
|
|
8
|
-
* Adding correct classnames and structure to the toDOM, necessary for SSR rendering
|
|
9
|
-
*/
|
|
10
|
-
export var bodiedSyncBlockNodeWithToDOMFixed = function bodiedSyncBlockNodeWithToDOMFixed() {
|
|
11
|
-
return _objectSpread(_objectSpread({}, bodiedSyncBlock), {}, {
|
|
12
|
-
toDOM: function toDOM(node) {
|
|
13
|
-
var _node$attrs = node.attrs,
|
|
14
|
-
localId = _node$attrs.localId,
|
|
15
|
-
resourceId = _node$attrs.resourceId;
|
|
16
|
-
var outerAttrs = {
|
|
17
|
-
class: BodiedSyncBlockSharedCssClassName.prefix,
|
|
18
|
-
'data-bodied-sync-block': '',
|
|
19
|
-
'data-local-id': localId,
|
|
20
|
-
'data-resource-id': resourceId
|
|
21
|
-
};
|
|
22
|
-
var innerAttrs = {
|
|
23
|
-
class: BodiedSyncBlockSharedCssClassName.content
|
|
24
|
-
};
|
|
25
|
-
return ['div', outerAttrs, ['div', innerAttrs, 0]];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Based on packages/editor/editor-plugin-synced-block/src/nodeviews/bodiedSyncedBlock.tsx
|
|
4
|
-
* Adding correct classnames and structure to the toDOM, necessary for SSR rendering
|
|
5
|
-
*/
|
|
6
|
-
export declare const bodiedSyncBlockNodeWithToDOMFixed: () => NodeSpec;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Based on packages/editor/editor-plugin-synced-block/src/nodeviews/bodiedSyncedBlock.tsx
|
|
4
|
-
* Adding correct classnames and structure to the toDOM, necessary for SSR rendering
|
|
5
|
-
*/
|
|
6
|
-
export declare const bodiedSyncBlockNodeWithToDOMFixed: () => NodeSpec;
|