@elastic/eui 113.2.1 → 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.
- package/es/components/basic_table/collapsed_item_actions.js +2 -0
- package/es/components/context_menu/context_menu_item.js +9 -3
- package/es/components/context_menu/context_menu_item.styles.js +6 -2
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
- package/es/components/flyout/const.js +10 -0
- package/es/components/flyout/flyout.component.js +47 -59
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout_menu.js +17 -4
- package/es/components/flyout/manager/actions.js +9 -5
- package/es/components/flyout/manager/flyout_child.js +8 -2
- package/es/components/flyout/manager/flyout_managed.js +24 -13
- package/es/components/flyout/manager/reducer.js +182 -44
- package/es/components/flyout/manager/store.js +67 -12
- package/es/components/flyout/use_flyout_menu.js +70 -0
- package/es/components/form/file_picker/file_picker.js +46 -18
- package/eui.d.ts +397 -15
- package/lib/components/basic_table/collapsed_item_actions.js +2 -0
- package/lib/components/context_menu/context_menu_item.js +9 -3
- package/lib/components/context_menu/context_menu_item.styles.js +5 -1
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
- package/lib/components/flyout/const.js +11 -1
- package/lib/components/flyout/flyout.component.js +46 -58
- package/lib/components/flyout/flyout.js +6 -0
- package/lib/components/flyout/flyout_menu.js +17 -4
- package/lib/components/flyout/manager/actions.js +9 -5
- package/lib/components/flyout/manager/flyout_child.js +8 -2
- package/lib/components/flyout/manager/flyout_managed.js +16 -11
- package/lib/components/flyout/manager/reducer.js +181 -43
- package/lib/components/flyout/manager/store.js +67 -14
- package/lib/components/flyout/use_flyout_menu.js +75 -0
- package/lib/components/form/file_picker/file_picker.js +46 -18
- package/optimize/es/components/basic_table/collapsed_item_actions.js +2 -0
- package/optimize/es/components/context_menu/context_menu_item.js +3 -2
- package/optimize/es/components/context_menu/context_menu_item.styles.js +6 -2
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
- package/optimize/es/components/flyout/const.js +10 -0
- package/optimize/es/components/flyout/flyout.component.js +47 -59
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout_menu.js +5 -2
- package/optimize/es/components/flyout/manager/actions.js +9 -5
- package/optimize/es/components/flyout/manager/flyout_managed.js +16 -11
- package/optimize/es/components/flyout/manager/reducer.js +182 -44
- package/optimize/es/components/flyout/manager/store.js +62 -12
- package/optimize/es/components/flyout/use_flyout_menu.js +69 -0
- package/optimize/es/components/form/file_picker/file_picker.js +35 -18
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +2 -0
- package/optimize/lib/components/context_menu/context_menu_item.js +3 -2
- package/optimize/lib/components/context_menu/context_menu_item.styles.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
- package/optimize/lib/components/flyout/const.js +11 -1
- package/optimize/lib/components/flyout/flyout.component.js +46 -58
- package/optimize/lib/components/flyout/flyout.js +6 -0
- package/optimize/lib/components/flyout/flyout_menu.js +5 -2
- package/optimize/lib/components/flyout/manager/actions.js +9 -5
- package/optimize/lib/components/flyout/manager/flyout_managed.js +16 -11
- package/optimize/lib/components/flyout/manager/reducer.js +181 -43
- package/optimize/lib/components/flyout/manager/store.js +63 -12
- package/optimize/lib/components/flyout/use_flyout_menu.js +74 -0
- package/optimize/lib/components/form/file_picker/file_picker.js +35 -18
- package/package.json +3 -3
- package/test-env/components/basic_table/collapsed_item_actions.js +2 -0
- package/test-env/components/context_menu/context_menu_item.js +9 -3
- package/test-env/components/context_menu/context_menu_item.styles.js +5 -1
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +17 -3
- package/test-env/components/flyout/const.js +11 -1
- package/test-env/components/flyout/flyout.component.js +46 -58
- package/test-env/components/flyout/flyout_menu.js +17 -4
- package/test-env/components/flyout/manager/actions.js +9 -5
- package/test-env/components/flyout/manager/flyout_child.js +8 -2
- package/test-env/components/flyout/manager/flyout_managed.js +16 -11
- package/test-env/components/flyout/manager/reducer.js +181 -43
- package/test-env/components/flyout/manager/store.js +63 -12
- package/test-env/components/flyout/use_flyout_menu.js +74 -0
- package/test-env/components/form/file_picker/file_picker.js +46 -18
|
@@ -69,6 +69,7 @@ var CollapsedItemActions = exports.CollapsedItemActions = function CollapsedItem
|
|
|
69
69
|
var toolTipContent = (0, _action_types.callWithItemIfFunction)(item)(action.description);
|
|
70
70
|
var href = (0, _action_types.callWithItemIfFunction)(item)(action.href);
|
|
71
71
|
var dataTestSubj = (0, _action_types.callWithItemIfFunction)(item)(action['data-test-subj']);
|
|
72
|
+
var color = action.color ? (0, _action_types.callWithItemIfFunction)(item)(action.color) : undefined;
|
|
72
73
|
var _onClick = action.onClick,
|
|
73
74
|
target = action.target;
|
|
74
75
|
controls.push((0, _react2.jsx)(_context_menu.EuiContextMenuItem, {
|
|
@@ -78,6 +79,7 @@ var CollapsedItemActions = exports.CollapsedItemActions = function CollapsedItem
|
|
|
78
79
|
href: href,
|
|
79
80
|
target: target,
|
|
80
81
|
icon: icon,
|
|
82
|
+
color: color,
|
|
81
83
|
"data-test-subj": dataTestSubj,
|
|
82
84
|
onClick: function onClick(event) {
|
|
83
85
|
event.persist();
|
|
@@ -17,7 +17,7 @@ var _icon = require("../icon");
|
|
|
17
17
|
var _tool_tip = require("../tool_tip");
|
|
18
18
|
var _context_menu_item = require("./context_menu_item.styles");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size"];
|
|
20
|
+
var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size", "color"];
|
|
21
21
|
/*
|
|
22
22
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
23
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -48,12 +48,13 @@ var EuiContextMenuItem = exports.EuiContextMenuItem = function EuiContextMenuIte
|
|
|
48
48
|
rel = _ref.rel,
|
|
49
49
|
_ref$size = _ref.size,
|
|
50
50
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
51
|
+
color = _ref.color,
|
|
51
52
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
52
53
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
53
54
|
var disabled = _disabled || !isHrefValid;
|
|
54
55
|
var classes = (0, _classnames.default)('euiContextMenuItem', className);
|
|
55
56
|
var styles = (0, _services.useEuiMemoizedStyles)(_context_menu_item.euiContextMenuItemStyles);
|
|
56
|
-
var cssStyles = [styles.euiContextMenuItem, styles.sizes[size], styles.layoutAlign[layoutAlign], disabled && styles.disabled];
|
|
57
|
+
var cssStyles = [styles.euiContextMenuItem, styles.sizes[size], styles.layoutAlign[layoutAlign], disabled && styles.disabled, !disabled && color && styles.colors[color]];
|
|
57
58
|
var iconInstance = icon && (typeof icon === 'string' ? (0, _react2.jsx)(_icon.EuiIcon, {
|
|
58
59
|
type: icon,
|
|
59
60
|
size: "m",
|
|
@@ -149,5 +150,10 @@ EuiContextMenuItem.propTypes = {
|
|
|
149
150
|
/**
|
|
150
151
|
* Reduce the size to `s` when in need of a more compressed menu
|
|
151
152
|
*/
|
|
152
|
-
size: _propTypes.default.any
|
|
153
|
+
size: _propTypes.default.any,
|
|
154
|
+
/**
|
|
155
|
+
* Applies a color to the text and icon of the item.
|
|
156
|
+
* Accepts the same color values as `EuiButtonEmpty`.
|
|
157
|
+
*/
|
|
158
|
+
color: _propTypes.default.any
|
|
153
159
|
};
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -31,9 +31,9 @@ var _flyout_resize_button = require("./_flyout_resize_button");
|
|
|
31
31
|
var _use_flyout_resizable = require("./use_flyout_resizable");
|
|
32
32
|
var _use_flyout_z_index = require("./use_flyout_z_index");
|
|
33
33
|
var _flyout_parent_context = require("./flyout_parent_context");
|
|
34
|
+
var _use_flyout_menu = require("./use_flyout_menu");
|
|
34
35
|
var _react2 = require("@emotion/react");
|
|
35
|
-
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"]
|
|
36
|
-
_excluded2 = ["titleId"];
|
|
36
|
+
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"];
|
|
37
37
|
/*
|
|
38
38
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
39
39
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -71,40 +71,42 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
|
|
|
71
71
|
_usePropsWithComponen2 = _usePropsWithComponen.hideCloseButton,
|
|
72
72
|
hideCloseButton = _usePropsWithComponen2 === void 0 ? false : _usePropsWithComponen2,
|
|
73
73
|
_flyoutMenuProps = _usePropsWithComponen.flyoutMenuProps,
|
|
74
|
+
_usePropsWithComponen3 = _usePropsWithComponen.flyoutMenuDisplayMode,
|
|
75
|
+
flyoutMenuDisplayMode = _usePropsWithComponen3 === void 0 ? _const2.DEFAULT_MENU_DISPLAY_MODE : _usePropsWithComponen3,
|
|
74
76
|
closeButtonProps = _usePropsWithComponen.closeButtonProps,
|
|
75
|
-
|
|
76
|
-
closeButtonPosition =
|
|
77
|
+
_usePropsWithComponen4 = _usePropsWithComponen.closeButtonPosition,
|
|
78
|
+
closeButtonPosition = _usePropsWithComponen4 === void 0 ? 'inside' : _usePropsWithComponen4,
|
|
77
79
|
onClose = _usePropsWithComponen.onClose,
|
|
78
|
-
|
|
79
|
-
ownFocus =
|
|
80
|
-
|
|
81
|
-
side =
|
|
82
|
-
|
|
83
|
-
_size =
|
|
84
|
-
|
|
85
|
-
paddingSize =
|
|
86
|
-
|
|
87
|
-
maxWidth =
|
|
80
|
+
_usePropsWithComponen5 = _usePropsWithComponen.ownFocus,
|
|
81
|
+
ownFocus = _usePropsWithComponen5 === void 0 ? true : _usePropsWithComponen5,
|
|
82
|
+
_usePropsWithComponen6 = _usePropsWithComponen.side,
|
|
83
|
+
side = _usePropsWithComponen6 === void 0 ? _const2.DEFAULT_SIDE : _usePropsWithComponen6,
|
|
84
|
+
_usePropsWithComponen7 = _usePropsWithComponen.size,
|
|
85
|
+
_size = _usePropsWithComponen7 === void 0 ? _const2.DEFAULT_SIZE : _usePropsWithComponen7,
|
|
86
|
+
_usePropsWithComponen8 = _usePropsWithComponen.paddingSize,
|
|
87
|
+
paddingSize = _usePropsWithComponen8 === void 0 ? _const2.DEFAULT_PADDING_SIZE : _usePropsWithComponen8,
|
|
88
|
+
_usePropsWithComponen9 = _usePropsWithComponen.maxWidth,
|
|
89
|
+
maxWidth = _usePropsWithComponen9 === void 0 ? false : _usePropsWithComponen9,
|
|
88
90
|
style = _usePropsWithComponen.style,
|
|
89
|
-
|
|
90
|
-
hasChildBackground =
|
|
91
|
+
_usePropsWithComponen10 = _usePropsWithComponen.hasChildBackground,
|
|
92
|
+
hasChildBackground = _usePropsWithComponen10 === void 0 ? false : _usePropsWithComponen10,
|
|
91
93
|
maskProps = _usePropsWithComponen.maskProps,
|
|
92
|
-
|
|
93
|
-
type =
|
|
94
|
+
_usePropsWithComponen11 = _usePropsWithComponen.type,
|
|
95
|
+
type = _usePropsWithComponen11 === void 0 ? _const2.DEFAULT_TYPE : _usePropsWithComponen11,
|
|
94
96
|
outsideClickCloses = _usePropsWithComponen.outsideClickCloses,
|
|
95
|
-
|
|
96
|
-
pushMinBreakpoint =
|
|
97
|
-
|
|
98
|
-
pushAnimation =
|
|
97
|
+
_usePropsWithComponen12 = _usePropsWithComponen.pushMinBreakpoint,
|
|
98
|
+
pushMinBreakpoint = _usePropsWithComponen12 === void 0 ? _const2.DEFAULT_PUSH_MIN_BREAKPOINT : _usePropsWithComponen12,
|
|
99
|
+
_usePropsWithComponen13 = _usePropsWithComponen.pushAnimation,
|
|
100
|
+
pushAnimation = _usePropsWithComponen13 === void 0 ? false : _usePropsWithComponen13,
|
|
99
101
|
_focusTrapProps = _usePropsWithComponen.focusTrapProps,
|
|
100
|
-
|
|
101
|
-
includeFixedHeadersInFocusTrap =
|
|
102
|
+
_usePropsWithComponen14 = _usePropsWithComponen.includeFixedHeadersInFocusTrap,
|
|
103
|
+
includeFixedHeadersInFocusTrap = _usePropsWithComponen14 === void 0 ? true : _usePropsWithComponen14,
|
|
102
104
|
includeSelectorInFocusTrap = _usePropsWithComponen.includeSelectorInFocusTrap,
|
|
103
105
|
_ariaDescribedBy = _usePropsWithComponen['aria-describedby'],
|
|
104
106
|
_ariaLabelledBy = _usePropsWithComponen['aria-labelledby'],
|
|
105
107
|
id = _usePropsWithComponen.id,
|
|
106
|
-
|
|
107
|
-
resizable =
|
|
108
|
+
_usePropsWithComponen15 = _usePropsWithComponen.resizable,
|
|
109
|
+
resizable = _usePropsWithComponen15 === void 0 ? false : _usePropsWithComponen15,
|
|
108
110
|
minWidth = _usePropsWithComponen.minWidth,
|
|
109
111
|
onResize = _usePropsWithComponen.onResize,
|
|
110
112
|
onAnimationEnd = _usePropsWithComponen.onAnimationEnd,
|
|
@@ -162,6 +164,21 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
|
|
|
162
164
|
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;
|
|
163
165
|
var isActiveManagedFlyout = (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId || (currentSession === null || currentSession === void 0 ? void 0 : currentSession.childFlyoutId) === flyoutId;
|
|
164
166
|
var currentZIndexRef = (0, _react.useRef)((_managerState$current = managerState === null || managerState === void 0 ? void 0 : managerState.currentZIndex) !== null && _managerState$current !== void 0 ? _managerState$current : 0);
|
|
167
|
+
var _useEuiFlyoutMenu = (0, _use_flyout_menu.useEuiFlyoutMenu)({
|
|
168
|
+
flyoutMenuProps: _flyoutMenuProps,
|
|
169
|
+
flyoutMenuDisplayMode: flyoutMenuDisplayMode,
|
|
170
|
+
ariaLabelledBy: _ariaLabelledBy
|
|
171
|
+
}),
|
|
172
|
+
flyoutMenuId = _useEuiFlyoutMenu.flyoutMenuId,
|
|
173
|
+
flyoutMenuProps = _useEuiFlyoutMenu.flyoutMenuProps,
|
|
174
|
+
shouldRenderMenu = _useEuiFlyoutMenu.shouldRenderMenu,
|
|
175
|
+
ariaLabelledBy = _useEuiFlyoutMenu.ariaLabelledBy;
|
|
176
|
+
(0, _react.useEffect)(function () {
|
|
177
|
+
if (process.env.NODE_ENV === 'development' && _flyoutMenuProps && 'hideTitle' in _flyoutMenuProps) {
|
|
178
|
+
console.warn('EuiFlyout: `flyoutMenuProps.hideTitle` is deprecated. Use `EuiFlyoutHeader` for visible titles instead.');
|
|
179
|
+
}
|
|
180
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
181
|
+
}, []);
|
|
165
182
|
|
|
166
183
|
// Use a ref to access the latest flyoutManager without triggering effect re-runs
|
|
167
184
|
var flyoutManagerRef = (0, _react.useRef)(flyoutManager);
|
|
@@ -610,34 +627,6 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
|
|
|
610
627
|
})));
|
|
611
628
|
}, [hasOverlayMask, descriptionId, focusTrapShards.length]);
|
|
612
629
|
|
|
613
|
-
/*
|
|
614
|
-
* If the flyout menu is to be rendered, ensure the flyout has aria-labelledby referencing the menu's titleId
|
|
615
|
-
*/
|
|
616
|
-
var generatedMenuId = (0, _services.useGeneratedHtmlId)();
|
|
617
|
-
var _ref = _flyoutMenuProps || {},
|
|
618
|
-
_titleId = _ref.titleId,
|
|
619
|
-
flyoutMenuProps = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
|
|
620
|
-
var hasMenu = !!_flyoutMenuProps;
|
|
621
|
-
var flyoutMenuId = (0, _react.useMemo)(function () {
|
|
622
|
-
if (!hasMenu) return undefined;
|
|
623
|
-
return _titleId || generatedMenuId;
|
|
624
|
-
}, [hasMenu, _titleId, generatedMenuId]);
|
|
625
|
-
|
|
626
|
-
// If the flyout level is LEVEL_MAIN, the title should be hidden by default
|
|
627
|
-
var flyoutMenuHideTitle = (0, _react.useMemo)(function () {
|
|
628
|
-
if (!hasMenu) return undefined;
|
|
629
|
-
if ((_flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.hideTitle) !== undefined) {
|
|
630
|
-
return _flyoutMenuProps.hideTitle;
|
|
631
|
-
}
|
|
632
|
-
return (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId;
|
|
633
|
-
}, [hasMenu, _flyoutMenuProps, currentSession, flyoutId]);
|
|
634
|
-
var ariaLabelledBy = (0, _react.useMemo)(function () {
|
|
635
|
-
if (flyoutMenuId) {
|
|
636
|
-
return (0, _classnames.default)(flyoutMenuId, _ariaLabelledBy);
|
|
637
|
-
}
|
|
638
|
-
return _ariaLabelledBy;
|
|
639
|
-
}, [flyoutMenuId, _ariaLabelledBy]);
|
|
640
|
-
|
|
641
630
|
/*
|
|
642
631
|
* Trap focus even when `ownFocus={false}`, otherwise closing
|
|
643
632
|
* the flyout won't return focus to the originating button.
|
|
@@ -705,13 +694,12 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
|
|
|
705
694
|
"aria-labelledby": ariaLabelledBy,
|
|
706
695
|
"data-autofocus": !isPushed || undefined,
|
|
707
696
|
onAnimationEnd: onAnimationEnd
|
|
708
|
-
}), !isPushed && screenReaderDescription,
|
|
697
|
+
}), !isPushed && screenReaderDescription, shouldRenderMenu ? (0, _react2.jsx)(_flyout_menu.EuiFlyoutMenu, (0, _extends2.default)({}, flyoutMenuProps, {
|
|
698
|
+
titleId: flyoutMenuId
|
|
699
|
+
})) : !hideCloseButton && (0, _react2.jsx)(_flyout_close_button.EuiFlyoutCloseButton, (0, _extends2.default)({}, closeButtonProps, {
|
|
709
700
|
onClose: handleClose,
|
|
710
701
|
closeButtonPosition: closeButtonPosition,
|
|
711
702
|
side: side
|
|
712
|
-
})), _flyoutMenuProps && (0, _react2.jsx)(_flyout_menu.EuiFlyoutMenu, (0, _extends2.default)({}, flyoutMenuProps, {
|
|
713
|
-
hideTitle: flyoutMenuHideTitle,
|
|
714
|
-
titleId: flyoutMenuId
|
|
715
703
|
})), resizable && (0, _react2.jsx)(_flyout_resize_button.EuiFlyoutResizeButton, {
|
|
716
704
|
type: type,
|
|
717
705
|
side: side,
|
|
@@ -82,6 +82,7 @@ var HistoryPopover = function HistoryPopover(_ref) {
|
|
|
82
82
|
return (0, _react2.jsx)(_list_group.EuiListGroupItem, {
|
|
83
83
|
key: "history-item-".concat(index),
|
|
84
84
|
label: item.title,
|
|
85
|
+
iconType: item.iconType,
|
|
85
86
|
size: "s",
|
|
86
87
|
onClick: function onClick() {
|
|
87
88
|
item.onClick();
|
|
@@ -105,7 +106,8 @@ var EuiFlyoutMenu = exports.EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
|
|
|
105
106
|
var className = _ref2.className,
|
|
106
107
|
title = _ref2.title,
|
|
107
108
|
titleId = _ref2.titleId,
|
|
108
|
-
hideTitle = _ref2.hideTitle,
|
|
109
|
+
_ref2$hideTitle = _ref2.hideTitle,
|
|
110
|
+
hideTitle = _ref2$hideTitle === void 0 ? true : _ref2$hideTitle,
|
|
109
111
|
hideCloseButton = _ref2.hideCloseButton,
|
|
110
112
|
_ref2$historyItems = _ref2.historyItems,
|
|
111
113
|
historyItems = _ref2$historyItems === void 0 ? [] : _ref2$historyItems,
|
|
@@ -136,7 +138,8 @@ var EuiFlyoutMenu = exports.EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
|
|
|
136
138
|
});
|
|
137
139
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
138
140
|
className: classes,
|
|
139
|
-
css: styles.euiFlyoutMenu__container
|
|
141
|
+
css: styles.euiFlyoutMenu__container,
|
|
142
|
+
"data-test-subj": "euiFlyoutMenu"
|
|
140
143
|
}, rest), (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
141
144
|
alignItems: "center",
|
|
142
145
|
justifyContent: "spaceBetween",
|
|
@@ -193,8 +196,14 @@ EuiFlyoutMenu.propTypes = {
|
|
|
193
196
|
*/
|
|
194
197
|
title: _propTypes.default.node,
|
|
195
198
|
/**
|
|
196
|
-
*
|
|
197
|
-
|
|
199
|
+
* An optional icon to display next to the session title in the history menu
|
|
200
|
+
*/
|
|
201
|
+
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]),
|
|
202
|
+
/**
|
|
203
|
+
* Hides the title in the `EuiFlyoutMenu`.
|
|
204
|
+
* @default true
|
|
205
|
+
* @deprecated Use `EuiFlyoutHeader` for visible titles instead.
|
|
206
|
+
* `hideTitle` is still honored but may be removed in a future major version.
|
|
198
207
|
*/
|
|
199
208
|
hideTitle: _propTypes.default.bool,
|
|
200
209
|
/**
|
|
@@ -219,6 +228,10 @@ EuiFlyoutMenu.propTypes = {
|
|
|
219
228
|
* Title for the history item
|
|
220
229
|
*/
|
|
221
230
|
title: _propTypes.default.string.isRequired,
|
|
231
|
+
/**
|
|
232
|
+
* An optional icon to display next to the session title in the history menu
|
|
233
|
+
*/
|
|
234
|
+
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]),
|
|
222
235
|
/**
|
|
223
236
|
* onClick handler for the history item
|
|
224
237
|
*/
|
|
@@ -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
|
|
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
|
|
|
@@ -116,8 +116,14 @@ EuiFlyoutChild.propTypes = {
|
|
|
116
116
|
*/
|
|
117
117
|
title: _propTypes.default.node,
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
120
|
-
|
|
119
|
+
* An optional icon to display next to the session title in the history menu
|
|
120
|
+
*/
|
|
121
|
+
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]),
|
|
122
|
+
/**
|
|
123
|
+
* Hides the title in the `EuiFlyoutMenu`.
|
|
124
|
+
* @default true
|
|
125
|
+
* @deprecated Use `EuiFlyoutHeader` for visible titles instead.
|
|
126
|
+
* `hideTitle` is still honored but may be removed in a future major version.
|
|
121
127
|
*/
|
|
122
128
|
hideTitle: _propTypes.default.bool,
|
|
123
129
|
/**
|
|
@@ -24,6 +24,7 @@ var _context = require("./context");
|
|
|
24
24
|
var _flyout_managed = require("./flyout_managed.styles");
|
|
25
25
|
var _hooks = require("./hooks");
|
|
26
26
|
var _selectors = require("./selectors");
|
|
27
|
+
var _store = require("./store");
|
|
27
28
|
var _validation = require("./validation");
|
|
28
29
|
var _react2 = require("@emotion/react");
|
|
29
30
|
var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "css", "flyoutMenuProps"];
|
|
@@ -164,18 +165,23 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
164
165
|
// Register with flyout manager context when open, remove when closed
|
|
165
166
|
// Using useLayoutEffect to run synchronously before DOM updates
|
|
166
167
|
(0, _react.useLayoutEffect)(function () {
|
|
167
|
-
addFlyout(flyoutId, title, level, size, typeof minWidth === 'number' ? minWidth : undefined);
|
|
168
|
+
addFlyout(flyoutId, title, level, size, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
|
|
168
169
|
return function () {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
var currentStoreState = (0, _store.getFlyoutManagerStore)().getState();
|
|
171
|
+
var stillInStore = currentStoreState.flyouts.some(function (f) {
|
|
172
|
+
return f.flyoutId === flyoutId;
|
|
173
|
+
});
|
|
174
|
+
if (stillInStore) {
|
|
175
|
+
// Normal cleanup (deps changed or explicit close via isOpen=false)
|
|
172
176
|
level === _const.LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
|
|
177
|
+
} else if (wasRegisteredRef.current) {
|
|
178
|
+
var _onCloseCallbackRef$c;
|
|
179
|
+
// Cascade close: was registered but removed externally (e.g. main closed)
|
|
180
|
+
(_onCloseCallbackRef$c = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c === void 0 || _onCloseCallbackRef$c.call(onCloseCallbackRef, new MouseEvent('navigation'));
|
|
173
181
|
}
|
|
174
|
-
|
|
175
|
-
// Reset navigation tracking when explicitly closed via isOpen=false
|
|
176
182
|
wasRegisteredRef.current = false;
|
|
177
183
|
};
|
|
178
|
-
}, [flyoutId, title, level, size, minWidth, addFlyout, closeFlyout, closeAllFlyouts]);
|
|
184
|
+
}, [flyoutId, title, level, size, minWidth, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
|
|
179
185
|
|
|
180
186
|
// Detect when flyout has been removed from manager state (e.g., via Back button)
|
|
181
187
|
// and trigger onClose callback to notify the parent component
|
|
@@ -187,8 +193,8 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
187
193
|
// If flyout was previously registered, is marked as open, but no longer exists in manager state,
|
|
188
194
|
// it was removed via navigation (Back button) - trigger close callback
|
|
189
195
|
if (wasRegisteredRef.current && !flyoutExistsInManager) {
|
|
190
|
-
var _onCloseCallbackRef$
|
|
191
|
-
(_onCloseCallbackRef$
|
|
196
|
+
var _onCloseCallbackRef$c2;
|
|
197
|
+
(_onCloseCallbackRef$c2 = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c2 === void 0 || _onCloseCallbackRef$c2.call(onCloseCallbackRef, new MouseEvent('navigation'));
|
|
192
198
|
wasRegisteredRef.current = false; // Reset to avoid repeated calls
|
|
193
199
|
}
|
|
194
200
|
}, [flyoutExistsInManager, flyoutId]);
|
|
@@ -220,8 +226,7 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
220
226
|
(0, _reactDom.flushSync)(function () {
|
|
221
227
|
level === _const.LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
|
|
222
228
|
});
|
|
223
|
-
|
|
224
|
-
// trigger parent callback, unmounts the component
|
|
229
|
+
wasRegisteredRef.current = false; // Prevent cleanup from double-firing onClose
|
|
225
230
|
if (onCloseCallbackRef.current) {
|
|
226
231
|
var event = e || new MouseEvent('click');
|
|
227
232
|
onCloseCallbackRef.current(event);
|