@atlaskit/editor-plugin-synced-block 4.5.1 → 4.5.3
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 +14 -0
- package/afm-cc/tsconfig.json +6 -0
- package/afm-jira/tsconfig.json +9 -0
- package/afm-products/tsconfig.json +9 -0
- package/dist/cjs/editor-actions/index.js +4 -1
- package/dist/cjs/syncedBlockPlugin.js +3 -0
- package/dist/es2019/editor-actions/index.js +3 -0
- package/dist/es2019/syncedBlockPlugin.js +4 -1
- package/dist/esm/editor-actions/index.js +3 -0
- package/dist/esm/syncedBlockPlugin.js +4 -1
- package/dist/types/editor-actions/index.d.ts +1 -0
- package/dist/types/syncedBlockPluginType.d.ts +8 -0
- package/dist/types-ts4.5/editor-actions/index.d.ts +1 -0
- package/dist/types-ts4.5/syncedBlockPluginType.d.ts +8 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 4.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.5.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f14e76661c943`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f14e76661c943) -
|
|
14
|
+
[EDITOR-2844] Save reference synced block on document to BE when a page is saved
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.5.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"../src/**/stories/**/*"
|
|
24
24
|
],
|
|
25
25
|
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../adf-schema/afm-cc/tsconfig.json"
|
|
28
|
+
},
|
|
26
29
|
{
|
|
27
30
|
"path": "../../../design-system/button/afm-cc/tsconfig.json"
|
|
28
31
|
},
|
|
@@ -47,6 +50,9 @@
|
|
|
47
50
|
{
|
|
48
51
|
"path": "../../editor-plugin-selection/afm-cc/tsconfig.json"
|
|
49
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../editor-prosemirror/afm-cc/tsconfig.json"
|
|
55
|
+
},
|
|
50
56
|
{
|
|
51
57
|
"path": "../../editor-shared-styles/afm-cc/tsconfig.json"
|
|
52
58
|
},
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"../src/**/stories/**/*"
|
|
24
24
|
],
|
|
25
25
|
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../adf-schema/afm-jira/tsconfig.json"
|
|
28
|
+
},
|
|
26
29
|
{
|
|
27
30
|
"path": "../../../design-system/button/afm-jira/tsconfig.json"
|
|
28
31
|
},
|
|
@@ -47,6 +50,9 @@
|
|
|
47
50
|
{
|
|
48
51
|
"path": "../../editor-plugin-selection/afm-jira/tsconfig.json"
|
|
49
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../editor-prosemirror/afm-jira/tsconfig.json"
|
|
55
|
+
},
|
|
50
56
|
{
|
|
51
57
|
"path": "../../editor-shared-styles/afm-jira/tsconfig.json"
|
|
52
58
|
},
|
|
@@ -80,6 +86,9 @@
|
|
|
80
86
|
{
|
|
81
87
|
"path": "../../../design-system/primitives/afm-jira/tsconfig.json"
|
|
82
88
|
},
|
|
89
|
+
{
|
|
90
|
+
"path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
|
|
91
|
+
},
|
|
83
92
|
{
|
|
84
93
|
"path": "../../../design-system/tokens/afm-jira/tsconfig.json"
|
|
85
94
|
},
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"../src/**/stories/**/*"
|
|
24
24
|
],
|
|
25
25
|
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../adf-schema/afm-products/tsconfig.json"
|
|
28
|
+
},
|
|
26
29
|
{
|
|
27
30
|
"path": "../../../design-system/button/afm-products/tsconfig.json"
|
|
28
31
|
},
|
|
@@ -47,6 +50,9 @@
|
|
|
47
50
|
{
|
|
48
51
|
"path": "../../editor-plugin-selection/afm-products/tsconfig.json"
|
|
49
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../editor-prosemirror/afm-products/tsconfig.json"
|
|
55
|
+
},
|
|
50
56
|
{
|
|
51
57
|
"path": "../../editor-shared-styles/afm-products/tsconfig.json"
|
|
52
58
|
},
|
|
@@ -80,6 +86,9 @@
|
|
|
80
86
|
{
|
|
81
87
|
"path": "../../../design-system/primitives/afm-products/tsconfig.json"
|
|
82
88
|
},
|
|
89
|
+
{
|
|
90
|
+
"path": "../../tmp-editor-statsig/afm-products/tsconfig.json"
|
|
91
|
+
},
|
|
83
92
|
{
|
|
84
93
|
"path": "../../../design-system/tokens/afm-products/tsconfig.json"
|
|
85
94
|
},
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.flushBodiedSyncBlocks = void 0;
|
|
6
|
+
exports.flushSyncBlocks = exports.flushBodiedSyncBlocks = void 0;
|
|
7
7
|
var flushBodiedSyncBlocks = exports.flushBodiedSyncBlocks = function flushBodiedSyncBlocks(syncBlockStore) {
|
|
8
8
|
return syncBlockStore.sourceManager.flush();
|
|
9
|
+
};
|
|
10
|
+
var flushSyncBlocks = exports.flushSyncBlocks = function flushSyncBlocks(syncBlockStore) {
|
|
11
|
+
return syncBlockStore.referenceManager.flush();
|
|
9
12
|
};
|
|
@@ -63,6 +63,9 @@ var syncedBlockPlugin = exports.syncedBlockPlugin = function syncedBlockPlugin(_
|
|
|
63
63
|
actions: {
|
|
64
64
|
flushBodiedSyncBlocks: function flushBodiedSyncBlocks() {
|
|
65
65
|
return (0, _editorActions.flushBodiedSyncBlocks)(syncBlockStore);
|
|
66
|
+
},
|
|
67
|
+
flushSyncedBlocks: function flushSyncedBlocks() {
|
|
68
|
+
return (0, _editorActions.flushSyncBlocks)(syncBlockStore);
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
71
|
pluginsOptions: {
|
|
@@ -4,7 +4,7 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
|
4
4
|
import { IconSyncBlock } from '@atlaskit/editor-common/quick-insert';
|
|
5
5
|
import { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
6
6
|
import Lozenge from '@atlaskit/lozenge';
|
|
7
|
-
import { flushBodiedSyncBlocks } from './editor-actions';
|
|
7
|
+
import { flushBodiedSyncBlocks, flushSyncBlocks } from './editor-actions';
|
|
8
8
|
import { copySyncedBlockReferenceToClipboardEditorCommand, createSyncedBlock } from './editor-commands';
|
|
9
9
|
import { createPlugin, syncedBlockPluginKey } from './pm-plugins/main';
|
|
10
10
|
import { getBlockMenuComponents } from './ui/block-menu-components';
|
|
@@ -50,6 +50,9 @@ export const syncedBlockPlugin = ({
|
|
|
50
50
|
actions: {
|
|
51
51
|
flushBodiedSyncBlocks: () => {
|
|
52
52
|
return flushBodiedSyncBlocks(syncBlockStore);
|
|
53
|
+
},
|
|
54
|
+
flushSyncedBlocks: () => {
|
|
55
|
+
return flushSyncBlocks(syncBlockStore);
|
|
53
56
|
}
|
|
54
57
|
},
|
|
55
58
|
pluginsOptions: {
|
|
@@ -4,7 +4,7 @@ import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
|
4
4
|
import { IconSyncBlock } from '@atlaskit/editor-common/quick-insert';
|
|
5
5
|
import { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
6
6
|
import Lozenge from '@atlaskit/lozenge';
|
|
7
|
-
import { flushBodiedSyncBlocks as _flushBodiedSyncBlocks } from './editor-actions';
|
|
7
|
+
import { flushBodiedSyncBlocks as _flushBodiedSyncBlocks, flushSyncBlocks } from './editor-actions';
|
|
8
8
|
import { copySyncedBlockReferenceToClipboardEditorCommand, createSyncedBlock } from './editor-commands';
|
|
9
9
|
import { createPlugin, syncedBlockPluginKey } from './pm-plugins/main';
|
|
10
10
|
import { getBlockMenuComponents } from './ui/block-menu-components';
|
|
@@ -56,6 +56,9 @@ export var syncedBlockPlugin = function syncedBlockPlugin(_ref) {
|
|
|
56
56
|
actions: {
|
|
57
57
|
flushBodiedSyncBlocks: function flushBodiedSyncBlocks() {
|
|
58
58
|
return _flushBodiedSyncBlocks(syncBlockStore);
|
|
59
|
+
},
|
|
60
|
+
flushSyncedBlocks: function flushSyncedBlocks() {
|
|
61
|
+
return flushSyncBlocks(syncBlockStore);
|
|
59
62
|
}
|
|
60
63
|
},
|
|
61
64
|
pluginsOptions: {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
2
2
|
export declare const flushBodiedSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
|
|
3
|
+
export declare const flushSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
|
|
@@ -53,6 +53,14 @@ export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
|
|
|
53
53
|
* @returns true if saving all nodes successfully, false if fail to save some/all nodes
|
|
54
54
|
*/
|
|
55
55
|
flushBodiedSyncBlocks: () => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Save reference synced blocks on the document (tracked by local cache)to the backend.
|
|
58
|
+
* This action allows syncBlock on the document to be saved in sync with product saving experience
|
|
59
|
+
* as per {@link https://hello.atlassian.net/wiki/spaces/egcuc/pages/5932393240/Synced+Blocks+Save+refresh+principles}
|
|
60
|
+
*
|
|
61
|
+
* @returns true if flushing all syncBlocks successfully, false otherwise
|
|
62
|
+
*/
|
|
63
|
+
flushSyncedBlocks: () => Promise<boolean>;
|
|
56
64
|
};
|
|
57
65
|
commands: {
|
|
58
66
|
copySyncedBlockReferenceToClipboard: () => EditorCommand;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
2
2
|
export declare const flushBodiedSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
|
|
3
|
+
export declare const flushSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
|
|
@@ -53,6 +53,14 @@ export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
|
|
|
53
53
|
* @returns true if saving all nodes successfully, false if fail to save some/all nodes
|
|
54
54
|
*/
|
|
55
55
|
flushBodiedSyncBlocks: () => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Save reference synced blocks on the document (tracked by local cache)to the backend.
|
|
58
|
+
* This action allows syncBlock on the document to be saved in sync with product saving experience
|
|
59
|
+
* as per {@link https://hello.atlassian.net/wiki/spaces/egcuc/pages/5932393240/Synced+Blocks+Save+refresh+principles}
|
|
60
|
+
*
|
|
61
|
+
* @returns true if flushing all syncBlocks successfully, false otherwise
|
|
62
|
+
*/
|
|
63
|
+
flushSyncedBlocks: () => Promise<boolean>;
|
|
56
64
|
};
|
|
57
65
|
commands: {
|
|
58
66
|
copySyncedBlockReferenceToClipboard: () => EditorCommand;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^51.5.
|
|
31
|
+
"@atlaskit/adf-schema": "^51.5.0",
|
|
32
32
|
"@atlaskit/button": "23.7.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
40
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
40
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
42
42
|
"@atlaskit/editor-synced-block-provider": "^2.15.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
45
|
"@atlaskit/flag": "^17.6.0",
|
|
46
|
-
"@atlaskit/icon": "29.0
|
|
46
|
+
"@atlaskit/icon": "29.1.0",
|
|
47
47
|
"@atlaskit/icon-lab": "^5.12.0",
|
|
48
48
|
"@atlaskit/logo": "^19.9.0",
|
|
49
49
|
"@atlaskit/lozenge": "^13.1.0",
|
|
50
50
|
"@atlaskit/modal-dialog": "^14.8.0",
|
|
51
51
|
"@atlaskit/primitives": "^16.4.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^15.10.0",
|
|
53
53
|
"@atlaskit/tokens": "8.4.1",
|
|
54
54
|
"@atlaskit/tooltip": "^20.11.0",
|
|
55
55
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^110.
|
|
60
|
+
"@atlaskit/editor-common": "^110.42.0",
|
|
61
61
|
"react": "^18.2.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|