@elastic/eui 104.0.2 → 104.1.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/in_memory_table.js +18 -2
- package/es/components/code/code.styles.js +1 -1
- package/es/components/code/code_syntax.styles.js +1 -0
- package/es/components/date_picker/date_picker.js +2 -1
- package/es/components/date_picker/date_picker_range.js +18 -16
- package/es/components/date_picker/super_date_picker/super_date_picker.js +5 -9
- package/es/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/es/themes/amsterdam/global_styling/variables/_components.js +315 -310
- package/eui.d.ts +14 -5
- package/lib/components/basic_table/in_memory_table.js +18 -2
- package/lib/components/code/code.styles.js +1 -1
- package/lib/components/code/code_syntax.styles.js +1 -0
- package/lib/components/date_picker/date_picker.js +2 -1
- package/lib/components/date_picker/date_picker_range.js +18 -16
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +5 -9
- package/lib/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/lib/themes/amsterdam/global_styling/variables/_components.js +315 -310
- package/optimize/es/components/basic_table/in_memory_table.js +3 -2
- package/optimize/es/components/code/code.styles.js +1 -1
- package/optimize/es/components/code/code_syntax.styles.js +1 -0
- package/optimize/es/components/date_picker/date_picker.js +2 -1
- package/optimize/es/components/date_picker/date_picker_range.js +16 -14
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +5 -9
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +2 -2
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +315 -310
- package/optimize/lib/components/basic_table/in_memory_table.js +3 -2
- package/optimize/lib/components/code/code.styles.js +1 -1
- package/optimize/lib/components/code/code_syntax.styles.js +1 -0
- package/optimize/lib/components/date_picker/date_picker.js +2 -1
- package/optimize/lib/components/date_picker/date_picker_range.js +16 -14
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +5 -9
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +2 -2
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +315 -310
- package/package.json +4 -4
- package/test-env/components/basic_table/in_memory_table.js +18 -2
- package/test-env/components/code/code.styles.js +1 -1
- package/test-env/components/code/code_syntax.styles.js +1 -0
- package/test-env/components/date_picker/date_picker.js +2 -1
- package/test-env/components/date_picker/date_picker_range.js +18 -16
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +5 -9
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +315 -310
package/eui.d.ts
CHANGED
|
@@ -1610,6 +1610,7 @@ declare module '@elastic/eui/src/components/code/code_syntax.styles' {
|
|
|
1610
1610
|
export const euiCodeSyntaxVariables: (euiThemeContext: UseEuiTheme) => {
|
|
1611
1611
|
backgroundColor: string;
|
|
1612
1612
|
color: string;
|
|
1613
|
+
inlineBackgroundColor: string;
|
|
1613
1614
|
inlineCodeColor: string;
|
|
1614
1615
|
selectedBackgroundColor: string;
|
|
1615
1616
|
commentColor: string;
|
|
@@ -6546,11 +6547,11 @@ declare module '@elastic/eui/src/components/form/form_control_layout/form_contro
|
|
|
6546
6547
|
/**
|
|
6547
6548
|
* Left side control
|
|
6548
6549
|
*/
|
|
6549
|
-
startControl
|
|
6550
|
+
startControl?: ReactElement;
|
|
6550
6551
|
/**
|
|
6551
6552
|
* Right side control
|
|
6552
6553
|
*/
|
|
6553
|
-
endControl
|
|
6554
|
+
endControl?: ReactElement;
|
|
6554
6555
|
/**
|
|
6555
6556
|
* The center content. Accepts a string to be wrapped in a subdued EuiText
|
|
6556
6557
|
* or a single ReactElement
|
|
@@ -18334,7 +18335,7 @@ declare module '@elastic/eui/src/components/date_picker/date_picker_range' {
|
|
|
18334
18335
|
import { IconType } from '@elastic/eui/src/components/icon';
|
|
18335
18336
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
18336
18337
|
import { EuiDatePickerProps } from '@elastic/eui/src/components/date_picker/date_picker';
|
|
18337
|
-
export type EuiDatePickerRangeProps = CommonProps & Pick<EuiFormControlLayoutDelimitedProps, 'isLoading' | 'isInvalid' | 'readOnly' | 'fullWidth' | 'compressed' | 'prepend' | 'append'> & {
|
|
18338
|
+
export type EuiDatePickerRangeProps = CommonProps & Pick<EuiFormControlLayoutDelimitedProps, 'isLoading' | 'isInvalid' | 'readOnly' | 'fullWidth' | 'compressed' | 'prepend' | 'append' | 'delimiter'> & {
|
|
18338
18339
|
/**
|
|
18339
18340
|
* Including any children will replace all innards with the provided children
|
|
18340
18341
|
*/
|
|
@@ -18342,11 +18343,11 @@ declare module '@elastic/eui/src/components/date_picker/date_picker_range' {
|
|
|
18342
18343
|
/**
|
|
18343
18344
|
* The end date `EuiDatePicker` element
|
|
18344
18345
|
*/
|
|
18345
|
-
endDateControl
|
|
18346
|
+
endDateControl?: ReactElement;
|
|
18346
18347
|
/**
|
|
18347
18348
|
* The start date `EuiDatePicker` element
|
|
18348
18349
|
*/
|
|
18349
|
-
startDateControl
|
|
18350
|
+
startDateControl?: ReactElement;
|
|
18350
18351
|
/**
|
|
18351
18352
|
* Pass either an icon type or set to `false` to remove icon entirely
|
|
18352
18353
|
*/
|
|
@@ -25048,7 +25049,15 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
|
|
|
25048
25049
|
}
|
|
25049
25050
|
type Sorting = boolean | SortingOptions;
|
|
25050
25051
|
type InMemoryTableProps<T extends object> = Omit<EuiBasicTableProps<T>, 'pagination' | 'sorting' | 'noItemsMessage' | 'onChange'> & {
|
|
25052
|
+
/**
|
|
25053
|
+
* Message to display if table is empty
|
|
25054
|
+
* @deprecated Use `noItemsMessage` instead.
|
|
25055
|
+
*/
|
|
25051
25056
|
message?: ReactNode;
|
|
25057
|
+
/**
|
|
25058
|
+
* Message to display if table is empty
|
|
25059
|
+
*/
|
|
25060
|
+
noItemsMessage?: ReactNode;
|
|
25052
25061
|
/**
|
|
25053
25062
|
* Configures {@link Search}.
|
|
25054
25063
|
*/
|
|
@@ -17,7 +17,7 @@ var _component_defaults = require("../provider/component_defaults");
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["schema"],
|
|
19
19
|
_excluded2 = ["onChange"],
|
|
20
|
-
_excluded3 = ["columns", "loading", "message", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
20
|
+
_excluded3 = ["columns", "loading", "message", "noItemsMessage", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -381,6 +381,7 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
|
|
|
381
381
|
columns = _this$props2.columns,
|
|
382
382
|
loading = _this$props2.loading,
|
|
383
383
|
message = _this$props2.message,
|
|
384
|
+
noItemsMessage = _this$props2.noItemsMessage,
|
|
384
385
|
error = _this$props2.error,
|
|
385
386
|
selection = _this$props2.selection,
|
|
386
387
|
compressed = _this$props2.compressed,
|
|
@@ -442,7 +443,7 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
|
|
|
442
443
|
onChange: this.onTableChange,
|
|
443
444
|
error: error,
|
|
444
445
|
loading: loading,
|
|
445
|
-
noItemsMessage: message,
|
|
446
|
+
noItemsMessage: noItemsMessage || message,
|
|
446
447
|
tableLayout: tableLayout,
|
|
447
448
|
compressed: compressed,
|
|
448
449
|
itemIdToExpandedRowMap: itemIdToExpandedRowMap
|
|
@@ -977,7 +978,22 @@ EuiInMemoryTable.propTypes = {
|
|
|
977
978
|
* Sets the table-layout CSS property. Note that auto tableLayout prevents truncateText from working properly.
|
|
978
979
|
*/
|
|
979
980
|
tableLayout: _propTypes.default.oneOf(["fixed", "auto"]),
|
|
981
|
+
/**
|
|
982
|
+
* Message to display if table is empty
|
|
983
|
+
* @deprecated Use `noItemsMessage` instead.
|
|
984
|
+
*/
|
|
985
|
+
/**
|
|
986
|
+
* Message to display if table is empty
|
|
987
|
+
* @deprecated Use `noItemsMessage` instead.
|
|
988
|
+
*/
|
|
980
989
|
message: _propTypes.default.node,
|
|
990
|
+
/**
|
|
991
|
+
* Message to display if table is empty
|
|
992
|
+
*/
|
|
993
|
+
/**
|
|
994
|
+
* Message to display if table is empty
|
|
995
|
+
*/
|
|
996
|
+
noItemsMessage: _propTypes.default.node,
|
|
981
997
|
/**
|
|
982
998
|
* Configures {@link Search}.
|
|
983
999
|
*/
|
|
@@ -29,7 +29,7 @@ var euiCodeStyles = exports.euiCodeStyles = function euiCodeStyles(euiThemeConte
|
|
|
29
29
|
/*
|
|
30
30
|
* 1. Size the code against the text its embedded within.
|
|
31
31
|
*/
|
|
32
|
-
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.logicalShorthandCSS)('padding', '0.2em 0.5em'), "background-color:", codeSyntaxVariables.
|
|
32
|
+
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.logicalShorthandCSS)('padding', '0.2em 0.5em'), "background-color:", codeSyntaxVariables.inlineBackgroundColor, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
33
33
|
forced: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
34
34
|
}), " border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", codeSyntaxVariables.inlineCodeColor, ";", codeSyntaxVariables.tokensCss, " .token.atrule .token.rule,.token.keyword{color:", codeSyntaxVariables.inlineCodeKeywordColor, ";};label:euiCode;"),
|
|
35
35
|
transparentBackground: _ref
|
|
@@ -32,6 +32,7 @@ var euiCodeSyntaxVariables = exports.euiCodeSyntaxVariables = function euiCodeSy
|
|
|
32
32
|
return {
|
|
33
33
|
backgroundColor: backgroundColor,
|
|
34
34
|
color: color,
|
|
35
|
+
inlineBackgroundColor: euiTheme.components.codeInlineBackground,
|
|
35
36
|
inlineCodeColor: euiTheme.components.codeInlineColor,
|
|
36
37
|
selectedBackgroundColor: euiTheme.components.codeBackgroundSelected,
|
|
37
38
|
commentColor: euiTheme.components.codeCommentColor,
|
|
@@ -71,6 +71,7 @@ var unsupportedProps = [
|
|
|
71
71
|
// An internal EUI styling concern that consumers shouldn't need to access
|
|
72
72
|
'defaultInputProps'];
|
|
73
73
|
var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
|
|
74
|
+
var _selected$isValid;
|
|
74
75
|
var _ref$adjustDateOnChan = _ref.adjustDateOnChange,
|
|
75
76
|
adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
|
|
76
77
|
append = _ref.append,
|
|
@@ -122,7 +123,7 @@ var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
122
123
|
utcOffset = _ref.utcOffset,
|
|
123
124
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
124
125
|
// Check for whether the passed `selected` moment date is valid
|
|
125
|
-
var isInvalid = _isInvalid || ((selected === null || selected === void 0 ? void 0 :
|
|
126
|
+
var isInvalid = _isInvalid || ((selected === null || selected === void 0 || (_selected$isValid = selected.isValid) === null || _selected$isValid === void 0 ? void 0 : _selected$isValid.call(selected)) === false ? true : undefined);
|
|
126
127
|
var styles = (0, _services.useEuiMemoizedStyles)(_date_picker.euiDatePickerStyles);
|
|
127
128
|
var cssStyles = [styles.euiDatePicker].concat(_toConsumableArray(inline ? [styles.inline.inline, isInvalid && !(disabled || readOnly) && styles.inline.invalid, shadow ? styles.inline.shadow : styles.inline.noShadow, disabled && styles.inline.disabled, readOnly && styles.inline.readOnly] : []));
|
|
128
129
|
var calendarStyles = (0, _services.useEuiMemoizedStyles)(_react_date_picker.euiReactDatePickerStyles);
|
|
@@ -12,7 +12,7 @@ var _form = require("../form");
|
|
|
12
12
|
var _services = require("../../services");
|
|
13
13
|
var _date_picker_range = require("./date_picker_range.styles");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "compressed", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"];
|
|
15
|
+
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "compressed", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend", "delimiter"];
|
|
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
|
|
@@ -47,6 +47,7 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
47
47
|
_onBlur = _ref.onBlur,
|
|
48
48
|
append = _ref.append,
|
|
49
49
|
prepend = _ref.prepend,
|
|
50
|
+
delimiter = _ref.delimiter,
|
|
50
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
52
|
// `fullWidth` and `compressed` should not affect inline datepickers (matches non-range behavior)
|
|
52
53
|
var fullWidth = _fullWidth && !inline;
|
|
@@ -55,50 +56,50 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
55
56
|
var inlineStyles = (0, _services.useEuiMemoizedStyles)(_date_picker_range.euiDatePickerRangeInlineStyles);
|
|
56
57
|
var cssStyles = !inline ? _date_picker_range.euiDatePickerRangeStyles.euiDatePickerRange : [inlineStyles.euiDatePickerRangeInline,
|
|
57
58
|
// Determine the inline container query to use based on the width of the react-datepicker
|
|
58
|
-
startDateControl.props.showTimeSelect || endDateControl.props.showTimeSelect ? inlineStyles.responsiveWithTimeSelect : inlineStyles.responsive, shadow && inlineStyles.shadow];
|
|
59
|
+
startDateControl !== null && startDateControl !== void 0 && startDateControl.props.showTimeSelect || endDateControl !== null && endDateControl !== void 0 && endDateControl.props.showTimeSelect ? inlineStyles.responsiveWithTimeSelect : inlineStyles.responsive, shadow && inlineStyles.shadow];
|
|
59
60
|
var startControl = startDateControl;
|
|
60
61
|
var endControl = endDateControl;
|
|
61
62
|
if (!isCustom) {
|
|
62
|
-
startControl = /*#__PURE__*/(0, _react.cloneElement)(startDateControl, {
|
|
63
|
+
startControl = startControl && /*#__PURE__*/(0, _react.cloneElement)(startDateControl, {
|
|
63
64
|
controlOnly: true,
|
|
64
65
|
showIcon: false,
|
|
65
66
|
inline: inline,
|
|
66
67
|
compressed: compressed,
|
|
67
68
|
fullWidth: fullWidth,
|
|
68
69
|
readOnly: readOnly,
|
|
69
|
-
disabled: disabled || startDateControl.props.disabled,
|
|
70
|
-
isInvalid: isInvalid || startDateControl.props.isInvalid,
|
|
71
|
-
className: (0, _classnames.default)('euiDatePickerRange__start', startDateControl.props.className),
|
|
70
|
+
disabled: disabled || (startDateControl === null || startDateControl === void 0 ? void 0 : startDateControl.props.disabled),
|
|
71
|
+
isInvalid: isInvalid || (startDateControl === null || startDateControl === void 0 ? void 0 : startDateControl.props.isInvalid),
|
|
72
|
+
className: (0, _classnames.default)('euiDatePickerRange__start', startDateControl === null || startDateControl === void 0 ? void 0 : startDateControl.props.className),
|
|
72
73
|
onBlur: function onBlur(event) {
|
|
73
74
|
var _startDateControl$pro, _startDateControl$pro2;
|
|
74
|
-
(_startDateControl$pro = startDateControl.props) === null || _startDateControl$pro === void 0 || (_startDateControl$pro2 = _startDateControl$pro.onBlur) === null || _startDateControl$pro2 === void 0 || _startDateControl$pro2.call(_startDateControl$pro, event);
|
|
75
|
+
startDateControl === null || startDateControl === void 0 || (_startDateControl$pro = startDateControl.props) === null || _startDateControl$pro === void 0 || (_startDateControl$pro2 = _startDateControl$pro.onBlur) === null || _startDateControl$pro2 === void 0 || _startDateControl$pro2.call(_startDateControl$pro, event);
|
|
75
76
|
_onBlur === null || _onBlur === void 0 || _onBlur(event);
|
|
76
77
|
},
|
|
77
78
|
onFocus: function onFocus(event) {
|
|
78
79
|
var _startDateControl$pro3, _startDateControl$pro4;
|
|
79
|
-
(_startDateControl$pro3 = startDateControl.props) === null || _startDateControl$pro3 === void 0 || (_startDateControl$pro4 = _startDateControl$pro3.onFocus) === null || _startDateControl$pro4 === void 0 || _startDateControl$pro4.call(_startDateControl$pro3, event);
|
|
80
|
+
startDateControl === null || startDateControl === void 0 || (_startDateControl$pro3 = startDateControl.props) === null || _startDateControl$pro3 === void 0 || (_startDateControl$pro4 = _startDateControl$pro3.onFocus) === null || _startDateControl$pro4 === void 0 || _startDateControl$pro4.call(_startDateControl$pro3, event);
|
|
80
81
|
_onFocus === null || _onFocus === void 0 || _onFocus(event);
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
|
-
endControl = /*#__PURE__*/(0, _react.cloneElement)(endDateControl, {
|
|
84
|
+
endControl = endControl && /*#__PURE__*/(0, _react.cloneElement)(endDateControl, {
|
|
84
85
|
controlOnly: true,
|
|
85
86
|
showIcon: false,
|
|
86
87
|
inline: inline,
|
|
87
88
|
compressed: compressed,
|
|
88
89
|
fullWidth: fullWidth,
|
|
89
90
|
readOnly: readOnly,
|
|
90
|
-
disabled: disabled || endDateControl.props.disabled,
|
|
91
|
-
isInvalid: isInvalid || endDateControl.props.isInvalid,
|
|
91
|
+
disabled: disabled || (endDateControl === null || endDateControl === void 0 ? void 0 : endDateControl.props.disabled),
|
|
92
|
+
isInvalid: isInvalid || (endDateControl === null || endDateControl === void 0 ? void 0 : endDateControl.props.isInvalid),
|
|
92
93
|
popoverPlacement: 'downRight',
|
|
93
|
-
className: (0, _classnames.default)('euiDatePickerRange__end', endDateControl.props.className),
|
|
94
|
+
className: (0, _classnames.default)('euiDatePickerRange__end', endDateControl === null || endDateControl === void 0 ? void 0 : endDateControl.props.className),
|
|
94
95
|
onBlur: function onBlur(event) {
|
|
95
96
|
var _endDateControl$props, _endDateControl$props2;
|
|
96
|
-
(_endDateControl$props = endDateControl.props) === null || _endDateControl$props === void 0 || (_endDateControl$props2 = _endDateControl$props.onBlur) === null || _endDateControl$props2 === void 0 || _endDateControl$props2.call(_endDateControl$props, event);
|
|
97
|
+
endDateControl === null || endDateControl === void 0 || (_endDateControl$props = endDateControl.props) === null || _endDateControl$props === void 0 || (_endDateControl$props2 = _endDateControl$props.onBlur) === null || _endDateControl$props2 === void 0 || _endDateControl$props2.call(_endDateControl$props, event);
|
|
97
98
|
_onBlur === null || _onBlur === void 0 || _onBlur(event);
|
|
98
99
|
},
|
|
99
100
|
onFocus: function onFocus(event) {
|
|
100
101
|
var _endDateControl$props3, _endDateControl$props4;
|
|
101
|
-
(_endDateControl$props3 = endDateControl.props) === null || _endDateControl$props3 === void 0 || (_endDateControl$props4 = _endDateControl$props3.onFocus) === null || _endDateControl$props4 === void 0 || _endDateControl$props4.call(_endDateControl$props3, event);
|
|
102
|
+
endDateControl === null || endDateControl === void 0 || (_endDateControl$props3 = endDateControl.props) === null || _endDateControl$props3 === void 0 || (_endDateControl$props4 = _endDateControl$props3.onFocus) === null || _endDateControl$props4 === void 0 || _endDateControl$props4.call(_endDateControl$props3, event);
|
|
102
103
|
_onFocus === null || _onFocus === void 0 || _onFocus(event);
|
|
103
104
|
}
|
|
104
105
|
});
|
|
@@ -113,6 +114,7 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
113
114
|
className: classes,
|
|
114
115
|
css: cssStyles
|
|
115
116
|
}, rest), (0, _react2.jsx)(_form.EuiFormControlLayoutDelimited, {
|
|
117
|
+
delimiter: delimiter,
|
|
116
118
|
icon: icon,
|
|
117
119
|
startControl: startControl,
|
|
118
120
|
endControl: endControl,
|
|
@@ -139,11 +141,11 @@ EuiDatePickerRange.propTypes = {
|
|
|
139
141
|
/**
|
|
140
142
|
* The end date `EuiDatePicker` element
|
|
141
143
|
*/
|
|
142
|
-
endDateControl: _propTypes.default.element
|
|
144
|
+
endDateControl: _propTypes.default.element,
|
|
143
145
|
/**
|
|
144
146
|
* The start date `EuiDatePicker` element
|
|
145
147
|
*/
|
|
146
|
-
startDateControl: _propTypes.default.element
|
|
148
|
+
startDateControl: _propTypes.default.element,
|
|
147
149
|
/**
|
|
148
150
|
* Pass either an icon type or set to `false` to remove icon entirely
|
|
149
151
|
*/
|
|
@@ -28,11 +28,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
28
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
30
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
31
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
32
|
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; }
|
|
32
33
|
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; }
|
|
33
34
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
34
35
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
35
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
36
36
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
37
37
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
38
38
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -303,14 +303,9 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
303
303
|
fullWidth: true,
|
|
304
304
|
css: [styles.states.euiSuperDatePicker__formControlLayout, isDisabled ? styles.states.disabled : isInvalid ? styles.states.invalid : hasChanged ? styles.states.needsUpdating : styles.states.default]
|
|
305
305
|
};
|
|
306
|
-
if (isQuickSelectOnly) {
|
|
307
|
-
return (0, _react2.jsx)(_form.EuiFormControlLayout, _extends({
|
|
308
|
-
iconsPosition: "static"
|
|
309
|
-
}, formControlLayoutProps));
|
|
310
|
-
}
|
|
311
306
|
var isDisabledDisplay = (0, _predicate.isObject)(isDisabled) && (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled.display);
|
|
312
307
|
if (isDisabledDisplay || showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
|
|
313
|
-
return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, (0, _react2.jsx)("button", {
|
|
308
|
+
return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && (0, _react2.jsx)("button", {
|
|
314
309
|
type: "button",
|
|
315
310
|
css: styles.euiSuperDatePicker__prettyFormat,
|
|
316
311
|
className: (0, _classnames.default)('euiSuperDatePicker__prettyFormat', {
|
|
@@ -341,7 +336,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
341
336
|
css: rangeCssStyles,
|
|
342
337
|
isCustom: true,
|
|
343
338
|
iconType: false,
|
|
344
|
-
|
|
339
|
+
delimiter: isQuickSelectOnly ? '' : undefined,
|
|
340
|
+
startDateControl: isQuickSelectOnly ? undefined : (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
345
341
|
css: styles.euiSuperDatePicker__rangeInput,
|
|
346
342
|
className: "euiSuperDatePicker__startPopoverButton",
|
|
347
343
|
compressed: compressed,
|
|
@@ -366,7 +362,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
366
362
|
onFocus: onFocus
|
|
367
363
|
}
|
|
368
364
|
}),
|
|
369
|
-
endDateControl: (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
365
|
+
endDateControl: isQuickSelectOnly ? undefined : (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
370
366
|
css: styles.euiSuperDatePicker__rangeInput,
|
|
371
367
|
position: "end",
|
|
372
368
|
compressed: compressed,
|
|
@@ -68,20 +68,20 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
68
68
|
value: {
|
|
69
69
|
defaultFullWidth: fullWidth
|
|
70
70
|
}
|
|
71
|
-
}, addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
71
|
+
}, startControl && addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
72
72
|
delimiter: delimiter,
|
|
73
73
|
isInvalid: showInvalidState
|
|
74
|
-
}), addClassesToControl(endControl)));
|
|
74
|
+
}), endControl && addClassesToControl(endControl)));
|
|
75
75
|
};
|
|
76
76
|
EuiFormControlLayoutDelimited.propTypes = {
|
|
77
77
|
/**
|
|
78
78
|
* Left side control
|
|
79
79
|
*/
|
|
80
|
-
startControl: _propTypes.default.element
|
|
80
|
+
startControl: _propTypes.default.element,
|
|
81
81
|
/**
|
|
82
82
|
* Right side control
|
|
83
83
|
*/
|
|
84
|
-
endControl: _propTypes.default.element
|
|
84
|
+
endControl: _propTypes.default.element,
|
|
85
85
|
/**
|
|
86
86
|
* The center content. Accepts a string to be wrapped in a subdued EuiText
|
|
87
87
|
* or a single ReactElement
|