@elastic/eui 113.2.0 → 113.3.0

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.
Files changed (79) hide show
  1. package/es/components/basic_table/collapsed_item_actions.js +2 -0
  2. package/es/components/context_menu/context_menu_item.js +9 -3
  3. package/es/components/context_menu/context_menu_item.styles.js +6 -2
  4. package/es/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
  5. package/es/components/flyout/const.js +10 -0
  6. package/es/components/flyout/flyout.component.js +47 -59
  7. package/es/components/flyout/flyout.js +1 -1
  8. package/es/components/flyout/flyout_menu.js +17 -4
  9. package/es/components/flyout/manager/actions.js +9 -5
  10. package/es/components/flyout/manager/flyout_child.js +8 -2
  11. package/es/components/flyout/manager/flyout_managed.js +24 -13
  12. package/es/components/flyout/manager/reducer.js +182 -44
  13. package/es/components/flyout/manager/store.js +67 -12
  14. package/es/components/flyout/use_flyout_menu.js +70 -0
  15. package/es/components/form/file_picker/file_picker.js +46 -18
  16. package/es/components/table/table_row_cell.js +2 -2
  17. package/eui.d.ts +397 -15
  18. package/lib/components/basic_table/collapsed_item_actions.js +2 -0
  19. package/lib/components/context_menu/context_menu_item.js +9 -3
  20. package/lib/components/context_menu/context_menu_item.styles.js +5 -1
  21. package/lib/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
  22. package/lib/components/flyout/const.js +11 -1
  23. package/lib/components/flyout/flyout.component.js +46 -58
  24. package/lib/components/flyout/flyout.js +6 -0
  25. package/lib/components/flyout/flyout_menu.js +17 -4
  26. package/lib/components/flyout/manager/actions.js +9 -5
  27. package/lib/components/flyout/manager/flyout_child.js +8 -2
  28. package/lib/components/flyout/manager/flyout_managed.js +16 -11
  29. package/lib/components/flyout/manager/reducer.js +181 -43
  30. package/lib/components/flyout/manager/store.js +67 -14
  31. package/lib/components/flyout/use_flyout_menu.js +75 -0
  32. package/lib/components/form/file_picker/file_picker.js +46 -18
  33. package/lib/components/table/table_row_cell.js +2 -2
  34. package/optimize/es/components/basic_table/collapsed_item_actions.js +2 -0
  35. package/optimize/es/components/context_menu/context_menu_item.js +3 -2
  36. package/optimize/es/components/context_menu/context_menu_item.styles.js +6 -2
  37. package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
  38. package/optimize/es/components/flyout/const.js +10 -0
  39. package/optimize/es/components/flyout/flyout.component.js +47 -59
  40. package/optimize/es/components/flyout/flyout.js +1 -1
  41. package/optimize/es/components/flyout/flyout_menu.js +5 -2
  42. package/optimize/es/components/flyout/manager/actions.js +9 -5
  43. package/optimize/es/components/flyout/manager/flyout_managed.js +16 -11
  44. package/optimize/es/components/flyout/manager/reducer.js +182 -44
  45. package/optimize/es/components/flyout/manager/store.js +62 -12
  46. package/optimize/es/components/flyout/use_flyout_menu.js +69 -0
  47. package/optimize/es/components/form/file_picker/file_picker.js +35 -18
  48. package/optimize/es/components/table/table_row_cell.js +2 -2
  49. package/optimize/lib/components/basic_table/collapsed_item_actions.js +2 -0
  50. package/optimize/lib/components/context_menu/context_menu_item.js +3 -2
  51. package/optimize/lib/components/context_menu/context_menu_item.styles.js +5 -1
  52. package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
  53. package/optimize/lib/components/flyout/const.js +11 -1
  54. package/optimize/lib/components/flyout/flyout.component.js +46 -58
  55. package/optimize/lib/components/flyout/flyout.js +6 -0
  56. package/optimize/lib/components/flyout/flyout_menu.js +5 -2
  57. package/optimize/lib/components/flyout/manager/actions.js +9 -5
  58. package/optimize/lib/components/flyout/manager/flyout_managed.js +16 -11
  59. package/optimize/lib/components/flyout/manager/reducer.js +181 -43
  60. package/optimize/lib/components/flyout/manager/store.js +63 -12
  61. package/optimize/lib/components/flyout/use_flyout_menu.js +74 -0
  62. package/optimize/lib/components/form/file_picker/file_picker.js +35 -18
  63. package/optimize/lib/components/table/table_row_cell.js +2 -2
  64. package/package.json +3 -3
  65. package/test-env/components/basic_table/collapsed_item_actions.js +2 -0
  66. package/test-env/components/context_menu/context_menu_item.js +9 -3
  67. package/test-env/components/context_menu/context_menu_item.styles.js +5 -1
  68. package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
  69. package/test-env/components/flyout/const.js +11 -1
  70. package/test-env/components/flyout/flyout.component.js +46 -58
  71. package/test-env/components/flyout/flyout_menu.js +17 -4
  72. package/test-env/components/flyout/manager/actions.js +9 -5
  73. package/test-env/components/flyout/manager/flyout_child.js +8 -2
  74. package/test-env/components/flyout/manager/flyout_managed.js +16 -11
  75. package/test-env/components/flyout/manager/reducer.js +181 -43
  76. package/test-env/components/flyout/manager/store.js +63 -12
  77. package/test-env/components/flyout/use_flyout_menu.js +74 -0
  78. package/test-env/components/form/file_picker/file_picker.js +46 -18
  79. package/test-env/components/table/table_row_cell.js +2 -2
@@ -14,7 +14,7 @@ var _icon = require("../icon");
14
14
  var _tool_tip = require("../tool_tip");
15
15
  var _context_menu_item = require("./context_menu_item.styles");
16
16
  var _react2 = require("@emotion/react");
