@atlaskit/editor-plugin-selection-extension 13.3.7 → 13.3.8

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,14 @@
1
1
  # @atlaskit/editor-plugin-selection-extension
2
2
 
3
+ ## 13.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d3af55fada546`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d3af55fada546) -
8
+ [ux] Adds shouldIgnoreCloseEvent to prevent sub-menus of Block menu from closing when
9
+ changeboarding spotlights get dismissed.
10
+ - Updated dependencies
11
+
3
12
  ## 13.3.7
4
13
 
5
14
  ### Patch Changes
@@ -18,6 +18,10 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
18
  var _compiled = require("@atlaskit/primitives/compiled");
19
19
  var _SelectionExtensionComponentContext = require("../SelectionExtensionComponentContext");
20
20
  var _SelectionExtensionDropdownItem = require("./SelectionExtensionDropdownItem");
21
+ var BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR = '[data-test-id="block-menu-templates-spotlight-portal-container"]';
22
+ var shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent = function shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent(event) {
23
+ return event.target instanceof Element && event.target.closest(BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR) !== null;
24
+ };
21
25
  var styles = {
22
26
  lozenge: "_18u012x7"
23
27
  };
@@ -79,7 +83,8 @@ var SelectionExtensionNestedDropdownMenu = exports.SelectionExtensionNestedDropd
79
83
  dropdownTestId: "editor-selection-extension-menu",
80
84
  shouldTitleWrap: false,
81
85
  tooltipContent: nestedDropdownMenu.label,
82
- "data-extension-item-key": nestedDropdownMenu.key
86
+ "data-extension-item-key": nestedDropdownMenu.key,
87
+ shouldIgnoreCloseEvent: (0, _platformFeatureFlags.fg)('cc_blocks_changeboarding') ? shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent : undefined
83
88
  }, /*#__PURE__*/_react.default.createElement(ChildItems, {
84
89
  nestedDropdownMenu: nestedDropdownMenu
85
90
  }));
@@ -11,6 +11,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { Box } from '@atlaskit/primitives/compiled';
12
12
  import { useSelectionExtensionComponentContext } from '../SelectionExtensionComponentContext';
13
13
  import { SelectionExtensionDropdownItem } from './SelectionExtensionDropdownItem';
14
+ const BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR = '[data-test-id="block-menu-templates-spotlight-portal-container"]';
15
+ const shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent = event => event.target instanceof Element && event.target.closest(BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR) !== null;
14
16
  const styles = {
15
17
  lozenge: "_18u012x7"
16
18
  };
@@ -73,7 +75,8 @@ export const SelectionExtensionNestedDropdownMenu = ({
73
75
  dropdownTestId: "editor-selection-extension-menu",
74
76
  shouldTitleWrap: false,
75
77
  tooltipContent: nestedDropdownMenu.label,
76
- "data-extension-item-key": nestedDropdownMenu.key
78
+ "data-extension-item-key": nestedDropdownMenu.key,
79
+ shouldIgnoreCloseEvent: fg('cc_blocks_changeboarding') ? shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent : undefined
77
80
  }, /*#__PURE__*/React.createElement(ChildItems, {
78
81
  nestedDropdownMenu: nestedDropdownMenu
79
82
  }));
@@ -11,6 +11,10 @@ import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { Box } from '@atlaskit/primitives/compiled';
12
12
  import { useSelectionExtensionComponentContext } from '../SelectionExtensionComponentContext';
13
13
  import { SelectionExtensionDropdownItem } from './SelectionExtensionDropdownItem';
14
+ var BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR = '[data-test-id="block-menu-templates-spotlight-portal-container"]';
15
+ var shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent = function shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent(event) {
16
+ return event.target instanceof Element && event.target.closest(BLOCK_MENU_TEMPLATES_SPOTLIGHT_PORTAL_SELECTOR) !== null;
17
+ };
14
18
  var styles = {
15
19
  lozenge: "_18u012x7"
16
20
  };
@@ -72,7 +76,8 @@ export var SelectionExtensionNestedDropdownMenu = function SelectionExtensionNes
72
76
  dropdownTestId: "editor-selection-extension-menu",
73
77
  shouldTitleWrap: false,
74
78
  tooltipContent: nestedDropdownMenu.label,
75
- "data-extension-item-key": nestedDropdownMenu.key
79
+ "data-extension-item-key": nestedDropdownMenu.key,
80
+ shouldIgnoreCloseEvent: fg('cc_blocks_changeboarding') ? shouldIgnoreBlockMenuTemplatesSpotlightCloseEvent : undefined
76
81
  }, /*#__PURE__*/React.createElement(ChildItems, {
77
82
  nestedDropdownMenu: nestedDropdownMenu
78
83
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-extension",
3
- "version": "13.3.7",
3
+ "version": "13.3.8",
4
4
  "description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/editor-prosemirror": "^7.3.0",
48
48
  "@atlaskit/editor-shared-styles": "^3.11.0",
49
49
  "@atlaskit/editor-tables": "^2.10.0",
50
- "@atlaskit/editor-toolbar": "^1.8.0",
50
+ "@atlaskit/editor-toolbar": "^1.9.0",
51
51
  "@atlaskit/icon": "^35.3.0",
52
52
  "@atlaskit/lozenge": "^13.8.0",
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -59,7 +59,7 @@
59
59
  "uuid": "^3.1.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@atlaskit/editor-common": "^114.50.0",
62
+ "@atlaskit/editor-common": "^114.51.0",
63
63
  "react": "^18.2.0",
64
64
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
65
65
  },
@@ -109,6 +109,9 @@
109
109
  }
110
110
  },
111
111
  "platform-feature-flags": {
112
+ "cc_blocks_changeboarding": {
113
+ "type": "boolean"
114
+ },
112
115
  "platform_editor_use_preferences_plugin": {
113
116
  "type": "boolean"
114
117
  },