@atlaskit/editor-plugin-help-dialog 8.0.33 → 10.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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # @atlaskit/editor-plugin-help-dialog
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`901c87a57486e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/901c87a57486e) -
8
+ Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
9
+
10
+ What changed: The `react-intl-next` npm alias (which resolved to `react-intl@^5`) has been
11
+ removed. All imports now reference `react-intl` directly, and `peerDependencies` have been updated
12
+ to `"^5.25.1 || ^6.0.0 || ^7.0.0"`.
13
+
14
+ How consumer should update their code: Ensure `react-intl` is installed at a version satisfying
15
+ `^5.25.1 || ^6.0.0 || ^7.0.0`. If your application was using `react-intl-next` as an npm alias, it
16
+ can be safely removed. Replace any remaining `react-intl-next` imports with `react-intl`.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 9.0.0
23
+
24
+ ### Patch Changes
25
+
26
+ - [`d15da1c489b34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d15da1c489b34) -
27
+ Add drag handle and move selection keyboard shortcuts to the editor help dialog, gated behind the
28
+ platform_editor_drag_handle_keyboard_a11y experiment
29
+ - Updated dependencies
30
+
3
31
  ## 8.0.33
4
32
 
5
33
  ### Patch Changes
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.ModalContent = void 0;
8
8
  var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
- var _reactIntlNext = require("react-intl-next");
10
+ var _reactIntl = require("react-intl");
11
11
  var _browser = require("@atlaskit/editor-common/browser");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
@@ -29,7 +29,7 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
29
29
  var formatting = _ref.formatting,
30
30
  onClose = _ref.onClose;
31
31
  var browser = (0, _browser.getBrowserInfo)();
32
- var intl = (0, _reactIntlNext.useIntl)();
32
+ var intl = (0, _reactIntl.useIntl)();
33
33
  var isA11yFixEnabled = (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true);
34
34
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ModalHeader.default, {
35
35
  onClose: onClose
@@ -47,7 +47,7 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
47
47
  css: _styles.column
48
48
  }, (0, _react2.jsx)(_heading.default, {
49
49
  size: "medium"
50
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
50
+ }, (0, _react2.jsx)(_reactIntl.FormattedMessage
51
51
  // Ignored via go/ees005
52
52
  // eslint-disable-next-line react/jsx-props-no-spreading
53
53
  , _messages.helpDialogMessages.keyboardShortcuts)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
@@ -85,7 +85,7 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
85
85
  css: _styles.column
86
86
  }, (0, _react2.jsx)(_heading.default, {
87
87
  size: "medium"
88
- }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
88
+ }, (0, _react2.jsx)(_reactIntl.FormattedMessage
89
89
  // Ignored via go/ees005
90
90
  // eslint-disable-next-line react/jsx-props-no-spreading
91
91
  , _messages.helpDialogMessages.markdown)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = require("@emotion/react");