17
- var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size"];
17
+ var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size", "color"];
18
18
  /*
19
19
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
20
20
  * or more contributor license agreements. Licensed under the Elastic License
@@ -49,12 +49,13 @@ var EuiContextMenuItem = exports.EuiContextMenuItem = function EuiContextMenuIte
49
49
  rel = _ref.rel,
50
50
  _ref$size = _ref.size,
51
51
  size = _ref$size === void 0 ? 'm' : _ref$size,
52
+ color = _ref.color,
52
53
  rest = _objectWithoutProperties(_ref, _excluded);
53
54
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
54
55
  var disabled = _disabled || !isHrefValid;
55
56
  var classes = (0, _classnames.default)('euiContextMenuItem', className);
56
57
  var styles = (0, _services.useEuiMemoizedStyles)(_context_menu_item.euiContextMenuItemStyles);
57
- var cssStyles = [styles.euiContextMenuItem, styles.sizes[size], styles.layoutAlign[layoutAlign], disabled && styles.disabled];
58
+ var cssStyles = [styles.euiContextMenuItem, styles.sizes[size], styles.layoutAlign[layoutAlign], disabled && styles.disabled, !disabled && color && styles.colors[color]];
58
59
  var iconInstance = icon && (typeof icon === 'string' ? (0, _react2.jsx)(_icon.EuiIcon, {
59
60
  type: icon,
60
61
  size: "m",
@@ -150,5 +151,10 @@ EuiContextMenuItem.propTypes = {
150
151
  /**
151
152
  * Reduce the size to `s` when in need of a more compressed menu
152
153
  */
153
- size: _propTypes.default.any
154
+ size: _propTypes.default.any,
155
+ /**
156
+ * Applies a color to the text and icon of the item.
157
+ * Accepts the same color values as `EuiButtonEmpty`.
158
+ */
159
+ color: _propTypes.default.any
154
160
  };
@@ -81,6 +81,10 @@ var euiContextMenuItemStyles = exports.euiContextMenuItemStyles = function euiCo
81
81
  euiContextMenuItem__text: _ref2,
82
82
  s: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:s;")
83
83
  },
84
- euiContextMenuItem__arrow: _ref
84
+ euiContextMenuItem__arrow: _ref,
85
+ // Colors - maps button color names to text color overrides
86
+ colors: Object.fromEntries(_global_styling.EXTENDED_BUTTON_COLORS.map(function (color) {
87
+ return [color, /*#__PURE__*/(0, _react.css)("color:", (0, _global_styling.euiButtonEmptyColor)(euiThemeContext, color).color, ";;label:colors;")];
88
+ }))
85
89
  };
86
90
  };
