@atlaskit/editor-plugin-synced-block 5.3.29 → 5.3.31
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/dist/cjs/pm-plugins/utils/handle-bodied-sync-block-removal.js +4 -0
- package/dist/cjs/ui/Flag.js +3 -2
- package/dist/cjs/ui/SyncBlockRefresher.js +7 -15
- package/dist/cjs/ui/SyncedLocationDropdown.js +2 -0
- package/dist/es2019/pm-plugins/utils/handle-bodied-sync-block-removal.js +4 -0
- package/dist/es2019/ui/Flag.js +3 -2
- package/dist/es2019/ui/SyncBlockRefresher.js +7 -15
- package/dist/es2019/ui/SyncedLocationDropdown.js +2 -0
- package/dist/esm/pm-plugins/utils/handle-bodied-sync-block-removal.js +4 -0
- package/dist/esm/ui/Flag.js +3 -2
- package/dist/esm/ui/SyncBlockRefresher.js +7 -15
- package/dist/esm/ui/SyncedLocationDropdown.js +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 5.3.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`469aa2343e484`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/469aa2343e484) -
|
|
8
|
+
Misc fixes for synced blocks
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 5.3.30
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.3.29
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -70,6 +70,10 @@ var handleBodiedSyncBlockRemoval = exports.handleBodiedSyncBlockRemoval = functi
|
|
|
70
70
|
onDismissed: onDismissed(syncBlockStore)
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
+
} else {
|
|
74
|
+
newState = {
|
|
75
|
+
activeFlag: false
|
|
76
|
+
};
|
|
73
77
|
}
|
|
74
78
|
newState = _objectSpread(_objectSpread({}, newState), {}, {
|
|
75
79
|
bodiedSyncBlockDeletionStatus: syncBlockStore.sourceManager.isRetryingDeletion() ?
|
package/dist/cjs/ui/Flag.js
CHANGED
|
@@ -110,8 +110,9 @@ var Flag = exports.Flag = function Flag(_ref) {
|
|
|
110
110
|
} else if (type === 'info' && action) {
|
|
111
111
|
return [{
|
|
112
112
|
content: formatMessage(action),
|
|
113
|
-
href: 'https://
|
|
114
|
-
target: '_blank'
|
|
113
|
+
href: 'https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks',
|
|
114
|
+
target: '_blank',
|
|
115
|
+
rel: 'noopener noreferrer'
|
|
115
116
|
}];
|
|
116
117
|
}
|
|
117
118
|
return undefined;
|
|
@@ -9,7 +9,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
9
9
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
10
10
|
var SYNC_BLOCK_FETCH_INTERVAL = exports.SYNC_BLOCK_FETCH_INTERVAL = 3000;
|
|
11
11
|
|
|
12
|
-
// Component that manages synced block data synchronization.
|
|
13
12
|
// Component that manages synced block data synchronization.
|
|
14
13
|
// Uses provider-based GraphQL subscriptions for updates when online.
|
|
15
14
|
// Falls back to polling at regular intervals when offline.
|
|
@@ -29,22 +28,15 @@ var SyncBlockRefresher = exports.SyncBlockRefresher = function SyncBlockRefreshe
|
|
|
29
28
|
syncBlockStoreManager.referenceManager.setRealTimeSubscriptionsEnabled(useRealTimeSubscriptions);
|
|
30
29
|
}, [syncBlockStoreManager, isOnline]);
|
|
31
30
|
(0, _react.useEffect)(function () {
|
|
32
|
-
var useRealTimeSubscriptions = isOnline;
|
|
33
|
-
if (useRealTimeSubscriptions) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
var interval = -1;
|
|
37
31
|
if (isOnline) {
|
|
38
|
-
|
|
39
|
-
var _document;
|
|
40
|
-
// check if document is visible to avoid unnecessary refreshes
|
|
41
|
-
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
42
|
-
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
43
|
-
}
|
|
44
|
-
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
45
|
-
} else if (interval !== -1) {
|
|
46
|
-
window.clearInterval(interval);
|
|
32
|
+
return;
|
|
47
33
|
}
|
|
34
|
+
var interval = window.setInterval(function () {
|
|
35
|
+
var _document;
|
|
36
|
+
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
37
|
+
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
38
|
+
}
|
|
39
|
+
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
48
40
|
return function () {
|
|
49
41
|
window.clearInterval(interval);
|
|
50
42
|
};
|
|
@@ -322,6 +322,7 @@ var DropdownContent = function DropdownContent(_ref7) {
|
|
|
322
322
|
href: reference.url,
|
|
323
323
|
target: "_blank",
|
|
324
324
|
key: reference.title,
|
|
325
|
+
rel: "noopener noreferrer",
|
|
325
326
|
onClick: function onClick() {
|
|
326
327
|
return handleLocationClick();
|
|
327
328
|
}
|
|
@@ -378,6 +379,7 @@ var NoResultScreen = function NoResultScreen(_ref0) {
|
|
|
378
379
|
}, /*#__PURE__*/React.createElement(_compiled.Anchor, {
|
|
379
380
|
href: "https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks",
|
|
380
381
|
target: "_blank",
|
|
382
|
+
rel: "noopener noreferrer",
|
|
381
383
|
xcss: styles.learnMoreLink
|
|
382
384
|
}, formatMessage(_messages.syncBlockMessages.syncedLocationDropdownLearnMoreLink))));
|
|
383
385
|
};
|
package/dist/es2019/ui/Flag.js
CHANGED
|
@@ -116,8 +116,9 @@ export const Flag = ({
|
|
|
116
116
|
} else if (type === 'info' && action) {
|
|
117
117
|
return [{
|
|
118
118
|
content: formatMessage(action),
|
|
119
|
-
href: 'https://
|
|
120
|
-
target: '_blank'
|
|
119
|
+
href: 'https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks',
|
|
120
|
+
target: '_blank',
|
|
121
|
+
rel: 'noopener noreferrer'
|
|
121
122
|
}];
|
|
122
123
|
}
|
|
123
124
|
return undefined;
|
|
@@ -3,7 +3,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
3
3
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
4
4
|
export const SYNC_BLOCK_FETCH_INTERVAL = 3000;
|
|
5
5
|
|
|
6
|
-
// Component that manages synced block data synchronization.
|
|
7
6
|
// Component that manages synced block data synchronization.
|
|
8
7
|
// Uses provider-based GraphQL subscriptions for updates when online.
|
|
9
8
|
// Falls back to polling at regular intervals when offline.
|
|
@@ -25,22 +24,15 @@ export const SyncBlockRefresher = ({
|
|
|
25
24
|
syncBlockStoreManager.referenceManager.setRealTimeSubscriptionsEnabled(useRealTimeSubscriptions);
|
|
26
25
|
}, [syncBlockStoreManager, isOnline]);
|
|
27
26
|
useEffect(() => {
|
|
28
|
-
const useRealTimeSubscriptions = isOnline;
|
|
29
|
-
if (useRealTimeSubscriptions) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
let interval = -1;
|
|
33
27
|
if (isOnline) {
|
|
34
|
-
|
|
35
|
-
var _document;
|
|
36
|
-
// check if document is visible to avoid unnecessary refreshes
|
|
37
|
-
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
38
|
-
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
39
|
-
}
|
|
40
|
-
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
41
|
-
} else if (interval !== -1) {
|
|
42
|
-
window.clearInterval(interval);
|
|
28
|
+
return;
|
|
43
29
|
}
|
|
30
|
+
const interval = window.setInterval(() => {
|
|
31
|
+
var _document;
|
|
32
|
+
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
33
|
+
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
34
|
+
}
|
|
35
|
+
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
44
36
|
return () => {
|
|
45
37
|
window.clearInterval(interval);
|
|
46
38
|
};
|
|
@@ -276,6 +276,7 @@ const DropdownContent = ({
|
|
|
276
276
|
href: reference.url,
|
|
277
277
|
target: "_blank",
|
|
278
278
|
key: reference.title,
|
|
279
|
+
rel: "noopener noreferrer",
|
|
279
280
|
onClick: () => handleLocationClick()
|
|
280
281
|
}, /*#__PURE__*/React.createElement(ItemTitle, {
|
|
281
282
|
title: reference.title || reference.url || '',
|
|
@@ -331,6 +332,7 @@ const NoResultScreen = ({
|
|
|
331
332
|
}, /*#__PURE__*/React.createElement(Anchor, {
|
|
332
333
|
href: "https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks",
|
|
333
334
|
target: "_blank",
|
|
335
|
+
rel: "noopener noreferrer",
|
|
334
336
|
xcss: styles.learnMoreLink
|
|
335
337
|
}, formatMessage(messages.syncedLocationDropdownLearnMoreLink))));
|
|
336
338
|
};
|
|
@@ -63,6 +63,10 @@ export var handleBodiedSyncBlockRemoval = function handleBodiedSyncBlockRemoval(
|
|
|
63
63
|
onDismissed: onDismissed(syncBlockStore)
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
} else {
|
|
67
|
+
newState = {
|
|
68
|
+
activeFlag: false
|
|
69
|
+
};
|
|
66
70
|
}
|
|
67
71
|
newState = _objectSpread(_objectSpread({}, newState), {}, {
|
|
68
72
|
bodiedSyncBlockDeletionStatus: syncBlockStore.sourceManager.isRetryingDeletion() ?
|
package/dist/esm/ui/Flag.js
CHANGED
|
@@ -101,8 +101,9 @@ export var Flag = function Flag(_ref) {
|
|
|
101
101
|
} else if (type === 'info' && action) {
|
|
102
102
|
return [{
|
|
103
103
|
content: formatMessage(action),
|
|
104
|
-
href: 'https://
|
|
105
|
-
target: '_blank'
|
|
104
|
+
href: 'https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks',
|
|
105
|
+
target: '_blank',
|
|
106
|
+
rel: 'noopener noreferrer'
|
|
106
107
|
}];
|
|
107
108
|
}
|
|
108
109
|
return undefined;
|
|
@@ -3,7 +3,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
3
3
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
4
4
|
export var SYNC_BLOCK_FETCH_INTERVAL = 3000;
|
|
5
5
|
|
|
6
|
-
// Component that manages synced block data synchronization.
|
|
7
6
|
// Component that manages synced block data synchronization.
|
|
8
7
|
// Uses provider-based GraphQL subscriptions for updates when online.
|
|
9
8
|
// Falls back to polling at regular intervals when offline.
|
|
@@ -23,22 +22,15 @@ export var SyncBlockRefresher = function SyncBlockRefresher(_ref) {
|
|
|
23
22
|
syncBlockStoreManager.referenceManager.setRealTimeSubscriptionsEnabled(useRealTimeSubscriptions);
|
|
24
23
|
}, [syncBlockStoreManager, isOnline]);
|
|
25
24
|
useEffect(function () {
|
|
26
|
-
var useRealTimeSubscriptions = isOnline;
|
|
27
|
-
if (useRealTimeSubscriptions) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
var interval = -1;
|
|
31
25
|
if (isOnline) {
|
|
32
|
-
|
|
33
|
-
var _document;
|
|
34
|
-
// check if document is visible to avoid unnecessary refreshes
|
|
35
|
-
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
36
|
-
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
37
|
-
}
|
|
38
|
-
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
39
|
-
} else if (interval !== -1) {
|
|
40
|
-
window.clearInterval(interval);
|
|
26
|
+
return;
|
|
41
27
|
}
|
|
28
|
+
var interval = window.setInterval(function () {
|
|
29
|
+
var _document;
|
|
30
|
+
if (((_document = document) === null || _document === void 0 ? void 0 : _document.visibilityState) === 'visible') {
|
|
31
|
+
syncBlockStoreManager.referenceManager.refreshSubscriptions();
|
|
32
|
+
}
|
|
33
|
+
}, SYNC_BLOCK_FETCH_INTERVAL);
|
|
42
34
|
return function () {
|
|
43
35
|
window.clearInterval(interval);
|
|
44
36
|
};
|
|
@@ -313,6 +313,7 @@ var DropdownContent = function DropdownContent(_ref7) {
|
|
|
313
313
|
href: reference.url,
|
|
314
314
|
target: "_blank",
|
|
315
315
|
key: reference.title,
|
|
316
|
+
rel: "noopener noreferrer",
|
|
316
317
|
onClick: function onClick() {
|
|
317
318
|
return handleLocationClick();
|
|
318
319
|
}
|
|
@@ -369,6 +370,7 @@ var NoResultScreen = function NoResultScreen(_ref0) {
|
|
|
369
370
|
}, /*#__PURE__*/React.createElement(Anchor, {
|
|
370
371
|
href: "https://support.atlassian.com/confluence-cloud/docs/reuse-content-with-synced-blocks",
|
|
371
372
|
target: "_blank",
|
|
373
|
+
rel: "noopener noreferrer",
|
|
372
374
|
xcss: styles.learnMoreLink
|
|
373
375
|
}, formatMessage(messages.syncedLocationDropdownLearnMoreLink))));
|
|
374
376
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.31",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +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.
|
|
33
|
-
"@atlaskit/dropdown-menu": "16.4.
|
|
32
|
+
"@atlaskit/button": "23.9.9",
|
|
33
|
+
"@atlaskit/dropdown-menu": "16.4.7",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-menu": "^6.1.0",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@atlaskit/editor-synced-block-provider": "^3.31.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
45
45
|
"@atlaskit/flag": "^17.8.0",
|
|
46
|
-
"@atlaskit/icon": "
|
|
47
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon": "32.0.0",
|
|
47
|
+
"@atlaskit/icon-lab": "^5.17.0",
|
|
48
48
|
"@atlaskit/logo": "^19.10.0",
|
|
49
49
|
"@atlaskit/lozenge": "^13.4.0",
|
|
50
50
|
"@atlaskit/modal-dialog": "^14.11.0",
|