@elastic/eui 85.1.0 → 86.0.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 (185) hide show
  1. package/dist/eui_charts_theme.js +26 -2
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  4. package/es/components/datagrid/body/data_grid_body.js +7 -7
  5. package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
  6. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  7. package/es/components/datagrid/body/data_grid_cell.js +14 -13
  8. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  9. package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  10. package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
  11. package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
  12. package/es/components/datagrid/controls/display_selector.js +1 -1
  13. package/es/components/datagrid/data_grid.js +7 -7
  14. package/es/components/datagrid/utils/in_memory.js +4 -4
  15. package/es/components/datagrid/utils/row_heights.js +4 -4
  16. package/es/components/date_picker/date_picker.js +1 -1
  17. package/es/components/drag_and_drop/drag_drop_context.js +1 -1
  18. package/es/components/drag_and_drop/draggable.js +2 -2
  19. package/es/components/drag_and_drop/droppable.js +1 -1
  20. package/es/components/drag_and_drop/index.js +3 -2
  21. package/es/components/header/header_section/header_section_item_button.js +94 -0
  22. package/es/components/highlight/highlight.js +2 -2
  23. package/es/components/inline_edit/inline_edit_text.js +2 -3
  24. package/es/components/inline_edit/inline_edit_title.js +2 -3
  25. package/es/components/inner_text/index.js +1 -2
  26. package/es/components/markdown_editor/markdown_actions.js +1 -1
  27. package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
  28. package/es/components/modal/confirm_modal.js +11 -29
  29. package/es/components/outside_click_detector/outside_click_detector.js +10 -11
  30. package/es/components/page/page_template.js +8 -8
  31. package/es/components/popover/wrapping_popover.js +1 -9
  32. package/es/components/portal/portal.js +34 -24
  33. package/es/components/tabs/tabs.js +25 -0
  34. package/es/components/timeline/timeline_item_icon.js +3 -3
  35. package/es/components/tour/tour_step.js +16 -12
  36. package/es/services/color/eui_palettes.js +7 -1
  37. package/es/services/color/index.js +1 -1
  38. package/es/services/index.js +1 -1
  39. package/es/services/time/timer.js +3 -5
  40. package/es/test/rtl/component_helpers.js +1 -1
  41. package/es/test/rtl/index.js +2 -1
  42. package/es/test/rtl/render_hook.js +23 -0
  43. package/eui.d.ts +1234 -748
  44. package/i18ntokens.json +144 -144
  45. package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  46. package/lib/components/datagrid/body/data_grid_body.js +7 -7
  47. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
  48. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  49. package/lib/components/datagrid/body/data_grid_cell.js +14 -13
  50. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  51. package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  52. package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
  53. package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
  54. package/lib/components/datagrid/controls/display_selector.js +1 -1
  55. package/lib/components/datagrid/data_grid.js +7 -7
  56. package/lib/components/datagrid/utils/in_memory.js +4 -4
  57. package/lib/components/datagrid/utils/row_heights.js +4 -4
  58. package/lib/components/date_picker/date_picker.js +1 -1
  59. package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
  60. package/lib/components/drag_and_drop/draggable.js +3 -3
  61. package/lib/components/drag_and_drop/droppable.js +2 -2
  62. package/lib/components/header/header_section/header_section_item_button.js +94 -0
  63. package/lib/components/highlight/highlight.js +2 -2
  64. package/lib/components/inline_edit/inline_edit_text.js +2 -3
  65. package/lib/components/inline_edit/inline_edit_title.js +2 -3
  66. package/lib/components/inner_text/index.js +1 -8
  67. package/lib/components/markdown_editor/markdown_actions.js +1 -1
  68. package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
  69. package/lib/components/modal/confirm_modal.js +10 -28
  70. package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
  71. package/lib/components/page/page_template.js +8 -8
  72. package/lib/components/popover/wrapping_popover.js +1 -9
  73. package/lib/components/portal/portal.js +34 -24
  74. package/lib/components/tabs/tabs.js +25 -0
  75. package/lib/components/timeline/timeline_item_icon.js +6 -3
  76. package/lib/components/tour/tour_step.js +15 -11
  77. package/lib/services/color/eui_palettes.js +9 -2
  78. package/lib/services/color/index.js +7 -0
  79. package/lib/services/index.js +7 -0
  80. package/lib/services/time/timer.js +3 -5
  81. package/lib/test/rtl/component_helpers.js +1 -1
  82. package/lib/test/rtl/index.js +13 -1
  83. package/lib/test/rtl/render_hook.js +29 -0
  84. package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
  85. package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
  86. package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
  87. package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
  88. package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
  89. package/optimize/es/components/date_picker/date_picker.js +1 -1
  90. package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
  91. package/optimize/es/components/drag_and_drop/draggable.js +2 -2
  92. package/optimize/es/components/drag_and_drop/droppable.js +1 -1
  93. package/optimize/es/components/drag_and_drop/index.js +3 -2
  94. package/optimize/es/components/highlight/highlight.js +2 -2
  95. package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
  96. package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
  97. package/optimize/es/components/inner_text/index.js +1 -2
  98. package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
  99. package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
  100. package/optimize/es/components/modal/confirm_modal.js +11 -24
  101. package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
  102. package/optimize/es/components/popover/wrapping_popover.js +1 -9
  103. package/optimize/es/components/portal/portal.js +34 -25
  104. package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
  105. package/optimize/es/components/tour/tour_step.js +16 -12
  106. package/optimize/es/services/color/eui_palettes.js +7 -1
  107. package/optimize/es/services/color/index.js +1 -1
  108. package/optimize/es/services/index.js +1 -1
  109. package/optimize/es/services/time/timer.js +3 -5
  110. package/optimize/es/test/rtl/component_helpers.js +1 -1
  111. package/optimize/es/test/rtl/index.js +2 -1
  112. package/optimize/es/test/rtl/render_hook.js +23 -0
  113. package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
  114. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
  115. package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
  116. package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
  117. package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
  118. package/optimize/lib/components/date_picker/date_picker.js +1 -1
  119. package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
  120. package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
  121. package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
  122. package/optimize/lib/components/highlight/highlight.js +2 -2
  123. package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
  124. package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
  125. package/optimize/lib/components/inner_text/index.js +1 -8
  126. package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
  127. package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
  128. package/optimize/lib/components/modal/confirm_modal.js +10 -23
  129. package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
  130. package/optimize/lib/components/popover/wrapping_popover.js +1 -9
  131. package/optimize/lib/components/portal/portal.js +34 -25
  132. package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
  133. package/optimize/lib/components/tour/tour_step.js +15 -11
  134. package/optimize/lib/services/color/eui_palettes.js +9 -2
  135. package/optimize/lib/services/color/index.js +7 -0
  136. package/optimize/lib/services/index.js +7 -0
  137. package/optimize/lib/services/time/timer.js +3 -5
  138. package/optimize/lib/test/rtl/component_helpers.js +1 -1
  139. package/optimize/lib/test/rtl/index.js +13 -1
  140. package/optimize/lib/test/rtl/render_hook.js +29 -0
  141. package/package.json +23 -16
  142. package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  143. package/test-env/components/datagrid/body/data_grid_body.js +7 -7
  144. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
  145. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  146. package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
  147. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  148. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  149. package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
  150. package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
  151. package/test-env/components/datagrid/controls/display_selector.js +1 -1
  152. package/test-env/components/datagrid/data_grid.js +7 -7
  153. package/test-env/components/datagrid/utils/in_memory.js +4 -4
  154. package/test-env/components/datagrid/utils/row_heights.js +4 -4
  155. package/test-env/components/date_picker/date_picker.js +1 -1
  156. package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
  157. package/test-env/components/drag_and_drop/draggable.js +3 -3
  158. package/test-env/components/drag_and_drop/droppable.js +2 -2
  159. package/test-env/components/header/header_section/header_section_item_button.js +94 -0
  160. package/test-env/components/highlight/highlight.js +2 -2
  161. package/test-env/components/inline_edit/inline_edit_text.js +2 -3
  162. package/test-env/components/inline_edit/inline_edit_title.js +2 -3
  163. package/test-env/components/inner_text/index.js +1 -8
  164. package/test-env/components/markdown_editor/markdown_actions.js +1 -1
  165. package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
  166. package/test-env/components/modal/confirm_modal.js +10 -23
  167. package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
  168. package/test-env/components/page/page_template.js +8 -8
  169. package/test-env/components/popover/wrapping_popover.js +1 -9
  170. package/test-env/components/portal/portal.js +34 -25
  171. package/test-env/components/tabs/tabs.js +25 -0
  172. package/test-env/components/timeline/timeline_item_icon.js +6 -3
  173. package/test-env/components/tour/tour_step.js +15 -11
  174. package/test-env/services/color/eui_palettes.js +9 -2
  175. package/test-env/services/color/index.js +7 -0
  176. package/test-env/services/index.js +7 -0
  177. package/test-env/services/time/timer.js +3 -5
  178. package/test-env/test/rtl/component_helpers.js +1 -1
  179. package/test-env/test/rtl/index.js +13 -1
  180. package/test-env/test/rtl/render_hook.js +29 -0
  181. package/es/components/inner_text/render_to_text.js +0 -47
  182. package/lib/components/inner_text/render_to_text.js +0 -54
  183. package/optimize/es/components/inner_text/render_to_text.js +0 -42
  184. package/optimize/lib/components/inner_text/render_to_text.js +0 -52
  185. package/test-env/components/inner_text/render_to_text.js +0 -52
