@elastic/eui 77.1.1 → 77.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +30 -29
  2. package/dist/eui_theme_dark.css +70 -158
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +70 -158
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.a11y.js +202 -0
  7. package/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
  8. package/es/components/date_picker/date_picker.js +23 -15
  9. package/es/components/date_picker/date_picker_range.js +36 -42
  10. package/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  11. package/es/components/form/field_number/field_number.js +39 -8
  12. package/es/components/form/field_text/field_text.js +1 -1
  13. package/es/components/form/form_control_layout/form_control_layout.js +67 -30
  14. package/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  15. package/es/components/form/form_control_layout/form_control_layout_icons.js +12 -20
  16. package/es/components/form/range/dual_range.js +2 -4
  17. package/es/components/form/range/range.js +0 -2
  18. package/es/components/form/range/range_input.js +54 -13
  19. package/es/components/form/validatable_control/validatable_control.js +15 -5
  20. package/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  21. package/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
  22. package/es/components/suggest/suggest.a11y.js +70 -0
  23. package/es/components/table/table.a11y.js +75 -0
  24. package/eui.d.ts +54 -54
  25. package/i18ntokens.json +26 -8
  26. package/lib/components/basic_table/basic_table.a11y.js +194 -0
  27. package/lib/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +2 -2
  28. package/lib/components/date_picker/date_picker.js +23 -15
  29. package/lib/components/date_picker/date_picker_range.js +35 -41
  30. package/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  31. package/lib/components/form/field_number/field_number.js +42 -8
  32. package/lib/components/form/field_text/field_text.js +1 -1
  33. package/lib/components/form/form_control_layout/form_control_layout.js +67 -35
  34. package/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  35. package/lib/components/form/form_control_layout/form_control_layout_icons.js +11 -19
  36. package/lib/components/form/range/dual_range.js +2 -4
  37. package/lib/components/form/range/range.js +0 -2
  38. package/lib/components/form/range/range_input.js +52 -11
  39. package/lib/components/form/validatable_control/validatable_control.js +14 -12
  40. package/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  41. package/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
  42. package/lib/components/suggest/suggest.a11y.js +73 -0
  43. package/lib/components/table/table.a11y.js +78 -0
  44. package/optimize/es/components/basic_table/basic_table.a11y.js +194 -0
  45. package/optimize/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
  46. package/optimize/es/components/date_picker/date_picker.js +17 -14
  47. package/optimize/es/components/date_picker/date_picker_range.js +20 -14
  48. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  49. package/optimize/es/components/form/field_number/field_number.js +34 -8
  50. package/optimize/es/components/form/field_text/field_text.js +1 -1
  51. package/optimize/es/components/form/form_control_layout/form_control_layout.js +67 -30
  52. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  53. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +10 -20
  54. package/optimize/es/components/form/range/dual_range.js +2 -4
  55. package/optimize/es/components/form/range/range.js +0 -2
  56. package/optimize/es/components/form/range/range_input.js +49 -12
  57. package/optimize/es/components/form/validatable_control/validatable_control.js +10 -5
  58. package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  59. package/optimize/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
  60. package/optimize/es/components/suggest/suggest.a11y.js +70 -0
  61. package/optimize/es/components/table/table.a11y.js +75 -0
  62. package/optimize/lib/components/basic_table/basic_table.a11y.js +188 -0
  63. package/{test-env/components/basic_table/table.a11y.js → optimize/lib/components/basic_table/in_memory_table.a11y.js} +2 -2
  64. package/optimize/lib/components/date_picker/date_picker.js +17 -14
  65. package/optimize/lib/components/date_picker/date_picker_range.js +19 -13
  66. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  67. package/optimize/lib/components/form/field_number/field_number.js +37 -8
  68. package/optimize/lib/components/form/field_text/field_text.js +1 -1
  69. package/optimize/lib/components/form/form_control_layout/form_control_layout.js +67 -35
  70. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  71. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +9 -19
  72. package/optimize/lib/components/form/range/dual_range.js +2 -4
  73. package/optimize/lib/components/form/range/range.js +0 -2
  74. package/optimize/lib/components/form/range/range_input.js +47 -10
  75. package/optimize/lib/components/form/validatable_control/validatable_control.js +10 -4
  76. package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  77. package/optimize/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
  78. package/optimize/lib/components/suggest/suggest.a11y.js +73 -0
  79. package/optimize/lib/components/table/table.a11y.js +78 -0
  80. package/package.json +1 -1
  81. package/src/components/date_picker/_date_picker_range.scss +0 -60
  82. package/src/components/date_picker/super_date_picker/_super_date_picker.scss +23 -11
  83. package/src/components/date_picker/super_date_picker/_variables.scss +3 -0
  84. package/src/components/date_picker/super_date_picker/date_popover/_date_popover_button.scss +5 -7
  85. package/src/components/form/form_control_layout/_form_control_layout.scss +2 -2
  86. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +12 -36
  87. package/src/components/form/form_control_layout/_form_control_layout_icons.scss +27 -6
  88. package/src/themes/amsterdam/overrides/_date_picker.scss +0 -14
  89. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  90. package/test-env/components/basic_table/basic_table.a11y.js +188 -0
  91. package/{optimize/lib/components/basic_table/table.a11y.js → test-env/components/basic_table/in_memory_table.a11y.js} +2 -2
  92. package/test-env/components/date_picker/date_picker.js +23 -15
  93. package/test-env/components/date_picker/date_picker_range.js +35 -41
  94. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  95. package/test-env/components/form/field_number/field_number.js +37 -8
  96. package/test-env/components/form/field_text/field_text.js +1 -1
  97. package/test-env/components/form/form_control_layout/form_control_layout.js +68 -35
  98. package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  99. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +11 -19
  100. package/test-env/components/form/range/dual_range.js +2 -4
  101. package/test-env/components/form/range/range.js +0 -2
  102. package/test-env/components/form/range/range_input.js +47 -11
  103. package/test-env/components/form/validatable_control/validatable_control.js +9 -4
  104. package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  105. package/test-env/components/search_bar/query/ast_to_es_query_string.js +3 -0
  106. package/test-env/components/suggest/suggest.a11y.js +73 -0
  107. package/test-env/components/table/table.a11y.js +78 -0
  108. package/src/themes/amsterdam/overrides/_date_popover_button.scss +0 -14
