@atlaskit/editor-plugin-help-dialog 1.9.11 → 1.9.13
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 +12 -0
- package/dist/cjs/pm-plugins/keymap.js +4 -1
- package/dist/cjs/ui/ModalContent.js +16 -4
- package/dist/cjs/ui/ModalFooter.js +4 -1
- package/dist/cjs/ui/ModalHeader.js +5 -2
- package/dist/cjs/ui/formatting.js +28 -7
- package/dist/cjs/ui/index.js +4 -0
- package/dist/cjs/ui/styles.js +3 -0
- package/dist/cjs/ui/utils.js +29 -10
- package/dist/es2019/pm-plugins/keymap.js +5 -2
- package/dist/es2019/ui/ModalContent.js +31 -13
- package/dist/es2019/ui/ModalFooter.js +4 -1
- package/dist/es2019/ui/ModalHeader.js +5 -2
- package/dist/es2019/ui/formatting.js +28 -7
- package/dist/es2019/ui/index.js +4 -0
- package/dist/es2019/ui/styles.js +2 -0
- package/dist/es2019/ui/utils.js +29 -10
- package/dist/esm/pm-plugins/keymap.js +4 -1
- package/dist/esm/ui/ModalContent.js +16 -4
- package/dist/esm/ui/ModalFooter.js +4 -1
- package/dist/esm/ui/ModalHeader.js +5 -2
- package/dist/esm/ui/formatting.js +28 -7
- package/dist/esm/ui/index.js +4 -0
- package/dist/esm/ui/styles.js +2 -0
- package/dist/esm/ui/utils.js +29 -10
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,10 @@ var _commands = require("./commands");
|
|
|
11
11
|
var _pluginKey = require("./plugin-key");
|
|
12
12
|
var keymapPlugin = exports.keymapPlugin = function keymapPlugin(editorAnalyticsAPI) {
|
|
13
13
|
var list = {};
|
|
14
|
-
(0, _keymaps.bindKeymapWithCommand)(
|
|
14
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
+
_keymaps.openHelp.common, function (state, dispatch) {
|
|
15
18
|
var tr = state.tr;
|
|
16
19
|
var isVisible = tr.getMeta(_pluginKey.pluginKey);
|
|
17
20
|
if (!isVisible) {
|
|
@@ -39,28 +39,37 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
39
39
|
css: _styles.column
|
|
40
40
|
}, (0, _react2.jsx)(_heading.default, {
|
|
41
41
|
size: "medium"
|
|
42
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
42
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
45
|
+
, _messages.helpDialogMessages.keyboardShortcuts)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
43
46
|
var keymap = form.keymap && form.keymap();
|
|
44
47
|
return keymap && keymap[_browser.browser.mac ? 'mac' : 'windows'];
|
|
45
48
|
}).map(function (form) {
|
|
49
|
+
// Ignored via go/ees005
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
51
|
+
var keymap = form.keymap;
|
|
46
52
|
return (
|
|
47
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
48
54
|
(0, _react2.jsx)("li", {
|
|
49
55
|
css: _styles.row,
|
|
50
56
|
key: "textFormatting-".concat(form.name)
|
|
51
|
-
}, (0, _react2.jsx)(_primitives.Text, null, form.name), (0, _utils.getComponentFromKeymap)(
|
|
57
|
+
}, (0, _react2.jsx)(_primitives.Text, null, form.name), (0, _utils.getComponentFromKeymap)(keymap()))
|
|
52
58
|
);
|
|
53
59
|
}), formatting.filter(function (form) {
|
|
54
60
|
return _utils.shortcutNamesWithoutKeymap.indexOf(form.type) !== -1;
|
|
55
61
|
}).filter(function (form) {
|
|
56
62
|
return form.autoFormatting;
|
|
57
63
|
}).map(function (form) {
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
66
|
+
var autoFormatting = form.autoFormatting;
|
|
58
67
|
return (
|
|
59
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
60
69
|
(0, _react2.jsx)("li", {
|
|
61
70
|
css: _styles.row,
|
|
62
71
|
key: "autoFormatting-".concat(form.name)
|
|
63
|
-
}, (0, _react2.jsx)(_primitives.Text, null, form.name),
|
|
72
|
+
}, (0, _react2.jsx)(_primitives.Text, null, form.name), autoFormatting())
|
|
64
73
|
);
|
|
65
74
|
}))), (0, _react2.jsx)("div", {
|
|
66
75
|
css: _styles.line
|
|
@@ -68,7 +77,10 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
68
77
|
css: _styles.column
|
|
69
78
|
}, (0, _react2.jsx)(_heading.default, {
|
|
70
79
|
size: "medium"
|
|
71
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
80
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
81
|
+
// Ignored via go/ees005
|
|
82
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
83
|
+
, _messages.helpDialogMessages.markdown)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
72
84
|
return _utils.shortcutNamesWithoutKeymap.indexOf(form.type) === -1;
|
|
73
85
|
}).map(function (form) {
|
|
74
86
|
return form.autoFormatting &&
|
|
@@ -23,7 +23,10 @@ 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)(_reactIntlNext.FormattedMessage
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
|
+
, (0, _extends2.default)({}, _messages.helpDialogMessages.helpDialogTips, {
|
|
27
30
|
values: {
|
|
28
31
|
keyMap: (0, _utils.getComponentFromKeymap)(_keymaps.openHelp)
|
|
29
32
|
}
|
|
@@ -27,7 +27,10 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
|
27
27
|
css: _styles.header
|
|
28
28
|
}, (0, _react.jsx)(_heading.default, {
|
|
29
29
|
size: "large"
|
|
30
|
-
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
30
|
+
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
|
+
, _messages.helpDialogMessages.editorHelp)), (0, _react.jsx)("div", null, (0, _react.jsx)(_uiMenu.ToolbarButton
|
|
31
34
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
32
35
|
, {
|
|
33
36
|
onClick: onClose,
|
|
@@ -38,7 +41,7 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
|
38
41
|
color: "currentColor",
|
|
39
42
|
spacing: "spacious"
|
|
40
43
|
})
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
42
45
|
,
|
|
43
46
|
css: _styles.toolbarButton
|
|
44
47
|
})))
|
|
@@ -74,7 +74,10 @@ var formatting = exports.formatting = function formatting(_ref2) {
|
|
|
74
74
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
75
75
|
as: "span",
|
|
76
76
|
xcss: codeLg
|
|
77
|
-
}, "**", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
77
|
+
}, "**", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
78
|
+
// Ignored via go/ees005
|
|
79
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
80
|
+
, _messages.toolbarMessages.bold), "**"));
|
|
78
81
|
}
|
|
79
82
|
}, {
|
|
80
83
|
name: formatMessage(_messages.toolbarMessages.italic),
|
|
@@ -86,7 +89,10 @@ var formatting = exports.formatting = function formatting(_ref2) {
|
|
|
86
89
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
87
90
|
as: "span",
|
|
88
91
|
xcss: codeLg
|
|
89
|
-
}, "*", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
92
|
+
}, "*", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
93
|
+
// Ignored via go/ees005
|
|
94
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
95
|
+
, _messages.toolbarMessages.italic), "*"));
|
|
90
96
|
}
|
|
91
97
|
}, {
|
|
92
98
|
name: formatMessage(_messages.toolbarMessages.underline),
|
|
@@ -104,7 +110,10 @@ var formatting = exports.formatting = function formatting(_ref2) {
|
|
|
104
110
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
105
111
|
as: "span",
|
|
106
112
|
xcss: codeLg
|
|
107
|
-
}, "~~", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
113
|
+
}, "~~", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
116
|
+
, _messages.toolbarMessages.strike), "~~"));
|
|
108
117
|
}
|
|
109
118
|
}, {
|
|
110
119
|
name: formatMessage(_messages.toolbarMessages.subscript),
|
|
@@ -290,7 +299,10 @@ var formatting = exports.formatting = function formatting(_ref2) {
|
|
|
290
299
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
291
300
|
as: "span",
|
|
292
301
|
xcss: codeLg
|
|
293
|
-
}, "[", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
302
|
+
}, "[", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
303
|
+
// Ignored via go/ees005
|
|
304
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
305
|
+
, _messages.toolbarInsertBlockMessages.link), "](http://a.com)"));
|
|
294
306
|
}
|
|
295
307
|
}, {
|
|
296
308
|
name: formatMessage(_messages.toolbarMessages.code),
|
|
@@ -302,7 +314,10 @@ var formatting = exports.formatting = function formatting(_ref2) {
|
|
|
302
314
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
303
315
|
as: "span",
|
|
304
316
|
xcss: codeLg
|
|
305
|
-
}, "`", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
317
|
+
}, "`", (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
318
|
+
// Ignored via go/ees005
|
|
319
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
320
|
+
, _messages.toolbarMessages.code), "`"));
|
|
306
321
|
}
|
|
307
322
|
}, {
|
|
308
323
|
name: formatMessage(_messages.toolbarInsertBlockMessages.action),
|
|
@@ -606,7 +621,10 @@ var imageAutoFormat = {
|
|
|
606
621
|
return (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
607
622
|
as: "span",
|
|
608
623
|
xcss: codeLg
|
|
609
|
-
}, ""));
|
|
610
628
|
}
|
|
611
629
|
};
|
|
612
630
|
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
@@ -622,7 +640,10 @@ var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
|
622
640
|
}
|
|
623
641
|
};
|
|
624
642
|
};
|
|
625
|
-
var getSupportedFormatting = exports.getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled
|
|
643
|
+
var getSupportedFormatting = exports.getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled
|
|
644
|
+
// Ignored via go/ees005
|
|
645
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
646
|
+
) {
|
|
626
647
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
627
648
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
628
649
|
});
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -41,8 +41,12 @@ var HelpDialog = function HelpDialog(_ref) {
|
|
|
41
41
|
}
|
|
42
42
|
}, [closeDialog, helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible]);
|
|
43
43
|
(0, _react.useEffect)(function () {
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
44
46
|
document.addEventListener('keydown', handleEsc);
|
|
45
47
|
return function () {
|
|
48
|
+
// Ignored via go/ees005
|
|
49
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
46
50
|
document.removeEventListener('keydown', handleEsc);
|
|
47
51
|
};
|
|
48
52
|
}, [handleEsc]);
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -13,6 +13,9 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line import/no-namespace
|
|
18
|
+
|
|
16
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
20
|
var header = exports.header = (0, _react.css)({
|
|
18
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
package/dist/cjs/ui/utils.js
CHANGED
|
@@ -46,6 +46,8 @@ var getKeyParts = function getKeyParts(keymap) {
|
|
|
46
46
|
if (_browser.browser.mac) {
|
|
47
47
|
shortcut = shortcut.replace('Alt', 'Opt');
|
|
48
48
|
}
|
|
49
|
+
// Ignored via go/ees005
|
|
50
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
49
51
|
return shortcut.replace(/\-(?=.)/g, ' + ').split(' ');
|
|
50
52
|
};
|
|
51
53
|
var shortcutNamesWithoutKeymap = exports.shortcutNamesWithoutKeymap = ['table', 'emoji', 'mention', 'quickInsert'];
|
|
@@ -57,19 +59,29 @@ var getComponentFromKeymap = exports.getComponentFromKeymap = function getCompon
|
|
|
57
59
|
css: _styles.componentFromKeymapWrapperStyles
|
|
58
60
|
}, keyParts.map(function (part, index) {
|
|
59
61
|
if (part === '+') {
|
|
60
|
-
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
return (
|
|
63
|
+
// Ignored via go/ees005
|
|
64
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
65
|
+
(0, _react.jsx)(_primitives.Box, {
|
|
66
|
+
as: "span",
|
|
67
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
68
|
+
}, ' + ')
|
|
69
|
+
);
|
|
64
70
|
} else if (part === 'Cmd') {
|
|
65
|
-
return (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
return (
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
74
|
+
(0, _react.jsx)(_primitives.Box, {
|
|
75
|
+
as: "span",
|
|
76
|
+
xcss: codeSm,
|
|
77
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
78
|
+
}, "\u2318")
|
|
79
|
+
);
|
|
70
80
|
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
71
81
|
return (
|
|
72
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
83
|
+
// Ignored via go/ees005
|
|
84
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
73
85
|
(0, _react.jsx)(_primitives.Box, {
|
|
74
86
|
as: "span",
|
|
75
87
|
xcss: codeMd,
|
|
@@ -79,6 +91,8 @@ var getComponentFromKeymap = exports.getComponentFromKeymap = function getCompon
|
|
|
79
91
|
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
80
92
|
return (
|
|
81
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
82
96
|
(0, _react.jsx)(_primitives.Box, {
|
|
83
97
|
as: "span",
|
|
84
98
|
xcss: codeLg,
|
|
@@ -89,12 +103,17 @@ var getComponentFromKeymap = exports.getComponentFromKeymap = function getCompon
|
|
|
89
103
|
return (0, _react.jsx)(_primitives.Box, {
|
|
90
104
|
as: "span",
|
|
91
105
|
"data-editor-help-dialog-enter-keymap": "true",
|
|
92
|
-
xcss: codeSm
|
|
106
|
+
xcss: codeSm
|
|
107
|
+
// Ignored via go/ees005
|
|
108
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
109
|
+
,
|
|
93
110
|
key: "".concat(keyParts, "-").concat(index)
|
|
94
111
|
}, '⏎');
|
|
95
112
|
}
|
|
96
113
|
return (
|
|
97
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
115
|
+
// Ignored via go/ees005
|
|
116
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
98
117
|
(0, _react.jsx)(_primitives.Box, {
|
|
99
118
|
as: "span",
|
|
100
119
|
xcss: codeSm,
|
|
@@ -5,8 +5,11 @@ import { openHelpCommand } from './commands';
|
|
|
5
5
|
import { pluginKey } from './plugin-key';
|
|
6
6
|
export const keymapPlugin = editorAnalyticsAPI => {
|
|
7
7
|
const list = {};
|
|
8
|
-
bindKeymapWithCommand(
|
|
9
|
-
|
|
8
|
+
bindKeymapWithCommand(
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11
|
+
openHelp.common, (state, dispatch) => {
|
|
12
|
+
const {
|
|
10
13
|
tr
|
|
11
14
|
} = state;
|
|
12
15
|
const isVisible = tr.getMeta(pluginKey);
|
|
@@ -32,26 +32,44 @@ export const ModalContent = ({
|
|
|
32
32
|
css: column
|
|
33
33
|
}, jsx(Heading, {
|
|
34
34
|
size: "medium"
|
|
35
|
-
}, jsx(FormattedMessage
|
|
35
|
+
}, jsx(FormattedMessage
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
|
+
, messages.keyboardShortcuts)), jsx("ul", null, formatting.filter(form => {
|
|
36
39
|
const keymap = form.keymap && form.keymap();
|
|
37
40
|
return keymap && keymap[browser.mac ? 'mac' : 'windows'];
|
|
38
|
-
}).map(form =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
}).map(form => {
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
|
+
const keymap = form.keymap;
|
|
45
|
+
return (
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
47
|
+
jsx("li", {
|
|
48
|
+
css: row,
|
|
49
|
+
key: `textFormatting-${form.name}`
|
|
50
|
+
}, jsx(Text, null, form.name), getComponentFromKeymap(keymap()))
|
|
51
|
+
);
|
|
52
|
+
}), formatting.filter(form => shortcutNamesWithoutKeymap.indexOf(form.type) !== -1).filter(form => form.autoFormatting).map(form => {
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
55
|
+
const autoFormatting = form.autoFormatting;
|
|
56
|
+
return (
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
58
|
+
jsx("li", {
|
|
59
|
+
css: row,
|
|
60
|
+
key: `autoFormatting-${form.name}`
|
|
61
|
+
}, jsx(Text, null, form.name), autoFormatting())
|
|
62
|
+
);
|
|
63
|
+
}))), jsx("div", {
|
|
49
64
|
css: line
|
|
50
65
|
}), jsx("div", {
|
|
51
66
|
css: column
|
|
52
67
|
}, jsx(Heading, {
|
|
53
68
|
size: "medium"
|
|
54
|
-
}, jsx(FormattedMessage
|
|
69
|
+
}, jsx(FormattedMessage
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
72
|
+
, messages.markdown)), jsx("ul", null, formatting.filter(form => shortcutNamesWithoutKeymap.indexOf(form.type) === -1).map(form => form.autoFormatting &&
|
|
55
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
56
74
|
jsx("li", {
|
|
57
75
|
key: `autoFormatting-${form.name}`,
|
|
@@ -14,7 +14,10 @@ const ModalFooter = () =>
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
15
15
|
jsx("div", {
|
|
16
16
|
css: footer
|
|
17
|
-
}, jsx(FormattedMessage
|
|
17
|
+
}, jsx(FormattedMessage
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
|
+
, _extends({}, messages.helpDialogTips, {
|
|
18
21
|
values: {
|
|
19
22
|
keyMap: getComponentFromKeymap(openHelp)
|
|
20
23
|
}
|
|
@@ -22,7 +22,10 @@ const ModalHeader = injectIntl(({
|
|
|
22
22
|
css: header
|
|
23
23
|
}, jsx(Heading, {
|
|
24
24
|
size: "large"
|
|
25
|
-
}, jsx(FormattedMessage
|
|
25
|
+
}, jsx(FormattedMessage
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
28
|
+
, messages.editorHelp)), jsx("div", null, jsx(ToolbarButton
|
|
26
29
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
27
30
|
, {
|
|
28
31
|
onClick: onClose,
|
|
@@ -33,7 +36,7 @@ const ModalHeader = injectIntl(({
|
|
|
33
36
|
color: "currentColor",
|
|
34
37
|
spacing: "spacious"
|
|
35
38
|
})
|
|
36
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
37
40
|
,
|
|
38
41
|
css: toolbarButton
|
|
39
42
|
})))
|
|
@@ -57,7 +57,10 @@ export const formatting = ({
|
|
|
57
57
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
58
58
|
as: "span",
|
|
59
59
|
xcss: codeLg
|
|
60
|
-
}, "**", jsx(FormattedMessage
|
|
60
|
+
}, "**", jsx(FormattedMessage
|
|
61
|
+
// Ignored via go/ees005
|
|
62
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
63
|
+
, toolbarMessages.bold), "**"))
|
|
61
64
|
}, {
|
|
62
65
|
name: formatMessage(toolbarMessages.italic),
|
|
63
66
|
type: 'em',
|
|
@@ -65,7 +68,10 @@ export const formatting = ({
|
|
|
65
68
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
66
69
|
as: "span",
|
|
67
70
|
xcss: codeLg
|
|
68
|
-
}, "*", jsx(FormattedMessage
|
|
71
|
+
}, "*", jsx(FormattedMessage
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
74
|
+
, toolbarMessages.italic), "*"))
|
|
69
75
|
}, {
|
|
70
76
|
name: formatMessage(toolbarMessages.underline),
|
|
71
77
|
type: 'underline',
|
|
@@ -77,7 +83,10 @@ export const formatting = ({
|
|
|
77
83
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
78
84
|
as: "span",
|
|
79
85
|
xcss: codeLg
|
|
80
|
-
}, "~~", jsx(FormattedMessage
|
|
86
|
+
}, "~~", jsx(FormattedMessage
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
89
|
+
, toolbarMessages.strike), "~~"))
|
|
81
90
|
}, {
|
|
82
91
|
name: formatMessage(toolbarMessages.subscript),
|
|
83
92
|
type: 'subsup',
|
|
@@ -211,7 +220,10 @@ export const formatting = ({
|
|
|
211
220
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
212
221
|
as: "span",
|
|
213
222
|
xcss: codeLg
|
|
214
|
-
}, "[", jsx(FormattedMessage
|
|
223
|
+
}, "[", jsx(FormattedMessage
|
|
224
|
+
// Ignored via go/ees005
|
|
225
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
226
|
+
, toolbarInsertBlockMessages.link), "](http://a.com)"))
|
|
215
227
|
}, {
|
|
216
228
|
name: formatMessage(toolbarMessages.code),
|
|
217
229
|
type: 'code',
|
|
@@ -219,7 +231,10 @@ export const formatting = ({
|
|
|
219
231
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
220
232
|
as: "span",
|
|
221
233
|
xcss: codeLg
|
|
222
|
-
}, "`", jsx(FormattedMessage
|
|
234
|
+
}, "`", jsx(FormattedMessage
|
|
235
|
+
// Ignored via go/ees005
|
|
236
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
237
|
+
, toolbarMessages.code), "`"))
|
|
223
238
|
}, {
|
|
224
239
|
name: formatMessage(toolbarInsertBlockMessages.action),
|
|
225
240
|
type: 'taskItem',
|
|
@@ -465,7 +480,10 @@ const imageAutoFormat = {
|
|
|
465
480
|
autoFormatting: () => jsx("span", null, jsx(Box, {
|
|
466
481
|
as: "span",
|
|
467
482
|
xcss: codeLg
|
|
468
|
-
}, ""))
|
|
469
487
|
};
|
|
470
488
|
const quickInsertAutoFormat = ({
|
|
471
489
|
formatMessage
|
|
@@ -477,7 +495,10 @@ const quickInsertAutoFormat = ({
|
|
|
477
495
|
xcss: codeLg
|
|
478
496
|
}, "/"))
|
|
479
497
|
});
|
|
480
|
-
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled
|
|
498
|
+
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled
|
|
499
|
+
// Ignored via go/ees005
|
|
500
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
501
|
+
) => {
|
|
481
502
|
const supportedBySchema = formatting(intl).filter(format => schema.nodes[format.type] || schema.marks[format.type]);
|
|
482
503
|
return [...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...resizeInformationFormatting(intl), ...openCellOptionsFormattingtoFormat(intl)];
|
|
483
504
|
};
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -36,8 +36,12 @@ const HelpDialog = ({
|
|
|
36
36
|
}
|
|
37
37
|
}, [closeDialog, helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible]);
|
|
38
38
|
useEffect(() => {
|
|
39
|
+
// Ignored via go/ees005
|
|
40
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
39
41
|
document.addEventListener('keydown', handleEsc);
|
|
40
42
|
return () => {
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
41
45
|
document.removeEventListener('keydown', handleEsc);
|
|
42
46
|
};
|
|
43
47
|
}, [handleEsc]);
|
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorUnitZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line import/no-namespace
|
|
4
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
7
|
import { B300, N400 } from '@atlaskit/theme/colors';
|
|
6
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
package/dist/es2019/ui/utils.js
CHANGED
|
@@ -39,6 +39,8 @@ const getKeyParts = keymap => {
|
|
|
39
39
|
if (browser.mac) {
|
|
40
40
|
shortcut = shortcut.replace('Alt', 'Opt');
|
|
41
41
|
}
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
42
44
|
return shortcut.replace(/\-(?=.)/g, ' + ').split(' ');
|
|
43
45
|
};
|
|
44
46
|
export const shortcutNamesWithoutKeymap = ['table', 'emoji', 'mention', 'quickInsert'];
|
|
@@ -50,19 +52,29 @@ export const getComponentFromKeymap = keymap => {
|
|
|
50
52
|
css: componentFromKeymapWrapperStyles
|
|
51
53
|
}, keyParts.map((part, index) => {
|
|
52
54
|
if (part === '+') {
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return (
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
58
|
+
jsx(Box, {
|
|
59
|
+
as: "span",
|
|
60
|
+
key: `${keyParts}-${index}`
|
|
61
|
+
}, ' + ')
|
|
62
|
+
);
|
|
57
63
|
} else if (part === 'Cmd') {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
return (
|
|
65
|
+
// Ignored via go/ees005
|
|
66
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
67
|
+
jsx(Box, {
|
|
68
|
+
as: "span",
|
|
69
|
+
xcss: codeSm,
|
|
70
|
+
key: `${keyParts}-${index}`
|
|
71
|
+
}, "\u2318")
|
|
72
|
+
);
|
|
63
73
|
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
64
74
|
return (
|
|
65
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
66
78
|
jsx(Box, {
|
|
67
79
|
as: "span",
|
|
68
80
|
xcss: codeMd,
|
|
@@ -72,6 +84,8 @@ export const getComponentFromKeymap = keymap => {
|
|
|
72
84
|
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
73
85
|
return (
|
|
74
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
75
89
|
jsx(Box, {
|
|
76
90
|
as: "span",
|
|
77
91
|
xcss: codeLg,
|
|
@@ -82,12 +96,17 @@ export const getComponentFromKeymap = keymap => {
|
|
|
82
96
|
return jsx(Box, {
|
|
83
97
|
as: "span",
|
|
84
98
|
"data-editor-help-dialog-enter-keymap": "true",
|
|
85
|
-
xcss: codeSm
|
|
99
|
+
xcss: codeSm
|
|
100
|
+
// Ignored via go/ees005
|
|
101
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
102
|
+
,
|
|
86
103
|
key: `${keyParts}-${index}`
|
|
87
104
|
}, '⏎');
|
|
88
105
|
}
|
|
89
106
|
return (
|
|
90
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
108
|
+
// Ignored via go/ees005
|
|
109
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
91
110
|
jsx(Box, {
|
|
92
111
|
as: "span",
|
|
93
112
|
xcss: codeSm,
|
|
@@ -5,7 +5,10 @@ import { openHelpCommand } from './commands';
|
|
|
5
5
|
import { pluginKey } from './plugin-key';
|
|
6
6
|
export var keymapPlugin = function keymapPlugin(editorAnalyticsAPI) {
|
|
7
7
|
var list = {};
|
|
8
|
-
bindKeymapWithCommand(
|
|
8
|
+
bindKeymapWithCommand(
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11
|
+
openHelp.common, function (state, dispatch) {
|
|
9
12
|
var tr = state.tr;
|
|
10
13
|
var isVisible = tr.getMeta(pluginKey);
|
|
11
14
|
if (!isVisible) {
|
|
@@ -31,28 +31,37 @@ export var ModalContent = function ModalContent(_ref) {
|
|
|
31
31
|
css: column
|
|
32
32
|
}, jsx(Heading, {
|
|
33
33
|
size: "medium"
|
|
34
|
-
}, jsx(FormattedMessage
|
|
34
|
+
}, jsx(FormattedMessage
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
37
|
+
, messages.keyboardShortcuts)), jsx("ul", null, formatting.filter(function (form) {
|
|
35
38
|
var keymap = form.keymap && form.keymap();
|
|
36
39
|
return keymap && keymap[browser.mac ? 'mac' : 'windows'];
|
|
37
40
|
}).map(function (form) {
|
|
41
|
+
// Ignored via go/ees005
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
43
|
+
var keymap = form.keymap;
|
|
38
44
|
return (
|
|
39
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
40
46
|
jsx("li", {
|
|
41
47
|
css: row,
|
|
42
48
|
key: "textFormatting-".concat(form.name)
|
|
43
|
-
}, jsx(Text, null, form.name), getComponentFromKeymap(
|
|
49
|
+
}, jsx(Text, null, form.name), getComponentFromKeymap(keymap()))
|
|
44
50
|
);
|
|
45
51
|
}), formatting.filter(function (form) {
|
|
46
52
|
return shortcutNamesWithoutKeymap.indexOf(form.type) !== -1;
|
|
47
53
|
}).filter(function (form) {
|
|
48
54
|
return form.autoFormatting;
|
|
49
55
|
}).map(function (form) {
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
58
|
+
var autoFormatting = form.autoFormatting;
|
|
50
59
|
return (
|
|
51
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
52
61
|
jsx("li", {
|
|
53
62
|
css: row,
|
|
54
63
|
key: "autoFormatting-".concat(form.name)
|
|
55
|
-
}, jsx(Text, null, form.name),
|
|
64
|
+
}, jsx(Text, null, form.name), autoFormatting())
|
|
56
65
|
);
|
|
57
66
|
}))), jsx("div", {
|
|
58
67
|
css: line
|
|
@@ -60,7 +69,10 @@ export var ModalContent = function ModalContent(_ref) {
|
|
|
60
69
|
css: column
|
|
61
70
|
}, jsx(Heading, {
|
|
62
71
|
size: "medium"
|
|
63
|
-
}, jsx(FormattedMessage
|
|
72
|
+
}, jsx(FormattedMessage
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
|
+
, messages.markdown)), jsx("ul", null, formatting.filter(function (form) {
|
|
64
76
|
return shortcutNamesWithoutKeymap.indexOf(form.type) === -1;
|
|
65
77
|
}).map(function (form) {
|
|
66
78
|
return form.autoFormatting &&
|
|
@@ -15,7 +15,10 @@ var ModalFooter = function ModalFooter() {
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
16
16
|
jsx("div", {
|
|
17
17
|
css: footer
|
|
18
|
-
}, jsx(FormattedMessage
|
|
18
|
+
}, jsx(FormattedMessage
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
21
|
+
, _extends({}, messages.helpDialogTips, {
|
|
19
22
|
values: {
|
|
20
23
|
keyMap: getComponentFromKeymap(openHelp)
|
|
21
24
|
}
|
|
@@ -19,7 +19,10 @@ var ModalHeader = injectIntl(function (_ref) {
|
|
|
19
19
|
css: header
|
|
20
20
|
}, jsx(Heading, {
|
|
21
21
|
size: "large"
|
|
22
|
-
}, jsx(FormattedMessage
|
|
22
|
+
}, jsx(FormattedMessage
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
|
+
, messages.editorHelp)), jsx("div", null, jsx(ToolbarButton
|
|
23
26
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
24
27
|
, {
|
|
25
28
|
onClick: onClose,
|
|
@@ -30,7 +33,7 @@ var ModalHeader = injectIntl(function (_ref) {
|
|
|
30
33
|
color: "currentColor",
|
|
31
34
|
spacing: "spacious"
|
|
32
35
|
})
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
34
37
|
,
|
|
35
38
|
css: toolbarButton
|
|
36
39
|
})))
|
|
@@ -66,7 +66,10 @@ export var formatting = function formatting(_ref2) {
|
|
|
66
66
|
return jsx("span", null, jsx(Box, {
|
|
67
67
|
as: "span",
|
|
68
68
|
xcss: codeLg
|
|
69
|
-
}, "**", jsx(FormattedMessage
|
|
69
|
+
}, "**", jsx(FormattedMessage
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
72
|
+
, toolbarMessages.bold), "**"));
|
|
70
73
|
}
|
|
71
74
|
}, {
|
|
72
75
|
name: formatMessage(toolbarMessages.italic),
|
|
@@ -78,7 +81,10 @@ export var formatting = function formatting(_ref2) {
|
|
|
78
81
|
return jsx("span", null, jsx(Box, {
|
|
79
82
|
as: "span",
|
|
80
83
|
xcss: codeLg
|
|
81
|
-
}, "*", jsx(FormattedMessage
|
|
84
|
+
}, "*", jsx(FormattedMessage
|
|
85
|
+
// Ignored via go/ees005
|
|
86
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
87
|
+
, toolbarMessages.italic), "*"));
|
|
82
88
|
}
|
|
83
89
|
}, {
|
|
84
90
|
name: formatMessage(toolbarMessages.underline),
|
|
@@ -96,7 +102,10 @@ export var formatting = function formatting(_ref2) {
|
|
|
96
102
|
return jsx("span", null, jsx(Box, {
|
|
97
103
|
as: "span",
|
|
98
104
|
xcss: codeLg
|
|
99
|
-
}, "~~", jsx(FormattedMessage
|
|
105
|
+
}, "~~", jsx(FormattedMessage
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
108
|
+
, toolbarMessages.strike), "~~"));
|
|
100
109
|
}
|
|
101
110
|
}, {
|
|
102
111
|
name: formatMessage(toolbarMessages.subscript),
|
|
@@ -282,7 +291,10 @@ export var formatting = function formatting(_ref2) {
|
|
|
282
291
|
return jsx("span", null, jsx(Box, {
|
|
283
292
|
as: "span",
|
|
284
293
|
xcss: codeLg
|
|
285
|
-
}, "[", jsx(FormattedMessage
|
|
294
|
+
}, "[", jsx(FormattedMessage
|
|
295
|
+
// Ignored via go/ees005
|
|
296
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
297
|
+
, toolbarInsertBlockMessages.link), "](http://a.com)"));
|
|
286
298
|
}
|
|
287
299
|
}, {
|
|
288
300
|
name: formatMessage(toolbarMessages.code),
|
|
@@ -294,7 +306,10 @@ export var formatting = function formatting(_ref2) {
|
|
|
294
306
|
return jsx("span", null, jsx(Box, {
|
|
295
307
|
as: "span",
|
|
296
308
|
xcss: codeLg
|
|
297
|
-
}, "`", jsx(FormattedMessage
|
|
309
|
+
}, "`", jsx(FormattedMessage
|
|
310
|
+
// Ignored via go/ees005
|
|
311
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
312
|
+
, toolbarMessages.code), "`"));
|
|
298
313
|
}
|
|
299
314
|
}, {
|
|
300
315
|
name: formatMessage(toolbarInsertBlockMessages.action),
|
|
@@ -598,7 +613,10 @@ var imageAutoFormat = {
|
|
|
598
613
|
return jsx("span", null, jsx(Box, {
|
|
599
614
|
as: "span",
|
|
600
615
|
xcss: codeLg
|
|
601
|
-
}, ""));
|
|
602
620
|
}
|
|
603
621
|
};
|
|
604
622
|
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
@@ -614,7 +632,10 @@ var quickInsertAutoFormat = function quickInsertAutoFormat(_ref7) {
|
|
|
614
632
|
}
|
|
615
633
|
};
|
|
616
634
|
};
|
|
617
|
-
export var getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled
|
|
635
|
+
export var getSupportedFormatting = function getSupportedFormatting(schema, intl, imageEnabled, quickInsertEnabled
|
|
636
|
+
// Ignored via go/ees005
|
|
637
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
638
|
+
) {
|
|
618
639
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
619
640
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
620
641
|
});
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -30,8 +30,12 @@ var HelpDialog = function HelpDialog(_ref) {
|
|
|
30
30
|
}
|
|
31
31
|
}, [closeDialog, helpDialogState === null || helpDialogState === void 0 ? void 0 : helpDialogState.isVisible]);
|
|
32
32
|
useEffect(function () {
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
33
35
|
document.addEventListener('keydown', handleEsc);
|
|
34
36
|
return function () {
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
35
39
|
document.removeEventListener('keydown', handleEsc);
|
|
36
40
|
};
|
|
37
41
|
}, [handleEsc]);
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorUnitZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line import/no-namespace
|
|
4
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
7
|
import { B300, N400 } from '@atlaskit/theme/colors';
|
|
6
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
package/dist/esm/ui/utils.js
CHANGED
|
@@ -39,6 +39,8 @@ var getKeyParts = function getKeyParts(keymap) {
|
|
|
39
39
|
if (browser.mac) {
|
|
40
40
|
shortcut = shortcut.replace('Alt', 'Opt');
|
|
41
41
|
}
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
42
44
|
return shortcut.replace(/\-(?=.)/g, ' + ').split(' ');
|
|
43
45
|
};
|
|
44
46
|
export var shortcutNamesWithoutKeymap = ['table', 'emoji', 'mention', 'quickInsert'];
|
|
@@ -50,19 +52,29 @@ export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
|
50
52
|
css: componentFromKeymapWrapperStyles
|
|
51
53
|
}, keyParts.map(function (part, index) {
|
|
52
54
|
if (part === '+') {
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return (
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
58
|
+
jsx(Box, {
|
|
59
|
+
as: "span",
|
|
60
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
61
|
+
}, ' + ')
|
|
62
|
+
);
|
|
57
63
|
} else if (part === 'Cmd') {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
return (
|
|
65
|
+
// Ignored via go/ees005
|
|
66
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
67
|
+
jsx(Box, {
|
|
68
|
+
as: "span",
|
|
69
|
+
xcss: codeSm,
|
|
70
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
71
|
+
}, "\u2318")
|
|
72
|
+
);
|
|
63
73
|
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
64
74
|
return (
|
|
65
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
66
78
|
jsx(Box, {
|
|
67
79
|
as: "span",
|
|
68
80
|
xcss: codeMd,
|
|
@@ -72,6 +84,8 @@ export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
|
72
84
|
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
73
85
|
return (
|
|
74
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
75
89
|
jsx(Box, {
|
|
76
90
|
as: "span",
|
|
77
91
|
xcss: codeLg,
|
|
@@ -82,12 +96,17 @@ export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
|
82
96
|
return jsx(Box, {
|
|
83
97
|
as: "span",
|
|
84
98
|
"data-editor-help-dialog-enter-keymap": "true",
|
|
85
|
-
xcss: codeSm
|
|
99
|
+
xcss: codeSm
|
|
100
|
+
// Ignored via go/ees005
|
|
101
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
102
|
+
,
|
|
86
103
|
key: "".concat(keyParts, "-").concat(index)
|
|
87
104
|
}, '⏎');
|
|
88
105
|
}
|
|
89
106
|
return (
|
|
90
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
108
|
+
// Ignored via go/ees005
|
|
109
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
91
110
|
jsx(Box, {
|
|
92
111
|
as: "span",
|
|
93
112
|
xcss: codeSm,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.13",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^99.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-quick-insert": "^1.8.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
39
39
|
"@atlaskit/heading": "^4.0.0",
|
|
40
|
-
"@atlaskit/icon": "^23.
|
|
41
|
-
"@atlaskit/modal-dialog": "^12.
|
|
40
|
+
"@atlaskit/icon": "^23.3.0",
|
|
41
|
+
"@atlaskit/modal-dialog": "^12.19.0",
|
|
42
42
|
"@atlaskit/primitives": "^13.3.0",
|
|
43
43
|
"@atlaskit/theme": "^14.0.0",
|
|
44
|
-
"@atlaskit/tokens": "^
|
|
44
|
+
"@atlaskit/tokens": "^3.0.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",
|