@atlaskit/editor-plugin-help-dialog 1.3.0 → 1.4.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 +23 -0
- package/dist/cjs/plugin.js +7 -2
- package/dist/cjs/ui/Modal.js +4 -1
- package/dist/cjs/ui/ModalContent.js +19 -5
- package/dist/cjs/ui/ModalFooter.js +4 -1
- package/dist/cjs/ui/ModalHeader.js +17 -3
- package/dist/cjs/ui/formatting.js +6 -49
- package/dist/cjs/ui/index.js +4 -1
- package/dist/cjs/ui/styles.js +17 -9
- package/dist/cjs/ui/utils.js +4 -1
- package/dist/es2019/plugin.js +7 -2
- package/dist/es2019/ui/Modal.js +4 -1
- package/dist/es2019/ui/ModalContent.js +19 -5
- package/dist/es2019/ui/ModalFooter.js +4 -1
- package/dist/es2019/ui/ModalHeader.js +17 -3
- package/dist/es2019/ui/formatting.js +6 -43
- package/dist/es2019/ui/index.js +4 -1
- package/dist/es2019/ui/styles.js +17 -9
- package/dist/es2019/ui/utils.js +4 -1
- package/dist/esm/plugin.js +7 -2
- package/dist/esm/ui/Modal.js +4 -1
- package/dist/esm/ui/ModalContent.js +19 -5
- package/dist/esm/ui/ModalFooter.js +4 -1
- package/dist/esm/ui/ModalHeader.js +17 -3
- package/dist/esm/ui/formatting.js +6 -49
- package/dist/esm/ui/index.js +4 -1
- package/dist/esm/ui/styles.js +17 -9
- package/dist/esm/ui/utils.js +4 -1
- package/dist/types/ui/Modal.d.ts +4 -1
- package/dist/types/ui/ModalFooter.d.ts +4 -1
- package/dist/types/ui/utils.d.ts +4 -1
- package/dist/types-ts4.5/ui/Modal.d.ts +4 -1
- package/dist/types-ts4.5/ui/ModalFooter.d.ts +4 -1
- package/dist/types-ts4.5/ui/utils.d.ts +4 -1
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#123266](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/123266)
|
|
8
|
+
[`821ca3d93201f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/821ca3d93201f) -
|
|
9
|
+
[ux] Migrate legacy icons and typography in Editor to new ADS icons and token under Feature Gate
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.3.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#122514](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122514)
|
|
20
|
+
[`91276c81ef8a8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91276c81ef8a8) -
|
|
21
|
+
[ED-24019] This change is cleaning up the feature flag
|
|
22
|
+
'platform.editor.a11y-help-dialog-shortcut-keys-position_aghfg' which was introduced for new
|
|
23
|
+
keyboard shortcuts for inserting columns and rows to a table.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 1.3.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -13,7 +13,9 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
15
15
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
16
|
-
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
+
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle"));
|
|
17
|
+
var _questionCircle2 = _interopRequireDefault(require("@atlaskit/icon/glyph/question-circle"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
19
|
var _commands = require("./commands");
|
|
18
20
|
var _pluginKey = require("./plugin-key");
|
|
19
21
|
var _HelpDialogLoader = require("./ui/HelpDialogLoader");
|
|
@@ -76,7 +78,10 @@ var helpDialogPlugin = exports.helpDialogPlugin = function helpDialogPlugin(_ref
|
|
|
76
78
|
priority: 4000,
|
|
77
79
|
keyshortcut: (0, _keymaps.tooltip)(_keymaps.openHelp),
|
|
78
80
|
icon: function icon() {
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
|
|
81
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
|
|
82
|
+
label: "",
|
|
83
|
+
color: "currentColor"
|
|
84
|
+
}) : /*#__PURE__*/_react.default.createElement(_questionCircle2.default, {
|
|
80
85
|
label: ""
|
|
81
86
|
});
|
|
82
87
|
},
|
package/dist/cjs/ui/Modal.js
CHANGED
|
@@ -7,7 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
9
9
|
var _ModalContent = require("./ModalContent");
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @jsxRuntime classic
|
|
12
|
+
* @jsx jsx
|
|
13
|
+
*/
|
|
11
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
15
|
|
|
13
16
|
var Modal = function Modal(_ref) {
|
|
@@ -10,11 +10,17 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
+
var _primitives = require("@atlaskit/primitives");
|
|
13
16
|
var _ModalFooter = _interopRequireDefault(require("./ModalFooter"));
|
|
14
17
|
var _ModalHeader = _interopRequireDefault(require("./ModalHeader"));
|
|
15
18
|
var _styles = require("./styles");
|
|
16
19
|
var _utils2 = require("./utils");
|
|
17
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @jsxRuntime classic
|
|
22
|
+
* @jsx jsx
|
|
23
|
+
*/
|
|
18
24
|
/** @jsxFrag */
|
|
19
25
|
|
|
20
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -32,7 +38,11 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
32
38
|
css: _styles.content
|
|
33
39
|
}, (0, _react2.jsx)("div", {
|
|
34
40
|
css: _styles.column
|
|
35
|
-
}, (0, _react2.jsx)(
|
|
41
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react2.jsx)(_heading.default, {
|
|
42
|
+
size: "medium"
|
|
43
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.keyboardShortcuts)) :
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
45
|
+
(0, _react2.jsx)("h2", {
|
|
36
46
|
css: _styles.title
|
|
37
47
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.keyboardShortcuts)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
38
48
|
var keymap = form.keymap && form.keymap();
|
|
@@ -43,7 +53,7 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
43
53
|
(0, _react2.jsx)("li", {
|
|
44
54
|
css: _styles.row,
|
|
45
55
|
key: "textFormatting-".concat(form.name)
|
|
46
|
-
}, (0, _react2.jsx)("span", null, form.name), (0, _utils2.getComponentFromKeymap)(form.keymap()))
|
|
56
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react2.jsx)(_primitives.Text, null, form.name) : (0, _react2.jsx)("span", null, form.name), (0, _utils2.getComponentFromKeymap)(form.keymap()))
|
|
47
57
|
);
|
|
48
58
|
}), formatting.filter(function (form) {
|
|
49
59
|
return _utils2.shortcutNamesWithoutKeymap.indexOf(form.type) !== -1;
|
|
@@ -55,13 +65,17 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
55
65
|
(0, _react2.jsx)("li", {
|
|
56
66
|
css: _styles.row,
|
|
57
67
|
key: "autoFormatting-".concat(form.name)
|
|
58
|
-
}, (0, _react2.jsx)("span", null, form.name), form.autoFormatting())
|
|
68
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react2.jsx)(_primitives.Text, null, form.name) : (0, _react2.jsx)("span", null, form.name), form.autoFormatting())
|
|
59
69
|
);
|
|
60
70
|
}))), (0, _react2.jsx)("div", {
|
|
61
71
|
css: _styles.line
|
|
62
72
|
}), (0, _react2.jsx)("div", {
|
|
63
73
|
css: _styles.column
|
|
64
|
-
}, (0, _react2.jsx)(
|
|
74
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react2.jsx)(_heading.default, {
|
|
75
|
+
size: "medium"
|
|
76
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.markdown)) :
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
78
|
+
(0, _react2.jsx)("h2", {
|
|
65
79
|
css: _styles.title
|
|
66
80
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.markdown)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
67
81
|
return _utils2.shortcutNamesWithoutKeymap.indexOf(form.type) === -1;
|
|
@@ -12,7 +12,10 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _styles = require("./styles");
|
|
14
14
|
var _utils = require("./utils");
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
* @jsx jsx
|
|
18
|
+
*/
|
|
16
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
20
|
|
|
18
21
|
var ModalFooter = function ModalFooter() {
|
|
@@ -9,9 +9,15 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
12
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
13
|
+
var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
|
|
12
14
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
16
|
var _styles = require("./styles");
|
|
14
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
20
|
+
*/
|
|
15
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
22
|
|
|
17
23
|
var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
@@ -21,7 +27,11 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
|
21
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
22
28
|
(0, _react.jsx)("div", {
|
|
23
29
|
css: _styles.header
|
|
24
|
-
}, (0, _react.jsx)(
|
|
30
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react.jsx)(_heading.default, {
|
|
31
|
+
size: "large"
|
|
32
|
+
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.editorHelp)) :
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
34
|
+
(0, _react.jsx)("h1", {
|
|
25
35
|
css: _styles.dialogHeader
|
|
26
36
|
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.helpDialogMessages.editorHelp)), (0, _react.jsx)("div", null, (0, _react.jsx)(_uiMenu.ToolbarButton
|
|
27
37
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
@@ -29,7 +39,11 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
|
29
39
|
onClick: onClose,
|
|
30
40
|
title: formatMessage(_messages.helpDialogMessages.closeHelpDialog),
|
|
31
41
|
spacing: "compact",
|
|
32
|
-
iconBefore: (0, _react.jsx)(
|
|
42
|
+
iconBefore: (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react.jsx)(_closeCross.default, {
|
|
43
|
+
label: formatMessage(_messages.helpDialogMessages.closeHelpDialog),
|
|
44
|
+
color: "currentColor",
|
|
45
|
+
spacing: "spacious"
|
|
46
|
+
}) : (0, _react.jsx)(_cross.default, {
|
|
33
47
|
label: formatMessage(_messages.helpDialogMessages.closeHelpDialog),
|
|
34
48
|
size: "medium"
|
|
35
49
|
})
|
|
@@ -13,7 +13,10 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _styles = require("./styles");
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @jsxRuntime classic
|
|
18
|
+
* @jsx jsx
|
|
19
|
+
*/
|
|
17
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
21
|
|
|
19
22
|
var navigationKeymaps = function navigationKeymaps(_ref) {
|
|
@@ -397,7 +400,7 @@ var otherFormatting = function otherFormatting(_ref3) {
|
|
|
397
400
|
}, "\u2193")))
|
|
398
401
|
);
|
|
399
402
|
}
|
|
400
|
-
}].concat(
|
|
403
|
+
}].concat([{
|
|
401
404
|
name: formatMessage(_messages.helpDialogMessages.InsertTableColumn),
|
|
402
405
|
type: 'table',
|
|
403
406
|
autoFormatting: function autoFormatting() {
|
|
@@ -443,53 +446,7 @@ var otherFormatting = function otherFormatting(_ref3) {
|
|
|
443
446
|
}, "[")))
|
|
444
447
|
);
|
|
445
448
|
}
|
|
446
|
-
}]
|
|
447
|
-
name: formatMessage(_messages.helpDialogMessages.InsertTableColumn),
|
|
448
|
-
type: 'table',
|
|
449
|
-
autoFormatting: function autoFormatting() {
|
|
450
|
-
return (
|
|
451
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
452
|
-
(0, _react.jsx)("span", {
|
|
453
|
-
css: _styles.shortcutsArray
|
|
454
|
-
}, (0, _react.jsx)("span", null, (0, _react.jsx)("span", {
|
|
455
|
-
css: _styles.codeSm
|
|
456
|
-
}, _utils.browser.mac ? '⌃' : 'Ctrl'), ' + ', (0, _react.jsx)("span", {
|
|
457
|
-
css: _styles.codeMd
|
|
458
|
-
}, _utils.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)("span", {
|
|
459
|
-
css: _styles.codeSm
|
|
460
|
-
}, "\u2192")), (0, _react.jsx)("span", null, (0, _react.jsx)("span", {
|
|
461
|
-
css: _styles.codeSm
|
|
462
|
-
}, _utils.browser.mac ? '⌃' : 'Ctrl'), ' + ', (0, _react.jsx)("span", {
|
|
463
|
-
css: _styles.codeMd
|
|
464
|
-
}, _utils.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)("span", {
|
|
465
|
-
css: _styles.codeSm
|
|
466
|
-
}, "\u2190")))
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
}, {
|
|
470
|
-
name: formatMessage(_messages.helpDialogMessages.InsertTableRow),
|
|
471
|
-
type: 'table',
|
|
472
|
-
autoFormatting: function autoFormatting() {
|
|
473
|
-
return (
|
|
474
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
475
|
-
(0, _react.jsx)("span", {
|
|
476
|
-
css: _styles.shortcutsArray
|
|
477
|
-
}, (0, _react.jsx)("span", null, (0, _react.jsx)("span", {
|
|
478
|
-
css: _styles.codeSm
|
|
479
|
-
}, _utils.browser.mac ? '⌃' : 'Ctrl'), ' + ', (0, _react.jsx)("span", {
|
|
480
|
-
css: _styles.codeMd
|
|
481
|
-
}, _utils.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)("span", {
|
|
482
|
-
css: _styles.codeSm
|
|
483
|
-
}, "\u2193")), (0, _react.jsx)("span", null, (0, _react.jsx)("span", {
|
|
484
|
-
css: _styles.codeSm
|
|
485
|
-
}, _utils.browser.mac ? '⌃' : 'Ctrl'), ' + ', (0, _react.jsx)("span", {
|
|
486
|
-
css: _styles.codeMd
|
|
487
|
-
}, _utils.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)("span", {
|
|
488
|
-
css: _styles.codeSm
|
|
489
|
-
}, "\u2191")))
|
|
490
|
-
);
|
|
491
|
-
}
|
|
492
|
-
}]), [{
|
|
449
|
+
}], [{
|
|
493
450
|
name: formatMessage(_messages.helpDialogMessages.selectColumnResize),
|
|
494
451
|
type: 'table',
|
|
495
452
|
autoFormatting: function autoFormatting() {
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -16,7 +16,10 @@ var _formatting = require("./formatting");
|
|
|
16
16
|
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
18
|
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 && Object.prototype.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; }
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* @jsxRuntime classic
|
|
21
|
+
* @jsx jsx
|
|
22
|
+
*/
|
|
20
23
|
|
|
21
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
25
|
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -7,20 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.toolbarButton = exports.title = exports.shortcutsArray = exports.row = exports.line = exports.header = exports.footer = exports.dialogHeader = exports.contentWrapper = exports.content = exports.componentFromKeymapWrapperStyles = exports.column = exports.codeSm = exports.codeMd = exports.codeLg = void 0;
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
11
12
|
var colors = _colors;
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
14
|
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 && Object.prototype.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
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
var
|
|
17
|
+
var headerFont = (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? {
|
|
18
|
+
font: "var(--ds-font-heading-large, normal 500 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
19
|
+
} : {
|
|
20
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(24)
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
|
+
var header = exports.header = (0, _react.css)(headerFont, {
|
|
18
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
26
|
zIndex: _editorSharedStyles.akEditorUnitZIndex,
|
|
20
27
|
minHeight: "var(--ds-space-300, 24px)",
|
|
21
28
|
padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(24),
|
|
24
29
|
display: 'flex',
|
|
25
30
|
justifyContent: 'space-between',
|
|
26
31
|
alignItems: 'center',
|
|
@@ -31,14 +36,17 @@ var header = exports.header = (0, _react.css)({
|
|
|
31
36
|
backgroundColor: "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")"),
|
|
32
37
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
33
38
|
});
|
|
39
|
+
var footerFont = (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? {
|
|
40
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
41
|
+
} : {
|
|
42
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
|
|
43
|
+
lineHeight: "var(--ds-space-250, 20px)"
|
|
44
|
+
};
|
|
34
45
|
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
|
-
var footer = exports.footer = (0, _react.css)({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
|
+
var footer = exports.footer = (0, _react.css)(footerFont, {
|
|
37
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
49
|
zIndex: _editorSharedStyles.akEditorUnitZIndex,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
|
-
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
|
|
41
|
-
lineHeight: "var(--ds-space-250, 20px)",
|
|
42
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
43
51
|
color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
|
|
44
52
|
padding: "var(--ds-space-300, 24px)",
|
package/dist/cjs/ui/utils.js
CHANGED
|
@@ -7,7 +7,10 @@ exports.shortcutNamesWithoutKeymap = exports.getComponentFromKeymap = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _styles = require("./styles");
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @jsxRuntime classic
|
|
12
|
+
* @jsx jsx
|
|
13
|
+
*/
|
|
11
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
15
|
|
|
13
16
|
var getKeyParts = function getKeyParts(keymap) {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -4,7 +4,9 @@ import { bindKeymapWithCommand, openHelp, tooltip } from '@atlaskit/editor-commo
|
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
7
|
-
import QuestionCircleIcon from '@atlaskit/icon/
|
|
7
|
+
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
8
|
+
import { default as QuestionCircleIconLegacy } from '@atlaskit/icon/glyph/question-circle';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { openHelpCommand } from './commands';
|
|
9
11
|
import { pluginKey } from './plugin-key';
|
|
10
12
|
import { HelpDialogLoader } from './ui/HelpDialogLoader';
|
|
@@ -63,7 +65,10 @@ export const helpDialogPlugin = ({
|
|
|
63
65
|
keywords: ['?'],
|
|
64
66
|
priority: 4000,
|
|
65
67
|
keyshortcut: tooltip(openHelp),
|
|
66
|
-
icon: () => /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
68
|
+
icon: () => fg('platform_editor_migration_icon_and_typography') ? /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
69
|
+
label: "",
|
|
70
|
+
color: "currentColor"
|
|
71
|
+
}) : /*#__PURE__*/React.createElement(QuestionCircleIconLegacy, {
|
|
67
72
|
label: ""
|
|
68
73
|
}),
|
|
69
74
|
action(insert) {
|
package/dist/es2019/ui/Modal.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
/** @jsxFrag */
|
|
3
6
|
import React from 'react';
|
|
4
7
|
|
|
@@ -7,6 +10,9 @@ import { jsx } from '@emotion/react';
|
|
|
7
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
11
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
12
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
|
+
import Heading from '@atlaskit/heading';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { Text } from '@atlaskit/primitives';
|
|
10
16
|
import ModalFooter from './ModalFooter';
|
|
11
17
|
import ModalHeader from './ModalHeader';
|
|
12
18
|
import { column, content, contentWrapper, line, row, title } from './styles';
|
|
@@ -25,7 +31,11 @@ export const ModalContent = ({
|
|
|
25
31
|
css: content
|
|
26
32
|
}, jsx("div", {
|
|
27
33
|
css: column
|
|
28
|
-
}, jsx(
|
|
34
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
35
|
+
size: "medium"
|
|
36
|
+
}, jsx(FormattedMessage, messages.keyboardShortcuts)) :
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
38
|
+
jsx("h2", {
|
|
29
39
|
css: title
|
|
30
40
|
}, jsx(FormattedMessage, messages.keyboardShortcuts)), jsx("ul", null, formatting.filter(form => {
|
|
31
41
|
const keymap = form.keymap && form.keymap();
|
|
@@ -35,16 +45,20 @@ export const ModalContent = ({
|
|
|
35
45
|
jsx("li", {
|
|
36
46
|
css: row,
|
|
37
47
|
key: `textFormatting-${form.name}`
|
|
38
|
-
}, jsx("span", null, form.name), getComponentFromKeymap(form.keymap()))), formatting.filter(form => shortcutNamesWithoutKeymap.indexOf(form.type) !== -1).filter(form => form.autoFormatting).map(form =>
|
|
48
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Text, null, form.name) : jsx("span", null, form.name), getComponentFromKeymap(form.keymap()))), formatting.filter(form => shortcutNamesWithoutKeymap.indexOf(form.type) !== -1).filter(form => form.autoFormatting).map(form =>
|
|
39
49
|
// 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
50
|
jsx("li", {
|
|
41
51
|
css: row,
|
|
42
52
|
key: `autoFormatting-${form.name}`
|
|
43
|
-
}, jsx("span", null, form.name), form.autoFormatting())))), jsx("div", {
|
|
53
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Text, null, form.name) : jsx("span", null, form.name), form.autoFormatting())))), jsx("div", {
|
|
44
54
|
css: line
|
|
45
55
|
}), jsx("div", {
|
|
46
56
|
css: column
|
|
47
|
-
}, jsx(
|
|
57
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
58
|
+
size: "medium"
|
|
59
|
+
}, jsx(FormattedMessage, messages.markdown)) :
|
|
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
|
|
61
|
+
jsx("h2", {
|
|
48
62
|
css: title
|
|
49
63
|
}, jsx(FormattedMessage, messages.markdown)), jsx("ul", null, formatting.filter(form => shortcutNamesWithoutKeymap.indexOf(form.type) === -1).map(form => form.autoFormatting &&
|
|
50
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
5
8
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
9
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
|
+
import Heading from '@atlaskit/heading';
|
|
11
|
+
import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
7
12
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
14
|
import { dialogHeader, header, toolbarButton } from './styles';
|
|
9
15
|
const ModalHeader = injectIntl(({
|
|
10
16
|
intl: {
|
|
@@ -16,7 +22,11 @@ const ModalHeader = injectIntl(({
|
|
|
16
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
17
23
|
jsx("div", {
|
|
18
24
|
css: header
|
|
19
|
-
}, jsx(
|
|
25
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
26
|
+
size: "large"
|
|
27
|
+
}, jsx(FormattedMessage, messages.editorHelp)) :
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
29
|
+
jsx("h1", {
|
|
20
30
|
css: dialogHeader
|
|
21
31
|
}, jsx(FormattedMessage, messages.editorHelp)), jsx("div", null, jsx(ToolbarButton
|
|
22
32
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
@@ -24,7 +34,11 @@ const ModalHeader = injectIntl(({
|
|
|
24
34
|
onClick: onClose,
|
|
25
35
|
title: formatMessage(messages.closeHelpDialog),
|
|
26
36
|
spacing: "compact",
|
|
27
|
-
iconBefore: jsx(
|
|
37
|
+
iconBefore: fg('platform_editor_migration_icon_and_typography') ? jsx(CloseIcon, {
|
|
38
|
+
label: formatMessage(messages.closeHelpDialog),
|
|
39
|
+
color: "currentColor",
|
|
40
|
+
spacing: "spacious"
|
|
41
|
+
}) : jsx(CrossIcon, {
|
|
28
42
|
label: formatMessage(messages.closeHelpDialog),
|
|
29
43
|
size: "medium"
|
|
30
44
|
})
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -280,7 +283,7 @@ const otherFormatting = ({
|
|
|
280
283
|
}, "Shift"), ' + ', jsx("span", {
|
|
281
284
|
css: codeSm
|
|
282
285
|
}, "\u2193")))
|
|
283
|
-
}, ...
|
|
286
|
+
}, ...[{
|
|
284
287
|
name: formatMessage(messages.InsertTableColumn),
|
|
285
288
|
type: 'table',
|
|
286
289
|
autoFormatting: () =>
|
|
@@ -320,47 +323,7 @@ const otherFormatting = ({
|
|
|
320
323
|
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
321
324
|
css: codeSm
|
|
322
325
|
}, "[")))
|
|
323
|
-
}]
|
|
324
|
-
name: formatMessage(messages.InsertTableColumn),
|
|
325
|
-
type: 'table',
|
|
326
|
-
autoFormatting: () =>
|
|
327
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
328
|
-
jsx("span", {
|
|
329
|
-
css: shortcutsArray
|
|
330
|
-
}, jsx("span", null, jsx("span", {
|
|
331
|
-
css: codeSm
|
|
332
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
333
|
-
css: codeMd
|
|
334
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
335
|
-
css: codeSm
|
|
336
|
-
}, "\u2192")), jsx("span", null, jsx("span", {
|
|
337
|
-
css: codeSm
|
|
338
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
339
|
-
css: codeMd
|
|
340
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
341
|
-
css: codeSm
|
|
342
|
-
}, "\u2190")))
|
|
343
|
-
}, {
|
|
344
|
-
name: formatMessage(messages.InsertTableRow),
|
|
345
|
-
type: 'table',
|
|
346
|
-
autoFormatting: () =>
|
|
347
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
348
|
-
jsx("span", {
|
|
349
|
-
css: shortcutsArray
|
|
350
|
-
}, jsx("span", null, jsx("span", {
|
|
351
|
-
css: codeSm
|
|
352
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
353
|
-
css: codeMd
|
|
354
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
355
|
-
css: codeSm
|
|
356
|
-
}, "\u2193")), jsx("span", null, jsx("span", {
|
|
357
|
-
css: codeSm
|
|
358
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
359
|
-
css: codeMd
|
|
360
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
361
|
-
css: codeSm
|
|
362
|
-
}, "\u2191")))
|
|
363
|
-
}]), ...[{
|
|
326
|
+
}], ...[{
|
|
364
327
|
name: formatMessage(messages.selectColumnResize),
|
|
365
328
|
type: 'table',
|
|
366
329
|
autoFormatting: () =>
|
package/dist/es2019/ui/index.js
CHANGED
package/dist/es2019/ui/styles.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
6
|
import { B300, N400 } from '@atlaskit/theme/colors';
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const headerFont = fg('platform_editor_migration_icon_and_typography') ? {
|
|
8
|
+
font: "var(--ds-font-heading-large, normal 500 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
9
|
+
} : {
|
|
10
|
+
fontSize: relativeFontSizeToBase16(24)
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
+
export const header = css(headerFont, {
|
|
8
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
16
|
zIndex: akEditorUnitZIndex,
|
|
10
17
|
minHeight: "var(--ds-space-300, 24px)",
|
|
11
18
|
padding: `${"var(--ds-space-250, 20px)"} ${"var(--ds-space-500, 40px)"}`,
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
|
-
fontSize: relativeFontSizeToBase16(24),
|
|
14
19
|
display: 'flex',
|
|
15
20
|
justifyContent: 'space-between',
|
|
16
21
|
alignItems: 'center',
|
|
@@ -21,14 +26,17 @@ export const header = css({
|
|
|
21
26
|
backgroundColor: `var(--ds-background-neutral-subtle, ${colors.N0})`,
|
|
22
27
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
23
28
|
});
|
|
29
|
+
const footerFont = fg('platform_editor_migration_icon_and_typography') ? {
|
|
30
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
31
|
+
} : {
|
|
32
|
+
fontSize: relativeFontSizeToBase16(14),
|
|
33
|
+
lineHeight: "var(--ds-space-250, 20px)"
|
|
34
|
+
};
|
|
24
35
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export const footer = css({
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
37
|
+
export const footer = css(footerFont, {
|
|
27
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
39
|
zIndex: akEditorUnitZIndex,
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
|
-
fontSize: relativeFontSizeToBase16(14),
|
|
31
|
-
lineHeight: "var(--ds-space-250, 20px)",
|
|
32
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
41
|
color: `var(--ds-text-subtlest, ${colors.N300})`,
|
|
34
42
|
padding: "var(--ds-space-300, 24px)",
|
package/dist/es2019/ui/utils.js
CHANGED
package/dist/esm/plugin.js
CHANGED
|
@@ -7,7 +7,9 @@ import { bindKeymapWithCommand, openHelp, tooltip } from '@atlaskit/editor-commo
|
|
|
7
7
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
9
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
10
|
-
import QuestionCircleIcon from '@atlaskit/icon/
|
|
10
|
+
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
11
|
+
import { default as QuestionCircleIconLegacy } from '@atlaskit/icon/glyph/question-circle';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
import { openHelpCommand } from './commands';
|
|
12
14
|
import { pluginKey } from './plugin-key';
|
|
13
15
|
import { HelpDialogLoader } from './ui/HelpDialogLoader';
|
|
@@ -68,7 +70,10 @@ export var helpDialogPlugin = function helpDialogPlugin(_ref) {
|
|
|
68
70
|
priority: 4000,
|
|
69
71
|
keyshortcut: tooltip(openHelp),
|
|
70
72
|
icon: function icon() {
|
|
71
|
-
return /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
73
|
+
return fg('platform_editor_migration_icon_and_typography') ? /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
74
|
+
label: "",
|
|
75
|
+
color: "currentColor"
|
|
76
|
+
}) : /*#__PURE__*/React.createElement(QuestionCircleIconLegacy, {
|
|
72
77
|
label: ""
|
|
73
78
|
});
|
|
74
79
|
},
|
package/dist/esm/ui/Modal.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
/** @jsxFrag */
|
|
3
6
|
import React from 'react';
|
|
4
7
|
|
|
@@ -7,6 +10,9 @@ import { jsx } from '@emotion/react';
|
|
|
7
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
11
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
12
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
|
+
import Heading from '@atlaskit/heading';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { Text } from '@atlaskit/primitives';
|
|
10
16
|
import ModalFooter from './ModalFooter';
|
|
11
17
|
import ModalHeader from './ModalHeader';
|
|
12
18
|
import { column, content, contentWrapper, line, row, title } from './styles';
|
|
@@ -24,7 +30,11 @@ export var ModalContent = function ModalContent(_ref) {
|
|
|
24
30
|
css: content
|
|
25
31
|
}, jsx("div", {
|
|
26
32
|
css: column
|
|
27
|
-
}, jsx(
|
|
33
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
34
|
+
size: "medium"
|
|
35
|
+
}, jsx(FormattedMessage, messages.keyboardShortcuts)) :
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
37
|
+
jsx("h2", {
|
|
28
38
|
css: title
|
|
29
39
|
}, jsx(FormattedMessage, messages.keyboardShortcuts)), jsx("ul", null, formatting.filter(function (form) {
|
|
30
40
|
var keymap = form.keymap && form.keymap();
|
|
@@ -35,7 +45,7 @@ export var ModalContent = function ModalContent(_ref) {
|
|
|
35
45
|
jsx("li", {
|
|
36
46
|
css: row,
|
|
37
47
|
key: "textFormatting-".concat(form.name)
|
|
38
|
-
}, jsx("span", null, form.name), getComponentFromKeymap(form.keymap()))
|
|
48
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Text, null, form.name) : jsx("span", null, form.name), getComponentFromKeymap(form.keymap()))
|
|
39
49
|
);
|
|
40
50
|
}), formatting.filter(function (form) {
|
|
41
51
|
return shortcutNamesWithoutKeymap.indexOf(form.type) !== -1;
|
|
@@ -47,13 +57,17 @@ export var ModalContent = function ModalContent(_ref) {
|
|
|
47
57
|
jsx("li", {
|
|
48
58
|
css: row,
|
|
49
59
|
key: "autoFormatting-".concat(form.name)
|
|
50
|
-
}, jsx("span", null, form.name), form.autoFormatting())
|
|
60
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Text, null, form.name) : jsx("span", null, form.name), form.autoFormatting())
|
|
51
61
|
);
|
|
52
62
|
}))), jsx("div", {
|
|
53
63
|
css: line
|
|
54
64
|
}), jsx("div", {
|
|
55
65
|
css: column
|
|
56
|
-
}, jsx(
|
|
66
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
67
|
+
size: "medium"
|
|
68
|
+
}, jsx(FormattedMessage, messages.markdown)) :
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
70
|
+
jsx("h2", {
|
|
57
71
|
css: title
|
|
58
72
|
}, jsx(FormattedMessage, messages.markdown)), jsx("ul", null, formatting.filter(function (form) {
|
|
59
73
|
return shortcutNamesWithoutKeymap.indexOf(form.type) === -1;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
4
7
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
5
8
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
9
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
|
+
import Heading from '@atlaskit/heading';
|
|
11
|
+
import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
7
12
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
14
|
import { dialogHeader, header, toolbarButton } from './styles';
|
|
9
15
|
var ModalHeader = injectIntl(function (_ref) {
|
|
10
16
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -13,7 +19,11 @@ var ModalHeader = injectIntl(function (_ref) {
|
|
|
13
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
14
20
|
jsx("div", {
|
|
15
21
|
css: header
|
|
16
|
-
}, jsx(
|
|
22
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(Heading, {
|
|
23
|
+
size: "large"
|
|
24
|
+
}, jsx(FormattedMessage, messages.editorHelp)) :
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
26
|
+
jsx("h1", {
|
|
17
27
|
css: dialogHeader
|
|
18
28
|
}, jsx(FormattedMessage, messages.editorHelp)), jsx("div", null, jsx(ToolbarButton
|
|
19
29
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
@@ -21,7 +31,11 @@ var ModalHeader = injectIntl(function (_ref) {
|
|
|
21
31
|
onClick: onClose,
|
|
22
32
|
title: formatMessage(messages.closeHelpDialog),
|
|
23
33
|
spacing: "compact",
|
|
24
|
-
iconBefore: jsx(
|
|
34
|
+
iconBefore: fg('platform_editor_migration_icon_and_typography') ? jsx(CloseIcon, {
|
|
35
|
+
label: formatMessage(messages.closeHelpDialog),
|
|
36
|
+
color: "currentColor",
|
|
37
|
+
spacing: "spacious"
|
|
38
|
+
}) : jsx(CrossIcon, {
|
|
25
39
|
label: formatMessage(messages.closeHelpDialog),
|
|
26
40
|
size: "medium"
|
|
27
41
|
})
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -389,7 +392,7 @@ var otherFormatting = function otherFormatting(_ref3) {
|
|
|
389
392
|
}, "\u2193")))
|
|
390
393
|
);
|
|
391
394
|
}
|
|
392
|
-
}].concat(
|
|
395
|
+
}].concat([{
|
|
393
396
|
name: formatMessage(messages.InsertTableColumn),
|
|
394
397
|
type: 'table',
|
|
395
398
|
autoFormatting: function autoFormatting() {
|
|
@@ -435,53 +438,7 @@ var otherFormatting = function otherFormatting(_ref3) {
|
|
|
435
438
|
}, "[")))
|
|
436
439
|
);
|
|
437
440
|
}
|
|
438
|
-
}]
|
|
439
|
-
name: formatMessage(messages.InsertTableColumn),
|
|
440
|
-
type: 'table',
|
|
441
|
-
autoFormatting: function autoFormatting() {
|
|
442
|
-
return (
|
|
443
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
444
|
-
jsx("span", {
|
|
445
|
-
css: shortcutsArray
|
|
446
|
-
}, jsx("span", null, jsx("span", {
|
|
447
|
-
css: codeSm
|
|
448
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
449
|
-
css: codeMd
|
|
450
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
451
|
-
css: codeSm
|
|
452
|
-
}, "\u2192")), jsx("span", null, jsx("span", {
|
|
453
|
-
css: codeSm
|
|
454
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
455
|
-
css: codeMd
|
|
456
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
457
|
-
css: codeSm
|
|
458
|
-
}, "\u2190")))
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
}, {
|
|
462
|
-
name: formatMessage(messages.InsertTableRow),
|
|
463
|
-
type: 'table',
|
|
464
|
-
autoFormatting: function autoFormatting() {
|
|
465
|
-
return (
|
|
466
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
467
|
-
jsx("span", {
|
|
468
|
-
css: shortcutsArray
|
|
469
|
-
}, jsx("span", null, jsx("span", {
|
|
470
|
-
css: codeSm
|
|
471
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
472
|
-
css: codeMd
|
|
473
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
474
|
-
css: codeSm
|
|
475
|
-
}, "\u2193")), jsx("span", null, jsx("span", {
|
|
476
|
-
css: codeSm
|
|
477
|
-
}, browser.mac ? '⌃' : 'Ctrl'), ' + ', jsx("span", {
|
|
478
|
-
css: codeMd
|
|
479
|
-
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx("span", {
|
|
480
|
-
css: codeSm
|
|
481
|
-
}, "\u2191")))
|
|
482
|
-
);
|
|
483
|
-
}
|
|
484
|
-
}]), [{
|
|
441
|
+
}], [{
|
|
485
442
|
name: formatMessage(messages.selectColumnResize),
|
|
486
443
|
type: 'table',
|
|
487
444
|
autoFormatting: function autoFormatting() {
|
package/dist/esm/ui/index.js
CHANGED
package/dist/esm/ui/styles.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
6
|
import { B300, N400 } from '@atlaskit/theme/colors';
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
var headerFont = fg('platform_editor_migration_icon_and_typography') ? {
|
|
8
|
+
font: "var(--ds-font-heading-large, normal 500 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
9
|
+
} : {
|
|
10
|
+
fontSize: relativeFontSizeToBase16(24)
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
+
export var header = css(headerFont, {
|
|
8
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
16
|
zIndex: akEditorUnitZIndex,
|
|
10
17
|
minHeight: "var(--ds-space-300, 24px)",
|
|
11
18
|
padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
13
|
-
fontSize: relativeFontSizeToBase16(24),
|
|
14
19
|
display: 'flex',
|
|
15
20
|
justifyContent: 'space-between',
|
|
16
21
|
alignItems: 'center',
|
|
@@ -21,14 +26,17 @@ export var header = css({
|
|
|
21
26
|
backgroundColor: "var(--ds-background-neutral-subtle, ".concat(colors.N0, ")"),
|
|
22
27
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
23
28
|
});
|
|
29
|
+
var footerFont = fg('platform_editor_migration_icon_and_typography') ? {
|
|
30
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
31
|
+
} : {
|
|
32
|
+
fontSize: relativeFontSizeToBase16(14),
|
|
33
|
+
lineHeight: "var(--ds-space-250, 20px)"
|
|
34
|
+
};
|
|
24
35
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export var footer = css({
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
37
|
+
export var footer = css(footerFont, {
|
|
27
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
39
|
zIndex: akEditorUnitZIndex,
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
|
-
fontSize: relativeFontSizeToBase16(14),
|
|
31
|
-
lineHeight: "var(--ds-space-250, 20px)",
|
|
32
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
41
|
color: "var(--ds-text-subtlest, ".concat(colors.N300, ")"),
|
|
34
42
|
padding: "var(--ds-space-300, 24px)",
|
package/dist/esm/ui/utils.js
CHANGED
package/dist/types/ui/Modal.d.ts
CHANGED
package/dist/types/ui/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,16 +32,18 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^86.
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
35
|
+
"@atlaskit/editor-common": "^86.7.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.5.0",
|
|
37
37
|
"@atlaskit/editor-plugin-quick-insert": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
40
|
-
"@atlaskit/
|
|
40
|
+
"@atlaskit/heading": "^2.4.0",
|
|
41
|
+
"@atlaskit/icon": "^22.7.0",
|
|
41
42
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
42
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
|
+
"@atlaskit/primitives": "^11.0.0",
|
|
43
45
|
"@atlaskit/theme": "^12.11.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.56.0",
|
|
45
47
|
"@babel/runtime": "^7.0.0",
|
|
46
48
|
"@emotion/react": "^11.7.1",
|
|
47
49
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
@@ -84,10 +86,10 @@
|
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
88
|
"platform-feature-flags": {
|
|
87
|
-
"
|
|
89
|
+
"platform_editor_a11y_table_context_menu": {
|
|
88
90
|
"type": "boolean"
|
|
89
91
|
},
|
|
90
|
-
"
|
|
92
|
+
"platform_editor_migration_icon_and_typography": {
|
|
91
93
|
"type": "boolean"
|
|
92
94
|
}
|
|
93
95
|
}
|