@@ -17,7 +17,7 @@ var _services = require("../../services");
17
17
  var _context = require("../context");
18
18
  var _reactDatepicker = require("./react-datepicker");
19
19
  var _react2 = require("@emotion/react");
20
- var _excluded = ["adjustDateOnChange", "calendarClassName", "className", "customInput", "dateFormat", "dayClassName", "disabled", "excludeDates", "filterDate", "fullWidth", "iconType", "injectTimes", "inline", "inputRef", "isInvalid", "isLoading", "locale", "maxDate", "maxTime", "minDate", "minTime", "onChange", "onClear", "openToDate", "placeholder", "popperClassName", "popoverPlacement", "selected", "shadow", "shouldCloseOnSelect", "showIcon", "showTimeSelect", "showTimeSelectOnly", "timeFormat", "utcOffset"];
20
+ var _excluded = ["adjustDateOnChange", "calendarClassName", "className", "controlOnly", "customInput", "dateFormat", "dayClassName", "disabled", "excludeDates", "filterDate", "fullWidth", "iconType", "injectTimes", "inline", "inputRef", "isInvalid", "isLoading", "locale", "maxDate", "maxTime", "minDate", "minTime", "onChange", "onClear", "openToDate", "placeholder", "popperClassName", "popoverPlacement", "selected", "shadow", "shouldCloseOnSelect", "showIcon", "showTimeSelect", "showTimeSelectOnly", "timeFormat", "utcOffset"];
21
21
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
  var euiDatePickerDefaultDateFormat = 'MM/DD/YYYY';
@@ -56,6 +56,7 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
56
56
  adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
57
57
  calendarClassName = _ref.calendarClassName,
58
58
  className = _ref.className,
59
+ controlOnly = _ref.controlOnly,
59
60
  customInput = _ref.customInput,
60
61
  _ref$dateFormat = _ref.dateFormat,
61
62
  dateFormat = _ref$dateFormat === void 0 ? euiDatePickerDefaultDateFormat : _ref$dateFormat,
@@ -101,7 +102,7 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
101
102
  'euiDatePicker--shadow': shadow,
102
103
  'euiDatePicker--inline': inline
103
104
  });
104
- var numIconsClass = (0, _num_icons.getFormControlClassNameForIconCount)({
105
+ var numIconsClass = controlOnly ? false : (0, _num_icons.getFormControlClassNameForIconCount)({
105
106
  isInvalid: isInvalid,
106
107
  isLoading: isLoading
107
108
  });
@@ -142,17 +143,7 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
142
143
  controlEl: inputValidityRef
143
144
  });
144
145
  var inputRefs = (0, _services.useCombinedRefs)([inputRef, setInputValidityRef]);
