@atlaskit/editor-plugin-block-controls 11.5.3 → 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 +15 -0
- package/dist/cjs/ui/drag-handle.js +13 -12
- package/dist/es2019/ui/drag-handle.js +13 -12
- package/dist/esm/ui/drag-handle.js +13 -12
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
12
|
+
## 11.5.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 11.5.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -134,7 +134,7 @@ var dragHandleButtonStyles = (0, _react2.css)({
|
|
|
134
134
|
backgroundColor: 'transparent'
|
|
135
135
|
},
|
|
136
136
|
'&:hover:disabled': {
|
|
137
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
137
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
@@ -190,7 +190,7 @@ var dragHandleButtonStylesOld = (0, _react2.css)({
|
|
|
190
190
|
backgroundColor: 'transparent'
|
|
191
191
|
},
|
|
192
192
|
'&:hover:disabled': {
|
|
193
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
193
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
var focusedStylesOld = (0, _react2.css)({
|
|
@@ -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();
|
|
@@ -125,7 +125,7 @@ const dragHandleButtonStyles = css({
|
|
|
125
125
|
backgroundColor: 'transparent'
|
|
126
126
|
},
|
|
127
127
|
'&:hover:disabled': {
|
|
128
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
128
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -184,7 +184,7 @@ const dragHandleButtonStylesOld = css({
|
|
|
184
184
|
backgroundColor: 'transparent'
|
|
185
185
|
},
|
|
186
186
|
'&:hover:disabled': {
|
|
187
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
187
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
const focusedStylesOld = css({
|
|
@@ -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();
|
|
@@ -130,7 +130,7 @@ var dragHandleButtonStyles = css({
|
|
|
130
130
|
backgroundColor: 'transparent'
|
|
131
131
|
},
|
|
132
132
|
'&:hover:disabled': {
|
|
133
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
133
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
|
|
@@ -186,7 +186,7 @@ var dragHandleButtonStylesOld = css({
|
|
|
186
186
|
backgroundColor: 'transparent'
|
|
187
187
|
},
|
|
188
188
|
'&:hover:disabled': {
|
|
189
|
-
backgroundColor: "var(--ds-background-disabled, #
|
|
189
|
+
backgroundColor: "var(--ds-background-disabled, #0515240F)"
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
var focusedStylesOld = css({
|
|
@@ -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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-quick-insert": "^10.4.0",
|
|
42
42
|
"@atlaskit/editor-plugin-selection": "^10.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-toolbar": "^7.3.0",
|
|
44
|
-
"@atlaskit/editor-plugin-type-ahead": "^10.
|
|
44
|
+
"@atlaskit/editor-plugin-type-ahead": "^10.3.0",
|
|
45
45
|
"@atlaskit/editor-plugin-user-intent": "^8.2.0",
|
|
46
46
|
"@atlaskit/editor-plugin-width": "^11.1.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^19.0.0",
|
|
58
58
|
"@atlaskit/theme": "^25.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
-
"@atlaskit/tokens": "^13.
|
|
61
|
-
"@atlaskit/tooltip": "^22.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^85.0.0",
|
|
60
|
+
"@atlaskit/tokens": "^13.1.0",
|
|
61
|
+
"@atlaskit/tooltip": "^22.5.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
64
64
|
"bind-event-listener": "^3.0.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"
|