@elastic/eui 67.1.5 → 67.1.7
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 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/es/components/basic_table/in_memory_table.js +16 -2
- package/es/components/breadcrumbs/breadcrumb.js +9 -5
- package/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/es/components/button/button_display/_button_display.js +7 -6
- package/es/components/button/button_display/_button_display_content.js +6 -9
- package/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +11 -7
- package/es/components/modal/modal.js +17 -2
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/search_bar/query/ast.js +14 -3
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tour/tour.styles.js +4 -3
- package/es/components/tour/tour_step.js +13 -5
- package/eui.d.ts +44 -13
- package/lib/components/badge/beta_badge/beta_badge.js +4 -8
- package/lib/components/basic_table/in_memory_table.js +16 -2
- package/lib/components/breadcrumbs/breadcrumb.js +9 -5
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/lib/components/button/button_display/_button_display.js +7 -6
- package/lib/components/button/button_display/_button_display_content.js +6 -9
- package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/loading/loading_spinner.js +13 -2
- package/lib/components/loading/loading_spinner.styles.js +14 -6
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/search_bar/query/ast.js +14 -3
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tour/tour.styles.js +3 -2
- package/lib/components/tour/tour_step.js +7 -5
- package/optimize/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/optimize/es/components/basic_table/in_memory_table.js +1 -1
- package/optimize/es/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/es/components/button/button_display/_button_display.js +6 -5
- package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/loading/loading_spinner.js +13 -3
- package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/search_bar/query/ast.js +14 -3
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/tour/tour.styles.js +4 -3
- package/optimize/es/components/tour/tour_step.js +7 -5
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +4 -11
- package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/lib/components/button/button_display/_button_display.js +7 -6
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/loading/loading_spinner.js +14 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/search_bar/query/ast.js +14 -3
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/tour/tour.styles.js +3 -2
- package/optimize/lib/components/tour/tour_step.js +7 -5
- package/package.json +1 -1
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/test-env/components/badge/beta_badge/beta_badge.js +4 -11
- package/test-env/components/basic_table/in_memory_table.js +16 -2
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -5
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -4
- package/test-env/components/button/button_display/_button_display.js +7 -6
- package/test-env/components/button/button_display/_button_display_content.js +6 -9
- package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/loading/loading_spinner.js +14 -2
- package/test-env/components/loading/loading_spinner.styles.js +14 -6
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/search_bar/query/ast.js +14 -3
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/tour/tour.styles.js +3 -2
- package/test-env/components/tour/tour_step.js +7 -5
|
@@ -283,6 +283,10 @@ var arrayIncludesValue = function arrayIncludesValue(array, value) {
|
|
|
283
283
|
return valuesEqual(item, value);
|
|
284
284
|
});
|
|
285
285
|
};
|
|
286
|
+
|
|
287
|
+
var mustToMatch = function mustToMatch(must) {
|
|
288
|
+
return must === true ? Match.MUST : Match.MUST_NOT;
|
|
289
|
+
};
|
|
286
290
|
/**
|
|
287
291
|
* The AST structure is an array of clauses. There are 3 types of clauses that are supported:
|
|
288
292
|
*
|
|
@@ -407,9 +411,16 @@ export var _AST = /*#__PURE__*/function () {
|
|
|
407
411
|
}
|
|
408
412
|
}, {
|
|
409
413
|
key: "getOrFieldClause",
|
|
410
|
-
value: function getOrFieldClause(field, value) {
|
|
414
|
+
value: function getOrFieldClause(field, value, must, operator) {
|
|
411
415
|
return this.getFieldClause(field, function (clause) {
|
|
412
|
-
|
|
416
|
+
if (!isArray(clause.value)) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
var matchValue = isNil(value) || arrayIncludesValue(clause.value, value);
|
|
421
|
+
var matchMust = isNil(must) || mustToMatch(must) === clause.match;
|
|
422
|
+
var matchOperator = isNil(operator) || operator === clause.operator;
|
|
423
|
+
return matchValue && matchMust && matchOperator;
|
|
413
424
|
});
|
|
414
425
|
}
|
|
415
426
|
}, {
|
|
@@ -417,7 +428,7 @@ export var _AST = /*#__PURE__*/function () {
|
|
|
417
428
|
value: function addOrFieldValue(field, value) {
|
|
418
429
|
var must = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
419
430
|
var operator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Operator.EQ;
|
|
420
|
-
var existingClause = this.getOrFieldClause(field);
|
|
431
|
+
var existingClause = this.getOrFieldClause(field, undefined, must, operator);
|
|
421
432
|
|
|
422
433
|
if (!existingClause) {
|
|
423
434
|
var newClause = must ? Field.must[operator](field, [value]) : Field.mustNot[operator](field, [value]);
|
|
@@ -2,6 +2,10 @@ var _excluded = ["schema"];
|
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
4
4
|
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
5
9
|
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; }
|
|
6
10
|
|
|
7
11
|
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; }
|
|
@@ -40,6 +44,7 @@ import PropTypes from "prop-types";
|
|
|
40
44
|
* Side Public License, v 1.
|
|
41
45
|
*/
|
|
42
46
|
import React, { Component } from 'react';
|
|
47
|
+
import { htmlIdGenerator } from '../../services/accessibility';
|
|
43
48
|
import { isString } from '../../services/predicate';
|
|
44
49
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
45
50
|
import { EuiSearchBox } from './search_box';
|
|
@@ -80,6 +85,8 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
80
85
|
|
|
81
86
|
_this = _super.call(this, props);
|
|
82
87
|
|
|
88
|
+
_defineProperty(_assertThisInitialized(_this), "hintId", htmlIdGenerator('__hint')());
|
|
89
|
+
|
|
83
90
|
_defineProperty(_assertThisInitialized(_this), "onSearch", function (queryText) {
|
|
84
91
|
try {
|
|
85
92
|
var query = parseQuery(queryText, _this.props);
|
|
@@ -136,7 +143,8 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
136
143
|
_this.state = {
|
|
137
144
|
query: _query,
|
|
138
145
|
queryText: _query.text,
|
|
139
|
-
error: null
|
|
146
|
+
error: null,
|
|
147
|
+
isHintVisible: false
|
|
140
148
|
};
|
|
141
149
|
return _this;
|
|
142
150
|
}
|
|
@@ -198,10 +206,15 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
198
206
|
}, {
|
|
199
207
|
key: "render",
|
|
200
208
|
value: function render() {
|
|
209
|
+
var _hint$popoverProps$is,
|
|
210
|
+
_hint$popoverProps,
|
|
211
|
+
_this2 = this;
|
|
212
|
+
|
|
201
213
|
var _this$state = this.state,
|
|
202
214
|
query = _this$state.query,
|
|
203
215
|
queryText = _this$state.queryText,
|
|
204
|
-
error = _this$state.error
|
|
216
|
+
error = _this$state.error,
|
|
217
|
+
isHintVisibleState = _this$state.isHintVisible;
|
|
205
218
|
var _this$props = this.props,
|
|
206
219
|
_this$props$box = _this$props.box;
|
|
207
220
|
_this$props$box = _this$props$box === void 0 ? {
|
|
@@ -212,7 +225,8 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
212
225
|
box = _objectWithoutProperties(_this$props$box, _excluded),
|
|
213
226
|
filters = _this$props.filters,
|
|
214
227
|
toolsLeft = _this$props.toolsLeft,
|
|
215
|
-
toolsRight = _this$props.toolsRight
|
|
228
|
+
toolsRight = _this$props.toolsRight,
|
|
229
|
+
hint = _this$props.hint;
|
|
216
230
|
|
|
217
231
|
var toolsLeftEl = this.renderTools(toolsLeft);
|
|
218
232
|
var filtersBar = !filters ? undefined : ___EmotionJSX(EuiFlexItem, {
|
|
@@ -224,6 +238,7 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
224
238
|
onChange: this.onFiltersChange
|
|
225
239
|
}));
|
|
226
240
|
var toolsRightEl = this.renderTools(toolsRight);
|
|
241
|
+
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;
|
|
227
242
|
return ___EmotionJSX(EuiFlexGroup, {
|
|
228
243
|
gutterSize: "m",
|
|
229
244
|
alignItems: "center",
|
|
@@ -235,7 +250,17 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
235
250
|
query: queryText,
|
|
236
251
|
onSearch: this.onSearch,
|
|
237
252
|
isInvalid: error != null,
|
|
238
|
-
title: error ? error.message : undefined
|
|
253
|
+
title: error ? error.message : undefined,
|
|
254
|
+
"aria-describedby": isHintVisible ? "".concat(this.hintId) : undefined,
|
|
255
|
+
hint: hint ? _objectSpread({
|
|
256
|
+
isVisible: isHintVisible,
|
|
257
|
+
setIsVisible: function setIsVisible(isVisible) {
|
|
258
|
+
_this2.setState({
|
|
259
|
+
isHintVisible: isVisible
|
|
260
|
+
});
|
|
261
|
+
},
|
|
262
|
+
id: this.hintId
|
|
263
|
+
}, hint) : undefined
|
|
239
264
|
}))), filtersBar, toolsRightEl);
|
|
240
265
|
}
|
|
241
266
|
}], [{
|
|
@@ -246,7 +271,8 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
246
271
|
return {
|
|
247
272
|
query: query,
|
|
248
273
|
queryText: query.text,
|
|
249
|
-
error: null
|
|
274
|
+
error: null,
|
|
275
|
+
isHintVisible: prevState.isHintVisible
|
|
250
276
|
};
|
|
251
277
|
}
|
|
252
278
|
|
|
@@ -432,6 +458,14 @@ EuiSearchBar.propTypes = {
|
|
|
432
458
|
* Date formatter to use when parsing date values
|
|
433
459
|
*/
|
|
434
460
|
dateFormat: PropTypes.any,
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Hint to render below the search bar
|
|
464
|
+
*/
|
|
465
|
+
hint: PropTypes.shape({
|
|
466
|
+
content: PropTypes.node.isRequired,
|
|
467
|
+
popoverProps: PropTypes.any
|
|
468
|
+
}),
|
|
435
469
|
className: PropTypes.string,
|
|
436
470
|
"aria-label": PropTypes.string,
|
|
437
471
|
"data-test-subj": PropTypes.string,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
|
-
var _excluded = ["query", "incremental"];
|
|
3
|
+
var _excluded = ["query", "incremental", "hint"];
|
|
4
4
|
|
|
5
5
|
function _extends() { _extends = Object.assign || 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); }
|
|
6
6
|
|
|
@@ -40,6 +40,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
40
40
|
import React, { Component } from 'react';
|
|
41
41
|
import PropTypes from "prop-types";
|
|
42
42
|
import { EuiFieldSearch } from '../form';
|
|
43
|
+
import { EuiInputPopover } from '../popover';
|
|
43
44
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
44
45
|
export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
45
46
|
_inherits(EuiSearchBox, _Component);
|
|
@@ -78,6 +79,7 @@ export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
78
79
|
var _this$props = this.props,
|
|
79
80
|
query = _this$props.query,
|
|
80
81
|
incremental = _this$props.incremental,
|
|
82
|
+
hint = _this$props.hint,
|
|
81
83
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
82
84
|
|
|
83
85
|
var ariaLabel;
|
|
@@ -88,15 +90,39 @@ export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
88
90
|
ariaLabel = 'This is a search bar. After typing your query, hit enter to filter the results lower in the page.';
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
var search = ___EmotionJSX(EuiFieldSearch, _extends({
|
|
92
94
|
inputRef: function inputRef(input) {
|
|
93
95
|
return _this2.inputElement = input;
|
|
94
96
|
},
|
|
95
97
|
fullWidth: true,
|
|
96
98
|
defaultValue: query,
|
|
97
99
|
incremental: incremental,
|
|
98
|
-
"aria-label": ariaLabel
|
|
100
|
+
"aria-label": ariaLabel,
|
|
101
|
+
onFocus: function onFocus() {
|
|
102
|
+
hint === null || hint === void 0 ? void 0 : hint.setIsVisible(true);
|
|
103
|
+
}
|
|
99
104
|
}, rest));
|
|
105
|
+
|
|
106
|
+
if (hint) {
|
|
107
|
+
return ___EmotionJSX(EuiInputPopover, _extends({
|
|
108
|
+
disableFocusTrap: true,
|
|
109
|
+
input: search,
|
|
110
|
+
isOpen: hint.isVisible,
|
|
111
|
+
fullWidth: true,
|
|
112
|
+
closePopover: function closePopover() {
|
|
113
|
+
hint.setIsVisible(false);
|
|
114
|
+
},
|
|
115
|
+
panelProps: {
|
|
116
|
+
'aria-live': undefined,
|
|
117
|
+
'aria-modal': undefined,
|
|
118
|
+
role: undefined,
|
|
119
|
+
tabIndex: -1,
|
|
120
|
+
id: hint.id
|
|
121
|
+
}
|
|
122
|
+
}, hint.popoverProps), hint.content);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return search;
|
|
100
126
|
}
|
|
101
127
|
}]);
|
|
102
128
|
|
|
@@ -111,5 +137,12 @@ _defineProperty(EuiSearchBox, "defaultProps", {
|
|
|
111
137
|
EuiSearchBox.propTypes = {
|
|
112
138
|
query: PropTypes.string.isRequired,
|
|
113
139
|
// This is optional in EuiFieldSearchProps
|
|
114
|
-
onSearch: PropTypes.func.isRequired
|
|
140
|
+
onSearch: PropTypes.func.isRequired,
|
|
141
|
+
hint: PropTypes.shape({
|
|
142
|
+
id: PropTypes.string.isRequired,
|
|
143
|
+
isVisible: PropTypes.bool.isRequired,
|
|
144
|
+
setIsVisible: PropTypes.func.isRequired,
|
|
145
|
+
content: PropTypes.node.isRequired,
|
|
146
|
+
popoverProps: PropTypes.any
|
|
147
|
+
})
|
|
115
148
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
9
|
import { shade, tint, COLOR_MODES_STANDARD } from '../../services';
|
|
10
|
-
import { logicalCSS, mathWithUnits } from '../../global_styling';
|
|
10
|
+
import { logicalCSS, mathWithUnits, euiCanAnimate } from '../../global_styling';
|
|
11
11
|
import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles';
|
|
12
12
|
import { popoverArrowSize } from '../popover/popover_arrow/_popover_arrow.styles';
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ export var euiTourStyles = function euiTourStyles(_ref) {
|
|
|
20
20
|
colorMode = _ref.colorMode;
|
|
21
21
|
return {
|
|
22
22
|
// Targets EuiPopoverPanel
|
|
23
|
-
euiTour: /*#__PURE__*/css("
|
|
23
|
+
euiTour: /*#__PURE__*/css("[data-popover-arrow='top']::before{", logicalCSS('border-top-color', backgroundColor(euiTheme.colors.lightestShade, colorMode)), ";};label:euiTour;")
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
@@ -34,7 +34,8 @@ export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
36
|
// Base
|
|
37
|
-
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], "
|
|
37
|
+
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;", euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
38
|
+
isOpen: /*#__PURE__*/css(euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
38
39
|
// Positions
|
|
39
40
|
right: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowOffset), ";;label:right;"),
|
|
40
41
|
left: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowSize), ";;label:left;"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
1
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
2
2
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
@@ -58,6 +58,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
58
58
|
anchor = _ref.anchor,
|
|
59
59
|
children = _ref.children,
|
|
60
60
|
className = _ref.className,
|
|
61
|
+
css = _ref.css,
|
|
61
62
|
_ref$closePopover = _ref.closePopover,
|
|
62
63
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
63
64
|
content = _ref.content,
|
|
@@ -77,6 +78,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
77
78
|
_ref$decoration = _ref.decoration,
|
|
78
79
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
79
80
|
footerAction = _ref.footerAction,
|
|
81
|
+
panelProps = _ref.panelProps,
|
|
80
82
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
81
83
|
|
|
82
84
|
var titleId = useGeneratedHtmlId();
|
|
@@ -120,7 +122,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
120
122
|
var headerStyles = euiTourHeaderStyles(euiTheme);
|
|
121
123
|
var footerStyles = euiTourFooterStyles(euiTheme);
|
|
122
124
|
var beaconStyles = euiTourBeaconStyles(euiTheme);
|
|
123
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
125
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
124
126
|
var finishButtonProps = {
|
|
125
127
|
color: 'text',
|
|
126
128
|
flush: 'right',
|
|
@@ -181,9 +183,9 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
181
183
|
ownFocus: false,
|
|
182
184
|
panelClassName: classes,
|
|
183
185
|
panelStyle: style,
|
|
184
|
-
panelProps: {
|
|
185
|
-
css: tourStyles.euiTour
|
|
186
|
-
},
|
|
186
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
187
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
188
|
+
}),
|
|
187
189
|
offset: hasBeacon ? 10 : 0,
|
|
188
190
|
'aria-labelledby': titleId,
|
|
189
191
|
arrowChildren: hasBeacon && ___EmotionJSX(EuiBeacon, {
|
|
@@ -339,6 +341,12 @@ EuiTourStep.propTypes = {
|
|
|
339
341
|
*/
|
|
340
342
|
repositionOnScroll: PropTypes.bool,
|
|
341
343
|
|
|
344
|
+
/**
|
|
345
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
346
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
347
|
+
*/
|
|
348
|
+
hasDragDrop: PropTypes.bool,
|
|
349
|
+
|
|
342
350
|
/**
|
|
343
351
|
* By default, popover content inherits the z-index of the anchor
|
|
344
352
|
* component; pass `zIndex` to override
|
package/eui.d.ts
CHANGED
|
@@ -1701,8 +1701,9 @@ declare module '@elastic/eui/src/components/loading/loading_content' {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
declare module '@elastic/eui/src/components/loading/loading_spinner.styles' {
|
|
1703
1703
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1704
|
-
import {
|
|
1705
|
-
export const
|
|
1704
|
+
import { EuiLoadingSpinnerColor } from '@elastic/eui/src/components/loading/loading_spinner';
|
|
1705
|
+
export const euiSpinnerBorderColorsCSS: ({ euiTheme }: UseEuiTheme, colors?: EuiLoadingSpinnerColor) => string;
|
|
1706
|
+
export const euiLoadingSpinnerStyles: (euiThemeContext: UseEuiTheme) => {
|
|
1706
1707
|
euiLoadingSpinner: import("@emotion/utils").SerializedStyles;
|
|
1707
1708
|
s: import("@emotion/utils").SerializedStyles;
|
|
1708
1709
|
m: import("@emotion/utils").SerializedStyles;
|
|
@@ -1900,12 +1901,6 @@ declare module '@elastic/eui/src/components/button/button_display/_button_displa
|
|
|
1900
1901
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
1901
1902
|
export const euiButtonDisplayContentStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
1902
1903
|
euiButtonDisplayContent: import("@emotion/utils").SerializedStyles;
|
|
1903
|
-
left: import("@emotion/utils").SerializedStyles;
|
|
1904
|
-
right: import("@emotion/utils").SerializedStyles;
|
|
1905
|
-
euiButtonDisplayContent__spinner: import("@emotion/utils").SerializedStyles;
|
|
1906
|
-
euiButtonDisplayContent__icon: import("@emotion/utils").SerializedStyles;
|
|
1907
|
-
s: import("@emotion/utils").SerializedStyles;
|
|
1908
|
-
m: import("@emotion/utils").SerializedStyles;
|
|
1909
1904
|
};
|
|
1910
1905
|
|
|
1911
1906
|
}
|
|
@@ -4368,6 +4363,13 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4368
4363
|
left: import("@emotion/utils").SerializedStyles;
|
|
4369
4364
|
right: import("@emotion/utils").SerializedStyles;
|
|
4370
4365
|
};
|
|
4366
|
+
hasDragDrop: {
|
|
4367
|
+
hasDragDrop: import("@emotion/utils").SerializedStyles;
|
|
4368
|
+
top: import("@emotion/utils").SerializedStyles;
|
|
4369
|
+
bottom: import("@emotion/utils").SerializedStyles;
|
|
4370
|
+
left: import("@emotion/utils").SerializedStyles;
|
|
4371
|
+
right: import("@emotion/utils").SerializedStyles;
|
|
4372
|
+
};
|
|
4371
4373
|
};
|
|
4372
4374
|
|
|
4373
4375
|
}
|
|
@@ -4384,6 +4386,7 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4384
4386
|
isOpen?: boolean;
|
|
4385
4387
|
isAttached?: boolean;
|
|
4386
4388
|
position?: EuiPopoverArrowPositions | null;
|
|
4389
|
+
hasDragDrop?: boolean;
|
|
4387
4390
|
};
|
|
4388
4391
|
/**
|
|
4389
4392
|
* *INTERNAL ONLY*
|
|
@@ -4504,6 +4507,11 @@ declare module '@elastic/eui/src/components/popover/popover' {
|
|
|
4504
4507
|
* an `EuiPopover` in a scrollable container, `repositionOnScroll` should be `true`
|
|
4505
4508
|
*/
|
|
4506
4509
|
repositionOnScroll?: boolean;
|
|
4510
|
+
/**
|
|
4511
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
4512
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
4513
|
+
*/
|
|
4514
|
+
hasDragDrop?: boolean;
|
|
4507
4515
|
/**
|
|
4508
4516
|
* By default, popover content inherits the z-index of the anchor
|
|
4509
4517
|
* component; pass `zIndex` to override
|
|
@@ -8166,6 +8174,7 @@ declare module '@elastic/eui/src/components/breadcrumbs/breadcrumb' {
|
|
|
8166
8174
|
isLastBreadcrumb?: boolean;
|
|
8167
8175
|
isOnlyBreadcrumb?: boolean;
|
|
8168
8176
|
highlightLastBreadcrumb?: boolean;
|
|
8177
|
+
truncateLastBreadcrumb?: boolean;
|
|
8169
8178
|
} & Pick<EuiBreadcrumbProps, 'truncate'>;
|
|
8170
8179
|
export const EuiBreadcrumb: FunctionComponent<HTMLAttributes<HTMLLIElement> & _EuiBreadcrumbProps>;
|
|
8171
8180
|
export const EuiBreadcrumbContent: FunctionComponent<EuiBreadcrumbProps & _EuiBreadcrumbProps>;
|
|
@@ -16154,6 +16163,7 @@ declare module '@elastic/eui/src/components/tree_view' {
|
|
|
16154
16163
|
declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
16155
16164
|
import { Component } from 'react';
|
|
16156
16165
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form';
|
|
16166
|
+
import { EuiSearchBarProps } from '@elastic/eui/src/components/search_bar/search_bar';
|
|
16157
16167
|
export interface SchemaType {
|
|
16158
16168
|
strict?: boolean;
|
|
16159
16169
|
fields?: any;
|
|
@@ -16162,6 +16172,11 @@ declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
|
16162
16172
|
export interface EuiSearchBoxProps extends EuiFieldSearchProps {
|
|
16163
16173
|
query: string;
|
|
16164
16174
|
onSearch: (queryText: string) => void;
|
|
16175
|
+
hint?: {
|
|
16176
|
+
id: string;
|
|
16177
|
+
isVisible: boolean;
|
|
16178
|
+
setIsVisible: (isVisible: boolean) => void;
|
|
16179
|
+
} & EuiSearchBarProps['hint'];
|
|
16165
16180
|
} type DefaultProps = Pick<EuiSearchBoxProps, 'placeholder' | 'incremental'>;
|
|
16166
16181
|
export class EuiSearchBox extends Component<EuiSearchBoxProps> {
|
|
16167
16182
|
static defaultProps: DefaultProps;
|
|
@@ -16308,7 +16323,7 @@ declare module '@elastic/eui/src/components/search_bar/query/ast' {
|
|
|
16308
16323
|
getFieldClauses(field?: string): FieldClause[];
|
|
16309
16324
|
getFieldClause(field: string, predicate: (c: FieldClause) => boolean): FieldClause | undefined;
|
|
16310
16325
|
hasOrFieldClause(field: string, value?: Value): boolean;
|
|
16311
|
-
getOrFieldClause(field: string, value?: Value): FieldClause | undefined;
|
|
16326
|
+
getOrFieldClause(field: string, value?: Value, must?: boolean, operator?: OperatorType): FieldClause | undefined;
|
|
16312
16327
|
addOrFieldValue(field: string, value: Value, must?: boolean, operator?: OperatorType): _AST;
|
|
16313
16328
|
removeOrFieldValue(field: string, value: Value): _AST;
|
|
16314
16329
|
removeOrFieldClauses(field: string): _AST;
|
|
@@ -17488,12 +17503,13 @@ declare module '@elastic/eui/src/components/search_bar/search_filters' {
|
|
|
17488
17503
|
|
|
17489
17504
|
}
|
|
17490
17505
|
declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
17491
|
-
import { Component, ReactElement } from 'react';
|
|
17506
|
+
import React, { Component, ReactElement } from 'react';
|
|
17492
17507
|
import { SchemaType } from '@elastic/eui/src/components/search_bar/search_box';
|
|
17493
17508
|
import { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/search_filters';
|
|
17494
17509
|
import { Query } from '@elastic/eui/src/components/search_bar/query';
|
|
17495
17510
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
17496
17511
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form/field_search';
|
|
17512
|
+
import { EuiInputPopoverProps } from '@elastic/eui/src/components/popover';
|
|
17497
17513
|
export { Query, AST as Ast } from '@elastic/eui/src/components/search_bar/query';
|
|
17498
17514
|
export type QueryType = Query | string; type Tools = ReactElement | ReactElement[];
|
|
17499
17515
|
interface ArgsWithQuery {
|
|
@@ -17506,7 +17522,7 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
17506
17522
|
queryText: string;
|
|
17507
17523
|
error: Error;
|
|
17508
17524
|
}
|
|
17509
|
-
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError;
|
|
17525
|
+
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError; type HintPopOverProps = Partial<Pick<EuiInputPopoverProps, 'isOpen' | 'closePopover' | 'fullWidth' | 'disableFocusTrap' | 'panelClassName' | 'panelPaddingSize' | 'panelStyle' | 'panelProps' | 'popoverScreenReaderText' | 'repositionOnScroll' | 'zIndex' | 'data-test-subj'>>;
|
|
17510
17526
|
export interface EuiSearchBarProps extends CommonProps {
|
|
17511
17527
|
onChange?: (args: EuiSearchBarOnChangeArgs) => void | boolean;
|
|
17512
17528
|
/**
|
|
@@ -17539,19 +17555,28 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
17539
17555
|
* Date formatter to use when parsing date values
|
|
17540
17556
|
*/
|
|
17541
17557
|
dateFormat?: object;
|
|
17558
|
+
/**
|
|
17559
|
+
* Hint to render below the search bar
|
|
17560
|
+
*/
|
|
17561
|
+
hint?: {
|
|
17562
|
+
content: React.ReactNode;
|
|
17563
|
+
popoverProps?: HintPopOverProps;
|
|
17564
|
+
};
|
|
17542
17565
|
}
|
|
17543
17566
|
interface State {
|
|
17544
17567
|
query: Query;
|
|
17545
17568
|
queryText: string;
|
|
17546
17569
|
error: null | Error;
|
|
17547
|
-
|
|
17570
|
+
isHintVisible: boolean;
|
|
17571
|
+
} type NotifyControllingParent = Pick<State, 'queryText' | 'error'> & {
|
|
17548
17572
|
query: Query | null;
|
|
17549
17573
|
};
|
|
17550
17574
|
export class EuiSearchBar extends Component<EuiSearchBarProps, State> {
|
|
17551
17575
|
static Query: typeof Query;
|
|
17576
|
+
hintId: string;
|
|
17552
17577
|
constructor(props: EuiSearchBarProps);
|
|
17553
17578
|
static getDerivedStateFromProps(nextProps: EuiSearchBarProps, prevState: State): State | null;
|
|
17554
|
-
notifyControllingParent(newState:
|
|
17579
|
+
notifyControllingParent(newState: NotifyControllingParent): void;
|
|
17555
17580
|
onSearch: (queryText: string) => void;
|
|
17556
17581
|
onFiltersChange: (query: Query) => void;
|
|
17557
17582
|
renderTools(tools?: Tools): JSX.Element | JSX.Element[] | undefined;
|
|
@@ -18450,6 +18475,7 @@ declare module '@elastic/eui/src/components/tour/tour.styles' {
|
|
|
18450
18475
|
};
|
|
18451
18476
|
export const euiTourBeaconStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
18452
18477
|
euiTourBeacon: import("@emotion/utils").SerializedStyles;
|
|
18478
|
+
isOpen: import("@emotion/utils").SerializedStyles;
|
|
18453
18479
|
right: import("@emotion/utils").SerializedStyles;
|
|
18454
18480
|
left: import("@emotion/utils").SerializedStyles;
|
|
18455
18481
|
top: import("@emotion/utils").SerializedStyles;
|
|
@@ -19188,6 +19214,11 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
|
|
|
19188
19214
|
defaultFields?: string[];
|
|
19189
19215
|
isClauseMatcher?: (...args: any) => boolean;
|
|
19190
19216
|
explain?: boolean;
|
|
19217
|
+
/**
|
|
19218
|
+
* When the search bar Query is controlled and passed to the `search` prop it is by default executed against the items passed to the table to filter them out.
|
|
19219
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
19220
|
+
*/
|
|
19221
|
+
enabled?: boolean;
|
|
19191
19222
|
};
|
|
19192
19223
|
/**
|
|
19193
19224
|
* Insert content between the search bar and table components.
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.sizeToClassMap = exports.SIZES = exports.EuiBetaBadge = exports.COLORS = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,10 +25,6 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
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
|
-
|
|
32
28
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
33
29
|
|
|
34
30
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -130,7 +126,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
130
126
|
anchorProps: anchorProps
|
|
131
127
|
}, content);
|
|
132
128
|
} else {
|
|
133
|
-
return (0, _react2.jsx)(
|
|
129
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
134
130
|
}
|
|
135
131
|
} else {
|
|
136
132
|
if (tooltipContent) {
|
|
@@ -151,10 +147,10 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
151
147
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
152
148
|
}
|
|
153
149
|
|
|
154
|
-
return (0, _react2.jsx)("span", _extends({
|
|
150
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", _extends({
|
|
155
151
|
className: classes,
|
|
156
152
|
title: spanTitle
|
|
157
|
-
}, rest), icon || label);
|
|
153
|
+
}, rest), icon || label));
|
|
158
154
|
}
|
|
159
155
|
}
|
|
160
156
|
};
|
|
@@ -414,7 +414,7 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
414
414
|
sortName = _this$state2.sortName,
|
|
415
415
|
pageIndex = _this$state2.pageIndex,
|
|
416
416
|
pageSize = _this$state2.pageSize;
|
|
417
|
-
var matchingItems = query ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
417
|
+
var matchingItems = query !== null && (executeQueryOptions === null || executeQueryOptions === void 0 ? void 0 : executeQueryOptions.enabled) !== false ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
418
418
|
var sortedItems = sortName ? matchingItems.slice(0) // avoid mutating the source array
|
|
419
419
|
.sort(this.getItemSorter()) // sort, causes mutation
|
|
420
420
|
: matchingItems;
|
|
@@ -1149,6 +1149,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1149
1149
|
* Date formatter to use when parsing date values
|
|
1150
1150
|
*/
|
|
1151
1151
|
dateFormat: _propTypes.default.any,
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* Hint to render below the search bar
|
|
1155
|
+
*/
|
|
1156
|
+
hint: _propTypes.default.shape({
|
|
1157
|
+
content: _propTypes.default.node.isRequired,
|
|
1158
|
+
popoverProps: _propTypes.default.any
|
|
1159
|
+
}),
|
|
1152
1160
|
className: _propTypes.default.string,
|
|
1153
1161
|
"aria-label": _propTypes.default.string,
|
|
1154
1162
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -1213,7 +1221,13 @@ EuiInMemoryTable.propTypes = {
|
|
|
1213
1221
|
executeQueryOptions: _propTypes.default.shape({
|
|
1214
1222
|
defaultFields: _propTypes.default.arrayOf(_propTypes.default.string.isRequired),
|
|
1215
1223
|
isClauseMatcher: _propTypes.default.func,
|
|
1216
|
-
explain: _propTypes.default.bool
|
|
1224
|
+
explain: _propTypes.default.bool,
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* When the search bar Query is controlled and passed to the `search` prop it is by default executed against the items passed to the table to filter them out.
|
|
1228
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
1229
|
+
*/
|
|
1230
|
+
enabled: _propTypes.default.bool
|
|
1217
1231
|
}),
|
|
1218
1232
|
|
|
1219
1233
|
/**
|
|
@@ -32,7 +32,7 @@ var _breadcrumb = require("./breadcrumb.styles");
|
|
|
32
32
|
var _react2 = require("@emotion/react");
|
|
33
33
|
|
|
34
34
|
var _excluded = ["children", "className", "type", "truncate"],
|
|
35
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb"];
|
|
35
|
+
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
36
36
|
|
|
37
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
38
|
|
|
@@ -81,7 +81,8 @@ EuiBreadcrumb.propTypes = {
|
|
|
81
81
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
82
82
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
83
83
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
84
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
84
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
85
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
@@ -97,12 +98,13 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
97
98
|
isLastBreadcrumb = _ref2.isLastBreadcrumb,
|
|
98
99
|
isOnlyBreadcrumb = _ref2.isOnlyBreadcrumb,
|
|
99
100
|
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
101
|
+
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
100
102
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
101
103
|
|
|
102
104
|
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
103
105
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
104
106
|
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
105
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate &&
|
|
107
|
+
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
106
108
|
|
|
107
109
|
if (type === 'application') {
|
|
108
110
|
if (isOnlyBreadcrumb) {
|
|
@@ -173,7 +175,8 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
173
175
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
174
176
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
175
177
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
176
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
178
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
179
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
177
180
|
};
|
|
178
181
|
|
|
179
182
|
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
@@ -222,5 +225,6 @@ EuiBreadcrumbCollapsed.propTypes = {
|
|
|
222
225
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
223
226
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
224
227
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
225
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
228
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
229
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
226
230
|
};
|
|
@@ -69,12 +69,14 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
69
69
|
}, [breadcrumbs, responsiveMax]);
|
|
70
70
|
var breadcrumbChildren = (0, _react.useMemo)(function () {
|
|
71
71
|
return visibleBreadcrumbs.map(function (breadcrumb, index) {
|
|
72
|
+
var _breadcrumb$truncate;
|
|
73
|
+
|
|
72
74
|
var isFirstBreadcrumb = index === 0;
|
|
73
75
|
var isLastBreadcrumb = index === visibleBreadcrumbs.length - 1;
|
|
74
76
|
var isOnlyBreadcrumb = visibleBreadcrumbs.length === 1;
|
|
75
77
|
var sharedProps = {
|
|
76
78
|
type: type,
|
|
77
|
-
truncate: truncate
|
|
79
|
+
truncate: (_breadcrumb$truncate = breadcrumb.truncate) !== null && _breadcrumb$truncate !== void 0 ? _breadcrumb$truncate : truncate
|
|
78
80
|
};
|
|
79
81
|
return breadcrumb.isCollapsedButton ? (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbCollapsed, _extends({
|
|
80
82
|
key: "collapsed"
|
|
@@ -88,12 +90,13 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
88
90
|
max: 0
|
|
89
91
|
})) : (0, _react2.jsx)(_breadcrumb.EuiBreadcrumb, _extends({
|
|
90
92
|
key: index
|
|
91
|
-
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, _extends({
|
|
93
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, _extends({}, breadcrumb, sharedProps, {
|
|
92
94
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
93
95
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
94
96
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
95
|
-
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage
|
|
96
|
-
|
|
97
|
+
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage,
|
|
98
|
+
truncateLastBreadcrumb: isLastBreadcrumb && truncate && breadcrumb.truncate == null
|
|
99
|
+
})));
|
|
97
100
|
});
|
|
98
101
|
}, [visibleBreadcrumbs, truncate, type, lastBreadcrumbIsCurrentPage]);
|
|
99
102
|
return (0, _react2.jsx)("nav", _extends({
|