145
- return (0, _react2.jsx)("span", {
146
- className: classes
147
- }, (0, _react2.jsx)(_form.EuiFormControlLayout, {
148
- icon: optionalIcon,
149
- fullWidth: fullWidth,
150
- clear: selected && onClear ? {
151
- onClick: onClear
152
- } : undefined,
153
- isLoading: isLoading,
154
- isInvalid: isInvalid
155
- }, (0, _react2.jsx)(_context.EuiI18nConsumer, null, function (_ref2) {
146
+ var control = (0, _react2.jsx)(_context.EuiI18nConsumer, null, function (_ref2) {
156
147
  var contextLocale = _ref2.locale;
157
148
  return (0, _react2.jsx)(_reactDatepicker.ReactDatePicker, (0, _extends2.default)({
158
149
  adjustDateOnChange: adjustDateOnChange,
@@ -188,6 +179,18 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
188
179
  accessibleMode: true,
189
180
  popperPlacement: popoverPlacement
190
181
  }, rest));
191
- })));
182
+ });
183
+ if (controlOnly) return control;
184
+ return (0, _react2.jsx)("span", {
185
+ className: classes
186
+ }, (0, _react2.jsx)(_form.EuiFormControlLayout, {
187
+ icon: optionalIcon,
188
+ fullWidth: fullWidth,
189
+ clear: selected && onClear ? {
190
+ onClick: onClear
191
+ } : undefined,
192
+ isLoading: isLoading,
193
+ isInvalid: isInvalid
194
+ }, control));
192
195
  };
193
196
  exports.EuiDatePicker = EuiDatePicker;
@@ -10,9 +10,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
- var _icon = require("../icon");
13
+ var _form = require("../form");
14
14
  var _react2 = require("@emotion/react");
15
- var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "fullWidth", "isCustom", "readOnly", "isInvalid", "disabled", "onFocus", "onBlur"];
15
+ var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "fullWidth", "isCustom", "readOnly", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"];
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
18
  var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
@@ -29,6 +29,8 @@ var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
29
29
  disabled = _ref.disabled,
30
30
  _onFocus = _ref.onFocus,
31
31
  _onBlur = _ref.onBlur,
32
+ append = _ref.append,
33
+ prepend = _ref.prepend,
32
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
33
35
  var classes = (0, _classnames.default)('euiDatePickerRange', {
34
36
  'euiDatePickerRange--fullWidth': fullWidth,
@@ -40,8 +42,8 @@ var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
40
42
  var endControl = endDateControl;
41
43
  if (!isCustom) {
42
44
  startControl = /*#__PURE__*/(0, _react.cloneElement)(startDateControl, {
43
- iconType: typeof iconType === 'boolean' ? undefined : iconType,
44
- showIcon: !!iconType,
45
+ controlOnly: true,
46
+ showIcon: false,
45
47
  fullWidth: fullWidth,
46
48
  readOnly: readOnly,
47
49
  disabled: disabled || startDateControl.props.disabled,
@@ -59,6 +61,7 @@ var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
59
61
  }
60
62
  });
61
63
  endControl = /*#__PURE__*/(0, _react.cloneElement)(endDateControl, {
64
+ controlOnly: true,
62
65
  showIcon: false,
63
66
  fullWidth: fullWidth,
64
67
  readOnly: readOnly,
@@ -78,14 +81,17 @@ var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
78
81
  }
79
82
  });
80
83
  }
81
- var delimiter = (0, _react2.jsx)("span", {
82
- className: "euiDatePickerRange__delimeter"
83
- }, (0, _react2.jsx)(_icon.EuiIcon, {
84
- color: isInvalid ? 'danger' : 'subdued',
85
- type: "sortRight"
86
- }));
87
- return (0, _react2.jsx)("div", (0, _extends2.default)({
88
- className: classes
89
- }, rest), children ? children : (0, _react2.jsx)(_react.Fragment, null, startControl, delimiter, endControl));
84
+ return (0, _react2.jsx)(_form.EuiFormControlLayoutDelimited, (0, _extends2.default)({
85
+ icon: iconType === true ? 'calendar' : iconType || undefined,
86
+ className: classes,
87
+ startControl: startControl,
88
+ endControl: endControl,
89
+ fullWidth: fullWidth,
90
+ readOnly: readOnly,
91
+ isDisabled: disabled,
92
+ isInvalid: isInvalid,
93
+ append: append,
94
+ prepend: prepend
95
+ }, rest));
90
96
  };
91
97
  exports.EuiDatePickerRange = EuiDatePickerRange;
@@ -200,6 +200,36 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
200
200
  _this.asyncInterval = new _async_interval.AsyncInterval(handler, refreshInterval);
201
201
  }
202
202
  });
