@elastic/eui 95.10.0 → 95.11.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_theme_dark.css +0 -923
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -923
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +4 -3
- package/es/components/basic_table/collapsed_item_actions.js +24 -31
- package/es/components/datagrid/body/cell/data_grid_cell.js +98 -86
- package/es/components/datagrid/body/cell/data_grid_cell.styles.js +107 -0
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
- package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
- package/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
- package/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
- package/es/components/datagrid/body/cell/focus_utils.js +18 -20
- package/es/components/datagrid/body/data_grid_body.js +20 -4
- package/es/components/datagrid/body/data_grid_body.styles.js +26 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +18 -6
- package/es/components/datagrid/body/data_grid_body_virtualized.js +18 -6
- package/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
- package/es/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
- package/es/components/datagrid/body/header/column_actions.js +16 -4
- package/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
- package/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
- package/es/components/datagrid/body/header/data_grid_header_cell.js +40 -66
- package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +29 -0
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -1
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
- package/es/components/datagrid/body/header/data_grid_header_row.js +8 -2
- package/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
- package/es/components/datagrid/controls/column_selector.js +17 -8
- package/es/components/datagrid/controls/column_selector.styles.js +22 -0
- package/es/components/datagrid/controls/column_sorting.js +7 -2
- package/es/components/datagrid/controls/column_sorting.styles.js +35 -0
- package/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
- package/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
- package/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
- package/es/components/datagrid/controls/display_selector.js +14 -3
- package/es/components/datagrid/controls/fullscreen_selector.js +8 -5
- package/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
- package/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
- package/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
- package/es/components/datagrid/data_grid.a11y.js +1 -0
- package/es/components/datagrid/data_grid.js +16 -8
- package/es/components/datagrid/data_grid.stories.utils.js +1386 -0
- package/es/components/datagrid/data_grid.styles.js +88 -0
- package/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
- package/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
- package/es/components/datagrid/pagination/index.js +9 -0
- package/es/components/datagrid/utils/row_heights.js +13 -15
- package/es/components/datagrid/utils/scrolling.js +14 -7
- package/es/components/datagrid/utils/scrolling.styles.js +30 -0
- package/es/components/flyout/flyout_resizable.js +6 -2
- package/es/components/flyout/flyout_resizable.styles.js +34 -5
- package/es/components/popover/popover.js +1 -1
- package/es/components/text/text.js +25 -9
- package/es/components/text/text_align.js +19 -6
- package/es/components/text/text_color.js +14 -11
- package/es/components/text/types.js +1 -0
- package/eui.d.ts +581 -108
- package/i18ntokens.json +392 -356
- package/lib/components/basic_table/basic_table.js +4 -3
- package/lib/components/basic_table/collapsed_item_actions.js +23 -30
- package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -83
- package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +38 -0
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +24 -0
- package/lib/components/datagrid/body/cell/focus_utils.js +17 -19
- package/lib/components/datagrid/body/data_grid_body.js +20 -4
- package/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +18 -6
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +18 -6
- package/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
- package/lib/components/datagrid/body/footer/data_grid_footer_row.js +11 -6
- package/lib/components/datagrid/body/header/column_actions.js +16 -4
- package/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
- package/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +47 -74
- package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
- package/lib/components/datagrid/body/header/data_grid_header_row.js +8 -2
- package/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
- package/lib/components/datagrid/controls/column_selector.js +17 -8
- package/lib/components/datagrid/controls/column_selector.styles.js +28 -0
- package/lib/components/datagrid/controls/column_sorting.js +7 -2
- package/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
- package/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
- package/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
- package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
- package/lib/components/datagrid/controls/display_selector.js +13 -2
- package/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
- package/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
- package/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
- package/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
- package/lib/components/datagrid/data_grid.a11y.js +1 -0
- package/lib/components/datagrid/data_grid.js +15 -7
- package/lib/components/datagrid/data_grid.stories.utils.js +1391 -0
- package/lib/components/datagrid/data_grid.styles.js +94 -0
- package/lib/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
- package/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
- package/lib/components/datagrid/pagination/index.js +18 -0
- package/lib/components/datagrid/utils/row_heights.js +13 -14
- package/lib/components/datagrid/utils/scrolling.js +14 -7
- package/lib/components/datagrid/utils/scrolling.styles.js +36 -0
- package/lib/components/flyout/flyout_resizable.js +6 -2
- package/lib/components/flyout/flyout_resizable.styles.js +34 -5
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/text/text.js +25 -9
- package/lib/components/text/text_align.js +19 -6
- package/lib/components/text/text_color.js +14 -11
- package/lib/components/text/types.js +5 -0
- package/optimize/es/components/basic_table/basic_table.js +4 -3
- package/optimize/es/components/basic_table/collapsed_item_actions.js +24 -31
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +87 -81
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +107 -0
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
- package/optimize/es/components/datagrid/body/cell/focus_utils.js +18 -20
- package/optimize/es/components/datagrid/body/data_grid_body.js +9 -2
- package/optimize/es/components/datagrid/body/data_grid_body.styles.js +26 -0
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +7 -4
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +7 -4
- package/optimize/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
- package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
- package/optimize/es/components/datagrid/body/header/column_actions.js +16 -4
- package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
- package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +40 -61
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +29 -0
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -1
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +8 -2
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
- package/optimize/es/components/datagrid/controls/column_selector.js +17 -8
- package/optimize/es/components/datagrid/controls/column_selector.styles.js +22 -0
- package/optimize/es/components/datagrid/controls/column_sorting.js +7 -2
- package/optimize/es/components/datagrid/controls/column_sorting.styles.js +35 -0
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
- package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
- package/optimize/es/components/datagrid/controls/display_selector.js +14 -3
- package/optimize/es/components/datagrid/controls/fullscreen_selector.js +8 -5
- package/optimize/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
- package/optimize/es/components/datagrid/data_grid.a11y.js +1 -0
- package/optimize/es/components/datagrid/data_grid.js +16 -8
- package/optimize/es/components/datagrid/data_grid.stories.utils.js +333 -0
- package/optimize/es/components/datagrid/data_grid.styles.js +88 -0
- package/optimize/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
- package/optimize/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
- package/optimize/es/components/datagrid/pagination/index.js +9 -0
- package/optimize/es/components/datagrid/utils/row_heights.js +13 -15
- package/optimize/es/components/datagrid/utils/scrolling.js +14 -7
- package/optimize/es/components/datagrid/utils/scrolling.styles.js +30 -0
- package/optimize/es/components/flyout/flyout_resizable.js +6 -2
- package/optimize/es/components/flyout/flyout_resizable.styles.js +34 -5
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/text/text.js +9 -4
- package/optimize/es/components/text/text_align.js +4 -2
- package/optimize/es/components/text/text_color.js +1 -2
- package/optimize/es/components/text/types.js +1 -0
- package/optimize/lib/components/basic_table/basic_table.js +4 -3
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +23 -30
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +84 -78
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
- package/optimize/lib/components/datagrid/body/cell/focus_utils.js +17 -19
- package/optimize/lib/components/datagrid/body/data_grid_body.js +9 -2
- package/optimize/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +7 -4
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -4
- package/optimize/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
- package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
- package/optimize/lib/components/datagrid/body/header/column_actions.js +16 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
- package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +43 -63
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +8 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
- package/optimize/lib/components/datagrid/controls/column_selector.js +17 -8
- package/optimize/lib/components/datagrid/controls/column_selector.styles.js +28 -0
- package/optimize/lib/components/datagrid/controls/column_sorting.js +7 -2
- package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
- package/optimize/lib/components/datagrid/controls/display_selector.js +13 -2
- package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
- package/optimize/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
- package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -0
- package/optimize/lib/components/datagrid/data_grid.js +15 -7
- package/optimize/lib/components/datagrid/data_grid.stories.utils.js +341 -0
- package/optimize/lib/components/datagrid/data_grid.styles.js +94 -0
- package/{test-env/components/datagrid/utils → optimize/lib/components/datagrid/pagination}/data_grid_pagination.js +29 -31
- package/optimize/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
- package/optimize/lib/components/datagrid/pagination/index.js +18 -0
- package/optimize/lib/components/datagrid/utils/row_heights.js +13 -14
- package/optimize/lib/components/datagrid/utils/scrolling.js +14 -7
- package/optimize/lib/components/datagrid/utils/scrolling.styles.js +36 -0
- package/optimize/lib/components/flyout/flyout_resizable.js +6 -2
- package/optimize/lib/components/flyout/flyout_resizable.styles.js +34 -5
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/text/text.js +9 -4
- package/optimize/lib/components/text/text_align.js +4 -2
- package/optimize/lib/components/text/text_color.js +1 -2
- package/optimize/lib/components/text/types.js +5 -0
- package/package.json +3 -3
- package/src/themes/amsterdam/theme_dark.scss +0 -7
- package/src/themes/amsterdam/theme_light.scss +0 -7
- package/test-env/components/basic_table/basic_table.js +4 -3
- package/test-env/components/basic_table/collapsed_item_actions.js +23 -30
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +90 -83
- package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
- package/test-env/components/datagrid/body/cell/focus_utils.js +17 -19
- package/test-env/components/datagrid/body/data_grid_body.js +20 -4
- package/test-env/components/datagrid/body/data_grid_body.styles.js +30 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +18 -6
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +18 -6
- package/test-env/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
- package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
- package/test-env/components/datagrid/body/header/column_actions.js +16 -4
- package/test-env/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
- package/test-env/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +43 -67
- package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +8 -2
- package/test-env/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
- package/test-env/components/datagrid/controls/column_selector.js +17 -8
- package/test-env/components/datagrid/controls/column_selector.styles.js +28 -0
- package/test-env/components/datagrid/controls/column_sorting.js +7 -2
- package/test-env/components/datagrid/controls/column_sorting.styles.js +41 -0
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +19 -14
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +8 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
- package/test-env/components/datagrid/controls/display_selector.js +13 -2
- package/test-env/components/datagrid/controls/fullscreen_selector.js +7 -4
- package/test-env/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
- package/test-env/components/datagrid/controls/keyboard_shortcuts.js +6 -2
- package/test-env/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
- package/test-env/components/datagrid/data_grid.a11y.js +1 -0
- package/test-env/components/datagrid/data_grid.js +15 -7
- package/test-env/components/datagrid/data_grid.stories.utils.js +1386 -0
- package/test-env/components/datagrid/data_grid.styles.js +94 -0
- package/{optimize/lib/components/datagrid/utils → test-env/components/datagrid/pagination}/data_grid_pagination.js +29 -31
- package/test-env/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
- package/test-env/components/datagrid/pagination/index.js +18 -0
- package/test-env/components/datagrid/utils/row_heights.js +13 -14
- package/test-env/components/datagrid/utils/scrolling.js +14 -7
- package/test-env/components/datagrid/utils/scrolling.styles.js +36 -0
- package/test-env/components/flyout/flyout_resizable.js +6 -2
- package/test-env/components/flyout/flyout_resizable.styles.js +34 -5
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/text/text.js +25 -9
- package/test-env/components/text/text_align.js +19 -6
- package/test-env/components/text/text_color.js +14 -11
- package/test-env/components/text/types.js +5 -0
- package/src/components/datagrid/_data_grid.scss +0 -121
- package/src/components/datagrid/_data_grid_data_row.scss +0 -303
- package/src/components/datagrid/_index.scss +0 -12
- package/src/components/datagrid/_mixins.scss +0 -84
- package/src/components/datagrid/_variables.scss +0 -11
- package/src/components/datagrid/body/footer/_data_grid_footer_row.scss +0 -47
- package/src/components/datagrid/body/header/_data_grid_column_resizer.scss +0 -48
- package/src/components/datagrid/body/header/_data_grid_header_row.scss +0 -219
- package/src/components/datagrid/controls/_data_grid_column_selector.scss +0 -19
- package/src/components/datagrid/controls/_data_grid_column_sorting.scss +0 -43
- package/src/components/datagrid/controls/_data_grid_display.scss +0 -3
- package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +0 -11
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -55
- package/src/components/index.scss +0 -3
- package/src/themes/amsterdam/overrides/_data_grid.scss +0 -5
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
|
@@ -9,6 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _services = require("../../../../services");
|
|
11
11
|
var _popover = require("../../../popover");
|
|
12
|
+
var _data_grid = require("../../data_grid.styles");
|
|
13
|
+
var _data_grid_cell_popover = require("./data_grid_cell_popover.styles");
|
|
12
14
|
var _text = require("../../../text");
|
|
13
15
|
var _code = require("../../../code");
|
|
14
16
|
var _react2 = require("@emotion/react");
|
|
@@ -102,25 +104,23 @@ var useCellPopover = exports.useCellPopover = function useCellPopover() {
|
|
|
102
104
|
// popover button isn't actually the DOM node we pass to `button`. Otherwise,
|
|
103
105
|
// clicking the expansion cell action triggers an outside click
|
|
104
106
|
var onClickOutside = (0, _react.useCallback)(function (event) {
|
|
105
|
-
var
|
|
106
|
-
var cellActions = popoverAnchor === null || popoverAnchor === void 0 || (_popoverAnchor$parent = popoverAnchor.parentElement) === null || _popoverAnchor$parent === void 0 || (_popoverAnchor$parent = _popoverAnchor$parent.parentElement) === null || _popoverAnchor$parent === void 0 ? void 0 : _popoverAnchor$parent.previousElementSibling;
|
|
107
|
+
var cellActions = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell__actionsWrapper');
|
|
107
108
|
if (!(cellActions !== null && cellActions !== void 0 && cellActions.contains(event.target))) {
|
|
108
109
|
closeCellPopover();
|
|
109
110
|
}
|
|
110
111
|
}, [popoverAnchor, closeCellPopover]);
|
|
111
112
|
var onKeyDown = (0, _react.useCallback)(function (event) {
|
|
112
113
|
if (event.key === _services.keys.F2 || event.key === _services.keys.ESCAPE) {
|
|
113
|
-
var _popoverAnchor$parent2;
|
|
114
114
|
event.preventDefault();
|
|
115
115
|
event.stopPropagation();
|
|
116
116
|
closeCellPopover();
|
|
117
|
-
var cell = popoverAnchor === null || popoverAnchor === void 0
|
|
117
|
+
var cell = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell');
|
|
118
118
|
|
|
119
119
|
// Prevent cell animation flash while focus is being shifted between popover and cell
|
|
120
120
|
cell === null || cell === void 0 || cell.setAttribute('data-keyboard-closing', 'true');
|
|
121
121
|
// Ensure focus is returned to the parent cell, and remove animation stopgap
|
|
122
122
|
requestAnimationFrame(function () {
|
|
123
|
-
|
|
123
|
+
cell === null || cell === void 0 || cell.focus();
|
|
124
124
|
cell === null || cell === void 0 || cell.removeAttribute('data-keyboard-closing');
|
|
125
125
|
});
|
|
126
126
|
}
|
|
@@ -137,36 +137,45 @@ var useCellPopover = exports.useCellPopover = function useCellPopover() {
|
|
|
137
137
|
setCellPopoverProps: setCellPopoverProps
|
|
138
138
|
};
|
|
139
139
|
}, [popoverIsOpen, closeCellPopover, openCellPopover, cellLocation]);
|
|
140
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell_popover.euiDataGridCellPopoverStyles);
|
|
141
|
+
var _useEuiMemoizedStyles = (0, _services.useEuiMemoizedStyles)(_data_grid.euiDataGridVariables),
|
|
142
|
+
levels = _useEuiMemoizedStyles.levels;
|
|
140
143
|
var cellPopover = (0, _react.useMemo)(function () {
|
|
141
|
-
var _cellPopoverProps$pan;
|
|
144
|
+
var _cellPopoverProps$pan, _cell$offsetWidth;
|
|
142
145
|
if (!popoverIsOpen || !popoverAnchor) return null;
|
|
146
|
+
var cell = popoverAnchor.closest('.euiDataGridRowCell');
|
|
143
147
|
|
|
144
148
|
// Note that this popover is rendered once at the top grid level, rather than one popover per cell
|
|
145
149
|
return (0, _react2.jsx)(_popover.EuiWrappingPopover, _extends({
|
|
146
150
|
isOpen: popoverIsOpen,
|
|
147
151
|
display: "block",
|
|
148
152
|
hasArrow: false,
|
|
153
|
+
attachToAnchor: true // required for https://github.com/elastic/eui/issues/6151
|
|
154
|
+
,
|
|
149
155
|
panelPaddingSize: "s",
|
|
150
156
|
anchorPosition: popoverAnchorPosition,
|
|
151
|
-
repositionToCrossAxis: false
|
|
157
|
+
repositionToCrossAxis: false,
|
|
158
|
+
zIndex: levels.cellPopover
|
|
152
159
|
}, cellPopoverProps, {
|
|
153
160
|
focusTrapProps: {
|
|
154
161
|
onClickOutside: onClickOutside,
|
|
155
162
|
clickOutsideDisables: false
|
|
156
163
|
},
|
|
157
|
-
panelProps: _objectSpread({
|
|
164
|
+
panelProps: _objectSpread(_objectSpread({
|
|
158
165
|
'data-test-subj': 'euiDataGridExpansionPopover'
|
|
159
|
-
}, cellPopoverProps.panelProps || {}),
|
|
166
|
+
}, cellPopoverProps.panelProps || {}), {}, {
|
|
167
|
+
css: [styles.euiDataGridRowCell__popover, cellPopoverProps.css]
|
|
168
|
+
}),
|
|
160
169
|
panelClassName: (0, _classnames.default)('euiDataGridRowCell__popover', cellPopoverProps.panelClassName, (_cellPopoverProps$pan = cellPopoverProps.panelProps) === null || _cellPopoverProps$pan === void 0 ? void 0 : _cellPopoverProps$pan.className),
|
|
161
170
|
panelStyle: {
|
|
162
|
-
maxInlineSize: "min(75vw, max(".concat(
|
|
171
|
+
maxInlineSize: "min(75vw, max(".concat((_cell$offsetWidth = cell === null || cell === void 0 ? void 0 : cell.offsetWidth) !== null && _cell$offsetWidth !== void 0 ? _cell$offsetWidth : 0, "px, 400px))"),
|
|
163
172
|
maxBlockSize: '50vh'
|
|
164
173
|
},
|
|
165
174
|
onKeyDown: onKeyDown,
|
|
166
175
|
button: popoverAnchor,
|
|
167
176
|
closePopover: closeCellPopover
|
|
168
177
|
}), popoverContent);
|
|
169
|
-
}, [popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
|
|
178
|
+
}, [styles, levels.cellPopover, popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
|
|
170
179
|
return (0, _react.useMemo)(function () {
|
|
171
180
|
return {
|
|
172
181
|
cellPopoverContext: cellPopoverContext,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridCellPopoverStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../../global_styling");
|
|
9
|
+
var _templateObject;
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
|
+
var euiDataGridCellPopoverStyles = exports.euiDataGridCellPopoverStyles = function euiDataGridCellPopoverStyles(euiThemeContext) {
|
|
19
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
+
return {
|
|
21
|
+
euiDataGridRowCell__popover: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " overflow:auto;", _global_styling.euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";animation-name:", fadeIn, ";};label:euiDataGridRowCell__popover;")
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var fadeIn = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
|
|
@@ -8,11 +8,10 @@ exports.HandleInteractiveChildren = exports.FocusTrappedChildren = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _tabbable = require("tabbable");
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
12
|
var _services = require("../../../../services");
|
|
12
|
-
var _accessibility = require("../../../../services/accessibility");
|
|
13
13
|
var _utils = require("../../../../utils");
|
|
14
14
|
var _focus_trap = require("../../../focus_trap");
|
|
15
|
-
var _accessibility2 = require("../../../accessibility");
|
|
16
15
|
var _i18n = require("../../../i18n");
|
|
17
16
|
var _react2 = require("@emotion/react");
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -105,20 +104,22 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
|
|
|
105
104
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
106
105
|
isExited = _useState6[0],
|
|
107
106
|
setExited = _useState6[1];
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
suffix: 'keyboardHint'
|
|
111
|
-
});
|
|
112
|
-
var exitedHintAriaId = (0, _accessibility.useGeneratedHtmlId)({
|
|
113
|
-
prefix: 'euiDataGridCellHeader',
|
|
114
|
-
suffix: 'exited'
|
|
107
|
+
var ariaDescribedById = (0, _services.useGeneratedHtmlId)({
|
|
108
|
+
suffix: 'focusTrapHint'
|
|
115
109
|
});
|
|
116
110
|
|
|
117
111
|
// direct DOM manipulation as workaround to attach required hints
|
|
118
112
|
(0, _react.useEffect)(function () {
|
|
119
113
|
var currentAriaDescribedbyId = cellEl.getAttribute('aria-describedby');
|
|
120
|
-
cellEl.setAttribute('aria-describedby',
|
|
121
|
-
|
|
114
|
+
cellEl.setAttribute('aria-describedby', (0, _classnames.default)(currentAriaDescribedbyId, ariaDescribedById));
|
|
115
|
+
return function () {
|
|
116
|
+
if (currentAriaDescribedbyId) {
|
|
117
|
+
cellEl.setAttribute('aria-descibedby', currentAriaDescribedbyId);
|
|
118
|
+
} else {
|
|
119
|
+
cellEl.removeAttribute('aria-describedby');
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}, [cellEl, ariaDescribedById]);
|
|
122
123
|
(0, _react.useEffect)(function () {
|
|
123
124
|
if (isCellEntered) {
|
|
124
125
|
enableAndFocusInteractives(cellEl);
|
|
@@ -172,23 +173,20 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
|
|
|
172
173
|
onDeactivation: function onDeactivation() {
|
|
173
174
|
return setIsCellEntered(false);
|
|
174
175
|
}
|
|
175
|
-
}, children, (0, _react2.jsx)(
|
|
176
|
-
id:
|
|
177
|
-
|
|
176
|
+
}, children, (0, _react2.jsx)("p", {
|
|
177
|
+
id: ariaDescribedById,
|
|
178
|
+
hidden: true
|
|
178
179
|
}, isExited && (0, _react2.jsx)(_i18n.EuiI18n
|
|
179
180
|
// eslint-disable-next-line local/i18n
|
|
180
181
|
, {
|
|
181
182
|
token: "euiDataGridCell.focusTrapExitPrompt",
|
|
182
183
|
default: "Exited cell content."
|
|
183
|
-
})
|
|
184
|
-
id: keyboardHintAriaId,
|
|
185
|
-
"aria-hidden": "true"
|
|
186
|
-
}, !isCellEntered && (0, _react2.jsx)(_i18n.EuiI18n
|
|
184
|
+
}), !isCellEntered && (0, _react2.jsx)(_i18n.EuiI18n
|
|
187
185
|
// eslint-disable-next-line local/i18n
|
|
188
186
|
, {
|
|
189
187
|
token: "euiDataGridCell.focusTrapEnterPrompt",
|
|
190
188
|
default: "Press the Enter key to interact with this cell's contents."
|
|
191
|
-
})))
|
|
189
|
+
})));
|
|
192
190
|
};
|
|
193
191
|
|
|
194
192
|
/**
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.EuiDataGridBody = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _services = require("../../../services");
|
|
9
10
|
var _data_grid_body_virtualized = require("./data_grid_body_virtualized");
|
|
10
11
|
var _data_grid_body_custom = require("./data_grid_body_custom");
|
|
12
|
+
var _data_grid_body = require("./data_grid_body.styles");
|
|
11
13
|
var _react2 = require("@emotion/react");
|
|
12
14
|
var _excluded = ["renderCustomGridBody"];
|
|
13
15
|
/*
|
|
@@ -29,9 +31,14 @@ var EuiDataGridBody = exports.EuiDataGridBody = function EuiDataGridBody(_ref) {
|
|
|
29
31
|
* + virtualization library for rendering content, or if consumers have
|
|
30
32
|
* passed their own custom renderer
|
|
31
33
|
*/
|
|
34
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_body.euiDataGridBodyStyles);
|
|
35
|
+
var cssStyles = [styles.euiDataGridBody, renderCustomGridBody ? styles.customRender : styles.virtualized];
|
|
32
36
|
return renderCustomGridBody ? (0, _react2.jsx)(_data_grid_body_custom.EuiDataGridBodyCustomRender, _extends({
|
|
33
|
-
renderCustomGridBody: renderCustomGridBody
|
|
34
|
-
|
|
37
|
+
renderCustomGridBody: renderCustomGridBody,
|
|
38
|
+
css: cssStyles
|
|
39
|
+
}, props)) : (0, _react2.jsx)(_data_grid_body_virtualized.EuiDataGridBodyVirtualized, _extends({
|
|
40
|
+
css: cssStyles
|
|
41
|
+
}, props));
|
|
35
42
|
};
|
|
36
43
|
EuiDataGridBody.propTypes = {
|
|
37
44
|
leadingControlColumns: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -600,34 +607,42 @@ EuiDataGridBody.propTypes = {
|
|
|
600
607
|
gridStyles: _propTypes.default.shape({
|
|
601
608
|
/**
|
|
602
609
|
* Size of fonts used within the row and column cells
|
|
610
|
+
* @default m
|
|
603
611
|
*/
|
|
604
612
|
fontSize: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
605
613
|
/**
|
|
606
614
|
* Defines the padding with the row and column cells
|
|
615
|
+
* @default m
|
|
607
616
|
*/
|
|
608
617
|
cellPadding: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
609
618
|
/**
|
|
610
|
-
* Border
|
|
619
|
+
* Border used for the row and column cells
|
|
620
|
+
* @default all
|
|
611
621
|
*/
|
|
612
622
|
border: _propTypes.default.oneOf(["all", "horizontal", "none"]),
|
|
613
623
|
/**
|
|
614
624
|
* If set to true, rows will alternate zebra striping for clarity
|
|
625
|
+
* @default false
|
|
615
626
|
*/
|
|
616
627
|
stripes: _propTypes.default.bool,
|
|
617
628
|
/**
|
|
618
629
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
630
|
+
* @default shade
|
|
619
631
|
*/
|
|
620
632
|
header: _propTypes.default.oneOf(["shade", "underline"]),
|
|
621
633
|
/**
|
|
622
634
|
* Visual style for the column footers.
|
|
635
|
+
* @default overline
|
|
623
636
|
*/
|
|
624
637
|
footer: _propTypes.default.oneOf(["shade", "overline", "striped"]),
|
|
625
638
|
/**
|
|
626
639
|
* If set to true, the footer row will be sticky
|
|
640
|
+
* @default true
|
|
627
641
|
*/
|
|
628
642
|
stickyFooter: _propTypes.default.bool,
|
|
629
643
|
/**
|
|
630
644
|
* Will define what visual style to show on row hover
|
|
645
|
+
* @default hover
|
|
631
646
|
*/
|
|
632
647
|
rowHover: _propTypes.default.oneOf(["highlight", "none"]),
|
|
633
648
|
/**
|
|
@@ -643,5 +658,6 @@ EuiDataGridBody.propTypes = {
|
|
|
643
658
|
gridWidth: _propTypes.default.number.isRequired,
|
|
644
659
|
gridRef: _propTypes.default.any.isRequired,
|
|
645
660
|
gridItemsRendered: _propTypes.default.any.isRequired,
|
|
646
|
-
wrapperRef: _propTypes.default.any.isRequired
|
|
661
|
+
wrapperRef: _propTypes.default.any.isRequired,
|
|
662
|
+
className: _propTypes.default.string
|
|
647
663
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridBodyStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "jawla0-virtualized",
|
|
18
|
+
styles: "scroll-padding:0;label:virtualized;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "jawla0-virtualized",
|
|
21
|
+
styles: "scroll-padding:0;label:virtualized;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
24
|
+
var euiDataGridBodyStyles = exports.euiDataGridBodyStyles = function euiDataGridBodyStyles(euiThemeContext) {
|
|
25
|
+
return {
|
|
26
|
+
euiDataGridBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), ";;label:euiDataGridBody;"),
|
|
27
|
+
virtualized: _ref,
|
|
28
|
+
customRender: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)('100%'), " overflow:auto;;label:customRender;")
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -63,7 +63,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
63
63
|
pagination = _ref.pagination,
|
|
64
64
|
rowHeightsOptions = _ref.rowHeightsOptions,
|
|
65
65
|
gridWidth = _ref.gridWidth,
|
|
66
|
-
gridStyles = _ref.gridStyles
|
|
66
|
+
gridStyles = _ref.gridStyles,
|
|
67
|
+
className = _ref.className;
|
|
67
68
|
/**
|
|
68
69
|
* Columns & widths
|
|
69
70
|
*/
|
|
@@ -112,7 +113,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
112
113
|
switchColumnPos: switchColumnPos,
|
|
113
114
|
sorting: sorting,
|
|
114
115
|
schema: schema,
|
|
115
|
-
schemaDetectors: schemaDetectors
|
|
116
|
+
schemaDetectors: schemaDetectors,
|
|
117
|
+
gridStyles: gridStyles
|
|
116
118
|
}),
|
|
117
119
|
headerRow = _useDataGridHeader.headerRow;
|
|
118
120
|
var _useDataGridFooter = (0, _footer.useDataGridFooter)({
|
|
@@ -126,7 +128,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
126
128
|
columns: columns,
|
|
127
129
|
columnWidths: columnWidths,
|
|
128
130
|
defaultColumnWidth: defaultColumnWidth,
|
|
129
|
-
schema: schema
|
|
131
|
+
schema: schema,
|
|
132
|
+
gridStyles: gridStyles
|
|
130
133
|
}),
|
|
131
134
|
footerRow = _useDataGridFooter.footerRow;
|
|
132
135
|
|
|
@@ -174,7 +177,7 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
174
177
|
customGridBodyProps = _useState2[0],
|
|
175
178
|
setCustomGridBodyProps = _useState2[1];
|
|
176
179
|
return (0, _react2.jsx)("div", _extends({}, customGridBodyProps, {
|
|
177
|
-
className: (0, _classnames.default)('euiDataGrid__customRenderBody', customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
|
|
180
|
+
className: (0, _classnames.default)('euiDataGrid__customRenderBody', className, customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
|
|
178
181
|
}), headerRow, renderCustomGridBody({
|
|
179
182
|
visibleColumns: visibleColumns,
|
|
180
183
|
visibleRowData: visibleRows,
|
|
@@ -749,34 +752,42 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
749
752
|
gridStyles: _propTypes.default.shape({
|
|
750
753
|
/**
|
|
751
754
|
* Size of fonts used within the row and column cells
|
|
755
|
+
* @default m
|
|
752
756
|
*/
|
|
753
757
|
fontSize: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
754
758
|
/**
|
|
755
759
|
* Defines the padding with the row and column cells
|
|
760
|
+
* @default m
|
|
756
761
|
*/
|
|
757
762
|
cellPadding: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
758
763
|
/**
|
|
759
|
-
* Border
|
|
764
|
+
* Border used for the row and column cells
|
|
765
|
+
* @default all
|
|
760
766
|
*/
|
|
761
767
|
border: _propTypes.default.oneOf(["all", "horizontal", "none"]),
|
|
762
768
|
/**
|
|
763
769
|
* If set to true, rows will alternate zebra striping for clarity
|
|
770
|
+
* @default false
|
|
764
771
|
*/
|
|
765
772
|
stripes: _propTypes.default.bool,
|
|
766
773
|
/**
|
|
767
774
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
775
|
+
* @default shade
|
|
768
776
|
*/
|
|
769
777
|
header: _propTypes.default.oneOf(["shade", "underline"]),
|
|
770
778
|
/**
|
|
771
779
|
* Visual style for the column footers.
|
|
780
|
+
* @default overline
|
|
772
781
|
*/
|
|
773
782
|
footer: _propTypes.default.oneOf(["shade", "overline", "striped"]),
|
|
774
783
|
/**
|
|
775
784
|
* If set to true, the footer row will be sticky
|
|
785
|
+
* @default true
|
|
776
786
|
*/
|
|
777
787
|
stickyFooter: _propTypes.default.bool,
|
|
778
788
|
/**
|
|
779
789
|
* Will define what visual style to show on row hover
|
|
790
|
+
* @default hover
|
|
780
791
|
*/
|
|
781
792
|
rowHover: _propTypes.default.oneOf(["highlight", "none"]),
|
|
782
793
|
/**
|
|
@@ -792,5 +803,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
792
803
|
gridWidth: _propTypes.default.number.isRequired,
|
|
793
804
|
gridRef: _propTypes.default.any.isRequired,
|
|
794
805
|
gridItemsRendered: _propTypes.default.any.isRequired,
|
|
795
|
-
wrapperRef: _propTypes.default.any.isRequired
|
|
806
|
+
wrapperRef: _propTypes.default.any.isRequired,
|
|
807
|
+
className: _propTypes.default.string
|
|
796
808
|
};
|
|
@@ -115,7 +115,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
115
115
|
gridWidth = _ref3.gridWidth,
|
|
116
116
|
gridRef = _ref3.gridRef,
|
|
117
117
|
gridItemsRendered = _ref3.gridItemsRendered,
|
|
118
|
-
wrapperRef = _ref3.wrapperRef
|
|
118
|
+
wrapperRef = _ref3.wrapperRef,
|
|
119
|
+
className = _ref3.className;
|
|
119
120
|
/**
|
|
120
121
|
* Grid refs & observers
|
|
121
122
|
*/
|
|
@@ -164,7 +165,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
164
165
|
switchColumnPos: switchColumnPos,
|
|
165
166
|
sorting: sorting,
|
|
166
167
|
schema: schema,
|
|
167
|
-
schemaDetectors: schemaDetectors
|
|
168
|
+
schemaDetectors: schemaDetectors,
|
|
169
|
+
gridStyles: gridStyles
|
|
168
170
|
}),
|
|
169
171
|
headerRow = _useDataGridHeader.headerRow,
|
|
170
172
|
headerRowHeight = _useDataGridHeader.headerRowHeight;
|
|
@@ -179,7 +181,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
179
181
|
columns: columns,
|
|
180
182
|
columnWidths: columnWidths,
|
|
181
183
|
defaultColumnWidth: defaultColumnWidth,
|
|
182
|
-
schema: schema
|
|
184
|
+
schema: schema,
|
|
185
|
+
gridStyles: gridStyles
|
|
183
186
|
}),
|
|
184
187
|
footerRow = _useDataGridFooter.footerRow,
|
|
185
188
|
footerRowHeight = _useDataGridFooter.footerRowHeight;
|
|
@@ -308,7 +311,7 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
|
|
|
308
311
|
value: rowWrapperContextValue
|
|
309
312
|
}, (0, _react2.jsx)(_reactWindow.VariableSizeGrid, _extends({}, virtualizationOptions, {
|
|
310
313
|
ref: gridRef,
|
|
311
|
-
className: (0, _classnames.default)('euiDataGrid__virtualized', virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
|
|
314
|
+
className: (0, _classnames.default)('euiDataGrid__virtualized', className, virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
|
|
312
315
|
onItemsRendered: onItemsRendered,
|
|
313
316
|
innerElementType: InnerElement,
|
|
314
317
|
outerRef: outerGridRef,
|
|
@@ -889,34 +892,42 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
889
892
|
gridStyles: _propTypes.default.shape({
|
|
890
893
|
/**
|
|
891
894
|
* Size of fonts used within the row and column cells
|
|
895
|
+
* @default m
|
|
892
896
|
*/
|
|
893
897
|
fontSize: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
894
898
|
/**
|
|
895
899
|
* Defines the padding with the row and column cells
|
|
900
|
+
* @default m
|
|
896
901
|
*/
|
|
897
902
|
cellPadding: _propTypes.default.oneOf(["s", "m", "l"]),
|
|
898
903
|
/**
|
|
899
|
-
* Border
|
|
904
|
+
* Border used for the row and column cells
|
|
905
|
+
* @default all
|
|
900
906
|
*/
|
|
901
907
|
border: _propTypes.default.oneOf(["all", "horizontal", "none"]),
|
|
902
908
|
/**
|
|
903
909
|
* If set to true, rows will alternate zebra striping for clarity
|
|
910
|
+
* @default false
|
|
904
911
|
*/
|
|
905
912
|
stripes: _propTypes.default.bool,
|
|
906
913
|
/**
|
|
907
914
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
915
|
+
* @default shade
|
|
908
916
|
*/
|
|
909
917
|
header: _propTypes.default.oneOf(["shade", "underline"]),
|
|
910
918
|
/**
|
|
911
919
|
* Visual style for the column footers.
|
|
920
|
+
* @default overline
|
|
912
921
|
*/
|
|
913
922
|
footer: _propTypes.default.oneOf(["shade", "overline", "striped"]),
|
|
914
923
|
/**
|
|
915
924
|
* If set to true, the footer row will be sticky
|
|
925
|
+
* @default true
|
|
916
926
|
*/
|
|
917
927
|
stickyFooter: _propTypes.default.bool,
|
|
918
928
|
/**
|
|
919
929
|
* Will define what visual style to show on row hover
|
|
930
|
+
* @default hover
|
|
920
931
|
*/
|
|
921
932
|
rowHover: _propTypes.default.oneOf(["highlight", "none"]),
|
|
922
933
|
/**
|
|
@@ -932,6 +943,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
932
943
|
gridWidth: _propTypes.default.number.isRequired,
|
|
933
944
|
gridRef: _propTypes.default.any.isRequired,
|
|
934
945
|
gridItemsRendered: _propTypes.default.any.isRequired,
|
|
935
|
-
wrapperRef: _propTypes.default.any.isRequired
|
|
946
|
+
wrapperRef: _propTypes.default.any.isRequired,
|
|
947
|
+
className: _propTypes.default.string
|
|
936
948
|
};
|
|
937
949
|
EuiDataGridBodyVirtualized.displayName = 'EuiDataGridBodyVirtualized';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridFooterStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../../global_styling");
|
|
9
|
+
var _data_grid = require("../../data_grid.styles");
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
var euiDataGridFooterStyles = exports.euiDataGridFooterStyles = function euiDataGridFooterStyles(euiThemeContext) {
|
|
19
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
+
var _euiDataGridVariables = (0, _data_grid.euiDataGridVariables)(euiThemeContext),
|
|
21
|
+
levels = _euiDataGridVariables.levels;
|
|
22
|
+
return {
|
|
23
|
+
euiDataGridFooter: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('width', 'fit-content'), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGridFooter;"),
|
|
24
|
+
sticky: /*#__PURE__*/(0, _react.css)("z-index:", levels.stickyHeader, ";position:sticky;", (0, _global_styling.logicalCSS)('bottom', 0), ";;label:sticky;"),
|
|
25
|
+
overline: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', "".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.text)), ";;label:overline;"),
|
|
26
|
+
shade: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";;label:shade;"),
|
|
27
|
+
striped: /*#__PURE__*/(0, _react.css)(".euiDataGrid--stripes &{background-color:", euiTheme.colors.lightestShade, ";};label:striped;"),
|
|
28
|
+
euiDataGridFooterCell: /*#__PURE__*/(0, _react.css)("flex:0 0 auto;font-weight:", euiTheme.font.weight.bold, ";;label:euiDataGridFooterCell;")
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.EuiDataGridFooterRow = void 0;
|
|
8
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _services = require("../../../../services");
|
|
10
11
|
var _cell = require("../cell");
|
|
12
|
+
var _data_grid_footer = require("./data_grid_footer.styles");
|
|
11
13
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex"];
|
|
14
|
+
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "gridStyles"];
|
|
13
15
|
/*
|
|
14
16
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
17
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -17,9 +19,9 @@ var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "
|
|
|
17
19
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
20
|
* Side Public License, v 1.
|
|
19
21
|
*/
|
|
22
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
25
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
24
26
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
25
27
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -41,13 +43,15 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
|
|
|
41
43
|
_dataTestSubj = _ref['data-test-subj'],
|
|
42
44
|
_ref$visibleRowIndex = _ref.visibleRowIndex,
|
|
43
45
|
visibleRowIndex = _ref$visibleRowIndex === void 0 ? rowIndex : _ref$visibleRowIndex,
|
|
46
|
+
gridStyles = _ref.gridStyles,
|
|
44
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_footer.euiDataGridFooterStyles);
|
|
49
|
+
var cssStyles = [styles.euiDataGridFooter, gridStyles.stickyFooter && styles.sticky, gridStyles.footer === 'striped' ? visibleRowIndex % 2 !== 0 && styles.striped : styles[gridStyles.footer]];
|
|
50
|
+
var classes = (0, _classnames.default)('euiDataGridFooter', className);
|
|
48
51
|
var dataTestSubj = (0, _classnames.default)('dataGridRow', 'dataGridFooterRow', _dataTestSubj);
|
|
49
52
|
var popoverContext = (0, _react.useContext)(_cell.DataGridCellPopoverContext);
|
|
50
53
|
var sharedCellProps = {
|
|
54
|
+
css: styles.euiDataGridFooterCell,
|
|
51
55
|
rowIndex: rowIndex,
|
|
52
56
|
visibleRowIndex: visibleRowIndex,
|
|
53
57
|
interactiveCellId: interactiveCellId,
|
|
@@ -56,6 +60,7 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
|
|
|
56
60
|
return (0, _react2.jsx)("div", _extends({
|
|
57
61
|
ref: ref,
|
|
58
62
|
role: "row",
|
|
63
|
+
css: cssStyles,
|
|
59
64
|
className: classes,
|
|
60
65
|
"data-test-subj": dataTestSubj
|
|
61
66
|
}, rest), leadingControlColumns.map(function (_ref2, i) {
|
|
@@ -221,8 +221,15 @@ var getSortColumnActions = exports.getSortColumnActions = function getSortColumn
|
|
|
221
221
|
var onClickSortAsc = function onClickSortAsc() {
|
|
222
222
|
sortBy('asc');
|
|
223
223
|
};
|
|
224
|
+
var isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc';
|
|
224
225
|
var action = {
|
|
225
|
-
label: (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
226
|
+
label: isSorted ? (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
227
|
+
token: "euiColumnActions.unsort",
|
|
228
|
+
default: "Unsort {schemaLabel}",
|
|
229
|
+
values: {
|
|
230
|
+
schemaLabel: label
|
|
231
|
+
}
|
|
232
|
+
}) : (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
226
233
|
token: "euiColumnActions.sort",
|
|
227
234
|
default: "Sort {schemaLabel}",
|
|
228
235
|
values: {
|
|
@@ -231,7 +238,6 @@ var getSortColumnActions = exports.getSortColumnActions = function getSortColumn
|
|
|
231
238
|
}),
|
|
232
239
|
onClick: onClickSortAsc,
|
|
233
240
|
isDisabled: column.isSortable === false,
|
|
234
|
-
className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc' ? 'euiDataGridHeader__action--selected' : '',
|
|
235
241
|
iconType: 'sortUp',
|
|
236
242
|
size: 'xs',
|
|
237
243
|
color: 'text'
|
|
@@ -243,8 +249,15 @@ var getSortColumnActions = exports.getSortColumnActions = function getSortColumn
|
|
|
243
249
|
var onClickSortDesc = function onClickSortDesc() {
|
|
244
250
|
sortBy('desc');
|
|
245
251
|
};
|
|
252
|
+
var _isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc';
|
|
246
253
|
var _action2 = {
|
|
247
|
-
label: (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
254
|
+
label: _isSorted ? (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
255
|
+
token: "euiColumnActions.unsort",
|
|
256
|
+
default: "Unsort {schemaLabel}",
|
|
257
|
+
values: {
|
|
258
|
+
schemaLabel: _label
|
|
259
|
+
}
|
|
260
|
+
}) : (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
248
261
|
token: "euiColumnActions.sort",
|
|
249
262
|
default: "Sort {schemaLabel}",
|
|
250
263
|
values: {
|
|
@@ -253,7 +266,6 @@ var getSortColumnActions = exports.getSortColumnActions = function getSortColumn
|
|
|
253
266
|
}),
|
|
254
267
|
onClick: onClickSortDesc,
|
|
255
268
|
isDisabled: column.isSortable === false,
|
|
256
|
-
className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc' ? 'euiDataGridHeader__action--selected' : '',
|
|
257
269
|
iconType: 'sortDown',
|
|
258
270
|
size: 'xs',
|
|
259
271
|
color: 'text'
|