@elastic/eui 109.2.0 → 110.0.0-snapshot.1764684698664
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/in_memory_table.js +86 -233
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/es/components/filter_group/filter_group.a11y.js +1 -1
- package/es/components/header/header_logo/header_logo.js +6 -1
- package/es/components/header/header_logo/header_logo.styles.js +1 -1
- package/es/components/icon/icon.styles.js +4 -4
- package/es/components/page/page.js +11 -3
- package/es/components/page/page.styles.js +1 -2
- package/es/components/page/page_header/page_header.js +11 -3
- package/es/components/page_template/outer/page_outer.js +2 -3
- package/es/components/page_template/outer/page_outer.styles.js +29 -35
- package/es/components/page_template/page_template.js +8 -2
- package/es/components/search_bar/search_bar.js +4 -4
- package/es/components/selectable/selectable.js +7 -2
- package/es/services/string/to_initials.js +26 -4
- package/eui.d.ts +38 -21
- package/lib/components/basic_table/in_memory_table.js +85 -234
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +6 -1
- package/lib/components/header/header_logo/header_logo.styles.js +1 -1
- package/lib/components/icon/icon.styles.js +4 -4
- package/lib/components/page/page.js +10 -2
- package/lib/components/page/page.styles.js +1 -2
- package/lib/components/page/page_header/page_header.js +10 -2
- package/lib/components/page_template/outer/page_outer.js +1 -2
- package/lib/components/page_template/outer/page_outer.styles.js +29 -35
- package/lib/components/page_template/page_template.js +8 -2
- package/lib/components/search_bar/search_bar.js +4 -4
- package/lib/components/selectable/selectable.js +7 -2
- package/lib/services/string/to_initials.js +26 -4
- package/optimize/es/components/basic_table/in_memory_table.js +73 -46
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/optimize/es/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/es/components/header/header_logo/header_logo.js +6 -1
- package/optimize/es/components/header/header_logo/header_logo.styles.js +1 -1
- package/optimize/es/components/icon/icon.styles.js +4 -4
- package/optimize/es/components/page/page.js +6 -3
- package/optimize/es/components/page/page.styles.js +1 -2
- package/optimize/es/components/page/page_header/page_header.js +6 -3
- package/optimize/es/components/page_template/outer/page_outer.js +2 -3
- package/optimize/es/components/page_template/outer/page_outer.styles.js +29 -35
- package/optimize/es/components/page_template/page_template.js +2 -1
- package/optimize/es/components/selectable/selectable.js +7 -2
- package/optimize/es/services/string/to_initials.js +26 -4
- package/optimize/lib/components/basic_table/in_memory_table.js +72 -47
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/optimize/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/lib/components/header/header_logo/header_logo.js +6 -1
- package/optimize/lib/components/header/header_logo/header_logo.styles.js +1 -1
- package/optimize/lib/components/icon/icon.styles.js +4 -4
- package/optimize/lib/components/page/page.js +5 -2
- package/optimize/lib/components/page/page.styles.js +1 -2
- package/optimize/lib/components/page/page_header/page_header.js +5 -2
- package/optimize/lib/components/page_template/outer/page_outer.js +1 -2
- package/optimize/lib/components/page_template/outer/page_outer.styles.js +29 -35
- package/optimize/lib/components/page_template/page_template.js +2 -1
- package/optimize/lib/components/selectable/selectable.js +7 -2
- package/optimize/lib/services/string/to_initials.js +26 -4
- package/package.json +3 -2
- package/test-env/components/basic_table/in_memory_table.js +85 -234
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/test-env/components/filter_group/filter_group.a11y.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +6 -1
- package/test-env/components/header/header_logo/header_logo.styles.js +1 -1
- package/test-env/components/icon/icon.styles.js +4 -4
- package/test-env/components/page/page.js +10 -2
- package/test-env/components/page/page.styles.js +1 -2
- package/test-env/components/page/page_header/page_header.js +10 -2
- package/test-env/components/page_template/outer/page_outer.js +1 -2
- package/test-env/components/page_template/outer/page_outer.styles.js +29 -35
- package/test-env/components/page_template/page_template.js +8 -2
- package/test-env/components/search_bar/search_bar.js +4 -4
- package/test-env/components/selectable/selectable.js +7 -2
- package/test-env/services/string/to_initials.js +26 -4
|
@@ -12,7 +12,7 @@ var _global_styling = require("../../global_styling");
|
|
|
12
12
|
var _page = require("./page.styles");
|
|
13
13
|
var _services = require("../../services");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction"];
|
|
15
|
+
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction", "color"];
|
|
16
16
|
/*
|
|
17
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
18
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -35,13 +35,16 @@ var EuiPage = exports.EuiPage = function EuiPage(_ref) {
|
|
|
35
35
|
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
36
36
|
_ref$direction = _ref.direction,
|
|
37
37
|
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
38
|
+
_ref$color = _ref.color,
|
|
39
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
38
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
41
|
// Set max-width as a style prop
|
|
40
42
|
var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, rest === null || rest === void 0 ? void 0 : rest.style);
|
|
41
43
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
42
44
|
var styles = (0, _page.euiPageStyles)(euiTheme);
|
|
43
45
|
var padding = (0, _global_styling.useEuiPaddingCSS)()[paddingSize];
|
|
44
|
-
var
|
|
46
|
+
var backgroundColor = (0, _global_styling.useEuiBackgroundColorCSS)()[color];
|
|
47
|
+
var stylesCSS = [styles.euiPage, styles[direction], backgroundColor, grow && styles.grow, padding, restrictWidth && styles.restrictWidth];
|
|
45
48
|
var classes = (0, _classnames.default)('euiPage', className);
|
|
46
49
|
return (0, _react2.jsx)("div", _extends({
|
|
47
50
|
css: stylesCSS,
|
|
@@ -66,6 +69,11 @@ EuiPage.propTypes = {
|
|
|
66
69
|
* Flip to `column` when not including a sidebar.
|
|
67
70
|
*/
|
|
68
71
|
direction: _propTypes.default.oneOf(["row", "column"]),
|
|
72
|
+
/**
|
|
73
|
+
* Defines the page background color.
|
|
74
|
+
* @default 'transparent'
|
|
75
|
+
*/
|
|
76
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
69
77
|
className: _propTypes.default.string,
|
|
70
78
|
"aria-label": _propTypes.default.string,
|
|
71
79
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -30,9 +30,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
30
30
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
31
|
};
|
|
32
32
|
var euiPageStyles = exports.euiPageStyles = function euiPageStyles(euiThemeContext) {
|
|
33
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
34
33
|
return {
|
|
35
|
-
euiPage: /*#__PURE__*/(0, _react.css)("display:flex;
|
|
34
|
+
euiPage: /*#__PURE__*/(0, _react.css)("display:flex;flex-shrink:0;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:euiPage;"),
|
|
36
35
|
// Grow
|
|
37
36
|
grow: _ref2,
|
|
38
37
|
// Direction
|
|
@@ -12,7 +12,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
12
12
|
var _page_header_content = require("./page_header_content");
|
|
13
13
|
var _page_header = require("./page_header.styles");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
15
|
+
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "color", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
16
16
|
/*
|
|
17
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
18
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -31,6 +31,8 @@ var EuiPageHeader = exports.EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
31
31
|
_ref$paddingSize = _ref.paddingSize,
|
|
32
32
|
paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
|
|
33
33
|
bottomBorder = _ref.bottomBorder,
|
|
34
|
+
_ref$color = _ref.color,
|
|
35
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
34
36
|
alignItems = _ref.alignItems,
|
|
35
37
|
_ref$responsive = _ref.responsive,
|
|
36
38
|
responsive = _ref$responsive === void 0 ? true : _ref$responsive,
|
|
@@ -50,7 +52,8 @@ var EuiPageHeader = exports.EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
50
52
|
var useTheme = (0, _services.useEuiTheme)();
|
|
51
53
|
var styles = (0, _page_header.euiPageHeaderStyles)(useTheme);
|
|
52
54
|
var inlinePadding = (0, _global_styling.useEuiPaddingCSS)('horizontal');
|
|
53
|
-
var
|
|
55
|
+
var backgroundColor = (0, _global_styling.useEuiBackgroundColorCSS)()[color];
|
|
56
|
+
var cssStyles = [styles.euiPageHeader, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, backgroundColor];
|
|
54
57
|
var classes = (0, _classnames.default)('euiPageHeader', className);
|
|
55
58
|
var contentProps = {
|
|
56
59
|
restrictWidth: restrictWidth,
|
|
@@ -82,6 +85,11 @@ EuiPageHeader.propTypes = {
|
|
|
82
85
|
* Adjust the overall padding.
|
|
83
86
|
*/
|
|
84
87
|
paddingSize: _propTypes.default.any,
|
|
88
|
+
/**
|
|
89
|
+
* Define the header background color
|
|
90
|
+
* @default 'transparent'
|
|
91
|
+
*/
|
|
92
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
85
93
|
className: _propTypes.default.string,
|
|
86
94
|
"aria-label": _propTypes.default.string,
|
|
87
95
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -31,8 +31,7 @@ var _EuiPageOuter = exports._EuiPageOuter = function _EuiPageOuter(_ref) {
|
|
|
31
31
|
_ref$responsive = _ref.responsive,
|
|
32
32
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
33
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var
|
|
35
|
-
var styles = (0, _page_outer.euiPageOuterStyles)(themeContext);
|
|
34
|
+
var styles = _page_outer.euiPageOuterStyles;
|
|
36
35
|
var isResponding = (0, _services.useIsWithinBreakpoints)(responsive);
|
|
37
36
|
var cssStyles = [styles.euiPageOuter, styles[isResponding ? 'column' : direction], grow && styles.grow];
|
|
38
37
|
return (0, _react2.jsx)("div", _extends({
|
|
@@ -13,39 +13,33 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
13
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// Grow
|
|
46
|
-
grow: _ref3,
|
|
47
|
-
// Direction
|
|
48
|
-
column: _ref2,
|
|
49
|
-
row: _ref
|
|
50
|
-
};
|
|
16
|
+
var euiPageOuterStyles = exports.euiPageOuterStyles = {
|
|
17
|
+
euiPageOuter: /*#__PURE__*/(0, _react.css)("display:flex;flex-shrink:0;", (0, _global_styling.logicalCSS)('max-width', '100%' // Ensures Firefox doesn't expand width beyond bounds
|
|
18
|
+
), ";;label:euiPageOuter;"),
|
|
19
|
+
// Grow
|
|
20
|
+
grow: process.env.NODE_ENV === "production" ? {
|
|
21
|
+
name: "122lw0e-grow",
|
|
22
|
+
styles: "flex-grow:1;label:grow;"
|
|
23
|
+
} : {
|
|
24
|
+
name: "122lw0e-grow",
|
|
25
|
+
styles: "flex-grow:1;label:grow;",
|
|
26
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
+
},
|
|
28
|
+
// Direction
|
|
29
|
+
column: process.env.NODE_ENV === "production" ? {
|
|
30
|
+
name: "ll8kmq-column",
|
|
31
|
+
styles: "flex-direction:column;label:column;"
|
|
32
|
+
} : {
|
|
33
|
+
name: "ll8kmq-column",
|
|
34
|
+
styles: "flex-direction:column;label:column;",
|
|
35
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
36
|
+
},
|
|
37
|
+
row: process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "15mvjmo-row",
|
|
39
|
+
styles: "flex-direction:row;label:row;"
|
|
40
|
+
} : {
|
|
41
|
+
name: "15mvjmo-row",
|
|
42
|
+
styles: "flex-direction:row;label:row;",
|
|
43
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
|
+
}
|
|
51
45
|
};
|
|
@@ -116,7 +116,8 @@ var _EuiPageTemplate = exports._EuiPageTemplate = function _EuiPageTemplate(_ref
|
|
|
116
116
|
header: {
|
|
117
117
|
restrictWidth: restrictWidth,
|
|
118
118
|
paddingSize: paddingSize,
|
|
119
|
-
bottomBorder: headerBottomBorder
|
|
119
|
+
bottomBorder: headerBottomBorder,
|
|
120
|
+
color: panelled === false ? 'transparent' : 'plain'
|
|
120
121
|
},
|
|
121
122
|
section: {
|
|
122
123
|
restrictWidth: restrictWidth,
|
|
@@ -173,7 +174,7 @@ _EuiPageTemplate.propTypes = {
|
|
|
173
174
|
"data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
174
175
|
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
|
|
175
176
|
/**
|
|
176
|
-
* Adds a
|
|
177
|
+
* Adds a background and shadow to define the area.
|
|
177
178
|
*/
|
|
178
179
|
panelled: _propTypes.default.bool,
|
|
179
180
|
/**
|
|
@@ -321,6 +322,11 @@ _EuiPageHeader.propTypes = {
|
|
|
321
322
|
* Adjust the overall padding.
|
|
322
323
|
*/
|
|
323
324
|
paddingSize: _propTypes.default.any,
|
|
325
|
+
/**
|
|
326
|
+
* Define the header background color
|
|
327
|
+
* @default 'transparent'
|
|
328
|
+
*/
|
|
329
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
324
330
|
className: _propTypes.default.string,
|
|
325
331
|
"aria-label": _propTypes.default.string,
|
|
326
332
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -260,15 +260,15 @@ _defineProperty(EuiSearchBar, "Query", _query2.Query);
|
|
|
260
260
|
EuiSearchBar.propTypes = {
|
|
261
261
|
onChange: _propTypes.default.func,
|
|
262
262
|
/**
|
|
263
|
-
The initial query the bar will hold when first mounted
|
|
263
|
+
* The initial query the bar will hold when first mounted
|
|
264
264
|
*/
|
|
265
265
|
defaultQuery: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
|
|
266
266
|
/**
|
|
267
|
-
If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
267
|
+
* If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
268
268
|
*/
|
|
269
269
|
query: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
|
|
270
270
|
/**
|
|
271
|
-
Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
271
|
+
* Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
272
272
|
*/
|
|
273
273
|
box: _propTypes.default.shape({
|
|
274
274
|
name: _propTypes.default.string,
|
|
@@ -328,7 +328,7 @@ EuiSearchBar.propTypes = {
|
|
|
328
328
|
}).isRequired, _propTypes.default.bool.isRequired])
|
|
329
329
|
}),
|
|
330
330
|
/**
|
|
331
|
-
An array of search filters. See {@link SearchFilterConfig}.
|
|
331
|
+
* An array of search filters. See {@link SearchFilterConfig}.
|
|
332
332
|
*/
|
|
333
333
|
filters: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
334
334
|
type: _propTypes.default.oneOf(["is"]).isRequired,
|
|
@@ -96,6 +96,12 @@ var EuiSelectable = exports.EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
96
96
|
_this.preventOnFocus = false;
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
+
if (event && _this.props.searchable && event.target === _this.inputRef) {
|
|
100
|
+
_this.setState({
|
|
101
|
+
isFocused: true
|
|
102
|
+
});
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
99
105
|
if (!_this.state.visibleOptions.length || _this.state.activeOptionIndex != null) {
|
|
100
106
|
return;
|
|
101
107
|
}
|
|
@@ -471,8 +477,7 @@ var EuiSelectable = exports.EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
471
477
|
onChange: _this2.onSearchChange,
|
|
472
478
|
listId: _this2.optionsListRef.current ? _this2.listId : undefined // Only pass the listId if it exists on the page
|
|
473
479
|
,
|
|
474
|
-
"aria-activedescendant": _this2.makeOptionId(activeOptionIndex)
|
|
475
|
-
,
|
|
480
|
+
"aria-activedescendant": activeOptionIndex != null ? _this2.makeOptionId(activeOptionIndex) : undefined,
|
|
476
481
|
placeholder: placeholderName,
|
|
477
482
|
isPreFiltered: !!isPreFiltered,
|
|
478
483
|
optionMatcher: optionMatcher,
|
|
@@ -13,6 +13,8 @@ exports.toInitials = toInitials;
|
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
var MAX_INITIALS = exports.MAX_INITIALS = 2;
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* This function calculates the initials/acronym for a given name.
|
|
18
20
|
* It defaults to only 2 characters and will take the first character (of each word).
|
|
@@ -24,11 +26,20 @@ exports.toInitials = toInitials;
|
|
|
24
26
|
* @param {string} name The full name of the item to turn into initials
|
|
25
27
|
* @param {number} initialsLength (Optional) How many characters to show (max 2 allowed)
|
|
26
28
|
* @param {string} initials (Optional) Custom initials (max 2 characters)
|
|
27
|
-
* @returns {string} True if the color is dark, false otherwise.
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
-
var MAX_INITIALS = exports.MAX_INITIALS = 2;
|
|
31
30
|
function toInitials(name, initialsLength, initials) {
|
|
31
|
+
// If `initials` provided, check if it's a single emoji
|
|
32
|
+
// in order to support complex, "multi-character" ones
|
|
33
|
+
if (initials && typeof Intl !== 'undefined' && 'Segmenter' in Intl) {
|
|
34
|
+
var segmenter = new Intl.Segmenter('en', {
|
|
35
|
+
granularity: 'grapheme'
|
|
36
|
+
});
|
|
37
|
+
var segments = Array.from(segmenter.segment(initials));
|
|
38
|
+
if (segments.length === 1 && isEmoji(segments[0].segment)) {
|
|
39
|
+
return segments[0].segment;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
// Calculate the number of initials to show, maxing out at MAX_INITIALS
|
|
33
44
|
var calculatedInitialsLength = initials ? initials.split('').length : name.split(' ').length;
|
|
34
45
|
calculatedInitialsLength = calculatedInitialsLength > MAX_INITIALS ? MAX_INITIALS : calculatedInitialsLength;
|
|
@@ -51,5 +62,16 @@ function toInitials(name, initialsLength, initials) {
|
|
|
51
62
|
calculatedInitials = name.substring(0, calculatedInitialsLength);
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
|
-
return calculatedInitials;
|
|
65
|
+
return calculatedInitials || '';
|
|
66
|
+
}
|
|
67
|
+
function isEmoji(str) {
|
|
68
|
+
/**
|
|
69
|
+
* The \p escape sequence allows matching a character based on its Unicode properties
|
|
70
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape
|
|
71
|
+
* @see https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
|
|
72
|
+
* @see https://www.unicode.org/reports/tr51/#Definitions
|
|
73
|
+
* @see https://util.unicode.org/UnicodeJsps/character.jsp?a=1F440&B1=Show
|
|
74
|
+
*/
|
|
75
|
+
var emojiRegex = /(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDFF\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFF]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])/;
|
|
76
|
+
return emojiRegex.test(str);
|
|
55
77
|
}
|
|
@@ -8,7 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
var _excluded = ["schema"],
|
|
10
10
|
_excluded2 = ["onChange"],
|
|
11
|
-
_excluded3 = ["columns", "loading", "
|
|
11
|
+
_excluded3 = ["columns", "loading", "noItemsMessage", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
12
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
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; }
|
|
@@ -30,21 +30,33 @@ import { EuiSearchBox } from '../search_bar/search_box';
|
|
|
30
30
|
import { EuiSpacer } from '../spacer';
|
|
31
31
|
import { euiTablePaginationDefaults } from '../table/table_pagination';
|
|
32
32
|
import { EuiComponentDefaultsContext } from '../provider/component_defaults';
|
|
33
|
+
|
|
34
|
+
// allows `query: null` in the onChange callback when using `searchFormat="text"`
|
|
33
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
36
|
function isEuiSearchBarProps(x) {
|
|
35
37
|
return typeof x !== 'boolean';
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Extracts and formats a query from search props based on the search format
|
|
41
|
+
* @param search - The search configuration
|
|
42
|
+
* @param defaultQuery - Whether to use the defaultQuery property as fallback
|
|
43
|
+
* @param searchFormat - The search format: 'eql' for parsed queries, 'text' for plain text
|
|
44
|
+
* @returns Formatted query string or Query object
|
|
45
|
+
*/
|
|
46
|
+
var getQueryFromSearch = function getQueryFromSearch(search, defaultQuery, searchFormat) {
|
|
47
|
+
var _ref, _searchProps$defaultQ, _searchProps$query;
|
|
39
48
|
if (!search) {
|
|
40
|
-
|
|
41
|
-
} else {
|
|
42
|
-
query = (defaultQuery ? search.defaultQuery || search.query || '' : search.query) || '';
|
|
49
|
+
return searchFormat === 'text' ? '""' : '';
|
|
43
50
|
}
|
|
44
|
-
|
|
51
|
+
var searchProps = search;
|
|
52
|
+
var queryString = defaultQuery ? (_ref = (_searchProps$defaultQ = searchProps.defaultQuery) !== null && _searchProps$defaultQ !== void 0 ? _searchProps$defaultQ : searchProps.query) !== null && _ref !== void 0 ? _ref : '' : (_searchProps$query = searchProps.query) !== null && _searchProps$query !== void 0 ? _searchProps$query : '';
|
|
53
|
+
if (searchFormat === 'text') {
|
|
54
|
+
return "\"".concat(queryString, "\"");
|
|
55
|
+
}
|
|
56
|
+
return isString(queryString) ? EuiSearchBar.Query.parse(queryString) : queryString;
|
|
45
57
|
};
|
|
46
58
|
var getInitialPagination = function getInitialPagination(pagination, consumerDefaults) {
|
|
47
|
-
var
|
|
59
|
+
var _ref3, _pagination$pageIndex, _ref4, _pagination$pageSize;
|
|
48
60
|
if (!pagination) {
|
|
49
61
|
return {
|
|
50
62
|
pageIndex: undefined,
|
|
@@ -52,14 +64,14 @@ var getInitialPagination = function getInitialPagination(pagination, consumerDef
|
|
|
52
64
|
};
|
|
53
65
|
}
|
|
54
66
|
var defaults = _objectSpread(_objectSpread({}, euiTablePaginationDefaults), consumerDefaults);
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
pageSizeOptions =
|
|
58
|
-
|
|
59
|
-
showPerPageOptions =
|
|
67
|
+
var _ref2 = pagination,
|
|
68
|
+
_ref2$pageSizeOptions = _ref2.pageSizeOptions,
|
|
69
|
+
pageSizeOptions = _ref2$pageSizeOptions === void 0 ? defaults.itemsPerPageOptions : _ref2$pageSizeOptions,
|
|
70
|
+
_ref2$showPerPageOpti = _ref2.showPerPageOptions,
|
|
71
|
+
showPerPageOptions = _ref2$showPerPageOpti === void 0 ? defaults.showPerPageOptions : _ref2$showPerPageOpti;
|
|
60
72
|
var defaultPageSize = pageSizeOptions !== null && pageSizeOptions !== void 0 && pageSizeOptions.includes(defaults.itemsPerPage) ? defaults.itemsPerPage : pageSizeOptions[0];
|
|
61
|
-
var initialPageIndex = pagination === true ? 0 : (
|
|
62
|
-
var initialPageSize = pagination === true ? defaultPageSize : (
|
|
73
|
+
var initialPageIndex = pagination === true ? 0 : (_ref3 = (_pagination$pageIndex = pagination.pageIndex) !== null && _pagination$pageIndex !== void 0 ? _pagination$pageIndex : pagination.initialPageIndex) !== null && _ref3 !== void 0 ? _ref3 : 0;
|
|
74
|
+
var initialPageSize = pagination === true ? defaultPageSize : (_ref4 = (_pagination$pageSize = pagination.pageSize) !== null && _pagination$pageSize !== void 0 ? _pagination$pageSize : pagination.initialPageSize) !== null && _ref4 !== void 0 ? _ref4 : defaultPageSize;
|
|
63
75
|
if (showPerPageOptions && initialPageSize != null && !(pageSizeOptions !== null && pageSizeOptions !== void 0 && pageSizeOptions.includes(initialPageSize))) {
|
|
64
76
|
throw new Error("EuiInMemoryTable received initialPageSize ".concat(initialPageSize, ", which wasn't provided within pageSizeOptions."));
|
|
65
77
|
}
|
|
@@ -112,15 +124,16 @@ function getInitialSorting(columns, sorting) {
|
|
|
112
124
|
}
|
|
113
125
|
export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
114
126
|
function EuiInMemoryTable(props, context) {
|
|
127
|
+
var _props$searchFormat;
|
|
115
128
|
var _this;
|
|
116
129
|
_classCallCheck(this, EuiInMemoryTable);
|
|
117
130
|
_this = _callSuper(this, EuiInMemoryTable, [props]);
|
|
118
|
-
_defineProperty(_this, "onTableChange", function (
|
|
119
|
-
var page =
|
|
120
|
-
sort =
|
|
121
|
-
var
|
|
122
|
-
pageIndex =
|
|
123
|
-
pageSize =
|
|
131
|
+
_defineProperty(_this, "onTableChange", function (_ref5) {
|
|
132
|
+
var page = _ref5.page,
|
|
133
|
+
sort = _ref5.sort;
|
|
134
|
+
var _ref6 = page || {},
|
|
135
|
+
pageIndex = _ref6.index,
|
|
136
|
+
pageSize = _ref6.size;
|
|
124
137
|
|
|
125
138
|
// don't apply pagination changes that are otherwise controlled
|
|
126
139
|
// `page` is left unchanged as it goes to the consumer's `onTableChange` callback, allowing the app to respond
|
|
@@ -129,9 +142,9 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
129
142
|
if (pagination.pageSize != null) pageSize = pagination.pageSize;
|
|
130
143
|
if (pagination.pageIndex != null) pageIndex = pagination.pageIndex;
|
|
131
144
|
}
|
|
132
|
-
var
|
|
133
|
-
sortName =
|
|
134
|
-
sortDirection =
|
|
145
|
+
var _ref7 = sort || {},
|
|
146
|
+
sortName = _ref7.field,
|
|
147
|
+
sortDirection = _ref7.direction;
|
|
135
148
|
|
|
136
149
|
// To keep backwards compatibility reportedSortName needs to be tracked separately
|
|
137
150
|
// from sortName; sortName gets stored internally while reportedSortName is sent to the callback
|
|
@@ -174,10 +187,10 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
174
187
|
sortDirection: sortDirection
|
|
175
188
|
});
|
|
176
189
|
});
|
|
177
|
-
_defineProperty(_this, "onQueryChange", function (
|
|
178
|
-
var query =
|
|
179
|
-
queryText =
|
|
180
|
-
error =
|
|
190
|
+
_defineProperty(_this, "onQueryChange", function (_ref8) {
|
|
191
|
+
var query = _ref8.query,
|
|
192
|
+
queryText = _ref8.queryText,
|
|
193
|
+
error = _ref8.error;
|
|
181
194
|
var search = _this.props.search;
|
|
182
195
|
if (isEuiSearchBarProps(search)) {
|
|
183
196
|
if (search.onChange) {
|
|
@@ -211,12 +224,11 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
211
224
|
// search bar to ignore EQL syntax and only use the searchbar for plain text
|
|
212
225
|
_defineProperty(_this, "onPlainTextSearch", function (searchValue) {
|
|
213
226
|
var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
|
|
214
|
-
var finalQuery = "\"".concat(escapedQueryText, "\"");
|
|
215
227
|
var search = _this.props.search;
|
|
216
228
|
if (isEuiSearchBarProps(search)) {
|
|
217
229
|
if (search.onChange) {
|
|
218
230
|
var shouldQueryInMemory = search.onChange({
|
|
219
|
-
query:
|
|
231
|
+
query: null,
|
|
220
232
|
queryText: escapedQueryText,
|
|
221
233
|
error: null
|
|
222
234
|
});
|
|
@@ -226,7 +238,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
226
238
|
}
|
|
227
239
|
}
|
|
228
240
|
_this.setState({
|
|
229
|
-
query:
|
|
241
|
+
query: "\"".concat(escapedQueryText, "\"")
|
|
230
242
|
});
|
|
231
243
|
});
|
|
232
244
|
var columns = props.columns,
|
|
@@ -250,7 +262,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
250
262
|
search: _search
|
|
251
263
|
},
|
|
252
264
|
search: _search,
|
|
253
|
-
query: getQueryFromSearch(_search, true),
|
|
265
|
+
query: getQueryFromSearch(_search, true, (_props$searchFormat = props.searchFormat) !== null && _props$searchFormat !== void 0 ? _props$searchFormat : 'eql'),
|
|
254
266
|
pageIndex: _pageIndex || 0,
|
|
255
267
|
pageSize: _pageSize,
|
|
256
268
|
pageSizeOptions: pageSizeOptions,
|
|
@@ -271,13 +283,28 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
271
283
|
if (!search) return;
|
|
272
284
|
var searchBar;
|
|
273
285
|
if (searchFormat === 'text') {
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
|
|
286
|
+
var _ref9 = search,
|
|
287
|
+
_ref9$box = _ref9.box,
|
|
288
|
+
box = _ref9$box === void 0 ? {} : _ref9$box,
|
|
289
|
+
query = _ref9.query,
|
|
290
|
+
defaultQuery = _ref9.defaultQuery;
|
|
291
|
+
var schema = box.schema,
|
|
292
|
+
searchBoxProps = _objectWithoutProperties(box, _excluded);
|
|
293
|
+
|
|
294
|
+
// in the unexpected case a Query object is passed with searchFormat=text
|
|
295
|
+
if (process.env.NODE_ENV === 'development') {
|
|
296
|
+
if (query != null && !isString(query)) {
|
|
297
|
+
console.warn('EuiInMemoryTable: `query` should be a string when using searchFormat="text". Query objects are only supported with searchFormat="eql".');
|
|
298
|
+
}
|
|
299
|
+
if (defaultQuery != null && !isString(defaultQuery)) {
|
|
300
|
+
console.warn('EuiInMemoryTable: `defaultQuery` should be a string when using searchFormat="text". Query objects are only supported with searchFormat="eql".');
|
|
301
|
+
}
|
|
302
|
+
}
|
|
277
303
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}, searchBoxProps, {
|
|
304
|
+
// use only string values, ignore Query objects
|
|
305
|
+
var displayQuery = isString(query) ? query : isString(defaultQuery) ? defaultQuery : '';
|
|
306
|
+
searchBar = ___EmotionJSX(EuiSearchBox, _extends({}, searchBoxProps, {
|
|
307
|
+
query: displayQuery,
|
|
281
308
|
onSearch: this.onPlainTextSearch
|
|
282
309
|
}));
|
|
283
310
|
} else {
|
|
@@ -305,9 +332,9 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
305
332
|
value: function resolveSearchSchema() {
|
|
306
333
|
var columns = this.props.columns;
|
|
307
334
|
return columns.reduce(function (schema, column) {
|
|
308
|
-
var
|
|
309
|
-
field =
|
|
310
|
-
dataType =
|
|
335
|
+
var _ref10 = column,
|
|
336
|
+
field = _ref10.field,
|
|
337
|
+
dataType = _ref10.dataType;
|
|
311
338
|
if (field) {
|
|
312
339
|
var type = dataType || 'string';
|
|
313
340
|
schema.fields[field] = {
|
|
@@ -327,8 +354,8 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
327
354
|
sortName = _this$state.sortName,
|
|
328
355
|
sortDirection = _this$state.sortDirection;
|
|
329
356
|
var columns = this.props.columns;
|
|
330
|
-
var sortColumn = columns.find(function (
|
|
331
|
-
var name =
|
|
357
|
+
var sortColumn = columns.find(function (_ref11) {
|
|
358
|
+
var name = _ref11.name;
|
|
332
359
|
return name === sortName;
|
|
333
360
|
});
|
|
334
361
|
if (sortColumn == null) {
|
|
@@ -378,7 +405,6 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
378
405
|
var _this$props2 = this.props,
|
|
379
406
|
columns = _this$props2.columns,
|
|
380
407
|
loading = _this$props2.loading,
|
|
381
|
-
message = _this$props2.message,
|
|
382
408
|
noItemsMessage = _this$props2.noItemsMessage,
|
|
383
409
|
error = _this$props2.error,
|
|
384
410
|
selection = _this$props2.selection,
|
|
@@ -441,7 +467,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
441
467
|
onChange: this.onTableChange,
|
|
442
468
|
error: error,
|
|
443
469
|
loading: loading,
|
|
444
|
-
noItemsMessage: noItemsMessage
|
|
470
|
+
noItemsMessage: noItemsMessage,
|
|
445
471
|
tableLayout: tableLayout,
|
|
446
472
|
compressed: compressed,
|
|
447
473
|
itemIdToExpandedRowMap: itemIdToExpandedRowMap
|
|
@@ -499,11 +525,12 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
499
525
|
var nextQuery = nextProps.search ? nextProps.search.query : '';
|
|
500
526
|
var prevQuery = prevState.prevProps.search ? prevState.prevProps.search.query : '';
|
|
501
527
|
if (nextQuery !== prevQuery) {
|
|
528
|
+
var _nextProps$searchForm;
|
|
502
529
|
updatedPrevState = _objectSpread(_objectSpread({}, updatedPrevState), {}, {
|
|
503
530
|
prevProps: _objectSpread(_objectSpread({}, updatedPrevState.prevProps), {}, {
|
|
504
531
|
search: nextProps.search
|
|
505
532
|
}),
|
|
506
|
-
query: getQueryFromSearch(nextProps.search, false)
|
|
533
|
+
query: getQueryFromSearch(nextProps.search, false, (_nextProps$searchForm = nextProps.searchFormat) !== null && _nextProps$searchForm !== void 0 ? _nextProps$searchForm : 'eql')
|
|
507
534
|
});
|
|
508
535
|
}
|
|
509
536
|
if (updatedPrevState !== prevState) {
|
|
@@ -57,6 +57,7 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
57
57
|
setHasUnparsedText(false);
|
|
58
58
|
setIsTextInvalid(false);
|
|
59
59
|
}, [dateFormat]);
|
|
60
|
+
var textInputLabelId = useGeneratedHtmlId();
|
|
60
61
|
var timeZomeDescriptionId = useGeneratedHtmlId();
|
|
61
62
|
var submitButtonLabel = useEuiI18n('euiAbsoluteTab.dateFormatButtonLabel', 'Parse date');
|
|
62
63
|
var dateFormatError = useEuiI18n('euiAbsoluteTab.dateFormatError', 'Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp.', {
|
|
@@ -157,6 +158,7 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
157
158
|
helpText: hasUnparsedText && !isTextInvalid ? dateFormatError : undefined,
|
|
158
159
|
describedByIds: [timeZomeDescriptionId]
|
|
159
160
|
}, ___EmotionJSX(EuiFieldText, {
|
|
161
|
+
"aria-labelledby": textInputLabelId,
|
|
160
162
|
compressed: true,
|
|
161
163
|
isInvalid: isTextInvalid,
|
|
162
164
|
value: textInputValue,
|
|
@@ -169,7 +171,9 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
169
171
|
setIsReadyToParse(true);
|
|
170
172
|
},
|
|
171
173
|
"data-test-subj": "superDatePickerAbsoluteDateInput",
|
|
172
|
-
prepend: ___EmotionJSX(EuiFormLabel,
|
|
174
|
+
prepend: ___EmotionJSX(EuiFormLabel, {
|
|
175
|
+
id: textInputLabelId
|
|
176
|
+
}, labelPrefix)
|
|
173
177
|
})), hasUnparsedText && ___EmotionJSX(EuiButtonIcon, {
|
|
174
178
|
type: "submit",
|
|
175
179
|
css: styles.euiAbsoluteTabDateForm__submit,
|
|
@@ -80,6 +80,7 @@ export var EuiRelativeTab = function EuiRelativeTab(_ref) {
|
|
|
80
80
|
if (!parsedValue || !parsedValue.isValid()) return '';
|
|
81
81
|
return parsedValue.locale(locale || 'en').format(dateFormat);
|
|
82
82
|
}, [isInvalid, value, roundUp, locale, dateFormat]);
|
|
83
|
+
var textInputLabelId = useGeneratedHtmlId();
|
|
83
84
|
var relativeDateInputNumberDescriptionId = useGeneratedHtmlId();
|
|
84
85
|
var timeZomeDescriptionId = useGeneratedHtmlId();
|
|
85
86
|
var numberAriaLabel = useEuiI18n('euiRelativeTab.numberInputLabel', 'Time span amount');
|
|
@@ -112,11 +113,14 @@ export var EuiRelativeTab = function EuiRelativeTab(_ref) {
|
|
|
112
113
|
}))), ___EmotionJSX(EuiSpacer, {
|
|
113
114
|
size: "s"
|
|
114
115
|
}), ___EmotionJSX(EuiFieldText, {
|
|
116
|
+
"aria-labelledby": textInputLabelId,
|
|
115
117
|
compressed: true,
|
|
116
118
|
value: formattedValue,
|
|
117
119
|
readOnly: true,
|
|
118
120
|
"aria-describedby": timeZomeDescriptionId,
|
|
119
|
-
prepend: ___EmotionJSX(EuiFormLabel,
|
|
121
|
+
prepend: ___EmotionJSX(EuiFormLabel, {
|
|
122
|
+
id: textInputLabelId
|
|
123
|
+
}, labelPrefix)
|
|
120
124
|
}), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
121
125
|
id: relativeDateInputNumberDescriptionId
|
|
122
126
|
}, ___EmotionJSX(EuiI18n, {
|
package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js
CHANGED
|
@@ -53,7 +53,9 @@ export var EuiTimeZoneDisplay = function EuiTimeZoneDisplay(_ref) {
|
|
|
53
53
|
"data-test-subj": "euiTimeZoneDisplay",
|
|
54
54
|
"aria-label": label
|
|
55
55
|
}, rest), typeof customRender === 'function' ? customRender({
|
|
56
|
-
nameDisplay: nameDisplay
|
|
56
|
+
nameDisplay: nameDisplay,
|
|
57
|
+
utcOffset: utc,
|
|
58
|
+
timeZoneName: name
|
|
57
59
|
}) : nameDisplay);
|
|
58
60
|
};
|
|
59
61
|
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
export { EuiCommonlyUsedTimeRanges } from './commonly_used_time_ranges';
|
|
10
10
|
export { EuiQuickSelectPopover } from './quick_select_popover';
|
|
11
11
|
export { EuiQuickSelect } from './quick_select';
|
|
12
|
+
export { EuiQuickSelectPanel } from './quick_select_panel';
|
|
12
13
|
export { EuiRecentlyUsed } from './recently_used';
|
|
@@ -35,7 +35,7 @@ export var EuiTimeWindowButtons = function EuiTimeWindowButtons(_ref) {
|
|
|
35
35
|
zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
|
|
36
36
|
var buttonColor = 'text';
|
|
37
37
|
var buttonSize = compressed ? 's' : 'm';
|
|
38
|
-
var iconSize =
|
|
38
|
+
var iconSize = 'm';
|
|
39
39
|
var styles = useEuiMemoizedStyles(euiButtonGroupButtonsStyles);
|
|
40
40
|
var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
|
|
41
41
|
zoomFactor: zoomFactor
|