203
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderQuickSelect", function () {
204
+ var _this$props2 = _this.props,
205
+ start = _this$props2.start,
206
+ end = _this$props2.end,
207
+ customQuickSelectPanels = _this$props2.customQuickSelectPanels,
208
+ customQuickSelectRender = _this$props2.customQuickSelectRender,
209
+ commonlyUsedRanges = _this$props2.commonlyUsedRanges,
210
+ timeOptions = _this$props2.timeOptions,
211
+ dateFormat = _this$props2.dateFormat,
212
+ onRefreshChange = _this$props2.onRefreshChange,
213
+ recentlyUsedRanges = _this$props2.recentlyUsedRanges,
214
+ refreshInterval = _this$props2.refreshInterval,
215
+ isPaused = _this$props2.isPaused,
216
+ isDisabled = _this$props2.isDisabled;
217
+ return (0, _react2.jsx)(_quick_select_popover.EuiQuickSelectPopover, {
218
+ applyRefreshInterval: onRefreshChange ? _this.onRefreshChange : undefined,
219
+ applyTime: _this.applyQuickTime,
220
+ commonlyUsedRanges: commonlyUsedRanges,
221
+ customQuickSelectPanels: customQuickSelectPanels,
222
+ customQuickSelectRender: customQuickSelectRender,
223
+ dateFormat: dateFormat,
224
+ end: end,
225
+ isDisabled: isDisabled,
226
+ isPaused: isPaused,
227
+ recentlyUsedRanges: recentlyUsedRanges,
228
+ refreshInterval: refreshInterval,
229
+ start: start,
230
+ timeOptions: timeOptions
231
+ });
232
+ });
203
233
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderDatePickerRange", function () {
204
234
  var _this$state = _this.state,
205
235
  end = _this$state.end,
@@ -209,24 +239,47 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
209
239
  isStartDatePopoverOpen = _this$state.isStartDatePopoverOpen,
210
240
  showPrettyDuration = _this$state.showPrettyDuration,
211
241
  start = _this$state.start;
