@elastic/eui 92.2.1 → 93.0.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/dist/eui_theme_dark.css +0 -200
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -200
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +0 -9
- package/es/components/basic_table/in_memory_table.js +0 -10
- package/es/components/beacon/beacon.js +9 -6
- package/es/components/breadcrumbs/breadcrumb.js +0 -10
- package/es/components/breadcrumbs/breadcrumbs.js +0 -10
- package/es/components/code/code.js +2 -2
- package/es/components/code/code.styles.js +2 -4
- package/es/components/code/code_block.js +5 -3
- package/es/components/code/code_block.styles.js +4 -7
- package/es/components/code/code_block_controls.js +2 -2
- package/es/components/code/code_block_controls.styles.js +2 -4
- package/es/components/code/code_block_full_screen.js +2 -2
- package/es/components/code/code_syntax.styles.js +39 -34
- package/es/components/comment_list/comment_event.js +3 -2
- package/es/components/comment_list/comment_event.styles.js +2 -18
- package/es/components/context_menu/context_menu.js +2 -6
- package/es/components/context_menu/context_menu_item.js +2 -14
- package/es/components/empty_prompt/empty_prompt.js +62 -65
- package/es/components/empty_prompt/empty_prompt.styles.js +115 -0
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +0 -10
- package/es/components/header/header_links/header_links.js +0 -10
- package/es/components/page/page_header/page_header_content.js +0 -10
- package/es/components/popover/popover.js +3 -15
- package/es/components/search_bar/search_bar.js +36 -32
- package/es/components/search_bar/search_bar.styles.js +22 -0
- package/es/components/text_truncate/text_truncate.js +4 -1
- package/es/components/tour/_tour_footer.js +97 -0
- package/es/components/tour/_tour_footer.styles.js +23 -0
- package/es/components/tour/_tour_header.js +37 -0
- package/es/components/tour/_tour_header.styles.js +20 -0
- package/es/components/tour/tour.styles.js +5 -28
- package/es/components/tour/tour_step.js +45 -130
- package/es/global_styling/mixins/_color.js +46 -13
- package/eui.d.ts +125 -63
- package/i18ntokens.json +94 -94
- package/lib/components/basic_table/basic_table.js +0 -9
- package/lib/components/basic_table/in_memory_table.js +0 -10
- package/lib/components/beacon/beacon.js +11 -6
- package/lib/components/breadcrumbs/breadcrumb.js +0 -10
- package/lib/components/code/code.js +2 -2
- package/lib/components/code/code.styles.js +2 -4
- package/lib/components/code/code_block.js +5 -3
- package/lib/components/code/code_block.styles.js +4 -7
- package/lib/components/code/code_block_controls.js +2 -2
- package/lib/components/code/code_block_controls.styles.js +2 -4
- package/lib/components/code/code_block_full_screen.js +2 -2
- package/lib/components/code/code_syntax.styles.js +40 -36
- package/lib/components/comment_list/comment_event.js +2 -1
- package/lib/components/comment_list/comment_event.styles.js +3 -20
- package/lib/components/context_menu/context_menu.js +2 -6
- package/lib/components/context_menu/context_menu_item.js +2 -14
- package/lib/components/empty_prompt/empty_prompt.js +64 -64
- package/lib/components/empty_prompt/empty_prompt.styles.js +120 -0
- package/lib/components/popover/popover.js +3 -15
- package/lib/components/search_bar/search_bar.js +37 -33
- package/lib/components/search_bar/search_bar.styles.js +30 -0
- package/lib/components/text_truncate/text_truncate.js +4 -1
- package/lib/components/tour/_tour_footer.js +105 -0
- package/lib/components/tour/_tour_footer.styles.js +31 -0
- package/lib/components/tour/_tour_header.js +48 -0
- package/lib/components/tour/_tour_header.styles.js +27 -0
- package/lib/components/tour/tour.styles.js +7 -32
- package/lib/components/tour/tour_step.js +42 -117
- package/lib/global_styling/mixins/_color.js +50 -15
- package/optimize/es/components/basic_table/basic_table.js +0 -9
- package/optimize/es/components/basic_table/in_memory_table.js +0 -10
- package/optimize/es/components/beacon/beacon.js +9 -6
- package/optimize/es/components/code/code.js +2 -2
- package/optimize/es/components/code/code.styles.js +2 -4
- package/optimize/es/components/code/code_block.js +5 -3
- package/optimize/es/components/code/code_block.styles.js +4 -7
- package/optimize/es/components/code/code_block_controls.js +2 -2
- package/optimize/es/components/code/code_block_controls.styles.js +2 -4
- package/optimize/es/components/code/code_block_full_screen.js +2 -2
- package/optimize/es/components/code/code_syntax.styles.js +39 -34
- package/optimize/es/components/comment_list/comment_event.js +3 -2
- package/optimize/es/components/comment_list/comment_event.styles.js +2 -18
- package/optimize/es/components/context_menu/context_menu.js +2 -6
- package/optimize/es/components/context_menu/context_menu_item.js +2 -6
- package/optimize/es/components/empty_prompt/empty_prompt.js +62 -62
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +112 -0
- package/optimize/es/components/popover/popover.js +3 -5
- package/optimize/es/components/search_bar/search_bar.js +36 -32
- package/optimize/es/components/search_bar/search_bar.styles.js +22 -0
- package/optimize/es/components/text_truncate/text_truncate.js +4 -1
- package/optimize/es/components/tour/_tour_footer.js +89 -0
- package/optimize/es/components/tour/_tour_footer.styles.js +23 -0
- package/optimize/es/components/tour/_tour_header.js +33 -0
- package/optimize/es/components/tour/_tour_header.styles.js +20 -0
- package/optimize/es/components/tour/tour.styles.js +5 -28
- package/optimize/es/components/tour/tour_step.js +45 -113
- package/optimize/es/global_styling/mixins/_color.js +46 -13
- package/optimize/lib/components/basic_table/basic_table.js +0 -9
- package/optimize/lib/components/basic_table/in_memory_table.js +0 -10
- package/optimize/lib/components/beacon/beacon.js +12 -6
- package/optimize/lib/components/code/code.js +2 -2
- package/optimize/lib/components/code/code.styles.js +2 -4
- package/optimize/lib/components/code/code_block.js +5 -3
- package/optimize/lib/components/code/code_block.styles.js +4 -7
- package/optimize/lib/components/code/code_block_controls.js +2 -2
- package/optimize/lib/components/code/code_block_controls.styles.js +2 -4
- package/optimize/lib/components/code/code_block_full_screen.js +2 -2
- package/optimize/lib/components/code/code_syntax.styles.js +40 -36
- package/optimize/lib/components/comment_list/comment_event.js +2 -1
- package/optimize/lib/components/comment_list/comment_event.styles.js +3 -20
- package/optimize/lib/components/context_menu/context_menu.js +2 -6
- package/optimize/lib/components/context_menu/context_menu_item.js +2 -6
- package/optimize/lib/components/empty_prompt/empty_prompt.js +65 -62
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +118 -0
- package/optimize/lib/components/popover/popover.js +3 -5
- package/optimize/lib/components/search_bar/search_bar.js +37 -33
- package/optimize/lib/components/search_bar/search_bar.styles.js +30 -0
- package/optimize/lib/components/text_truncate/text_truncate.js +4 -1
- package/optimize/lib/components/tour/_tour_footer.js +100 -0
- package/optimize/lib/components/tour/_tour_footer.styles.js +31 -0
- package/optimize/lib/components/tour/_tour_header.js +43 -0
- package/optimize/lib/components/tour/_tour_header.styles.js +27 -0
- package/optimize/lib/components/tour/tour.styles.js +7 -32
- package/optimize/lib/components/tour/tour_step.js +42 -110
- package/optimize/lib/global_styling/mixins/_color.js +50 -15
- package/package.json +1 -1
- package/src/components/index.scss +0 -2
- package/test-env/components/basic_table/basic_table.js +0 -9
- package/test-env/components/basic_table/in_memory_table.js +0 -10
- package/test-env/components/beacon/beacon.js +12 -6
- package/test-env/components/breadcrumbs/breadcrumb.js +0 -10
- package/test-env/components/code/code.styles.js +2 -4
- package/test-env/components/code/code_block.styles.js +4 -7
- package/test-env/components/code/code_block_controls.js +2 -2
- package/test-env/components/code/code_block_controls.styles.js +2 -4
- package/test-env/components/code/code_block_full_screen.js +2 -2
- package/test-env/components/code/code_syntax.styles.js +40 -36
- package/test-env/components/comment_list/comment_event.js +2 -1
- package/test-env/components/comment_list/comment_event.styles.js +3 -20
- package/test-env/components/context_menu/context_menu.js +2 -6
- package/test-env/components/context_menu/context_menu_item.js +2 -14
- package/test-env/components/empty_prompt/empty_prompt.js +65 -62
- package/test-env/components/empty_prompt/empty_prompt.styles.js +118 -0
- package/test-env/components/popover/popover.js +3 -15
- package/test-env/components/search_bar/search_bar.js +37 -33
- package/test-env/components/search_bar/search_bar.styles.js +30 -0
- package/test-env/components/text_truncate/text_truncate.js +4 -1
- package/test-env/components/tour/_tour_footer.js +100 -0
- package/test-env/components/tour/_tour_footer.styles.js +31 -0
- package/test-env/components/tour/_tour_header.js +48 -0
- package/test-env/components/tour/_tour_header.styles.js +27 -0
- package/test-env/components/tour/tour.styles.js +7 -32
- package/test-env/components/tour/tour_step.js +42 -114
- package/test-env/global_styling/mixins/_color.js +50 -15
- package/src/components/empty_prompt/_empty_prompt.scss +0 -128
- package/src/components/empty_prompt/_index.scss +0 -1
- package/src/components/search_bar/_index.scss +0 -1
- package/src/components/search_bar/_search_bar.scss +0 -10
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.PADDING_SIZES = exports.EuiEmptyPrompt = void 0;
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
11
|
+
var _services = require("../../services");
|
|
12
12
|
var _title = require("../title");
|
|
13
13
|
var _flex = require("../flex");
|
|
14
14
|
var _spacer = require("../spacer");
|
|
@@ -16,6 +16,7 @@ var _icon = require("../icon");
|
|
|
16
16
|
var _named_colors = require("../icon/named_colors");
|
|
17
17
|
var _text = require("../text");
|
|
18
18
|
var _panel = require("../panel/panel");
|
|
19
|
+
var _empty_prompt = require("./empty_prompt.styles");
|
|
19
20
|
var _react2 = require("@emotion/react");
|
|
20
21
|
var _excluded = ["icon", "iconType", "iconColor", "title", "titleSize", "paddingSize", "body", "actions", "className", "layout", "hasBorder", "color", "footer"];
|
|
21
22
|
/*
|
|
@@ -26,20 +27,12 @@ var _excluded = ["icon", "iconType", "iconColor", "title", "titleSize", "padding
|
|
|
26
27
|
* Side Public License, v 1.
|
|
27
28
|
*/
|
|
28
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
33
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
34
33
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
34
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
36
|
-
var
|
|
37
|
-
none: null,
|
|
38
|
-
s: 'euiEmptyPrompt--paddingSmall',
|
|
39
|
-
m: 'euiEmptyPrompt--paddingMedium',
|
|
40
|
-
l: 'euiEmptyPrompt--paddingLarge'
|
|
41
|
-
};
|
|
42
|
-
var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
35
|
+
var PADDING_SIZES = ['none', 's', 'm', 'l'];
|
|
43
36
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
44
37
|
var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
|
|
45
38
|
var icon = _ref.icon,
|
|
@@ -60,41 +53,41 @@ var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
|
|
|
60
53
|
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
61
54
|
footer = _ref.footer,
|
|
62
55
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
63
|
-
var
|
|
56
|
+
var classes = (0, _classnames.default)('euiEmptyPrompt', className);
|
|
57
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
58
|
+
var styles = (0, _react.useMemo)(function () {
|
|
59
|
+
return (0, _empty_prompt.euiEmptyPromptStyles)(euiTheme);
|
|
60
|
+
}, [euiTheme]);
|
|
61
|
+
var cssStyles = [styles.euiEmptyPrompt, styles[layout]];
|
|
62
|
+
var mainStyles = [styles.main.euiEmptyPrompt__main, styles.main[layout], styles.main[paddingSize], layout === 'horizontal' && styles.main.horizontalPadding[paddingSize]];
|
|
63
|
+
var contentStyles = [styles.content.euiEmptyPrompt__content, styles.content[layout]];
|
|
64
|
+
|
|
64
65
|
// Default the iconColor to `subdued`,
|
|
65
66
|
// otherwise try to match the iconColor with the panel color unless iconColor is specified
|
|
66
67
|
var iconColor = _iconColor !== null && _iconColor !== void 0 ? _iconColor : (0, _named_colors.isNamedColor)(color) ? color : 'subdued';
|
|
67
|
-
var iconNode =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
bodyNode = (0, _react2.jsx)(_react.default.Fragment, null, title && (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
82
|
-
size: "m"
|
|
83
|
-
}), (0, _react2.jsx)(_text.EuiText, {
|
|
84
|
-
color: "subdued"
|
|
85
|
-
}, body));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
var actionsNode;
|
|
89
|
-
if (actions) {
|
|
90
|
-
var actionsRow;
|
|
68
|
+
var iconNode = (0, _react.useMemo)(function () {
|
|
69
|
+
if (!iconType && !icon) return null;
|
|
70
|
+
var iconStyles = [styles.icon.euiEmptyPrompt__icon, styles.icon[layout]];
|
|
71
|
+
return (0, _react2.jsx)("div", {
|
|
72
|
+
className: "euiEmptyPrompt__icon",
|
|
73
|
+
css: iconStyles
|
|
74
|
+
}, iconType ? (0, _react2.jsx)(_icon.EuiIcon, {
|
|
75
|
+
type: iconType,
|
|
76
|
+
size: "xxl",
|
|
77
|
+
color: iconColor
|
|
78
|
+
}) : icon);
|
|
79
|
+
}, [icon, iconType, iconColor, layout, styles.icon]);
|
|
80
|
+
var actionsNode = (0, _react.useMemo)(function () {
|
|
81
|
+
if (!actions) return null;
|
|
91
82
|
if (Array.isArray(actions)) {
|
|
92
|
-
|
|
83
|
+
var actionStyles = [styles.actions.euiEmptyPrompt__actions, styles.actions[layout]];
|
|
84
|
+
return (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
93
85
|
className: "euiEmptyPrompt__actions",
|
|
86
|
+
css: actionStyles,
|
|
94
87
|
gutterSize: "m",
|
|
95
88
|
alignItems: "center",
|
|
96
89
|
justifyContent: "center",
|
|
97
|
-
direction:
|
|
90
|
+
direction: layout === 'vertical' ? 'column' : 'row'
|
|
98
91
|
}, actions.map(function (action, index) {
|
|
99
92
|
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
100
93
|
key: index,
|
|
@@ -102,32 +95,39 @@ var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
|
|
|
102
95
|
}, action);
|
|
103
96
|
}));
|
|
104
97
|
} else {
|
|
105
|
-
|
|
98
|
+
return actions;
|
|
106
99
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
}, [actions, layout, styles.actions]);
|
|
101
|
+
var footerNode = (0, _react.useMemo)(function () {
|
|
102
|
+
if (!footer) return null;
|
|
103
|
+
var footerStyles = [styles.footer.euiEmptyPrompt__footer, styles.footer[paddingSize], styles.footer[color], color === 'transparent' && !hasBorder && styles.footer.roundedBorders];
|
|
104
|
+
return (0, _react2.jsx)("div", {
|
|
105
|
+
className: "euiEmptyPrompt__footer",
|
|
106
|
+
css: footerStyles
|
|
107
|
+
}, footer);
|
|
108
|
+
}, [footer, paddingSize, color, hasBorder, styles.footer]);
|
|
109
|
+
return (0, _react2.jsx)(_panel.EuiPanel, _extends({
|
|
110
|
+
css: cssStyles,
|
|
114
111
|
className: classes,
|
|
115
112
|
color: color,
|
|
116
|
-
paddingSize:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, rest)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, iconNode
|
|
123
|
-
className: "
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
paddingSize: "none",
|
|
114
|
+
grow: false,
|
|
115
|
+
hasBorder: hasBorder
|
|
116
|
+
}, rest), (0, _react2.jsx)("div", {
|
|
117
|
+
className: "euiEmptyPrompt__main",
|
|
118
|
+
css: mainStyles
|
|
119
|
+
}, iconNode, (0, _react2.jsx)("div", {
|
|
120
|
+
className: "euiEmptyPrompt__content",
|
|
121
|
+
css: contentStyles
|
|
122
|
+
}, title && (0, _react2.jsx)(_title.EuiTitle, {
|
|
123
|
+
size: titleSize
|
|
124
|
+
}, title), title && body && (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
125
|
+
size: "m"
|
|
126
|
+
}), body && (0, _react2.jsx)(_text.EuiText, {
|
|
127
|
+
color: "subdued"
|
|
128
|
+
}, body), actionsNode && (body || title) && (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
129
|
+
size: "l"
|
|
130
|
+
}), actionsNode)), footerNode);
|
|
131
131
|
};
|
|
132
132
|
exports.EuiEmptyPrompt = EuiEmptyPrompt;
|
|
133
133
|
EuiEmptyPrompt.propTypes = {
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.euiEmptyPromptStyles = void 0;
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
16
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
18
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
19
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
|
+
* Side Public License, v 1.
|
|
21
|
+
*/
|
|
22
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "x4698b-roundedBorders",
|
|
24
|
+
styles: "border-radius:inherit;label:roundedBorders;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "x4698b-roundedBorders",
|
|
27
|
+
styles: "border-radius:inherit;label:roundedBorders;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
31
|
+
name: "zv101j-euiEmptyPrompt__footer",
|
|
32
|
+
styles: "border-end-end-radius:inherit;border-end-start-radius:inherit;label:euiEmptyPrompt__footer;"
|
|
33
|
+
} : {
|
|
34
|
+
name: "zv101j-euiEmptyPrompt__footer",
|
|
35
|
+
styles: "border-end-end-radius:inherit;border-end-start-radius:inherit;label:euiEmptyPrompt__footer;",
|
|
36
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
37
|
+
};
|
|
38
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
39
|
+
name: "1rdinfv-vertical",
|
|
40
|
+
styles: "margin:auto;label:vertical;"
|
|
41
|
+
} : {
|
|
42
|
+
name: "1rdinfv-vertical",
|
|
43
|
+
styles: "margin:auto;label:vertical;",
|
|
44
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
45
|
+
};
|
|
46
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
47
|
+
name: "1w25ahh-vertical",
|
|
48
|
+
styles: "justify-content:center;label:vertical;"
|
|
49
|
+
} : {
|
|
50
|
+
name: "1w25ahh-vertical",
|
|
51
|
+
styles: "justify-content:center;label:vertical;",
|
|
52
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
53
|
+
};
|
|
54
|
+
var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
55
|
+
name: "1o9qvqj-euiEmptyPrompt__main",
|
|
56
|
+
styles: "display:flex;flex-direction:column;label:euiEmptyPrompt__main;"
|
|
57
|
+
} : {
|
|
58
|
+
name: "1o9qvqj-euiEmptyPrompt__main",
|
|
59
|
+
styles: "display:flex;flex-direction:column;label:euiEmptyPrompt__main;",
|
|
60
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
61
|
+
};
|
|
62
|
+
var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext) {
|
|
63
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
64
|
+
var iconMaxWidth = (0, _global_styling.mathWithUnits)(euiTheme.size.l, function (x) {
|
|
65
|
+
return x * 15;
|
|
66
|
+
});
|
|
67
|
+
var generatePaddingStyles = function generatePaddingStyles() {
|
|
68
|
+
var property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'padding';
|
|
69
|
+
return {
|
|
70
|
+
none: null,
|
|
71
|
+
s: /*#__PURE__*/(0, _react.css)(property, ":", (0, _global_styling.euiPaddingSize)(euiThemeContext, 's'), ";;label:s;"),
|
|
72
|
+
m: /*#__PURE__*/(0, _react.css)(property, ":", (0, _global_styling.euiPaddingSize)(euiThemeContext, 'm'), ";;label:m;"),
|
|
73
|
+
l: /*#__PURE__*/(0, _react.css)(property, ":", (0, _global_styling.euiPaddingSize)(euiThemeContext, 'l'), ";;label:l;")
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
var generateFooterBorder = function generateFooterBorder(color) {
|
|
77
|
+
return "".concat(euiTheme.border.width.thin, " solid ").concat((0, _global_styling.euiBorderColor)(euiThemeContext, color));
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
euiEmptyPrompt: /*#__PURE__*/(0, _react.css)("text-align:center;margin:auto;", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{", (0, _global_styling.logicalCSS)('max-width', 'max-content'), ";};label:euiEmptyPrompt;"),
|
|
81
|
+
vertical: /*#__PURE__*/(0, _react.css)(";label:vertical;"),
|
|
82
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{justify-content:flex-start;text-align:start;};label:horizontal;"),
|
|
83
|
+
main: _objectSpread(_objectSpread({
|
|
84
|
+
euiEmptyPrompt__main: _ref5,
|
|
85
|
+
vertical: _ref4,
|
|
86
|
+
horizontal: /*#__PURE__*/(0, _react.css)("align-items:center;", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{flex-direction:row-reverse;};label:horizontal;")
|
|
87
|
+
}, generatePaddingStyles()), {}, {
|
|
88
|
+
horizontalPadding: generatePaddingStyles('gap')
|
|
89
|
+
}),
|
|
90
|
+
content: {
|
|
91
|
+
euiEmptyPrompt__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '36em'), ";;label:euiEmptyPrompt__content;"),
|
|
92
|
+
vertical: _ref3,
|
|
93
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{padding-block:", euiTheme.size.l, ";padding-inline:0;};label:horizontal;")
|
|
94
|
+
},
|
|
95
|
+
icon: {
|
|
96
|
+
euiEmptyPrompt__icon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', iconMaxWidth), " margin:auto;&>*{flex-shrink:1;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";};label:euiEmptyPrompt__icon;"),
|
|
97
|
+
vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.base), ";;label:vertical;"),
|
|
98
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{", (0, _global_styling.logicalCSS)('min-width', '40%'), " ", (0, _global_styling.logicalCSS)('max-width', '50%'), "&&>*{", (0, _global_styling.logicalCSS)('max-width', iconMaxWidth), ";}};label:horizontal;")
|
|
99
|
+
},
|
|
100
|
+
actions: {
|
|
101
|
+
euiEmptyPrompt__actions: /*#__PURE__*/(0, _react.css)(";label:euiEmptyPrompt__actions;"),
|
|
102
|
+
vertical: /*#__PURE__*/(0, _react.css)(";label:vertical;"),
|
|
103
|
+
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['l', 'xl']), "{justify-content:flex-start;};label:horizontal;")
|
|
104
|
+
},
|
|
105
|
+
footer: _objectSpread({
|
|
106
|
+
euiEmptyPrompt__footer: _ref2,
|
|
107
|
+
roundedBorders: _ref,
|
|
108
|
+
// Colors
|
|
109
|
+
transparent: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.body, ";;label:transparent;"),
|
|
110
|
+
plain: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.body, ";;label:plain;"),
|
|
111
|
+
subdued: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
112
|
+
primary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
113
|
+
accent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
114
|
+
danger: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
115
|
+
warning: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
116
|
+
success: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
117
|
+
}, generatePaddingStyles())
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
exports.euiEmptyPromptStyles = euiEmptyPromptStyles;
|
|
@@ -25,7 +25,7 @@ var _popover_arrow = require("./popover_arrow");
|
|
|
25
25
|
var _popover2 = require("./popover.styles");
|
|
26
26
|
var _popover_panel = require("./popover_panel");
|
|
27
27
|
var _react2 = require("@emotion/react");
|
|
28
|
-
var _excluded = ["
|
|
28
|
+
var _excluded = ["anchorPosition", "button", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "repositionToCrossAxis", "hasDragDrop", "zIndex", "attachToAnchor", "display", "offset", "onPositionChange", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "initialFocus", "tabIndex"];
|
|
29
29
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -287,7 +287,7 @@ var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
287
287
|
});
|
|
288
288
|
_defineProperty(_assertThisInitialized(_this), "popoverRef", function (node) {
|
|
289
289
|
_this.button = node;
|
|
290
|
-
(0, _useCombinedRefs.setMultipleRefs)([_this.props.popoverRef
|
|
290
|
+
(0, _useCombinedRefs.setMultipleRefs)([_this.props.popoverRef], node);
|
|
291
291
|
});
|
|
292
292
|
_this.state = {
|
|
293
293
|
prevProps: {
|
|
@@ -368,10 +368,8 @@ var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
368
368
|
var _panelProps$tabIndex,
|
|
369
369
|
_this4 = this;
|
|
370
370
|
var _this$props = this.props,
|
|
371
|
-
anchorClassName = _this$props.anchorClassName,
|
|
372
371
|
anchorPosition = _this$props.anchorPosition,
|
|
373
372
|
button = _this$props.button,
|
|
374
|
-
buttonRef = _this$props.buttonRef,
|
|
375
373
|
insert = _this$props.insert,
|
|
376
374
|
isOpen = _this$props.isOpen,
|
|
377
375
|
ownFocus = _this$props.ownFocus,
|
|
@@ -411,7 +409,7 @@ var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
411
409
|
}];
|
|
412
410
|
var classes = (0, _classnames.default)('euiPopover', {
|
|
413
411
|
'euiPopover-isOpen': this.state.isOpening
|
|
414
|
-
}, className
|
|
412
|
+
}, className);
|
|
415
413
|
var showArrow = hasArrow && !attachToAnchor;
|
|
416
414
|
var panel;
|
|
417
415
|
if (!this.state.suppressingPopover && (isOpen || this.state.isClosing)) {
|
|
@@ -549,12 +547,6 @@ _defineProperty(EuiPopover, "defaultProps", {
|
|
|
549
547
|
display: 'inline-block'
|
|
550
548
|
});
|
|
551
549
|
EuiPopover.propTypes = {
|
|
552
|
-
/**
|
|
553
|
-
* Class name passed to the direct parent of the button
|
|
554
|
-
*
|
|
555
|
-
* @deprecated Use `className` instead
|
|
556
|
-
*/
|
|
557
|
-
anchorClassName: _propTypes.default.string,
|
|
558
550
|
/**
|
|
559
551
|
* Alignment of the popover and arrow relative to the button
|
|
560
552
|
*/
|
|
@@ -568,10 +560,6 @@ EuiPopover.propTypes = {
|
|
|
568
560
|
* Triggering element for which to align the popover to
|
|
569
561
|
*/
|
|
570
562
|
button: _propTypes.default.any.isRequired,
|
|
571
|
-
/**
|
|
572
|
-
* @deprecated Use `popoverRef` instead
|
|
573
|
-
*/
|
|
574
|
-
buttonRef: _propTypes.default.any,
|
|
575
563
|
/**
|
|
576
564
|
* Callback to handle hiding of the popover
|
|
577
565
|
*/
|
|
@@ -18,12 +18,13 @@ Object.defineProperty(exports, "Query", {
|
|
|
18
18
|
});
|
|
19
19
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
var
|
|
21
|
+
var _services = require("../../services");
|
|
22
22
|
var _predicate = require("../../services/predicate");
|
|
23
23
|
var _flex = require("../flex");
|
|
24
24
|
var _search_box = require("./search_box");
|
|
25
25
|
var _search_filters = require("./search_filters");
|
|
26
26
|
var _query2 = require("./query");
|
|
27
|
+
var _search_bar = require("./search_bar.styles");
|
|
27
28
|
var _react2 = require("@emotion/react");
|
|
28
29
|
var _excluded = ["schema"];
|
|
29
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -76,7 +77,7 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
76
77
|
var _this;
|
|
77
78
|
_classCallCheck(this, EuiSearchBar);
|
|
78
79
|
_this = _super.call(this, props);
|
|
79
|
-
_defineProperty(_assertThisInitialized(_this), "hintId", (0,
|
|
80
|
+
_defineProperty(_assertThisInitialized(_this), "hintId", (0, _services.htmlIdGenerator)('__hint')());
|
|
80
81
|
_defineProperty(_assertThisInitialized(_this), "onSearch", function (queryText) {
|
|
81
82
|
try {
|
|
82
83
|
var query = parseQuery(queryText, _this.props);
|
|
@@ -202,39 +203,42 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
202
203
|
toolsRight = _this$props.toolsRight,
|
|
203
204
|
hint = _this$props.hint;
|
|
204
205
|
var toolsLeftEl = this.renderTools(toolsLeft);
|
|
205
|
-
var filtersBar = !filters ? undefined : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
206
|
-
className: "euiSearchBar__filtersHolder",
|
|
207
|
-
grow: false
|
|
208
|
-
}, (0, _react2.jsx)(_search_filters.EuiSearchBarFilters, {
|
|
209
|
-
filters: filters,
|
|
210
|
-
query: query,
|
|
211
|
-
onChange: this.onFiltersChange
|
|
212
|
-
}));
|
|
213
206
|
var toolsRightEl = this.renderTools(toolsRight);
|
|
214
207
|
var isHintVisible = (_hint$popoverProps$is = hint === null || hint === void 0 ? void 0 : (_hint$popoverProps = hint.popoverProps) === null || _hint$popoverProps === void 0 ? void 0 : _hint$popoverProps.isOpen) !== null && _hint$popoverProps$is !== void 0 ? _hint$popoverProps$is : isHintVisibleState;
|
|
215
|
-
return (0, _react2.jsx)(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
208
|
+
return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiTheme) {
|
|
209
|
+
return (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
210
|
+
gutterSize: "m",
|
|
211
|
+
alignItems: "center",
|
|
212
|
+
wrap: true
|
|
213
|
+
}, toolsLeftEl, (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
214
|
+
className: "euiSearchBar__searchHolder",
|
|
215
|
+
css: (0, _search_bar.euiSearchBar__searchHolder)(euiTheme),
|
|
216
|
+
grow: true
|
|
217
|
+
}, (0, _react2.jsx)(_search_box.EuiSearchBox, _extends({}, box, {
|
|
218
|
+
query: queryText,
|
|
219
|
+
onSearch: _this2.onSearch,
|
|
220
|
+
isInvalid: error != null,
|
|
221
|
+
title: error ? error.message : undefined,
|
|
222
|
+
"aria-describedby": isHintVisible ? "".concat(_this2.hintId) : undefined,
|
|
223
|
+
hint: hint ? _objectSpread({
|
|
224
|
+
isVisible: isHintVisible,
|
|
225
|
+
setIsVisible: function setIsVisible(isVisible) {
|
|
226
|
+
_this2.setState({
|
|
227
|
+
isHintVisible: isVisible
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
id: _this2.hintId
|
|
231
|
+
}, hint) : undefined
|
|
232
|
+
}))), filters && (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
233
|
+
className: "euiSearchBar__filtersHolder",
|
|
234
|
+
css: (0, _search_bar.euiSearchBar__filtersHolder)(euiTheme),
|
|
235
|
+
grow: false
|
|
236
|
+
}, (0, _react2.jsx)(_search_filters.EuiSearchBarFilters, {
|
|
237
|
+
filters: filters,
|
|
238
|
+
query: query,
|
|
239
|
+
onChange: _this2.onFiltersChange
|
|
240
|
+
})), toolsRightEl);
|
|
241
|
+
});
|
|
238
242
|
}
|
|
239
243
|
}], [{
|
|
240
244
|
key: "getDerivedStateFromProps",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiSearchBar__searchHolder = exports.euiSearchBar__filtersHolder = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../global_styling");
|
|
9
|
+
var _form = require("../form/form.styles");
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
var euiSearchBar__searchHolder = function euiSearchBar__searchHolder(euiThemeContext) {
|
|
19
|
+
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
20
|
+
maxWidth = _euiFormVariables.maxWidth;
|
|
21
|
+
return /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(maxWidth, function (x) {
|
|
22
|
+
return x / 2;
|
|
23
|
+
})), ";;label:euiSearchBar__searchHolder;");
|
|
24
|
+
};
|
|
25
|
+
exports.euiSearchBar__searchHolder = euiSearchBar__searchHolder;
|
|
26
|
+
var euiSearchBar__filtersHolder = function euiSearchBar__filtersHolder(euiThemeContext) {
|
|
27
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
28
|
+
return /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'l', 'xl']), "{", (0, _global_styling.logicalCSS)('max-width', "calc(100% - ".concat(euiTheme.size.base, ")")), ";};label:euiSearchBar__filtersHolder;");
|
|
29
|
+
};
|
|
30
|
+
exports.euiSearchBar__filtersHolder = euiSearchBar__filtersHolder;
|
|
@@ -145,9 +145,12 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
|
|
|
145
145
|
setReady = _useState4[1];
|
|
146
146
|
(0, _react.useEffect)(function () {
|
|
147
147
|
if (calculationDelayMs) {
|
|
148
|
-
setTimeout(function () {
|
|
148
|
+
var timerId = setTimeout(function () {
|
|
149
149
|
return setReady(true);
|
|
150
150
|
}, calculationDelayMs);
|
|
151
|
+
return function () {
|
|
152
|
+
return clearTimeout(timerId);
|
|
153
|
+
};
|
|
151
154
|
}
|
|
152
155
|
}, [calculationDelayMs]);
|
|
153
156
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.EuiTourFooter = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _services = require("../../services");
|
|
10
|
+
var _i18n = require("../i18n");
|
|
11
|
+
var _popover = require("../popover");
|
|
12
|
+
var _button = require("../button");
|
|
13
|
+
var _flex = require("../flex");
|
|
14
|
+
var _tour_step_indicator = require("./tour_step_indicator");
|
|
15
|
+
var _tour_footer = require("./_tour_footer.styles");
|
|
16
|
+
var _react2 = require("@emotion/react");
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
22
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
24
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
26
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
27
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /*
|
|
29
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
30
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
31
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
32
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
33
|
+
* Side Public License, v 1.
|
|
34
|
+
*/
|
|
35
|
+
var EuiTourFooter = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
36
|
+
var footerAction = _ref.footerAction,
|
|
37
|
+
step = _ref.step,
|
|
38
|
+
stepsTotal = _ref.stepsTotal,
|
|
39
|
+
onFinish = _ref.onFinish;
|
|
40
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
41
|
+
var footerStyles = (0, _tour_footer.euiTourFooterStyles)(euiTheme);
|
|
42
|
+
var customFooterAction = (0, _react.useMemo)(function () {
|
|
43
|
+
if (!footerAction) return null;
|
|
44
|
+
return Array.isArray(footerAction) ? (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
45
|
+
gutterSize: "s",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
justifyContent: "flexEnd",
|
|
48
|
+
responsive: false,
|
|
49
|
+
wrap: true
|
|
50
|
+
}, footerAction.map(function (action, index) {
|
|
51
|
+
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
52
|
+
key: index,
|
|
53
|
+
grow: false
|
|
54
|
+
}, action);
|
|
55
|
+
})) : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
56
|
+
grow: false
|
|
57
|
+
}, footerAction);
|
|
58
|
+
}, [footerAction]);
|
|
59
|
+
var indicators = (0, _react.useMemo)(function () {
|
|
60
|
+
if (stepsTotal <= 1) return null;
|
|
61
|
+
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
62
|
+
grow: false
|
|
63
|
+
}, (0, _react2.jsx)("ul", {
|
|
64
|
+
className: "euiTourFooter__stepList"
|
|
65
|
+
}, _toConsumableArray(Array(stepsTotal).keys()).map(function (_, i) {
|
|
66
|
+
var status = 'complete';
|
|
67
|
+
if (step === i + 1) {
|
|
68
|
+
status = 'active';
|
|
69
|
+
} else if (step <= i) {
|
|
70
|
+
status = 'incomplete';
|
|
71
|
+
}
|
|
72
|
+
return (0, _react2.jsx)(_tour_step_indicator.EuiTourStepIndicator, {
|
|
73
|
+
key: i,
|
|
74
|
+
number: i + 1,
|
|
75
|
+
status: status
|
|
76
|
+
});
|
|
77
|
+
})));
|
|
78
|
+
}, [step, stepsTotal]);
|
|
79
|
+
return (0, _react2.jsx)(_popover.EuiPopoverFooter, {
|
|
80
|
+
css: footerStyles.euiTourFooter,
|
|
81
|
+
className: "euiTourFooter"
|
|
82
|
+
}, (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
83
|
+
responsive: false,
|
|
84
|
+
justifyContent: stepsTotal > 1 ? 'spaceBetween' : 'flexEnd',
|
|
85
|
+
alignItems: "center"
|
|
86
|
+
}, indicators, footerAction ? customFooterAction : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
87
|
+
grow: false
|
|
88
|
+
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
89
|
+
tokens: ['euiTourFooter.endTour', 'euiTourFooter.skipTour', 'euiTourFooter.closeTour'],
|
|
90
|
+
defaults: ['End tour', 'Skip tour', 'Close tour']
|
|
91
|
+
}, function (_ref2) {
|
|
92
|
+
var _ref3 = _slicedToArray(_ref2, 3),
|
|
93
|
+
endTour = _ref3[0],
|
|
94
|
+
skipTour = _ref3[1],
|
|
95
|
+
closeTour = _ref3[2];
|
|
96
|
+
return (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
97
|
+
onClick: onFinish,
|
|
98
|
+
color: "text",
|
|
99
|
+
flush: "right",
|
|
100
|
+
size: "xs"
|
|
101
|
+
}, stepsTotal > 1 ? stepsTotal === step ? endTour : skipTour : closeTour);
|
|
102
|
+
}))));
|
|
103
|
+
});
|
|
104
|
+
exports.EuiTourFooter = EuiTourFooter;
|
|
105
|
+
EuiTourFooter.displayName = '_EuiTourFooter';
|