@atlaskit/editor-plugin-help-dialog 1.2.14 → 1.3.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 +20 -0
- package/dist/cjs/ui/formatting.js +13 -3
- package/dist/es2019/ui/formatting.js +9 -2
- package/dist/esm/ui/formatting.js +14 -4
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#120893](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120893)
|
|
8
|
+
[`67a22e5eb05a2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/67a22e5eb05a2) -
|
|
9
|
+
[ux] [ECA11Y-113] This change adds the keyboard shortcut (Shift+F10) to the Cell Options Tooltip
|
|
10
|
+
and to the Editor Help dialog. This change is behind the `platform_editor_a11y_table_context_menu`
|
|
11
|
+
feature flag.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 1.2.15
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 1.2.14
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -542,6 +542,16 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
542
542
|
}
|
|
543
543
|
}];
|
|
544
544
|
};
|
|
545
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref6) {
|
|
546
|
+
var formatMessage = _ref6.formatMessage;
|
|
547
|
+
return [{
|
|
548
|
+
name: formatMessage(_messages.helpDialogMessages.openCellOptions),
|
|
549
|
+
type: 'image',
|
|
550
|
+
keymap: function keymap() {
|
|
551
|
+
return _keymaps.focusToContextMenuTrigger;
|
|
552
|
+
}
|
|
553
|
+
}];
|
|
554
|
+
};
|
|
545
555
|
var imageAutoFormat = {
|
|
546
556
|
name: 'Image',
|
|
547
557
|
type: 'image',
|
|
@@ -551,8 +561,8 @@ var imageAutoFormat = {
|
|
|
551
561
|
}, ""));
|
|
552
562
|
}
|
|
553
563
|
};
|
|
554
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
555
|
-
var formatMessage =
|
|
564
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
565
|
+
var formatMessage = _ref7.formatMessage;
|
|
556
566
|
return {
|
|
557
567
|
name: formatMessage(_messages.helpDialogMessages.quickInsert),
|
|
558
568
|
type: 'quickInsert',
|
|
@@ -567,5 +577,5 @@ var getSupportedFormatting = exports.getSupportedFormatting = function getSuppor
|
|
|
567
577
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
568
578
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
569
579
|
});
|
|
570
|
-
return [].concat((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)(resizeInformationFormatting(intl)));
|
|
580
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_a11y_table_context_menu') ? [].concat((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)(resizeInformationFormatting(intl)), (0, _toConsumableArray2.default)(openCellOptionsFormattingtoFormat(intl))) : [].concat((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)(resizeInformationFormatting(intl)));
|
|
571
581
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, 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';
|
|
5
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, 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';
|
|
6
6
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -399,6 +399,13 @@ const focusTableResizeHandleFormatting = ({
|
|
|
399
399
|
type: 'navigation',
|
|
400
400
|
keymap: () => focusTableResizer
|
|
401
401
|
}];
|
|
402
|
+
const openCellOptionsFormattingtoFormat = ({
|
|
403
|
+
formatMessage
|
|
404
|
+
}) => [{
|
|
405
|
+
name: formatMessage(messages.openCellOptions),
|
|
406
|
+
type: 'image',
|
|
407
|
+
keymap: () => focusToContextMenuTrigger
|
|
408
|
+
}];
|
|
402
409
|
const imageAutoFormat = {
|
|
403
410
|
name: 'Image',
|
|
404
411
|
type: 'image',
|
|
@@ -417,5 +424,5 @@ const quickInsertAutoFormat = ({
|
|
|
417
424
|
});
|
|
418
425
|
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled) => {
|
|
419
426
|
const supportedBySchema = formatting(intl).filter(format => schema.nodes[format.type] || schema.marks[format.type]);
|
|
420
|
-
return [...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...resizeInformationFormatting(intl)];
|
|
427
|
+
return fg('platform_editor_a11y_table_context_menu') ? [...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...resizeInformationFormatting(intl), ...openCellOptionsFormattingtoFormat(intl)] : [...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...resizeInformationFormatting(intl)];
|
|
421
428
|
};
|
|
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, 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';
|
|
6
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redo, 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';
|
|
7
7
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -534,6 +534,16 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
534
534
|
}
|
|
535
535
|
}];
|
|
536
536
|
};
|
|
537
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref6) {
|
|
538
|
+
var formatMessage = _ref6.formatMessage;
|
|
539
|
+
return [{
|
|
540
|
+
name: formatMessage(messages.openCellOptions),
|
|
541
|
+
type: 'image',
|
|
542
|
+
keymap: function keymap() {
|
|
543
|
+
return focusToContextMenuTrigger;
|
|
544
|
+
}
|
|
545
|
+
}];
|
|
546
|
+
};
|
|
537
547
|
var imageAutoFormat = {
|
|
538
548
|
name: 'Image',
|
|
539
549
|
type: 'image',
|
|
@@ -543,8 +553,8 @@ var imageAutoFormat = {
|
|
|
543
553
|
}, ""));
|
|
544
554
|
}
|
|
545
555
|
};
|
|
546
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
547
|
-
var formatMessage =
|
|
556
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
557
|
+
var formatMessage = _ref7.formatMessage;
|
|
548
558
|
return {
|
|
549
559
|
name: formatMessage(messages.quickInsert),
|
|
550
560
|
type: 'quickInsert',
|
|
@@ -559,5 +569,5 @@ export var getSupportedFormatting = function getSupportedFormatting(schema, intl
|
|
|
559
569
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
560
570
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
561
571
|
});
|
|
562
|
-
return [].concat(_toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(resizeInformationFormatting(intl)));
|
|
572
|
+
return fg('platform_editor_a11y_table_context_menu') ? [].concat(_toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(resizeInformationFormatting(intl)), _toConsumableArray(openCellOptionsFormattingtoFormat(intl))) : [].concat(_toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(resizeInformationFormatting(intl)));
|
|
563
573
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^86.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-quick-insert": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
43
|
"@atlaskit/theme": "^12.11.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
44
|
+
"@atlaskit/tokens": "^1.55.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
47
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
@@ -86,6 +86,9 @@
|
|
|
86
86
|
"platform-feature-flags": {
|
|
87
87
|
"platform.editor.a11y-help-dialog-shortcut-keys-position_aghfg": {
|
|
88
88
|
"type": "boolean"
|
|
89
|
+
},
|
|
90
|
+
"platform_editor_a11y_table_context_menu": {
|
|
91
|
+
"type": "boolean"
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
}
|