@atlaskit/editor-plugin-synced-block 8.3.11 → 8.3.12
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/pm-plugins/menu-and-toolbar-experiences.js +3 -0
- package/dist/cjs/types/index.js +3 -1
- package/dist/cjs/ui/floating-toolbar.js +4 -0
- package/dist/es2019/pm-plugins/menu-and-toolbar-experiences.js +3 -0
- package/dist/es2019/types/index.js +3 -1
- package/dist/es2019/ui/floating-toolbar.js +5 -1
- package/dist/esm/pm-plugins/menu-and-toolbar-experiences.js +3 -0
- package/dist/esm/types/index.js +3 -1
- package/dist/esm/ui/floating-toolbar.js +4 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 8.3.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6ce6728b2191c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6ce6728b2191c) -
|
|
8
|
+
Adds separate testId for overflow menu to differenciate between reference and source sync block
|
|
9
|
+
button.
|
|
10
|
+
|
|
3
11
|
## 8.3.11
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -289,6 +289,9 @@ var handleButtonClick = function handleButtonClick(_ref2) {
|
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
break;
|
|
292
|
+
case _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger:
|
|
293
|
+
case _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger:
|
|
294
|
+
break;
|
|
292
295
|
default:
|
|
293
296
|
{
|
|
294
297
|
// Exhaustiveness check: if a new SyncedBlockToolbarButtonId is added
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -25,5 +25,7 @@ var SYNCED_BLOCK_BUTTON_TEST_ID = exports.SYNCED_BLOCK_BUTTON_TEST_ID = {
|
|
|
25
25
|
syncedBlockToolbarSourceDelete: 'source-synced-block-delete-btn',
|
|
26
26
|
syncedBlockToolbarReferenceUnsync: 'reference-synced-block-unsync-btn',
|
|
27
27
|
syncedBlockToolbarSourceUnsync: 'source-synced-block-unsync-btn',
|
|
28
|
-
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger'
|
|
28
|
+
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger',
|
|
29
|
+
syncedBlockToolbarReferenceOverflowTrigger: 'reference-synced-block-overflow-dropdown--trigger',
|
|
30
|
+
syncedBlockToolbarSourceOverflowTrigger: 'source-synced-block-overflow-dropdown--trigger'
|
|
29
31
|
};
|
|
@@ -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");
|
|
@@ -132,6 +133,9 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
|
|
|
132
133
|
// testId is required to show focus on trigger button on ESC key press
|
|
133
134
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
134
135
|
var testId = 'synced-block-overflow-dropdown-trigger';
|
|
136
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_12')) {
|
|
137
|
+
testId = isBodiedSyncBlock ? _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : _types.SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
138
|
+
}
|
|
135
139
|
var overflowMenuConfig = [{
|
|
136
140
|
type: 'overflow-dropdown',
|
|
137
141
|
testId: testId,
|
|
@@ -283,6 +283,9 @@ const handleButtonClick = ({
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
break;
|
|
286
|
+
case SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger:
|
|
287
|
+
case SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger:
|
|
288
|
+
break;
|
|
286
289
|
default:
|
|
287
290
|
{
|
|
288
291
|
// Exhaustiveness check: if a new SyncedBlockToolbarButtonId is added
|
|
@@ -19,5 +19,7 @@ export const SYNCED_BLOCK_BUTTON_TEST_ID = {
|
|
|
19
19
|
syncedBlockToolbarSourceDelete: 'source-synced-block-delete-btn',
|
|
20
20
|
syncedBlockToolbarReferenceUnsync: 'reference-synced-block-unsync-btn',
|
|
21
21
|
syncedBlockToolbarSourceUnsync: 'source-synced-block-unsync-btn',
|
|
22
|
-
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger'
|
|
22
|
+
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger',
|
|
23
|
+
syncedBlockToolbarReferenceOverflowTrigger: 'reference-synced-block-overflow-dropdown--trigger',
|
|
24
|
+
syncedBlockToolbarSourceOverflowTrigger: 'source-synced-block-overflow-dropdown--trigger'
|
|
23
25
|
};
|
|
@@ -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';
|
|
@@ -127,7 +128,10 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
|
|
|
127
128
|
|
|
128
129
|
// testId is required to show focus on trigger button on ESC key press
|
|
129
130
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
130
|
-
|
|
131
|
+
let testId = 'synced-block-overflow-dropdown-trigger';
|
|
132
|
+
if (fg('platform_synced_block_patch_12')) {
|
|
133
|
+
testId = isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
134
|
+
}
|
|
131
135
|
const overflowMenuConfig = [{
|
|
132
136
|
type: 'overflow-dropdown',
|
|
133
137
|
testId,
|
|
@@ -282,6 +282,9 @@ var handleButtonClick = function handleButtonClick(_ref2) {
|
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
284
|
break;
|
|
285
|
+
case SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger:
|
|
286
|
+
case SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger:
|
|
287
|
+
break;
|
|
285
288
|
default:
|
|
286
289
|
{
|
|
287
290
|
// Exhaustiveness check: if a new SyncedBlockToolbarButtonId is added
|
package/dist/esm/types/index.js
CHANGED
|
@@ -19,5 +19,7 @@ export var SYNCED_BLOCK_BUTTON_TEST_ID = {
|
|
|
19
19
|
syncedBlockToolbarSourceDelete: 'source-synced-block-delete-btn',
|
|
20
20
|
syncedBlockToolbarReferenceUnsync: 'reference-synced-block-unsync-btn',
|
|
21
21
|
syncedBlockToolbarSourceUnsync: 'source-synced-block-unsync-btn',
|
|
22
|
-
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger'
|
|
22
|
+
syncedBlockToolbarSyncedLocationsTrigger: 'synced-block-synced-locations-dropdown--trigger',
|
|
23
|
+
syncedBlockToolbarReferenceOverflowTrigger: 'reference-synced-block-overflow-dropdown--trigger',
|
|
24
|
+
syncedBlockToolbarSourceOverflowTrigger: 'source-synced-block-overflow-dropdown--trigger'
|
|
23
25
|
};
|
|
@@ -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';
|
|
@@ -123,6 +124,9 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
123
124
|
// testId is required to show focus on trigger button on ESC key press
|
|
124
125
|
// see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
|
|
125
126
|
var testId = 'synced-block-overflow-dropdown-trigger';
|
|
127
|
+
if (fg('platform_synced_block_patch_12')) {
|
|
128
|
+
testId = isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceOverflowTrigger : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceOverflowTrigger;
|
|
129
|
+
}
|
|
126
130
|
var overflowMenuConfig = [{
|
|
127
131
|
type: 'overflow-dropdown',
|
|
128
132
|
testId: testId,
|
|
@@ -88,5 +88,7 @@ export declare const SYNCED_BLOCK_BUTTON_TEST_ID: {
|
|
|
88
88
|
readonly syncedBlockToolbarReferenceUnsync: "reference-synced-block-unsync-btn";
|
|
89
89
|
readonly syncedBlockToolbarSourceUnsync: "source-synced-block-unsync-btn";
|
|
90
90
|
readonly syncedBlockToolbarSyncedLocationsTrigger: "synced-block-synced-locations-dropdown--trigger";
|
|
91
|
+
readonly syncedBlockToolbarReferenceOverflowTrigger: "reference-synced-block-overflow-dropdown--trigger";
|
|
92
|
+
readonly syncedBlockToolbarSourceOverflowTrigger: "source-synced-block-overflow-dropdown--trigger";
|
|
91
93
|
};
|
|
92
94
|
export {};
|
|
@@ -88,5 +88,7 @@ export declare const SYNCED_BLOCK_BUTTON_TEST_ID: {
|
|
|
88
88
|
readonly syncedBlockToolbarReferenceUnsync: "reference-synced-block-unsync-btn";
|
|
89
89
|
readonly syncedBlockToolbarSourceUnsync: "source-synced-block-unsync-btn";
|
|
90
90
|
readonly syncedBlockToolbarSyncedLocationsTrigger: "synced-block-synced-locations-dropdown--trigger";
|
|
91
|
+
readonly syncedBlockToolbarReferenceOverflowTrigger: "reference-synced-block-overflow-dropdown--trigger";
|
|
92
|
+
readonly syncedBlockToolbarSourceOverflowTrigger: "source-synced-block-overflow-dropdown--trigger";
|
|
91
93
|
};
|
|
92
94
|
export {};
|
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.12",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.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": "^81.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^81.3.0",
|
|
58
58
|
"@atlaskit/tokens": "13.0.4",
|
|
59
59
|
"@atlaskit/tooltip": "^22.2.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.1.0",
|