@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 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: (0, _platformFeatureFlags.fg)('platform_editor_help_dialog_a11y') ? 0 : undefined
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[_browser.browser.mac ? 'mac' : 'windows'];
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 (0, _platformFeatureFlags.fg)('platform_editor_cmd_y_mac_redo_shortcut') ? _keymaps.redoAlt : _keymaps.redo;
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: _browser.browser.mac ? codeSm : codeMd
447
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
447
+ xcss: browser.mac ? codeSm : codeMd
448
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
448
449
  as: "span",
449
450
  xcss: codeMd
450
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
459
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
459
+ xcss: browser.mac ? codeSm : codeMd
460
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
460
461
  as: "span",
461
462
  xcss: codeMd
462
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
482
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
482
+ xcss: browser.mac ? codeSm : codeMd
483
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
483
484
  as: "span",
484
485
  xcss: codeMd
485
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
494
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
494
+ xcss: browser.mac ? codeSm : codeMd
495
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
495
496
  as: "span",
496
497
  xcss: codeMd
497
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
517
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
517
+ xcss: browser.mac ? codeSm : codeMd
518
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
518
519
  as: "span",
519
520
  xcss: codeMd
520
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
526
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
526
+ xcss: browser.mac ? codeSm : codeMd
527
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
527
528
  as: "span",
528
529
  xcss: codeMd
529
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
546
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
546
+ xcss: browser.mac ? codeSm : codeMd
547
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
547
548
  as: "span",
548
549
  xcss: codeMd
549
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
555
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
555
+ xcss: browser.mac ? codeSm : codeMd
556
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
556
557
  as: "span",
557
558
  xcss: codeMd
