@atlaskit/editor-plugin-layout 20.0.2 → 20.0.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 +16 -0
- package/dist/cjs/layoutPlugin.js +1 -3
- package/dist/cjs/ui/LayoutColumnMenu/index.js +10 -9
- package/dist/es2019/layoutPlugin.js +1 -3
- package/dist/es2019/ui/LayoutColumnMenu/index.js +9 -8
- package/dist/esm/layoutPlugin.js +1 -3
- package/dist/esm/ui/LayoutColumnMenu/index.js +10 -9
- package/dist/types/ui/LayoutColumnMenu/index.d.ts +0 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 20.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fc26bfc51dd5c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fc26bfc51dd5c) -
|
|
8
|
+
Add sparse block-control surface anchors, intersection-driven candidates, and explicit visibility
|
|
9
|
+
invalidation for registry-backed block controls. Expose registration change subscriptions from the
|
|
10
|
+
UI control registry model, and refresh cached visibility from suggestion and collapse transaction
|
|
11
|
+
metadata. Under `platform_editor_block_control_migration`, use native node-anchor identity across
|
|
12
|
+
Editor and Block Controls, and route expand keyboard focus through the shared Block Controls
|
|
13
|
+
command. Preserve Show Diff visibility checks in both migration cohorts so block controls stay
|
|
14
|
+
hidden while a diff is displayed. Keep the block menu closed when a migrated layout-column handle
|
|
15
|
+
opens the layout menu, and close the layout menu when the selection moves away from its selected
|
|
16
|
+
columns.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 20.0.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/cjs/layoutPlugin.js
CHANGED
|
@@ -63,7 +63,6 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
63
63
|
var _ref$config = _ref.config,
|
|
64
64
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
65
65
|
api = _ref.api;
|
|
66
|
-
var blockControlMigrationEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration');
|
|
67
66
|
var isAdvancedLayoutEnabled = (0, _editorExperiment.editorExperiment)('advanced_layouts', true);
|
|
68
67
|
var allowAdvancedSingleColumnLayout = isAdvancedLayoutEnabled && (0, _editorExperiment.editorExperiment)('single_column_layouts', true, {
|
|
69
68
|
exposure: true
|
|
@@ -297,8 +296,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
297
296
|
editorView: editorView,
|
|
298
297
|
mountTo: popupsMountPoint,
|
|
299
298
|
boundariesElement: popupsBoundariesElement,
|
|
300
|
-
scrollableElement: popupsScrollableElement
|
|
301
|
-
useRegistryAnchor: blockControlMigrationEnabled
|
|
299
|
+
scrollableElement: popupsScrollableElement
|
|
302
300
|
}) : null);
|
|
303
301
|
},
|
|
304
302
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -17,6 +17,7 @@ var _userIntent = require("@atlaskit/editor-common/user-intent");
|
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
19
19
|
var _editorUiControlModel = require("@atlaskit/editor-ui-control-model");
|
|
20
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
20
21
|
var _layoutColumnSelection = require("../../pm-plugins/utils/layout-column-selection");
|
|
21
22
|
var _components = require("./components");
|
|
22
23
|
var _keys = require("./keys");
|
|
@@ -51,8 +52,7 @@ var LayoutColumnMenu = exports.LayoutColumnMenu = /*#__PURE__*/_react.default.me
|
|
|
51
52
|
editorView = _ref.editorView,
|
|
52
53
|
mountTo = _ref.mountTo,
|
|
53
54
|
boundariesElement = _ref.boundariesElement,
|
|
54
|
-
scrollableElement = _ref.scrollableElement
|
|
55
|
-
useRegistryAnchor = _ref.useRegistryAnchor;
|
|
55
|
+
scrollableElement = _ref.scrollableElement;
|
|
56
56
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['layout', 'selection'], function (states) {
|
|
57
57
|
var _states$layoutState$i, _states$layoutState, _states$layoutState2, _states$layoutState$l, _states$layoutState3, _states$selectionStat;
|
|
58
58
|
return {
|
|
@@ -123,12 +123,13 @@ var LayoutColumnMenu = exports.LayoutColumnMenu = /*#__PURE__*/_react.default.me
|
|
|
123
123
|
});
|
|
124
124
|
}, [handleMenuKeyDown, isLayoutColumnMenuOpen]);
|
|
125
125
|
var components = (_api$uiControlRegistr = api === null || api === void 0 || (_api$uiControlRegistr2 = api.uiControlRegistry) === null || _api$uiControlRegistr2 === void 0 ? void 0 : _api$uiControlRegistr2.actions.getComponents(_keys.LAYOUT_COLUMN_MENU.key)) !== null && _api$uiControlRegistr !== void 0 ? _api$uiControlRegistr : [];
|
|
126
|
+
var hasValidMenuSelection = !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration') || selection !== undefined && (0, _layoutColumnSelection.getLayoutColumnMenuAnchorPos)(selection, layoutColumnMenuAnchorPos) !== undefined;
|
|
126
127
|
var legacyTarget = (0, _react.useMemo)(function () {
|
|
127
|
-
return isLayoutColumnMenuOpen && !
|
|
128
|
-
}, [editorView, isLayoutColumnMenuOpen, layoutColumnMenuAnchorPos, selection
|
|
128
|
+
return isLayoutColumnMenuOpen && !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration') ? getLayoutColumnMenuTarget(editorView, selection, layoutColumnMenuAnchorPos) : null;
|
|
129
|
+
}, [editorView, isLayoutColumnMenuOpen, layoutColumnMenuAnchorPos, selection]);
|
|
129
130
|
var surfaceTargetRef = (0, _react.useRef)(null);
|
|
130
131
|
var surfaceAnchorPosRef = (0, _react.useRef)(undefined);
|
|
131
|
-
if (!
|
|
132
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration') || !isLayoutColumnMenuOpen) {
|
|
132
133
|
surfaceTargetRef.current = null;
|
|
133
134
|
surfaceAnchorPosRef.current = undefined;
|
|
134
135
|
} else if (!surfaceTargetRef.current || surfaceAnchorPosRef.current !== layoutColumnMenuAnchorPos) {
|
|
@@ -136,7 +137,7 @@ var LayoutColumnMenu = exports.LayoutColumnMenu = /*#__PURE__*/_react.default.me
|
|
|
136
137
|
surfaceTargetRef.current = (_surfaceDragHandleEle = _surfaceDragHandleElement.surfaceDragHandleElementStore.get(editorView)) !== null && _surfaceDragHandleEle !== void 0 ? _surfaceDragHandleEle : surfaceTargetRef.current;
|
|
137
138
|
surfaceAnchorPosRef.current = layoutColumnMenuAnchorPos;
|
|
138
139
|
}
|
|
139
|
-
var target =
|
|
140
|
+
var target = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration') ? surfaceTargetRef.current : legacyTarget;
|
|
140
141
|
var hasValidTarget = target instanceof HTMLElement;
|
|
141
142
|
var positionLayoutColumnMenu = (0, _react.useCallback)(function (position) {
|
|
142
143
|
var _menuWrapperRef$curre;
|
|
@@ -155,10 +156,10 @@ var LayoutColumnMenu = exports.LayoutColumnMenu = /*#__PURE__*/_react.default.me
|
|
|
155
156
|
return position;
|
|
156
157
|
}, [editorView, scrollableElement, target]);
|
|
157
158
|
(0, _react.useEffect)(function () {
|
|
158
|
-
if (isLayoutColumnMenuOpen && (!hasValidTarget || components.length === 0)) {
|
|
159
|
+
if (isLayoutColumnMenuOpen && (!hasValidMenuSelection || !hasValidTarget || components.length === 0)) {
|
|
159
160
|
closeLayoutColumnMenu();
|
|
160
161
|
}
|
|
161
|
-
}, [closeLayoutColumnMenu, components.length, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
162
|
+
}, [closeLayoutColumnMenu, components.length, hasValidMenuSelection, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
162
163
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
163
164
|
return (0, _utils.getLayoutColumnMenuPositioningProps)();
|
|
164
165
|
}, []),
|
|
@@ -166,7 +167,7 @@ var LayoutColumnMenu = exports.LayoutColumnMenu = /*#__PURE__*/_react.default.me
|
|
|
166
167
|
alignY = _useMemo.alignY,
|
|
167
168
|
offset = _useMemo.offset,
|
|
168
169
|
useManualBelowFlip = _useMemo.useManualBelowFlip;
|
|
169
|
-
if (!isLayoutColumnMenuOpen || components.length === 0 || !hasValidTarget) {
|
|
170
|
+
if (!isLayoutColumnMenuOpen || !hasValidMenuSelection || components.length === 0 || !hasValidTarget) {
|
|
170
171
|
return null;
|
|
171
172
|
}
|
|
172
173
|
return /*#__PURE__*/_react.default.createElement(PopupWithListeners, {
|
|
@@ -55,7 +55,6 @@ export const layoutPlugin = ({
|
|
|
55
55
|
api
|
|
56
56
|
}) => {
|
|
57
57
|
var _api$blockMenu, _api$analytics2;
|
|
58
|
-
const blockControlMigrationEnabled = isExperimentEnabled('platform_editor_block_control_migration');
|
|
59
58
|
const isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true);
|
|
60
59
|
const allowAdvancedSingleColumnLayout = isAdvancedLayoutEnabled && editorExperiment('single_column_layouts', true, {
|
|
61
60
|
exposure: true
|
|
@@ -277,8 +276,7 @@ export const layoutPlugin = ({
|
|
|
277
276
|
editorView: editorView,
|
|
278
277
|
mountTo: popupsMountPoint,
|
|
279
278
|
boundariesElement: popupsBoundariesElement,
|
|
280
|
-
scrollableElement: popupsScrollableElement
|
|
281
|
-
useRegistryAnchor: blockControlMigrationEnabled
|
|
279
|
+
scrollableElement: popupsScrollableElement
|
|
282
280
|
}) : null);
|
|
283
281
|
},
|
|
284
282
|
getSharedState(editorState) {
|
|
@@ -10,6 +10,7 @@ import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
|
|
|
10
10
|
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { ToolbarDropdownMenuProvider } from '@atlaskit/editor-toolbar';
|
|
12
12
|
import { SurfaceRenderer } from '@atlaskit/editor-ui-control-model';
|
|
13
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { getLayoutColumnMenuAnchorPos } from '../../pm-plugins/utils/layout-column-selection';
|
|
14
15
|
import { LAYOUT_COLUMN_MENU_FALLBACKS } from './components';
|
|
15
16
|
import { LAYOUT_COLUMN_MENU } from './keys';
|
|
@@ -42,8 +43,7 @@ export const LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMen
|
|
|
42
43
|
editorView,
|
|
43
44
|
mountTo,
|
|
44
45
|
boundariesElement,
|
|
45
|
-
scrollableElement
|
|
46
|
-
useRegistryAnchor
|
|
46
|
+
scrollableElement
|
|
47
47
|
}) {
|
|
48
48
|
var _api$uiControlRegistr, _api$uiControlRegistr2;
|
|
49
49
|
const {
|
|
@@ -117,10 +117,11 @@ export const LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMen
|
|
|
117
117
|
});
|
|
118
118
|
}, [handleMenuKeyDown, isLayoutColumnMenuOpen]);
|
|
119
119
|
const components = (_api$uiControlRegistr = api === null || api === void 0 ? void 0 : (_api$uiControlRegistr2 = api.uiControlRegistry) === null || _api$uiControlRegistr2 === void 0 ? void 0 : _api$uiControlRegistr2.actions.getComponents(LAYOUT_COLUMN_MENU.key)) !== null && _api$uiControlRegistr !== void 0 ? _api$uiControlRegistr : [];
|
|
120
|
-
const
|
|
120
|
+
const hasValidMenuSelection = !isExperimentEnabled('platform_editor_block_control_migration') || selection !== undefined && getLayoutColumnMenuAnchorPos(selection, layoutColumnMenuAnchorPos) !== undefined;
|
|
121
|
+
const legacyTarget = useMemo(() => isLayoutColumnMenuOpen && !isExperimentEnabled('platform_editor_block_control_migration') ? getLayoutColumnMenuTarget(editorView, selection, layoutColumnMenuAnchorPos) : null, [editorView, isLayoutColumnMenuOpen, layoutColumnMenuAnchorPos, selection]);
|
|
121
122
|
const surfaceTargetRef = useRef(null);
|
|
122
123
|
const surfaceAnchorPosRef = useRef(undefined);
|
|
123
|
-
if (!
|
|
124
|
+
if (!isExperimentEnabled('platform_editor_block_control_migration') || !isLayoutColumnMenuOpen) {
|
|
124
125
|
surfaceTargetRef.current = null;
|
|
125
126
|
surfaceAnchorPosRef.current = undefined;
|
|
126
127
|
} else if (!surfaceTargetRef.current || surfaceAnchorPosRef.current !== layoutColumnMenuAnchorPos) {
|
|
@@ -128,7 +129,7 @@ export const LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMen
|
|
|
128
129
|
surfaceTargetRef.current = (_surfaceDragHandleEle = surfaceDragHandleElementStore.get(editorView)) !== null && _surfaceDragHandleEle !== void 0 ? _surfaceDragHandleEle : surfaceTargetRef.current;
|
|
129
130
|
surfaceAnchorPosRef.current = layoutColumnMenuAnchorPos;
|
|
130
131
|
}
|
|
131
|
-
const target =
|
|
132
|
+
const target = isExperimentEnabled('platform_editor_block_control_migration') ? surfaceTargetRef.current : legacyTarget;
|
|
132
133
|
const hasValidTarget = target instanceof HTMLElement;
|
|
133
134
|
const positionLayoutColumnMenu = useCallback(position => {
|
|
134
135
|
var _menuWrapperRef$curre;
|
|
@@ -147,17 +148,17 @@ export const LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMen
|
|
|
147
148
|
return position;
|
|
148
149
|
}, [editorView, scrollableElement, target]);
|
|
149
150
|
useEffect(() => {
|
|
150
|
-
if (isLayoutColumnMenuOpen && (!hasValidTarget || components.length === 0)) {
|
|
151
|
+
if (isLayoutColumnMenuOpen && (!hasValidMenuSelection || !hasValidTarget || components.length === 0)) {
|
|
151
152
|
closeLayoutColumnMenu();
|
|
152
153
|
}
|
|
153
|
-
}, [closeLayoutColumnMenu, components.length, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
154
|
+
}, [closeLayoutColumnMenu, components.length, hasValidMenuSelection, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
154
155
|
const {
|
|
155
156
|
alignX,
|
|
156
157
|
alignY,
|
|
157
158
|
offset,
|
|
158
159
|
useManualBelowFlip
|
|
159
160
|
} = useMemo(() => getLayoutColumnMenuPositioningProps(), []);
|
|
160
|
-
if (!isLayoutColumnMenuOpen || components.length === 0 || !hasValidTarget) {
|
|
161
|
+
if (!isLayoutColumnMenuOpen || !hasValidMenuSelection || components.length === 0 || !hasValidTarget) {
|
|
161
162
|
return null;
|
|
162
163
|
}
|
|
163
164
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
package/dist/esm/layoutPlugin.js
CHANGED
|
@@ -56,7 +56,6 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
56
56
|
var _ref$config = _ref.config,
|
|
57
57
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
58
58
|
api = _ref.api;
|
|
59
|
-
var blockControlMigrationEnabled = isExperimentEnabled('platform_editor_block_control_migration');
|
|
60
59
|
var isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true);
|
|
61
60
|
var allowAdvancedSingleColumnLayout = isAdvancedLayoutEnabled && editorExperiment('single_column_layouts', true, {
|
|
62
61
|
exposure: true
|
|
@@ -290,8 +289,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
290
289
|
editorView: editorView,
|
|
291
290
|
mountTo: popupsMountPoint,
|
|
292
291
|
boundariesElement: popupsBoundariesElement,
|
|
293
|
-
scrollableElement: popupsScrollableElement
|
|
294
|
-
useRegistryAnchor: blockControlMigrationEnabled
|
|
292
|
+
scrollableElement: popupsScrollableElement
|
|
295
293
|
}) : null);
|
|
296
294
|
},
|
|
297
295
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -10,6 +10,7 @@ import { UserIntentPopupWrapper } from '@atlaskit/editor-common/user-intent';
|
|
|
10
10
|
import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { ToolbarDropdownMenuProvider } from '@atlaskit/editor-toolbar';
|
|
12
12
|
import { SurfaceRenderer } from '@atlaskit/editor-ui-control-model';
|
|
13
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { getLayoutColumnMenuAnchorPos } from '../../pm-plugins/utils/layout-column-selection';
|
|
14
15
|
import { LAYOUT_COLUMN_MENU_FALLBACKS } from './components';
|
|
15
16
|
import { LAYOUT_COLUMN_MENU } from './keys';
|
|
@@ -43,8 +44,7 @@ export var LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMenu(
|
|
|
43
44
|
editorView = _ref.editorView,
|
|
44
45
|
mountTo = _ref.mountTo,
|
|
45
46
|
boundariesElement = _ref.boundariesElement,
|
|
46
|
-
scrollableElement = _ref.scrollableElement
|
|
47
|
-
useRegistryAnchor = _ref.useRegistryAnchor;
|
|
47
|
+
scrollableElement = _ref.scrollableElement;
|
|
48
48
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['layout', 'selection'], function (states) {
|
|
49
49
|
var _states$layoutState$i, _states$layoutState, _states$layoutState2, _states$layoutState$l, _states$layoutState3, _states$selectionStat;
|
|
50
50
|
return {
|
|
@@ -115,12 +115,13 @@ export var LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMenu(
|
|
|
115
115
|
});
|
|
116
116
|
}, [handleMenuKeyDown, isLayoutColumnMenuOpen]);
|
|
117
117
|
var components = (_api$uiControlRegistr = api === null || api === void 0 || (_api$uiControlRegistr2 = api.uiControlRegistry) === null || _api$uiControlRegistr2 === void 0 ? void 0 : _api$uiControlRegistr2.actions.getComponents(LAYOUT_COLUMN_MENU.key)) !== null && _api$uiControlRegistr !== void 0 ? _api$uiControlRegistr : [];
|
|
118
|
+
var hasValidMenuSelection = !isExperimentEnabled('platform_editor_block_control_migration') || selection !== undefined && getLayoutColumnMenuAnchorPos(selection, layoutColumnMenuAnchorPos) !== undefined;
|
|
118
119
|
var legacyTarget = useMemo(function () {
|
|
119
|
-
return isLayoutColumnMenuOpen && !
|
|
120
|
-
}, [editorView, isLayoutColumnMenuOpen, layoutColumnMenuAnchorPos, selection
|
|
120
|
+
return isLayoutColumnMenuOpen && !isExperimentEnabled('platform_editor_block_control_migration') ? getLayoutColumnMenuTarget(editorView, selection, layoutColumnMenuAnchorPos) : null;
|
|
121
|
+
}, [editorView, isLayoutColumnMenuOpen, layoutColumnMenuAnchorPos, selection]);
|
|
121
122
|
var surfaceTargetRef = useRef(null);
|
|
122
123
|
var surfaceAnchorPosRef = useRef(undefined);
|
|
123
|
-
if (!
|
|
124
|
+
if (!isExperimentEnabled('platform_editor_block_control_migration') || !isLayoutColumnMenuOpen) {
|
|
124
125
|
surfaceTargetRef.current = null;
|
|
125
126
|
surfaceAnchorPosRef.current = undefined;
|
|
126
127
|
} else if (!surfaceTargetRef.current || surfaceAnchorPosRef.current !== layoutColumnMenuAnchorPos) {
|
|
@@ -128,7 +129,7 @@ export var LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMenu(
|
|
|
128
129
|
surfaceTargetRef.current = (_surfaceDragHandleEle = surfaceDragHandleElementStore.get(editorView)) !== null && _surfaceDragHandleEle !== void 0 ? _surfaceDragHandleEle : surfaceTargetRef.current;
|
|
129
130
|
surfaceAnchorPosRef.current = layoutColumnMenuAnchorPos;
|
|
130
131
|
}
|
|
131
|
-
var target =
|
|
132
|
+
var target = isExperimentEnabled('platform_editor_block_control_migration') ? surfaceTargetRef.current : legacyTarget;
|
|
132
133
|
var hasValidTarget = target instanceof HTMLElement;
|
|
133
134
|
var positionLayoutColumnMenu = useCallback(function (position) {
|
|
134
135
|
var _menuWrapperRef$curre;
|
|
@@ -147,10 +148,10 @@ export var LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMenu(
|
|
|
147
148
|
return position;
|
|
148
149
|
}, [editorView, scrollableElement, target]);
|
|
149
150
|
useEffect(function () {
|
|
150
|
-
if (isLayoutColumnMenuOpen && (!hasValidTarget || components.length === 0)) {
|
|
151
|
+
if (isLayoutColumnMenuOpen && (!hasValidMenuSelection || !hasValidTarget || components.length === 0)) {
|
|
151
152
|
closeLayoutColumnMenu();
|
|
152
153
|
}
|
|
153
|
-
}, [closeLayoutColumnMenu, components.length, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
154
|
+
}, [closeLayoutColumnMenu, components.length, hasValidMenuSelection, hasValidTarget, isLayoutColumnMenuOpen]);
|
|
154
155
|
var _useMemo = useMemo(function () {
|
|
155
156
|
return getLayoutColumnMenuPositioningProps();
|
|
156
157
|
}, []),
|
|
@@ -158,7 +159,7 @@ export var LayoutColumnMenu = /*#__PURE__*/React.memo(function LayoutColumnMenu(
|
|
|
158
159
|
alignY = _useMemo.alignY,
|
|
159
160
|
offset = _useMemo.offset,
|
|
160
161
|
useManualBelowFlip = _useMemo.useManualBelowFlip;
|
|
161
|
-
if (!isLayoutColumnMenuOpen || components.length === 0 || !hasValidTarget) {
|
|
162
|
+
if (!isLayoutColumnMenuOpen || !hasValidMenuSelection || components.length === 0 || !hasValidTarget) {
|
|
162
163
|
return null;
|
|
163
164
|
}
|
|
164
165
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.3",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@atlaskit/adf-schema": "^57.5.0",
|
|
25
25
|
"@atlaskit/css": "^1.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-analytics": "^19.0.0",
|
|
27
|
-
"@atlaskit/editor-plugin-block-controls": "^20.
|
|
27
|
+
"@atlaskit/editor-plugin-block-controls": "^20.1.0",
|
|
28
28
|
"@atlaskit/editor-plugin-block-menu": "^18.0.0",
|
|
29
29
|
"@atlaskit/editor-plugin-decorations": "^19.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-editor-disabled": "^19.0.0",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@atlaskit/editor-plugin-interaction": "^32.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-selection": "^19.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-toolbar": "^16.0.0",
|
|
35
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^13.
|
|
35
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^13.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-user-intent": "^17.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-width": "^20.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
40
40
|
"@atlaskit/editor-toolbar": "^2.7.0",
|
|
41
|
-
"@atlaskit/editor-ui-control-model": "^2.
|
|
41
|
+
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
42
42
|
"@atlaskit/icon": "^37.7.0",
|
|
43
43
|
"@atlaskit/icon-lab": "^7.9.0",
|
|
44
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"bind-event-listener": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^123.
|
|
53
|
+
"@atlaskit/editor-common": "^123.3.0",
|
|
54
54
|
"react": "^18.2.0 || ^19.2.0",
|
|
55
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
56
56
|
},
|