@atlaskit/editor-plugin-block-controls 11.5.4 → 11.5.5
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 +9 -0
- package/dist/cjs/ui/drag-handle.js +11 -10
- package/dist/es2019/ui/drag-handle.js +11 -10
- package/dist/esm/ui/drag-handle.js +11 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 11.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`523f77de83059`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/523f77de83059) -
|
|
8
|
+
Suppress drag handle tooltip while layout column menu is open. Adds layoutColumnMenuPopupOpen user
|
|
9
|
+
intent and wraps LayoutColumnMenu with UserIntentPopupWrapper.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 11.5.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -375,19 +375,21 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
375
375
|
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
376
376
|
isFocused = _useState0[0],
|
|
377
377
|
setIsFocused = _useState0[1];
|
|
378
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['featureFlags', 'selection', 'blockControls', 'interaction'], function (states) {
|
|
379
|
-
var _states$featureFlagsS, _states$selectionStat, _states$blockControls, _states$interactionSt;
|
|
378
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['featureFlags', 'selection', 'blockControls', 'interaction', 'userIntent'], function (states) {
|
|
379
|
+
var _states$featureFlagsS, _states$selectionStat, _states$blockControls, _states$interactionSt, _states$userIntentSta;
|
|
380
380
|
return {
|
|
381
381
|
macroInteractionUpdates: (_states$featureFlagsS = states.featureFlagsState) === null || _states$featureFlagsS === void 0 ? void 0 : _states$featureFlagsS.macroInteractionUpdates,
|
|
382
382
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection,
|
|
383
383
|
isShiftDown: (_states$blockControls = states.blockControlsState) === null || _states$blockControls === void 0 ? void 0 : _states$blockControls.isShiftDown,
|
|
384
|
-
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState
|
|
384
|
+
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState,
|
|
385
|
+
currentUserIntent: (_states$userIntentSta = states.userIntentState) === null || _states$userIntentSta === void 0 ? void 0 : _states$userIntentSta.currentUserIntent
|
|
385
386
|
};
|
|
386
387
|
}),
|
|
387
388
|
macroInteractionUpdates = _useSharedPluginState.macroInteractionUpdates,
|
|
388
389
|
selection = _useSharedPluginState.selection,
|
|
389
390
|
isShiftDown = _useSharedPluginState.isShiftDown,
|
|
390
|
-
interactionState = _useSharedPluginState.interactionState
|
|
391
|
+
interactionState = _useSharedPluginState.interactionState,
|
|
392
|
+
currentUserIntent = _useSharedPluginState.currentUserIntent;
|
|
391
393
|
var start = getPos();
|
|
392
394
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
393
395
|
|
|
@@ -1060,9 +1062,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
1060
1062
|
}, (0, _react2.jsx)("span", {
|
|
1061
1063
|
css: [tooltipContainerStyles, (0, _dragHandlePositions.shouldMaskNodeControls)(nodeType, isTopLevelNodeValue) && ((0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _platformFeatureFlags.fg)('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMask : tooltipContainerStylesStickyHeaderWithMask), !(0, _dragHandlePositions.shouldMaskNodeControls)(nodeType, isTopLevelNodeValue) && tooltipContainerStylesStickyHeaderWithoutMask]
|
|
1062
1064
|
}, (0, _react2.jsx)(_tooltip.default, {
|
|
1063
|
-
content:
|
|
1064
|
-
helpDescriptors: helpDescriptors
|
|
1065
|
-
}),
|
|
1065
|
+
content: tooltipContent,
|
|
1066
1066
|
ignoreTooltipPointerEvents: true,
|
|
1067
1067
|
position: 'top'
|
|
1068
1068
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -1095,9 +1095,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
1095
1095
|
};
|
|
1096
1096
|
var buttonWithTooltip = function buttonWithTooltip() {
|
|
1097
1097
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
1098
|
-
content:
|
|
1099
|
-
helpDescriptors: helpDescriptors
|
|
1100
|
-
}),
|
|
1098
|
+
content: tooltipContent,
|
|
1101
1099
|
ignoreTooltipPointerEvents: true
|
|
1102
1100
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1103
1101
|
,
|
|
@@ -1109,6 +1107,9 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
1109
1107
|
}
|
|
1110
1108
|
}, renderButton());
|
|
1111
1109
|
};
|
|
1110
|
+
var tooltipContent = isLayoutColumn && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true) && currentUserIntent === 'layoutColumnMenuPopupOpen' ? null : (0, _react2.jsx)(_keymaps.TooltipContentWithMultipleShortcuts, {
|
|
1111
|
+
helpDescriptors: helpDescriptors
|
|
1112
|
+
});
|
|
1112
1113
|
var isTooltip = !dragHandleDisabled;
|
|
1113
1114
|
var stickyRender = isTooltip ? stickyWithTooltip() : stickyWithoutTooltip();
|
|
1114
1115
|
var render = isTooltip ? buttonWithTooltip() : renderButton();
|
|
@@ -358,14 +358,16 @@ export const DragHandle = ({
|
|
|
358
358
|
macroInteractionUpdates,
|
|
359
359
|
selection,
|
|
360
360
|
isShiftDown,
|
|
361
|
-
interactionState
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
interactionState,
|
|
362
|
+
currentUserIntent
|
|
363
|
+
} = useSharedPluginStateWithSelector(api, ['featureFlags', 'selection', 'blockControls', 'interaction', 'userIntent'], states => {
|
|
364
|
+
var _states$featureFlagsS, _states$selectionStat, _states$blockControls, _states$interactionSt, _states$userIntentSta;
|
|
364
365
|
return {
|
|
365
366
|
macroInteractionUpdates: (_states$featureFlagsS = states.featureFlagsState) === null || _states$featureFlagsS === void 0 ? void 0 : _states$featureFlagsS.macroInteractionUpdates,
|
|
366
367
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection,
|
|
367
368
|
isShiftDown: (_states$blockControls = states.blockControlsState) === null || _states$blockControls === void 0 ? void 0 : _states$blockControls.isShiftDown,
|
|
368
|
-
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState
|
|
369
|
+
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState,
|
|
370
|
+
currentUserIntent: (_states$userIntentSta = states.userIntentState) === null || _states$userIntentSta === void 0 ? void 0 : _states$userIntentSta.currentUserIntent
|
|
369
371
|
};
|
|
370
372
|
});
|
|
371
373
|
const start = getPos();
|
|
@@ -1039,9 +1041,7 @@ export const DragHandle = ({
|
|
|
1039
1041
|
}, jsx("span", {
|
|
1040
1042
|
css: [tooltipContainerStyles, shouldMaskNodeControls(nodeType, isTopLevelNodeValue) && (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMask : tooltipContainerStylesStickyHeaderWithMask), !shouldMaskNodeControls(nodeType, isTopLevelNodeValue) && tooltipContainerStylesStickyHeaderWithoutMask]
|
|
1041
1043
|
}, jsx(Tooltip, {
|
|
1042
|
-
content:
|
|
1043
|
-
helpDescriptors: helpDescriptors
|
|
1044
|
-
}),
|
|
1044
|
+
content: tooltipContent,
|
|
1045
1045
|
ignoreTooltipPointerEvents: true,
|
|
1046
1046
|
position: 'top'
|
|
1047
1047
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -1070,9 +1070,7 @@ export const DragHandle = ({
|
|
|
1070
1070
|
css: [shouldMaskNodeControls(nodeType, isTopLevelNodeValue) && buttonWrapperStyles, buttonWrapperStylesPatch]
|
|
1071
1071
|
}, renderButton())));
|
|
1072
1072
|
const buttonWithTooltip = () => jsx(Tooltip, {
|
|
1073
|
-
content:
|
|
1074
|
-
helpDescriptors: helpDescriptors
|
|
1075
|
-
}),
|
|
1073
|
+
content: tooltipContent,
|
|
1076
1074
|
ignoreTooltipPointerEvents: true
|
|
1077
1075
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1078
1076
|
,
|
|
@@ -1083,6 +1081,9 @@ export const DragHandle = ({
|
|
|
1083
1081
|
});
|
|
1084
1082
|
}
|
|
1085
1083
|
}, renderButton());
|
|
1084
|
+
const tooltipContent = isLayoutColumn && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) && currentUserIntent === 'layoutColumnMenuPopupOpen' ? null : jsx(TooltipContentWithMultipleShortcuts, {
|
|
1085
|
+
helpDescriptors: helpDescriptors
|
|
1086
|
+
});
|
|
1086
1087
|
const isTooltip = !dragHandleDisabled;
|
|
1087
1088
|
const stickyRender = isTooltip ? stickyWithTooltip() : stickyWithoutTooltip();
|
|
1088
1089
|
const render = isTooltip ? buttonWithTooltip() : renderButton();
|
|
@@ -371,19 +371,21 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
371
371
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
372
372
|
isFocused = _useState0[0],
|
|
373
373
|
setIsFocused = _useState0[1];
|
|
374
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['featureFlags', 'selection', 'blockControls', 'interaction'], function (states) {
|
|
375
|
-
var _states$featureFlagsS, _states$selectionStat, _states$blockControls, _states$interactionSt;
|
|
374
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['featureFlags', 'selection', 'blockControls', 'interaction', 'userIntent'], function (states) {
|
|
375
|
+
var _states$featureFlagsS, _states$selectionStat, _states$blockControls, _states$interactionSt, _states$userIntentSta;
|
|
376
376
|
return {
|
|
377
377
|
macroInteractionUpdates: (_states$featureFlagsS = states.featureFlagsState) === null || _states$featureFlagsS === void 0 ? void 0 : _states$featureFlagsS.macroInteractionUpdates,
|
|
378
378
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection,
|
|
379
379
|
isShiftDown: (_states$blockControls = states.blockControlsState) === null || _states$blockControls === void 0 ? void 0 : _states$blockControls.isShiftDown,
|
|
380
|
-
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState
|
|
380
|
+
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState,
|
|
381
|
+
currentUserIntent: (_states$userIntentSta = states.userIntentState) === null || _states$userIntentSta === void 0 ? void 0 : _states$userIntentSta.currentUserIntent
|
|
381
382
|
};
|
|
382
383
|
}),
|
|
383
384
|
macroInteractionUpdates = _useSharedPluginState.macroInteractionUpdates,
|
|
384
385
|
selection = _useSharedPluginState.selection,
|
|
385
386
|
isShiftDown = _useSharedPluginState.isShiftDown,
|
|
386
|
-
interactionState = _useSharedPluginState.interactionState
|
|
387
|
+
interactionState = _useSharedPluginState.interactionState,
|
|
388
|
+
currentUserIntent = _useSharedPluginState.currentUserIntent;
|
|
387
389
|
var start = getPos();
|
|
388
390
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
389
391
|
|
|
@@ -1056,9 +1058,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
1056
1058
|
}, jsx("span", {
|
|
1057
1059
|
css: [tooltipContainerStyles, shouldMaskNodeControls(nodeType, isTopLevelNodeValue) && (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && fg('platform_editor_table_sticky_header_patch_6') ? tooltipContainerStylesImprovedStickyHeaderWithMask : tooltipContainerStylesStickyHeaderWithMask), !shouldMaskNodeControls(nodeType, isTopLevelNodeValue) && tooltipContainerStylesStickyHeaderWithoutMask]
|
|
1058
1060
|
}, jsx(Tooltip, {
|
|
1059
|
-
content:
|
|
1060
|
-
helpDescriptors: helpDescriptors
|
|
1061
|
-
}),
|
|
1061
|
+
content: tooltipContent,
|
|
1062
1062
|
ignoreTooltipPointerEvents: true,
|
|
1063
1063
|
position: 'top'
|
|
1064
1064
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -1091,9 +1091,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
1091
1091
|
};
|
|
1092
1092
|
var buttonWithTooltip = function buttonWithTooltip() {
|
|
1093
1093
|
return jsx(Tooltip, {
|
|
1094
|
-
content:
|
|
1095
|
-
helpDescriptors: helpDescriptors
|
|
1096
|
-
}),
|
|
1094
|
+
content: tooltipContent,
|
|
1097
1095
|
ignoreTooltipPointerEvents: true
|
|
1098
1096
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1099
1097
|
,
|
|
@@ -1105,6 +1103,9 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
1105
1103
|
}
|
|
1106
1104
|
}, renderButton());
|
|
1107
1105
|
};
|
|
1106
|
+
var tooltipContent = isLayoutColumn && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) && currentUserIntent === 'layoutColumnMenuPopupOpen' ? null : jsx(TooltipContentWithMultipleShortcuts, {
|
|
1107
|
+
helpDescriptors: helpDescriptors
|
|
1108
|
+
});
|
|
1108
1109
|
var isTooltip = !dragHandleDisabled;
|
|
1109
1110
|
var stickyRender = isTooltip ? stickyWithTooltip() : stickyWithoutTooltip();
|
|
1110
1111
|
var render = isTooltip ? buttonWithTooltip() : renderButton();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "11.5.
|
|
3
|
+
"version": "11.5.5",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^114.
|
|
70
|
+
"@atlaskit/editor-common": "^114.54.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|