558
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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: _browser.browser.mac ? codeSm : codeMd
575
- }, _browser.browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
575
+ xcss: browser.mac ? codeSm : codeMd
576
+ }, browser.mac ? '⌘' : 'Ctrl'), ' + ', (0, _react.jsx)(_primitives.Box, {
576
577
  as: "span",
577
578
  xcss: codeMd
578
- }, _browser.browser.mac ? 'Opt' : 'Alt'), ' + ', (0, _react.jsx)(_primitives.Box, {
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, {
@@ -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 shortcut = keymap[_browser.browser.mac ? 'mac' : 'windows'];
48
- if (_browser.browser.mac) {
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: fg('platform_editor_help_dialog_a11y') ? 0 : undefined
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, redo, 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';
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
- name: formatMessage(toolbarMessages.clearFormatting),
299
- type: 'clearFormatting',
300
- keymap: () => clearFormatting
301
- }, {
302
- name: formatMessage(undoRedoMessages.undo),
303
- type: 'undo',
304
- keymap: () => undo
305
- }, {
306
- name: formatMessage(undoRedoMessages.redo),
307
- type: 'redo',
308
- keymap: () => fg('platform_editor_cmd_y_mac_redo_shortcut') ? redoAlt : redo
309
- }, {
310
- name: formatMessage(messages.pastePlainText),
311
- type: 'paste',
312
- keymap: () => pastePlainText
313
- }, {
314
- name: formatMessage(annotationMessages.createComment),
315
- type: 'annotation',
316
- keymap: () => addInlineComment
317
- }, {
318
- name: formatMessage(messages.CheckUncheckActionItem),
319
- type: 'checkbox',
320
- keymap: () => toggleTaskItemCheckbox
321
- }, {
322
- name: formatMessage(messages.selectTableRow),
323
- type: 'table',
324
- autoFormatting: () =>
325
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
326
- jsx("span", {
327
- css: shortcutsArray
328
- }, jsx("span", null, jsx(Box, {
329
- as: "span",
330
- xcss: browser.mac ? codeSm : codeMd
331
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
332
- as: "span",
333
- xcss: codeMd
334
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
335
- as: "span",
336
- xcss: codeMd
337
- }, "Shift"), ' + ', jsx(Box, {
338
- as: "span",
339
- xcss: codeSm
340
- }, "\u2190")), jsx("span", null, jsx(Box, {
341
- as: "span",
342
- xcss: browser.mac ? codeSm : codeMd
343
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
344
- as: "span",
345
- xcss: codeMd
346
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
347
- as: "span",
348
- xcss: codeMd
349
- }, "Shift"), ' + ', jsx(Box, {
350
- as: "span",
351
- xcss: codeSm
352
- }, "\u2192")))
353
- }, {
354
- name: formatMessage(messages.selectTableColumn),
355
- type: 'table',
356
- autoFormatting: () =>
357
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
358
- jsx("span", {
359
- css: shortcutsArray
360
- }, jsx("span", null, jsx(Box, {
361
- as: "span",
362
- xcss: browser.mac ? codeSm : codeMd
363
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
364
- as: "span",
365
- xcss: codeMd
366
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
367
- as: "span",
368
- xcss: codeMd
369
- }, "Shift"), ' + ', jsx(Box, {
370
- as: "span",
371
- xcss: codeSm
372
- }, "\u2191")), jsx("span", null, jsx(Box, {
373
- as: "span",
374
- xcss: browser.mac ? codeSm : codeMd
375
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
376
- as: "span",
377
- xcss: codeMd
378
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
379
- as: "span",
380
- xcss: codeMd
381
- }, "Shift"), ' + ', jsx(Box, {
382
- as: "span",
383
- xcss: codeSm
384
- }, "\u2193")))
385
- }, ...[{
386
- name: formatMessage(messages.InsertTableColumn),
387
- type: 'table',
388
- autoFormatting: () =>
389
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
390
- jsx("span", {
391
- css: shortcutsArray
392
- }, jsx("span", null, jsx(Box, {
393
- as: "span",
394
- xcss: browser.mac ? codeSm : codeMd
395
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
396
- as: "span",
397
- xcss: codeMd
398
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
399
- as: "span",
400
- xcss: codeSm
401
- }, "=")), jsx("span", null, jsx(Box, {
402
- as: "span",
403
- xcss: browser.mac ? codeSm : codeMd
404
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
405
- as: "span",
406
- xcss: codeMd
407
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
408
- as: "span",
409
- xcss: codeSm
410
- }, "-")))
411
- }, {
412
- name: formatMessage(messages.InsertTableRow),
413
- type: 'table',
414
- autoFormatting: () =>
415
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
416
- jsx("span", {
417
- css: shortcutsArray
418
- }, jsx("span", null, jsx(Box, {
419
- as: "span",
420
- xcss: browser.mac ? codeSm : codeMd
421
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
422
- as: "span",
423
- xcss: codeMd
424
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
425
- as: "span",
426
- xcss: codeSm
427
- }, "]")), jsx("span", null, jsx(Box, {
428
- as: "span",
429
- xcss: browser.mac ? codeSm : codeMd
430
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
431
- as: "span",
432
- xcss: codeMd
433
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
434
- as: "span",
435
- xcss: codeSm
436
- }, "[")))
437
- }], ...[{
438
- name: formatMessage(messages.selectColumnResize),
439
- type: 'table',
440
- autoFormatting: () =>
441
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
442
- jsx("span", {
443
- css: shortcutsArray
444
- }, jsx("span", null, jsx(Box, {
445
- as: "span",
446
- xcss: browser.mac ? codeSm : codeMd
447
- }, browser.mac ? '⌘' : 'Ctrl'), ' + ', jsx(Box, {
448
- as: "span",
449
- xcss: codeMd
450
- }, browser.mac ? 'Opt' : 'Alt'), ' + ', jsx(Box, {
451
- as: "span",
452
- xcss: codeMd
453
- }, "Shift"), ' + ', jsx(Box, {
454
- as: "span",
455
- xcss: codeSm
456
- }, "C")))
457
- }], {
458
- name: formatMessage(messages.highlightColor),
459
- type: 'highlight',
460
- keymap: () => toggleHighlightPalette
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
  }) => [{
@@ -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: fg('platform_editor_help_dialog_a11y') ? 0 : undefined
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, redo, 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';
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 fg('platform_editor_cmd_y_mac_redo_shortcut') ? redoAlt : redo;
408
+ return redoAlt;
408
409
  }
409
410
  }, {
410
411
  name: formatMessage(messages.pastePlainText),
@@ -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.9",
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.5.0",
38
+ "@atlaskit/modal-dialog": "^14.6.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
- "@atlaskit/primitives": "^16.0.0",
40
+ "@atlaskit/primitives": "^16.1.0",
41
41
  "@atlaskit/theme": "^21.0.0",
42
- "@atlaskit/tmp-editor-statsig": "^13.13.0",
43
- "@atlaskit/tokens": "^7.0.0",
44
- "@atlaskit/tooltip": "^20.6.0",
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.14.0",
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
  }