@atlaskit/editor-plugin-help-dialog 7.1.18 → 7.2.1
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 +17 -0
- package/dist/cjs/ui/formatting.js +32 -4
- package/dist/es2019/ui/formatting.js +22 -3
- package/dist/esm/ui/formatting.js +34 -6
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 7.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`edfa57e62aec0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edfa57e62aec0) -
|
|
14
|
+
Add table move column/row keyboard shortcuts
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 7.1.18
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -635,8 +635,36 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
635
635
|
}
|
|
636
636
|
}];
|
|
637
637
|
};
|
|
638
|
-
var
|
|
638
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
|
|
639
639
|
var formatMessage = _ref8.formatMessage;
|
|
640
|
+
return [{
|
|
641
|
+
name: formatMessage(_messages.tableMessages.moveColumnLeftHelpDialogLabel),
|
|
642
|
+
type: 'table',
|
|
643
|
+
keymap: function keymap() {
|
|
644
|
+
return _keymaps.moveColumnLeft;
|
|
645
|
+
}
|
|
646
|
+
}, {
|
|
647
|
+
name: formatMessage(_messages.tableMessages.moveColumnRightHelpDialogLabel),
|
|
648
|
+
type: 'table',
|
|
649
|
+
keymap: function keymap() {
|
|
650
|
+
return _keymaps.moveColumnRight;
|
|
651
|
+
}
|
|
652
|
+
}, {
|
|
653
|
+
name: formatMessage(_messages.tableMessages.moveRowUpHelpDialogLabel),
|
|
654
|
+
type: 'table',
|
|
655
|
+
keymap: function keymap() {
|
|
656
|
+
return _keymaps.moveRowUp;
|
|
657
|
+
}
|
|
658
|
+
}, {
|
|
659
|
+
name: formatMessage(_messages.tableMessages.moveRowDownHelpDialogLabel),
|
|
660
|
+
type: 'table',
|
|
661
|
+
keymap: function keymap() {
|
|
662
|
+
return _keymaps.moveRowDown;
|
|
663
|
+
}
|
|
664
|
+
}];
|
|
665
|
+
};
|
|
666
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref9) {
|
|
667
|
+
var formatMessage = _ref9.formatMessage;
|
|
640
668
|
return [{
|
|
641
669
|
name: formatMessage(_messages.helpDialogMessages.openCellOptions),
|
|
642
670
|
type: 'image',
|
|
@@ -658,8 +686,8 @@ var imageAutoFormat = {
|
|
|
658
686
|
, _messages.helpDialogMessages.altText), "](http://www.image.com)"));
|
|
659
687
|
}
|
|
660
688
|
};
|
|
661
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
662
|
-
var formatMessage =
|
|
689
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref0) {
|
|
690
|
+
var formatMessage = _ref0.formatMessage;
|
|
663
691
|
return {
|
|
664
692
|
name: formatMessage(_messages.helpDialogMessages.quickInsert),
|
|
665
693
|
type: 'quickInsert',
|
|
@@ -675,5 +703,5 @@ var getSupportedFormatting = exports.getSupportedFormatting = function getSuppor
|
|
|
675
703
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
676
704
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
677
705
|
});
|
|
678
|
-
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)));
|
|
706
|
+
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) : []));
|
|
679
707
|
};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
9
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
10
|
-
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
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, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
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';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -491,6 +491,25 @@ const focusTableResizeHandleFormatting = ({
|
|
|
491
491
|
type: 'navigation',
|
|
492
492
|
keymap: () => focusTableResizer
|
|
493
493
|
}];
|
|
494
|
+
const moveTableRowColumnFormatting = ({
|
|
495
|
+
formatMessage
|
|
496
|
+
}) => [{
|
|
497
|
+
name: formatMessage(tableMessages.moveColumnLeftHelpDialogLabel),
|
|
498
|
+
type: 'table',
|
|
499
|
+
keymap: () => moveColumnLeft
|
|
500
|
+
}, {
|
|
501
|
+
name: formatMessage(tableMessages.moveColumnRightHelpDialogLabel),
|
|
502
|
+
type: 'table',
|
|
503
|
+
keymap: () => moveColumnRight
|
|
504
|
+
}, {
|
|
505
|
+
name: formatMessage(tableMessages.moveRowUpHelpDialogLabel),
|
|
506
|
+
type: 'table',
|
|
507
|
+
keymap: () => moveRowUp
|
|
508
|
+
}, {
|
|
509
|
+
name: formatMessage(tableMessages.moveRowDownHelpDialogLabel),
|
|
510
|
+
type: 'table',
|
|
511
|
+
keymap: () => moveRowDown
|
|
512
|
+
}];
|
|
494
513
|
const openCellOptionsFormattingtoFormat = ({
|
|
495
514
|
formatMessage
|
|
496
515
|
}) => [{
|
|
@@ -521,5 +540,5 @@ const quickInsertAutoFormat = ({
|
|
|
521
540
|
});
|
|
522
541
|
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled, aiEnabled) => {
|
|
523
542
|
const supportedBySchema = formatting(intl).filter(format => schema.nodes[format.type] || schema.marks[format.type]);
|
|
524
|
-
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)];
|
|
543
|
+
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) : [])];
|
|
525
544
|
};
|
|
@@ -7,8 +7,8 @@ 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 { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
11
|
-
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
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, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
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';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -626,8 +626,36 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
626
626
|
}
|
|
627
627
|
}];
|
|
628
628
|
};
|
|
629
|
-
var
|
|
629
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
|
|
630
630
|
var formatMessage = _ref8.formatMessage;
|
|
631
|
+
return [{
|
|
632
|
+
name: formatMessage(tableMessages.moveColumnLeftHelpDialogLabel),
|
|
633
|
+
type: 'table',
|
|
634
|
+
keymap: function keymap() {
|
|
635
|
+
return moveColumnLeft;
|
|
636
|
+
}
|
|
637
|
+
}, {
|
|
638
|
+
name: formatMessage(tableMessages.moveColumnRightHelpDialogLabel),
|
|
639
|
+
type: 'table',
|
|
640
|
+
keymap: function keymap() {
|
|
641
|
+
return moveColumnRight;
|
|
642
|
+
}
|
|
643
|
+
}, {
|
|
644
|
+
name: formatMessage(tableMessages.moveRowUpHelpDialogLabel),
|
|
645
|
+
type: 'table',
|
|
646
|
+
keymap: function keymap() {
|
|
647
|
+
return moveRowUp;
|
|
648
|
+
}
|
|
649
|
+
}, {
|
|
650
|
+
name: formatMessage(tableMessages.moveRowDownHelpDialogLabel),
|
|
651
|
+
type: 'table',
|
|
652
|
+
keymap: function keymap() {
|
|
653
|
+
return moveRowDown;
|
|
654
|
+
}
|
|
655
|
+
}];
|
|
656
|
+
};
|
|
657
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref9) {
|
|
658
|
+
var formatMessage = _ref9.formatMessage;
|
|
631
659
|
return [{
|
|
632
660
|
name: formatMessage(messages.openCellOptions),
|
|
633
661
|
type: 'image',
|
|
@@ -649,8 +677,8 @@ var imageAutoFormat = {
|
|
|
649
677
|
, messages.altText), "](http://www.image.com)"));
|
|
650
678
|
}
|
|
651
679
|
};
|
|
652
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
653
|
-
var formatMessage =
|
|
680
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref0) {
|
|
681
|
+
var formatMessage = _ref0.formatMessage;
|
|
654
682
|
return {
|
|
655
683
|
name: formatMessage(messages.quickInsert),
|
|
656
684
|
type: 'quickInsert',
|
|
@@ -666,5 +694,5 @@ export var getSupportedFormatting = function getSupportedFormatting(schema, intl
|
|
|
666
694
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
667
695
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
668
696
|
});
|
|
669
|
-
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)));
|
|
697
|
+
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) : []));
|
|
670
698
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "7.1
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
35
35
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
36
36
|
"@atlaskit/heading": "^5.3.0",
|
|
37
|
-
"@atlaskit/icon": "^
|
|
38
|
-
"@atlaskit/modal-dialog": "^14.
|
|
37
|
+
"@atlaskit/icon": "^32.0.0",
|
|
38
|
+
"@atlaskit/modal-dialog": "^14.11.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^18.0.0",
|
|
41
41
|
"@atlaskit/theme": "^21.0.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^29.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^29.6.0",
|
|
43
43
|
"@atlaskit/tokens": "^11.0.0",
|
|
44
44
|
"@atlaskit/tooltip": "^20.14.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/react": "^16.3.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^111.
|
|
54
|
+
"@atlaskit/editor-common": "^111.20.0",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|
|
57
57
|
"techstack": {
|