212
- var _this$props2 = _this.props,
213
- commonlyUsedRanges = _this$props2.commonlyUsedRanges,
214
- timeOptions = _this$props2.timeOptions,
215
- dateFormat = _this$props2.dateFormat,
216
- isDisabled = _this$props2.isDisabled,
217
- locale = _this$props2.locale,
218
- timeFormat = _this$props2.timeFormat,
219
- utcOffset = _this$props2.utcOffset,
220
- compressed = _this$props2.compressed,
221
- onFocus = _this$props2.onFocus;
242
+ var _this$props3 = _this.props,
243
+ isQuickSelectOnly = _this$props3.isQuickSelectOnly,
244
+ showUpdateButton = _this$props3.showUpdateButton,
245
+ commonlyUsedRanges = _this$props3.commonlyUsedRanges,
246
+ timeOptions = _this$props3.timeOptions,
247
+ dateFormat = _this$props3.dateFormat,
248
+ refreshInterval = _this$props3.refreshInterval,
249
+ isPaused = _this$props3.isPaused,
250
+ isDisabled = _this$props3.isDisabled,
251
+ isLoading = _this$props3.isLoading,
252
+ locale = _this$props3.locale,
253
+ timeFormat = _this$props3.timeFormat,
254
+ utcOffset = _this$props3.utcOffset,
255
+ compressed = _this$props3.compressed,
256
+ onFocus = _this$props3.onFocus,
257
+ className = _this$props3.className,
258
+ dataTestSubj = _this$props3['data-test-subj'];
259
+ var autoRefreshAppend = !isPaused ? (0, _react2.jsx)(_auto_refresh.EuiAutoRefreshButton, {
260
+ refreshInterval: refreshInterval,
261
+ isDisabled: isDisabled,
262
+ isPaused: isPaused,
263
+ onRefreshChange: _this.onRefreshChange,
264
+ shortHand: true
265
+ }) : undefined;
266
+ var formControlLayoutProps = {
267
+ className: (0, _classnames.default)('euiSuperDatePicker', className),
268
+ compressed: compressed,
269
+ isInvalid: isInvalid,
270
+ isLoading: isLoading && !showUpdateButton,
271
+ disabled: isDisabled,
272
+ prepend: _this.renderQuickSelect(),
273
+ append: autoRefreshAppend,
274
+ 'data-test-subj': dataTestSubj
275
+ };
276
+ if (isQuickSelectOnly) {
277
+ return (0, _react2.jsx)(_form.EuiFormControlLayout, (0, _extends2.default)({
278
+ iconsPosition: "static"
279
+ }, formControlLayoutProps));
280
+ }
222
281
  if (showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
223
- return (0, _react2.jsx)(_date_picker_range.EuiDatePickerRange, {
224
- className: "euiDatePickerRange--inGroup",
225
- iconType: false,
226
- isCustom: true,
227
- startDateControl: (0, _react2.jsx)("div", null),
228
- endDateControl: (0, _react2.jsx)("div", null)
229
- }, (0, _react2.jsx)("button", {
282
+ return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, (0, _react2.jsx)("button", {
230
283
  className: (0, _classnames.default)('euiSuperDatePicker__prettyFormat', {
231
284
  'euiSuperDatePicker__prettyFormat--disabled': isDisabled
232
285
  }),
@@ -243,12 +296,12 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
243
296
  }
244
297
  return (0, _react2.jsx)(_context.EuiI18nConsumer, null, function (_ref4) {
245
298
  var contextLocale = _ref4.locale;
246
- return (0, _react2.jsx)(_date_picker_range.EuiDatePickerRange, {
247
- className: "euiDatePickerRange--inGroup",
248
- iconType: false,
249
- isInvalid: isInvalid,
250
- disabled: isDisabled,
299
+ return (0, _react2.jsx)(_date_picker_range.EuiDatePickerRange, (0, _extends2.default)({}, formControlLayoutProps, {
300
+ className: (0, _classnames.default)(formControlLayoutProps.className, {
301
+ 'euiSuperDatePicker--needsUpdating': hasChanged && !isDisabled && !isInvalid
302
+ }),
251
303
  isCustom: true,
304
+ iconType: false,
252
305
  startDateControl: (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
253
306
  className: "euiSuperDatePicker__startPopoverButton",
254
307
  compressed: compressed,
@@ -291,15 +344,15 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
291
344
  onFocus: onFocus
292
345
  }
293
346
  })
294
- });
347
+ }));
295
348
  });
296
349
  });
297
350
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClickUpdateButton", function () {
298
351
  if (!_this.state.hasChanged && _this.props.onRefresh) {
299
- var _this$props3 = _this.props,
300
- start = _this$props3.start,
301
- end = _this$props3.end,
302
- refreshInterval = _this$props3.refreshInterval;
352
+ var _this$props4 = _this.props,
353
+ start = _this$props4.start,
354
+ end = _this$props4.end,
355
+ refreshInterval = _this$props4.refreshInterval;
303
356
  _this.props.onRefresh({
304
357
  start: start,
305
358
  end: end,
@@ -310,12 +363,12 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
310
363
  }
311
364
  });
312
365
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderUpdateButton", function () {
313
- var _this$props4 = _this.props,
314
- isLoading = _this$props4.isLoading,
315
- isDisabled = _this$props4.isDisabled,
316
- updateButtonProps = _this$props4.updateButtonProps,
317
- showUpdateButton = _this$props4.showUpdateButton,
318
- compressed = _this$props4.compressed;
366
+ var _this$props5 = _this.props,
367
+ isLoading = _this$props5.isLoading,
368
+ isDisabled = _this$props5.isDisabled,
369
+ updateButtonProps = _this$props5.updateButtonProps,
370
+ showUpdateButton = _this$props5.showUpdateButton,
371
+ compressed = _this$props5.compressed;
319
372
  if (!showUpdateButton) return null;
320
373
  return (0, _react2.jsx)(_flex.EuiFlexItem, {
321
374
  grow: false
@@ -335,52 +388,21 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
335
388
  (0, _createClass2.default)(EuiSuperDatePickerInternal, [{
336
389
  key: "render",
337
390
  value: function render() {
338
- var _this$props5 = this.props,
339
- commonlyUsedRanges = _this$props5.commonlyUsedRanges,
340
- timeOptions = _this$props5.timeOptions,
341
- customQuickSelectPanels = _this$props5.customQuickSelectPanels,
342
- customQuickSelectRender = _this$props5.customQuickSelectRender,
343
- dateFormat = _this$props5.dateFormat,
344
- end = _this$props5.end,
345
- isAutoRefreshOnly = _this$props5.isAutoRefreshOnly,
346
- isDisabled = _this$props5.isDisabled,
347
- isPaused = _this$props5.isPaused,
348
- onRefreshChange = _this$props5.onRefreshChange,
349
- recentlyUsedRanges = _this$props5.recentlyUsedRanges,
350
- refreshInterval = _this$props5.refreshInterval,
351
- showUpdateButton = _this$props5.showUpdateButton,
352
- start = _this$props5.start,
353
- dataTestSubj = _this$props5['data-test-subj'],
354
- _width = _this$props5.width,
355
- isQuickSelectOnly = _this$props5.isQuickSelectOnly,
356
- compressed = _this$props5.compressed,
357
- className = _this$props5.className;
391
+ var _this$props6 = this.props,
392
+ isAutoRefreshOnly = _this$props6.isAutoRefreshOnly,
393
+ isDisabled = _this$props6.isDisabled,
394
+ isPaused = _this$props6.isPaused,
395
+ onRefreshChange = _this$props6.onRefreshChange,
396
+ refreshInterval = _this$props6.refreshInterval,
397
+ showUpdateButton = _this$props6.showUpdateButton,
398
+ dataTestSubj = _this$props6['data-test-subj'],
399
+ _width = _this$props6.width,
400
+ isQuickSelectOnly = _this$props6.isQuickSelectOnly,
401
+ compressed = _this$props6.compressed,
402
+ className = _this$props6.className;
358
403
 
359
404
  // Force reduction in width if showing quick select only
360
405
  var width = isQuickSelectOnly ? 'auto' : _width;
361
- var autoRefreshAppend = !isPaused ? (0, _react2.jsx)(_auto_refresh.EuiAutoRefreshButton, {
362
- className: "euiFormControlLayout__append",
363
- refreshInterval: refreshInterval,
364
- isDisabled: isDisabled,
365
- isPaused: isPaused,
366
- onRefreshChange: this.onRefreshChange,
367
- shortHand: true
368
- }) : undefined;
369
- var quickSelect = (0, _react2.jsx)(_quick_select_popover.EuiQuickSelectPopover, {
370
- applyRefreshInterval: onRefreshChange ? this.onRefreshChange : undefined,
371
- applyTime: this.applyQuickTime,
372
- commonlyUsedRanges: commonlyUsedRanges,
373
- customQuickSelectPanels: customQuickSelectPanels,
374
- customQuickSelectRender: customQuickSelectRender,
375
- dateFormat: dateFormat,
376
- end: end,
377
- isDisabled: isDisabled,
378
- isPaused: isPaused,
379
- recentlyUsedRanges: recentlyUsedRanges,
380
- refreshInterval: refreshInterval,
381
- start: start,
382
- timeOptions: timeOptions
383
- });
384
406
  var flexWrapperClasses = (0, _classnames.default)('euiSuperDatePicker__flexWrapper', {
385
407
  'euiSuperDatePicker__flexWrapper--noUpdateButton': !showUpdateButton,
386
408
  'euiSuperDatePicker__flexWrapper--isAutoRefreshOnly': isAutoRefreshOnly,
@@ -401,14 +423,7 @@ var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
401
423
  isDisabled: isDisabled,
402
424
  "data-test-subj": dataTestSubj,
403
425
  className: className
404
- })) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_form.EuiFormControlLayout, {
405
- className: (0, _classnames.default)('euiSuperDatePicker', className),
406
- compressed: compressed,
407
- isDisabled: isDisabled,
408
- prepend: quickSelect,
409
- append: autoRefreshAppend,
410
- "data-test-subj": dataTestSubj
411
- }, !isQuickSelectOnly && this.renderDatePickerRange())), this.renderUpdateButton()));
426
+ })) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, this.renderDatePickerRange()), this.renderUpdateButton()));
412
427
  }
