@elastic/eui 116.3.1 → 116.4.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/banner/banner.js +1 -2
- package/es/components/banner/banner.styles.js +1 -1
- package/es/components/basic_table/basic_table.js +35 -5
- package/es/components/basic_table/basic_table.styles.js +19 -1
- package/es/components/basic_table/in_memory_table.js +17 -0
- package/es/components/basic_table/index.js +2 -1
- package/es/components/basic_table/pagination_bar.js +19 -4
- package/es/components/basic_table/pagination_bar.styles.js +21 -0
- package/es/components/basic_table/panel.styles.js +14 -0
- package/es/components/basic_table/use_panel_props.js +28 -0
- package/es/components/date_picker/auto_refresh/refresh_interval.js +176 -229
- package/es/components/flyout/flyout.component.js +10 -6
- package/es/components/flyout/flyout_menu.js +122 -19
- package/es/components/flyout/flyout_menu.styles.js +2 -1
- package/es/components/flyout/manager/actions.js +20 -0
- package/es/components/flyout/manager/flyout_child.js +23 -1
- package/es/components/flyout/manager/flyout_managed.js +65 -19
- package/es/components/flyout/manager/hooks.js +1 -1
- package/es/components/flyout/manager/index.js +2 -2
- package/es/components/flyout/manager/reducer.js +32 -8
- package/es/components/flyout/manager/selectors.js +8 -2
- package/es/components/flyout/manager/store.js +35 -2
- package/es/components/flyout/use_flyout_menu.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_icons.js +95 -143
- package/es/components/notification_icon/assets/info_fill.js +34 -0
- package/es/components/notification_icon/assets/warning_static.js +40 -0
- package/es/components/notification_icon/notification_icon.js +87 -0
- package/es/components/notification_icon/notification_icon.styles.js +22 -0
- package/es/components/table/mobile/table_sort_mobile.js +64 -103
- package/es/components/toast/global_toast_list.js +132 -6
- package/es/components/toast/global_toast_list.styles.js +31 -7
- package/es/components/toast/toast.js +242 -47
- package/es/components/toast/toast.styles.js +35 -47
- package/es/components/toast/toast_action.js +34 -0
- package/es/components/toast/types.js +9 -0
- package/es/components/tool_tip/tool_tip.js +3 -3
- package/eui.d.ts +1203 -971
- package/i18ntokens.json +1582 -1546
- package/lib/components/banner/banner.js +1 -2
- package/lib/components/banner/banner.styles.js +1 -1
- package/lib/components/basic_table/basic_table.js +34 -4
- package/lib/components/basic_table/basic_table.styles.js +19 -1
- package/lib/components/basic_table/in_memory_table.js +17 -0
- package/lib/components/basic_table/index.js +8 -1
- package/lib/components/basic_table/pagination_bar.js +19 -4
- package/lib/components/basic_table/pagination_bar.styles.js +26 -0
- package/lib/components/basic_table/panel.styles.js +20 -0
- package/lib/components/basic_table/use_panel_props.js +33 -0
- package/lib/components/date_picker/auto_refresh/refresh_interval.js +175 -229
- package/lib/components/flyout/flyout.component.js +10 -6
- package/lib/components/flyout/flyout_menu.js +120 -19
- package/lib/components/flyout/flyout_menu.styles.js +2 -1
- package/lib/components/flyout/manager/actions.js +21 -1
- package/lib/components/flyout/manager/flyout_child.js +23 -1
- package/lib/components/flyout/manager/flyout_managed.js +41 -17
- package/lib/components/flyout/manager/hooks.js +6 -0
- package/lib/components/flyout/manager/index.js +12 -0
- package/lib/components/flyout/manager/reducer.js +31 -7
- package/lib/components/flyout/manager/selectors.js +9 -3
- package/lib/components/flyout/manager/store.js +34 -1
- package/lib/components/flyout/use_flyout_menu.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +95 -145
- package/lib/components/notification_icon/assets/info_fill.js +41 -0
- package/lib/components/notification_icon/assets/warning_static.js +47 -0
- package/lib/components/notification_icon/notification_icon.js +93 -0
- package/lib/components/notification_icon/notification_icon.styles.js +28 -0
- package/lib/components/notification_icon/svgs/info_fill.svg +3 -0
- package/lib/components/notification_icon/svgs/warning_static.svg +5 -0
- package/lib/components/table/mobile/table_sort_mobile.js +71 -108
- package/lib/components/toast/global_toast_list.js +132 -6
- package/lib/components/toast/global_toast_list.styles.js +31 -8
- package/lib/components/toast/toast.js +244 -47
- package/lib/components/toast/toast.styles.js +32 -45
- package/lib/components/toast/toast_action.js +40 -0
- package/lib/components/toast/types.js +15 -0
- package/lib/components/tool_tip/tool_tip.js +2 -2
- package/optimize/es/components/banner/banner.js +1 -2
- package/optimize/es/components/banner/banner.styles.js +1 -1
- package/optimize/es/components/basic_table/basic_table.js +18 -5
- package/optimize/es/components/basic_table/basic_table.styles.js +19 -1
- package/optimize/es/components/basic_table/index.js +2 -1
- package/optimize/es/components/basic_table/pagination_bar.js +19 -4
- package/optimize/es/components/basic_table/pagination_bar.styles.js +21 -0
- package/optimize/es/components/basic_table/panel.styles.js +14 -0
- package/optimize/es/components/basic_table/use_panel_props.js +28 -0
- package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +172 -196
- package/optimize/es/components/flyout/flyout.component.js +10 -6
- package/optimize/es/components/flyout/flyout_menu.js +99 -18
- package/optimize/es/components/flyout/flyout_menu.styles.js +2 -1
- package/optimize/es/components/flyout/manager/actions.js +20 -0
- package/optimize/es/components/flyout/manager/flyout_managed.js +42 -18
- package/optimize/es/components/flyout/manager/hooks.js +1 -1
- package/optimize/es/components/flyout/manager/index.js +2 -2
- package/optimize/es/components/flyout/manager/reducer.js +32 -8
- package/optimize/es/components/flyout/manager/selectors.js +8 -2
- package/optimize/es/components/flyout/manager/store.js +35 -2
- package/optimize/es/components/flyout/use_flyout_menu.js +2 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +96 -115
- package/optimize/es/components/notification_icon/assets/info_fill.js +33 -0
- package/optimize/es/components/notification_icon/assets/warning_static.js +39 -0
- package/optimize/es/components/notification_icon/notification_icon.js +77 -0
- package/optimize/es/components/notification_icon/notification_icon.styles.js +22 -0
- package/optimize/es/components/table/mobile/table_sort_mobile.js +59 -82
- package/optimize/es/components/toast/global_toast_list.js +31 -6
- package/optimize/es/components/toast/global_toast_list.styles.js +31 -7
- package/optimize/es/components/toast/toast.js +143 -47
- package/optimize/es/components/toast/toast.styles.js +35 -47
- package/optimize/es/components/toast/toast_action.js +33 -0
- package/optimize/es/components/toast/types.js +9 -0
- package/optimize/es/components/tool_tip/tool_tip.js +3 -3
- package/optimize/lib/components/banner/banner.js +1 -2
- package/optimize/lib/components/banner/banner.styles.js +1 -1
- package/optimize/lib/components/basic_table/basic_table.js +17 -4
- package/optimize/lib/components/basic_table/basic_table.styles.js +19 -1
- package/optimize/lib/components/basic_table/index.js +8 -1
- package/optimize/lib/components/basic_table/pagination_bar.js +19 -4
- package/optimize/lib/components/basic_table/pagination_bar.styles.js +26 -0
- package/optimize/lib/components/basic_table/panel.styles.js +20 -0
- package/optimize/lib/components/basic_table/use_panel_props.js +33 -0
- package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +170 -194
- package/optimize/lib/components/flyout/flyout.component.js +10 -6
- package/optimize/lib/components/flyout/flyout_menu.js +98 -18
- package/optimize/lib/components/flyout/flyout_menu.styles.js +2 -1
- package/optimize/lib/components/flyout/manager/actions.js +21 -1
- package/optimize/lib/components/flyout/manager/flyout_managed.js +41 -17
- package/optimize/lib/components/flyout/manager/hooks.js +6 -0
- package/optimize/lib/components/flyout/manager/index.js +12 -0
- package/optimize/lib/components/flyout/manager/reducer.js +31 -7
- package/optimize/lib/components/flyout/manager/selectors.js +9 -3
- package/optimize/lib/components/flyout/manager/store.js +34 -1
- package/optimize/lib/components/flyout/use_flyout_menu.js +2 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +96 -117
- package/optimize/lib/components/notification_icon/assets/info_fill.js +41 -0
- package/optimize/lib/components/notification_icon/assets/warning_static.js +47 -0
- package/optimize/lib/components/notification_icon/notification_icon.js +83 -0
- package/optimize/lib/components/notification_icon/notification_icon.styles.js +28 -0
- package/optimize/lib/components/notification_icon/svgs/info_fill.svg +3 -0
- package/optimize/lib/components/notification_icon/svgs/warning_static.svg +5 -0
- package/optimize/lib/components/table/mobile/table_sort_mobile.js +61 -83
- package/optimize/lib/components/toast/global_toast_list.js +31 -6
- package/optimize/lib/components/toast/global_toast_list.styles.js +30 -7
- package/optimize/lib/components/toast/toast.js +146 -47
- package/optimize/lib/components/toast/toast.styles.js +33 -45
- package/optimize/lib/components/toast/toast_action.js +39 -0
- package/optimize/lib/components/toast/types.js +15 -0
- package/optimize/lib/components/tool_tip/tool_tip.js +2 -2
- package/package.json +7 -5
- package/test-env/components/banner/banner.js +1 -2
- package/test-env/components/banner/banner.styles.js +1 -1
- package/test-env/components/basic_table/basic_table.js +34 -4
- package/test-env/components/basic_table/basic_table.styles.js +19 -1
- package/test-env/components/basic_table/in_memory_table.js +17 -0
- package/test-env/components/basic_table/index.js +8 -1
- package/test-env/components/basic_table/pagination_bar.js +19 -4
- package/test-env/components/basic_table/pagination_bar.styles.js +26 -0
- package/test-env/components/basic_table/panel.styles.js +20 -0
- package/test-env/components/basic_table/use_panel_props.js +33 -0
- package/test-env/components/date_picker/auto_refresh/refresh_interval.js +170 -220
- package/test-env/components/flyout/flyout.component.js +10 -6
- package/test-env/components/flyout/flyout_menu.js +121 -19
- package/test-env/components/flyout/flyout_menu.styles.js +2 -1
- package/test-env/components/flyout/manager/actions.js +21 -1
- package/test-env/components/flyout/manager/flyout_child.js +23 -1
- package/test-env/components/flyout/manager/flyout_managed.js +41 -17
- package/test-env/components/flyout/manager/hooks.js +6 -0
- package/test-env/components/flyout/manager/index.js +12 -0
- package/test-env/components/flyout/manager/reducer.js +31 -7
- package/test-env/components/flyout/manager/selectors.js +9 -3
- package/test-env/components/flyout/manager/store.js +34 -1
- package/test-env/components/flyout/use_flyout_menu.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +95 -139
- package/test-env/components/notification_icon/assets/info_fill.js +41 -0
- package/test-env/components/notification_icon/assets/warning_static.js +47 -0
- package/test-env/components/notification_icon/notification_icon.js +46 -0
- package/test-env/components/notification_icon/notification_icon.styles.js +28 -0
- package/test-env/components/table/mobile/table_sort_mobile.js +61 -98
- package/test-env/components/toast/global_toast_list.js +132 -6
- package/test-env/components/toast/global_toast_list.styles.js +30 -7
- package/test-env/components/toast/toast.js +242 -47
- package/test-env/components/toast/toast.styles.js +33 -45
- package/test-env/components/toast/toast_action.js +39 -0
- package/test-env/components/toast/types.js +15 -0
- package/test-env/components/tool_tip/tool_tip.js +2 -2
|
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline", "stickyScrollbar", "stickyHeader"],
|
|
11
|
+
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline", "stickyScrollbar", "stickyHeader", "panelled"],
|
|
12
12
|
_excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -40,7 +40,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
|
|
|
40
40
|
import { EuiI18n } from '../i18n';
|
|
41
41
|
import { EuiDelayRender } from '../delay_render';
|
|
42
42
|
import { htmlIdGenerator } from '../../services/accessibility';
|
|
43
|
-
import { euiBasicTableBodyLoading, safariLoadingWorkaround } from './basic_table.styles';
|
|
43
|
+
import { euiBasicTableBodyLoading, euiBasicTableWrapperPanelledStyles, safariLoadingWorkaround } from './basic_table.styles';
|
|
44
44
|
import { EuiToolTip } from '../tool_tip';
|
|
45
45
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
46
46
|
var dataTypesProfiles = {
|
|
@@ -360,6 +360,7 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
360
360
|
scrollableInline = _this$props2.scrollableInline,
|
|
361
361
|
stickyScrollbar = _this$props2.stickyScrollbar,
|
|
362
362
|
stickyHeader = _this$props2.stickyHeader,
|
|
363
|
+
panelled = _this$props2.panelled,
|
|
363
364
|
rest = _objectWithoutProperties(_this$props2, _excluded);
|
|
364
365
|
var classes = classNames('euiBasicTable', {
|
|
365
366
|
'euiBasicTable-loading': loading
|
|
@@ -381,8 +382,9 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
381
382
|
loading = _this$props3.loading,
|
|
382
383
|
scrollableInline = _this$props3.scrollableInline,
|
|
383
384
|
stickyScrollbar = _this$props3.stickyScrollbar,
|
|
384
|
-
stickyHeader = _this$props3.stickyHeader
|
|
385
|
-
|
|
385
|
+
stickyHeader = _this$props3.stickyHeader,
|
|
386
|
+
panelled = _this$props3.panelled;
|
|
387
|
+
var content = ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiTableHeaderMobile, {
|
|
386
388
|
responsiveBreakpoint: responsiveBreakpoint
|
|
387
389
|
}, this.renderSelectAll(true), this.renderTableMobileSort()), ___EmotionJSX(OverrideCopiedTabularContent, null, ___EmotionJSX(EuiTable, {
|
|
388
390
|
id: this.tableId,
|
|
@@ -395,6 +397,13 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
395
397
|
stickyHeader: stickyHeader,
|
|
396
398
|
css: loading && safariLoadingWorkaround
|
|
397
399
|
}, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
|
|
400
|
+
if (panelled) {
|
|
401
|
+
return ___EmotionJSX("div", {
|
|
402
|
+
css: panelled && euiBasicTableWrapperPanelledStyles(responsiveBreakpoint),
|
|
403
|
+
"data-test-subj": "euiBasicTablePanelledWrapper"
|
|
404
|
+
}, content);
|
|
405
|
+
}
|
|
406
|
+
return content;
|
|
398
407
|
}
|
|
399
408
|
}, {
|
|
400
409
|
key: "renderTableMobileSort",
|
|
@@ -951,7 +960,9 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
951
960
|
error = _this$props11.error,
|
|
952
961
|
pagination = _this$props11.pagination,
|
|
953
962
|
tableCaption = _this$props11.tableCaption,
|
|
954
|
-
onChange = _this$props11.onChange
|
|
963
|
+
onChange = _this$props11.onChange,
|
|
964
|
+
panelled = _this$props11.panelled,
|
|
965
|
+
responsiveBreakpoint = _this$props11.responsiveBreakpoint;
|
|
955
966
|
if (!error && pagination && pagination.totalItemCount > 0) {
|
|
956
967
|
if (!onChange) {
|
|
957
968
|
throw new Error("The Basic Table is configured with pagination but [onChange] is\n not configured. This callback must be implemented to handle pagination changes");
|
|
@@ -965,6 +976,8 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
965
976
|
}, function (tablePagination) {
|
|
966
977
|
return ___EmotionJSX(PaginationBar, {
|
|
967
978
|
pagination: pagination,
|
|
979
|
+
panelled: panelled,
|
|
980
|
+
responsiveBreakpoint: responsiveBreakpoint,
|
|
968
981
|
onPageSizeChange: _this7.onPageSizeChange.bind(_this7),
|
|
969
982
|
onPageChange: _this7.onPageChange.bind(_this7),
|
|
970
983
|
"aria-controls": _this7.tableId,
|
|
@@ -10,7 +10,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { css, keyframes } from '@emotion/react';
|
|
13
|
-
import { logicalCSS, euiCantAnimate, highContrastModeStyles, preventForcedColors } from '../../global_styling';
|
|
13
|
+
import { logicalCSS, euiCantAnimate, highContrastModeStyles, preventForcedColors, euiMinBreakpoint } from '../../global_styling';
|
|
14
|
+
import { EUI_BASIC_TABLE_PANEL_CLASS_NAME } from './use_panel_props';
|
|
14
15
|
var tableLoadingLine = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n ", "\n ", "\n }\n\n 20% {\n ", "\n ", "\n }\n\n 80% {\n ", "\n ", "\n }\n\n 100% {\n ", "\n ", "\n }\n"])), logicalCSS('left', 0), logicalCSS('width', 0), logicalCSS('left', 0), logicalCSS('width', '40%'), logicalCSS('left', '60%'), logicalCSS('width', '40%'), logicalCSS('left', '100%'), logicalCSS('width', 0));
|
|
15
16
|
export var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(euiThemeContext) {
|
|
16
17
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -19,6 +20,23 @@ export var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(euiTheme
|
|
|
19
20
|
}), ";}};label:euiBasicTableBodyLoading;");
|
|
20
21
|
};
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export var euiBasicTableWrapperPanelledStyles = function euiBasicTableWrapperPanelledStyles(responsiveBreakpoint) {
|
|
27
|
+
return function (theme) {
|
|
28
|
+
var euiTheme = theme.euiTheme;
|
|
29
|
+
var styles = /*#__PURE__*/css("border:", euiTheme.border.thin, ";border-block-end-width:0;padding-block-start:", euiTheme.border.width.thin, ";border-radius:", euiTheme.border.radius.medium, ";.euiTable{border-radius:", euiTheme.border.radius.medium, ";}.", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "+.euiBasicTable &{border-start-start-radius:0;border-start-end-radius:0;.euiTable{border-start-start-radius:0;border-start-end-radius:0;}}&:not(:last-child),&:has(+ .", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "){border-end-start-radius:0;border-end-end-radius:0;.euiTable{border-end-start-radius:0;border-end-end-radius:0;}};label:styles;");
|
|
30
|
+
if (responsiveBreakpoint === true) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
if (!responsiveBreakpoint) {
|
|
34
|
+
return styles;
|
|
35
|
+
}
|
|
36
|
+
return /*#__PURE__*/css(euiMinBreakpoint(theme, responsiveBreakpoint), "{", styles, ";};label:euiBasicTableWrapperPanelledStyles;");
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
22
40
|
// Fix to make the loading indicator position correctly in Safari
|
|
23
41
|
// For whatever annoying reason, Safari doesn't respect `position: relative;`
|
|
24
42
|
// on `tbody` without `position: relative` on the parent `table`
|
|
@@ -7,11 +7,24 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { useEffect } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
11
11
|
import { EuiTablePagination, useEuiTablePaginationDefaults } from '../table/table_pagination';
|
|
12
|
+
import { useIsEuiTableResponsive } from '../table/mobile/responsive_context';
|
|
13
|
+
import { euiBasicTablePaginationBarStyles } from './pagination_bar.styles';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
12
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
|
+
/**
|
|
20
|
+
* An internal utility component that renders EuiTablePagination with
|
|
21
|
+
* proper configuration and handles the `panelled` styles.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
13
24
|
export var PaginationBar = function PaginationBar(_ref) {
|
|
14
25
|
var pagination = _ref.pagination,
|
|
26
|
+
panelled = _ref.panelled,
|
|
27
|
+
responsiveBreakpoint = _ref.responsiveBreakpoint,
|
|
15
28
|
onPageSizeChange = _ref.onPageSizeChange,
|
|
16
29
|
onPageChange = _ref.onPageChange,
|
|
17
30
|
ariaControls = _ref['aria-controls'],
|
|
@@ -26,14 +39,16 @@ export var PaginationBar = function PaginationBar(_ref) {
|
|
|
26
39
|
_pagination$showPerPa = pagination.showPerPageOptions,
|
|
27
40
|
showPerPageOptions = _pagination$showPerPa === void 0 ? defaults.showPerPageOptions : _pagination$showPerPa;
|
|
28
41
|
var pageCount = pageSize ? Math.ceil(totalItemCount / pageSize) : 1;
|
|
42
|
+
var styles = useEuiMemoizedStyles(euiBasicTablePaginationBarStyles);
|
|
43
|
+
var isResponsive = useIsEuiTableResponsive(responsiveBreakpoint);
|
|
29
44
|
useEffect(function () {
|
|
30
45
|
if (pageCount < pageIndex + 1) {
|
|
31
46
|
onPageChange === null || onPageChange === void 0 || onPageChange(pageCount - 1);
|
|
32
47
|
}
|
|
33
48
|
}, [pageCount, onPageChange, pageIndex]);
|
|
34
|
-
return ___EmotionJSX("div",
|
|
35
|
-
|
|
36
|
-
}
|
|
49
|
+
return ___EmotionJSX("div", {
|
|
50
|
+
css: [styles.root, !isResponsive && panelled && styles.panelled, ";label:PaginationBar;"]
|
|
51
|
+
}, ___EmotionJSX(EuiTablePagination, {
|
|
37
52
|
activePage: pageIndex,
|
|
38
53
|
showPerPageOptions: showPerPageOptions,
|
|
39
54
|
itemsPerPage: pageSize,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { logicalShorthandCSS } from '../../global_styling';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export var euiBasicTablePaginationBarStyles = function euiBasicTablePaginationBarStyles(theme) {
|
|
16
|
+
var euiTheme = theme.euiTheme;
|
|
17
|
+
return {
|
|
18
|
+
root: /*#__PURE__*/css(logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.s)), ";;label:root;"),
|
|
19
|
+
panelled: /*#__PURE__*/css("background:", euiTheme.colors.backgroundBaseSubdued, ";border:", euiTheme.border.thin, ";border-block-start-width:0;", logicalShorthandCSS('border-radius', "0 0 ".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium)), ";;label:panelled;")
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { logicalShorthandCSS } from '../../global_styling';
|
|
11
|
+
export var euiBasicTablePanelStyles = function euiBasicTablePanelStyles(_ref) {
|
|
12
|
+
var euiTheme = _ref.euiTheme;
|
|
13
|
+
return /*#__PURE__*/css("background-color:", euiTheme.colors.backgroundBaseSubdued, ";border:", euiTheme.border.thin, ";border-block-end-width:0;", logicalShorthandCSS('border-radius', "".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium, " 0 0")), "&+&{border-start-start-radius:0;border-start-end-radius:0;};label:euiBasicTablePanelStyles;");
|
|
14
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
10
|
+
import { euiBasicTablePanelStyles } from './panel.styles';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export var EUI_BASIC_TABLE_PANEL_CLASS_NAME = 'euiBasicTablePanel';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A utility hook that returns props needed to be passed to element(s) being
|
|
19
|
+
* a part of the paneled table look and feel (e.g., a toolbar above the table).
|
|
20
|
+
* @beta
|
|
21
|
+
*/
|
|
22
|
+
export var useEuiBasicTablePanelProps = function useEuiBasicTablePanelProps() {
|
|
23
|
+
var css = useEuiMemoizedStyles(euiBasicTablePanelStyles);
|
|
24
|
+
return {
|
|
25
|
+
css: css,
|
|
26
|
+
className: EUI_BASIC_TABLE_PANEL_CLASS_NAME
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
8
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
5
|
/*
|
|
13
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
7
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -17,13 +10,13 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
17
10
|
* Side Public License, v 1.
|
|
18
11
|
*/
|
|
19
12
|
|
|
20
|
-
import React, {
|
|
21
|
-
import {
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { useGeneratedHtmlId } from '../../../services';
|
|
22
15
|
import { EuiI18n } from '../../i18n';
|
|
23
16
|
import { EuiFlexGroup, EuiFlexItem } from '../../flex';
|
|
24
17
|
import { EuiSelect, EuiFieldNumber, EuiFormLabel, EuiSwitch } from '../../form';
|
|
25
18
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
26
|
-
import {
|
|
19
|
+
import { useI18nTimeOptions } from '../super_date_picker/time_options';
|
|
27
20
|
import { EuiQuickSelectPanel } from '../super_date_picker/quick_select_popover/quick_select_panel';
|
|
28
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
22
|
var MILLISECONDS_IN_SECOND = 1000;
|
|
@@ -67,198 +60,181 @@ var getMinInterval = function getMinInterval(minInterval, unit) {
|
|
|
67
60
|
value = _fromMilliseconds.value;
|
|
68
61
|
return Math.floor(value || 0);
|
|
69
62
|
};
|
|
70
|
-
export var EuiRefreshInterval =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
export var EuiRefreshInterval = function EuiRefreshInterval(_ref) {
|
|
64
|
+
var _ref$isPaused = _ref.isPaused,
|
|
65
|
+
isPaused = _ref$isPaused === void 0 ? true : _ref$isPaused,
|
|
66
|
+
_ref$refreshInterval = _ref.refreshInterval,
|
|
67
|
+
refreshInterval = _ref$refreshInterval === void 0 ? 1000 : _ref$refreshInterval,
|
|
68
|
+
_ref$minInterval = _ref.minInterval,
|
|
69
|
+
minInterval = _ref$minInterval === void 0 ? 0 : _ref$minInterval,
|
|
70
|
+
intervalUnits = _ref.intervalUnits,
|
|
71
|
+
onRefreshChange = _ref.onRefreshChange;
|
|
72
|
+
var _useState = useState(function () {
|
|
73
|
+
return _objectSpread(_objectSpread({}, fromMilliseconds(refreshInterval || 0, intervalUnits)), {}, {
|
|
74
|
+
min: getMinInterval(minInterval, intervalUnits)
|
|
75
|
+
});
|
|
76
|
+
}),
|
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
78
|
+
state = _useState2[0],
|
|
79
|
+
setState = _useState2[1];
|
|
80
|
+
var refreshSelectionId = useGeneratedHtmlId({
|
|
81
|
+
prefix: 'euiRefreshInterval'
|
|
82
|
+
});
|
|
83
|
+
var _useI18nTimeOptions = useI18nTimeOptions(),
|
|
84
|
+
refreshUnitsOptions = _useI18nTimeOptions.refreshUnitsOptions;
|
|
85
|
+
var applyRefreshInterval = function applyRefreshInterval(nextState) {
|
|
86
|
+
var units = nextState.units,
|
|
87
|
+
value = nextState.value;
|
|
88
|
+
if (value === '') {
|
|
89
|
+
return;
|
|
76
90
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
_this.setState({
|
|
86
|
-
value: isNaN(sanitizedValue) ? '' : sanitizedValue
|
|
87
|
-
}, _this.applyRefreshInterval);
|
|
88
|
-
});
|
|
89
|
-
_defineProperty(_this, "onUnitsChange", function (event) {
|
|
90
|
-
var units = event.target.value;
|
|
91
|
-
_this.setState({
|
|
92
|
-
units: units,
|
|
93
|
-
min: getMinInterval(_this.props.minInterval, units)
|
|
94
|
-
}, _this.applyRefreshInterval);
|
|
95
|
-
});
|
|
96
|
-
_defineProperty(_this, "startRefresh", function () {
|
|
97
|
-
var onRefreshChange = _this.props.onRefreshChange;
|
|
98
|
-
var _this$state = _this.state,
|
|
99
|
-
value = _this$state.value,
|
|
100
|
-
units = _this$state.units;
|
|
101
|
-
if (value !== '' && value > 0 && onRefreshChange !== undefined) {
|
|
102
|
-
onRefreshChange({
|
|
103
|
-
refreshInterval: toMilliseconds(units, value),
|
|
104
|
-
intervalUnits: units,
|
|
105
|
-
isPaused: false
|
|
106
|
-
});
|
|
107
|
-
}
|
|
91
|
+
if (!onRefreshChange) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
var refreshIntervalMs = Math.max(toMilliseconds(units, value), minInterval || 0);
|
|
95
|
+
onRefreshChange({
|
|
96
|
+
refreshInterval: refreshIntervalMs,
|
|
97
|
+
intervalUnits: units,
|
|
98
|
+
isPaused: refreshIntervalMs <= 0 ? true : !!isPaused
|
|
108
99
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
};
|
|
101
|
+
var onValueChange = function onValueChange(event) {
|
|
102
|
+
var sanitizedValue = parseFloat(event.target.value);
|
|
103
|
+
var newValue = isNaN(sanitizedValue) ? '' : sanitizedValue;
|
|
104
|
+
var nextState = _objectSpread(_objectSpread({}, state), {}, {
|
|
105
|
+
value: newValue
|
|
114
106
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (value === '') {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (!onRefreshChange) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
var refreshInterval = Math.max(toMilliseconds(units, value), minInterval || 0);
|
|
130
|
-
onRefreshChange({
|
|
131
|
-
refreshInterval: refreshInterval,
|
|
132
|
-
intervalUnits: units,
|
|
133
|
-
isPaused: refreshInterval <= 0 ? true : !!isPaused
|
|
134
|
-
});
|
|
107
|
+
setState(nextState);
|
|
108
|
+
applyRefreshInterval(nextState);
|
|
109
|
+
};
|
|
110
|
+
var onUnitsChange = function onUnitsChange(event) {
|
|
111
|
+
var units = event.target.value;
|
|
112
|
+
var nextState = _objectSpread(_objectSpread({}, state), {}, {
|
|
113
|
+
units: units,
|
|
114
|
+
min: getMinInterval(minInterval, units)
|
|
135
115
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if (!onRefreshChange || value === '') {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
116
|
+
setState(nextState);
|
|
117
|
+
applyRefreshInterval(nextState);
|
|
118
|
+
};
|
|
119
|
+
var startRefresh = function startRefresh() {
|
|
120
|
+
var value = state.value,
|
|
121
|
+
units = state.units;
|
|
122
|
+
if (value !== '' && value > 0 && onRefreshChange !== undefined) {
|
|
146
123
|
onRefreshChange({
|
|
147
124
|
refreshInterval: toMilliseconds(units, value),
|
|
148
125
|
intervalUnits: units,
|
|
149
|
-
isPaused:
|
|
126
|
+
isPaused: false
|
|
150
127
|
});
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var handleKeyDown = function handleKeyDown(_ref2) {
|
|
131
|
+
var key = _ref2.key;
|
|
132
|
+
if (key === 'Enter') {
|
|
133
|
+
startRefresh();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var toggleRefresh = function toggleRefresh() {
|
|
137
|
+
if (!onRefreshChange || state.value === '') {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
var units = state.units,
|
|
141
|
+
value = state.value;
|
|
142
|
+
onRefreshChange({
|
|
143
|
+
refreshInterval: toMilliseconds(units, value),
|
|
144
|
+
intervalUnits: units,
|
|
145
|
+
isPaused: !isPaused
|
|
151
146
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
return value === units;
|
|
160
|
-
});
|
|
161
|
-
var optionText = options ? options.text : '';
|
|
162
|
-
var fullDescription = isPaused ? ___EmotionJSX(EuiI18n, {
|
|
163
|
-
token: "euiRefreshInterval.fullDescriptionOff",
|
|
164
|
-
default: "Refresh is off, interval set to {optionValue} {optionText}.",
|
|
165
|
-
values: {
|
|
166
|
-
optionValue: value,
|
|
167
|
-
optionText: optionText
|
|
168
|
-
}
|
|
169
|
-
}) : ___EmotionJSX(EuiI18n, {
|
|
170
|
-
token: "euiRefreshInterval.fullDescriptionOn",
|
|
171
|
-
default: "Refresh is on, interval set to {optionValue} {optionText}.",
|
|
172
|
-
values: {
|
|
173
|
-
optionValue: value,
|
|
174
|
-
optionText: optionText
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
return ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
178
|
-
id: _this.refreshSelectionId
|
|
179
|
-
}, fullDescription));
|
|
147
|
+
};
|
|
148
|
+
var renderScreenReaderText = function renderScreenReaderText() {
|
|
149
|
+
var value = state.value,
|
|
150
|
+
units = state.units;
|
|
151
|
+
var options = refreshUnitsOptions.find(function (_ref3) {
|
|
152
|
+
var value = _ref3.value;
|
|
153
|
+
return value === units;
|
|
180
154
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
});
|
|
155
|
+
var optionText = options ? options.text : '';
|
|
156
|
+
var fullDescription = isPaused ? ___EmotionJSX(EuiI18n, {
|
|
157
|
+
token: "euiRefreshInterval.fullDescriptionOff",
|
|
158
|
+
default: "Refresh is off, interval set to {optionValue} {optionText}.",
|
|
159
|
+
values: {
|
|
160
|
+
optionValue: value,
|
|
161
|
+
optionText: optionText
|
|
162
|
+
}
|
|
163
|
+
}) : ___EmotionJSX(EuiI18n, {
|
|
164
|
+
token: "euiRefreshInterval.fullDescriptionOn",
|
|
165
|
+
default: "Refresh is on, interval set to {optionValue} {optionText}.",
|
|
166
|
+
values: {
|
|
167
|
+
optionValue: value,
|
|
168
|
+
optionText: optionText
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
172
|
+
id: refreshSelectionId
|
|
173
|
+
}, fullDescription));
|
|
174
|
+
};
|
|
175
|
+
var value = state.value,
|
|
176
|
+
units = state.units,
|
|
177
|
+
min = state.min;
|
|
178
|
+
return ___EmotionJSX(EuiI18n, {
|
|
179
|
+
tokens: ['euiRefreshInterval.toggleLabel', 'euiRefreshInterval.toggleAriaLabel', 'euiRefreshInterval.valueAriaLabel', 'euiRefreshInterval.unitsAriaLabel'],
|
|
180
|
+
defaults: ['Refresh every', 'Toggle refresh', 'Refresh interval value', 'Refresh interval units']
|
|
181
|
+
}, function (_ref4) {
|
|
182
|
+
var _ref5 = _slicedToArray(_ref4, 4),
|
|
183
|
+
toggleLabel = _ref5[0],
|
|
184
|
+
toggleAriaLabel = _ref5[1],
|
|
185
|
+
valueAriaLabel = _ref5[2],
|
|
186
|
+
unitsAriaLabel = _ref5[3];
|
|
187
|
+
return ___EmotionJSX(EuiQuickSelectPanel, null, ___EmotionJSX(EuiFlexGroup, {
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
gutterSize: "s",
|
|
190
|
+
responsive: false,
|
|
191
|
+
wrap: true
|
|
192
|
+
}, ___EmotionJSX(EuiFlexItem, {
|
|
193
|
+
grow: false
|
|
194
|
+
}, ___EmotionJSX(EuiSwitch, {
|
|
195
|
+
"data-test-subj": "superDatePickerToggleRefreshButton",
|
|
196
|
+
checked: !isPaused,
|
|
197
|
+
onChange: toggleRefresh,
|
|
198
|
+
compressed: true
|
|
199
|
+
// The IDs attached to this visible label are unused - we override with our own aria-label
|
|
200
|
+
,
|
|
201
|
+
label: ___EmotionJSX(EuiFormLabel, null, toggleLabel),
|
|
202
|
+
"aria-label": toggleAriaLabel,
|
|
203
|
+
"aria-labelledby": undefined,
|
|
204
|
+
"aria-describedby": refreshSelectionId
|
|
205
|
+
})), ___EmotionJSX(EuiFlexItem, {
|
|
206
|
+
style: {
|
|
207
|
+
minWidth: 60
|
|
208
|
+
}
|
|
209
|
+
}, ___EmotionJSX(EuiFieldNumber, {
|
|
210
|
+
compressed: true,
|
|
211
|
+
fullWidth: true,
|
|
212
|
+
value: value,
|
|
213
|
+
min: min,
|
|
214
|
+
onChange: onValueChange,
|
|
215
|
+
onKeyDown: handleKeyDown,
|
|
216
|
+
isInvalid: !isPaused && (value === '' || value <= 0),
|
|
217
|
+
disabled: isPaused,
|
|
218
|
+
"aria-label": valueAriaLabel,
|
|
219
|
+
"aria-describedby": refreshSelectionId,
|
|
220
|
+
"data-test-subj": "superDatePickerRefreshIntervalInput"
|
|
221
|
+
})), ___EmotionJSX(EuiFlexItem, {
|
|
222
|
+
style: {
|
|
223
|
+
minWidth: 100
|
|
224
|
+
},
|
|
225
|
+
grow: 2
|
|
226
|
+
}, ___EmotionJSX(EuiSelect, {
|
|
227
|
+
compressed: true,
|
|
228
|
+
fullWidth: true,
|
|
229
|
+
"aria-label": unitsAriaLabel,
|
|
230
|
+
"aria-describedby": refreshSelectionId,
|
|
231
|
+
value: units,
|
|
232
|
+
disabled: isPaused,
|
|
233
|
+
options: refreshUnitsOptions,
|
|
234
|
+
onChange: onUnitsChange,
|
|
235
|
+
onKeyDown: handleKeyDown,
|
|
236
|
+
"data-test-subj": "superDatePickerRefreshIntervalUnitsSelect"
|
|
237
|
+
}))), renderScreenReaderText());
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
EuiRefreshInterval.displayName = 'EuiRefreshInterval';
|