10
- var _reactIntlNext = require("react-intl-next");
10
+ var _reactIntl = require("react-intl");
11
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _styles = require("./styles");
@@ -23,7 +23,7 @@ var ModalFooter = function ModalFooter() {
23
23
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
24
24
  (0, _react.jsx)("div", {
25
25
  css: _styles.footer
26
- }, (0, _react.jsx)(_reactIntlNext.FormattedMessage
26
+ }, (0, _react.jsx)(_reactIntl.FormattedMessage
27
27
  // Ignored via go/ees005
28
28
  // eslint-disable-next-line react/jsx-props-no-spreading
29
29
  , (0, _extends2.default)({}, _messages.helpDialogMessages.helpDialogTips, {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _reactIntlNext = require("react-intl-next");
9
+ var _reactIntl = require("react-intl");
10
10
  var _messages = require("@atlaskit/editor-common/messages");
11
11
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
12
12
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
@@ -30,7 +30,7 @@ var toolbarFocusStyles = (0, _react.css)({
30
30
  outlineOffset: "var(--ds-space-025, 2px)"
31
31
  }
32
32
  });
33
- var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
33
+ var ModalHeader = (0, _reactIntl.injectIntl)(function (_ref) {
34
34
  var formatMessage = _ref.intl.formatMessage,
35
35
  onClose = _ref.onClose;
36
36
  return (
@@ -39,7 +39,7 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
39
39
  css: _styles.header
40
40
  }, (0, _react.jsx)(_heading.default, {
41
41
  size: "large"
42
- }, (0, _react.jsx)(_reactIntlNext.FormattedMessage
42
+ }, (0, _react.jsx)(_reactIntl.FormattedMessage
43
43
  // Ignored via go/ees005
44
44
  // eslint-disable-next-line react/jsx-props-no-spreading
45
45
  , _messages.helpDialogMessages.editorHelp)), onClose ? (0, _react.jsx)("div", {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getSupportedFormatting = exports.formatting = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _react = require("@emotion/react");
10
- var _reactIntlNext = require("react-intl-next");
10
+ var _reactIntl = require("react-intl");
11
11
  var _browser = require("@atlaskit/editor-common/browser");
12
12
  var _keymaps = require("@atlaskit/editor-common/keymaps");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
@@ -78,7 +78,7 @@ var formatting = exports.formatting = function formatting(_ref2) {
78
78
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
79
79
  as: "span",
80
80
  xcss: codeLg
81
- }, "**", (0, _react.jsx)(_reactIntlNext.FormattedMessage
81
+ }, "**", (0, _react.jsx)(_reactIntl.FormattedMessage
82
82
  // Ignored via go/ees005
83
83
  // eslint-disable-next-line react/jsx-props-no-spreading
84
84
  , _messages.toolbarMessages.bold), "**"));
@@ -93,7 +93,7 @@ var formatting = exports.formatting = function formatting(_ref2) {
93
93
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
94
94
  as: "span",
95
95
  xcss: codeLg
96
- }, "*", (0, _react.jsx)(_reactIntlNext.FormattedMessage
96
+ }, "*", (0, _react.jsx)(_reactIntl.FormattedMessage
97
97
  // Ignored via go/ees005
98
98
  // eslint-disable-next-line react/jsx-props-no-spreading
99
99
  , _messages.toolbarMessages.italic), "*"));
@@ -114,7 +114,7 @@ var formatting = exports.formatting = function formatting(_ref2) {
114
114
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
115
115
  as: "span",
116
116
  xcss: codeLg
117
- }, "~~", (0, _react.jsx)(_reactIntlNext.FormattedMessage
117
+ }, "~~", (0, _react.jsx)(_reactIntl.FormattedMessage
118
118
  // Ignored via go/ees005
119
119
  // eslint-disable-next-line react/jsx-props-no-spreading
120
120
  , _messages.toolbarMessages.strike), "~~"));
@@ -309,7 +309,7 @@ var formatting = exports.formatting = function formatting(_ref2) {
309
309
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
310
310
  as: "span",
311
311
  xcss: codeLg
312
- }, "[", (0, _react.jsx)(_reactIntlNext.FormattedMessage
312
+ }, "[", (0, _react.jsx)(_reactIntl.FormattedMessage
313
313
  // Ignored via go/ees005
314
314
  // eslint-disable-next-line react/jsx-props-no-spreading
315
315
  , _messages.toolbarInsertBlockMessages.link), "](http://a.com)"));
@@ -324,7 +324,7 @@ var formatting = exports.formatting = function formatting(_ref2) {
324
324
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
325
325
  as: "span",
326
326
  xcss: codeLg
327
- }, "`", (0, _react.jsx)(_reactIntlNext.FormattedMessage
327
+ }, "`", (0, _react.jsx)(_reactIntl.FormattedMessage
328
328
  // Ignored via go/ees005
329
329
  // eslint-disable-next-line react/jsx-props-no-spreading
330
330
  , _messages.toolbarMessages.code), "`"));
@@ -641,8 +641,46 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
641
641
  }
642
642
  }];
643
643
  };
644
- var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
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(_ref9) {
673
- var formatMessage = _ref9.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',
@@ -686,14 +724,14 @@ var imageAutoFormat = {
686
724
  return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
687
725
  as: "span",
688
726
  xcss: codeLg
689
- }, "![", (0, _react.jsx)(_reactIntlNext.FormattedMessage
727
+ }, "![", (0, _react.jsx)(_reactIntl.FormattedMessage
690
728
  // Ignored via go/ees005
691
729
  // eslint-disable-next-line react/jsx-props-no-spreading
692
730
  , _messages.helpDialogMessages.altText), "](http://www.image.com)"));
693
731
  }
694
732
  };
695
- var quickInsertAutoFormat = function quickInsertAutoFormat(_ref0) {
696
- var formatMessage = _ref0.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
  };
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
- var _reactIntlNext = require("react-intl-next");
11
+ var _reactIntl = require("react-intl");
12
12
  var _hooks = require("@atlaskit/editor-common/hooks");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
@@ -71,5 +71,5 @@ var HelpDialog = function HelpDialog(_ref) {
71
71
  formatting: formatting
72
72
  })) : null);
73
73
  };
74
- var _default_1 = (0, _reactIntlNext.injectIntl)(HelpDialog);
74
+ var _default_1 = (0, _reactIntl.injectIntl)(HelpDialog);
75
75
  var _default = exports.default = _default_1;
