@atlaskit/editor-plugin-synced-block 8.4.12 → 8.4.13
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 +10 -0
- package/dist/cjs/ui/SyncBlockLabel.js +20 -2
- package/dist/cjs/ui/floating-toolbar.js +32 -14
- package/dist/es2019/ui/SyncBlockLabel.js +20 -2
- package/dist/es2019/ui/floating-toolbar.js +33 -14
- package/dist/esm/ui/SyncBlockLabel.js +20 -2
- package/dist/esm/ui/floating-toolbar.js +32 -14
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 8.4.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c4ae9a3284485`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c4ae9a3284485) -
|
|
8
|
+
Add extra space after 'Last edited:' and bold 'Synced from' heading in synced block tooltip
|
|
9
|
+
- [`02e2dd6d73009`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/02e2dd6d73009) -
|
|
10
|
+
Move delete button out of overflow menu into direct toolbar button in synced block toolbar
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 8.4.12
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _reactIntl = require("react-intl");
|
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
14
14
|
var _blockSynced = _interopRequireDefault(require("@atlaskit/icon-lab/core/block-synced"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
17
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
18
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
@@ -40,7 +41,24 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
40
41
|
var tooltipContent = tooltipMessage;
|
|
41
42
|
if (contentUpdatedAt) {
|
|
42
43
|
var elapsedTime = (0, _time.formatElapsedTime)(contentUpdatedAt, intl);
|
|
43
|
-
tooltipContent = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
44
|
+
tooltipContent = (0, _platformFeatureFlags.fg)('platform_synced_block_patch_13') ? /*#__PURE__*/_react.default.createElement("div", null, title ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
45
|
+
size: "small",
|
|
46
|
+
color: "color.text.inverse",
|
|
47
|
+
weight: "bold"
|
|
48
|
+
}, formatMessage(_messages.syncBlockMessages.referenceSyncBlockSyncedFrom)), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
49
|
+
size: "small",
|
|
50
|
+
color: "color.text.inverse"
|
|
51
|
+
}, ' ', title)) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
52
|
+
size: "small",
|
|
53
|
+
color: "color.text.inverse"
|
|
54
|
+
}, tooltipMessage), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
55
|
+
size: "small",
|
|
56
|
+
color: "color.text.inverse",
|
|
57
|
+
weight: "bold"
|
|
58
|
+
}, formatMessage(_messages.syncBlockMessages.referenceSyncBlockLastEdited)), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
59
|
+
size: "small",
|
|
60
|
+
color: "color.text.inverse"
|
|
61
|
+
}, ' ', elapsedTime)) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
44
62
|
size: "small",
|
|
45
63
|
color: "color.text.inverse"
|
|
46
64
|
}, tooltipMessage), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
@@ -53,7 +71,7 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
53
71
|
}, elapsedTime));
|
|
54
72
|
}
|
|
55
73
|
setTooltipContent(tooltipContent);
|
|
56
|
-
}, [contentUpdatedAt, formatMessage, intl, tooltipMessage]);
|
|
74
|
+
}, [contentUpdatedAt, formatMessage, intl, title, tooltipMessage]);
|
|
57
75
|
var ariaDescribedById = "sync-block-label-description-".concat(localId);
|
|
58
76
|
var getLabelContent = (0, _react.useMemo)(function () {
|
|
59
77
|
if (isUnsyncedBlock) {
|
|
@@ -18,6 +18,7 @@ var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
|
18
18
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
19
19
|
var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
20
20
|
var _linkBroken = _interopRequireDefault(require("@atlaskit/icon/core/link-broken"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _editorCommands = require("../editor-commands");
|
|
22
23
|
var _utils2 = require("../pm-plugins/utils/utils");
|
|
23
24
|
var _types = require("../types");
|
|
@@ -129,23 +130,40 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
|
|
|
129
130
|
}, hoverDecorationProps(nodeType, _consts.akEditorSelectedNodeClassName));
|
|
130
131
|
items.push(editSourceButton);
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_13')) {
|
|
134
|
+
var separator = {
|
|
135
|
+
type: 'separator'
|
|
136
|
+
};
|
|
137
|
+
var _deleteButton = _objectSpread({
|
|
138
|
+
id: 'editor.syncedBlock.delete',
|
|
139
|
+
type: 'button',
|
|
140
|
+
appearance: 'danger',
|
|
140
141
|
title: formatMessage(_messages.default.delete),
|
|
142
|
+
showTitle: false,
|
|
143
|
+
tooltipContent: formatMessage(_messages.default.delete),
|
|
141
144
|
onClick: (0, _editorCommands.removeSyncedBlock)(api),
|
|
142
|
-
icon:
|
|
143
|
-
label: ""
|
|
144
|
-
}),
|
|
145
|
+
icon: _delete.default,
|
|
145
146
|
testId: isBodiedSyncBlock ? _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete
|
|
146
|
-
}, hoverDecorationProps(nodeType))
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
}, hoverDecorationProps(nodeType));
|
|
148
|
+
items.push(separator, _deleteButton);
|
|
149
|
+
} else {
|
|
150
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
151
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
152
|
+
var testId = isBodiedSyncBlock ? _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
153
|
+
var overflowMenuConfig = [{
|
|
154
|
+
type: 'overflow-dropdown',
|
|
155
|
+
testId: testId,
|
|
156
|
+
options: [_objectSpread({
|
|
157
|
+
title: formatMessage(_messages.default.delete),
|
|
158
|
+
onClick: (0, _editorCommands.removeSyncedBlock)(api),
|
|
159
|
+
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
160
|
+
label: ""
|
|
161
|
+
}),
|
|
162
|
+
testId: isBodiedSyncBlock ? _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete
|
|
163
|
+
}, hoverDecorationProps(nodeType))]
|
|
164
|
+
}];
|
|
165
|
+
items.push.apply(items, overflowMenuConfig);
|
|
166
|
+
}
|
|
149
167
|
}
|
|
150
168
|
var getDomRef = function getDomRef(editorView) {
|
|
151
169
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
|
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl';
|
|
|
3
3
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { SyncBlockLabelSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
5
5
|
import BlockSyncedIcon from '@atlaskit/icon-lab/core/block-synced';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
7
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -30,7 +31,24 @@ const SyncBlockLabelComponent = ({
|
|
|
30
31
|
let tooltipContent = tooltipMessage;
|
|
31
32
|
if (contentUpdatedAt) {
|
|
32
33
|
const elapsedTime = formatElapsedTime(contentUpdatedAt, intl);
|
|
33
|
-
tooltipContent = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
34
|
+
tooltipContent = fg('platform_synced_block_patch_13') ? /*#__PURE__*/React.createElement("div", null, title ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
35
|
+
size: "small",
|
|
36
|
+
color: "color.text.inverse",
|
|
37
|
+
weight: "bold"
|
|
38
|
+
}, formatMessage(messages.referenceSyncBlockSyncedFrom)), /*#__PURE__*/React.createElement(Text, {
|
|
39
|
+
size: "small",
|
|
40
|
+
color: "color.text.inverse"
|
|
41
|
+
}, ' ', title)) : /*#__PURE__*/React.createElement(Text, {
|
|
42
|
+
size: "small",
|
|
43
|
+
color: "color.text.inverse"
|
|
44
|
+
}, tooltipMessage), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Text, {
|
|
45
|
+
size: "small",
|
|
46
|
+
color: "color.text.inverse",
|
|
47
|
+
weight: "bold"
|
|
48
|
+
}, formatMessage(messages.referenceSyncBlockLastEdited)), /*#__PURE__*/React.createElement(Text, {
|
|
49
|
+
size: "small",
|
|
50
|
+
color: "color.text.inverse"
|
|
51
|
+
}, ' ', elapsedTime)) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
34
52
|
size: "small",
|
|
35
53
|
color: "color.text.inverse"
|
|
36
54
|
}, tooltipMessage), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -43,7 +61,7 @@ const SyncBlockLabelComponent = ({
|
|
|
43
61
|
}, elapsedTime));
|
|
44
62
|
}
|
|
45
63
|
setTooltipContent(tooltipContent);
|
|
46
|
-
}, [contentUpdatedAt, formatMessage, intl, tooltipMessage]);
|
|
64
|
+
}, [contentUpdatedAt, formatMessage, intl, title, tooltipMessage]);
|
|
47
65
|
const ariaDescribedById = `sync-block-label-description-${localId}`;
|
|
48
66
|
const getLabelContent = useMemo(() => {
|
|
49
67
|
if (isUnsyncedBlock) {
|
|
@@ -9,6 +9,7 @@ import CopyIcon from '@atlaskit/icon/core/copy';
|
|
|
9
9
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
10
10
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
11
11
|
import LinkBrokenIcon from '@atlaskit/icon/core/link-broken';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock, unsync } from '../editor-commands';
|
|
13
14
|
import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
14
15
|
import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
|
|
@@ -125,24 +126,42 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
|
|
|
125
126
|
};
|
|
126
127
|
items.push(editSourceButton);
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
if (fg('platform_synced_block_patch_13')) {
|
|
130
|
+
const separator = {
|
|
131
|
+
type: 'separator'
|
|
132
|
+
};
|
|
133
|
+
const deleteButton = {
|
|
134
|
+
id: 'editor.syncedBlock.delete',
|
|
135
|
+
type: 'button',
|
|
136
|
+
appearance: 'danger',
|
|
136
137
|
title: formatMessage(commonMessages.delete),
|
|
138
|
+
showTitle: false,
|
|
139
|
+
tooltipContent: formatMessage(commonMessages.delete),
|
|
137
140
|
onClick: removeSyncedBlock(api),
|
|
138
|
-
icon:
|
|
139
|
-
label: ""
|
|
140
|
-
}),
|
|
141
|
+
icon: DeleteIcon,
|
|
141
142
|
testId: isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete,
|
|
142
143
|
...hoverDecorationProps(nodeType)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
};
|
|
145
|
+
items.push(separator, deleteButton);
|
|
146
|
+
} else {
|
|
147
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
148
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
149
|
+
const testId = isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
150
|
+
const overflowMenuConfig = [{
|
|
151
|
+
type: 'overflow-dropdown',
|
|
152
|
+
testId,
|
|
153
|
+
options: [{
|
|
154
|
+
title: formatMessage(commonMessages.delete),
|
|
155
|
+
onClick: removeSyncedBlock(api),
|
|
156
|
+
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
157
|
+
label: ""
|
|
158
|
+
}),
|
|
159
|
+
testId: isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete,
|
|
160
|
+
...hoverDecorationProps(nodeType)
|
|
161
|
+
}]
|
|
162
|
+
}];
|
|
163
|
+
items.push(...overflowMenuConfig);
|
|
164
|
+
}
|
|
146
165
|
}
|
|
147
166
|
const getDomRef = editorView => {
|
|
148
167
|
const domAtPos = editorView.domAtPos.bind(editorView);
|
|
@@ -4,6 +4,7 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
10
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -31,7 +32,24 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
31
32
|
var tooltipContent = tooltipMessage;
|
|
32
33
|
if (contentUpdatedAt) {
|
|
33
34
|
var elapsedTime = formatElapsedTime(contentUpdatedAt, intl);
|
|
34
|
-
tooltipContent = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
35
|
+
tooltipContent = fg('platform_synced_block_patch_13') ? /*#__PURE__*/React.createElement("div", null, title ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
36
|
+
size: "small",
|
|
37
|
+
color: "color.text.inverse",
|
|
38
|
+
weight: "bold"
|
|
39
|
+
}, formatMessage(messages.referenceSyncBlockSyncedFrom)), /*#__PURE__*/React.createElement(Text, {
|
|
40
|
+
size: "small",
|
|
41
|
+
color: "color.text.inverse"
|
|
42
|
+
}, ' ', title)) : /*#__PURE__*/React.createElement(Text, {
|
|
43
|
+
size: "small",
|
|
44
|
+
color: "color.text.inverse"
|
|
45
|
+
}, tooltipMessage), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Text, {
|
|
46
|
+
size: "small",
|
|
47
|
+
color: "color.text.inverse",
|
|
48
|
+
weight: "bold"
|
|
49
|
+
}, formatMessage(messages.referenceSyncBlockLastEdited)), /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
size: "small",
|
|
51
|
+
color: "color.text.inverse"
|
|
52
|
+
}, ' ', elapsedTime)) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
35
53
|
size: "small",
|
|
36
54
|
color: "color.text.inverse"
|
|
37
55
|
}, tooltipMessage), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -44,7 +62,7 @@ var SyncBlockLabelComponent = function SyncBlockLabelComponent(_ref) {
|
|
|
44
62
|
}, elapsedTime));
|
|
45
63
|
}
|
|
46
64
|
setTooltipContent(tooltipContent);
|
|
47
|
-
}, [contentUpdatedAt, formatMessage, intl, tooltipMessage]);
|
|
65
|
+
}, [contentUpdatedAt, formatMessage, intl, title, tooltipMessage]);
|
|
48
66
|
var ariaDescribedById = "sync-block-label-description-".concat(localId);
|
|
49
67
|
var getLabelContent = useMemo(function () {
|
|
50
68
|
if (isUnsyncedBlock) {
|
|
@@ -12,6 +12,7 @@ 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';
|
|
15
16
|
import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock, unsync } from '../editor-commands';
|
|
16
17
|
import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
17
18
|
import { SYNCED_BLOCK_BUTTON_TEST_ID } from '../types';
|
|
@@ -120,23 +121,40 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
120
121
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName));
|
|
121
122
|
items.push(editSourceButton);
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
if (fg('platform_synced_block_patch_13')) {
|
|
125
|
+
var separator = {
|
|
126
|
+
type: 'separator'
|
|
127
|
+
};
|
|
128
|
+
var _deleteButton = _objectSpread({
|
|
129
|
+
id: 'editor.syncedBlock.delete',
|
|
130
|
+
type: 'button',
|
|
131
|
+
appearance: 'danger',
|
|
131
132
|
title: formatMessage(commonMessages.delete),
|
|
133
|
+
showTitle: false,
|
|
134
|
+
tooltipContent: formatMessage(commonMessages.delete),
|
|
132
135
|
onClick: removeSyncedBlock(api),
|
|
133
|
-
icon:
|
|
134
|
-
label: ""
|
|
135
|
-
}),
|
|
136
|
+
icon: DeleteIcon,
|
|
136
137
|
testId: isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete
|
|
137
|
-
}, hoverDecorationProps(nodeType))
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
}, hoverDecorationProps(nodeType));
|
|
139
|
+
items.push(separator, _deleteButton);
|
|
140
|
+
} else {
|
|
141
|
+
// testId is required to show focus on trigger button on ESC key press
|
|
142
|
+
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
143
|
+
var testId = isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
144
|
+
var overflowMenuConfig = [{
|
|
145
|
+
type: 'overflow-dropdown',
|
|
146
|
+
testId: testId,
|
|
147
|
+
options: [_objectSpread({
|
|
148
|
+
title: formatMessage(commonMessages.delete),
|
|
149
|
+
onClick: removeSyncedBlock(api),
|
|
150
|
+
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
151
|
+
label: ""
|
|
152
|
+
}),
|
|
153
|
+
testId: isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceDelete : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceDelete
|
|
154
|
+
}, hoverDecorationProps(nodeType))]
|
|
155
|
+
}];
|
|
156
|
+
items.push.apply(items, overflowMenuConfig);
|
|
157
|
+
}
|
|
140
158
|
}
|
|
141
159
|
var getDomRef = function getDomRef(editorView) {
|
|
142
160
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.13",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^52.15.0",
|
|
32
32
|
"@atlaskit/button": "23.11.8",
|
|
33
|
-
"@atlaskit/dropdown-menu": "16.
|
|
33
|
+
"@atlaskit/dropdown-menu": "16.10.0",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.33.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^10.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-menu": "^9.2.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.9.0",
|
|
48
48
|
"@atlaskit/flag": "^17.12.0",
|
|
49
49
|
"@atlaskit/icon": "35.3.0",
|
|
50
50
|
"@atlaskit/icon-lab": "^6.12.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.51.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|