413
428
  }], [{
414
429
  key: "getDerivedStateFromProps",
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.EuiFieldNumber = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = _interopRequireDefault(require("react"));
12
+ var _react = _interopRequireWildcard(require("react"));
11
13
  var _classnames = _interopRequireDefault(require("classnames"));
12
- var _form_control_layout = require("../form_control_layout");
14
+ var _services = require("../../../services");
13
15
  var _validatable_control = require("../validatable_control");
14
- var _eui_form_context = require("../eui_form_context");
16
+ var _form_control_layout = require("../form_control_layout");
15
17
  var _num_icons = require("../form_control_layout/_num_icons");
18
+ var _eui_form_context = require("../eui_form_context");
16
19
  var _react2 = require("@emotion/react");
17
- var _excluded = ["className", "icon", "id", "placeholder", "name", "min", "max", "value", "isInvalid", "fullWidth", "isLoading", "compressed", "prepend", "append", "inputRef", "readOnly", "controlOnly"];
20
+ var _excluded = ["className", "icon", "id", "placeholder", "name", "min", "max", "value", "isInvalid", "fullWidth", "isLoading", "compressed", "prepend", "append", "inputRef", "readOnly", "controlOnly", "onKeyDown"];
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
23
  var EuiFieldNumber = function EuiFieldNumber(props) {
19
24
  var _useFormContext = (0, _eui_form_context.useFormContext)(),
20
25
  defaultFullWidth = _useFormContext.defaultFullWidth;
@@ -38,9 +43,31 @@ var EuiFieldNumber = function EuiFieldNumber(props) {
38
43
  inputRef = props.inputRef,
39
44
  readOnly = props.readOnly,
40
45
  controlOnly = props.controlOnly,
46
+ _onKeyDown = props.onKeyDown,
41
47
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
42
- var numIconsClass = (0, _num_icons.getFormControlClassNameForIconCount)({
43
- isInvalid: isInvalid,
48
+
49
+ // Attempt to determine additional invalid state. The native number input
50
+ // will set :invalid state automatically, but we need to also set
51
+ // `aria-invalid` as well as display an icon. We also want to *not* set this on
52
+ // EuiValidatableControl, in order to not override custom validity messages
53
+ var _useState = (0, _react.useState)(false),
54
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
55
+ isNativelyInvalid = _useState2[0],
56
+ setIsNativelyInvalid = _useState2[1];
57
+ var validityRef = (0, _react.useRef)(null);
58
+ var setRefs = (0, _services.useCombinedRefs)([validityRef, inputRef]);
59
+
60
+ // Note that we can't use hook into `onChange` because browsers don't emit change events
61
+ // for invalid values - see https://github.com/facebook/react/issues/16554
62
+ var onKeyDown = (0, _react.useCallback)(function (e) {
63
+ _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
64
+ // Wait a beat before checking validity - we can't use `e.target` as it's stale
65
+ requestAnimationFrame(function () {
66
+ setIsNativelyInvalid(!validityRef.current.validity.valid);
67
+ });
68
+ }, [_onKeyDown]);
69
+ var numIconsClass = controlOnly ? false : (0, _num_icons.getFormControlClassNameForIconCount)({
70
+ isInvalid: isInvalid || isNativelyInvalid,
44
71
  isLoading: isLoading
45
72
  });
46
73
  var classes = (0, _classnames.default)('euiFieldNumber', className, numIconsClass, {
@@ -62,7 +89,9 @@ var EuiFieldNumber = function EuiFieldNumber(props) {
62
89
  placeholder: placeholder,
63
90
  readOnly: readOnly,
64
91
  className: classes,
65
- ref: inputRef
92
+ ref: setRefs,
93
+ onKeyDown: onKeyDown,
94
+ "aria-invalid": isInvalid || isNativelyInvalid
66
95
  }, rest)));
67
96
  if (controlOnly) {
68
97
  return control;
@@ -71,7 +100,7 @@ var EuiFieldNumber = function EuiFieldNumber(props) {
71
100
  icon: icon,
72
101
  fullWidth: fullWidth,
73
102
  isLoading: isLoading,
74
- isInvalid: isInvalid,
103
+ isInvalid: isInvalid || isNativelyInvalid,
75
104
  compressed: compressed,
76
105
  readOnly: readOnly,
77
106
  prepend: prepend,
@@ -35,7 +35,7 @@ var EuiFieldText = function EuiFieldText(props) {
35
35
  readOnly = props.readOnly,
36
36
  controlOnly = props.controlOnly,
37
37
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
38
- var numIconsClass = (0, _num_icons.getFormControlClassNameForIconCount)({
38
+ var numIconsClass = controlOnly ? false : (0, _num_icons.getFormControlClassNameForIconCount)({
39
39
  isInvalid: isInvalid,
40
40
  isLoading: isLoading
41
41
  });
@@ -6,16 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.EuiFormControlLayout = void 0;
9
- Object.defineProperty(exports, "ICON_SIDES", {
10
- enumerable: true,
11
- get: function get() {
12
- return _form_control_layout_icons.ICON_SIDES;
13
- }
14
- });
15
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
16
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
18
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
19
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
20
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
@@ -26,7 +21,7 @@ var _form_control_layout_icons = require("./form_control_layout_icons");
26
21
  var _form_label = require("../form_label");
27
22
  var _eui_form_context = require("../eui_form_context");
28
23
  var _react2 = require("@emotion/react");
29
- var _excluded = ["children", "icon", "clear", "fullWidth", "isLoading", "isDisabled", "compressed", "className", "prepend", "append", "readOnly", "isInvalid", "isDropdown", "inputId"];
24
+ var _excluded = ["children", "icon", "iconsPosition", "clear", "fullWidth", "isLoading", "isDisabled", "compressed", "className", "prepend", "append", "readOnly", "isInvalid", "isDropdown", "inputId"];
30
25
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
32
27
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -35,31 +30,75 @@ var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
35
30
  (0, _inherits2.default)(EuiFormControlLayout, _Component);
36
31
  var _super = _createSuper(EuiFormControlLayout);
37
32
  function EuiFormControlLayout() {
33
+ var _this;
38
34
  (0, _classCallCheck2.default)(this, EuiFormControlLayout);
39
- return _super.apply(this, arguments);
35
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
+ args[_key] = arguments[_key];
37
+ }
38
+ _this = _super.call.apply(_super, [this].concat(args));
39
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderLeftIcons", function () {
40
+ var _this$props = _this.props,
41
+ icon = _this$props.icon,
42
+ iconsPosition = _this$props.iconsPosition,
43
+ compressed = _this$props.compressed;
44
+ var leftCustomIcon = icon && (icon === null || icon === void 0 ? void 0 : icon.side) !== 'right' ? icon : undefined;
45
+ return leftCustomIcon ? (0, _react2.jsx)(_form_control_layout_icons.EuiFormControlLayoutIcons, {
46
+ side: "left",
47
+ icon: leftCustomIcon,
48
+ iconsPosition: iconsPosition,
49
+ compressed: compressed
50
+ }) : null;
51
+ });
52
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRightIcons", function () {
53
+ var _this$props2 = _this.props,
54
+ icon = _this$props2.icon,
55
+ iconsPosition = _this$props2.iconsPosition,
56
+ clear = _this$props2.clear,
57
+ compressed = _this$props2.compressed,
58
+ isLoading = _this$props2.isLoading,
59
+ isInvalid = _this$props2.isInvalid,
60
+ isDisabled = _this$props2.isDisabled,
61
+ readOnly = _this$props2.readOnly,
62
+ isDropdown = _this$props2.isDropdown;
63
+ var hasDropdownIcon = !readOnly && !isDisabled && isDropdown;
64
+ var rightCustomIcon = icon && (icon === null || icon === void 0 ? void 0 : icon.side) === 'right' ? icon : undefined;
65
+ var hasRightIcons = rightCustomIcon || clear || isLoading || isInvalid || hasDropdownIcon;
66
+ return hasRightIcons ? (0, _react2.jsx)(_form_control_layout_icons.EuiFormControlLayoutIcons, {
67
+ side: "right",
68
+ icon: rightCustomIcon,
69
+ iconsPosition: iconsPosition,
70
+ compressed: compressed,
71
+ clear: clear,
72
+ isLoading: isLoading,
73
+ isInvalid: isInvalid,
74
+ isDropdown: hasDropdownIcon
75
+ }) : null;
76
+ });
77
+ return _this;
40
78
  }
41
79
  (0, _createClass2.default)(EuiFormControlLayout, [{
42
80
  key: "render",
43
81
  value: function render() {
44
82
  var _ref = this.context,
45
83
  defaultFullWidth = _ref.defaultFullWidth;
46
- var _this$props = this.props,
47
- children = _this$props.children,
48
- icon = _this$props.icon,
49
- clear = _this$props.clear,
50
- _this$props$fullWidth = _this$props.fullWidth,
51
- fullWidth = _this$props$fullWidth === void 0 ? defaultFullWidth : _this$props$fullWidth,
52
- isLoading = _this$props.isLoading,
53
- isDisabled = _this$props.isDisabled,
54
- compressed = _this$props.compressed,
55
- className = _this$props.className,
56
- prepend = _this$props.prepend,
57
- append = _this$props.append,
58
- readOnly = _this$props.readOnly,
59
- invalid = _this$props.isInvalid,
60
- isDropdown = _this$props.isDropdown,
61
- inputId = _this$props.inputId,
62
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
84
+ var _this$props3 = this.props,
85
+ children = _this$props3.children,
86
+ icon = _this$props3.icon,
87
+ iconsPosition = _this$props3.iconsPosition,
88
+ clear = _this$props3.clear,
89
+ _this$props3$fullWidt = _this$props3.fullWidth,
90
+ fullWidth = _this$props3$fullWidt === void 0 ? defaultFullWidth : _this$props3$fullWidt,
91
+ isLoading = _this$props3.isLoading,
92
+ isDisabled = _this$props3.isDisabled,
93
+ compressed = _this$props3.compressed,
94
+ className = _this$props3.className,
95
+ prepend = _this$props3.prepend,
96
+ append = _this$props3.append,
97
+ readOnly = _this$props3.readOnly,
98
+ isInvalid = _this$props3.isInvalid,
99
+ isDropdown = _this$props3.isDropdown,
100
+ inputId = _this$props3.inputId,
101
+ rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
63
102
  var classes = (0, _classnames.default)('euiFormControlLayout', {
64
103
  'euiFormControlLayout--fullWidth': fullWidth,
65
104
  'euiFormControlLayout--compressed': compressed,
@@ -73,19 +112,12 @@ var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
73
112
  className: classes
74
113
  }, rest), prependNodes, (0, _react2.jsx)("div", {
75
114
  className: "euiFormControlLayout__childrenWrapper"
76
- }, children, (0, _react2.jsx)(_form_control_layout_icons.EuiFormControlLayoutIcons, {
77
- icon: icon,
78
- clear: clear,
79
- compressed: compressed,
80
- isLoading: isLoading,
81
- isInvalid: invalid,
82
- isDropdown: !readOnly && !isDisabled && isDropdown
83
- })), appendNodes);
115
+ }, this.renderLeftIcons(), children, this.renderRightIcons()), appendNodes);
84
116
  }
85
117
  }, {
86
118
  key: "renderSideNode",
87
119
  value: function renderSideNode(side, nodes, inputId) {
88
- var _this = this;
120
+ var _this2 = this;
89
121
  if (!nodes) {
90
122
  return;
91
123
  }
@@ -93,7 +125,7 @@ var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
93
125
  return this.createFormLabel(side, nodes, inputId);
94
126
  }
95
127
  var appendNodes = _react.default.Children.map(nodes, function (item, index) {
96
- return typeof item === 'string' ? _this.createFormLabel(side, item, inputId) : _this.createSideNode(side, item, index);
128
+ return typeof item === 'string' ? _this2.createFormLabel(side, item, inputId) : _this2.createSideNode(side, item, index);
97
129
  });
98
130
  return appendNodes;
99
131
  }