@atlaskit/editor-plugin-synced-block 14.0.20 → 14.0.22
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 14.0.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 14.0.21
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`83985c2dddc58`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/83985c2dddc58) -
|
|
14
|
+
Fix the block menu staying open after deleting a source synced block via its delete button. The
|
|
15
|
+
delete now closes the block menu once the confirmed deletion lands, behind the
|
|
16
|
+
platform_editor_blocks_patch_10 gate.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 14.0.20
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.handleBodiedSyncBlockRemoval = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
10
11
|
var _types = require("../../types");
|
|
11
12
|
var _main = require("../main");
|
|
12
13
|
var _recomputeDeleteTransaction = require("./recompute-delete-transaction");
|
|
@@ -73,6 +74,16 @@ var handleBodiedSyncBlockRemoval = exports.handleBodiedSyncBlockRemoval = functi
|
|
|
73
74
|
if (!recomputedTr) {
|
|
74
75
|
return null;
|
|
75
76
|
}
|
|
77
|
+
if ((0, _fg.fg)('platform_editor_blocks_patch_10')) {
|
|
78
|
+
var _api$blockControls;
|
|
79
|
+
// The original transaction's closeMenu meta was rejected along with it above,
|
|
80
|
+
// so re-apply it here to close the block menu once the delete actually lands.
|
|
81
|
+
api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 || (_api$blockControls = _api$blockControls.commands) === null || _api$blockControls === void 0 || _api$blockControls.toggleBlockMenu({
|
|
82
|
+
closeMenu: true
|
|
83
|
+
})({
|
|
84
|
+
tr: recomputedTr
|
|
85
|
+
});
|
|
86
|
+
}
|
|
76
87
|
recomputedTr.setMeta('isConfirmedSyncBlockDeletion', true);
|
|
77
88
|
feedbackCallbacks === null || feedbackCallbacks === void 0 || feedbackCallbacks.onDeleteTransaction(recomputedTr);
|
|
78
89
|
if (!recomputedTr.getMeta(_utils.pmHistoryPluginKey)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
3
|
import { FLAG_ID } from '../../types';
|
|
3
4
|
import { syncedBlockPluginKey } from '../main';
|
|
4
5
|
import { recomputeDeleteTransaction, recomputeUnsyncTransaction } from './recompute-delete-transaction';
|
|
@@ -55,6 +56,16 @@ export const handleBodiedSyncBlockRemoval = (bodiedSyncBlockRemoved, syncBlockSt
|
|
|
55
56
|
if (!recomputedTr) {
|
|
56
57
|
return null;
|
|
57
58
|
}
|
|
59
|
+
if (fg('platform_editor_blocks_patch_10')) {
|
|
60
|
+
var _api$blockControls, _api$blockControls$co;
|
|
61
|
+
// The original transaction's closeMenu meta was rejected along with it above,
|
|
62
|
+
// so re-apply it here to close the block menu once the delete actually lands.
|
|
63
|
+
api === null || api === void 0 ? void 0 : (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : (_api$blockControls$co = _api$blockControls.commands) === null || _api$blockControls$co === void 0 ? void 0 : _api$blockControls$co.toggleBlockMenu({
|
|
64
|
+
closeMenu: true
|
|
65
|
+
})({
|
|
66
|
+
tr: recomputedTr
|
|
67
|
+
});
|
|
68
|
+
}
|
|
58
69
|
recomputedTr.setMeta('isConfirmedSyncBlockDeletion', true);
|
|
59
70
|
feedbackCallbacks === null || feedbackCallbacks === void 0 ? void 0 : feedbackCallbacks.onDeleteTransaction(recomputedTr);
|
|
60
71
|
if (!recomputedTr.getMeta(pmHistoryPluginKey)) {
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
6
|
import { FLAG_ID } from '../../types';
|
|
6
7
|
import { syncedBlockPluginKey } from '../main';
|
|
7
8
|
import { recomputeDeleteTransaction, recomputeUnsyncTransaction } from './recompute-delete-transaction';
|
|
@@ -66,6 +67,16 @@ export var handleBodiedSyncBlockRemoval = function handleBodiedSyncBlockRemoval(
|
|
|
66
67
|
if (!recomputedTr) {
|
|
67
68
|
return null;
|
|
68
69
|
}
|
|
70
|
+
if (fg('platform_editor_blocks_patch_10')) {
|
|
71
|
+
var _api$blockControls;
|
|
72
|
+
// The original transaction's closeMenu meta was rejected along with it above,
|
|
73
|
+
// so re-apply it here to close the block menu once the delete actually lands.
|
|
74
|
+
api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 || (_api$blockControls = _api$blockControls.commands) === null || _api$blockControls === void 0 || _api$blockControls.toggleBlockMenu({
|
|
75
|
+
closeMenu: true
|
|
76
|
+
})({
|
|
77
|
+
tr: recomputedTr
|
|
78
|
+
});
|
|
79
|
+
}
|
|
69
80
|
recomputedTr.setMeta('isConfirmedSyncBlockDeletion', true);
|
|
70
81
|
feedbackCallbacks === null || feedbackCallbacks === void 0 || feedbackCallbacks.onDeleteTransaction(recomputedTr);
|
|
71
82
|
if (!recomputedTr.getMeta(pmHistoryPluginKey)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.22",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/adf-schema": "^57.
|
|
24
|
-
"@atlaskit/button": "25.3.
|
|
23
|
+
"@atlaskit/adf-schema": "^57.3.0",
|
|
24
|
+
"@atlaskit/button": "25.3.2",
|
|
25
25
|
"@atlaskit/dropdown-menu": "18.3.0",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^16.1.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@atlaskit/editor-plugin-user-intent": "^14.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
43
|
-
"@atlaskit/editor-synced-block-provider": "^12.
|
|
43
|
+
"@atlaskit/editor-synced-block-provider": "^12.2.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
45
45
|
"@atlaskit/flag": "^18.5.0",
|
|
46
46
|
"@atlaskit/icon": "37.6.0",
|
|
47
|
-
"@atlaskit/icon-lab": "^7.
|
|
47
|
+
"@atlaskit/icon-lab": "^7.8.0",
|
|
48
48
|
"@atlaskit/logo": "^21.6.0",
|
|
49
49
|
"@atlaskit/lozenge": "^15.4.0",
|
|
50
50
|
"@atlaskit/modal-dialog": "^16.6.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
53
53
|
"@atlaskit/primitives": "^22.5.0",
|
|
54
54
|
"@atlaskit/spinner": "20.4.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^174.0.0",
|
|
56
56
|
"@atlaskit/tokens": "16.11.1",
|
|
57
57
|
"@atlaskit/tooltip": "^24.3.0",
|
|
58
58
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"memoize-one": "^6.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^120.
|
|
67
|
+
"@atlaskit/editor-common": "^120.13.0",
|
|
68
68
|
"react": "^18.2.0 || ^19.2.0",
|
|
69
69
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|
|
@@ -85,6 +85,9 @@
|
|
|
85
85
|
},
|
|
86
86
|
"platform_editor_blocks_patch_9": {
|
|
87
87
|
"type": "boolean"
|
|
88
|
+
},
|
|
89
|
+
"platform_editor_blocks_patch_10": {
|
|
90
|
+
"type": "boolean"
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
}
|