@atlaskit/editor-plugin-help-dialog 6.0.9 → 6.0.11
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 +14 -0
- package/dist/cjs/ui/ModalContent.js +4 -3
- package/dist/cjs/ui/formatting.js +30 -29
- package/dist/cjs/ui/utils.js +4 -2
- package/dist/es2019/ui/ModalContent.js +4 -3
- package/dist/es2019/ui/formatting.js +171 -168
- package/dist/es2019/ui/utils.js +3 -1
- package/dist/esm/ui/ModalContent.js +4 -3
- package/dist/esm/ui/formatting.js +5 -4
- package/dist/esm/ui/utils.js +3 -1
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 6.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.0.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`6a8ea33d35037`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a8ea33d35037) -
|
|
14
|
+
upgrade use of browser util
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.0.9
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,8 +11,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
11
11
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _ModalFooter = _interopRequireDefault(require("./ModalFooter"));
|
|
17
17
|
var _ModalHeader = _interopRequireDefault(require("./ModalHeader"));
|
|
18
18
|
var _styles = require("./styles");
|
|
@@ -28,11 +28,12 @@ var _utils = require("./utils");
|
|
|
28
28
|
var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
29
29
|
var formatting = _ref.formatting,
|
|
30
30
|
onClose = _ref.onClose;
|
|
31
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
31
32
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_ModalHeader.default, {
|
|
32
33
|
onClose: onClose
|
|
33
34
|
}), (0, _react2.jsx)("div", {
|
|
34
35
|
css: _styles.contentWrapper,
|
|
35
|
-
tabIndex:
|
|
36
|
+
tabIndex: 0
|
|
36
37
|
}, (0, _react2.jsx)("div", {
|
|
37
38
|
css: _styles.line
|
|
38
39
|
}), (0, _react2.jsx)("div", {
|
|
@@ -46,7 +47,7 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
|
|
|
46
47
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
47
48
|
, _messages.helpDialogMessages.keyboardShortcuts)), (0, _react2.jsx)("ul", null, formatting.filter(function (form) {
|
|
48
49
|
var keymap = form.keymap && form.keymap();
|
|
49
|
-
return keymap && keymap[
|
|
50
|
+
return keymap && keymap[browser.mac ? 'mac' : 'windows'];
|
|
50
51
|
}).map(function (form) {
|
|
51
52
|
// Ignored via go/ees005
|
|
52
53
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -11,8 +11,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
11
11
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
12
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _primitives = require("@atlaskit/primitives");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
/**
|
|
@@ -397,6 +397,7 @@ var quickInsertAskAI = function quickInsertAskAI(_ref3) {
|
|
|
397
397
|
};
|
|
398
398
|
var otherFormatting = function otherFormatting(_ref4) {
|
|
399
399
|
var formatMessage = _ref4.formatMessage;
|
|
400
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
400
401
|
return [{
|
|
401
402
|
name: formatMessage(_messages.toolbarMessages.clearFormatting),
|
|
402
403
|
type: 'clearFormatting',
|
|
@@ -413,7 +414,7 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
413
414
|
name: formatMessage(_messages.undoRedoMessages.redo),
|
|
414
415
|
type: 'redo',
|
|
415
416
|
keymap: function keymap() {
|
|
416
|
-
return
|
|
417
|
+
return _keymaps.redoAlt;
|
|
417
418
|
}
|
|
418
419
|
}, {
|
|
419
420
|
name: formatMessage(_messages.helpDialogMessages.pastePlainText),
|
|
@@ -443,11 +444,11 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
443
444
|
css: _styles.shortcutsArray
|
|
444
445
|
}, (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
445
446
|
as: "span",
|
|
446
|
-
xcss:
|
|
447
|
-
},
|
|
447
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
448
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
448
449
|
as: "span",
|
|
449
450
|
xcss: codeMd
|
|
450
|
-
},
|
|
451
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
451
452
|
as: "span",
|
|
452
453
|
xcss: codeMd
|
|
453
454
|
}, "Shift"), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
@@ -455,11 +456,11 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
455
456
|
xcss: codeSm
|
|
456
457
|
}, "\u2190")), (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
457
458
|
as: "span",
|
|
458
|
-
xcss:
|
|
459
|
-
},
|
|
459
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
460
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
460
461
|
as: "span",
|
|
461
462
|
xcss: codeMd
|
|
462
|
-
},
|
|
463
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
463
464
|
as: "span",
|
|
464
465
|
xcss: codeMd
|
|
465
466
|
}, "Shift"), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
@@ -478,11 +479,11 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
478
479
|
css: _styles.shortcutsArray
|
|
479
480
|
}, (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
480
481
|
as: "span",
|
|
481
|
-
xcss:
|
|
482
|
-
},
|
|
482
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
483
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
483
484
|
as: "span",
|
|
484
485
|
xcss: codeMd
|
|
485
|
-
},
|
|
486
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
486
487
|
as: "span",
|
|
487
488
|
xcss: codeMd
|
|
488
489
|
}, "Shift"), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
@@ -490,11 +491,11 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
490
491
|
xcss: codeSm
|
|
491
492
|
}, "\u2191")), (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
492
493
|
as: "span",
|
|
493
|
-
xcss:
|
|
494
|
-
},
|
|
494
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
495
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
495
496
|
as: "span",
|
|
496
497
|
xcss: codeMd
|
|
497
|
-
},
|
|
498
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
498
499
|
as: "span",
|
|
499
500
|
xcss: codeMd
|
|
500
501
|
}, "Shift"), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
@@ -513,20 +514,20 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
513
514
|
css: _styles.shortcutsArray
|
|
514
515
|
}, (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
515
516
|
as: "span",
|
|
516
|
-
xcss:
|
|
517
|
-
},
|
|
517
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
518
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
518
519
|
as: "span",
|
|
519
520
|
xcss: codeMd
|
|
520
|
-
},
|
|
521
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
521
522
|
as: "span",
|
|
522
523
|
xcss: codeSm
|
|
523
524
|
}, "=")), (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
524
525
|
as: "span",
|
|
525
|
-
xcss:
|
|
526
|
-
},
|
|
526
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
527
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
527
528
|
as: "span",
|
|
528
529
|
xcss: codeMd
|
|
529
|
-
},
|
|
530
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
530
531
|
as: "span",
|
|
531
532
|
xcss: codeSm
|
|
532
533
|
}, "-")))
|
|
@@ -542,20 +543,20 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
542
543
|
css: _styles.shortcutsArray
|
|
543
544
|
}, (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
544
545
|
as: "span",
|
|
545
|
-
xcss:
|
|
546
|
-
},
|
|
546
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
547
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
547
548
|
as: "span",
|
|
548
549
|
xcss: codeMd
|
|
549
|
-
},
|
|
550
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
550
551
|
as: "span",
|
|
551
552
|
xcss: codeSm
|
|
552
553
|
}, "]")), (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
553
554
|
as: "span",
|
|
554
|
-
xcss:
|
|
555
|
-
},
|
|
555
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
556
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
556
557
|
as: "span",
|
|
557
558
|
xcss: codeMd
|
|
558
|
-
},
|
|
559
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
559
560
|
as: "span",
|
|
560
561
|
xcss: codeSm
|
|
561
562
|
}, "[")))
|
|
@@ -571,11 +572,11 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
571
572
|
css: _styles.shortcutsArray
|
|
572
573
|
}, (0, _react.jsx)("span", null, (0, _react.jsx)(_primitives.Box, {
|
|
573
574
|
as: "span",
|
|
574
|
-
xcss:
|
|
575
|
-
},
|
|
575
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
576
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
576
577
|
as: "span",
|
|
577
578
|
xcss: codeMd
|
|
578
|
-
},
|
|
579
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
|
|
579
580
|
as: "span",
|
|
580
581
|
xcss: codeMd
|
|
581
582
|
}, "Shift"), ' + ', (0, _react.jsx)(_primitives.Box, {
|
package/dist/cjs/ui/utils.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.shortcutNamesWithoutKeymap = exports.getComponentFromKeymap = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
9
9
|
var _primitives = require("@atlaskit/primitives");
|
|
10
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
11
|
var _styles = require("./styles");
|
|
11
12
|
/**
|
|
12
13
|
* @jsxRuntime classic
|
|
@@ -44,8 +45,9 @@ var codeSm = (0, _primitives.xcss)({
|
|
|
44
45
|
textAlign: 'center'
|
|
45
46
|
});
|
|
46
47
|
var getKeyParts = function getKeyParts(keymap) {
|
|
47
|
-
var
|
|
48
|
-
|
|
48
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
49
|
+
var shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
50
|
+
if (browser.mac) {
|
|
49
51
|
shortcut = shortcut.replace('Alt', 'Opt');
|
|
50
52
|
}
|
|
51
53
|
// Ignored via go/ees005
|
|
@@ -8,11 +8,11 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
11
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
12
12
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
import Heading from '@atlaskit/heading';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import ModalFooter from './ModalFooter';
|
|
17
17
|
import ModalHeader from './ModalHeader';
|
|
18
18
|
import { column, content, contentWrapper, line, row } from './styles';
|
|
@@ -21,11 +21,12 @@ export const ModalContent = ({
|
|
|
21
21
|
formatting,
|
|
22
22
|
onClose
|
|
23
23
|
}) => {
|
|
24
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
24
25
|
return jsx(React.Fragment, null, jsx(ModalHeader, {
|
|
25
26
|
onClose: onClose
|
|
26
27
|
}), jsx("div", {
|
|
27
28
|
css: contentWrapper,
|
|
28
|
-
tabIndex:
|
|
29
|
+
tabIndex: 0
|
|
29
30
|
}, jsx("div", {
|
|
30
31
|
css: line
|
|
31
32
|
}), jsx("div", {
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
9
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText,
|
|
8
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
9
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
10
10
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
12
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
15
|
import { shortcutsArray } from './styles';
|
|
16
16
|
const codeSm = xcss({
|
|
@@ -294,171 +294,174 @@ const quickInsertAskAI = ({
|
|
|
294
294
|
});
|
|
295
295
|
const otherFormatting = ({
|
|
296
296
|
formatMessage
|
|
297
|
-
}) =>
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
css
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
css
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
css
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
css
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
css
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
297
|
+
}) => {
|
|
298
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
299
|
+
return [{
|
|
300
|
+
name: formatMessage(toolbarMessages.clearFormatting),
|
|
301
|
+
type: 'clearFormatting',
|
|
302
|
+
keymap: () => clearFormatting
|
|
303
|
+
}, {
|
|
304
|
+
name: formatMessage(undoRedoMessages.undo),
|
|
305
|
+
type: 'undo',
|
|
306
|
+
keymap: () => undo
|
|
307
|
+
}, {
|
|
308
|
+
name: formatMessage(undoRedoMessages.redo),
|
|
309
|
+
type: 'redo',
|
|
310
|
+
keymap: () => redoAlt
|
|
311
|
+
}, {
|
|
312
|
+
name: formatMessage(messages.pastePlainText),
|
|
313
|
+
type: 'paste',
|
|
314
|
+
keymap: () => pastePlainText
|
|
315
|
+
}, {
|
|
316
|
+
name: formatMessage(annotationMessages.createComment),
|
|
317
|
+
type: 'annotation',
|
|
318
|
+
keymap: () => addInlineComment
|
|
319
|
+
}, {
|
|
320
|
+
name: formatMessage(messages.CheckUncheckActionItem),
|
|
321
|
+
type: 'checkbox',
|
|
322
|
+
keymap: () => toggleTaskItemCheckbox
|
|
323
|
+
}, {
|
|
324
|
+
name: formatMessage(messages.selectTableRow),
|
|
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(Box, {
|
|
331
|
+
as: "span",
|
|
332
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
333
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
334
|
+
as: "span",
|
|
335
|
+
xcss: codeMd
|
|
336
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
337
|
+
as: "span",
|
|
338
|
+
xcss: codeMd
|
|
339
|
+
}, "Shift"), ' + ', jsx(Box, {
|
|
340
|
+
as: "span",
|
|
341
|
+
xcss: codeSm
|
|
342
|
+
}, "\u2190")), jsx("span", null, jsx(Box, {
|
|
343
|
+
as: "span",
|
|
344
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
345
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
346
|
+
as: "span",
|
|
347
|
+
xcss: codeMd
|
|
348
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
349
|
+
as: "span",
|
|
350
|
+
xcss: codeMd
|
|
351
|
+
}, "Shift"), ' + ', jsx(Box, {
|
|
352
|
+
as: "span",
|
|
353
|
+
xcss: codeSm
|
|
354
|
+
}, "\u2192")))
|
|
355
|
+
}, {
|
|
356
|
+
name: formatMessage(messages.selectTableColumn),
|
|
357
|
+
type: 'table',
|
|
358
|
+
autoFormatting: () =>
|
|
359
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
360
|
+
jsx("span", {
|
|
361
|
+
css: shortcutsArray
|
|
362
|
+
}, jsx("span", null, jsx(Box, {
|
|
363
|
+
as: "span",
|
|
364
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
365
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
366
|
+
as: "span",
|
|
367
|
+
xcss: codeMd
|
|
368
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
369
|
+
as: "span",
|
|
370
|
+
xcss: codeMd
|
|
371
|
+
}, "Shift"), ' + ', jsx(Box, {
|
|
372
|
+
as: "span",
|
|
373
|
+
xcss: codeSm
|
|
374
|
+
}, "\u2191")), jsx("span", null, jsx(Box, {
|
|
375
|
+
as: "span",
|
|
376
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
377
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
378
|
+
as: "span",
|
|
379
|
+
xcss: codeMd
|
|
380
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
381
|
+
as: "span",
|
|
382
|
+
xcss: codeMd
|
|
383
|
+
}, "Shift"), ' + ', jsx(Box, {
|
|
384
|
+
as: "span",
|
|
385
|
+
xcss: codeSm
|
|
386
|
+
}, "\u2193")))
|
|
387
|
+
}, ...[{
|
|
388
|
+
name: formatMessage(messages.InsertTableColumn),
|
|
389
|
+
type: 'table',
|
|
390
|
+
autoFormatting: () =>
|
|
391
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
392
|
+
jsx("span", {
|
|
393
|
+
css: shortcutsArray
|
|
394
|
+
}, jsx("span", null, jsx(Box, {
|
|
395
|
+
as: "span",
|
|
396
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
397
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
398
|
+
as: "span",
|
|
399
|
+
xcss: codeMd
|
|
400
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
401
|
+
as: "span",
|
|
402
|
+
xcss: codeSm
|
|
403
|
+
}, "=")), jsx("span", null, jsx(Box, {
|
|
404
|
+
as: "span",
|
|
405
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
406
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
407
|
+
as: "span",
|
|
408
|
+
xcss: codeMd
|
|
409
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
410
|
+
as: "span",
|
|
411
|
+
xcss: codeSm
|
|
412
|
+
}, "-")))
|
|
413
|
+
}, {
|
|
414
|
+
name: formatMessage(messages.InsertTableRow),
|
|
415
|
+
type: 'table',
|
|
416
|
+
autoFormatting: () =>
|
|
417
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
418
|
+
jsx("span", {
|
|
419
|
+
css: shortcutsArray
|
|
420
|
+
}, jsx("span", null, jsx(Box, {
|
|
421
|
+
as: "span",
|
|
422
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
423
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
424
|
+
as: "span",
|
|
425
|
+
xcss: codeMd
|
|
426
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
427
|
+
as: "span",
|
|
428
|
+
xcss: codeSm
|
|
429
|
+
}, "]")), jsx("span", null, jsx(Box, {
|
|
430
|
+
as: "span",
|
|
431
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
432
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
433
|
+
as: "span",
|
|
434
|
+
xcss: codeMd
|
|
435
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
436
|
+
as: "span",
|
|
437
|
+
xcss: codeSm
|
|
438
|
+
}, "[")))
|
|
439
|
+
}], ...[{
|
|
440
|
+
name: formatMessage(messages.selectColumnResize),
|
|
441
|
+
type: 'table',
|
|
442
|
+
autoFormatting: () =>
|
|
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(Box, {
|
|
447
|
+
as: "span",
|
|
448
|
+
xcss: browser.mac ? codeSm : codeMd
|
|
449
|
+
}, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
|
|
450
|
+
as: "span",
|
|
451
|
+
xcss: codeMd
|
|
452
|
+
}, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
|
|
453
|
+
as: "span",
|
|
454
|
+
xcss: codeMd
|
|
455
|
+
}, "Shift"), ' + ', jsx(Box, {
|
|
456
|
+
as: "span",
|
|
457
|
+
xcss: codeSm
|
|
458
|
+
}, "C")))
|
|
459
|
+
}], {
|
|
460
|
+
name: formatMessage(messages.highlightColor),
|
|
461
|
+
type: 'highlight',
|
|
462
|
+
keymap: () => toggleHighlightPalette
|
|
463
|
+
}];
|
|
464
|
+
};
|
|
462
465
|
const resizeInformationFormatting = ({
|
|
463
466
|
formatMessage
|
|
464
467
|
}) => [{
|
package/dist/es2019/ui/utils.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
7
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
9
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { componentFromKeymapWrapperStyles } from './styles';
|
|
11
12
|
const codeLg = xcss({
|
|
12
13
|
borderRadius: 'radius.small',
|
|
@@ -36,6 +37,7 @@ const codeSm = xcss({
|
|
|
36
37
|
textAlign: 'center'
|
|
37
38
|
});
|
|
38
39
|
const getKeyParts = keymap => {
|
|
40
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
39
41
|
let shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
40
42
|
if (browser.mac) {
|
|
41
43
|
shortcut = shortcut.replace('Alt', 'Opt');
|
|
@@ -8,11 +8,11 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
11
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
12
12
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
import Heading from '@atlaskit/heading';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import ModalFooter from './ModalFooter';
|
|
17
17
|
import ModalHeader from './ModalHeader';
|
|
18
18
|
import { column, content, contentWrapper, line, row } from './styles';
|
|
@@ -20,11 +20,12 @@ import { getComponentFromKeymap, shortcutNamesWithoutKeymap } from './utils';
|
|
|
20
20
|
export var ModalContent = function ModalContent(_ref) {
|
|
21
21
|
var formatting = _ref.formatting,
|
|
22
22
|
onClose = _ref.onClose;
|
|
23
|
+
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
23
24
|
return jsx(React.Fragment, null, jsx(ModalHeader, {
|
|
24
25
|
onClose: onClose
|
|
25
26
|
}), jsx("div", {
|
|
26
27
|
css: contentWrapper,
|
|
27
|
-
tabIndex:
|
|
28
|
+
tabIndex: 0
|
|
28
29
|
}, jsx("div", {
|
|
29
30
|
css: line
|
|
30
31
|
}), jsx("div", {
|
|
@@ -6,12 +6,12 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
10
|
-
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText,
|
|
9
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
|
+
import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQuickInsert, clearFormatting, decreaseMediaSize, focusTableResizer, focusToContextMenuTrigger, increaseMediaSize, insertRule, navToEditorToolbar, navToFloatingToolbar, pastePlainText, redoAlt, setNormalText, toggleBlockQuote, toggleBold, toggleBulletList, toggleCode, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleHighlightPalette, toggleItalic, toggleOrderedList, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleTaskItemCheckbox, toggleUnderline, undo } from '@atlaskit/editor-common/keymaps';
|
|
11
11
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
14
13
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
16
|
import { shortcutsArray } from './styles';
|
|
17
17
|
var codeSm = xcss({
|
|
@@ -388,6 +388,7 @@ var quickInsertAskAI = function quickInsertAskAI(_ref3) {
|
|
|
388
388
|
};
|
|
389
389
|
var otherFormatting = function otherFormatting(_ref4) {
|
|
390
390
|
var formatMessage = _ref4.formatMessage;
|
|
391
|
+
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
391
392
|
return [{
|
|
392
393
|
name: formatMessage(toolbarMessages.clearFormatting),
|
|
393
394
|
type: 'clearFormatting',
|
|
@@ -404,7 +405,7 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
404
405
|
name: formatMessage(undoRedoMessages.redo),
|
|
405
406
|
type: 'redo',
|
|
406
407
|
keymap: function keymap() {
|
|
407
|
-
return
|
|
408
|
+
return redoAlt;
|
|
408
409
|
}
|
|
409
410
|
}, {
|
|
410
411
|
name: formatMessage(messages.pastePlainText),
|
package/dist/esm/ui/utils.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
7
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
9
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { componentFromKeymapWrapperStyles } from './styles';
|
|
11
12
|
var codeLg = xcss({
|
|
12
13
|
borderRadius: 'radius.small',
|
|
@@ -36,6 +37,7 @@ var codeSm = xcss({
|
|
|
36
37
|
textAlign: 'center'
|
|
37
38
|
});
|
|
38
39
|
var getKeyParts = function getKeyParts(keymap) {
|
|
40
|
+
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
39
41
|
var shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
40
42
|
if (browser.mac) {
|
|
41
43
|
shortcut = shortcut.replace('Alt', 'Opt');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.11",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"@atlaskit/editor-shared-styles": "^3.8.0",
|
|
36
36
|
"@atlaskit/heading": "^5.2.0",
|
|
37
37
|
"@atlaskit/icon": "^28.5.0",
|
|
38
|
-
"@atlaskit/modal-dialog": "^14.
|
|
38
|
+
"@atlaskit/modal-dialog": "^14.6.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/primitives": "^16.
|
|
40
|
+
"@atlaskit/primitives": "^16.1.0",
|
|
41
41
|
"@atlaskit/theme": "^21.0.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
43
|
-
"@atlaskit/tokens": "^
|
|
44
|
-
"@atlaskit/tooltip": "^20.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^13.32.0",
|
|
43
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
44
|
+
"@atlaskit/tooltip": "^20.8.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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/react": "^13.4.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^110.
|
|
54
|
+
"@atlaskit/editor-common": "^110.24.0",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|
|
57
57
|
"techstack": {
|
|
@@ -88,18 +88,12 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"platform-feature-flags": {
|
|
91
|
-
"platform_editor_cmd_y_mac_redo_shortcut": {
|
|
92
|
-
"type": "boolean"
|
|
93
|
-
},
|
|
94
91
|
"platform_editor_fix_help_dialog_color_contrast": {
|
|
95
92
|
"type": "boolean"
|
|
96
93
|
},
|
|
97
94
|
"platform_editor_update_modal_close_button": {
|
|
98
95
|
"type": "boolean"
|
|
99
96
|
},
|
|
100
|
-
"platform_editor_help_dialog_a11y": {
|
|
101
|
-
"type": "boolean"
|
|
102
|
-
},
|
|
103
97
|
"platform_editor_fix_help_modal_header": {
|
|
104
98
|
"type": "boolean"
|
|
105
99
|
}
|