@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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { css, keyframes } from '@emotion/react';
|
|
12
|
+
import { euiCanAnimate, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../../global_styling';
|
|
13
|
+
import { euiDataGridVariables } from '../../data_grid.styles';
|
|
14
|
+
import { euiDataGridCellOutlineStyles, euiDataGridCellOutlineSelectors } from './data_grid_cell.styles';
|
|
15
|
+
export var euiDataGridCellActionsStyles = function euiDataGridCellActionsStyles(euiThemeContext) {
|
|
16
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
17
|
+
var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
|
|
18
|
+
levels = _euiDataGridVariables.levels;
|
|
19
|
+
var borderWidth = euiTheme.border.width.thin;
|
|
20
|
+
var cellOutline = euiDataGridCellOutlineStyles(euiThemeContext);
|
|
21
|
+
var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors('.euiDataGridRowCell'),
|
|
22
|
+
cellSelectors = _euiDataGridCellOutli.actions;
|
|
23
|
+
return {
|
|
24
|
+
euiDataGridRowCell__actionsWrapper: /*#__PURE__*/css("position:absolute;", logicalCSS('left', 0), " ", logicalCSS('bottom', '100%'), "z-index:", levels.stickyHeader - 1, ";.euiDataGridRowCell[data-gridcell-visible-row-index='0']>&{z-index:", levels.stickyHeader + 1, ";}", cellSelectors.hoverZone, " &{", logicalCSS('min-width', '50%'), " ", logicalCSS('padding-right', euiTheme.size.base), ";};label:euiDataGridRowCell__actionsWrapper;"),
|
|
25
|
+
euiDataGridRowCell__actions: /*#__PURE__*/css("position:relative;display:flex;gap:", euiTheme.size.xxs, ";", logicalCSS('width', 'fit-content'), " padding-inline:", euiTheme.size.xxs, ";", logicalCSS('margin-bottom', "-".concat(borderWidth)), " background-color:", cellOutline.focusColor, ";color:", euiTheme.colors.emptyShade, ";border:", borderWidth, " solid ", cellOutline.focusColor, ";border-radius:", cellOutline.borderRadius, ";", logicalCSS('border-bottom-left-radius', 0), "&::after{content:'';position:absolute;", logicalCSS('top', '100%'), " ", logicalCSS('left', "-".concat(borderWidth)), " ", logicalSizeCSS(mathWithUnits(borderWidth, function (x) {
|
|
26
|
+
return x * 2;
|
|
27
|
+
})), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
|
|
28
|
+
euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.base), " ", logicalCSS('height', mathWithUnits([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
|
|
29
|
+
return x + y;
|
|
30
|
+
})), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}&.euiDataGridRowCell__expandCell .euiIcon{", logicalCSS('width', '120%'), " ", logicalCSS('height', '100%'), ";};label:euiDataGridRowCell__actionButtonIcon;")
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
var slideUp = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { transform: scaleY(0); }\n to { transform: scaleY(1); }\n"])));
|
|
@@ -21,8 +21,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
21
21
|
|
|
22
22
|
import React, { createContext, useState, useCallback, useMemo } from 'react';
|
|
23
23
|
import classNames from 'classnames';
|
|
24
|
-
import { keys } from '../../../../services';
|
|
24
|
+
import { keys, useEuiMemoizedStyles } from '../../../../services';
|
|
25
25
|
import { EuiWrappingPopover } from '../../../popover';
|
|
26
|
+
import { euiDataGridVariables } from '../../data_grid.styles';
|
|
27
|
+
import { euiDataGridCellPopoverStyles } from './data_grid_cell_popover.styles';
|
|
26
28
|
export var DataGridCellPopoverContext = /*#__PURE__*/createContext({
|
|
27
29
|
popoverIsOpen: false,
|
|
28
30
|
cellLocation: {
|
|
@@ -92,25 +94,23 @@ export var useCellPopover = function useCellPopover() {
|
|
|
92
94
|
// popover button isn't actually the DOM node we pass to `button`. Otherwise,
|
|
93
95
|
// clicking the expansion cell action triggers an outside click
|
|
94
96
|
var onClickOutside = useCallback(function (event) {
|
|
95
|
-
var
|
|
96
|
-
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;
|
|
97
|
+
var cellActions = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell__actionsWrapper');
|
|
97
98
|
if (!(cellActions !== null && cellActions !== void 0 && cellActions.contains(event.target))) {
|
|
98
99
|
closeCellPopover();
|
|
99
100
|
}
|
|
100
101
|
}, [popoverAnchor, closeCellPopover]);
|
|
101
102
|
var onKeyDown = useCallback(function (event) {
|
|
102
103
|
if (event.key === keys.F2 || event.key === keys.ESCAPE) {
|
|
103
|
-
var _popoverAnchor$parent2;
|
|
104
104
|
event.preventDefault();
|
|
105
105
|
event.stopPropagation();
|
|
106
106
|
closeCellPopover();
|
|
107
|
-
var cell = popoverAnchor === null || popoverAnchor === void 0
|
|
107
|
+
var cell = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell');
|
|
108
108
|
|
|
109
109
|
// Prevent cell animation flash while focus is being shifted between popover and cell
|
|
110
110
|
cell === null || cell === void 0 || cell.setAttribute('data-keyboard-closing', 'true');
|
|
111
111
|
// Ensure focus is returned to the parent cell, and remove animation stopgap
|
|
112
112
|
requestAnimationFrame(function () {
|
|
113
|
-
|
|
113
|
+
cell === null || cell === void 0 || cell.focus();
|
|
114
114
|
cell === null || cell === void 0 || cell.removeAttribute('data-keyboard-closing');
|
|
115
115
|
});
|
|
116
116
|
}
|
|
@@ -127,36 +127,45 @@ export var useCellPopover = function useCellPopover() {
|
|
|
127
127
|
setCellPopoverProps: setCellPopoverProps
|
|
128
128
|
};
|
|
129
129
|
}, [popoverIsOpen, closeCellPopover, openCellPopover, cellLocation]);
|
|
130
|
+
var styles = useEuiMemoizedStyles(euiDataGridCellPopoverStyles);
|
|
131
|
+
var _useEuiMemoizedStyles = useEuiMemoizedStyles(euiDataGridVariables),
|
|
132
|
+
levels = _useEuiMemoizedStyles.levels;
|
|
130
133
|
var cellPopover = useMemo(function () {
|
|
131
|
-
var _cellPopoverProps$pan;
|
|
134
|
+
var _cellPopoverProps$pan, _cell$offsetWidth;
|
|
132
135
|
if (!popoverIsOpen || !popoverAnchor) return null;
|
|
136
|
+
var cell = popoverAnchor.closest('.euiDataGridRowCell');
|
|
133
137
|
|
|
134
138
|
// Note that this popover is rendered once at the top grid level, rather than one popover per cell
|
|
135
139
|
return ___EmotionJSX(EuiWrappingPopover, _extends({
|
|
136
140
|
isOpen: popoverIsOpen,
|
|
137
141
|
display: "block",
|
|
138
142
|
hasArrow: false,
|
|
143
|
+
attachToAnchor: true // required for https://github.com/elastic/eui/issues/6151
|
|
144
|
+
,
|
|
139
145
|
panelPaddingSize: "s",
|
|
140
146
|
anchorPosition: popoverAnchorPosition,
|
|
141
|
-
repositionToCrossAxis: false
|
|
147
|
+
repositionToCrossAxis: false,
|
|
148
|
+
zIndex: levels.cellPopover
|
|
142
149
|
}, cellPopoverProps, {
|
|
143
150
|
focusTrapProps: {
|
|
144
151
|
onClickOutside: onClickOutside,
|
|
145
152
|
clickOutsideDisables: false
|
|
146
153
|
},
|
|
147
|
-
panelProps: _objectSpread({
|
|
154
|
+
panelProps: _objectSpread(_objectSpread({
|
|
148
155
|
'data-test-subj': 'euiDataGridExpansionPopover'
|
|
149
|
-
}, cellPopoverProps.panelProps || {}),
|
|
156
|
+
}, cellPopoverProps.panelProps || {}), {}, {
|
|
157
|
+
css: [styles.euiDataGridRowCell__popover, cellPopoverProps.css]
|
|
158
|
+
}),
|
|
150
159
|
panelClassName: classNames('euiDataGridRowCell__popover', cellPopoverProps.panelClassName, (_cellPopoverProps$pan = cellPopoverProps.panelProps) === null || _cellPopoverProps$pan === void 0 ? void 0 : _cellPopoverProps$pan.className),
|
|
151
160
|
panelStyle: {
|
|
152
|
-
maxInlineSize: "min(75vw, max(".concat(
|
|
161
|
+
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))"),
|
|
153
162
|
maxBlockSize: '50vh'
|
|
154
163
|
},
|
|
155
164
|
onKeyDown: onKeyDown,
|
|
156
165
|
button: popoverAnchor,
|
|
157
166
|
closePopover: closeCellPopover
|
|
158
167
|
}), popoverContent);
|
|
159
|
-
}, [popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
|
|
168
|
+
}, [styles, levels.cellPopover, popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
|
|
160
169
|
return useMemo(function () {
|
|
161
170
|
return {
|
|
162
171
|
cellPopoverContext: cellPopoverContext,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { css, keyframes } from '@emotion/react';
|
|
12
|
+
import { euiScrollBarStyles, euiCanAnimate } from '../../../../global_styling';
|
|
13
|
+
export var euiDataGridCellPopoverStyles = function euiDataGridCellPopoverStyles(euiThemeContext) {
|
|
14
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
15
|
+
return {
|
|
16
|
+
euiDataGridRowCell__popover: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " overflow:auto;", euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";animation-name:", fadeIn, ";};label:euiDataGridRowCell__popover;")
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
var fadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
|
|
@@ -15,11 +15,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
15
15
|
import React, { useEffect, useState, useMemo } from 'react';
|
|
16
16
|
import PropTypes from "prop-types";
|
|
17
17
|
import { tabbable } from 'tabbable';
|
|
18
|
-
import
|
|
19
|
-
import { useGeneratedHtmlId } from '../../../../services
|
|
18
|
+
import classNames from 'classnames';
|
|
19
|
+
import { keys, useGeneratedHtmlId } from '../../../../services';
|
|
20
20
|
import { isDOMNode } from '../../../../utils';
|
|
21
21
|
import { EuiFocusTrap } from '../../../focus_trap';
|
|
22
|
-
import { EuiScreenReaderOnly } from '../../../accessibility';
|
|
23
22
|
import { EuiI18n } from '../../../i18n';
|
|
24
23
|
|
|
25
24
|
/**
|
|
@@ -99,20 +98,22 @@ export var FocusTrappedChildren = function FocusTrappedChildren(_ref2) {
|
|
|
99
98
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
100
99
|
isExited = _useState6[0],
|
|
101
100
|
setExited = _useState6[1];
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
suffix: 'keyboardHint'
|
|
105
|
-
});
|
|
106
|
-
var exitedHintAriaId = useGeneratedHtmlId({
|
|
107
|
-
prefix: 'euiDataGridCellHeader',
|
|
108
|
-
suffix: 'exited'
|
|
101
|
+
var ariaDescribedById = useGeneratedHtmlId({
|
|
102
|
+
suffix: 'focusTrapHint'
|
|
109
103
|
});
|
|
110
104
|
|
|
111
105
|
// direct DOM manipulation as workaround to attach required hints
|
|
112
106
|
useEffect(function () {
|
|
113
107
|
var currentAriaDescribedbyId = cellEl.getAttribute('aria-describedby');
|
|
114
|
-
cellEl.setAttribute('aria-describedby',
|
|
115
|
-
|
|
108
|
+
cellEl.setAttribute('aria-describedby', classNames(currentAriaDescribedbyId, ariaDescribedById));
|
|
109
|
+
return function () {
|
|
110
|
+
if (currentAriaDescribedbyId) {
|
|
111
|
+
cellEl.setAttribute('aria-descibedby', currentAriaDescribedbyId);
|
|
112
|
+
} else {
|
|
113
|
+
cellEl.removeAttribute('aria-describedby');
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}, [cellEl, ariaDescribedById]);
|
|
116
117
|
useEffect(function () {
|
|
117
118
|
if (isCellEntered) {
|
|
118
119
|
enableAndFocusInteractives(cellEl);
|
|
@@ -166,23 +167,20 @@ export var FocusTrappedChildren = function FocusTrappedChildren(_ref2) {
|
|
|
166
167
|
onDeactivation: function onDeactivation() {
|
|
167
168
|
return setIsCellEntered(false);
|
|
168
169
|
}
|
|
169
|
-
}, children, ___EmotionJSX(
|
|
170
|
-
id:
|
|
171
|
-
|
|
170
|
+
}, children, ___EmotionJSX("p", {
|
|
171
|
+
id: ariaDescribedById,
|
|
172
|
+
hidden: true
|
|
172
173
|
}, isExited && ___EmotionJSX(EuiI18n
|
|
173
174
|
// eslint-disable-next-line local/i18n
|
|
174
175
|
, {
|
|
175
176
|
token: "euiDataGridCell.focusTrapExitPrompt",
|
|
176
177
|
default: "Exited cell content."
|
|
177
|
-
})
|
|
178
|
-
id: keyboardHintAriaId,
|
|
179
|
-
"aria-hidden": "true"
|
|
180
|
-
}, !isCellEntered && ___EmotionJSX(EuiI18n
|
|
178
|
+
}), !isCellEntered && ___EmotionJSX(EuiI18n
|
|
181
179
|
// eslint-disable-next-line local/i18n
|
|
182
180
|
, {
|
|
183
181
|
token: "euiDataGridCell.focusTrapEnterPrompt",
|
|
184
182
|
default: "Press the Enter key to interact with this cell's contents."
|
|
185
|
-
})))
|
|
183
|
+
})));
|
|
186
184
|
};
|
|
187
185
|
|
|
188
186
|
/**
|
|
@@ -12,8 +12,10 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../../services';
|
|
15
16
|
import { EuiDataGridBodyVirtualized } from './data_grid_body_virtualized';
|
|
16
17
|
import { EuiDataGridBodyCustomRender } from './data_grid_body_custom';
|
|
18
|
+
import { euiDataGridBodyStyles } from './data_grid_body.styles';
|
|
17
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
20
|
export var EuiDataGridBody = function EuiDataGridBody(_ref) {
|
|
19
21
|
var renderCustomGridBody = _ref.renderCustomGridBody,
|
|
@@ -23,9 +25,14 @@ export var EuiDataGridBody = function EuiDataGridBody(_ref) {
|
|
|
23
25
|
* + virtualization library for rendering content, or if consumers have
|
|
24
26
|
* passed their own custom renderer
|
|
25
27
|
*/
|
|
28
|
+
var styles = useEuiMemoizedStyles(euiDataGridBodyStyles);
|
|
29
|
+
var cssStyles = [styles.euiDataGridBody, renderCustomGridBody ? styles.customRender : styles.virtualized];
|
|
26
30
|
return renderCustomGridBody ? ___EmotionJSX(EuiDataGridBodyCustomRender, _extends({
|
|
27
|
-
renderCustomGridBody: renderCustomGridBody
|
|
28
|
-
|
|
31
|
+
renderCustomGridBody: renderCustomGridBody,
|
|
32
|
+
css: cssStyles
|
|
33
|
+
}, props)) : ___EmotionJSX(EuiDataGridBodyVirtualized, _extends({
|
|
34
|
+
css: cssStyles
|
|
35
|
+
}, props));
|
|
29
36
|
};
|
|
30
37
|
EuiDataGridBody.propTypes = {
|
|
31
38
|
leadingControlColumns: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -594,34 +601,42 @@ EuiDataGridBody.propTypes = {
|
|
|
594
601
|
gridStyles: PropTypes.shape({
|
|
595
602
|
/**
|
|
596
603
|
* Size of fonts used within the row and column cells
|
|
604
|
+
* @default m
|
|
597
605
|
*/
|
|
598
606
|
fontSize: PropTypes.oneOf(["s", "m", "l"]),
|
|
599
607
|
/**
|
|
600
608
|
* Defines the padding with the row and column cells
|
|
609
|
+
* @default m
|
|
601
610
|
*/
|
|
602
611
|
cellPadding: PropTypes.oneOf(["s", "m", "l"]),
|
|
603
612
|
/**
|
|
604
|
-
* Border
|
|
613
|
+
* Border used for the row and column cells
|
|
614
|
+
* @default all
|
|
605
615
|
*/
|
|
606
616
|
border: PropTypes.oneOf(["all", "horizontal", "none"]),
|
|
607
617
|
/**
|
|
608
618
|
* If set to true, rows will alternate zebra striping for clarity
|
|
619
|
+
* @default false
|
|
609
620
|
*/
|
|
610
621
|
stripes: PropTypes.bool,
|
|
611
622
|
/**
|
|
612
623
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
624
|
+
* @default shade
|
|
613
625
|
*/
|
|
614
626
|
header: PropTypes.oneOf(["shade", "underline"]),
|
|
615
627
|
/**
|
|
616
628
|
* Visual style for the column footers.
|
|
629
|
+
* @default overline
|
|
617
630
|
*/
|
|
618
631
|
footer: PropTypes.oneOf(["shade", "overline", "striped"]),
|
|
619
632
|
/**
|
|
620
633
|
* If set to true, the footer row will be sticky
|
|
634
|
+
* @default true
|
|
621
635
|
*/
|
|
622
636
|
stickyFooter: PropTypes.bool,
|
|
623
637
|
/**
|
|
624
638
|
* Will define what visual style to show on row hover
|
|
639
|
+
* @default hover
|
|
625
640
|
*/
|
|
626
641
|
rowHover: PropTypes.oneOf(["highlight", "none"]),
|
|
627
642
|
/**
|
|
@@ -637,5 +652,6 @@ EuiDataGridBody.propTypes = {
|
|
|
637
652
|
gridWidth: PropTypes.number.isRequired,
|
|
638
653
|
gridRef: PropTypes.any.isRequired,
|
|
639
654
|
gridItemsRendered: PropTypes.any.isRequired,
|
|
640
|
-
wrapperRef: PropTypes.any.isRequired
|
|
655
|
+
wrapperRef: PropTypes.any.isRequired,
|
|
656
|
+
className: PropTypes.string
|
|
641
657
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiScrollBarStyles, logicalSizeCSS } from '../../../global_styling';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "jawla0-virtualized",
|
|
14
|
+
styles: "scroll-padding:0;label:virtualized;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "jawla0-virtualized",
|
|
17
|
+
styles: "scroll-padding:0;label:virtualized;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
export var euiDataGridBodyStyles = function euiDataGridBodyStyles(euiThemeContext) {
|
|
21
|
+
return {
|
|
22
|
+
euiDataGridBody: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), ";;label:euiDataGridBody;"),
|
|
23
|
+
virtualized: _ref,
|
|
24
|
+
customRender: /*#__PURE__*/css(logicalSizeCSS('100%'), " overflow:auto;;label:customRender;")
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -56,7 +56,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
56
56
|
pagination = _ref.pagination,
|
|
57
57
|
rowHeightsOptions = _ref.rowHeightsOptions,
|
|
58
58
|
gridWidth = _ref.gridWidth,
|
|
59
|
-
gridStyles = _ref.gridStyles
|
|
59
|
+
gridStyles = _ref.gridStyles,
|
|
60
|
+
className = _ref.className;
|
|
60
61
|
/**
|
|
61
62
|
* Columns & widths
|
|
62
63
|
*/
|
|
@@ -105,7 +106,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
105
106
|
switchColumnPos: switchColumnPos,
|
|
106
107
|
sorting: sorting,
|
|
107
108
|
schema: schema,
|
|
108
|
-
schemaDetectors: schemaDetectors
|
|
109
|
+
schemaDetectors: schemaDetectors,
|
|
110
|
+
gridStyles: gridStyles
|
|
109
111
|
}),
|
|
110
112
|
headerRow = _useDataGridHeader.headerRow;
|
|
111
113
|
var _useDataGridFooter = useDataGridFooter({
|
|
@@ -119,7 +121,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
119
121
|
columns: columns,
|
|
120
122
|
columnWidths: columnWidths,
|
|
121
123
|
defaultColumnWidth: defaultColumnWidth,
|
|
122
|
-
schema: schema
|
|
124
|
+
schema: schema,
|
|
125
|
+
gridStyles: gridStyles
|
|
123
126
|
}),
|
|
124
127
|
footerRow = _useDataGridFooter.footerRow;
|
|
125
128
|
|
|
@@ -167,7 +170,7 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
167
170
|
customGridBodyProps = _useState2[0],
|
|
168
171
|
setCustomGridBodyProps = _useState2[1];
|
|
169
172
|
return ___EmotionJSX("div", _extends({}, customGridBodyProps, {
|
|
170
|
-
className: classNames('euiDataGrid__customRenderBody', customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
|
|
173
|
+
className: classNames('euiDataGrid__customRenderBody', className, customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
|
|
171
174
|
}), headerRow, renderCustomGridBody({
|
|
172
175
|
visibleColumns: visibleColumns,
|
|
173
176
|
visibleRowData: visibleRows,
|
|
@@ -742,34 +745,42 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
742
745
|
gridStyles: PropTypes.shape({
|
|
743
746
|
/**
|
|
744
747
|
* Size of fonts used within the row and column cells
|
|
748
|
+
* @default m
|
|
745
749
|
*/
|
|
746
750
|
fontSize: PropTypes.oneOf(["s", "m", "l"]),
|
|
747
751
|
/**
|
|
748
752
|
* Defines the padding with the row and column cells
|
|
753
|
+
* @default m
|
|
749
754
|
*/
|
|
750
755
|
cellPadding: PropTypes.oneOf(["s", "m", "l"]),
|
|
751
756
|
/**
|
|
752
|
-
* Border
|
|
757
|
+
* Border used for the row and column cells
|
|
758
|
+
* @default all
|
|
753
759
|
*/
|
|
754
760
|
border: PropTypes.oneOf(["all", "horizontal", "none"]),
|
|
755
761
|
/**
|
|
756
762
|
* If set to true, rows will alternate zebra striping for clarity
|
|
763
|
+
* @default false
|
|
757
764
|
*/
|
|
758
765
|
stripes: PropTypes.bool,
|
|
759
766
|
/**
|
|
760
767
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
768
|
+
* @default shade
|
|
761
769
|
*/
|
|
762
770
|
header: PropTypes.oneOf(["shade", "underline"]),
|
|
763
771
|
/**
|
|
764
772
|
* Visual style for the column footers.
|
|
773
|
+
* @default overline
|
|
765
774
|
*/
|
|
766
775
|
footer: PropTypes.oneOf(["shade", "overline", "striped"]),
|
|
767
776
|
/**
|
|
768
777
|
* If set to true, the footer row will be sticky
|
|
778
|
+
* @default true
|
|
769
779
|
*/
|
|
770
780
|
stickyFooter: PropTypes.bool,
|
|
771
781
|
/**
|
|
772
782
|
* Will define what visual style to show on row hover
|
|
783
|
+
* @default hover
|
|
773
784
|
*/
|
|
774
785
|
rowHover: PropTypes.oneOf(["highlight", "none"]),
|
|
775
786
|
/**
|
|
@@ -785,5 +796,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
785
796
|
gridWidth: PropTypes.number.isRequired,
|
|
786
797
|
gridRef: PropTypes.any.isRequired,
|
|
787
798
|
gridItemsRendered: PropTypes.any.isRequired,
|
|
788
|
-
wrapperRef: PropTypes.any.isRequired
|
|
799
|
+
wrapperRef: PropTypes.any.isRequired,
|
|
800
|
+
className: PropTypes.string
|
|
789
801
|
};
|
|
@@ -108,7 +108,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
108
108
|
gridWidth = _ref3.gridWidth,
|
|
109
109
|
gridRef = _ref3.gridRef,
|
|
110
110
|
gridItemsRendered = _ref3.gridItemsRendered,
|
|
111
|
-
wrapperRef = _ref3.wrapperRef
|
|
111
|
+
wrapperRef = _ref3.wrapperRef,
|
|
112
|
+
className = _ref3.className;
|
|
112
113
|
/**
|
|
113
114
|
* Grid refs & observers
|
|
114
115
|
*/
|
|
@@ -157,7 +158,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
157
158
|
switchColumnPos: switchColumnPos,
|
|
158
159
|
sorting: sorting,
|
|
159
160
|
schema: schema,
|
|
160
|
-
schemaDetectors: schemaDetectors
|
|
161
|
+
schemaDetectors: schemaDetectors,
|
|
162
|
+
gridStyles: gridStyles
|
|
161
163
|
}),
|
|
162
164
|
headerRow = _useDataGridHeader.headerRow,
|
|
163
165
|
headerRowHeight = _useDataGridHeader.headerRowHeight;
|
|
@@ -172,7 +174,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
172
174
|
columns: columns,
|
|
173
175
|
columnWidths: columnWidths,
|
|
174
176
|
defaultColumnWidth: defaultColumnWidth,
|
|
175
|
-
schema: schema
|
|
177
|
+
schema: schema,
|
|
178
|
+
gridStyles: gridStyles
|
|
176
179
|
}),
|
|
177
180
|
footerRow = _useDataGridFooter.footerRow,
|
|
178
181
|
footerRowHeight = _useDataGridFooter.footerRowHeight;
|
|
@@ -301,7 +304,7 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
301
304
|
value: rowWrapperContextValue
|
|
302
305
|
}, ___EmotionJSX(Grid, _extends({}, virtualizationOptions, {
|
|
303
306
|
ref: gridRef,
|
|
304
|
-
className: classNames('euiDataGrid__virtualized', virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
|
|
307
|
+
className: classNames('euiDataGrid__virtualized', className, virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
|
|
305
308
|
onItemsRendered: onItemsRendered,
|
|
306
309
|
innerElementType: InnerElement,
|
|
307
310
|
outerRef: outerGridRef,
|
|
@@ -882,34 +885,42 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
882
885
|
gridStyles: PropTypes.shape({
|
|
883
886
|
/**
|
|
884
887
|
* Size of fonts used within the row and column cells
|
|
888
|
+
* @default m
|
|
885
889
|
*/
|
|
886
890
|
fontSize: PropTypes.oneOf(["s", "m", "l"]),
|
|
887
891
|
/**
|
|
888
892
|
* Defines the padding with the row and column cells
|
|
893
|
+
* @default m
|
|
889
894
|
*/
|
|
890
895
|
cellPadding: PropTypes.oneOf(["s", "m", "l"]),
|
|
891
896
|
/**
|
|
892
|
-
* Border
|
|
897
|
+
* Border used for the row and column cells
|
|
898
|
+
* @default all
|
|
893
899
|
*/
|
|
894
900
|
border: PropTypes.oneOf(["all", "horizontal", "none"]),
|
|
895
901
|
/**
|
|
896
902
|
* If set to true, rows will alternate zebra striping for clarity
|
|
903
|
+
* @default false
|
|
897
904
|
*/
|
|
898
905
|
stripes: PropTypes.bool,
|
|
899
906
|
/**
|
|
900
907
|
* Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
|
|
908
|
+
* @default shade
|
|
901
909
|
*/
|
|
902
910
|
header: PropTypes.oneOf(["shade", "underline"]),
|
|
903
911
|
/**
|
|
904
912
|
* Visual style for the column footers.
|
|
913
|
+
* @default overline
|
|
905
914
|
*/
|
|
906
915
|
footer: PropTypes.oneOf(["shade", "overline", "striped"]),
|
|
907
916
|
/**
|
|
908
917
|
* If set to true, the footer row will be sticky
|
|
918
|
+
* @default true
|
|
909
919
|
*/
|
|
910
920
|
stickyFooter: PropTypes.bool,
|
|
911
921
|
/**
|
|
912
922
|
* Will define what visual style to show on row hover
|
|
923
|
+
* @default hover
|
|
913
924
|
*/
|
|
914
925
|
rowHover: PropTypes.oneOf(["highlight", "none"]),
|
|
915
926
|
/**
|
|
@@ -925,6 +936,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
925
936
|
gridWidth: PropTypes.number.isRequired,
|
|
926
937
|
gridRef: PropTypes.any.isRequired,
|
|
927
938
|
gridItemsRendered: PropTypes.any.isRequired,
|
|
928
|
-
wrapperRef: PropTypes.any.isRequired
|
|
939
|
+
wrapperRef: PropTypes.any.isRequired,
|
|
940
|
+
className: PropTypes.string
|
|
929
941
|
};
|
|
930
942
|
EuiDataGridBodyVirtualized.displayName = 'EuiDataGridBodyVirtualized';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { logicalCSS } from '../../../../global_styling';
|
|
11
|
+
import { euiDataGridVariables } from '../../data_grid.styles';
|
|
12
|
+
export var euiDataGridFooterStyles = function euiDataGridFooterStyles(euiThemeContext) {
|
|
13
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
14
|
+
var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
|
|
15
|
+
levels = _euiDataGridVariables.levels;
|
|
16
|
+
return {
|
|
17
|
+
euiDataGridFooter: /*#__PURE__*/css("display:flex;", logicalCSS('width', 'fit-content'), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGridFooter;"),
|
|
18
|
+
sticky: /*#__PURE__*/css("z-index:", levels.stickyHeader, ";position:sticky;", logicalCSS('bottom', 0), ";;label:sticky;"),
|
|
19
|
+
overline: /*#__PURE__*/css(logicalCSS('border-top', "".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.text)), ";;label:overline;"),
|
|
20
|
+
shade: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";;label:shade;"),
|
|
21
|
+
striped: /*#__PURE__*/css(".euiDataGrid--stripes &{background-color:", euiTheme.colors.lightestShade, ";};label:striped;"),
|
|
22
|
+
euiDataGridFooterCell: /*#__PURE__*/css("flex:0 0 auto;font-weight:", euiTheme.font.weight.bold, ";;label:euiDataGridFooterCell;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex"];
|
|
1
|
+
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "gridStyles"];
|
|
2
2
|
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); }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
@@ -10,9 +10,11 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import classnames from 'classnames';
|
|
14
13
|
import React, { forwardRef, memo, useContext } from 'react';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../../../services';
|
|
15
16
|
import { EuiDataGridCell, DataGridCellPopoverContext } from '../cell';
|
|
17
|
+
import { euiDataGridFooterStyles } from './data_grid_footer.styles';
|
|
16
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
19
|
var renderEmpty = function renderEmpty() {
|
|
18
20
|
return null;
|
|
@@ -32,13 +34,15 @@ var EuiDataGridFooterRow = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (
|
|
|
32
34
|
_dataTestSubj = _ref['data-test-subj'],
|
|
33
35
|
_ref$visibleRowIndex = _ref.visibleRowIndex,
|
|
34
36
|
visibleRowIndex = _ref$visibleRowIndex === void 0 ? rowIndex : _ref$visibleRowIndex,
|
|
37
|
+
gridStyles = _ref.gridStyles,
|
|
35
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
var styles = useEuiMemoizedStyles(euiDataGridFooterStyles);
|
|
40
|
+
var cssStyles = [styles.euiDataGridFooter, gridStyles.stickyFooter && styles.sticky, gridStyles.footer === 'striped' ? visibleRowIndex % 2 !== 0 && styles.striped : styles[gridStyles.footer]];
|
|
41
|
+
var classes = classnames('euiDataGridFooter', className);
|
|
39
42
|
var dataTestSubj = classnames('dataGridRow', 'dataGridFooterRow', _dataTestSubj);
|
|
40
43
|
var popoverContext = useContext(DataGridCellPopoverContext);
|
|
41
44
|
var sharedCellProps = {
|
|
45
|
+
css: styles.euiDataGridFooterCell,
|
|
42
46
|
rowIndex: rowIndex,
|
|
43
47
|
visibleRowIndex: visibleRowIndex,
|
|
44
48
|
interactiveCellId: interactiveCellId,
|
|
@@ -47,6 +51,7 @@ var EuiDataGridFooterRow = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (
|
|
|
47
51
|
return ___EmotionJSX("div", _extends({
|
|
48
52
|
ref: ref,
|
|
49
53
|
role: "row",
|
|
54
|
+
css: cssStyles,
|
|
50
55
|
className: classes,
|
|
51
56
|
"data-test-subj": dataTestSubj
|
|
52
57
|
}, rest), leadingControlColumns.map(function (_ref2, i) {
|
|
@@ -216,8 +216,15 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
|
|
|
216
216
|
var onClickSortAsc = function onClickSortAsc() {
|
|
217
217
|
sortBy('asc');
|
|
218
218
|
};
|
|
219
|
+
var isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc';
|
|
219
220
|
var action = {
|
|
220
|
-
label: ___EmotionJSX(EuiI18n, {
|
|
221
|
+
label: isSorted ? ___EmotionJSX(EuiI18n, {
|
|
222
|
+
token: "euiColumnActions.unsort",
|
|
223
|
+
default: "Unsort {schemaLabel}",
|
|
224
|
+
values: {
|
|
225
|
+
schemaLabel: label
|
|
226
|
+
}
|
|
227
|
+
}) : ___EmotionJSX(EuiI18n, {
|
|
221
228
|
token: "euiColumnActions.sort",
|
|
222
229
|
default: "Sort {schemaLabel}",
|
|
223
230
|
values: {
|
|
@@ -226,7 +233,6 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
|
|
|
226
233
|
}),
|
|
227
234
|
onClick: onClickSortAsc,
|
|
228
235
|
isDisabled: column.isSortable === false,
|
|
229
|
-
className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc' ? 'euiDataGridHeader__action--selected' : '',
|
|
230
236
|
iconType: 'sortUp',
|
|
231
237
|
size: 'xs',
|
|
232
238
|
color: 'text'
|
|
@@ -238,8 +244,15 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
|
|
|
238
244
|
var onClickSortDesc = function onClickSortDesc() {
|
|
239
245
|
sortBy('desc');
|
|
240
246
|
};
|
|
247
|
+
var _isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc';
|
|
241
248
|
var _action2 = {
|
|
242
|
-
label: ___EmotionJSX(EuiI18n, {
|
|
249
|
+
label: _isSorted ? ___EmotionJSX(EuiI18n, {
|
|
250
|
+
token: "euiColumnActions.unsort",
|
|
251
|
+
default: "Unsort {schemaLabel}",
|
|
252
|
+
values: {
|
|
253
|
+
schemaLabel: _label
|
|
254
|
+
}
|
|
255
|
+
}) : ___EmotionJSX(EuiI18n, {
|
|
243
256
|
token: "euiColumnActions.sort",
|
|
244
257
|
default: "Sort {schemaLabel}",
|
|
245
258
|
values: {
|
|
@@ -248,7 +261,6 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
|
|
|
248
261
|
}),
|
|
249
262
|
onClick: onClickSortDesc,
|
|
250
263
|
isDisabled: column.isSortable === false,
|
|
251
|
-
className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc' ? 'euiDataGridHeader__action--selected' : '',
|
|
252
264
|
iconType: 'sortDown',
|
|
253
265
|
size: 'xs',
|
|
254
266
|
color: 'text'
|