@atlaskit/editor-plugin-block-controls 2.21.9 → 2.21.11
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 +14 -0
- package/dist/cjs/ui/drag-handle.js +11 -11
- package/dist/es2019/ui/drag-handle.js +11 -11
- package/dist/esm/ui/drag-handle.js +11 -11
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 2.21.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#109021](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109021)
|
|
8
|
+
[`9d47259416236`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9d47259416236) -
|
|
9
|
+
[ux] ED-26101 Update drag column tooltips
|
|
10
|
+
|
|
11
|
+
## 2.21.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 2.21.9
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -390,15 +390,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
393
|
-
var helpDescriptors =
|
|
394
|
-
description: formatMessage(_messages.blockControlsMessages.dragToMove)
|
|
395
|
-
}, {
|
|
396
|
-
description: formatMessage(_messages.blockControlsMessages.moveUp),
|
|
397
|
-
keymap: _keymaps.dragToMoveUp
|
|
398
|
-
}, {
|
|
399
|
-
description: formatMessage(_messages.blockControlsMessages.moveDown),
|
|
400
|
-
keymap: _keymaps.dragToMoveDown
|
|
401
|
-
}] : [{
|
|
393
|
+
var helpDescriptors = [{
|
|
402
394
|
description: formatMessage(_messages.blockControlsMessages.dragToMove)
|
|
403
395
|
}, {
|
|
404
396
|
description: formatMessage(_messages.blockControlsMessages.moveUp),
|
|
@@ -408,7 +400,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
408
400
|
keymap: _keymaps.dragToMoveDown
|
|
409
401
|
}];
|
|
410
402
|
var isParentNodeOfTypeLayout;
|
|
411
|
-
if (!isTopLevelNode && handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && (0, _experiments.editorExperiment)('nested-dnd', true)) {
|
|
403
|
+
if (!isTopLevelNode && ((0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_accessibility') || handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused) && (0, _experiments.editorExperiment)('nested-dnd', true)) {
|
|
412
404
|
isParentNodeOfTypeLayout = nodeType === 'layoutSection' || view.state.doc.resolve((0, _getNestedNodePosition.getNestedNodePosition)(view.state)).node().type.name === 'layoutColumn';
|
|
413
405
|
if (isParentNodeOfTypeLayout) {
|
|
414
406
|
helpDescriptors = [].concat((0, _toConsumableArray2.default)(helpDescriptors), [{
|
|
@@ -423,7 +415,15 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
423
415
|
|
|
424
416
|
// When advanced layout is on, layout column drag handle show only show 'Drag to move', no shortcuts
|
|
425
417
|
if ((0, _experiments.editorExperiment)('advanced_layouts', true) && nodeType === 'layoutColumn') {
|
|
426
|
-
helpDescriptors = [{
|
|
418
|
+
helpDescriptors = (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_accessibility') ? [{
|
|
419
|
+
description: formatMessage(_messages.blockControlsMessages.dragToRearrange)
|
|
420
|
+
}, {
|
|
421
|
+
description: formatMessage(_messages.blockControlsMessages.moveLeft),
|
|
422
|
+
keymap: _keymaps.dragToMoveLeft
|
|
423
|
+
}, {
|
|
424
|
+
description: formatMessage(_messages.blockControlsMessages.moveRight),
|
|
425
|
+
keymap: _keymaps.dragToMoveRight
|
|
426
|
+
}] : [{
|
|
427
427
|
description: formatMessage(_messages.blockControlsMessages.dragToMove)
|
|
428
428
|
}];
|
|
429
429
|
}
|
|
@@ -370,15 +370,7 @@ export const DragHandle = ({
|
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
373
|
-
let helpDescriptors =
|
|
374
|
-
description: formatMessage(blockControlsMessages.dragToMove)
|
|
375
|
-
}, {
|
|
376
|
-
description: formatMessage(blockControlsMessages.moveUp),
|
|
377
|
-
keymap: dragToMoveUp
|
|
378
|
-
}, {
|
|
379
|
-
description: formatMessage(blockControlsMessages.moveDown),
|
|
380
|
-
keymap: dragToMoveDown
|
|
381
|
-
}] : [{
|
|
373
|
+
let helpDescriptors = [{
|
|
382
374
|
description: formatMessage(blockControlsMessages.dragToMove)
|
|
383
375
|
}, {
|
|
384
376
|
description: formatMessage(blockControlsMessages.moveUp),
|
|
@@ -388,7 +380,7 @@ export const DragHandle = ({
|
|
|
388
380
|
keymap: dragToMoveDown
|
|
389
381
|
}];
|
|
390
382
|
let isParentNodeOfTypeLayout;
|
|
391
|
-
if (!isTopLevelNode && handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && editorExperiment('nested-dnd', true)) {
|
|
383
|
+
if (!isTopLevelNode && (fg('platform_editor_advanced_layouts_accessibility') || handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused) && editorExperiment('nested-dnd', true)) {
|
|
392
384
|
isParentNodeOfTypeLayout = nodeType === 'layoutSection' || view.state.doc.resolve(getNestedNodePosition(view.state)).node().type.name === 'layoutColumn';
|
|
393
385
|
if (isParentNodeOfTypeLayout) {
|
|
394
386
|
helpDescriptors = [...helpDescriptors, {
|
|
@@ -403,7 +395,15 @@ export const DragHandle = ({
|
|
|
403
395
|
|
|
404
396
|
// When advanced layout is on, layout column drag handle show only show 'Drag to move', no shortcuts
|
|
405
397
|
if (editorExperiment('advanced_layouts', true) && nodeType === 'layoutColumn') {
|
|
406
|
-
helpDescriptors = [{
|
|
398
|
+
helpDescriptors = fg('platform_editor_advanced_layouts_accessibility') ? [{
|
|
399
|
+
description: formatMessage(blockControlsMessages.dragToRearrange)
|
|
400
|
+
}, {
|
|
401
|
+
description: formatMessage(blockControlsMessages.moveLeft),
|
|
402
|
+
keymap: dragToMoveLeft
|
|
403
|
+
}, {
|
|
404
|
+
description: formatMessage(blockControlsMessages.moveRight),
|
|
405
|
+
keymap: dragToMoveRight
|
|
406
|
+
}] : [{
|
|
407
407
|
description: formatMessage(blockControlsMessages.dragToMove)
|
|
408
408
|
}];
|
|
409
409
|
}
|
|
@@ -381,15 +381,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
383
|
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
384
|
-
var helpDescriptors =
|
|
385
|
-
description: formatMessage(blockControlsMessages.dragToMove)
|
|
386
|
-
}, {
|
|
387
|
-
description: formatMessage(blockControlsMessages.moveUp),
|
|
388
|
-
keymap: dragToMoveUp
|
|
389
|
-
}, {
|
|
390
|
-
description: formatMessage(blockControlsMessages.moveDown),
|
|
391
|
-
keymap: dragToMoveDown
|
|
392
|
-
}] : [{
|
|
384
|
+
var helpDescriptors = [{
|
|
393
385
|
description: formatMessage(blockControlsMessages.dragToMove)
|
|
394
386
|
}, {
|
|
395
387
|
description: formatMessage(blockControlsMessages.moveUp),
|
|
@@ -399,7 +391,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
399
391
|
keymap: dragToMoveDown
|
|
400
392
|
}];
|
|
401
393
|
var isParentNodeOfTypeLayout;
|
|
402
|
-
if (!isTopLevelNode && handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && editorExperiment('nested-dnd', true)) {
|
|
394
|
+
if (!isTopLevelNode && (fg('platform_editor_advanced_layouts_accessibility') || handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused) && editorExperiment('nested-dnd', true)) {
|
|
403
395
|
isParentNodeOfTypeLayout = nodeType === 'layoutSection' || view.state.doc.resolve(getNestedNodePosition(view.state)).node().type.name === 'layoutColumn';
|
|
404
396
|
if (isParentNodeOfTypeLayout) {
|
|
405
397
|
helpDescriptors = [].concat(_toConsumableArray(helpDescriptors), [{
|
|
@@ -414,7 +406,15 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
414
406
|
|
|
415
407
|
// When advanced layout is on, layout column drag handle show only show 'Drag to move', no shortcuts
|
|
416
408
|
if (editorExperiment('advanced_layouts', true) && nodeType === 'layoutColumn') {
|
|
417
|
-
helpDescriptors = [{
|
|
409
|
+
helpDescriptors = fg('platform_editor_advanced_layouts_accessibility') ? [{
|
|
410
|
+
description: formatMessage(blockControlsMessages.dragToRearrange)
|
|
411
|
+
}, {
|
|
412
|
+
description: formatMessage(blockControlsMessages.moveLeft),
|
|
413
|
+
keymap: dragToMoveLeft
|
|
414
|
+
}, {
|
|
415
|
+
description: formatMessage(blockControlsMessages.moveRight),
|
|
416
|
+
keymap: dragToMoveRight
|
|
417
|
+
}] : [{
|
|
418
418
|
description: formatMessage(blockControlsMessages.dragToMove)
|
|
419
419
|
}];
|
|
420
420
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.11",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
44
|
-
"@atlaskit/icon": "^23.
|
|
45
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
44
|
+
"@atlaskit/icon": "^23.6.0",
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
|
|
47
47
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
48
48
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.2.0",
|
|
@@ -141,6 +141,9 @@
|
|
|
141
141
|
},
|
|
142
142
|
"platform_editor_dnd_handle_highlight_fix_firefox": {
|
|
143
143
|
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"platform_editor_advanced_layouts_accessibility": {
|
|
146
|
+
"type": "boolean"
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
}
|