@@ -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
@@ -7,7 +7,7 @@ import { Fragment } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { jsx } from '@emotion/react';
10
- import { FormattedMessage, useIntl } from 'react-intl-next';
10
+ import { FormattedMessage, useIntl } from 'react-intl';
11
11
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import Heading from '@atlaskit/heading';
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { jsx } from '@emotion/react';
8
- import { FormattedMessage } from 'react-intl-next';
8
+ import { FormattedMessage } from 'react-intl';
9
9
  import { openHelp } from '@atlaskit/editor-common/keymaps';
10
10
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
11
11
  import { footer } from './styles';
@@ -5,7 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx, css } from '@emotion/react';
8
- import { FormattedMessage, injectIntl } from 'react-intl-next';
8
+ import { FormattedMessage, injectIntl } from 'react-intl';
9
9
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
11
11
  import Heading from '@atlaskit/heading';
@@ -4,9 +4,9 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { jsx } from '@emotion/react';
7
- import { FormattedMessage } from 'react-intl-next';
7
+ import { FormattedMessage } from 'react-intl';
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
  };
@@ -6,7 +6,7 @@ import { useCallback, useEffect } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { injectIntl } from 'react-intl-next';
9
+ import { injectIntl } from 'react-intl';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
11
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
12
12
  import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
@@ -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 { Fragment } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { jsx } from '@emotion/react';
10
- import { FormattedMessage, useIntl } from 'react-intl-next';
10
+ import { FormattedMessage, useIntl } from 'react-intl';
11
11
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import Heading from '@atlaskit/heading';
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { jsx } from '@emotion/react';
8
- import { FormattedMessage } from 'react-intl-next';
8
+ import { FormattedMessage } from 'react-intl';
9
9
  import { openHelp } from '@atlaskit/editor-common/keymaps';
10
10
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
11
11
  import { footer } from './styles';
@@ -5,7 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx, css } from '@emotion/react';
8
- import { FormattedMessage, injectIntl } from 'react-intl-next';
8
+ import { FormattedMessage, injectIntl } from 'react-intl';
9
9
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
11
11
  import Heading from '@atlaskit/heading';
@@ -5,9 +5,9 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
- import { FormattedMessage } from 'react-intl-next';
8
+ import { FormattedMessage } from 'react-intl';
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
- var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
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(_ref9) {
664
- var formatMessage = _ref9.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(_ref0) {
687
- var formatMessage = _ref0.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
  };
@@ -6,7 +6,7 @@ import { useCallback, useEffect } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { injectIntl } from 'react-intl-next';
9
+ import { injectIntl } from 'react-intl';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
11
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
12
12
  import AkModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';
@@ -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
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type { ComponentType, FC } from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import { type OnCloseHandler } from '@atlaskit/modal-dialog';
8
8
  interface ModalHeaderProps extends WrappedComponentProps {
9
9
  onClose: OnCloseHandler | undefined;
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Format } from './Format';
4
4
  export declare const formatting: (intl: IntlShape) => Format[];
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ComponentType, type FC } from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { HelpDialogPlugin } from '../helpDialogPluginType';
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type { ComponentType, FC } from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import { type OnCloseHandler } from '@atlaskit/modal-dialog';
8
8
  interface ModalHeaderProps extends WrappedComponentProps {
9
9
  onClose: OnCloseHandler | undefined;
@@ -1,4 +1,4 @@
1
- import type { IntlShape } from 'react-intl-next';
1
+ import type { IntlShape } from 'react-intl';
2
2
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { Format } from './Format';
4
4
  export declare const formatting: (intl: IntlShape) => Format[];
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ComponentType, type FC } from 'react';
6
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
6
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { HelpDialogPlugin } from '../helpDialogPluginType';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-help-dialog",
3
- "version": "8.0.33",
3
+ "version": "10.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,29 +29,30 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/editor-plugin-analytics": "^8.0.0",
33
- "@atlaskit/editor-plugin-quick-insert": "^8.0.0",
32
+ "@atlaskit/editor-plugin-analytics": "^10.0.0",
33
+ "@atlaskit/editor-plugin-quick-insert": "^10.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.1.0",
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.0.0",
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",
45
45
  "@emotion/react": "^11.7.1",
46
- "react-intl-next": "npm:react-intl@^5.18.1",
47
46
  "react-loadable": "^5.1.0"
48
47
  },
49
48
  "devDependencies": {
50
- "@testing-library/react": "^16.3.0"
49
+ "@testing-library/react": "^16.3.0",
50
+ "react-intl": "^6.6.2"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^112.21.0",
54
- "react": "^18.2.0"
53
+ "@atlaskit/editor-common": "^114.0.0",
54
+ "react": "^18.2.0",
55
+ "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
55
56
  },
56
57
  "techstack": {
57
58
  "@atlassian/frontend": {