@elastic/eui 88.3.0 → 88.4.1
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 +7 -142
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +7 -142
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/in_memory_table.js +85 -34
- package/es/components/card/card.js +3 -3
- package/es/components/combo_box/combo_box.js +16 -4
- package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +62 -13
- package/es/components/datagrid/controls/column_selector.js +5 -3
- package/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/es/components/description_list/description_list_title.js +0 -1
- package/es/components/description_list/description_list_title.styles.js +1 -1
- package/es/components/drag_and_drop/draggable.js +18 -23
- package/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/es/components/drag_and_drop/droppable.js +24 -21
- package/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/es/components/search_bar/search_box.js +54 -88
- package/es/components/table/table_pagination/table_pagination.js +1 -0
- package/es/components/text_truncate/text_truncate.js +12 -6
- package/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/es/test/rtl/custom_render.js +1 -1
- package/eui.d.ts +480 -420
- package/i18ntokens.json +142 -88
- package/lib/components/basic_table/in_memory_table.js +85 -34
- package/lib/components/card/card.js +3 -3
- package/lib/components/combo_box/combo_box.js +16 -4
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +62 -13
- package/lib/components/datagrid/controls/column_selector.js +4 -2
- package/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/lib/components/description_list/description_list_title.js +0 -1
- package/lib/components/description_list/description_list_title.styles.js +1 -1
- package/lib/components/drag_and_drop/draggable.js +17 -22
- package/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/lib/components/drag_and_drop/droppable.js +26 -22
- package/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/lib/components/search_bar/search_box.js +61 -93
- package/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/lib/components/text_truncate/text_truncate.js +10 -4
- package/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/lib/test/rtl/custom_render.js +2 -2
- package/optimize/es/components/basic_table/in_memory_table.js +62 -34
- package/optimize/es/components/card/card.js +3 -3
- package/optimize/es/components/combo_box/combo_box.js +6 -4
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +52 -10
- package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/es/components/description_list/description_list_title.js +0 -1
- package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +17 -22
- package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/optimize/es/components/drag_and_drop/droppable.js +23 -20
- package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/optimize/es/components/search_bar/search_box.js +50 -83
- package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/es/components/text_truncate/text_truncate.js +12 -6
- package/optimize/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/es/test/rtl/custom_render.js +1 -1
- package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
- package/optimize/lib/components/card/card.js +3 -3
- package/optimize/lib/components/combo_box/combo_box.js +6 -4
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +52 -10
- package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/lib/components/description_list/description_list_title.js +0 -1
- package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
- package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/optimize/lib/components/search_bar/search_box.js +57 -89
- package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/lib/components/text_truncate/text_truncate.js +10 -4
- package/optimize/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/lib/test/rtl/custom_render.js +2 -2
- package/package.json +4 -4
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
- package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +8 -0
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/basic_table/in_memory_table.js +85 -34
- package/test-env/components/card/card.js +3 -3
- package/test-env/components/combo_box/combo_box.js +16 -4
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +61 -12
- package/test-env/components/datagrid/controls/column_selector.js +4 -2
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/test-env/components/description_list/description_list_title.js +0 -1
- package/test-env/components/description_list/description_list_title.styles.js +1 -1
- package/test-env/components/drag_and_drop/draggable.js +17 -22
- package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
- package/test-env/components/drag_and_drop/droppable.js +26 -22
- package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
- package/test-env/components/search_bar/search_box.js +60 -88
- package/test-env/components/table/table_pagination/table_pagination.js +1 -0
- package/test-env/components/text_truncate/text_truncate.js +10 -4
- package/test-env/components/text_truncate/text_truncate.styles.js +10 -10
- package/test-env/test/rtl/custom_render.js +2 -2
- package/src/components/drag_and_drop/_draggable.scss +0 -41
- package/src/components/drag_and_drop/_droppable.scss +0 -40
- package/src/components/drag_and_drop/_index.scss +0 -3
- package/src/components/drag_and_drop/_variables.scss +0 -5
- package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
|
@@ -9,7 +9,7 @@ exports.within = exports.screen = exports.render = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = require("@testing-library/react");
|
|
12
|
-
var
|
|
12
|
+
var _provider = require("../../components/provider");
|
|
13
13
|
var dataTestSubjQueries = _interopRequireWildcard(require("./data_test_subj_queries"));
|
|
14
14
|
var _excluded = ["queries"];
|
|
15
15
|
/*
|
|
@@ -36,7 +36,7 @@ var customRender = function customRender(ui) {
|
|
|
36
36
|
options = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
37
|
return (0, _react.render)(ui, _objectSpread({
|
|
38
38
|
queries: _objectSpread(_objectSpread(_objectSpread({}, _react.queries), dataTestSubjQueries), renderQueries || {}),
|
|
39
|
-
wrapper:
|
|
39
|
+
wrapper: _provider.EuiProvider
|
|
40
40
|
}, options));
|
|
41
41
|
};
|
|
42
42
|
exports.render = customRender;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "88.
|
|
4
|
+
"version": "88.4.1",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"**/@types/react": "^18",
|
|
61
61
|
"react-focus-lock": "^2.9.5"
|
|
62
62
|
},
|
|
63
|
-
"pre-
|
|
63
|
+
"pre-push": [
|
|
64
64
|
"test-staged"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"@emotion/eslint-plugin": "^11.11.0",
|
|
128
128
|
"@emotion/jest": "^11.11.0",
|
|
129
129
|
"@emotion/react": "^11.11.0",
|
|
130
|
-
"@faker-js/faker": "^
|
|
130
|
+
"@faker-js/faker": "^8.0.2",
|
|
131
131
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
132
132
|
"@storybook/addon-essentials": "^7.3.1",
|
|
133
133
|
"@storybook/addon-interactions": "^7.3.1",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"postcss-inline-svg": "^4.1.0",
|
|
221
221
|
"postcss-loader": "^7.0.1",
|
|
222
222
|
"postcss-styled-syntax": "^0.4.0",
|
|
223
|
-
"pre-
|
|
223
|
+
"pre-push": "^0.1.4",
|
|
224
224
|
"prettier": "^2.8.8",
|
|
225
225
|
"process": "^0.11.10",
|
|
226
226
|
"prop-types": "^15.6.0",
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
.euiFilterSelectItem__content {
|
|
11
11
|
margin-block: 0 !important; // stylelint-disable-line declaration-no-important
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/* Kibana FTR affordance - without this, Selenium complains about the overlaid
|
|
15
|
+
text intercepting the button click. Since `title` is always present, and
|
|
16
|
+
users can't highlight or copy combobox options anyway, we might as well
|
|
17
|
+
disable clicks on text */
|
|
18
|
+
.euiTextTruncate {
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
.euiComboBoxOptionsList__empty {
|
|
@@ -20,13 +20,15 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
20
20
|
var _basic_table = require("./basic_table");
|
|
21
21
|
var _predicate = require("../../services/predicate");
|
|
22
22
|
var _sort2 = require("../../services/sort");
|
|
23
|
-
var _search_bar = require("../search_bar");
|
|
23
|
+
var _search_bar = require("../search_bar/search_bar");
|
|
24
|
+
var _search_box = require("../search_bar/search_box");
|
|
24
25
|
var _spacer = require("../spacer");
|
|
25
26
|
var _table_pagination = require("../table/table_pagination");
|
|
26
27
|
var _component_defaults = require("../provider/component_defaults");
|
|
27
28
|
var _react2 = require("@emotion/react");
|
|
28
|
-
var _excluded = ["
|
|
29
|
-
_excluded2 = ["
|
|
29
|
+
var _excluded = ["schema"],
|
|
30
|
+
_excluded2 = ["onChange"],
|
|
31
|
+
_excluded3 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
30
32
|
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
33
|
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
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -219,6 +221,15 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
219
221
|
};
|
|
220
222
|
});
|
|
221
223
|
});
|
|
224
|
+
// Alternative to onQueryChange - allows consumers to specify they want the
|
|
225
|
+
// search bar to ignore EQL syntax and only use the searchbar for plain text
|
|
226
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onPlainTextSearch", function (searchValue) {
|
|
227
|
+
var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
|
|
228
|
+
var finalQuery = "\"".concat(escapedQueryText, "\"");
|
|
229
|
+
_this.setState({
|
|
230
|
+
query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
|
|
231
|
+
});
|
|
232
|
+
});
|
|
222
233
|
var columns = props.columns,
|
|
223
234
|
_search = props.search,
|
|
224
235
|
_pagination = props.pagination,
|
|
@@ -262,12 +273,26 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
262
273
|
}, {
|
|
263
274
|
key: "renderSearchBar",
|
|
264
275
|
value: function renderSearchBar() {
|
|
265
|
-
var
|
|
266
|
-
|
|
276
|
+
var _this$props = this.props,
|
|
277
|
+
search = _this$props.search,
|
|
278
|
+
searchFormat = _this$props.searchFormat;
|
|
279
|
+
if (!search) return;
|
|
280
|
+
var searchBar;
|
|
281
|
+
if (searchFormat === 'text') {
|
|
282
|
+
var _searchBoxProps = (search === null || search === void 0 ? void 0 : search.box) || {}; // Work around | boolean type
|
|
283
|
+
var schema = _searchBoxProps.schema,
|
|
284
|
+
searchBoxProps = (0, _objectWithoutProperties2.default)(_searchBoxProps, _excluded); // Destructure `schema` so it doesn't get rendered to DOM
|
|
285
|
+
|
|
286
|
+
searchBar = (0, _react2.jsx)(_search_box.EuiSearchBox, (0, _extends2.default)({
|
|
287
|
+
query: "" // Unused, passed to satisfy Typescript
|
|
288
|
+
}, searchBoxProps, {
|
|
289
|
+
onSearch: this.onPlainTextSearch
|
|
290
|
+
}));
|
|
291
|
+
} else {
|
|
267
292
|
var searchBarProps = {};
|
|
268
293
|
if (isEuiSearchBarProps(search)) {
|
|
269
294
|
var onChange = search.onChange,
|
|
270
|
-
_searchBarProps = (0, _objectWithoutProperties2.default)(search,
|
|
295
|
+
_searchBarProps = (0, _objectWithoutProperties2.default)(search, _excluded2);
|
|
271
296
|
searchBarProps = _searchBarProps;
|
|
272
297
|
if (searchBarProps.box && searchBarProps.box.schema === true) {
|
|
273
298
|
searchBarProps.box = _objectSpread(_objectSpread({}, searchBarProps.box), {}, {
|
|
@@ -275,12 +300,13 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
275
300
|
});
|
|
276
301
|
}
|
|
277
302
|
}
|
|
278
|
-
|
|
303
|
+
searchBar = (0, _react2.jsx)(_search_bar.EuiSearchBar, (0, _extends2.default)({
|
|
279
304
|
onChange: this.onQueryChange
|
|
280
|
-
}, searchBarProps))
|
|
281
|
-
size: "l"
|
|
282
|
-
}));
|
|
305
|
+
}, searchBarProps));
|
|
283
306
|
}
|
|
307
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, searchBar, (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
308
|
+
size: "l"
|
|
309
|
+
}));
|
|
284
310
|
}
|
|
285
311
|
}, {
|
|
286
312
|
key: "resolveSearchSchema",
|
|
@@ -357,29 +383,30 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
357
383
|
}, {
|
|
358
384
|
key: "render",
|
|
359
385
|
value: function render() {
|
|
360
|
-
var _this$
|
|
361
|
-
columns = _this$
|
|
362
|
-
loading = _this$
|
|
363
|
-
message = _this$
|
|
364
|
-
error = _this$
|
|
365
|
-
selection = _this$
|
|
366
|
-
isSelectable = _this$
|
|
367
|
-
hasActions = _this$
|
|
368
|
-
compressed = _this$
|
|
369
|
-
hasPagination = _this$
|
|
370
|
-
hasSorting = _this$
|
|
371
|
-
itemIdToExpandedRowMap = _this$
|
|
372
|
-
itemId = _this$
|
|
373
|
-
rowProps = _this$
|
|
374
|
-
cellProps = _this$
|
|
375
|
-
tableLayout = _this$
|
|
376
|
-
_unuseditems = _this$
|
|
377
|
-
search = _this$
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
386
|
+
var _this$props2 = this.props,
|
|
387
|
+
columns = _this$props2.columns,
|
|
388
|
+
loading = _this$props2.loading,
|
|
389
|
+
message = _this$props2.message,
|
|
390
|
+
error = _this$props2.error,
|
|
391
|
+
selection = _this$props2.selection,
|
|
392
|
+
isSelectable = _this$props2.isSelectable,
|
|
393
|
+
hasActions = _this$props2.hasActions,
|
|
394
|
+
compressed = _this$props2.compressed,
|
|
395
|
+
hasPagination = _this$props2.pagination,
|
|
396
|
+
hasSorting = _this$props2.sorting,
|
|
397
|
+
itemIdToExpandedRowMap = _this$props2.itemIdToExpandedRowMap,
|
|
398
|
+
itemId = _this$props2.itemId,
|
|
399
|
+
rowProps = _this$props2.rowProps,
|
|
400
|
+
cellProps = _this$props2.cellProps,
|
|
401
|
+
tableLayout = _this$props2.tableLayout,
|
|
402
|
+
_unuseditems = _this$props2.items,
|
|
403
|
+
search = _this$props2.search,
|
|
404
|
+
searchFormat = _this$props2.searchFormat,
|
|
405
|
+
onTableChange = _this$props2.onTableChange,
|
|
406
|
+
executeQueryOptions = _this$props2.executeQueryOptions,
|
|
407
|
+
allowNeutralSort = _this$props2.allowNeutralSort,
|
|
408
|
+
childrenBetween = _this$props2.childrenBetween,
|
|
409
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded3);
|
|
383
410
|
var _this$state3 = this.state,
|
|
384
411
|
pageIndex = _this$state3.pageIndex,
|
|
385
412
|
pageSize = _this$state3.pageSize,
|
|
@@ -503,7 +530,8 @@ exports.EuiInMemoryTable = EuiInMemoryTable;
|
|
|
503
530
|
(0, _defineProperty2.default)(EuiInMemoryTable, "contextType", _component_defaults.EuiComponentDefaultsContext);
|
|
504
531
|
(0, _defineProperty2.default)(EuiInMemoryTable, "defaultProps", {
|
|
505
532
|
responsive: true,
|
|
506
|
-
tableLayout: 'fixed'
|
|
533
|
+
tableLayout: 'fixed',
|
|
534
|
+
searchFormat: 'eql'
|
|
507
535
|
});
|
|
508
536
|
EuiInMemoryTable.propTypes = {
|
|
509
537
|
className: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]), _propTypes.default.string]),
|
|
@@ -992,6 +1020,29 @@ EuiInMemoryTable.propTypes = {
|
|
|
992
1020
|
"data-test-subj": _propTypes.default.string,
|
|
993
1021
|
css: _propTypes.default.any
|
|
994
1022
|
}).isRequired]),
|
|
1023
|
+
/**
|
|
1024
|
+
* By default, tables use `eql` format for search which allows using advanced filters.
|
|
1025
|
+
*
|
|
1026
|
+
* However, certain special characters (such as quotes, parentheses, and colons)
|
|
1027
|
+
* are reserved for EQL syntax and will error if used.
|
|
1028
|
+
* If your table does not require filter search and instead requires searching for certain
|
|
1029
|
+
* symbols, use a plain `text` search format instead (note that filters will be ignored
|
|
1030
|
+
* in this format).
|
|
1031
|
+
*
|
|
1032
|
+
* @default "eql"
|
|
1033
|
+
*/
|
|
1034
|
+
/**
|
|
1035
|
+
* By default, tables use `eql` format for search which allows using advanced filters.
|
|
1036
|
+
*
|
|
1037
|
+
* However, certain special characters (such as quotes, parentheses, and colons)
|
|
1038
|
+
* are reserved for EQL syntax and will error if used.
|
|
1039
|
+
* If your table does not require filter search and instead requires searching for certain
|
|
1040
|
+
* symbols, use a plain `text` search format instead (note that filters will be ignored
|
|
1041
|
+
* in this format).
|
|
1042
|
+
*
|
|
1043
|
+
* @default "eql"
|
|
1044
|
+
*/
|
|
1045
|
+
searchFormat: _propTypes.default.oneOf(["eql", "text"]),
|
|
995
1046
|
/**
|
|
996
1047
|
* Configures #Pagination
|
|
997
1048
|
*/
|
|
@@ -13,14 +13,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _services = require("../../services");
|
|
16
|
+
var _accessibility = require("../../services/accessibility");
|
|
17
|
+
var _href_validator = require("../../services/security/href_validator");
|
|
16
18
|
var _text = require("../text");
|
|
17
19
|
var _title = require("../title");
|
|
18
20
|
var _beta_badge = require("../badge/beta_badge");
|
|
19
|
-
var _card_select = require("./card_select");
|
|
20
|
-
var _accessibility = require("../../services/accessibility");
|
|
21
|
-
var _href_validator = require("../../services/security/href_validator");
|
|
22
21
|
var _panel = require("../panel");
|
|
23
22
|
var _spacer = require("../spacer");
|
|
23
|
+
var _card_select = require("./card_select");
|
|
24
24
|
var _card = require("./card.styles");
|
|
25
25
|
var _react2 = require("@emotion/react");
|
|
26
26
|
var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"],
|
|
@@ -19,14 +19,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
20
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
var _services = require("../../services");
|
|
22
|
+
var _popover = require("../../services/popover");
|
|
22
23
|
var _portal = require("../portal");
|
|
23
24
|
var _i18n = require("../i18n");
|
|
24
|
-
var _combo_box_options_list = require("./combo_box_options_list");
|
|
25
25
|
var _matching_options = require("./matching_options");
|
|
26
26
|
var _combo_box_input = require("./combo_box_input/combo_box_input");
|
|
27
|
-
var
|
|
27
|
+
var _combo_box_options_list = require("./combo_box_options_list");
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
|
-
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "aria-label", "aria-labelledby"];
|
|
29
|
+
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "truncationProps", "aria-label", "aria-labelledby"];
|
|
30
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
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
32
|
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; }
|
|
@@ -640,6 +640,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
640
640
|
delimiter = _this$props8.delimiter,
|
|
641
641
|
append = _this$props8.append,
|
|
642
642
|
autoFocus = _this$props8.autoFocus,
|
|
643
|
+
truncationProps = _this$props8.truncationProps,
|
|
643
644
|
ariaLabel = _this$props8['aria-label'],
|
|
644
645
|
ariaLabelledby = _this$props8['aria-labelledby'],
|
|
645
646
|
rest = (0, _objectWithoutProperties2.default)(_this$props8, _excluded);
|
|
@@ -708,7 +709,8 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
708
709
|
width: width,
|
|
709
710
|
delimiter: delimiter,
|
|
710
711
|
getSelectedOptionForSearchValue: _matching_options.getSelectedOptionForSearchValue,
|
|
711
|
-
listboxAriaLabel: listboxAriaLabel
|
|
712
|
+
listboxAriaLabel: listboxAriaLabel,
|
|
713
|
+
truncationProps: truncationProps
|
|
712
714
|
});
|
|
713
715
|
}));
|
|
714
716
|
}
|
|
@@ -905,5 +907,15 @@ EuiComboBox.propTypes = {
|
|
|
905
907
|
* supplied by `aria-label` or from [EuiFormRow](/#/forms/form-layouts).
|
|
906
908
|
*/
|
|
907
909
|
"aria-labelledby": _propTypes.default.string,
|
|
910
|
+
/**
|
|
911
|
+
* By default, EuiComboBox will truncate option labels at the end of
|
|
912
|
+
* the string. You can use pass in a custom truncation configuration that
|
|
913
|
+
* accepts any prop that [EuiTextTruncate](/#/utilities/text-truncate) prop
|
|
914
|
+
* except for `text` and `children`.
|
|
915
|
+
*
|
|
916
|
+
* Note: when searching, custom truncation props are ignored. The highlighted search
|
|
917
|
+
* text will always take precedence.
|
|
918
|
+
*/
|
|
919
|
+
truncationProps: _propTypes.default.any,
|
|
908
920
|
css: _propTypes.default.any
|
|
909
921
|
};
|
|
@@ -26,7 +26,7 @@ var _form_control_layout = require("../../form/form_control_layout");
|
|
|
26
26
|
var _num_icons = require("../../form/form_control_layout/_num_icons");
|
|
27
27
|
var _combo_box_pill = require("./combo_box_pill");
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
|
-
var _excluded = ["key", "label", "color", "onClick", "append", "prepend"];
|
|
29
|
+
var _excluded = ["key", "label", "color", "onClick", "append", "prepend", "truncationProps"];
|
|
30
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
31
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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
32
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -157,6 +157,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
157
157
|
onClick = option.onClick,
|
|
158
158
|
append = option.append,
|
|
159
159
|
prepend = option.prepend,
|
|
160
|
+
truncationProps = option.truncationProps,
|
|
160
161
|
rest = (0, _objectWithoutProperties2.default)(option, _excluded);
|
|
161
162
|
var pillOnClose = isDisabled || singleSelection || onClick ? undefined : onRemoveOption;
|
|
162
163
|
return (0, _react2.jsx)(_combo_box_pill.EuiComboBoxPill, (0, _extends2.default)({
|
|
@@ -302,6 +303,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
302
303
|
value: _propTypes.default.any,
|
|
303
304
|
prepend: _propTypes.default.node,
|
|
304
305
|
append: _propTypes.default.node,
|
|
306
|
+
truncationProps: _propTypes.default.any,
|
|
305
307
|
className: _propTypes.default.string,
|
|
306
308
|
"aria-label": _propTypes.default.string,
|
|
307
309
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -310,6 +312,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
310
312
|
value: _propTypes.default.any,
|
|
311
313
|
prepend: _propTypes.default.node,
|
|
312
314
|
append: _propTypes.default.node,
|
|
315
|
+
truncationProps: _propTypes.default.any,
|
|
313
316
|
className: _propTypes.default.string,
|
|
314
317
|
"aria-label": _propTypes.default.string,
|
|
315
318
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -75,7 +75,9 @@ var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
|
|
|
75
75
|
} : {};
|
|
76
76
|
var content = (0, _react2.jsx)(_react.default.Fragment, null, option.prepend && (0, _react2.jsx)("span", {
|
|
77
77
|
className: "euiComboBoxPill__prepend"
|
|
78
|
-
}, option.prepend),
|
|
78
|
+
}, option.prepend), (0, _react2.jsx)("span", {
|
|
79
|
+
className: "eui-textTruncate"
|
|
80
|
+
}, children), option.append && (0, _react2.jsx)("span", {
|
|
79
81
|
className: "euiComboBoxPill__append"
|
|
80
82
|
}, option.append));
|
|
81
83
|
if (onClose) {
|
|
@@ -138,6 +140,7 @@ EuiComboBoxPill.propTypes = {
|
|
|
138
140
|
value: _propTypes.default.any,
|
|
139
141
|
prepend: _propTypes.default.node,
|
|
140
142
|
append: _propTypes.default.node,
|
|
143
|
+
truncationProps: _propTypes.default.any,
|
|
141
144
|
className: _propTypes.default.string,
|
|
142
145
|
"aria-label": _propTypes.default.string,
|
|
143
146
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -146,6 +149,7 @@ EuiComboBoxPill.propTypes = {
|
|
|
146
149
|
value: _propTypes.default.any,
|
|
147
150
|
prepend: _propTypes.default.node,
|
|
148
151
|
append: _propTypes.default.node,
|
|
152
|
+
truncationProps: _propTypes.default.any,
|
|
149
153
|
className: _propTypes.default.string,
|
|
150
154
|
"aria-label": _propTypes.default.string,
|
|
151
155
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -120,6 +120,7 @@ EuiComboBoxOption.propTypes = {
|
|
|
120
120
|
value: _propTypes.default.any,
|
|
121
121
|
prepend: _propTypes.default.node,
|
|
122
122
|
append: _propTypes.default.node,
|
|
123
|
+
truncationProps: _propTypes.default.any,
|
|
123
124
|
className: _propTypes.default.string,
|
|
124
125
|
"aria-label": _propTypes.default.string,
|
|
125
126
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -128,6 +129,7 @@ EuiComboBoxOption.propTypes = {
|
|
|
128
129
|
value: _propTypes.default.any,
|
|
129
130
|
prepend: _propTypes.default.node,
|
|
130
131
|
append: _propTypes.default.node,
|
|
132
|
+
truncationProps: _propTypes.default.any,
|
|
131
133
|
className: _propTypes.default.string,
|
|
132
134
|
"aria-label": _propTypes.default.string,
|
|
133
135
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -21,6 +21,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
21
21
|
var _reactWindow = require("react-window");
|
|
22
22
|
var _flex = require("../../flex");
|
|
23
23
|
var _highlight = require("../../highlight");
|
|
24
|
+
var _mark = require("../../mark");
|
|
24
25
|
var _text = require("../../text");
|
|
25
26
|
var _loading = require("../../loading");
|
|
26
27
|
var _combo_box_title = require("./combo_box_title");
|
|
@@ -28,9 +29,10 @@ var _i18n = require("../../i18n");
|
|
|
28
29
|
var _filter_select_item = require("../../filter_group/filter_select_item");
|
|
29
30
|
var _badge = require("../../badge");
|
|
30
31
|
var _popover_panel = require("../../popover/popover_panel");
|
|
32
|
+
var _text_truncate = require("../../text_truncate");
|
|
31
33
|
var _react2 = require("@emotion/react");
|
|
32
|
-
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append"],
|
|
33
|
-
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "listboxAriaLabel"];
|
|
34
|
+
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
|
|
35
|
+
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "truncationProps", "listboxAriaLabel"];
|
|
34
36
|
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); }
|
|
35
37
|
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; }
|
|
36
38
|
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; }
|
|
@@ -43,7 +45,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
43
45
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
44
46
|
* Side Public License, v 1.
|
|
45
47
|
*/
|
|
46
|
-
var OPTION_CONTENT_CLASSNAME = 'euiComboBoxOption__content';
|
|
47
48
|
var hitEnterBadge = (0, _react2.jsx)(_badge.EuiBadge, {
|
|
48
49
|
className: "euiComboBoxOption__enterBadge",
|
|
49
50
|
color: "hollow",
|
|
@@ -104,6 +105,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
104
105
|
value = option.value,
|
|
105
106
|
prepend = option.prepend,
|
|
106
107
|
append = option.append,
|
|
108
|
+
_truncationProps = option.truncationProps,
|
|
107
109
|
rest = (0, _objectWithoutProperties2.default)(option, _excluded);
|
|
108
110
|
var _this$props = _this.props,
|
|
109
111
|
singleSelection = _this$props.singleSelection,
|
|
@@ -114,6 +116,9 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
114
116
|
renderOption = _this$props.renderOption,
|
|
115
117
|
searchValue = _this$props.searchValue,
|
|
116
118
|
rootId = _this$props.rootId;
|
|
119
|
+
var hasTruncationProps = _this.props.truncationProps || _truncationProps;
|
|
120
|
+
var truncationProps = hasTruncationProps ? // Individual truncation settings should override component prop
|
|
121
|
+
_objectSpread(_objectSpread({}, _this.props.truncationProps), _truncationProps) : undefined;
|
|
117
122
|
if (isGroupLabelOption) {
|
|
118
123
|
return (0, _react2.jsx)("div", {
|
|
119
124
|
key: key !== null && key !== void 0 ? key : label,
|
|
@@ -144,16 +149,52 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
144
149
|
className: "euiComboBoxOption__contentWrapper"
|
|
145
150
|
}, prepend && (0, _react2.jsx)("span", {
|
|
146
151
|
className: "euiComboBoxOption__prepend"
|
|
147
|
-
}, prepend),
|
|
148
|
-
className:
|
|
149
|
-
}, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')
|
|
150
|
-
search: searchValue,
|
|
151
|
-
strict: _this.props.isCaseSensitive,
|
|
152
|
-
className: OPTION_CONTENT_CLASSNAME
|
|
153
|
-
}, label), append && (0, _react2.jsx)("span", {
|
|
152
|
+
}, prepend), (0, _react2.jsx)("span", {
|
|
153
|
+
className: "euiComboBoxOption__content"
|
|
154
|
+
}, renderOption ? renderOption(option, searchValue, 'euiComboBoxOption__renderOption') : _this.renderTruncatedOption(label, truncationProps)), append && (0, _react2.jsx)("span", {
|
|
154
155
|
className: "euiComboBoxOption__append"
|
|
155
156
|
}, append), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
|
|
156
157
|
});
|
|
158
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "optionWidth", void 0);
|
|
159
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setOptionWidth", function (width) {
|
|
160
|
+
_this.optionWidth = width;
|
|
161
|
+
});
|
|
162
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderTruncatedOption", function (text, truncationProps) {
|
|
163
|
+
var searchValue = _this.props.searchValue.trim();
|
|
164
|
+
if (!truncationProps && !searchValue) {
|
|
165
|
+
// Default to CSS text-overflow
|
|
166
|
+
return text;
|
|
167
|
+
}
|
|
168
|
+
if (!searchValue) {
|
|
169
|
+
return (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({
|
|
170
|
+
width: _this.optionWidth,
|
|
171
|
+
onResize: _this.setOptionWidth
|
|
172
|
+
}, truncationProps, {
|
|
173
|
+
text: text
|
|
174
|
+
}), function (text) {
|
|
175
|
+
return text;
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
var searchPositionStart = _this.props.isCaseSensitive ? text.indexOf(searchValue) : text.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
179
|
+
var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
|
|
180
|
+
return (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({
|
|
181
|
+
width: _this.optionWidth,
|
|
182
|
+
onResize: _this.setOptionWidth
|
|
183
|
+
}, truncationProps, {
|
|
184
|
+
// When searching, don't allow overriding the truncation settings
|
|
185
|
+
truncation: "startEnd",
|
|
186
|
+
truncationPosition: searchPositionCenter,
|
|
187
|
+
text: text
|
|
188
|
+
}), function (text) {
|
|
189
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, text.length >= searchValue.length ? (0, _react2.jsx)(_highlight.EuiHighlight, {
|
|
190
|
+
search: searchValue,
|
|
191
|
+
strict: _this.props.isCaseSensitive
|
|
192
|
+
}, text) :
|
|
193
|
+
// If the available truncated text is shorter than the full search string,
|
|
194
|
+
// just highlight the entire truncated text
|
|
195
|
+
(0, _react2.jsx)(_mark.EuiMark, null, text));
|
|
196
|
+
});
|
|
197
|
+
});
|
|
157
198
|
return _this;
|
|
158
199
|
}
|
|
159
200
|
(0, _createClass2.default)(EuiComboBoxOptionsList, [{
|
|
@@ -237,6 +278,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
237
278
|
delimiter = _this$props2.delimiter,
|
|
238
279
|
zIndex = _this$props2.zIndex,
|
|
239
280
|
style = _this$props2.style,
|
|
281
|
+
truncationProps = _this$props2.truncationProps,
|
|
240
282
|
listboxAriaLabel = _this$props2.listboxAriaLabel,
|
|
241
283
|
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded2);
|
|
242
284
|
var emptyStateContent;
|
|
@@ -382,7 +424,7 @@ exports.EuiComboBoxOptionsList = EuiComboBoxOptionsList;
|
|
|
382
424
|
EuiComboBoxOptionsList.propTypes = {
|
|
383
425
|
className: _propTypes.default.string,
|
|
384
426
|
"aria-label": _propTypes.default.string,
|
|
385
|
-
"data-test-subj": _propTypes.default.
|
|
427
|
+
"data-test-subj": _propTypes.default.string,
|
|
386
428
|
css: _propTypes.default.any,
|
|
387
429
|
activeOptionIndex: _propTypes.default.number,
|
|
388
430
|
areAllOptionsSelected: _propTypes.default.bool,
|
|
@@ -409,6 +451,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
409
451
|
value: _propTypes.default.any,
|
|
410
452
|
prepend: _propTypes.default.node,
|
|
411
453
|
append: _propTypes.default.node,
|
|
454
|
+
truncationProps: _propTypes.default.any,
|
|
412
455
|
className: _propTypes.default.string,
|
|
413
456
|
"aria-label": _propTypes.default.string,
|
|
414
457
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -417,6 +460,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
417
460
|
value: _propTypes.default.any,
|
|
418
461
|
prepend: _propTypes.default.node,
|
|
419
462
|
append: _propTypes.default.node,
|
|
463
|
+
truncationProps: _propTypes.default.any,
|
|
420
464
|
className: _propTypes.default.string,
|
|
421
465
|
"aria-label": _propTypes.default.string,
|
|
422
466
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -443,6 +487,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
443
487
|
value: _propTypes.default.any,
|
|
444
488
|
prepend: _propTypes.default.node,
|
|
445
489
|
append: _propTypes.default.node,
|
|
490
|
+
truncationProps: _propTypes.default.any,
|
|
446
491
|
className: _propTypes.default.string,
|
|
447
492
|
"aria-label": _propTypes.default.string,
|
|
448
493
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -451,6 +496,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
451
496
|
value: _propTypes.default.any,
|
|
452
497
|
prepend: _propTypes.default.node,
|
|
453
498
|
append: _propTypes.default.node,
|
|
499
|
+
truncationProps: _propTypes.default.any,
|
|
454
500
|
className: _propTypes.default.string,
|
|
455
501
|
"aria-label": _propTypes.default.string,
|
|
456
502
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -474,6 +520,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
474
520
|
value: _propTypes.default.any,
|
|
475
521
|
prepend: _propTypes.default.node,
|
|
476
522
|
append: _propTypes.default.node,
|
|
523
|
+
truncationProps: _propTypes.default.any,
|
|
477
524
|
className: _propTypes.default.string,
|
|
478
525
|
"aria-label": _propTypes.default.string,
|
|
479
526
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -482,6 +529,7 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
482
529
|
value: _propTypes.default.any,
|
|
483
530
|
prepend: _propTypes.default.node,
|
|
484
531
|
append: _propTypes.default.node,
|
|
532
|
+
truncationProps: _propTypes.default.any,
|
|
485
533
|
className: _propTypes.default.string,
|
|
486
534
|
"aria-label": _propTypes.default.string,
|
|
487
535
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -493,5 +541,6 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
493
541
|
asPlainText: _propTypes.default.bool
|
|
494
542
|
}).isRequired]),
|
|
495
543
|
delimiter: _propTypes.default.string,
|
|
496
|
-
zIndex: _propTypes.default.number
|
|
544
|
+
zIndex: _propTypes.default.number,
|
|
545
|
+
truncationProps: _propTypes.default.any
|
|
497
546
|
};
|
|
@@ -147,7 +147,7 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
|
|
|
147
147
|
}, (0, _react2.jsx)(_drag_and_drop.EuiDroppable, {
|
|
148
148
|
droppableId: "columnOrder",
|
|
149
149
|
isDropDisabled: !isDragEnabled
|
|
150
|
-
}, (0, _react2.jsx)(_react.Fragment, null, filteredColumns.map(function (id, index) {
|
|
150
|
+
}, (0, _react2.jsx)(_react.default.Fragment, null, filteredColumns.map(function (id, index) {
|
|
151
151
|
return (0, _react2.jsx)(_drag_and_drop.EuiDraggable, {
|
|
152
152
|
key: id,
|
|
153
153
|
draggableId: id,
|
|
@@ -157,7 +157,9 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
|
|
|
157
157
|
customDragHandle: true
|
|
158
158
|
}, function (provided, state) {
|
|
159
159
|
return (0, _react2.jsx)("div", {
|
|
160
|
-
className:
|
|
160
|
+
className: (0, _classnames.default)('euiDataGridColumnSelector__item', {
|
|
161
|
+
'euiDataGridColumnSelector__item-isDragging': state.isDragging
|
|
162
|
+
}),
|
|
161
163
|
"data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
|
|
162
164
|
}, (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
163
165
|
responsive: false,
|