@atlaskit/editor-plugin-block-controls 22.0.0 → 22.0.1
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 22.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d13ba24ba86e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d13ba24ba86e8) -
|
|
8
|
+
Hide the block controls drag handle in view mode when platform_editor_block_control_migration is
|
|
9
|
+
enabled
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 22.0.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -23,10 +23,11 @@ var getBlockControlsSurfaceDragHandleComponents = exports.getBlockControlsSurfac
|
|
|
23
23
|
});
|
|
24
24
|
},
|
|
25
25
|
isHidden: function isHidden() {
|
|
26
|
+
var _api$editorViewMode;
|
|
26
27
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
27
28
|
surfaceContext = _ref3.surfaceContext;
|
|
28
29
|
var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT);
|
|
29
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== _surfaceKeys.BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
30
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== _surfaceKeys.BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
30
31
|
}
|
|
31
32
|
}, _surfaceKeys.BLOCK_CONTROLS_DRAG_HANDLE), {}, {
|
|
32
33
|
parents: [_objectSpread(_objectSpread({}, _surfaceKeys.BLOCK_CONTROLS_LEFT_GROUP), {}, {
|
|
@@ -14,8 +14,9 @@ export const getBlockControlsSurfaceDragHandleComponents = ({
|
|
|
14
14
|
isHidden: ({
|
|
15
15
|
surfaceContext
|
|
16
16
|
} = {}) => {
|
|
17
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
17
18
|
const context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
|
|
18
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
19
|
+
return (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
19
20
|
},
|
|
20
21
|
...BLOCK_CONTROLS_DRAG_HANDLE,
|
|
21
22
|
parents: [{
|
|
@@ -16,10 +16,11 @@ export var getBlockControlsSurfaceDragHandleComponents = function getBlockContro
|
|
|
16
16
|
});
|
|
17
17
|
},
|
|
18
18
|
isHidden: function isHidden() {
|
|
19
|
+
var _api$editorViewMode;
|
|
19
20
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
20
21
|
surfaceContext = _ref3.surfaceContext;
|
|
21
22
|
var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
|
|
22
|
-
return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
23
|
+
return (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view' || !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.activeNode.pos || context.activeControlKey !== undefined && context.activeControlKey !== BLOCK_CONTROLS_DRAG_HANDLE.key;
|
|
23
24
|
}
|
|
24
25
|
}, BLOCK_CONTROLS_DRAG_HANDLE), {}, {
|
|
25
26
|
parents: [_objectSpread(_objectSpread({}, BLOCK_CONTROLS_LEFT_GROUP), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
29
29
|
"@atlaskit/button": "^25.4.0",
|
|
30
30
|
"@atlaskit/css": "^1.1.0",
|
|
31
|
-
"@atlaskit/docs": "^12.
|
|
31
|
+
"@atlaskit/docs": "^12.3.0",
|
|
32
32
|
"@atlaskit/editor-plugin-accessibility-utils": "^21.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^21.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-block-collapse": "^7.0.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-interaction": "^35.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-limited-mode": "^18.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-metrics": "^22.0.0",
|
|
41
|
-
"@atlaskit/editor-plugin-quick-insert": "^21.
|
|
41
|
+
"@atlaskit/editor-plugin-quick-insert": "^21.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-selection": "^21.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-show-diff": "^19.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-toolbar": "^18.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/primitives": "^22.5.0",
|
|
62
62
|
"@atlaskit/section-message": "^10.2.0",
|
|
63
63
|
"@atlaskit/theme": "^28.2.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^206.0.0",
|
|
65
65
|
"@atlaskit/tokens": "^20.0.0",
|
|
66
66
|
"@atlaskit/tooltip": "^24.3.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^11.1.1"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^125.
|
|
76
|
+
"@atlaskit/editor-common": "^125.1.0",
|
|
77
77
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
78
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
79
79
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|