@atlaskit/editor-plugin-selection-toolbar 3.6.1 → 3.6.2

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-selection-toolbar
2
2
 
3
+ ## 3.6.2
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
  ## 3.6.1
4
14
 
5
15
  ### Patch Changes
@@ -14,6 +14,7 @@ var _dockToolbarTop = _interopRequireDefault(require("@atlaskit/icon-lab/core/do
14
14
  var _minus = _interopRequireDefault(require("@atlaskit/icon/core/minus"));
15
15
  var _checkMark = _interopRequireDefault(require("@atlaskit/icon/utility/check-mark"));
16
16
  var _menu = require("@atlaskit/menu");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  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
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
20
  // New editor controls
@@ -52,11 +53,16 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
52
53
  label: ""
53
54
  }) : undefined
54
55
  }];
56
+
57
+ // testId is required to show focus on trigger button on ESC key press
58
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
59
+ var testId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'selectionToolbar-overflow-dropdown-trigger' : undefined;
55
60
  return [{
56
61
  type: 'separator',
57
62
  fullHeight: true
58
63
  }, {
59
64
  type: 'overflow-dropdown',
65
+ testId: testId,
60
66
  dropdownWidth: 240,
61
67
  options: dropdownOptions
62
68
  }];
@@ -6,6 +6,7 @@ import DockToolbarTopIcon from '@atlaskit/icon-lab/core/dock-toolbar-top';
6
6
  import MinusIcon from '@atlaskit/icon/core/minus';
7
7
  import CheckMarkIcon from '@atlaskit/icon/utility/check-mark';
8
8
  import { HeadingItem } from '@atlaskit/menu';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  // New editor controls
10
11
  export const getOverflowFloatingToolbarConfig = ({
11
12
  api,
@@ -43,11 +44,16 @@ export const getOverflowFloatingToolbarConfig = ({
43
44
  label: ""
44
45
  }) : undefined
45
46
  }];
47
+
48
+ // testId is required to show focus on trigger button on ESC key press
49
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
50
+ const testId = fg('platform_editor_controls_patch_8') ? 'selectionToolbar-overflow-dropdown-trigger' : undefined;
46
51
  return [{
47
52
  type: 'separator',
48
53
  fullHeight: true
49
54
  }, {
50
55
  type: 'overflow-dropdown',
56
+ testId,
51
57
  dropdownWidth: 240,
52
58
  options: dropdownOptions
53
59
  }];
@@ -6,6 +6,7 @@ import DockToolbarTopIcon from '@atlaskit/icon-lab/core/dock-toolbar-top';
6
6
  import MinusIcon from '@atlaskit/icon/core/minus';
7
7
  import CheckMarkIcon from '@atlaskit/icon/utility/check-mark';
8
8
  import { HeadingItem } from '@atlaskit/menu';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  // New editor controls
10
11
  export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolbarConfig(_ref) {
11
12
  var api = _ref.api,
@@ -42,11 +43,16 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
42
43
  label: ""
43
44
  }) : undefined
44
45
  }];
46
+
47
+ // testId is required to show focus on trigger button on ESC key press
48
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
49
+ var testId = fg('platform_editor_controls_patch_8') ? 'selectionToolbar-overflow-dropdown-trigger' : undefined;
45
50
  return [{
46
51
  type: 'separator',
47
52
  fullHeight: true
48
53
  }, {
49
54
  type: 'overflow-dropdown',
55
+ testId: testId,
50
56
  dropdownWidth: 240,
51
57
  options: dropdownOptions
52
58
  }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/css": "^0.10.0",
37
- "@atlaskit/editor-common": "^104.1.0",
37
+ "@atlaskit/editor-common": "^105.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-block-controls": "^3.13.0",
40
40
  "@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
@@ -109,6 +109,9 @@
109
109
  },
110
110
  "platform_editor_controls_patch_6": {
111
111
  "type": "boolean"
112
+ },
113
+ "platform_editor_controls_patch_8": {
114
+ "type": "boolean"
112
115
  }
113
116
  }
114
117
  }