@elastic/eui 102.1.0 → 102.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/basic_table/basic_table.js +10 -9
- package/es/components/basic_table/in_memory_table.js +18 -16
- package/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/es/components/breadcrumbs/breadcrumbs.js +3 -3
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/es/components/datagrid/body/data_grid_body.js +14 -9
- package/es/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/es/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/es/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/es/components/datagrid/body/header/draggable_columns.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +6 -6
- package/es/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/es/components/datagrid/utils/in_memory.js +3 -3
- package/es/components/datagrid/utils/scrolling.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/es/components/form/range/dual_range.js +1 -1
- package/es/components/form/range/range.js +1 -1
- package/es/components/form/range/range_track.js +1 -1
- package/es/components/form/select/select.js +1 -1
- package/es/components/header/header.js +10 -10
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -3
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/icon/assets/logo_elastic.js +23 -17
- package/es/components/icon/icon.styles.js +1 -1
- package/es/components/key_pad_menu/key_pad_menu.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_elastic.styles.js +2 -2
- package/es/components/loading/loading_spinner.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/responsive/hide_for.js +1 -1
- package/es/components/responsive/show_for.js +1 -1
- package/es/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/es/components/search_bar/filters/field_value_toggle_group_filter.js +1 -1
- package/es/components/search_bar/search_bar.js +3 -3
- package/es/components/search_bar/search_filters.js +2 -2
- package/es/components/selectable/selectable.js +13 -12
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/es/components/side_nav/side_nav.js +2 -2
- package/es/components/table/table_row_cell.js +1 -1
- package/es/components/timeline/timeline.js +1 -1
- package/es/components/toast/global_toast_list.js +27 -20
- package/es/components/tour/tour_step.js +1 -1
- package/es/services/theme/hooks.js +11 -0
- package/es/services/theme/index.js +1 -1
- package/es/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/es/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/es/themes/json/eui_theme_borealis_dark.json +427 -0
- package/es/themes/json/eui_theme_borealis_light.json +427 -0
- package/eui.d.ts +1840 -88
- package/lib/components/basic_table/basic_table.js +10 -9
- package/lib/components/basic_table/in_memory_table.js +18 -16
- package/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.js +2 -2
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/lib/components/datagrid/body/data_grid_body.js +14 -9
- package/lib/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/lib/components/datagrid/body/header/draggable_columns.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +6 -6
- package/lib/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/lib/components/datagrid/utils/in_memory.js +3 -3
- package/lib/components/datagrid/utils/scrolling.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/lib/components/empty_prompt/images/illustration.svg +939 -0
- package/lib/components/form/range/dual_range.js +1 -1
- package/lib/components/form/range/range.js +1 -1
- package/lib/components/form/range/range_track.js +1 -1
- package/lib/components/form/select/select.js +1 -1
- package/lib/components/header/header.js +10 -10
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -2
- package/lib/components/icon/assets/logo_elastic.js +23 -17
- package/lib/components/icon/icon.styles.js +1 -1
- package/lib/components/icon/svgs/logo_elastic.svg +7 -9
- package/lib/components/key_pad_menu/key_pad_menu.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_elastic.styles.js +2 -2
- package/lib/components/loading/loading_spinner.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/responsive/hide_for.js +1 -1
- package/lib/components/responsive/show_for.js +1 -1
- package/lib/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/lib/components/search_bar/filters/field_value_toggle_group_filter.js +1 -1
- package/lib/components/search_bar/search_bar.js +3 -3
- package/lib/components/search_bar/search_filters.js +2 -2
- package/lib/components/selectable/selectable.js +13 -12
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/lib/components/side_nav/side_nav.js +2 -2
- package/lib/components/table/table_row_cell.js +1 -1
- package/lib/components/timeline/timeline.js +1 -1
- package/lib/components/toast/global_toast_list.js +27 -20
- package/lib/services/theme/hooks.js +12 -1
- package/lib/services/theme/index.js +6 -0
- package/lib/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/lib/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/lib/themes/json/eui_theme_borealis_dark.json +427 -0
- package/lib/themes/json/eui_theme_borealis_light.json +427 -0
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +44 -1
- package/optimize/es/components/datagrid/utils/scrolling.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/optimize/es/components/form/select/select.js +1 -1
- package/optimize/es/components/icon/assets/logo_elastic.js +23 -17
- package/optimize/es/components/icon/icon.styles.js +1 -1
- package/optimize/es/components/loading/loading_elastic.styles.js +2 -2
- package/optimize/es/components/selectable/selectable.js +10 -9
- package/optimize/es/components/toast/global_toast_list.js +24 -20
- package/optimize/es/services/theme/hooks.js +11 -0
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/optimize/es/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/optimize/es/themes/json/eui_theme_borealis_dark.json +427 -0
- package/optimize/es/themes/json/eui_theme_borealis_light.json +427 -0
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +44 -1
- package/optimize/lib/components/datagrid/utils/scrolling.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/optimize/lib/components/empty_prompt/images/illustration.svg +939 -0
- package/optimize/lib/components/form/select/select.js +1 -1
- package/optimize/lib/components/icon/assets/logo_elastic.js +23 -17
- package/optimize/lib/components/icon/icon.styles.js +1 -1
- package/optimize/lib/components/icon/svgs/logo_elastic.svg +7 -9
- package/optimize/lib/components/loading/loading_elastic.styles.js +2 -2
- package/optimize/lib/components/selectable/selectable.js +10 -9
- package/optimize/lib/components/toast/global_toast_list.js +24 -20
- package/optimize/lib/services/theme/hooks.js +12 -1
- package/optimize/lib/services/theme/index.js +6 -0
- package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/optimize/lib/themes/json/eui_theme_borealis_dark.json +427 -0
- package/optimize/lib/themes/json/eui_theme_borealis_light.json +427 -0
- package/package.json +3 -5
- package/test-env/components/basic_table/basic_table.js +10 -9
- package/test-env/components/basic_table/in_memory_table.js +18 -16
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/test-env/components/breadcrumbs/breadcrumbs.js +2 -2
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/test-env/components/datagrid/body/data_grid_body.js +14 -9
- package/test-env/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/test-env/components/datagrid/body/header/draggable_columns.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/test-env/components/datagrid/utils/in_memory.js +3 -3
- package/test-env/components/datagrid/utils/scrolling.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/test-env/components/form/range/dual_range.js +1 -1
- package/test-env/components/form/range/range.js +1 -1
- package/test-env/components/form/range/range_track.js +1 -1
- package/test-env/components/form/select/select.js +1 -1
- package/test-env/components/header/header.js +10 -10
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -2
- package/test-env/components/icon/assets/logo_elastic.js +23 -17
- package/test-env/components/icon/icon.styles.js +1 -1
- package/test-env/components/key_pad_menu/key_pad_menu.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_elastic.styles.js +2 -2
- package/test-env/components/loading/loading_spinner.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/responsive/hide_for.js +1 -1
- package/test-env/components/responsive/show_for.js +1 -1
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/test-env/components/search_bar/filters/field_value_toggle_group_filter.js +1 -1
- package/test-env/components/search_bar/search_bar.js +3 -3
- package/test-env/components/search_bar/search_filters.js +2 -2
- package/test-env/components/selectable/selectable.js +13 -12
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/test-env/components/side_nav/side_nav.js +2 -2
- package/test-env/components/table/table_row_cell.js +1 -1
- package/test-env/components/timeline/timeline.js +1 -1
- package/test-env/components/toast/global_toast_list.js +24 -20
- package/test-env/services/theme/hooks.js +12 -1
- package/test-env/services/theme/index.js +6 -0
- package/test-env/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/test-env/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/test-env/themes/json/eui_theme_borealis_dark.json +427 -0
- package/test-env/themes/json/eui_theme_borealis_light.json +427 -0
|
@@ -312,6 +312,48 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
312
312
|
footerRow: footerRow
|
|
313
313
|
};
|
|
314
314
|
}, [headerRowHeight, headerRow, footerRow]);
|
|
315
|
+
var onScroll = (0, _react.useCallback)(function (args) {
|
|
316
|
+
// check only if a callback is passed
|
|
317
|
+
if (typeof (virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.onScroll) !== 'function') return;
|
|
318
|
+
var enhancedArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
319
|
+
scrollHeight: 0,
|
|
320
|
+
scrollWidth: 0,
|
|
321
|
+
clientHeight: 0,
|
|
322
|
+
clientWidth: 0,
|
|
323
|
+
isScrolledToBlockStart: args.scrollTop === 0,
|
|
324
|
+
isScrolledToBlockEnd: false,
|
|
325
|
+
isScrolledToInlineStart: args.scrollLeft === 0,
|
|
326
|
+
isScrolledToInlineEnd: false
|
|
327
|
+
});
|
|
328
|
+
if (outerGridRef.current) {
|
|
329
|
+
var _outerGridRef$current = outerGridRef.current,
|
|
330
|
+
scrollTop = _outerGridRef$current.scrollTop,
|
|
331
|
+
scrollLeft = _outerGridRef$current.scrollLeft,
|
|
332
|
+
scrollHeight = _outerGridRef$current.scrollHeight,
|
|
333
|
+
scrollWidth = _outerGridRef$current.scrollWidth,
|
|
334
|
+
clientHeight = _outerGridRef$current.clientHeight,
|
|
335
|
+
clientWidth = _outerGridRef$current.clientWidth;
|
|
336
|
+
var isScrollableVertical = scrollHeight > clientHeight;
|
|
337
|
+
var isScrolledToBlockStart = scrollTop === 0;
|
|
338
|
+
var isScrollableHorizontal = scrollWidth > clientWidth;
|
|
339
|
+
var isScrolledToInlineStart = scrollLeft === 0;
|
|
340
|
+
var isScrolledToBlockEnd = isScrollableVertical && !isScrolledToBlockStart && scrollHeight - scrollTop <= clientHeight;
|
|
341
|
+
var isScrolledToInlineEnd = isScrollableHorizontal && !isScrolledToInlineStart && scrollWidth - scrollLeft <= clientWidth;
|
|
342
|
+
enhancedArgs = _objectSpread(_objectSpread({}, enhancedArgs), {}, {
|
|
343
|
+
scrollTop: scrollTop,
|
|
344
|
+
scrollLeft: scrollLeft,
|
|
345
|
+
scrollHeight: scrollHeight,
|
|
346
|
+
scrollWidth: scrollWidth,
|
|
347
|
+
clientHeight: clientHeight,
|
|
348
|
+
clientWidth: clientWidth,
|
|
349
|
+
isScrolledToBlockStart: isScrolledToBlockStart,
|
|
350
|
+
isScrolledToBlockEnd: isScrolledToBlockEnd,
|
|
351
|
+
isScrolledToInlineStart: isScrolledToInlineStart,
|
|
352
|
+
isScrolledToInlineEnd: isScrolledToInlineEnd
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
return virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.onScroll(enhancedArgs);
|
|
356
|
+
}, [outerGridRef, virtualizationOptions]);
|
|
315
357
|
return _utils.IS_JEST_ENVIRONMENT || finalWidth > 0 ? (0, _react2.jsx)(DataGridWrapperRowsContext.Provider, {
|
|
316
358
|
value: rowWrapperContextValue
|
|
317
359
|
}, (0, _react2.jsx)(_reactWindow.VariableSizeGrid, _extends({}, virtualizationOptions, {
|
|
@@ -327,7 +369,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
327
369
|
height: finalHeight,
|
|
328
370
|
rowHeight: getRowHeight,
|
|
329
371
|
itemData: itemData,
|
|
330
|
-
rowCount: _utils.IS_JEST_ENVIRONMENT || headerRowHeight > 0 ? visibleRowCount : 0
|
|
372
|
+
rowCount: _utils.IS_JEST_ENVIRONMENT || headerRowHeight > 0 ? visibleRowCount : 0,
|
|
373
|
+
onScroll: onScroll
|
|
331
374
|
}), Cell), scrollBorderOverlay) : null;
|
|
332
375
|
});
|
|
333
376
|
EuiDataGridBodyVirtualized.propTypes = {
|
|
@@ -434,12 +477,12 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
434
477
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"]),
|
|
435
478
|
/**
|
|
436
479
|
* A Schema to use for the column.
|
|
437
|
-
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own
|
|
480
|
+
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own {@link EuiDataGrid} `schemaDetectors` (for in-memory detection).
|
|
438
481
|
* In general, it is advised to pass in a value here when you are sure of the schema ahead of time, so that you don't need to rely on the automatic detection.
|
|
439
482
|
*/
|
|
440
483
|
schema: _propTypes.default.string,
|
|
441
484
|
/**
|
|
442
|
-
* Configuration of column actions. Set to false to disable or use
|
|
485
|
+
* Configuration of column actions. Set to false to disable or use {@link EuiDataGridColumnActions} to configure the actions displayed in the header cell of the column.
|
|
443
486
|
*/
|
|
444
487
|
actions: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.shape({
|
|
445
488
|
/**
|
|
@@ -488,7 +531,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
488
531
|
*/
|
|
489
532
|
showToolTip: _propTypes.default.bool,
|
|
490
533
|
/**
|
|
491
|
-
* An object of
|
|
534
|
+
* An object of {@link EuiListGroupItemExtraAction} props.
|
|
492
535
|
* Adds an `EuiButtonIcon` to the right side of the item; `iconType` is required;
|
|
493
536
|
* pass `alwaysShow` if you don't want the default behavior of only showing on hover
|
|
494
537
|
*/
|
|
@@ -798,7 +841,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
798
841
|
schema: _propTypes.default.shape({}).isRequired,
|
|
799
842
|
schemaDetectors: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
800
843
|
/**
|
|
801
|
-
* The name of this data type, matches
|
|
844
|
+
* The name of this data type, matches {@link EuiDataGridColumn} / `schema`
|
|
802
845
|
*/
|
|
803
846
|
type: _propTypes.default.string.isRequired,
|
|
804
847
|
/**
|
|
@@ -826,7 +869,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
826
869
|
*/
|
|
827
870
|
sortTextDesc: _propTypes.default.node.isRequired,
|
|
828
871
|
/**
|
|
829
|
-
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual
|
|
872
|
+
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
830
873
|
*/
|
|
831
874
|
isSortable: _propTypes.default.bool,
|
|
832
875
|
/**
|
|
@@ -834,7 +877,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
834
877
|
*/
|
|
835
878
|
textTransform: _propTypes.default.oneOf(["uppercase", "lowercase", "capitalize"]),
|
|
836
879
|
/**
|
|
837
|
-
* Default sort direction of columns with this schema. Can be overridden at the individual
|
|
880
|
+
* Default sort direction of columns with this schema. Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
838
881
|
*/
|
|
839
882
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"])
|
|
840
883
|
}).isRequired).isRequired,
|
|
@@ -867,7 +910,12 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
867
910
|
setVisibleColumns: _propTypes.default.func.isRequired,
|
|
868
911
|
switchColumnPos: _propTypes.default.func.isRequired,
|
|
869
912
|
onColumnResize: _propTypes.default.func,
|
|
870
|
-
virtualizationOptions: _propTypes.default.
|
|
913
|
+
virtualizationOptions: _propTypes.default.shape({
|
|
914
|
+
/**
|
|
915
|
+
* Called when the grid scroll positions changes, as a result of user scrolling or scroll-to method calls.
|
|
916
|
+
*/
|
|
917
|
+
onScroll: _propTypes.default.func
|
|
918
|
+
}),
|
|
871
919
|
rowHeightsOptions: _propTypes.default.shape({
|
|
872
920
|
/**
|
|
873
921
|
* Defines the default size for all rows. It can be line count or just height.
|
|
@@ -888,7 +936,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
888
936
|
* Defines the height for a specific row. It can be line count or just height.
|
|
889
937
|
*
|
|
890
938
|
* When using row height overrides, we strongly setting the `showDisplaySelector: allowRowHeight`
|
|
891
|
-
* toolbar control to `false` in
|
|
939
|
+
* toolbar control to `false` in {@link EuiDataGridToolBarVisibilityOptions}
|
|
892
940
|
*/
|
|
893
941
|
rowHeights: _propTypes.default.any,
|
|
894
942
|
/**
|
|
@@ -931,7 +979,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
931
979
|
*/
|
|
932
980
|
stripes: _propTypes.default.bool,
|
|
933
981
|
/**
|
|
934
|
-
* Visual style for the column headers. Recommendation is to use the `underline` style in times when
|
|
982
|
+
* Visual style for the column headers. Recommendation is to use the `underline` style in times when {@link EuiDataGrid} `toolbarVisibility` is set to `false`.
|
|
935
983
|
* @default shade
|
|
936
984
|
*/
|
|
937
985
|
header: _propTypes.default.oneOf(["shade", "underline"]),
|
|
@@ -182,12 +182,12 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
182
182
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"]),
|
|
183
183
|
/**
|
|
184
184
|
* A Schema to use for the column.
|
|
185
|
-
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own
|
|
185
|
+
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own {@link EuiDataGrid} `schemaDetectors` (for in-memory detection).
|
|
186
186
|
* In general, it is advised to pass in a value here when you are sure of the schema ahead of time, so that you don't need to rely on the automatic detection.
|
|
187
187
|
*/
|
|
188
188
|
schema: _propTypes.default.string,
|
|
189
189
|
/**
|
|
190
|
-
* Configuration of column actions. Set to false to disable or use
|
|
190
|
+
* Configuration of column actions. Set to false to disable or use {@link EuiDataGridColumnActions} to configure the actions displayed in the header cell of the column.
|
|
191
191
|
*/
|
|
192
192
|
actions: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.shape({
|
|
193
193
|
/**
|
|
@@ -236,7 +236,7 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
236
236
|
*/
|
|
237
237
|
showToolTip: _propTypes.default.bool,
|
|
238
238
|
/**
|
|
239
|
-
* An object of
|
|
239
|
+
* An object of {@link EuiListGroupItemExtraAction} props.
|
|
240
240
|
* Adds an `EuiButtonIcon` to the right side of the item; `iconType` is required;
|
|
241
241
|
* pass `alwaysShow` if you don't want the default behavior of only showing on hover
|
|
242
242
|
*/
|
|
@@ -221,7 +221,7 @@ DraggableColumn.propTypes = {
|
|
|
221
221
|
*/
|
|
222
222
|
stripes: _propTypes.default.bool,
|
|
223
223
|
/**
|
|
224
|
-
* Visual style for the column headers. Recommendation is to use the `underline` style in times when
|
|
224
|
+
* Visual style for the column headers. Recommendation is to use the `underline` style in times when {@link EuiDataGrid} `toolbarVisibility` is set to `false`.
|
|
225
225
|
* @default shade
|
|
226
226
|
*/
|
|
227
227
|
header: _propTypes.default.oneOf(["shade", "underline"]),
|
|
@@ -316,12 +316,12 @@ DataGridSortingControl.propTypes = {
|
|
|
316
316
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"]),
|
|
317
317
|
/**
|
|
318
318
|
* A Schema to use for the column.
|
|
319
|
-
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own
|
|
319
|
+
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own {@link EuiDataGrid} `schemaDetectors` (for in-memory detection).
|
|
320
320
|
* In general, it is advised to pass in a value here when you are sure of the schema ahead of time, so that you don't need to rely on the automatic detection.
|
|
321
321
|
*/
|
|
322
322
|
schema: _propTypes.default.string,
|
|
323
323
|
/**
|
|
324
|
-
* Configuration of column actions. Set to false to disable or use
|
|
324
|
+
* Configuration of column actions. Set to false to disable or use {@link EuiDataGridColumnActions} to configure the actions displayed in the header cell of the column.
|
|
325
325
|
*/
|
|
326
326
|
actions: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.shape({
|
|
327
327
|
/**
|
|
@@ -370,7 +370,7 @@ DataGridSortingControl.propTypes = {
|
|
|
370
370
|
*/
|
|
371
371
|
showToolTip: _propTypes.default.bool,
|
|
372
372
|
/**
|
|
373
|
-
* An object of
|
|
373
|
+
* An object of {@link EuiListGroupItemExtraAction} props.
|
|
374
374
|
* Adds an `EuiButtonIcon` to the right side of the item; `iconType` is required;
|
|
375
375
|
* pass `alwaysShow` if you don't want the default behavior of only showing on hover
|
|
376
376
|
*/
|
|
@@ -680,7 +680,7 @@ DataGridSortingControl.propTypes = {
|
|
|
680
680
|
schema: _propTypes.default.shape({}).isRequired,
|
|
681
681
|
schemaDetectors: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
682
682
|
/**
|
|
683
|
-
* The name of this data type, matches
|
|
683
|
+
* The name of this data type, matches {@link EuiDataGridColumn} / `schema`
|
|
684
684
|
*/
|
|
685
685
|
type: _propTypes.default.string.isRequired,
|
|
686
686
|
/**
|
|
@@ -708,7 +708,7 @@ DataGridSortingControl.propTypes = {
|
|
|
708
708
|
*/
|
|
709
709
|
sortTextDesc: _propTypes.default.node.isRequired,
|
|
710
710
|
/**
|
|
711
|
-
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual
|
|
711
|
+
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
712
712
|
*/
|
|
713
713
|
isSortable: _propTypes.default.bool,
|
|
714
714
|
/**
|
|
@@ -716,7 +716,7 @@ DataGridSortingControl.propTypes = {
|
|
|
716
716
|
*/
|
|
717
717
|
textTransform: _propTypes.default.oneOf(["uppercase", "lowercase", "capitalize"]),
|
|
718
718
|
/**
|
|
719
|
-
* Default sort direction of columns with this schema. Can be overridden at the individual
|
|
719
|
+
* Default sort direction of columns with this schema. Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
720
720
|
*/
|
|
721
721
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"])
|
|
722
722
|
}).isRequired).isRequired
|
|
@@ -201,7 +201,7 @@ EuiDataGridColumnSortingDraggable.propTypes = {
|
|
|
201
201
|
schema: _propTypes.default.shape({}).isRequired,
|
|
202
202
|
schemaDetectors: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
203
203
|
/**
|
|
204
|
-
* The name of this data type, matches
|
|
204
|
+
* The name of this data type, matches {@link EuiDataGridColumn} / `schema`
|
|
205
205
|
*/
|
|
206
206
|
type: _propTypes.default.string.isRequired,
|
|
207
207
|
/**
|
|
@@ -229,7 +229,7 @@ EuiDataGridColumnSortingDraggable.propTypes = {
|
|
|
229
229
|
*/
|
|
230
230
|
sortTextDesc: _propTypes.default.node.isRequired,
|
|
231
231
|
/**
|
|
232
|
-
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual
|
|
232
|
+
* Whether columns with this schema are sortable (defaults to true). Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
233
233
|
*/
|
|
234
234
|
isSortable: _propTypes.default.bool,
|
|
235
235
|
/**
|
|
@@ -237,7 +237,7 @@ EuiDataGridColumnSortingDraggable.propTypes = {
|
|
|
237
237
|
*/
|
|
238
238
|
textTransform: _propTypes.default.oneOf(["uppercase", "lowercase", "capitalize"]),
|
|
239
239
|
/**
|
|
240
|
-
* Default sort direction of columns with this schema. Can be overridden at the individual
|
|
240
|
+
* Default sort direction of columns with this schema. Can be overridden at the individual {@link EuiDataGridColumn} level
|
|
241
241
|
*/
|
|
242
242
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"])
|
|
243
243
|
}).isRequired).isRequired,
|
|
@@ -242,12 +242,12 @@ EuiDataGridInMemoryRenderer.propTypes = {
|
|
|
242
242
|
defaultSortDirection: _propTypes.default.oneOf(["asc", "desc"]),
|
|
243
243
|
/**
|
|
244
244
|
* A Schema to use for the column.
|
|
245
|
-
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own
|
|
245
|
+
* Built-in values are [`boolean`, `currency`, `datetime`, `numeric`, `json`] but can be expanded by defining your own {@link EuiDataGrid} `schemaDetectors` (for in-memory detection).
|
|
246
246
|
* In general, it is advised to pass in a value here when you are sure of the schema ahead of time, so that you don't need to rely on the automatic detection.
|
|
247
247
|
*/
|
|
248
248
|
schema: _propTypes.default.string,
|
|
249
249
|
/**
|
|
250
|
-
* Configuration of column actions. Set to false to disable or use
|
|
250
|
+
* Configuration of column actions. Set to false to disable or use {@link EuiDataGridColumnActions} to configure the actions displayed in the header cell of the column.
|
|
251
251
|
*/
|
|
252
252
|
actions: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.shape({
|
|
253
253
|
/**
|
|
@@ -296,7 +296,7 @@ EuiDataGridInMemoryRenderer.propTypes = {
|
|
|
296
296
|
*/
|
|
297
297
|
showToolTip: _propTypes.default.bool,
|
|
298
298
|
/**
|
|
299
|
-
* An object of
|
|
299
|
+
* An object of {@link EuiListGroupItemExtraAction} props.
|
|
300
300
|
* Adds an `EuiButtonIcon` to the right side of the item; `iconType` is required;
|
|
301
301
|
* pass `alwaysShow` if you don't want the default behavior of only showing on hover
|
|
302
302
|
*/
|
|
@@ -23,6 +23,7 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
|
|
|
23
23
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
24
|
* Side Public License, v 1.
|
|
25
25
|
*/
|
|
26
|
+
var ACTIONS_MENU_HEIGHT = 21;
|
|
26
27
|
/**
|
|
27
28
|
* The primary goal of this scroll logic is to ensure keyboard navigation works accessibly,
|
|
28
29
|
* but there are other scenarios where it applies (e.g. clicking partially-visible cells)
|
|
@@ -176,7 +177,8 @@ var useScrollCellIntoView = exports.useScrollCellIntoView = function useScrollCe
|
|
|
176
177
|
if (topHeightOutOfView > 0) {
|
|
177
178
|
// Note: This overrides the bottom side being out of bounds, as we want to prefer
|
|
178
179
|
// showing the top-left corner of items if a cell is larger than the grid container
|
|
179
|
-
|
|
180
|
+
// Additionally, add an offset for the actions menu
|
|
181
|
+
adjustedScrollTop = cellTopPos - headerRowHeight - ACTIONS_MENU_HEIGHT;
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
184
|
|
|
@@ -191,7 +191,8 @@ var EuiQuickSelect = exports.EuiQuickSelect = /*#__PURE__*/function (_Component)
|
|
|
191
191
|
default: "Previous time window"
|
|
192
192
|
}, function (previousLabel) {
|
|
193
193
|
return (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
194
|
-
content: previousLabel
|
|
194
|
+
content: previousLabel,
|
|
195
|
+
disableScreenReaderOutput: true
|
|
195
196
|
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
196
197
|
"aria-label": previousLabel,
|
|
197
198
|
iconType: "arrowLeft",
|
|
@@ -204,7 +205,8 @@ var EuiQuickSelect = exports.EuiQuickSelect = /*#__PURE__*/function (_Component)
|
|
|
204
205
|
default: "Next time window"
|
|
205
206
|
}, function (nextLabel) {
|
|
206
207
|
return (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
207
|
-
content: nextLabel
|
|
208
|
+
content: nextLabel,
|
|
209
|
+
disableScreenReaderOutput: true
|
|
208
210
|
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
209
211
|
"aria-label": nextLabel,
|
|
210
212
|
iconType: "arrowRight",
|
|
@@ -641,7 +641,7 @@ EuiSuperDatePickerInternal.propTypes = {
|
|
|
641
641
|
*/
|
|
642
642
|
isQuickSelectOnly: _propTypes.default.bool,
|
|
643
643
|
/**
|
|
644
|
-
* Props passed to the update button
|
|
644
|
+
* Props passed to the update button {@link EuiSuperUpdateButtonProps}
|
|
645
645
|
*/
|
|
646
646
|
updateButtonProps: _propTypes.default.shape({
|
|
647
647
|
/**
|
|
@@ -671,7 +671,7 @@ EuiSuperDatePickerInternal.propTypes = {
|
|
|
671
671
|
responsive: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired])
|
|
672
672
|
}),
|
|
673
673
|
/**
|
|
674
|
-
* Props passed to the quick select button
|
|
674
|
+
* Props passed to the quick select button {@link EuiQuickSelectButtonProps}
|
|
675
675
|
*/
|
|
676
676
|
quickSelectButtonProps: _propTypes.default.any,
|
|
677
677
|
/**
|
|
@@ -836,7 +836,7 @@ EuiSuperDatePicker.propTypes = {
|
|
|
836
836
|
*/
|
|
837
837
|
isQuickSelectOnly: _propTypes.default.bool,
|
|
838
838
|
/**
|
|
839
|
-
* Props passed to the update button
|
|
839
|
+
* Props passed to the update button {@link EuiSuperUpdateButtonProps}
|
|
840
840
|
*/
|
|
841
841
|
updateButtonProps: _propTypes.default.shape({
|
|
842
842
|
children: _propTypes.default.node,
|
|
@@ -846,7 +846,7 @@ EuiSuperDatePicker.propTypes = {
|
|
|
846
846
|
responsive: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired])
|
|
847
847
|
}),
|
|
848
848
|
/**
|
|
849
|
-
* Props passed to the quick select button
|
|
849
|
+
* Props passed to the quick select button {@link EuiQuickSelectButtonProps}
|
|
850
850
|
*/
|
|
851
851
|
quickSelectButtonProps: _propTypes.default.any,
|
|
852
852
|
/**
|