@atlaskit/editor-plugin-help-dialog 8.0.33 → 9.0.0
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/formatting.js +44 -6
- package/dist/cjs/ui/utils.js +16 -0
- package/dist/es2019/ui/formatting.js +29 -2
- package/dist/es2019/ui/utils.js +16 -0
- package/dist/esm/ui/formatting.js +45 -7
- package/dist/esm/ui/utils.js +16 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d15da1c489b34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d15da1c489b34) -
|
|
8
|
+
Add drag handle and move selection keyboard shortcuts to the editor help dialog, gated behind the
|
|
9
|
+
platform_editor_drag_handle_keyboard_a11y experiment
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 8.0.33
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -641,8 +641,46 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
641
641
|
}
|
|
642
642
|
}];
|
|
643
643
|
};
|
|
644
|
-
|
|
644
|
+
|
|
645
|
+
// 'navigation' is used as the type for these entries because Format.type is designed to match ADF
|
|
646
|
+
// schema node/mark names — these shortcuts have no corresponding ADF type, so 'navigation' acts as
|
|
647
|
+
// a catch-all that passes the schema filter and routes entries to the keyboard shortcuts column in the UI.
|
|
648
|
+
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(_ref8) {
|
|
645
649
|
var formatMessage = _ref8.formatMessage;
|
|
650
|
+
return [{
|
|
651
|
+
name: formatMessage(_messages.helpDialogMessages.selectDragHandle),
|
|
652
|
+
type: 'navigation',
|
|
653
|
+
keymap: function keymap() {
|
|
654
|
+
return _keymaps.showElementDragHandle;
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
name: formatMessage(_messages.helpDialogMessages.moveSelectionUp),
|
|
658
|
+
type: 'navigation',
|
|
659
|
+
keymap: function keymap() {
|
|
660
|
+
return _keymaps.dragToMoveUp;
|
|
661
|
+
}
|
|
662
|
+
}, {
|
|
663
|
+
name: formatMessage(_messages.helpDialogMessages.moveSelectionDown),
|
|
664
|
+
type: 'navigation',
|
|
665
|
+
keymap: function keymap() {
|
|
666
|
+
return _keymaps.dragToMoveDown;
|
|
667
|
+
}
|
|
668
|
+
}, {
|
|
669
|
+
name: formatMessage(_messages.helpDialogMessages.moveSelectionLeft),
|
|
670
|
+
type: 'navigation',
|
|
671
|
+
keymap: function keymap() {
|
|
672
|
+
return _keymaps.dragToMoveLeft;
|
|
673
|
+
}
|
|
674
|
+
}, {
|
|
675
|
+
name: formatMessage(_messages.helpDialogMessages.moveSelectionRight),
|
|
676
|
+
type: 'navigation',
|
|
677
|
+
keymap: function keymap() {
|
|
678
|
+
return _keymaps.dragToMoveRight;
|
|
679
|
+
}
|
|
680
|
+
}];
|
|
681
|
+
};
|
|
682
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref9) {
|
|
683
|
+
var formatMessage = _ref9.formatMessage;
|
|
646
684
|
return [{
|
|
647
685
|
name: formatMessage(_messages.tableMessages.moveColumnLeftHelpDialogLabel),
|
|
648
686
|
type: 'table',
|
|
@@ -669,8 +707,8 @@ var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8)
|
|
|
669
707
|
}
|
|
670
708
|
}];
|
|
671
709
|
};
|
|
672
|
-
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(
|
|
673
|
-
var formatMessage =
|
|
710
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref0) {
|
|
711
|
+
var formatMessage = _ref0.formatMessage;
|
|
674
712
|
return [{
|
|
675
713
|
name: formatMessage(_messages.helpDialogMessages.openCellOptions),
|
|
676
714
|
type: 'image',
|
|
@@ -692,8 +730,8 @@ var imageAutoFormat = {
|
|
|
692
730
|
, _messages.helpDialogMessages.altText), "](http://www.image.com)"));
|
|
693
731
|
}
|
|
694
732
|
};
|
|
695
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
696
|
-
var formatMessage =
|
|
733
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref1) {
|
|
734
|
+
var formatMessage = _ref1.formatMessage;
|
|
697
735
|
return {
|
|
698
736
|
name: formatMessage(_messages.helpDialogMessages.quickInsert),
|
|
699
737
|
type: 'quickInsert',
|
|
@@ -709,5 +747,5 @@ var getSupportedFormatting = exports.getSupportedFormatting = function getSuppor
|
|
|
709
747
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
710
748
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
711
749
|
});
|
|
712
|
-
return [].concat((0, _toConsumableArray2.default)(aiEnabled && (0, _experiments.editorExperiment)('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), (0, _toConsumableArray2.default)(navigationKeymaps(intl)), (0, _toConsumableArray2.default)(otherFormatting(intl)), (0, _toConsumableArray2.default)(supportedBySchema), (0, _toConsumableArray2.default)(imageEnabled ? [imageAutoFormat] : []), (0, _toConsumableArray2.default)(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), (0, _toConsumableArray2.default)(focusTableResizeHandleFormatting(intl)), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), (0, _toConsumableArray2.default)(openCellOptionsFormattingtoFormat(intl)), (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
750
|
+
return [].concat((0, _toConsumableArray2.default)(aiEnabled && (0, _experiments.editorExperiment)('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), (0, _toConsumableArray2.default)(navigationKeymaps(intl)), (0, _toConsumableArray2.default)(otherFormatting(intl)), (0, _toConsumableArray2.default)(supportedBySchema), (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) ? blockControlsShortcutsFormatting(intl) : []), (0, _toConsumableArray2.default)(imageEnabled ? [imageAutoFormat] : []), (0, _toConsumableArray2.default)(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), (0, _toConsumableArray2.default)(focusTableResizeHandleFormatting(intl)), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), (0, _toConsumableArray2.default)(openCellOptionsFormattingtoFormat(intl)), (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
713
751
|
};
|
package/dist/cjs/ui/utils.js
CHANGED
|
@@ -43,6 +43,12 @@ var codeSm = (0, _primitives.xcss)({
|
|
|
43
43
|
lineHeight: "var(--ds-space-300, 24px)",
|
|
44
44
|
textAlign: 'center'
|
|
45
45
|
});
|
|
46
|
+
var arrowSymbols = {
|
|
47
|
+
arrowup: '↑',
|
|
48
|
+
arrowdown: '↓',
|
|
49
|
+
arrowleft: '←',
|
|
50
|
+
arrowright: '→'
|
|
51
|
+
};
|
|
46
52
|
var getKeyParts = function getKeyParts(keymap) {
|
|
47
53
|
var browser = (0, _browser.getBrowserInfo)();
|
|
48
54
|
var shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
@@ -112,6 +118,16 @@ var getComponentFromKeymap = exports.getComponentFromKeymap = function getCompon
|
|
|
112
118
|
,
|
|
113
119
|
key: "".concat(keyParts, "-").concat(index)
|
|
114
120
|
}, '⏎');
|
|
121
|
+
} else if (['arrowup', 'arrowdown', 'arrowleft', 'arrowright'].indexOf(part.toLowerCase()) >= 0) {
|
|
122
|
+
return (
|
|
123
|
+
// Ignored via go/ees005
|
|
124
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
125
|
+
(0, _react.jsx)(_primitives.Box, {
|
|
126
|
+
as: "span",
|
|
127
|
+
xcss: codeSm,
|
|
128
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
129
|
+
}, arrowSymbols[part.toLowerCase()])
|
|
130
|
+
);
|
|
115
131
|
}
|
|
116
132
|
return (
|
|
117
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
9
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleSmallText, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
9
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, dragToMoveDown, dragToMoveLeft, dragToMoveRight, dragToMoveUp, focusTableResizer, showElementDragHandle, focusToContextMenuTrigger, increaseMediaSize, insertRule, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleSmallText, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, tableMessages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
12
12
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
@@ -495,6 +495,33 @@ const focusTableResizeHandleFormatting = ({
|
|
|
495
495
|
type: 'navigation',
|
|
496
496
|
keymap: () => focusTableResizer
|
|
497
497
|
}];
|
|
498
|
+
|
|
499
|
+
// 'navigation' is used as the type for these entries because Format.type is designed to match ADF
|
|
500
|
+
// schema node/mark names — these shortcuts have no corresponding ADF type, so 'navigation' acts as
|
|
501
|
+
// a catch-all that passes the schema filter and routes entries to the keyboard shortcuts column in the UI.
|
|
502
|
+
const blockControlsShortcutsFormatting = ({
|
|
503
|
+
formatMessage
|
|
504
|
+
}) => [{
|
|
505
|
+
name: formatMessage(messages.selectDragHandle),
|
|
506
|
+
type: 'navigation',
|
|
507
|
+
keymap: () => showElementDragHandle
|
|
508
|
+
}, {
|
|
509
|
+
name: formatMessage(messages.moveSelectionUp),
|
|
510
|
+
type: 'navigation',
|
|
511
|
+
keymap: () => dragToMoveUp
|
|
512
|
+
}, {
|
|
513
|
+
name: formatMessage(messages.moveSelectionDown),
|
|
514
|
+
type: 'navigation',
|
|
515
|
+
keymap: () => dragToMoveDown
|
|
516
|
+
}, {
|
|
517
|
+
name: formatMessage(messages.moveSelectionLeft),
|
|
518
|
+
type: 'navigation',
|
|
519
|
+
keymap: () => dragToMoveLeft
|
|
520
|
+
}, {
|
|
521
|
+
name: formatMessage(messages.moveSelectionRight),
|
|
522
|
+
type: 'navigation',
|
|
523
|
+
keymap: () => dragToMoveRight
|
|
524
|
+
}];
|
|
498
525
|
const moveTableRowColumnFormatting = ({
|
|
499
526
|
formatMessage
|
|
500
527
|
}) => [{
|
|
@@ -544,5 +571,5 @@ const quickInsertAutoFormat = ({
|
|
|
544
571
|
});
|
|
545
572
|
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled, aiEnabled) => {
|
|
546
573
|
const supportedBySchema = formatting(intl).filter(format => schema.nodes[format.type] || schema.marks[format.type]);
|
|
547
|
-
return [...(aiEnabled && editorExperiment('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), ...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...(editorExperiment('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), ...openCellOptionsFormattingtoFormat(intl), ...(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : [])];
|
|
574
|
+
return [...(aiEnabled && editorExperiment('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), ...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(expValEquals('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) ? blockControlsShortcutsFormatting(intl) : []), ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...(editorExperiment('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), ...openCellOptionsFormattingtoFormat(intl), ...(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : [])];
|
|
548
575
|
};
|
package/dist/es2019/ui/utils.js
CHANGED
|
@@ -35,6 +35,12 @@ const codeSm = xcss({
|
|
|
35
35
|
lineHeight: "var(--ds-space-300, 24px)",
|
|
36
36
|
textAlign: 'center'
|
|
37
37
|
});
|
|
38
|
+
const arrowSymbols = {
|
|
39
|
+
arrowup: '↑',
|
|
40
|
+
arrowdown: '↓',
|
|
41
|
+
arrowleft: '←',
|
|
42
|
+
arrowright: '→'
|
|
43
|
+
};
|
|
38
44
|
const getKeyParts = keymap => {
|
|
39
45
|
const browser = getBrowserInfo();
|
|
40
46
|
let shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
@@ -104,6 +110,16 @@ export const getComponentFromKeymap = keymap => {
|
|
|
104
110
|
,
|
|
105
111
|
key: `${keyParts}-${index}`
|
|
106
112
|
}, '⏎');
|
|
113
|
+
} else if (['arrowup', 'arrowdown', 'arrowleft', 'arrowright'].indexOf(part.toLowerCase()) >= 0) {
|
|
114
|
+
return (
|
|
115
|
+
// Ignored via go/ees005
|
|
116
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
117
|
+
jsx(Box, {
|
|
118
|
+
as: "span",
|
|
119
|
+
xcss: codeSm,
|
|
120
|
+
key: `${keyParts}-${index}`
|
|
121
|
+
}, arrowSymbols[part.toLowerCase()])
|
|
122
|
+
);
|
|
107
123
|
}
|
|
108
124
|
return (
|
|
109
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -7,7 +7,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
9
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleSmallText, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
10
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, dragToMoveDown, dragToMoveLeft, dragToMoveRight, dragToMoveUp, focusTableResizer, showElementDragHandle, focusToContextMenuTrigger, increaseMediaSize, insertRule, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleSmallText, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
11
11
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, tableMessages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
13
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
@@ -632,8 +632,46 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
632
632
|
}
|
|
633
633
|
}];
|
|
634
634
|
};
|
|
635
|
-
|
|
635
|
+
|
|
636
|
+
// 'navigation' is used as the type for these entries because Format.type is designed to match ADF
|
|
637
|
+
// schema node/mark names — these shortcuts have no corresponding ADF type, so 'navigation' acts as
|
|
638
|
+
// a catch-all that passes the schema filter and routes entries to the keyboard shortcuts column in the UI.
|
|
639
|
+
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(_ref8) {
|
|
636
640
|
var formatMessage = _ref8.formatMessage;
|
|
641
|
+
return [{
|
|
642
|
+
name: formatMessage(messages.selectDragHandle),
|
|
643
|
+
type: 'navigation',
|
|
644
|
+
keymap: function keymap() {
|
|
645
|
+
return showElementDragHandle;
|
|
646
|
+
}
|
|
647
|
+
}, {
|
|
648
|
+
name: formatMessage(messages.moveSelectionUp),
|
|
649
|
+
type: 'navigation',
|
|
650
|
+
keymap: function keymap() {
|
|
651
|
+
return dragToMoveUp;
|
|
652
|
+
}
|
|
653
|
+
}, {
|
|
654
|
+
name: formatMessage(messages.moveSelectionDown),
|
|
655
|
+
type: 'navigation',
|
|
656
|
+
keymap: function keymap() {
|
|
657
|
+
return dragToMoveDown;
|
|
658
|
+
}
|
|
659
|
+
}, {
|
|
660
|
+
name: formatMessage(messages.moveSelectionLeft),
|
|
661
|
+
type: 'navigation',
|
|
662
|
+
keymap: function keymap() {
|
|
663
|
+
return dragToMoveLeft;
|
|
664
|
+
}
|
|
665
|
+
}, {
|
|
666
|
+
name: formatMessage(messages.moveSelectionRight),
|
|
667
|
+
type: 'navigation',
|
|
668
|
+
keymap: function keymap() {
|
|
669
|
+
return dragToMoveRight;
|
|
670
|
+
}
|
|
671
|
+
}];
|
|
672
|
+
};
|
|
673
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref9) {
|
|
674
|
+
var formatMessage = _ref9.formatMessage;
|
|
637
675
|
return [{
|
|
638
676
|
name: formatMessage(tableMessages.moveColumnLeftHelpDialogLabel),
|
|
639
677
|
type: 'table',
|
|
@@ -660,8 +698,8 @@ var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8)
|
|
|
660
698
|
}
|
|
661
699
|
}];
|
|
662
700
|
};
|
|
663
|
-
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(
|
|
664
|
-
var formatMessage =
|
|
701
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref0) {
|
|
702
|
+
var formatMessage = _ref0.formatMessage;
|
|
665
703
|
return [{
|
|
666
704
|
name: formatMessage(messages.openCellOptions),
|
|
667
705
|
type: 'image',
|
|
@@ -683,8 +721,8 @@ var imageAutoFormat = {
|
|
|
683
721
|
, messages.altText), "](http://www.image.com)"));
|
|
684
722
|
}
|
|
685
723
|
};
|
|
686
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
687
|
-
var formatMessage =
|
|
724
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref1) {
|
|
725
|
+
var formatMessage = _ref1.formatMessage;
|
|
688
726
|
return {
|
|
689
727
|
name: formatMessage(messages.quickInsert),
|
|
690
728
|
type: 'quickInsert',
|
|
@@ -700,5 +738,5 @@ export var getSupportedFormatting = function getSupportedFormatting(schema, intl
|
|
|
700
738
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
701
739
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
702
740
|
});
|
|
703
|
-
return [].concat(_toConsumableArray(aiEnabled && editorExperiment('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), _toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(editorExperiment('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), _toConsumableArray(openCellOptionsFormattingtoFormat(intl)), _toConsumableArray(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
741
|
+
return [].concat(_toConsumableArray(aiEnabled && editorExperiment('platform_editor_ai_quickstart_command', true) ? [quickInsertAskAI(intl)] : []), _toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(expValEquals('platform_editor_drag_handle_keyboard_a11y', 'isEnabled', true) ? blockControlsShortcutsFormatting(intl) : []), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(editorExperiment('platform_editor_breakout_resizing', true) ? newResizeInformationFormatting(intl) : resizeInformationFormatting(intl)), _toConsumableArray(openCellOptionsFormattingtoFormat(intl)), _toConsumableArray(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
704
742
|
};
|
package/dist/esm/ui/utils.js
CHANGED
|
@@ -35,6 +35,12 @@ var codeSm = xcss({
|
|
|
35
35
|
lineHeight: "var(--ds-space-300, 24px)",
|
|
36
36
|
textAlign: 'center'
|
|
37
37
|
});
|
|
38
|
+
var arrowSymbols = {
|
|
39
|
+
arrowup: '↑',
|
|
40
|
+
arrowdown: '↓',
|
|
41
|
+
arrowleft: '←',
|
|
42
|
+
arrowright: '→'
|
|
43
|
+
};
|
|
38
44
|
var getKeyParts = function getKeyParts(keymap) {
|
|
39
45
|
var browser = getBrowserInfo();
|
|
40
46
|
var shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
@@ -104,6 +110,16 @@ export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
|
104
110
|
,
|
|
105
111
|
key: "".concat(keyParts, "-").concat(index)
|
|
106
112
|
}, '⏎');
|
|
113
|
+
} else if (['arrowup', 'arrowdown', 'arrowleft', 'arrowright'].indexOf(part.toLowerCase()) >= 0) {
|
|
114
|
+
return (
|
|
115
|
+
// Ignored via go/ees005
|
|
116
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
117
|
+
jsx(Box, {
|
|
118
|
+
as: "span",
|
|
119
|
+
xcss: codeSm,
|
|
120
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
121
|
+
}, arrowSymbols[part.toLowerCase()])
|
|
122
|
+
);
|
|
107
123
|
}
|
|
108
124
|
return (
|
|
109
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
33
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
32
|
+
"@atlaskit/editor-plugin-analytics": "^9.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-quick-insert": "^9.0.0",
|
|
34
34
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
35
35
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
36
36
|
"@atlaskit/heading": "^5.4.0",
|
|
37
|
-
"@atlaskit/icon": "^34.
|
|
37
|
+
"@atlaskit/icon": "^34.2.0",
|
|
38
38
|
"@atlaskit/modal-dialog": "^14.15.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^19.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^62.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^62.4.0",
|
|
42
42
|
"@atlaskit/tokens": "^13.0.0",
|
|
43
43
|
"@atlaskit/tooltip": "^21.1.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@testing-library/react": "^16.3.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^
|
|
53
|
+
"@atlaskit/editor-common": "^113.0.0",
|
|
54
54
|
"react": "^18.2.0"
|
|
55
55
|
},
|
|
56
56
|
"techstack": {
|