@@ -160,11 +160,20 @@ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindow
160
160
  function useEuiTimeWindow(start, end, apply, options) {
161
161
  var _options$zoomFactor;
162
162
  var min = _datemath.default.parse(start);
163
+
164
+ /* `roundUp: true` will result in an "inclusive" time (e.g. 23:59:59.999 for 'now/d').
165
+ It only changes the value for relative expressions (e.g. 'now/d') but not absolute ISO strings. */
163
166
  var max = _datemath.default.parse(end, {
164
167
  roundUp: true
165
168
  });
166
169
  var isInvalid = !min || !min.isValid() || !max || !max.isValid();
167
- var windowDuration = isInvalid ? -1 : max.diff(min);
170
+ /* An end at .999ms is always considered an inclusive boundary (either as result of `roundUp: true`
171
+ or entered manually).
172
+ To avoid a 1ms drift on every time window or zoom step, windowDuration has to be increased by 1ms.
173
+ This ensures the window is always at a clean boundary (e.g. 00:00:00.000 - 23:59:59.999). */
174
+ var isInclusiveBoundary = !isInvalid && max.milliseconds() === 999;
175
+ var endBoundary = !isInvalid ? isInclusiveBoundary ? (0, _moment.default)(max).add(1, 'ms') : (0, _moment.default)(max) : null;
176
+ var windowDuration = isInvalid || !endBoundary ? -1 : endBoundary.diff(min);
168
177
  var isWindowDurationZero = windowDuration === 0;
169
178
  var zoomFactor = getPercentageMultiplier((_options$zoomFactor = options === null || options === void 0 ? void 0 : options.zoomFactor) !== null && _options$zoomFactor !== void 0 ? _options$zoomFactor : ZOOM_FACTOR_DEFAULT);
170
179
  var zoomDelta = windowDuration * (zoomFactor / 2); // Gets added to each end, that's why it's split in half
@@ -185,7 +194,10 @@ function useEuiTimeWindow(start, end, apply, options) {
185
194
  function stepForward() {
186
195
  if (isInvalid || isWindowDurationZero) return;
187
196
  apply({
188
- start: (0, _moment.default)(max).toISOString(),
197
+ /* Prevent 1ms drifts for inclusive boundaries by using the exclusive max (+ 1ms)
198
+ as the start of the next window (e.g. 00:00:00.000 instead of 23:59:59.999) */
199
+ start: (isInclusiveBoundary ? endBoundary // `!` is safe here because we early return on `isInvalid`
200
+ : (0, _moment.default)(max)).toISOString(),
189
201
  end: (0, _moment.default)(max).add(windowDuration, 'ms').toISOString()
190
202
  });
191
203
  }
@@ -193,7 +205,9 @@ function useEuiTimeWindow(start, end, apply, options) {
193
205
  if (isInvalid || isWindowDurationZero) return;
194
206
  apply({
195
207
  start: (0, _moment.default)(min).subtract(windowDuration, 'ms').toISOString(),
196
- end: (0, _moment.default)(min).toISOString()
208
+ /* Prevent 1ms drifts for inclusive boundaries by using the exclusive min (- 1ms)
209
+ as the end of the previous window (e.g. 23:59:59.999 instead of 00:00:00.000) */
210
+ end: (isInclusiveBoundary ? (0, _moment.default)(min).subtract(1, 'ms') : (0, _moment.default)(min)).toISOString()
197
211
  });
198
212
  }
199
213
  function expandWindow() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.FLYOUT_TYPES = exports.FLYOUT_SIZES = exports.FLYOUT_SIDES = exports.FLYOUT_PADDING_SIZES = exports.DEFAULT_TYPE = exports.DEFAULT_SIZE = exports.DEFAULT_SIDE = exports.DEFAULT_PUSH_MIN_BREAKPOINT = exports.DEFAULT_PADDING_SIZE = void 0;
6
+ exports.MENU_DISPLAY_AUTO = exports.MENU_DISPLAY_ALWAYS = exports.FLYOUT_TYPES = exports.FLYOUT_SIZES = exports.FLYOUT_SIDES = exports.FLYOUT_PADDING_SIZES = exports.FLYOUT_MENU_DISPLAY_MODES = exports.DEFAULT_TYPE = exports.DEFAULT_SIZE = exports.DEFAULT_SIDE = exports.DEFAULT_PUSH_MIN_BREAKPOINT = exports.DEFAULT_PADDING_SIZE = exports.DEFAULT_MENU_DISPLAY_MODE = void 0;
7
7
  exports.isEuiFlyoutSizeNamed = isEuiFlyoutSizeNamed;
8
8
  /*
9
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -25,6 +25,14 @@ var FLYOUT_SIDES = exports.FLYOUT_SIDES = ['left', 'right'];
25
25
  var FLYOUT_SIZES = exports.FLYOUT_SIZES = ['s', 'm', 'l', 'fill'];
26
26
  /** Type representing a supported named flyout size. */
27
27
 
28
+ /** Menu display mode: always render menu when flyoutMenuProps is provided. */
29
+ var MENU_DISPLAY_ALWAYS = exports.MENU_DISPLAY_ALWAYS = 'always';
30
+ /** Menu display mode: only render menu when it has content (back button, history, title, or custom actions). */
31
+ var MENU_DISPLAY_AUTO = exports.MENU_DISPLAY_AUTO = 'auto';
32
+ /** Allowed flyout menu display modes. */
33
+ var FLYOUT_MENU_DISPLAY_MODES = exports.FLYOUT_MENU_DISPLAY_MODES = [MENU_DISPLAY_ALWAYS, MENU_DISPLAY_AUTO];
34
+ /** Type representing a supported flyout menu display mode. */
35
+
28
36
  /** Allowed padding sizes for flyout content. */
29
37
  var FLYOUT_PADDING_SIZES = exports.FLYOUT_PADDING_SIZES = ['none', 's', 'm', 'l'];
30
38
  /** Type representing a supported flyout padding size. */
@@ -39,6 +47,8 @@ var DEFAULT_SIDE = exports.DEFAULT_SIDE = 'right';
39
47
  var DEFAULT_SIZE = exports.DEFAULT_SIZE = 'm';
40
48
  /** Default padding size inside flyouts. */
41
49
  var DEFAULT_PADDING_SIZE = exports.DEFAULT_PADDING_SIZE = 'l';
50
+ /** Default flyout menu display mode. */
51
+ var DEFAULT_MENU_DISPLAY_MODE = exports.DEFAULT_MENU_DISPLAY_MODE = MENU_DISPLAY_AUTO;
42
52
 
43
53
  /**
44
54
  * Custom type checker for named flyout sizes since the prop
@@ -25,9 +25,9 @@ var _flyout_resize_button = require("./_flyout_resize_button");
25
25
  var _use_flyout_resizable = require("./use_flyout_resizable");
26
26
  var _use_flyout_z_index = require("./use_flyout_z_index");
27
27
  var _flyout_parent_context = require("./flyout_parent_context");
28
+ var _use_flyout_menu = require("./use_flyout_menu");
28
29
  var _react2 = require("@emotion/react");
29
- var _excluded = ["className", "children", "as", "hideCloseButton", "flyoutMenuProps", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "hasChildBackground", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "includeSelectorInFocusTrap", "aria-describedby", "aria-labelledby", "id", "resizable", "minWidth", "onResize", "onAnimationEnd", "container"],
30
- _excluded2 = ["titleId"];
30
+ var _excluded = ["className", "children", "as", "hideCloseButton", "flyoutMenuProps", "flyoutMenuDisplayMode", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "hasChildBackground", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "includeSelectorInFocusTrap", "aria-describedby", "aria-labelledby", "id", "resizable", "minWidth", "onResize", "onAnimationEnd", "container"];
31
31
  /*
32
32
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
33
33
  * or more contributor license agreements. Licensed under the Elastic License
@@ -82,40 +82,42 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
82
82
  _usePropsWithComponen2 = _usePropsWithComponen.hideCloseButton,
83
83
  hideCloseButton = _usePropsWithComponen2 === void 0 ? false : _usePropsWithComponen2,
84
84
  _flyoutMenuProps = _usePropsWithComponen.flyoutMenuProps,
85
+ _usePropsWithComponen3 = _usePropsWithComponen.flyoutMenuDisplayMode,
86
+ flyoutMenuDisplayMode = _usePropsWithComponen3 === void 0 ? _const2.DEFAULT_MENU_DISPLAY_MODE : _usePropsWithComponen3,
85
87
  closeButtonProps = _usePropsWithComponen.closeButtonProps,
86
- _usePropsWithComponen3 = _usePropsWithComponen.closeButtonPosition,
87
- closeButtonPosition = _usePropsWithComponen3 === void 0 ? 'inside' : _usePropsWithComponen3,
88
+ _usePropsWithComponen4 = _usePropsWithComponen.closeButtonPosition,
89
+ closeButtonPosition = _usePropsWithComponen4 === void 0 ? 'inside' : _usePropsWithComponen4,
88
90
  onClose = _usePropsWithComponen.onClose,
89
- _usePropsWithComponen4 = _usePropsWithComponen.ownFocus,
90
- ownFocus = _usePropsWithComponen4 === void 0 ? true : _usePropsWithComponen4,
91
- _usePropsWithComponen5 = _usePropsWithComponen.side,
92
- side = _usePropsWithComponen5 === void 0 ? _const2.DEFAULT_SIDE : _usePropsWithComponen5,
93
- _usePropsWithComponen6 = _usePropsWithComponen.size,
94
- _size = _usePropsWithComponen6 === void 0 ? _const2.DEFAULT_SIZE : _usePropsWithComponen6,
95
- _usePropsWithComponen7 = _usePropsWithComponen.paddingSize,
96
- paddingSize = _usePropsWithComponen7 === void 0 ? _const2.DEFAULT_PADDING_SIZE : _usePropsWithComponen7,
97
- _usePropsWithComponen8 = _usePropsWithComponen.maxWidth,
98
- maxWidth = _usePropsWithComponen8 === void 0 ? false : _usePropsWithComponen8,
91
+ _usePropsWithComponen5 = _usePropsWithComponen.ownFocus,
92
+ ownFocus = _usePropsWithComponen5 === void 0 ? true : _usePropsWithComponen5,
93
+ _usePropsWithComponen6 = _usePropsWithComponen.side,
94
+ side = _usePropsWithComponen6 === void 0 ? _const2.DEFAULT_SIDE : _usePropsWithComponen6,
95
+ _usePropsWithComponen7 = _usePropsWithComponen.size,
96
+ _size = _usePropsWithComponen7 === void 0 ? _const2.DEFAULT_SIZE : _usePropsWithComponen7,
97
+ _usePropsWithComponen8 = _usePropsWithComponen.paddingSize,
98
+ paddingSize = _usePropsWithComponen8 === void 0 ? _const2.DEFAULT_PADDING_SIZE : _usePropsWithComponen8,
99
+ _usePropsWithComponen9 = _usePropsWithComponen.maxWidth,
100
+ maxWidth = _usePropsWithComponen9 === void 0 ? false : _usePropsWithComponen9,
99
101
  style = _usePropsWithComponen.style,
100
- _usePropsWithComponen9 = _usePropsWithComponen.hasChildBackground,
101
- hasChildBackground = _usePropsWithComponen9 === void 0 ? false : _usePropsWithComponen9,
102
+ _usePropsWithComponen10 = _usePropsWithComponen.hasChildBackground,
103
+ hasChildBackground = _usePropsWithComponen10 === void 0 ? false : _usePropsWithComponen10,
102
104
  maskProps = _usePropsWithComponen.maskProps,
103
- _usePropsWithComponen10 = _usePropsWithComponen.type,
104
- type = _usePropsWithComponen10 === void 0 ? _const2.DEFAULT_TYPE : _usePropsWithComponen10,
105
+ _usePropsWithComponen11 = _usePropsWithComponen.type,
106
+ type = _usePropsWithComponen11 === void 0 ? _const2.DEFAULT_TYPE : _usePropsWithComponen11,
105
107
  outsideClickCloses = _usePropsWithComponen.outsideClickCloses,
106
- _usePropsWithComponen11 = _usePropsWithComponen.pushMinBreakpoint,
107
- pushMinBreakpoint = _usePropsWithComponen11 === void 0 ? _const2.DEFAULT_PUSH_MIN_BREAKPOINT : _usePropsWithComponen11,
108
- _usePropsWithComponen12 = _usePropsWithComponen.pushAnimation,
109
- pushAnimation = _usePropsWithComponen12 === void 0 ? false : _usePropsWithComponen12,
108
+ _usePropsWithComponen12 = _usePropsWithComponen.pushMinBreakpoint,
109
+ pushMinBreakpoint = _usePropsWithComponen12 === void 0 ? _const2.DEFAULT_PUSH_MIN_BREAKPOINT : _usePropsWithComponen12,
110
+ _usePropsWithComponen13 = _usePropsWithComponen.pushAnimation,
111
+ pushAnimation = _usePropsWithComponen13 === void 0 ? false : _usePropsWithComponen13,
110
112
  _focusTrapProps = _usePropsWithComponen.focusTrapProps,
111
- _usePropsWithComponen13 = _usePropsWithComponen.includeFixedHeadersInFocusTrap,
112
- includeFixedHeadersInFocusTrap = _usePropsWithComponen13 === void 0 ? true : _usePropsWithComponen13,
113
+ _usePropsWithComponen14 = _usePropsWithComponen.includeFixedHeadersInFocusTrap,
114
+ includeFixedHeadersInFocusTrap = _usePropsWithComponen14 === void 0 ? true : _usePropsWithComponen14,
113
115
  includeSelectorInFocusTrap = _usePropsWithComponen.includeSelectorInFocusTrap,
114
116
  _ariaDescribedBy = _usePropsWithComponen['aria-describedby'],
115
117
  _ariaLabelledBy = _usePropsWithComponen['aria-labelledby'],
116
118
  id = _usePropsWithComponen.id,
117
- _usePropsWithComponen14 = _usePropsWithComponen.resizable,
118
- resizable = _usePropsWithComponen14 === void 0 ? false : _usePropsWithComponen14,
119
+ _usePropsWithComponen15 = _usePropsWithComponen.resizable,
120
+ resizable = _usePropsWithComponen15 === void 0 ? false : _usePropsWithComponen15,
119
121
  minWidth = _usePropsWithComponen.minWidth,
120
122
  onResize = _usePropsWithComponen.onResize,
121
123
  onAnimationEnd = _usePropsWithComponen.onAnimationEnd,
@@ -173,6 +175,21 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
173
175
  var layoutMode = (_managerState$layoutM = managerState === null || managerState === void 0 ? void 0 : managerState.layoutMode) !== null && _managerState$layoutM !== void 0 ? _managerState$layoutM : _const.LAYOUT_MODE_SIDE_BY_SIDE;
174
176
  var isActiveManagedFlyout = (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId || (currentSession === null || currentSession === void 0 ? void 0 : currentSession.childFlyoutId) === flyoutId;
175
177
  var currentZIndexRef = (0, _react.useRef)((_managerState$current = managerState === null || managerState === void 0 ? void 0 : managerState.currentZIndex) !== null && _managerState$current !== void 0 ? _managerState$current : 0);
178
+ var _useEuiFlyoutMenu = (0, _use_flyout_menu.useEuiFlyoutMenu)({
179
+ flyoutMenuProps: _flyoutMenuProps,
180
+ flyoutMenuDisplayMode: flyoutMenuDisplayMode,
181
+ ariaLabelledBy: _ariaLabelledBy
182
+ }),
183
+ flyoutMenuId = _useEuiFlyoutMenu.flyoutMenuId,
184
+ flyoutMenuProps = _useEuiFlyoutMenu.flyoutMenuProps,
185
+ shouldRenderMenu = _useEuiFlyoutMenu.shouldRenderMenu,
186
+ ariaLabelledBy = _useEuiFlyoutMenu.ariaLabelledBy;
187
+ (0, _react.useEffect)(function () {
188
+ if (process.env.NODE_ENV === 'development' && _flyoutMenuProps && 'hideTitle' in _flyoutMenuProps) {
189
+ console.warn('EuiFlyout: `flyoutMenuProps.hideTitle` is deprecated. Use `EuiFlyoutHeader` for visible titles instead.');
190
+ }
191
+ // eslint-disable-next-line react-hooks/exhaustive-deps
192
+ }, []);
176
193
 
177
194
  // Use a ref to access the latest flyoutManager without triggering effect re-runs
178
195
  var flyoutManagerRef = (0, _react.useRef)(flyoutManager);
@@ -621,34 +638,6 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
621
638
  })));
622
639
  }, [hasOverlayMask, descriptionId, focusTrapShards.length]);
623
640
 
624
- /*
625
- * If the flyout menu is to be rendered, ensure the flyout has aria-labelledby referencing the menu's titleId
626
- */
627
- var generatedMenuId = (0, _services.useGeneratedHtmlId)();
628
- var _ref = _flyoutMenuProps || {},
629
- _titleId = _ref.titleId,
630
- flyoutMenuProps = _objectWithoutProperties(_ref, _excluded2);
631
- var hasMenu = !!_flyoutMenuProps;
632
- var flyoutMenuId = (0, _react.useMemo)(function () {
633
- if (!hasMenu) return undefined;
634
- return _titleId || generatedMenuId;
635
- }, [hasMenu, _titleId, generatedMenuId]);
636
-
637
- // If the flyout level is LEVEL_MAIN, the title should be hidden by default
638
- var flyoutMenuHideTitle = (0, _react.useMemo)(function () {
639
- if (!hasMenu) return undefined;
640
- if ((_flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.hideTitle) !== undefined) {
641
- return _flyoutMenuProps.hideTitle;
642
- }
643
- return (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId;
644
- }, [hasMenu, _flyoutMenuProps, currentSession, flyoutId]);
645
- var ariaLabelledBy = (0, _react.useMemo)(function () {
646
- if (flyoutMenuId) {
647
- return (0, _classnames.default)(flyoutMenuId, _ariaLabelledBy);
648
- }
649
- return _ariaLabelledBy;
650
- }, [flyoutMenuId, _ariaLabelledBy]);
651
-
652
641
  /*
653
642
  * Trap focus even when `ownFocus={false}`, otherwise closing
654
643
  * the flyout won't return focus to the originating button.
@@ -716,13 +705,12 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
716
705
  "aria-labelledby": ariaLabelledBy,
717
706
  "data-autofocus": !isPushed || undefined,
718
707
  onAnimationEnd: onAnimationEnd
719
- }), !isPushed && screenReaderDescription, !_flyoutMenuProps && !hideCloseButton && (0, _react2.jsx)(_flyout_close_button.EuiFlyoutCloseButton, _extends({}, closeButtonProps, {
708
+ }), !isPushed && screenReaderDescription, shouldRenderMenu ? (0, _react2.jsx)(_flyout_menu.EuiFlyoutMenu, _extends({}, flyoutMenuProps, {
709
+ titleId: flyoutMenuId
710
+ })) : !hideCloseButton && (0, _react2.jsx)(_flyout_close_button.EuiFlyoutCloseButton, _extends({}, closeButtonProps, {
720
711
  onClose: handleClose,
721
712
  closeButtonPosition: closeButtonPosition,
722
713
  side: side
723
- })), _flyoutMenuProps && (0, _react2.jsx)(_flyout_menu.EuiFlyoutMenu, _extends({}, flyoutMenuProps, {
724
- hideTitle: flyoutMenuHideTitle,
725
- titleId: flyoutMenuId
726
714
  })), resizable && (0, _react2.jsx)(_flyout_resize_button.EuiFlyoutResizeButton, {
727
715
  type: type,
728
716
  side: side,
@@ -5,6 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.EuiFlyout = void 0;
8
+ Object.defineProperty(exports, "FLYOUT_MENU_DISPLAY_MODES", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _const2.FLYOUT_MENU_DISPLAY_MODES;
12
+ }
13
+ });
8
14
  Object.defineProperty(exports, "FLYOUT_PADDING_SIZES", {
9
15
  enumerable: true,
10
16
  get: function get() {
@@ -84,6 +84,7 @@ var HistoryPopover = function HistoryPopover(_ref) {
84
84
  return (0, _react2.jsx)(_list_group.EuiListGroupItem, {
85
85
  key: "history-item-".concat(index),
86
86
  label: item.title,
87
+ iconType: item.iconType,
87
88
  size: "s",
88
89
  onClick: function onClick() {
89
90
  item.onClick();
@@ -107,7 +108,8 @@ var EuiFlyoutMenu = exports.EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
107
108
  var className = _ref2.className,
108
109
  title = _ref2.title,
109
110
  titleId = _ref2.titleId,
110
- hideTitle = _ref2.hideTitle,
111
+ _ref2$hideTitle = _ref2.hideTitle,
112
+ hideTitle = _ref2$hideTitle === void 0 ? true : _ref2$hideTitle,
111
113
  hideCloseButton = _ref2.hideCloseButton,
112
114
  _ref2$historyItems = _ref2.historyItems,
113
115
  historyItems = _ref2$historyItems === void 0 ? [] : _ref2$historyItems,
@@ -138,7 +140,8 @@ var EuiFlyoutMenu = exports.EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
138
140
  });
139
141
  return (0, _react2.jsx)("div", _extends({
140
142
  className: classes,
141
- css: styles.euiFlyoutMenu__container
143
+ css: styles.euiFlyoutMenu__container,
144
+ "data-test-subj": "euiFlyoutMenu"
142
145
  }, rest), (0, _react2.jsx)(_flex.EuiFlexGroup, {
143
146
  alignItems: "center",
144
147
  justifyContent: "spaceBetween",
@@ -195,8 +198,14 @@ EuiFlyoutMenu.propTypes = {
195
198
  */
196
199
  title: _propTypes.default.node,
197
200
  /**
198
- * Hides the title in the `EuiFlyoutMenu`. This is useful when the title is already shown in an `EuiFlyoutHeader`.
199
- * @default true for main flyout in a managed flyout session; false otherwise
201
+ * An optional icon to display next to the session title in the history menu
202
+ */
203
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "alert", "analyzeEvent", "annotation", "anomalyChart", "chartAnomaly", "anomalySwimLane", "apmApp", "apmTrace", "chartWaterfall", "appSearchApp", "apps", "arrowDown", "chevronSingleDown", "arrowLeft", "chevronSingleLeft", "arrowRight", "chevronSingleRight", "arrowUp", "chevronSingleUp", "arrowStart", "chevronLimitLeft", "arrowEnd", "chevronLimitRight", "article", "asterisk", "at", "archive", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "briefcase", "branchUser", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "chartChangePoint", "chartArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "chartBarVerticalStack", "chartGauge", "chartHeatmap", "chartLine", "chartPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkInCircleFilled", "checkCircleFill", "cheer", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "paintBucket", "commandLine", "comment", "compare", "compute", "processor", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "contrastFill", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crossCircle", "crosshair", "crosshairs", "currency", "money", "cut", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "desktop", "display", "devToolsApp", "diff", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "chevronDoubleLeft", "doubleArrowRight", "chevronDoubleRight", "ellipsis", "editorAlignCenter", "textAlignCenter", "editorAlignLeft", "textAlignLeft", "editorAlignRight", "textAlignRight", "editorBold", "textBold", "editorChecklist", "listCheck", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "textHeading", "editorItalic", "textItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "listNumber", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "redo", "editorStrike", "textStrike", "editorTable", "table", "editorUnderline", "textUnderline", "editorUndo", "undo", "editorUnorderedList", "listBullet", "email", "mail", "empty", "emsApp", "endpoint", "eql", "query", "eraser", "error", "errorFilled", "errorFill", "esqlVis", "exit", "logOut", "expand", "maximize", "expandMini", "export", "exportAction", "upload", "external", "eye", "eyeClosed", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "hourglass", "if", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "mapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "tableTime", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "queryField", "kqlFunction", "kqlOperand", "queryOperand", "kqlSelector", "querySelector", "kqlValue", "queryValue", "kubernetesNode", "kubernetesPod", "launch", "rocket", "layers", "lensApp", "lettering", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDashed", "lineDot", "lineDotted", "lineSolid", "link", "linkSlash", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "queue", "machineLearningApp", "magnet", "magnify", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusInCircle", "minusInCircleFilled", "minusInSquare", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "vectorTriangle", "notebookApp", "number", "offline", "wifiSlash", "online", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusCircle", "plusInCircle", "plusInCircleFilled", "plusInSquare", "plusSquare", "popout", "presentation", "productRobot", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "server", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starFilledSpace", "starMinusEmpty", "starMinusFill", "starMinusFilled", "starPlusEmpty", "starPlusFill", "starPlusFilled", "stats", "stop", "stopFill", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityHigh", "tableDensityExpanded", "tableDensityLow", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thermometer", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "refreshTime", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "unarchive", "vector", "vectorSquare", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "chartMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
204
+ /**
205
+ * Hides the title in the `EuiFlyoutMenu`.
206
+ * @default true
207
+ * @deprecated Use `EuiFlyoutHeader` for visible titles instead.
208
+ * `hideTitle` is still honored but may be removed in a future major version.
200
209
  */
201
210
  hideTitle: _propTypes.default.bool,
202
211
  /**
@@ -221,6 +230,10 @@ EuiFlyoutMenu.propTypes = {
221
230
  * Title for the history item
222
231
  */
223
232
  title: _propTypes.default.string.isRequired,
233
+ /**
234
+ * An optional icon to display next to the session title in the history menu
235
+ */
236
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "alert", "analyzeEvent", "annotation", "anomalyChart", "chartAnomaly", "anomalySwimLane", "apmApp", "apmTrace", "chartWaterfall", "appSearchApp", "apps", "arrowDown", "chevronSingleDown", "arrowLeft", "chevronSingleLeft", "arrowRight", "chevronSingleRight", "arrowUp", "chevronSingleUp", "arrowStart", "chevronLimitLeft", "arrowEnd", "chevronLimitRight", "article", "asterisk", "at", "archive", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "briefcase", "branchUser", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "chartChangePoint", "chartArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "chartBarVerticalStack", "chartGauge", "chartHeatmap", "chartLine", "chartPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkInCircleFilled", "checkCircleFill", "cheer", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "paintBucket", "commandLine", "comment", "compare", "compute", "processor", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "contrastFill", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crossCircle", "crosshair", "crosshairs", "currency", "money", "cut", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "desktop", "display", "devToolsApp", "diff", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "chevronDoubleLeft", "doubleArrowRight", "chevronDoubleRight", "ellipsis", "editorAlignCenter", "textAlignCenter", "editorAlignLeft", "textAlignLeft", "editorAlignRight", "textAlignRight", "editorBold", "textBold", "editorChecklist", "listCheck", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "textHeading", "editorItalic", "textItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "listNumber", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "redo", "editorStrike", "textStrike", "editorTable", "table", "editorUnderline", "textUnderline", "editorUndo", "undo", "editorUnorderedList", "listBullet", "email", "mail", "empty", "emsApp", "endpoint", "eql", "query", "eraser", "error", "errorFilled", "errorFill", "esqlVis", "exit", "logOut", "expand", "maximize", "expandMini", "export", "exportAction", "upload", "external", "eye", "eyeClosed", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "hourglass", "if", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "mapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "tableTime", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "queryField", "kqlFunction", "kqlOperand", "queryOperand", "kqlSelector", "querySelector", "kqlValue", "queryValue", "kubernetesNode", "kubernetesPod", "launch", "rocket", "layers", "lensApp", "lettering", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDashed", "lineDot", "lineDotted", "lineSolid", "link", "linkSlash", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "queue", "machineLearningApp", "magnet", "magnify", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusInCircle", "minusInCircleFilled", "minusInSquare", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "vectorTriangle", "notebookApp", "number", "offline", "wifiSlash", "online", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusCircle", "plusInCircle", "plusInCircleFilled", "plusInSquare", "plusSquare", "popout", "presentation", "productRobot", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "server", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starFilledSpace", "starMinusEmpty", "starMinusFill", "starMinusFilled", "starPlusEmpty", "starPlusFill", "starPlusFilled", "stats", "stop", "stopFill", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityHigh", "tableDensityExpanded", "tableDensityLow", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thermometer", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "refreshTime", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "unarchive", "vector", "vectorSquare", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "chartMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
224
237
  /**
225
238
  * onClick handler for the history item
226
239
  */
@@ -60,7 +60,7 @@ var ACTION_CLOSE_UNMANAGED_FLYOUT = exports.ACTION_CLOSE_UNMANAGED_FLYOUT = "".c
60
60
 
61
61
  /** Go back one session (remove current session from stack). */
62
62
 
63
- /** Navigate to a specific flyout (remove all sessions after it). */
63
+ /** Navigate to a specific flyout (remove all sessions after it, or pop to child in history). */
64
64
 
65
65
  /** Set push padding offset for a specific side. */
66
66
 
@@ -75,17 +75,20 @@ var ACTION_CLOSE_UNMANAGED_FLYOUT = exports.ACTION_CLOSE_UNMANAGED_FLYOUT = "".c
75
75
  * - `title` is used for the flyout menu.
76
76
  * - `level` determines whether the flyout is `main` or `child`.
77
77
  * - Optional `size` is the named EUI size (e.g. `s`, `m`, `l`).
78
+ * - Optional `iconType` is shown next to the session title in the history menu.
78
79
  */
79
80
  var addFlyout = exports.addFlyout = function addFlyout(flyoutId, title) {
80
81
  var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _const.LEVEL_MAIN;
81
82
  var size = arguments.length > 3 ? arguments[3] : undefined;
82
- var minWidth = arguments.length > 4 ? arguments[4] : undefined;
83
+ var iconType = arguments.length > 4 ? arguments[4] : undefined;
84
+ var minWidth = arguments.length > 5 ? arguments[5] : undefined;
83
85
  return {
84
86
  type: ACTION_ADD,
85
87
  flyoutId: flyoutId,
86
88
  title: title,
87
89
  level: level,
88
90
  size: size,
91
+ iconType: iconType,
89
92
  minWidth: minWidth
90
93
  };
91
94
  };
@@ -146,11 +149,12 @@ var goBack = exports.goBack = function goBack() {
146
149
  };
147
150
  };
148
151
 
149
- /** Navigate to a specific flyout (remove all sessions after it). */
150
- var goToFlyout = exports.goToFlyout = function goToFlyout(flyoutId) {
152
+ /** Navigate to a specific flyout (remove all sessions after it, or pop to child in history when level === 'child'). */
153
+ var goToFlyout = exports.goToFlyout = function goToFlyout(flyoutId, level) {
151
154
  return {
152
155
  type: ACTION_GO_TO_FLYOUT,
153
- flyoutId: flyoutId
156
+ flyoutId: flyoutId,
157
+ level: level
154
158
  };
155
159
  };
156
160
 
@@ -119,8 +119,14 @@ EuiFlyoutChild.propTypes = {
119
119
  */
120
120
  title: _propTypes.default.node,
121
121
  /**
122
- * Hides the title in the `EuiFlyoutMenu`. This is useful when the title is already shown in an `EuiFlyoutHeader`.
123
- * @default true for main flyout in a managed flyout session; false otherwise
122
+ * An optional icon to display next to the session title in the history menu
123
+ */
124
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "alert", "analyzeEvent", "annotation", "anomalyChart", "chartAnomaly", "anomalySwimLane", "apmApp", "apmTrace", "chartWaterfall", "appSearchApp", "apps", "arrowDown", "chevronSingleDown", "arrowLeft", "chevronSingleLeft", "arrowRight", "chevronSingleRight", "arrowUp", "chevronSingleUp", "arrowStart", "chevronLimitLeft", "arrowEnd", "chevronLimitRight", "article", "asterisk", "at", "archive", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "briefcase", "branchUser", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "chartChangePoint", "chartArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "chartBarVerticalStack", "chartGauge", "chartHeatmap", "chartLine", "chartPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkInCircleFilled", "checkCircleFill", "cheer", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "paintBucket", "commandLine", "comment", "compare", "compute", "processor", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "contrastFill", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crossCircle", "crosshair", "crosshairs", "currency", "money", "cut", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "desktop", "display", "devToolsApp", "diff", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "chevronDoubleLeft", "doubleArrowRight", "chevronDoubleRight", "ellipsis", "editorAlignCenter", "textAlignCenter", "editorAlignLeft", "textAlignLeft", "editorAlignRight", "textAlignRight", "editorBold", "textBold", "editorChecklist", "listCheck", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "textHeading", "editorItalic", "textItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "listNumber", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "redo", "editorStrike", "textStrike", "editorTable", "table", "editorUnderline", "textUnderline", "editorUndo", "undo", "editorUnorderedList", "listBullet", "email", "mail", "empty", "emsApp", "endpoint", "eql", "query", "eraser", "error", "errorFilled", "errorFill", "esqlVis", "exit", "logOut", "expand", "maximize", "expandMini", "export", "exportAction", "upload", "external", "eye", "eyeClosed", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "hourglass", "if", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "mapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "tableTime", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "queryField", "kqlFunction", "kqlOperand", "queryOperand", "kqlSelector", "querySelector", "kqlValue", "queryValue", "kubernetesNode", "kubernetesPod", "launch", "rocket", "layers", "lensApp", "lettering", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDashed", "lineDot", "lineDotted", "lineSolid", "link", "linkSlash", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "queue", "machineLearningApp", "magnet", "magnify", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusInCircle", "minusInCircleFilled", "minusInSquare", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "vectorTriangle", "notebookApp", "number", "offline", "wifiSlash", "online", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusCircle", "plusInCircle", "plusInCircleFilled", "plusInSquare", "plusSquare", "popout", "presentation", "productRobot", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "server", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starFilledSpace", "starMinusEmpty", "starMinusFill", "starMinusFilled", "starPlusEmpty", "starPlusFill", "starPlusFilled", "stats", "stop", "stopFill", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityHigh", "tableDensityExpanded", "tableDensityLow", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thermometer", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "refreshTime", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "unarchive", "vector", "vectorSquare", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "chartMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
125
+ /**
126
+ * Hides the title in the `EuiFlyoutMenu`.
127
+ * @default true
128
+ * @deprecated Use `EuiFlyoutHeader` for visible titles instead.
129
+ * `hideTitle` is still honored but may be removed in a future major version.
124
130
  */
125
131
  hideTitle: _propTypes.default.bool,
126
132
  /**
@@ -19,6 +19,7 @@ var _context = require("./context");
19
19
  var _flyout_managed = require("./flyout_managed.styles");
20
20
  var _hooks = require("./hooks");
21
21
  var _selectors = require("./selectors");
22
+ var _store = require("./store");
22
23
  var _validation = require("./validation");
23
24
  var _react2 = require("@emotion/react");
24
25
  var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "css", "flyoutMenuProps"];
@@ -172,18 +173,23 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
172
173
  // Register with flyout manager context when open, remove when closed
173
174
  // Using useLayoutEffect to run synchronously before DOM updates
174
175
  (0, _react.useLayoutEffect)(function () {
175
- addFlyout(flyoutId, title, level, size, typeof minWidth === 'number' ? minWidth : undefined);
176
+ addFlyout(flyoutId, title, level, size, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
176
177
  return function () {
177
- // Only call closeFlyout if it wasn't already called via onClose
178
- // This prevents duplicate removal when using Escape/X button
179
- if (flyoutExistsInManagerRef.current) {
178
+ var currentStoreState = (0, _store.getFlyoutManagerStore)().getState();
179
+ var stillInStore = currentStoreState.flyouts.some(function (f) {
180
+ return f.flyoutId === flyoutId;
181
+ });
182
+ if (stillInStore) {
183
+ // Normal cleanup (deps changed or explicit close via isOpen=false)
180
184
  level === _const.LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
185
+ } else if (wasRegisteredRef.current) {
186
+ var _onCloseCallbackRef$c;
187
+ // Cascade close: was registered but removed externally (e.g. main closed)
188
+ (_onCloseCallbackRef$c = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c === void 0 || _onCloseCallbackRef$c.call(onCloseCallbackRef, new MouseEvent('navigation'));
181
189
  }
182
-
183
- // Reset navigation tracking when explicitly closed via isOpen=false
184
190
  wasRegisteredRef.current = false;
185
191
  };
186
- }, [flyoutId, title, level, size, minWidth, addFlyout, closeFlyout, closeAllFlyouts]);
192
+ }, [flyoutId, title, level, size, minWidth, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
187
193
 
188
194
  // Detect when flyout has been removed from manager state (e.g., via Back button)
189
195
  // and trigger onClose callback to notify the parent component
@@ -195,8 +201,8 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
195
201
  // If flyout was previously registered, is marked as open, but no longer exists in manager state,
196
202
  // it was removed via navigation (Back button) - trigger close callback
197
203
  if (wasRegisteredRef.current && !flyoutExistsInManager) {
198
- var _onCloseCallbackRef$c;
199
- (_onCloseCallbackRef$c = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c === void 0 || _onCloseCallbackRef$c.call(onCloseCallbackRef, new MouseEvent('navigation'));
204
+ var _onCloseCallbackRef$c2;
205
+ (_onCloseCallbackRef$c2 = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c2 === void 0 || _onCloseCallbackRef$c2.call(onCloseCallbackRef, new MouseEvent('navigation'));
200
206
  wasRegisteredRef.current = false; // Reset to avoid repeated calls
201
207
  }
202
208
  }, [flyoutExistsInManager, flyoutId]);
@@ -228,8 +234,7 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
228
234
  (0, _reactDom.flushSync)(function () {
229
235
  level === _const.LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
230
236
  });
231
-
232
- // trigger parent callback, unmounts the component
237
+ wasRegisteredRef.current = false; // Prevent cleanup from double-firing onClose
233
238
  if (onCloseCallbackRef.current) {
234
239
  var event = e || new MouseEvent('click');
235
240
  onCloseCallbackRef.current(event);