@atlaskit/editor-plugin-card 5.4.29 → 5.4.30

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,15 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 5.4.30
4
+
5
+ ### Patch Changes
6
+
7
+ - [#153256](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153256)
8
+ [`3644fbe36073d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3644fbe36073d) -
9
+ [ux] When ViewAll dropdown closes via ESC key press or submenus close via ESC or Enter, the focus
10
+ is set on ViewAll button.
11
+ - Updated dependencies
12
+
3
13
  ## 5.4.29
4
14
 
5
15
  ### Patch Changes
@@ -463,11 +463,15 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
463
463
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
464
464
  };
465
465
  };
466
+ // testId is required to show focus on trigger button on ESC key press
467
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
468
+ var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
466
469
  var overflowMenuConfig = [{
467
470
  type: 'separator',
468
471
  fullHeight: true
469
472
  }, {
470
473
  type: 'overflow-dropdown',
474
+ testId: testId,
471
475
  options: [_objectSpread({
472
476
  title: intl.formatMessage(_messages.default.copyToClipboard),
473
477
  onClick: function onClick() {
@@ -653,12 +657,16 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
653
657
  onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
654
658
  });
655
659
  } else {
660
+ // testId is required to show focus on trigger button on ESC key press
661
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
662
+ var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
656
663
  toolbarItems.push({
657
664
  type: 'separator',
658
665
  fullHeight: true
659
666
  });
660
667
  var overflowMenuConfig = [{
661
668
  type: 'overflow-dropdown',
669
+ testId: testId,
662
670
  options: [{
663
671
  title: intl.formatMessage(_messages.default.copyToClipboard),
664
672
  onClick: function onClick() {
@@ -455,11 +455,15 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
455
455
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
456
456
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
457
457
  });
458
+ // testId is required to show focus on trigger button on ESC key press
459
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
460
+ const testId = fg('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
458
461
  const overflowMenuConfig = [{
459
462
  type: 'separator',
460
463
  fullHeight: true
461
464
  }, {
462
465
  type: 'overflow-dropdown',
466
+ testId,
463
467
  options: [{
464
468
  title: intl.formatMessage(commonMessages.copyToClipboard),
465
469
  onClick: () => {
@@ -647,12 +651,16 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
647
651
  onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
648
652
  });
649
653
  } else {
654
+ // testId is required to show focus on trigger button on ESC key press
655
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
656
+ const testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
650
657
  toolbarItems.push({
651
658
  type: 'separator',
652
659
  fullHeight: true
653
660
  });
654
661
  const overflowMenuConfig = [{
655
662
  type: 'overflow-dropdown',
663
+ testId,
656
664
  options: [{
657
665
  title: intl.formatMessage(commonMessages.copyToClipboard),
658
666
  onClick: () => {
@@ -453,11 +453,15 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
453
453
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
454
454
  };
455
455
  };
456
+ // testId is required to show focus on trigger button on ESC key press
457
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
458
+ var testId = fg('platform_editor_controls_patch_8') ? 'card-overflow-dropdown-trigger' : undefined;
456
459
  var overflowMenuConfig = [{
457
460
  type: 'separator',
458
461
  fullHeight: true
459
462
  }, {
460
463
  type: 'overflow-dropdown',
464
+ testId: testId,
461
465
  options: [_objectSpread({
462
466
  title: intl.formatMessage(commonMessages.copyToClipboard),
463
467
  onClick: function onClick() {
@@ -643,12 +647,16 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
643
647
  onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
644
648
  });
645
649
  } else {
650
+ // testId is required to show focus on trigger button on ESC key press
651
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
652
+ var testId = fg('platform_editor_controls_patch_8') ? 'datasource-overflow-dropdown-trigger' : undefined;
646
653
  toolbarItems.push({
647
654
  type: 'separator',
648
655
  fullHeight: true
649
656
  });
650
657
  var overflowMenuConfig = [{
651
658
  type: 'overflow-dropdown',
659
+ testId: testId,
652
660
  options: [{
653
661
  title: intl.formatMessage(commonMessages.copyToClipboard),
654
662
  onClick: function onClick() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "5.4.29",
3
+ "version": "5.4.30",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,9 +37,9 @@
37
37
  "@atlaskit/analytics-next": "^11.0.0",
38
38
  "@atlaskit/button": "^23.0.0",
39
39
  "@atlaskit/custom-steps": "^0.11.0",
40
- "@atlaskit/editor-common": "^104.1.0",
40
+ "@atlaskit/editor-common": "^105.0.0",
41
41
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
42
- "@atlaskit/editor-plugin-base": "^2.3.0",
42
+ "@atlaskit/editor-plugin-base": "^3.0.0",
43
43
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
44
44
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
45
45
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/icon": "^26.0.0",
55
55
  "@atlaskit/link-analytics": "^9.1.0",
56
56
  "@atlaskit/link-client-extension": "^4.0.0",
57
- "@atlaskit/link-datasource": "^4.9.0",
57
+ "@atlaskit/link-datasource": "^4.10.0",
58
58
  "@atlaskit/linking-common": "^8.1.0",
59
59
  "@atlaskit/linking-types": "^9.10.0",
60
60
  "@atlaskit/menu": "^5.0.0",