@atlaskit/editor-plugin-synced-block 5.1.11 → 5.1.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 +16 -0
- package/afm-cc/tsconfig.json +10 -4
- package/afm-jira/tsconfig.json +9 -0
- package/afm-products/tsconfig.json +10 -1
- package/dist/cjs/ui/SyncedLocationDropdown.compiled.css +34 -0
- package/dist/cjs/ui/SyncedLocationDropdown.js +329 -0
- package/dist/cjs/ui/floating-toolbar.js +21 -0
- package/dist/es2019/ui/SyncedLocationDropdown.compiled.css +34 -0
- package/dist/es2019/ui/SyncedLocationDropdown.js +283 -0
- package/dist/es2019/ui/floating-toolbar.js +22 -0
- package/dist/esm/ui/SyncedLocationDropdown.compiled.css +34 -0
- package/dist/esm/ui/SyncedLocationDropdown.js +320 -0
- package/dist/esm/ui/floating-toolbar.js +21 -0
- package/dist/types/ui/SyncedLocationDropdown.d.ts +12 -0
- package/dist/types-ts4.5/ui/SyncedLocationDropdown.d.ts +12 -0
- package/package.json +11 -7
|
@@ -12,6 +12,7 @@ import EditIcon from '@atlaskit/icon/core/edit';
|
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock } from '../editor-commands';
|
|
14
14
|
import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
15
|
+
import { SyncedLocationDropdown } from './SyncedLocationDropdown';
|
|
15
16
|
export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBlockStore) {
|
|
16
17
|
var _api$decorations, _api$connectivity;
|
|
17
18
|
var syncBlockObject = findSyncBlockOrBodiedSyncBlock(state.schema, state.selection);
|
|
@@ -20,8 +21,12 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
20
21
|
}
|
|
21
22
|
var syncBlockInstance = syncBlockStore.referenceManager.getFromCache(syncBlockObject.node.attrs.resourceId);
|
|
22
23
|
var isUnsyncedBlock = (syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) === SyncBlockError.NotFound;
|
|
24
|
+
var isErroredBlock = syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error;
|
|
23
25
|
var bodiedSyncBlock = state.schema.nodes.bodiedSyncBlock;
|
|
24
26
|
var isBodiedSyncBlock = isBodiedSyncBlockNode(syncBlockObject.node, bodiedSyncBlock);
|
|
27
|
+
var _syncBlockObject$node = syncBlockObject.node.attrs,
|
|
28
|
+
resourceId = _syncBlockObject$node.resourceId,
|
|
29
|
+
localId = _syncBlockObject$node.localId;
|
|
25
30
|
var formatMessage = intl.formatMessage;
|
|
26
31
|
var nodeType = syncBlockObject.node.type;
|
|
27
32
|
var hoverDecoration = api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration;
|
|
@@ -44,6 +49,22 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
44
49
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName));
|
|
45
50
|
items.push(deleteButton);
|
|
46
51
|
} else {
|
|
52
|
+
if (!isErroredBlock && fg('platform_synced_block_dogfooding')) {
|
|
53
|
+
var syncedLocation = {
|
|
54
|
+
type: 'custom',
|
|
55
|
+
fallback: [],
|
|
56
|
+
render: function render() {
|
|
57
|
+
return /*#__PURE__*/React.createElement(SyncedLocationDropdown, {
|
|
58
|
+
syncBlockStore: syncBlockStore,
|
|
59
|
+
resourceId: resourceId,
|
|
60
|
+
localId: localId,
|
|
61
|
+
intl: intl,
|
|
62
|
+
isSource: isBodiedSyncBlock
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
items.push(syncedLocation);
|
|
67
|
+
}
|
|
47
68
|
var copyButton = _objectSpread({
|
|
48
69
|
id: 'editor.syncedBlock.copy',
|
|
49
70
|
type: 'button',
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { SyncBlockSourceInfo, SyncBlockStoreManager, ReferencesSourceInfo } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
+
interface Props {
|
|
4
|
+
intl: IntlShape;
|
|
5
|
+
isSource: boolean;
|
|
6
|
+
localId: string;
|
|
7
|
+
resourceId: string;
|
|
8
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
9
|
+
}
|
|
10
|
+
export declare const processReferenceData: (referenceData: ReferencesSourceInfo["references"], intl: IntlShape) => SyncBlockSourceInfo[];
|
|
11
|
+
export declare const SyncedLocationDropdown: ({ syncBlockStore, resourceId, intl, isSource, localId, }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { SyncBlockSourceInfo, SyncBlockStoreManager, ReferencesSourceInfo } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
+
interface Props {
|
|
4
|
+
intl: IntlShape;
|
|
5
|
+
isSource: boolean;
|
|
6
|
+
localId: string;
|
|
7
|
+
resourceId: string;
|
|
8
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
9
|
+
}
|
|
10
|
+
export declare const processReferenceData: (referenceData: ReferencesSourceInfo["references"], intl: IntlShape) => SyncBlockSourceInfo[];
|
|
11
|
+
export declare const SyncedLocationDropdown: ({ syncBlockStore, resourceId, intl, isSource, localId, }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.13",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
32
|
-
"@atlaskit/button": "23.9.
|
|
32
|
+
"@atlaskit/button": "23.9.4",
|
|
33
|
+
"@atlaskit/dropdown-menu": "16.4.2",
|
|
33
34
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
34
35
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
35
36
|
"@atlaskit/editor-plugin-block-menu": "^6.0.0",
|
|
@@ -39,21 +40,24 @@
|
|
|
39
40
|
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
40
41
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
41
42
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
42
|
-
"@atlaskit/editor-synced-block-provider": "^3.
|
|
43
|
+
"@atlaskit/editor-synced-block-provider": "^3.8.0",
|
|
43
44
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
45
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
45
46
|
"@atlaskit/flag": "^17.8.0",
|
|
46
|
-
"@atlaskit/icon": "29.4.
|
|
47
|
+
"@atlaskit/icon": "29.4.2",
|
|
47
48
|
"@atlaskit/icon-lab": "^5.14.0",
|
|
49
|
+
"@atlaskit/logo": "^19.10.0",
|
|
48
50
|
"@atlaskit/lozenge": "^13.3.0",
|
|
49
51
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
50
52
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^17.
|
|
52
|
-
"@atlaskit/
|
|
53
|
-
"@atlaskit/
|
|
53
|
+
"@atlaskit/primitives": "^17.1.0",
|
|
54
|
+
"@atlaskit/spinner": "19.0.9",
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^16.23.0",
|
|
56
|
+
"@atlaskit/tokens": "10.0.0",
|
|
54
57
|
"@atlaskit/tooltip": "^20.14.0",
|
|
55
58
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
56
59
|
"@babel/runtime": "^7.0.0",
|
|
60
|
+
"@compiled/react": "^0.18.6",
|
|
57
61
|
"bind-event-listener": "^3.0.0",
|
|
58
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
59
63
|
},
|