@@ -7,12 +7,10 @@
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import PropTypes from "prop-types";
11
10
  import { jsx as ___EmotionJSX } from "@emotion/react";
12
11
  export var EuiComboBoxTitle = function EuiComboBoxTitle(_ref) {
13
12
  var children = _ref.children;
14
13
  return ___EmotionJSX("div", {
15
14
  className: "euiComboBoxTitle"
16
15
  }, children);
17
- };
18
- EuiComboBoxTitle.propTypes = {};
16
+ };
@@ -48,11 +48,11 @@ EuiDataGridBody.propTypes = {
48
48
  /**
49
49
  * Component to render for each row in the column
50
50
  */
51
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
51
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
52
52
  /**
53
53
  * Component to render in the optional column footer
54
54
  */
55
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
55
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
56
56
  /**
57
57
  * Optional props to pass to the column footer cell
58
58
  */
@@ -78,11 +78,11 @@ EuiDataGridBody.propTypes = {
78
78
  /**
79
79
  * Component to render for each row in the column
80
80
  */
81
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
81
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
82
82
  /**
83
83
  * Component to render in the optional column footer
84
84
  */
85
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
85
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
86
86
  /**
87
87
  * Optional props to pass to the column footer cell
88
88
  */
@@ -484,7 +484,7 @@ EuiDataGridBody.propTypes = {
484
484
  /**
485
485
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
486
486
  */
487
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
487
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
488
488
  /**
489
489
  * Configures the amount of cell action buttons immediately visible on a cell.
490
490
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -542,9 +542,9 @@ EuiDataGridBody.propTypes = {
542
542
  endRow: PropTypes.number.isRequired,
543
543
  visibleRowCount: PropTypes.number.isRequired
544
544
  }).isRequired,
545
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
545
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
546
546
  renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
547
- renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
547
+ renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
548
548
  renderCustomGridBody: PropTypes.func,
549
549
  interactiveCellId: PropTypes.string.isRequired,
550
550
  pagination: PropTypes.shape({
@@ -195,11 +195,11 @@ EuiDataGridBodyCustomRender.propTypes = {
195
195
  /**
196
196
  * Component to render for each row in the column
197
197
  */
198
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
198
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
199
199
  /**
200
200
  * Component to render in the optional column footer
201
201
  */
202
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
202
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
203
203
  /**
204
204
  * Optional props to pass to the column footer cell
205
205
  */
@@ -225,11 +225,11 @@ EuiDataGridBodyCustomRender.propTypes = {
225
225
  /**
226
226
  * Component to render for each row in the column
227
227
  */
228
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
228
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
229
229
  /**
230
230
  * Component to render in the optional column footer
231
231
  */
232
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
232
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
233
233
  /**
234
234
  * Optional props to pass to the column footer cell
235
235
  */
@@ -631,7 +631,7 @@ EuiDataGridBodyCustomRender.propTypes = {
631
631
  /**
632
632
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
633
633
  */
634
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
634
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
635
635
  /**
636
636
  * Configures the amount of cell action buttons immediately visible on a cell.
637
637
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -689,9 +689,9 @@ EuiDataGridBodyCustomRender.propTypes = {
689
689
  endRow: PropTypes.number.isRequired,
690
690
  visibleRowCount: PropTypes.number.isRequired
691
691
  }).isRequired,
692
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
692
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
693
693
  renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
694
- renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
694
+ renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
695
695
  renderCustomGridBody: PropTypes.func,
696
696
  interactiveCellId: PropTypes.string.isRequired,
697
697
  pagination: PropTypes.shape({
@@ -324,11 +324,11 @@ EuiDataGridBodyVirtualized.propTypes = {
324
324
  /**
325
325
  * Component to render for each row in the column
326
326
  */
327
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
327
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
328
328
  /**
329
329
  * Component to render in the optional column footer
330
330
  */
331
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
331
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
332
332
  /**
333
333
  * Optional props to pass to the column footer cell
334
334
  */
@@ -354,11 +354,11 @@ EuiDataGridBodyVirtualized.propTypes = {
354
354
  /**
355
355
  * Component to render for each row in the column
356
356
  */
357
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
357
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
358
358
  /**
359
359
  * Component to render in the optional column footer
360
360
  */
361
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
361
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
362
362
  /**
363
363
  * Optional props to pass to the column footer cell
364
364
  */
@@ -760,7 +760,7 @@ EuiDataGridBodyVirtualized.propTypes = {
760
760
  /**
761
761
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
762
762
  */
763
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
763
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
764
764
  /**
765
765
  * Configures the amount of cell action buttons immediately visible on a cell.
766
766
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -818,9 +818,9 @@ EuiDataGridBodyVirtualized.propTypes = {
818
818
  endRow: PropTypes.number.isRequired,
819
819
  visibleRowCount: PropTypes.number.isRequired
820
820
  }).isRequired,
821
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
821
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
822
822
  renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
823
- renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
823
+ renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
824
824
  renderCustomGridBody: PropTypes.func,
825
825
  interactiveCellId: PropTypes.string.isRequired,
826
826
  pagination: PropTypes.shape({
@@ -480,7 +480,7 @@ EuiDataGridCellContent.propTypes = {
480
480
  /**
481
481
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
482
482
  */
483
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
483
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
484
484
  /**
485
485
  * Configures the amount of cell action buttons immediately visible on a cell.
486
486
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -492,7 +492,7 @@ EuiDataGridCellContent.propTypes = {
492
492
  columnType: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.oneOf([null])]),
493
493
  isExpandable: PropTypes.bool.isRequired,
494
494
  className: PropTypes.string,
495
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
495
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
496
496
  renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
497
497
  setRowHeight: PropTypes.func,
498
498
  getRowHeight: PropTypes.func,
@@ -803,15 +803,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
803
803
  }
804
804
  });
805
805
  return _this;
806
- } // focus tracking is split between the entire grid & individual cells,
807
- // the parent grid owns which cell is focused,
808
- // but individual cells need to react to changes and also report that
809
- // they are focused in response to user actions like clicking on the cell
810
- // to avoid focus trap fighting, cells wait a tick after being clicked to allow
811
- // any existing traps to disconnect before the cell reports the new focus state to the parent grid
812
- // but because of this small delay, multiple cells could queue up focus and
813
- // create an infinite loop as the cells activate->deactivate->...
814
- // so we track the last timeout id and clear that request if superseded
806
+ }
815
807
  _createClass(EuiDataGridCell, [{
816
808
  key: "componentDidMount",
817
809
  value: function componentDidMount() {
@@ -1114,6 +1106,15 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
1114
1106
  }]);
1115
1107
  return EuiDataGridCell;
1116
1108
  }(Component);
1109
+ // focus tracking is split between the entire grid & individual cells,
1110
+ // the parent grid owns which cell is focused,
1111
+ // but individual cells need to react to changes and also report that
1112
+ // they are focused in response to user actions like clicking on the cell
1113
+ // to avoid focus trap fighting, cells wait a tick after being clicked to allow
1114
+ // any existing traps to disconnect before the cell reports the new focus state to the parent grid
1115
+ // but because of this small delay, multiple cells could queue up focus and
1116
+ // create an infinite loop as the cells activate->deactivate->...
1117
+ // so we track the last timeout id and clear that request if superseded
1117
1118
  _defineProperty(EuiDataGridCell, "activeFocusTimeoutId", undefined);
1118
1119
  _defineProperty(EuiDataGridCell, "contextType", DataGridFocusContext);
1119
1120
  EuiDataGridCell.propTypes = {
@@ -1438,7 +1439,7 @@ EuiDataGridCell.propTypes = {
1438
1439
  /**
1439
1440
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
1440
1441
  */
1441
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
1442
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
1442
1443
  /**
1443
1444
  * Configures the amount of cell action buttons immediately visible on a cell.
1444
1445
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -1465,7 +1466,7 @@ EuiDataGridCell.propTypes = {
1465
1466
  setPopoverContent: PropTypes.func.isRequired,
1466
1467
  setCellPopoverProps: PropTypes.func.isRequired
1467
1468
  }).isRequired,
1468
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
1469
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
1469
1470
  renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
1470
1471
  setRowHeight: PropTypes.func,
1471
1472
  getRowHeight: PropTypes.func,
@@ -52,11 +52,11 @@ EuiDataGridControlHeaderCell.propTypes = {
52
52
  /**
53
53
  * Component to render for each row in the column
54
54
  */
55
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
55
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
56
56
  /**
57
57
  * Component to render in the optional column footer
58
58
  */
59
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
59
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
60
60
  /**
61
61
  * Optional props to pass to the column footer cell
62
62
  */
@@ -550,7 +550,7 @@ EuiDataGridHeaderCell.propTypes = {
550
550
  /**
551
551
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
552
552
  */
553
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
553
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
554
554
  /**
555
555
  * Configures the amount of cell action buttons immediately visible on a cell.
556
556
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -97,11 +97,11 @@ EuiDataGridHeaderRow.propTypes = {
97
97
  /**
98
98
  * Component to render for each row in the column
99
99
  */
100
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
100
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
101
101
  /**
102
102
  * Component to render in the optional column footer
103
103
  */
104
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
104
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
105
105
  /**
106
106
  * Optional props to pass to the column footer cell
107
107
  */
@@ -127,11 +127,11 @@ EuiDataGridHeaderRow.propTypes = {
127
127
  /**
128
128
  * Component to render for each row in the column
129
129
  */
130
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
130
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
131
131
  /**
132
132
  * Component to render in the optional column footer
133
133
  */
134
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
134
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
135
135
  /**
136
136
  * Optional props to pass to the column footer cell
137
137
  */
@@ -533,7 +533,7 @@ EuiDataGridHeaderRow.propTypes = {
533
533
  /**
534
534
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
535
535
  */
536
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
536
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
537
537
  /**
538
538
  * Configures the amount of cell action buttons immediately visible on a cell.
539
539
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -1,3 +1,4 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  /*
2
3
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
4
  * or more contributor license agreements. Licensed under the Elastic License
@@ -6,7 +7,7 @@
6
7
  * Side Public License, v 1.
7
8
  */
8
9
 
9
- import React from 'react';
10
+ import React, { isValidElement } from 'react';
10
11
  import { EuiScreenReaderOnly } from '../../accessibility';
11
12
  import { IS_JEST_ENVIRONMENT } from '../../../utils';
12
13
 
@@ -58,40 +59,44 @@ export function checkOrDefaultToolBarDisplayOptions(arg, option) {
58
59
  return true;
59
60
  }
60
61
  }
61
- export function renderAdditionalControls(toolbarVisibility, position) {
62
- var _additionalControlsOb;
62
+ export var renderAdditionalControls = function renderAdditionalControls(toolbarVisibility, position) {
63
63
  if (typeof toolbarVisibility === 'boolean') return null;
64
64
  var _ref2 = toolbarVisibility || {},
65
65
  additionalControls = _ref2.additionalControls;
66
66
  if (!additionalControls) return null;
67
67
 
68
- // Typescript is having obj issues, so we need to force cast to EuiDataGridToolBarAdditionalControlsOptions here
69
- var additionalControlsObj = (additionalControls === null || additionalControls === void 0 ? void 0 : additionalControls.constructor) === Object ? additionalControls : {};
70
- // Typescript workarounds continued
71
- var leftPositionObj = ((_additionalControlsOb = additionalControlsObj.left) === null || _additionalControlsOb === void 0 ? void 0 : _additionalControlsOb.constructor) === Object ? additionalControlsObj.left : {};
72
- if (position === 'right') {
73
- if (additionalControlsObj !== null && additionalControlsObj !== void 0 && additionalControlsObj.right) {
74
- return additionalControlsObj.right;
68
+ // API backwards compatability: if the consumer passed a single ReactNode
69
+ // to `additionalControls`, default to the left append position.
70
+ if ( /*#__PURE__*/isValidElement(additionalControls) && position === 'left.append') {
71
+ return additionalControls;
72
+ }
73
+ if (_typeof(additionalControls) !== 'object') {
74
+ return null;
75
+ }
76
+ var handleLeftObjectConfig = function handleLeftObjectConfig(leftConfig) {
77
+ if (position === 'left.prepend') {
78
+ return leftConfig.prepend;
75
79
  }
76
- } else if (position === 'left.prepend') {
77
- if (leftPositionObj !== null && leftPositionObj !== void 0 && leftPositionObj.prepend) {
78
- return leftPositionObj.prepend;
80
+ if (position === 'left.append') {
81
+ return leftConfig.append;
79
82
  }
80
- } else if (position === 'left.append') {
81
- if (leftPositionObj !== null && leftPositionObj !== void 0 && leftPositionObj.append) {
82
- return leftPositionObj.append;
83
+ };
84
+ var handleObjectConfig = function handleObjectConfig(additionalControls) {
85
+ if (position === 'right') {
86
+ return additionalControls.right;
83
87
  }
84
- if ( /*#__PURE__*/React.isValidElement(additionalControlsObj === null || additionalControlsObj === void 0 ? void 0 : additionalControlsObj.left)) {
85
- // If the consumer passed a single ReactNode to `additionalControls.left`, default to the left append position
86
- return additionalControlsObj.left;
88
+ // API backwards compatability: If the consumer passed a single ReactNode
89
+ // to `additionalControls.left`, default to the left append position
90
+ if ( /*#__PURE__*/isValidElement(additionalControls.left) && position === 'left.append') {
91
+ return additionalControls.left;
87
92
  }
88
- if ( /*#__PURE__*/React.isValidElement(additionalControls)) {
89
- // API backwards compatability: if the consumer passed a single ReactNode to `additionalControls`, default to the the left append position
90
- return additionalControls;
93
+ if (additionalControls.left && _typeof(additionalControls.left) === 'object') {
94
+ return handleLeftObjectConfig(additionalControls.left);
91
95
  }
92
- }
93
- return null;
94
- }
96
+ };
97
+ var rendered = handleObjectConfig(additionalControls);
98
+ return rendered || null;
99
+ };
95
100
 
96
101
  /**
97
102
  * Utility helper for selectors/controls that allow nested options
@@ -101,7 +106,7 @@ export function renderAdditionalControls(toolbarVisibility, position) {
101
106
  export function getNestedObjectOptions(controlOption, objectKey) {
102
107
  var _controlOption$object;
103
108
  // If the config is a boolean, nested options follow that boolean
104
- if (controlOption === false || controlOption === true) return controlOption;
109
+ if (typeof controlOption === 'boolean') return controlOption;
105
110
  // If config is not defined, default to enabled
106
111
  if (controlOption == null) return true;
107
112
  // Otherwise, type should be an object of boolean values - dive into it and return the value
@@ -132,7 +132,7 @@ export var useDataGridDisplaySelector = function useDataGridDisplaySelector(show
132
132
  setUserRowHeightsOptions(rowHeightsOptions);
133
133
  }, [lineCount]);
134
134
  var setLineCountHeight = useCallback(function (event) {
135
- var newLineCount = Number(event.target.value);
135
+ var newLineCount = Number(event.currentTarget.value);
136
136
  if (newLineCount < 1) return; // Don't let users set a 0 or negative line count
137
137
 
138
138
  setLineCount(newLineCount);
@@ -791,7 +791,7 @@ EuiDataGrid.propTypes = {
791
791
  /**
792
792
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
793
793
  */
794
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
794
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
795
795
  /**
796
796
  * Configures the amount of cell action buttons immediately visible on a cell.
797
797
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -823,11 +823,11 @@ EuiDataGrid.propTypes = {
823
823
  /**
824
824
  * Component to render for each row in the column
825
825
  */
826
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
826
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
827
827
  /**
828
828
  * Component to render in the optional column footer
829
829
  */
830
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
830
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
831
831
  /**
832
832
  * Optional props to pass to the column footer cell
833
833
  */
@@ -857,11 +857,11 @@ EuiDataGrid.propTypes = {
857
857
  /**
858
858
  * Component to render for each row in the column
859
859
  */
860
- rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
860
+ rowCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
861
861
  /**
862
862
  * Component to render in the optional column footer
863
863
  */
864
- footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
864
+ footerCellRender: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
865
865
  /**
866
866
  * Optional props to pass to the column footer cell
867
867
  */
@@ -936,7 +936,7 @@ EuiDataGrid.propTypes = {
936
936
  * allowing hooks, context, and other React concepts to be used. The function receives #EuiDataGridCellValueElementProps
937
937
  * as its only argument.
938
938
  */
939
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
939
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
940
940
  /**
941
941
  * An optional function that can be used to completely customize the rendering of cell popovers.
942
942
  *
@@ -955,7 +955,7 @@ EuiDataGrid.propTypes = {
955
955
  * allowing hooks, context, and other React concepts to be used. The function receives #EuiDataGridCellValueElementProps
956
956
  * as its only argument.
957
957
  */
958
- renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
958
+ renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
959
959
  /**
960
960
  * An optional function called to completely customize and control the rendering of
961
961
  * EuiDataGrid's body and cell placement. This can be used to, e.g. remove EuiDataGrid's
@@ -153,9 +153,9 @@ export var EuiDataGridInMemoryRenderer = function EuiDataGridInMemoryRenderer(_r
153
153
  var cellDivs = documentFragment.childNodes[0].childNodes;
154
154
  for (var i = 0; i < cellDivs.length; i++) {
155
155
  var cellDiv = cellDivs[i];
156
- var _rowIndex = parseInt(cellDiv.getAttribute('data-dg-row'), 10);
156
+ var rowIndex = parseInt(cellDiv.getAttribute('data-dg-row'), 10);
157
157
  var column = cellDiv.getAttribute('data-dg-column');
158
- onCellRender(_rowIndex, column, getElementText(cellDiv));
158
+ onCellRender(rowIndex, column, getElementText(cellDiv));
159
159
  }
160
160
  // changes to documentFragment.children is reflected by `cells`
161
161
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -589,7 +589,7 @@ EuiDataGridInMemoryRenderer.propTypes = {
589
589
  /**
590
590
  * Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
591
591
  */
592
- cellActions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired),
592
+ cellActions: PropTypes.arrayOf(PropTypes.elementType.isRequired),
593
593
  /**
594
594
  * Configures the amount of cell action buttons immediately visible on a cell.
595
595
  * Any cell actions above this number will only display in the cell expansion popover.
@@ -598,7 +598,7 @@ EuiDataGridInMemoryRenderer.propTypes = {
598
598
  visibleCellActions: PropTypes.number
599
599
  }).isRequired).isRequired,
600
600
  rowCount: PropTypes.number.isRequired,
601
- renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]).isRequired,
601
+ renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
602
602
  onCellRender: PropTypes.func.isRequired
603
603
  };
604
604
  function noop() {}
@@ -208,15 +208,15 @@ export var RowHeightVirtualizationUtils = /*#__PURE__*/function (_RowHeightUtils
208
208
  var _this2;
209
209
  _classCallCheck(this, RowHeightVirtualizationUtils);
210
210
  _this2 = _super.call(this);
211
- _this2.gridRef = gridRef;
212
- _this2.outerGridElementRef = outerGridElementRef;
213
- _this2.gridItemsRenderedRef = gridItemsRenderedRef;
214
- _this2.rerenderGridBodyRef = rerenderGridBodyRef;
215
211
  /**
216
212
  * Virtualization workarounds for auto height rows
217
213
  */
218
214
  _defineProperty(_assertThisInitialized(_this2), "timerId", void 0);
219
215
  _defineProperty(_assertThisInitialized(_this2), "lastUpdatedRow", Infinity);
216
+ _this2.gridRef = gridRef;
217
+ _this2.outerGridElementRef = outerGridElementRef;
218
+ _this2.gridItemsRenderedRef = gridItemsRenderedRef;
219
+ _this2.rerenderGridBodyRef = rerenderGridBodyRef;
220
220
  return _this2;
221
221
  }
222
222
  _createClass(RowHeightVirtualizationUtils, [{
@@ -142,7 +142,7 @@ export var EuiDatePicker = function EuiDatePicker(_ref) {
142
142
  inputValidityRef = _useState2[0],
143
143
  _setInputValidityRef = _useState2[1];
144
144
  var setInputValidityRef = useCallback(function (ref) {
145
- _setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
145
+ _setInputValidityRef((ref === null || ref === void 0 ? void 0 : ref.input) || null);
146
146
  }, []);
147
147
  useEuiValidatableControl({
148
148
  isInvalid: isInvalid,
@@ -17,7 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
17
17
  */
18
18
 
19
19
  import React, { useState, createContext } from 'react';
20
- import { DragDropContext } from 'react-beautiful-dnd';
20
+ import { DragDropContext } from '@hello-pangea/dnd';
21
21
 
22
22
  // export interface EuiDragDropContextProps extends DragDropContextProps {}
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -18,7 +18,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
18
18
 
19
19
  import React, { Fragment, cloneElement, useContext } from 'react';
20
20
  import PropTypes from "prop-types";
21
- import { Draggable } from 'react-beautiful-dnd';
21
+ import { Draggable } from '@hello-pangea/dnd';
22
22
  import classNames from 'classnames';
23
23
  import { EuiDroppableContext } from './droppable';
24
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -67,7 +67,7 @@ export var EuiDraggable = function EuiDraggable(_ref) {
67
67
  'euiDraggable__item--isDragging': snapshot.isDragging,
68
68
  'euiDraggable__item--isDropAnimating': snapshot.isDropAnimating
69
69
  });
70
- var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children; // as specified by `DraggableProps`
70
+ var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
71
71
  return ___EmotionJSX(Fragment, null, ___EmotionJSX("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
72
72
  ref: provided.innerRef,
73
73
  "data-test-subj": dataTestSubj,
@@ -12,7 +12,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
12
12
 
13
13
  import React, { useContext } from 'react';
14
14
  import PropTypes from "prop-types";
15
- import { Droppable } from 'react-beautiful-dnd';
15
+ import { Droppable } from '@hello-pangea/dnd';
16
16
  import classNames from 'classnames';
17
17
  import { EuiDragDropContextContext } from './drag_drop_context';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -11,5 +11,6 @@ export { EuiDraggable } from './draggable';
11
11
  export { EuiDroppable } from './droppable';
12
12
  export { euiDragDropCopy, euiDragDropMove, euiDragDropReorder } from './services';
13
13
 
14
- // Interfaces in react-beautiful-dnd that EUI abstracts over
15
- // allows consumers to pull these from EUI instead of react-beautiful-dnd
14
+ // Interfaces in @hello-pangea/dnd (a fork of react-beautiful-dnd) that EUI
15
+ // abstracts over allows consumers to pull these from EUI
16
+ // instead of @hello-pangea/dnd