@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.
- package/dist/eui_charts_theme.js +26 -2
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/data_grid_cell.js +14 -13
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/es/components/datagrid/controls/display_selector.js +1 -1
- package/es/components/datagrid/data_grid.js +7 -7
- package/es/components/datagrid/utils/in_memory.js +4 -4
- package/es/components/datagrid/utils/row_heights.js +4 -4
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/es/components/drag_and_drop/draggable.js +2 -2
- package/es/components/drag_and_drop/droppable.js +1 -1
- package/es/components/drag_and_drop/index.js +3 -2
- package/es/components/header/header_section/header_section_item_button.js +94 -0
- package/es/components/highlight/highlight.js +2 -2
- package/es/components/inline_edit/inline_edit_text.js +2 -3
- package/es/components/inline_edit/inline_edit_title.js +2 -3
- package/es/components/inner_text/index.js +1 -2
- package/es/components/markdown_editor/markdown_actions.js +1 -1
- package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/es/components/modal/confirm_modal.js +11 -29
- package/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/es/components/page/page_template.js +8 -8
- package/es/components/popover/wrapping_popover.js +1 -9
- package/es/components/portal/portal.js +34 -24
- package/es/components/tabs/tabs.js +25 -0
- package/es/components/timeline/timeline_item_icon.js +3 -3
- package/es/components/tour/tour_step.js +16 -12
- package/es/services/color/eui_palettes.js +7 -1
- package/es/services/color/index.js +1 -1
- package/es/services/index.js +1 -1
- package/es/services/time/timer.js +3 -5
- package/es/test/rtl/component_helpers.js +1 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/render_hook.js +23 -0
- package/eui.d.ts +1234 -748
- package/i18ntokens.json +144 -144
- package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/data_grid_cell.js +14 -13
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
- package/lib/components/datagrid/controls/display_selector.js +1 -1
- package/lib/components/datagrid/data_grid.js +7 -7
- package/lib/components/datagrid/utils/in_memory.js +4 -4
- package/lib/components/datagrid/utils/row_heights.js +4 -4
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/lib/components/drag_and_drop/draggable.js +3 -3
- package/lib/components/drag_and_drop/droppable.js +2 -2
- package/lib/components/header/header_section/header_section_item_button.js +94 -0
- package/lib/components/highlight/highlight.js +2 -2
- package/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/lib/components/inner_text/index.js +1 -8
- package/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/lib/components/modal/confirm_modal.js +10 -28
- package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/lib/components/page/page_template.js +8 -8
- package/lib/components/popover/wrapping_popover.js +1 -9
- package/lib/components/portal/portal.js +34 -24
- package/lib/components/tabs/tabs.js +25 -0
- package/lib/components/timeline/timeline_item_icon.js +6 -3
- package/lib/components/tour/tour_step.js +15 -11
- package/lib/services/color/eui_palettes.js +9 -2
- package/lib/services/color/index.js +7 -0
- package/lib/services/index.js +7 -0
- package/lib/services/time/timer.js +3 -5
- package/lib/test/rtl/component_helpers.js +1 -1
- package/lib/test/rtl/index.js +13 -1
- package/lib/test/rtl/render_hook.js +29 -0
- package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/es/components/date_picker/date_picker.js +1 -1
- package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +2 -2
- package/optimize/es/components/drag_and_drop/droppable.js +1 -1
- package/optimize/es/components/drag_and_drop/index.js +3 -2
- package/optimize/es/components/highlight/highlight.js +2 -2
- package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/es/components/inner_text/index.js +1 -2
- package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/es/components/modal/confirm_modal.js +11 -24
- package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/es/components/popover/wrapping_popover.js +1 -9
- package/optimize/es/components/portal/portal.js +34 -25
- package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
- package/optimize/es/components/tour/tour_step.js +16 -12
- package/optimize/es/services/color/eui_palettes.js +7 -1
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/time/timer.js +3 -5
- package/optimize/es/test/rtl/component_helpers.js +1 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/render_hook.js +23 -0
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/lib/components/date_picker/date_picker.js +1 -1
- package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
- package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
- package/optimize/lib/components/highlight/highlight.js +2 -2
- package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/lib/components/inner_text/index.js +1 -8
- package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/lib/components/modal/confirm_modal.js +10 -23
- package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/lib/components/popover/wrapping_popover.js +1 -9
- package/optimize/lib/components/portal/portal.js +34 -25
- package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
- package/optimize/lib/components/tour/tour_step.js +15 -11
- package/optimize/lib/services/color/eui_palettes.js +9 -2
- package/optimize/lib/services/color/index.js +7 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/time/timer.js +3 -5
- package/optimize/lib/test/rtl/component_helpers.js +1 -1
- package/optimize/lib/test/rtl/index.js +13 -1
- package/optimize/lib/test/rtl/render_hook.js +29 -0
- package/package.json +23 -16
- package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/test-env/components/datagrid/controls/display_selector.js +1 -1
- package/test-env/components/datagrid/data_grid.js +7 -7
- package/test-env/components/datagrid/utils/in_memory.js +4 -4
- package/test-env/components/datagrid/utils/row_heights.js +4 -4
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
- package/test-env/components/drag_and_drop/draggable.js +3 -3
- package/test-env/components/drag_and_drop/droppable.js +2 -2
- package/test-env/components/header/header_section/header_section_item_button.js +94 -0
- package/test-env/components/highlight/highlight.js +2 -2
- package/test-env/components/inline_edit/inline_edit_text.js +2 -3
- package/test-env/components/inline_edit/inline_edit_title.js +2 -3
- package/test-env/components/inner_text/index.js +1 -8
- package/test-env/components/markdown_editor/markdown_actions.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/test-env/components/modal/confirm_modal.js +10 -23
- package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
- package/test-env/components/page/page_template.js +8 -8
- package/test-env/components/popover/wrapping_popover.js +1 -9
- package/test-env/components/portal/portal.js +34 -25
- package/test-env/components/tabs/tabs.js +25 -0
- package/test-env/components/timeline/timeline_item_icon.js +6 -3
- package/test-env/components/tour/tour_step.js +15 -11
- package/test-env/services/color/eui_palettes.js +9 -2
- package/test-env/services/color/index.js +7 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/time/timer.js +3 -5
- package/test-env/test/rtl/component_helpers.js +1 -1
- package/test-env/test/rtl/index.js +13 -1
- package/test-env/test/rtl/render_hook.js +29 -0
- package/es/components/inner_text/render_to_text.js +0 -47
- package/lib/components/inner_text/render_to_text.js +0 -54
- package/optimize/es/components/inner_text/render_to_text.js +0 -42
- package/optimize/lib/components/inner_text/render_to_text.js +0 -52
- package/test-env/components/inner_text/render_to_text.js +0 -52
|
@@ -54,11 +54,11 @@ EuiDataGridBody.propTypes = {
|
|
|
54
54
|
/**
|
|
55
55
|
* Component to render for each row in the column
|
|
56
56
|
*/
|
|
57
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
57
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
58
58
|
/**
|
|
59
59
|
* Component to render in the optional column footer
|
|
60
60
|
*/
|
|
61
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
61
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
62
62
|
/**
|
|
63
63
|
* Optional props to pass to the column footer cell
|
|
64
64
|
*/
|
|
@@ -84,11 +84,11 @@ EuiDataGridBody.propTypes = {
|
|
|
84
84
|
/**
|
|
85
85
|
* Component to render for each row in the column
|
|
86
86
|
*/
|
|
87
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
87
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
88
88
|
/**
|
|
89
89
|
* Component to render in the optional column footer
|
|
90
90
|
*/
|
|
91
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
91
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
92
92
|
/**
|
|
93
93
|
* Optional props to pass to the column footer cell
|
|
94
94
|
*/
|
|
@@ -490,7 +490,7 @@ EuiDataGridBody.propTypes = {
|
|
|
490
490
|
/**
|
|
491
491
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
492
492
|
*/
|
|
493
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
493
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
494
494
|
/**
|
|
495
495
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
496
496
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -548,9 +548,9 @@ EuiDataGridBody.propTypes = {
|
|
|
548
548
|
endRow: _propTypes.default.number.isRequired,
|
|
549
549
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
550
550
|
}).isRequired,
|
|
551
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
551
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
552
552
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
553
|
-
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
553
|
+
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
554
554
|
renderCustomGridBody: _propTypes.default.func,
|
|
555
555
|
interactiveCellId: _propTypes.default.string.isRequired,
|
|
556
556
|
pagination: _propTypes.default.shape({
|
|
@@ -193,11 +193,11 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
193
193
|
/**
|
|
194
194
|
* Component to render for each row in the column
|
|
195
195
|
*/
|
|
196
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
196
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
197
197
|
/**
|
|
198
198
|
* Component to render in the optional column footer
|
|
199
199
|
*/
|
|
200
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
200
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
201
201
|
/**
|
|
202
202
|
* Optional props to pass to the column footer cell
|
|
203
203
|
*/
|
|
@@ -223,11 +223,11 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
223
223
|
/**
|
|
224
224
|
* Component to render for each row in the column
|
|
225
225
|
*/
|
|
226
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
226
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
227
227
|
/**
|
|
228
228
|
* Component to render in the optional column footer
|
|
229
229
|
*/
|
|
230
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
230
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
231
231
|
/**
|
|
232
232
|
* Optional props to pass to the column footer cell
|
|
233
233
|
*/
|
|
@@ -629,7 +629,7 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
629
629
|
/**
|
|
630
630
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
631
631
|
*/
|
|
632
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
632
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
633
633
|
/**
|
|
634
634
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
635
635
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -687,9 +687,9 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
687
687
|
endRow: _propTypes.default.number.isRequired,
|
|
688
688
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
689
689
|
}).isRequired,
|
|
690
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
690
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
691
691
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
692
|
-
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
692
|
+
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
693
693
|
renderCustomGridBody: _propTypes.default.func,
|
|
694
694
|
interactiveCellId: _propTypes.default.string.isRequired,
|
|
695
695
|
pagination: _propTypes.default.shape({
|
|
@@ -331,11 +331,11 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
331
331
|
/**
|
|
332
332
|
* Component to render for each row in the column
|
|
333
333
|
*/
|
|
334
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
334
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
335
335
|
/**
|
|
336
336
|
* Component to render in the optional column footer
|
|
337
337
|
*/
|
|
338
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
338
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
339
339
|
/**
|
|
340
340
|
* Optional props to pass to the column footer cell
|
|
341
341
|
*/
|
|
@@ -361,11 +361,11 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
361
361
|
/**
|
|
362
362
|
* Component to render for each row in the column
|
|
363
363
|
*/
|
|
364
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
364
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
365
365
|
/**
|
|
366
366
|
* Component to render in the optional column footer
|
|
367
367
|
*/
|
|
368
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
368
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
369
369
|
/**
|
|
370
370
|
* Optional props to pass to the column footer cell
|
|
371
371
|
*/
|
|
@@ -767,7 +767,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
767
767
|
/**
|
|
768
768
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
769
769
|
*/
|
|
770
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
770
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
771
771
|
/**
|
|
772
772
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
773
773
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -825,9 +825,9 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
825
825
|
endRow: _propTypes.default.number.isRequired,
|
|
826
826
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
827
827
|
}).isRequired,
|
|
828
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
828
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
829
829
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
830
|
-
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
830
|
+
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
831
831
|
renderCustomGridBody: _propTypes.default.func,
|
|
832
832
|
interactiveCellId: _propTypes.default.string.isRequired,
|
|
833
833
|
pagination: _propTypes.default.shape({
|
|
@@ -483,7 +483,7 @@ EuiDataGridCellContent.propTypes = {
|
|
|
483
483
|
/**
|
|
484
484
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
485
485
|
*/
|
|
486
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
486
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
487
487
|
/**
|
|
488
488
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
489
489
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -495,7 +495,7 @@ EuiDataGridCellContent.propTypes = {
|
|
|
495
495
|
columnType: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.oneOf([null])]),
|
|
496
496
|
isExpandable: _propTypes.default.bool.isRequired,
|
|
497
497
|
className: _propTypes.default.string,
|
|
498
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
498
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
499
499
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
500
500
|
setRowHeight: _propTypes.default.func,
|
|
501
501
|
getRowHeight: _propTypes.default.func,
|
|
@@ -806,15 +806,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
806
806
|
}
|
|
807
807
|
});
|
|
808
808
|
return _this;
|
|
809
|
-
}
|
|
810
|
-
// the parent grid owns which cell is focused,
|
|
811
|
-
// but individual cells need to react to changes and also report that
|
|
812
|
-
// they are focused in response to user actions like clicking on the cell
|
|
813
|
-
// to avoid focus trap fighting, cells wait a tick after being clicked to allow
|
|
814
|
-
// any existing traps to disconnect before the cell reports the new focus state to the parent grid
|
|
815
|
-
// but because of this small delay, multiple cells could queue up focus and
|
|
816
|
-
// create an infinite loop as the cells activate->deactivate->...
|
|
817
|
-
// so we track the last timeout id and clear that request if superseded
|
|
809
|
+
}
|
|
818
810
|
(0, _createClass2.default)(EuiDataGridCell, [{
|
|
819
811
|
key: "componentDidMount",
|
|
820
812
|
value: function componentDidMount() {
|
|
@@ -1118,6 +1110,15 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
1118
1110
|
return EuiDataGridCell;
|
|
1119
1111
|
}(_react.Component);
|
|
1120
1112
|
exports.EuiDataGridCell = EuiDataGridCell;
|
|
1113
|
+
// focus tracking is split between the entire grid & individual cells,
|
|
1114
|
+
// the parent grid owns which cell is focused,
|
|
1115
|
+
// but individual cells need to react to changes and also report that
|
|
1116
|
+
// they are focused in response to user actions like clicking on the cell
|
|
1117
|
+
// to avoid focus trap fighting, cells wait a tick after being clicked to allow
|
|
1118
|
+
// any existing traps to disconnect before the cell reports the new focus state to the parent grid
|
|
1119
|
+
// but because of this small delay, multiple cells could queue up focus and
|
|
1120
|
+
// create an infinite loop as the cells activate->deactivate->...
|
|
1121
|
+
// so we track the last timeout id and clear that request if superseded
|
|
1121
1122
|
(0, _defineProperty2.default)(EuiDataGridCell, "activeFocusTimeoutId", undefined);
|
|
1122
1123
|
(0, _defineProperty2.default)(EuiDataGridCell, "contextType", _focus.DataGridFocusContext);
|
|
1123
1124
|
EuiDataGridCell.propTypes = {
|
|
@@ -1442,7 +1443,7 @@ EuiDataGridCell.propTypes = {
|
|
|
1442
1443
|
/**
|
|
1443
1444
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
1444
1445
|
*/
|
|
1445
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
1446
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
1446
1447
|
/**
|
|
1447
1448
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
1448
1449
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -1469,7 +1470,7 @@ EuiDataGridCell.propTypes = {
|
|
|
1469
1470
|
setPopoverContent: _propTypes.default.func.isRequired,
|
|
1470
1471
|
setCellPopoverProps: _propTypes.default.func.isRequired
|
|
1471
1472
|
}).isRequired,
|
|
1472
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
1473
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
1473
1474
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
1474
1475
|
setRowHeight: _propTypes.default.func,
|
|
1475
1476
|
getRowHeight: _propTypes.default.func,
|
|
@@ -60,11 +60,11 @@ EuiDataGridControlHeaderCell.propTypes = {
|
|
|
60
60
|
/**
|
|
61
61
|
* Component to render for each row in the column
|
|
62
62
|
*/
|
|
63
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
63
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
64
64
|
/**
|
|
65
65
|
* Component to render in the optional column footer
|
|
66
66
|
*/
|
|
67
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
67
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
68
68
|
/**
|
|
69
69
|
* Optional props to pass to the column footer cell
|
|
70
70
|
*/
|
|
@@ -553,7 +553,7 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
553
553
|
/**
|
|
554
554
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
555
555
|
*/
|
|
556
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
556
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
557
557
|
/**
|
|
558
558
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
559
559
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -106,11 +106,11 @@ EuiDataGridHeaderRow.propTypes = {
|
|
|
106
106
|
/**
|
|
107
107
|
* Component to render for each row in the column
|
|
108
108
|
*/
|
|
109
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
109
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
110
110
|
/**
|
|
111
111
|
* Component to render in the optional column footer
|
|
112
112
|
*/
|
|
113
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
113
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
114
114
|
/**
|
|
115
115
|
* Optional props to pass to the column footer cell
|
|
116
116
|
*/
|
|
@@ -136,11 +136,11 @@ EuiDataGridHeaderRow.propTypes = {
|
|
|
136
136
|
/**
|
|
137
137
|
* Component to render for each row in the column
|
|
138
138
|
*/
|
|
139
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
139
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
140
140
|
/**
|
|
141
141
|
* Component to render in the optional column footer
|
|
142
142
|
*/
|
|
143
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
143
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
144
144
|
/**
|
|
145
145
|
* Optional props to pass to the column footer cell
|
|
146
146
|
*/
|
|
@@ -542,7 +542,7 @@ EuiDataGridHeaderRow.propTypes = {
|
|
|
542
542
|
/**
|
|
543
543
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
544
544
|
*/
|
|
545
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
545
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
546
546
|
/**
|
|
547
547
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
548
548
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiDataGridToolbar = void 0;
|
|
8
9
|
exports.checkOrDefaultToolBarDisplayOptions = checkOrDefaultToolBarDisplayOptions;
|
|
9
10
|
exports.getNestedObjectOptions = getNestedObjectOptions;
|
|
10
|
-
exports.renderAdditionalControls =
|
|
11
|
-
var
|
|
11
|
+
exports.renderAdditionalControls = void 0;
|
|
12
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
14
|
var _accessibility = require("../../accessibility");
|
|
13
15
|
var _utils = require("../../../utils");
|
|
14
16
|
var _react2 = require("@emotion/react");
|
|
17
|
+
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); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
15
19
|
/*
|
|
16
20
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
21
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -68,50 +72,54 @@ function checkOrDefaultToolBarDisplayOptions(arg, option) {
|
|
|
68
72
|
return true;
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
|
-
function renderAdditionalControls(toolbarVisibility, position) {
|
|
72
|
-
var _additionalControlsOb;
|
|
75
|
+
var renderAdditionalControls = function renderAdditionalControls(toolbarVisibility, position) {
|
|
73
76
|
if (typeof toolbarVisibility === 'boolean') return null;
|
|
74
77
|
var _ref2 = toolbarVisibility || {},
|
|
75
78
|
additionalControls = _ref2.additionalControls;
|
|
76
79
|
if (!additionalControls) return null;
|
|
77
80
|
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
// API backwards compatability: if the consumer passed a single ReactNode
|
|
82
|
+
// to `additionalControls`, default to the left append position.
|
|
83
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(additionalControls) && position === 'left.append') {
|
|
84
|
+
return additionalControls;
|
|
85
|
+
}
|
|
86
|
+
if ((0, _typeof2.default)(additionalControls) !== 'object') {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
var handleLeftObjectConfig = function handleLeftObjectConfig(leftConfig) {
|
|
90
|
+
if (position === 'left.prepend') {
|
|
91
|
+
return leftConfig.prepend;
|
|
85
92
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return leftPositionObj.prepend;
|
|
93
|
+
if (position === 'left.append') {
|
|
94
|
+
return leftConfig.append;
|
|
89
95
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
};
|
|
97
|
+
var handleObjectConfig = function handleObjectConfig(additionalControls) {
|
|
98
|
+
if (position === 'right') {
|
|
99
|
+
return additionalControls.right;
|
|
93
100
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
// API backwards compatability: If the consumer passed a single ReactNode
|
|
102
|
+
// to `additionalControls.left`, default to the left append position
|
|
103
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(additionalControls.left) && position === 'left.append') {
|
|
104
|
+
return additionalControls.left;
|
|
97
105
|
}
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
return additionalControls;
|
|
106
|
+
if (additionalControls.left && (0, _typeof2.default)(additionalControls.left) === 'object') {
|
|
107
|
+
return handleLeftObjectConfig(additionalControls.left);
|
|
101
108
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
};
|
|
110
|
+
var rendered = handleObjectConfig(additionalControls);
|
|
111
|
+
return rendered || null;
|
|
112
|
+
};
|
|
105
113
|
|
|
106
114
|
/**
|
|
107
115
|
* Utility helper for selectors/controls that allow nested options
|
|
108
116
|
* (e.g. column selector, display selector)
|
|
109
117
|
*/
|
|
110
|
-
|
|
118
|
+
exports.renderAdditionalControls = renderAdditionalControls;
|
|
111
119
|
function getNestedObjectOptions(controlOption, objectKey) {
|
|
112
120
|
var _controlOption$object;
|
|
113
121
|
// If the config is a boolean, nested options follow that boolean
|
|
114
|
-
if (
|
|
122
|
+
if (typeof controlOption === 'boolean') return controlOption;
|
|
115
123
|
// If config is not defined, default to enabled
|
|
116
124
|
if (controlOption == null) return true;
|
|
117
125
|
// Otherwise, type should be an object of boolean values - dive into it and return the value
|
|
@@ -133,7 +133,7 @@ var useDataGridDisplaySelector = function useDataGridDisplaySelector(showDisplay
|
|
|
133
133
|
setUserRowHeightsOptions(rowHeightsOptions);
|
|
134
134
|
}, [lineCount]);
|
|
135
135
|
var setLineCountHeight = (0, _react.useCallback)(function (event) {
|
|
136
|
-
var newLineCount = Number(event.
|
|
136
|
+
var newLineCount = Number(event.currentTarget.value);
|
|
137
137
|
if (newLineCount < 1) return; // Don't let users set a 0 or negative line count
|
|
138
138
|
|
|
139
139
|
setLineCount(newLineCount);
|
|
@@ -788,7 +788,7 @@ EuiDataGrid.propTypes = {
|
|
|
788
788
|
/**
|
|
789
789
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
790
790
|
*/
|
|
791
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
791
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
792
792
|
/**
|
|
793
793
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
794
794
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -820,11 +820,11 @@ EuiDataGrid.propTypes = {
|
|
|
820
820
|
/**
|
|
821
821
|
* Component to render for each row in the column
|
|
822
822
|
*/
|
|
823
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
823
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
824
824
|
/**
|
|
825
825
|
* Component to render in the optional column footer
|
|
826
826
|
*/
|
|
827
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
827
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
828
828
|
/**
|
|
829
829
|
* Optional props to pass to the column footer cell
|
|
830
830
|
*/
|
|
@@ -854,11 +854,11 @@ EuiDataGrid.propTypes = {
|
|
|
854
854
|
/**
|
|
855
855
|
* Component to render for each row in the column
|
|
856
856
|
*/
|
|
857
|
-
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
857
|
+
rowCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
858
858
|
/**
|
|
859
859
|
* Component to render in the optional column footer
|
|
860
860
|
*/
|
|
861
|
-
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
861
|
+
footerCellRender: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
862
862
|
/**
|
|
863
863
|
* Optional props to pass to the column footer cell
|
|
864
864
|
*/
|
|
@@ -933,7 +933,7 @@ EuiDataGrid.propTypes = {
|
|
|
933
933
|
* allowing hooks, context, and other React concepts to be used. The function receives #EuiDataGridCellValueElementProps
|
|
934
934
|
* as its only argument.
|
|
935
935
|
*/
|
|
936
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
936
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
937
937
|
/**
|
|
938
938
|
* An optional function that can be used to completely customize the rendering of cell popovers.
|
|
939
939
|
*
|
|
@@ -952,7 +952,7 @@ EuiDataGrid.propTypes = {
|
|
|
952
952
|
* allowing hooks, context, and other React concepts to be used. The function receives #EuiDataGridCellValueElementProps
|
|
953
953
|
* as its only argument.
|
|
954
954
|
*/
|
|
955
|
-
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
955
|
+
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
956
956
|
/**
|
|
957
957
|
* An optional function called to completely customize and control the rendering of
|
|
958
958
|
* EuiDataGrid's body and cell placement. This can be used to, e.g. remove EuiDataGrid's
|
|
@@ -154,9 +154,9 @@ var EuiDataGridInMemoryRenderer = function EuiDataGridInMemoryRenderer(_ref) {
|
|
|
154
154
|
var cellDivs = documentFragment.childNodes[0].childNodes;
|
|
155
155
|
for (var i = 0; i < cellDivs.length; i++) {
|
|
156
156
|
var cellDiv = cellDivs[i];
|
|
157
|
-
var
|
|
157
|
+
var rowIndex = parseInt(cellDiv.getAttribute('data-dg-row'), 10);
|
|
158
158
|
var column = cellDiv.getAttribute('data-dg-column');
|
|
159
|
-
onCellRender(
|
|
159
|
+
onCellRender(rowIndex, column, getElementText(cellDiv));
|
|
160
160
|
}
|
|
161
161
|
// changes to documentFragment.children is reflected by `cells`
|
|
162
162
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -591,7 +591,7 @@ EuiDataGridInMemoryRenderer.propTypes = {
|
|
|
591
591
|
/**
|
|
592
592
|
* Additional actions displayed as icon on hover / focus, and in the expanded view of the cell containing the value
|
|
593
593
|
*/
|
|
594
|
-
cellActions: _propTypes.default.arrayOf(_propTypes.default.
|
|
594
|
+
cellActions: _propTypes.default.arrayOf(_propTypes.default.elementType.isRequired),
|
|
595
595
|
/**
|
|
596
596
|
* Configures the amount of cell action buttons immediately visible on a cell.
|
|
597
597
|
* Any cell actions above this number will only display in the cell expansion popover.
|
|
@@ -600,7 +600,7 @@ EuiDataGridInMemoryRenderer.propTypes = {
|
|
|
600
600
|
visibleCellActions: _propTypes.default.number
|
|
601
601
|
}).isRequired).isRequired,
|
|
602
602
|
rowCount: _propTypes.default.number.isRequired,
|
|
603
|
-
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.
|
|
603
|
+
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
604
604
|
onCellRender: _propTypes.default.func.isRequired
|
|
605
605
|
};
|
|
606
606
|
function noop() {}
|
|
@@ -204,15 +204,15 @@ var RowHeightVirtualizationUtils = /*#__PURE__*/function (_RowHeightUtils) {
|
|
|
204
204
|
var _this2;
|
|
205
205
|
(0, _classCallCheck2.default)(this, RowHeightVirtualizationUtils);
|
|
206
206
|
_this2 = _super.call(this);
|
|
207
|
-
_this2.gridRef = gridRef;
|
|
208
|
-
_this2.outerGridElementRef = outerGridElementRef;
|
|
209
|
-
_this2.gridItemsRenderedRef = gridItemsRenderedRef;
|
|
210
|
-
_this2.rerenderGridBodyRef = rerenderGridBodyRef;
|
|
211
207
|
/**
|
|
212
208
|
* Virtualization workarounds for auto height rows
|
|
213
209
|
*/
|
|
214
210
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "timerId", void 0);
|
|
215
211
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "lastUpdatedRow", Infinity);
|
|
212
|
+
_this2.gridRef = gridRef;
|
|
213
|
+
_this2.outerGridElementRef = outerGridElementRef;
|
|
214
|
+
_this2.gridItemsRenderedRef = gridItemsRenderedRef;
|
|
215
|
+
_this2.rerenderGridBodyRef = rerenderGridBodyRef;
|
|
216
216
|
return _this2;
|
|
217
217
|
}
|
|
218
218
|
(0, _createClass2.default)(RowHeightVirtualizationUtils, [{
|
|
@@ -146,7 +146,7 @@ var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
146
146
|
inputValidityRef = _useState2[0],
|
|
147
147
|
_setInputValidityRef = _useState2[1];
|
|
148
148
|
var setInputValidityRef = (0, _react.useCallback)(function (ref) {
|
|
149
|
-
_setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
|
|
149
|
+
_setInputValidityRef((ref === null || ref === void 0 ? void 0 : ref.input) || null);
|
|
150
150
|
}, []);
|
|
151
151
|
(0, _form.useEuiValidatableControl)({
|
|
152
152
|
isInvalid: isInvalid,
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _excluded = ["onBeforeDragStart", "onDragStart", "onDragUpdate", "onDragEnd", "children"];
|
|
16
16
|
/*
|
|
@@ -50,7 +50,7 @@ var EuiDragDropContext = function EuiDragDropContext(_ref) {
|
|
|
50
50
|
onDragEnd(result, provided);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return (0, _react2.jsx)(
|
|
53
|
+
return (0, _react2.jsx)(_dnd.DragDropContext, (0, _extends2.default)({
|
|
54
54
|
onBeforeDragStart: onBeforeDragStart,
|
|
55
55
|
onDragStart: euiOnDragStart,
|
|
56
56
|
onDragUpdate: onDragUpdate,
|
|
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var
|
|
14
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
15
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
16
|
var _droppable = require("./droppable");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
@@ -54,7 +54,7 @@ var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
54
54
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
55
55
|
var _useContext = (0, _react.useContext)(_droppable.EuiDroppableContext),
|
|
56
56
|
cloneItems = _useContext.cloneItems;
|
|
57
|
-
return (0, _react2.jsx)(
|
|
57
|
+
return (0, _react2.jsx)(_dnd.Draggable, (0, _extends2.default)({
|
|
58
58
|
draggableId: draggableId,
|
|
59
59
|
index: index,
|
|
60
60
|
isDragDisabled: isDragDisabled
|
|
@@ -72,7 +72,7 @@ var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
72
72
|
'euiDraggable__item--isDragging': snapshot.isDragging,
|
|
73
73
|
'euiDraggable__item--isDropAnimating': snapshot.isDropAnimating
|
|
74
74
|
});
|
|
75
|
-
var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
|
|
75
|
+
var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
|
|
76
76
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", (0, _extends2.default)({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
|
|
77
77
|
ref: provided.innerRef,
|
|
78
78
|
"data-test-subj": dataTestSubj,
|
|
@@ -10,7 +10,7 @@ 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var
|
|
13
|
+
var _dnd = require("@hello-pangea/dnd");
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _drag_drop_context = require("./drag_drop_context");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
@@ -58,7 +58,7 @@ var EuiDroppable = function EuiDroppable(_ref) {
|
|
|
58
58
|
var _useContext = (0, _react.useContext)(_drag_drop_context.EuiDragDropContextContext),
|
|
59
59
|
isDraggingType = _useContext.isDraggingType;
|
|
60
60
|
var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
|
|
61
|
-
return (0, _react2.jsx)(
|
|
61
|
+
return (0, _react2.jsx)(_dnd.Droppable, (0, _extends2.default)({
|
|
62
62
|
isDropDisabled: dropIsDisabled,
|
|
63
63
|
droppableId: droppableId,
|
|
64
64
|
direction: direction,
|