@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,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridColumnSortingStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _themes = require("../../../themes");
|
|
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 euiDataGridColumnSortingStyles = exports.euiDataGridColumnSortingStyles = function euiDataGridColumnSortingStyles(euiThemeContext) {
|
|
19
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
+
var maxStaticHeight = (0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
21
|
+
return x * 25;
|
|
22
|
+
});
|
|
23
|
+
var maxResponsiveHeight = "min(".concat(maxStaticHeight, ", 75vh)");
|
|
24
|
+
return {
|
|
25
|
+
/**
|
|
26
|
+
* Sorted fields
|
|
27
|
+
*/
|
|
28
|
+
euiDataGridColumnSorting: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "margin:-", euiTheme.size.s, ";", (0, _global_styling.euiYScroll)(euiThemeContext), ";;label:euiDataGridColumnSorting;"),
|
|
29
|
+
euiDataGridColumnSorting__item: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), " &.euiDataGridColumnSorting__item-isDragging{", (0, _themes.euiShadowLarge)(euiThemeContext), " background-color:", euiTheme.colors.emptyShade, ";};label:euiDataGridColumnSorting__item;"),
|
|
30
|
+
euiDataGridColumnSorting__name: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), " ", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.l), ";};label:euiDataGridColumnSorting__name;"),
|
|
31
|
+
euiDataGridColumnSorting__order: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.xxl, function (x) {
|
|
32
|
+
return x * 5;
|
|
33
|
+
})), ";}.euiButtonGroup__buttons{border:none;}.euiButtonGroupButton{font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";};label:euiDataGridColumnSorting__order;"),
|
|
34
|
+
euiDataGridColumnSorting__dragHandle: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), ";;label:euiDataGridColumnSorting__dragHandle;"),
|
|
35
|
+
/**
|
|
36
|
+
* 'Pick fields to sort by' popover
|
|
37
|
+
*/
|
|
38
|
+
euiDataGridColumnSorting__fieldList: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;padding-block:", euiTheme.size.xs, ";", (0, _global_styling.logicalCSS)('max-height', maxResponsiveHeight), " ", (0, _global_styling.euiYScroll)(euiThemeContext), ";;label:euiDataGridColumnSorting__fieldList;"),
|
|
39
|
+
euiDataGridColumnSorting__field: /*#__PURE__*/(0, _react.css)("padding-block:", euiTheme.size.xs, ";padding-inline:", euiTheme.size.s, ";outline-offset:-", euiTheme.focus.width, ";;label:euiDataGridColumnSorting__field;")
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -8,6 +8,7 @@ exports.defaultSortDescLabel = exports.defaultSortAscLabel = exports.EuiDataGrid
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _services = require("../../../services");
|
|
11
12
|
var _accessibility = require("../../accessibility");
|
|
12
13
|
var _button = require("../../button");
|
|
13
14
|
var _drag_and_drop = require("../../drag_and_drop");
|
|
@@ -17,6 +18,7 @@ var _icon = require("../../icon");
|
|
|
17
18
|
var _text = require("../../text");
|
|
18
19
|
var _token = require("../../token");
|
|
19
20
|
var _data_grid_schema = require("../utils/data_grid_schema");
|
|
21
|
+
var _column_sorting = require("./column_sorting.styles");
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
23
|
var _excluded = ["id", "display", "direction", "index", "sorting", "schema", "schemaDetectors"];
|
|
22
24
|
/*
|
|
@@ -91,16 +93,22 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
91
93
|
});
|
|
92
94
|
sorting.onSort(nextColumns);
|
|
93
95
|
}, [id, sorting]);
|
|
96
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_column_sorting.euiDataGridColumnSortingStyles);
|
|
94
97
|
return (0, _react2.jsx)(_drag_and_drop.EuiDraggable, _extends({
|
|
95
98
|
draggableId: id,
|
|
96
99
|
index: index,
|
|
97
100
|
hasInteractiveChildren: true,
|
|
98
101
|
customDragHandle: true
|
|
99
102
|
}, rest), function (provided, state) {
|
|
100
|
-
return (0, _react2.jsx)(
|
|
103
|
+
return (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
104
|
+
css: styles.euiDataGridColumnSorting__item,
|
|
101
105
|
className: (0, _classnames.default)('euiDataGridColumnSorting__item', {
|
|
102
106
|
'euiDataGridColumnSorting__item-isDragging': state.isDragging
|
|
103
|
-
})
|
|
107
|
+
}),
|
|
108
|
+
gutterSize: "xs",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
responsive: false,
|
|
111
|
+
"data-test-subj": "euiDataGridColumnSorting-sortColumn-".concat(id)
|
|
104
112
|
}, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
105
113
|
token: "euiColumnSortingDraggable.activeSortLabel",
|
|
106
114
|
default: "{display} is sorting this data grid",
|
|
@@ -109,12 +117,7 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
109
117
|
}
|
|
110
118
|
}, function (activeSortLabel) {
|
|
111
119
|
return activeSortLabel;
|
|
112
|
-
}))), (0, _react2.jsx)(_flex.
|
|
113
|
-
gutterSize: "xs",
|
|
114
|
-
alignItems: "center",
|
|
115
|
-
responsive: false,
|
|
116
|
-
"data-test-subj": "euiDataGridColumnSorting-sortColumn-".concat(id)
|
|
117
|
-
}, (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
120
|
+
}))), (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
118
121
|
grow: false
|
|
119
122
|
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
120
123
|
token: "euiColumnSortingDraggable.removeSortLabel",
|
|
@@ -130,10 +133,12 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
130
133
|
iconType: "cross",
|
|
131
134
|
onClick: removeSort
|
|
132
135
|
});
|
|
133
|
-
})), (0, _react2.jsx)(_flex.EuiFlexItem
|
|
136
|
+
})), (0, _react2.jsx)(_flex.EuiFlexItem
|
|
137
|
+
// This extra column name flex item affords the column more grabbable real estate
|
|
138
|
+
// for mouse users, while hiding repetition for keyboard/screen reader users
|
|
139
|
+
, _extends({
|
|
140
|
+
css: styles.euiDataGridColumnSorting__name,
|
|
134
141
|
className: "euiDataGridColumnSorting__name"
|
|
135
|
-
// This extra column name flex item affords the column more grabbable real estate
|
|
136
|
-
// for mouse users, while hiding repetition for keyboard/screen reader users
|
|
137
142
|
}, provided.dragHandleProps, {
|
|
138
143
|
tabIndex: -1,
|
|
139
144
|
"aria-hidden": true
|
|
@@ -148,7 +153,7 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
148
153
|
iconType: schemaDetails != null ? schemaDetails.icon : 'tokenString'
|
|
149
154
|
})), (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_text.EuiText, {
|
|
150
155
|
size: "xs"
|
|
151
|
-
},
|
|
156
|
+
}, display)))), (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
152
157
|
token: "euiColumnSortingDraggable.toggleLegend",
|
|
153
158
|
default: "Select sorting method for {display}",
|
|
154
159
|
values: {
|
|
@@ -157,10 +162,10 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
157
162
|
}, function (toggleLegend) {
|
|
158
163
|
return (0, _react2.jsx)(_button.EuiButtonGroup, {
|
|
159
164
|
legend: toggleLegend,
|
|
160
|
-
name: id,
|
|
161
165
|
isFullWidth: true,
|
|
162
166
|
options: toggleOptions,
|
|
163
167
|
buttonSize: "compressed",
|
|
168
|
+
css: styles.euiDataGridColumnSorting__order,
|
|
164
169
|
className: "euiDataGridColumnSorting__order",
|
|
165
170
|
idSelected: direction === 'asc' ? "".concat(id, "Asc") : "".concat(id, "Desc"),
|
|
166
171
|
onChange: toggleLegendHandler
|
|
@@ -172,7 +177,7 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
172
177
|
}), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
173
178
|
type: "grab",
|
|
174
179
|
color: "subdued"
|
|
175
|
-
})))
|
|
180
|
+
})));
|
|
176
181
|
});
|
|
177
182
|
};
|
|
178
183
|
EuiDataGridColumnSortingDraggable.propTypes = {
|
|
@@ -8,8 +8,10 @@ exports.checkOrDefaultToolBarDisplayOptions = checkOrDefaultToolBarDisplayOption
|
|
|
8
8
|
exports.getNestedObjectOptions = getNestedObjectOptions;
|
|
9
9
|
exports.renderAdditionalControls = void 0;
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _accessibility = require("../../accessibility");
|
|
12
11
|
var _utils = require("../../../utils");
|
|
12
|
+
var _services = require("../../../services");
|
|
13
|
+
var _accessibility = require("../../accessibility");
|
|
14
|
+
var _data_grid_toolbar = require("./data_grid_toolbar.styles");
|
|
13
15
|
var _react2 = require("@emotion/react");
|
|
14
16
|
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); }
|
|
15
17
|
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; }
|
|
@@ -33,6 +35,8 @@ var EuiDataGridToolbar = exports.EuiDataGridToolbar = function EuiDataGridToolba
|
|
|
33
35
|
columnSelector = _ref.columnSelector,
|
|
34
36
|
columnSorting = _ref.columnSorting,
|
|
35
37
|
renderCustomToolbar = _ref.renderCustomToolbar;
|
|
38
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_toolbar.euiDataGridToolbarStyles);
|
|
39
|
+
|
|
36
40
|
// Enables/disables grid controls based on available width
|
|
37
41
|
var hasRoomForGridControls = _utils.IS_JEST_ENVIRONMENT ? true : gridWidth > minSizeForControls || isFullScreen;
|
|
38
42
|
var columnControl = checkOrDefaultToolBarDisplayOptions(toolbarVisibility, 'showColumnSelector') ? columnSelector : null;
|
|
@@ -53,11 +57,14 @@ var EuiDataGridToolbar = exports.EuiDataGridToolbar = function EuiDataGridToolba
|
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
return (0, _react2.jsx)("div", {
|
|
60
|
+
css: styles.euiDataGrid__controls,
|
|
56
61
|
className: "euiDataGrid__controls",
|
|
57
62
|
"data-test-subj": "dataGridControls"
|
|
58
63
|
}, hasRoomForGridControls && (0, _react2.jsx)("div", {
|
|
64
|
+
css: styles.euiDataGrid__leftControls,
|
|
59
65
|
className: "euiDataGrid__leftControls"
|
|
60
66
|
}, renderAdditionalControls(toolbarVisibility, 'left.prepend'), columnControl, columnSortingControl, renderAdditionalControls(toolbarVisibility, 'left.append')), (0, _react2.jsx)("div", {
|
|
67
|
+
css: styles.euiDataGrid__rightControls,
|
|
61
68
|
className: "euiDataGrid__rightControls"
|
|
62
69
|
}, renderAdditionalControls(toolbarVisibility, 'right'), keyboardShortcutsControl, displayControl, fullScreenControl));
|
|
63
70
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridToolbarStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
/*
|
|
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
|
+
|
|
17
|
+
var euiDataGridToolbarStyles = exports.euiDataGridToolbarStyles = function euiDataGridToolbarStyles(_ref) {
|
|
18
|
+
var euiTheme = _ref.euiTheme;
|
|
19
|
+
return {
|
|
20
|
+
euiDataGrid__controls: /*#__PURE__*/(0, _react.css)("z-index:2;position:relative;display:flex;justify-content:space-between;align-items:center;gap:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGrid__controls;"),
|
|
21
|
+
euiDataGrid__rightControls: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:flex-end;flex-wrap:wrap;column-gap:", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), "&:only-child{", (0, _global_styling.logicalCSS)('margin-left', 'auto'), ";};label:euiDataGrid__rightControls;"),
|
|
22
|
+
euiDataGrid__leftControls: /*#__PURE__*/(0, _react.css)("display:flex;flex-wrap:wrap;gap:", euiTheme.size.xxs, ";;label:euiDataGrid__leftControls;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -23,28 +23,12 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
23
23
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
24
|
* Side Public License, v 1.
|
|
25
25
|
*/
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
-
};
|
|
34
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
35
|
-
name: "8fsqop-EuiDataGridToolbarControl",
|
|
36
|
-
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:EuiDataGridToolbarControl;"
|
|
37
|
-
} : {
|
|
38
|
-
name: "8fsqop-EuiDataGridToolbarControl",
|
|
39
|
-
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:EuiDataGridToolbarControl;",
|
|
40
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
41
|
-
};
|
|
42
|
-
var EuiDataGridToolbarControl = exports.EuiDataGridToolbarControl = function EuiDataGridToolbarControl(_ref3) {
|
|
43
|
-
var children = _ref3.children,
|
|
44
|
-
className = _ref3.className,
|
|
45
|
-
badgeContent = _ref3.badgeContent,
|
|
46
|
-
textProps = _ref3.textProps,
|
|
47
|
-
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
26
|
+
var EuiDataGridToolbarControl = exports.EuiDataGridToolbarControl = function EuiDataGridToolbarControl(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
badgeContent = _ref.badgeContent,
|
|
30
|
+
textProps = _ref.textProps,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
32
|
var classes = (0, _classnames.default)('euiDataGridToolbarControl', className);
|
|
49
33
|
var badgeAriaLabel = (0, _i18n.useEuiI18n)('euiDataGridToolbarControl.badgeAriaLabel', 'Active: {count}', {
|
|
50
34
|
count: typeof badgeContent === 'string' ? betterScreenReaderSlashes(badgeContent) : badgeContent
|
|
@@ -53,15 +37,13 @@ var EuiDataGridToolbarControl = exports.EuiDataGridToolbarControl = function Eui
|
|
|
53
37
|
className: classes,
|
|
54
38
|
size: "xs",
|
|
55
39
|
color: "text",
|
|
56
|
-
textProps: false
|
|
57
|
-
|
|
58
|
-
,
|
|
59
|
-
css: _ref2
|
|
40
|
+
textProps: false,
|
|
41
|
+
css: underlineStyles
|
|
60
42
|
}, rest), (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
61
43
|
className: (0, _classnames.default)('euiDataGridToolbarControl__text', 'eui-textTruncate', textProps && textProps.className)
|
|
62
44
|
}), children), Boolean(badgeContent) && (0, _react2.jsx)(_badge.EuiNotificationBadge, {
|
|
63
45
|
className: "euiDataGridToolbarControl__badge",
|
|
64
|
-
css:
|
|
46
|
+
css: badgeStyles,
|
|
65
47
|
color: "subdued",
|
|
66
48
|
"aria-label": "- ".concat(badgeAriaLabel) // Punctuation helps add pauses for screen readers
|
|
67
49
|
,
|
|
@@ -155,4 +137,22 @@ EuiDataGridToolbarControl.propTypes = {
|
|
|
155
137
|
};
|
|
156
138
|
var betterScreenReaderSlashes = function betterScreenReaderSlashes(badgeContent) {
|
|
157
139
|
return badgeContent.replaceAll('/', ' out of ');
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// Underline actual text, but not the badge
|
|
143
|
+
var underlineStyles = process.env.NODE_ENV === "production" ? {
|
|
144
|
+
name: "128tp1b-underlineStyles",
|
|
145
|
+
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:underlineStyles;"
|
|
146
|
+
} : {
|
|
147
|
+
name: "128tp1b-underlineStyles",
|
|
148
|
+
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:underlineStyles;",
|
|
149
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
150
|
+
};
|
|
151
|
+
var badgeStyles = process.env.NODE_ENV === "production" ? {
|
|
152
|
+
name: "1968nw3-badgeStyles",
|
|
153
|
+
styles: "cursor:inherit;label:badgeStyles;"
|
|
154
|
+
} : {
|
|
155
|
+
name: "1968nw3-badgeStyles",
|
|
156
|
+
styles: "cursor:inherit;label:badgeStyles;",
|
|
157
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
158
158
|
};
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useDataGridDisplaySelector = exports.startingStyles = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
8
9
|
var _services = require("../../../services");
|
|
9
10
|
var _i18n = require("../../i18n");
|
|
10
11
|
var _popover = require("../../popover");
|
|
11
12
|
var _button = require("../../button");
|
|
12
13
|
var _form = require("../../form");
|
|
14
|
+
var _form2 = require("../../form/form.styles");
|
|
13
15
|
var _flex = require("../../flex");
|
|
14
16
|
var _tool_tip = require("../../tool_tip");
|
|
15
17
|
var _data_grid_toolbar = require("./data_grid_toolbar");
|
|
@@ -208,7 +210,13 @@ var useDataGridDisplaySelector = exports.useDataGridDisplaySelector = function u
|
|
|
208
210
|
}, []);
|
|
209
211
|
var buttonLabel = (0, _i18n.useEuiI18n)('euiDisplaySelector.buttonText', 'Display options');
|
|
210
212
|
var resetButtonLabel = (0, _i18n.useEuiI18n)('euiDisplaySelector.resetButtonText', 'Reset to default');
|
|
213
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
211
214
|
var displaySelector = (0, _react.useMemo)(function () {
|
|
215
|
+
var paddingSize = 's';
|
|
216
|
+
var formMaxWidth = (0, _form2.euiFormMaxWidth)(euiTheme);
|
|
217
|
+
var popoverWidth = (0, _global_styling.mathWithUnits)([formMaxWidth, euiTheme.euiTheme.size[paddingSize]], function (x, y) {
|
|
218
|
+
return x + y * 2;
|
|
219
|
+
});
|
|
212
220
|
return showDensityControls || showRowHeightControls || additionalDisplaySettings ? (0, _react2.jsx)(_popover.EuiPopover, {
|
|
213
221
|
"data-test-subj": "dataGridDisplaySelectorPopover",
|
|
214
222
|
isOpen: isOpen,
|
|
@@ -216,7 +224,10 @@ var useDataGridDisplaySelector = exports.useDataGridDisplaySelector = function u
|
|
|
216
224
|
return setIsOpen(false);
|
|
217
225
|
},
|
|
218
226
|
anchorPosition: "downRight",
|
|
219
|
-
panelPaddingSize:
|
|
227
|
+
panelPaddingSize: paddingSize,
|
|
228
|
+
panelProps: {
|
|
229
|
+
css: (0, _global_styling.logicalStyle)('width', popoverWidth)
|
|
230
|
+
},
|
|
220
231
|
panelClassName: "euiDataGrid__displayPopoverPanel",
|
|
221
232
|
button: (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
222
233
|
content: buttonLabel,
|
|
@@ -317,6 +328,6 @@ var useDataGridDisplaySelector = exports.useDataGridDisplaySelector = function u
|
|
|
317
328
|
onClick: resetToInitialState,
|
|
318
329
|
"data-test-subj": "resetDisplaySelector"
|
|
319
330
|
}, resetButtonLabel)))))) : null;
|
|
320
|
-
}, [additionalDisplaySettings, buttonLabel, isOpen, resetButtonLabel, showDensityControls, showResetButton, showRowHeightControls, gridDensity, rowHeightSelection, lineCountInput, setGridStyles, setRowHeight, setLineCountHeight, resetToInitialState]);
|
|
331
|
+
}, [euiTheme, additionalDisplaySettings, buttonLabel, isOpen, resetButtonLabel, showDensityControls, showResetButton, showRowHeightControls, gridDensity, rowHeightSelection, lineCountInput, setGridStyles, setRowHeight, setLineCountHeight, resetToInitialState]);
|
|
321
332
|
return [displaySelector, gridStyles, rowHeightsOptions];
|
|
322
333
|
};
|
|
@@ -10,6 +10,7 @@ var _services = require("../../../services");
|
|
|
10
10
|
var _tool_tip = require("../../tool_tip");
|
|
11
11
|
var _button = require("../../button");
|
|
12
12
|
var _i18n = require("../../i18n");
|
|
13
|
+
var _fullscreen_selector = require("./fullscreen_selector.styles");
|
|
13
14
|
var _react2 = require("@emotion/react");
|
|
14
15
|
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); }
|
|
15
16
|
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; }
|
|
@@ -61,19 +62,21 @@ var useDataGridFullScreenSelector = exports.useDataGridFullScreenSelector = func
|
|
|
61
62
|
break;
|
|
62
63
|
}
|
|
63
64
|
}, [isFullScreen]);
|
|
65
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_fullscreen_selector.euiDataGridFullScreenStyles);
|
|
64
66
|
(0, _react.useEffect)(function () {
|
|
65
67
|
// When the data grid is fullscreen, we add a class to the body to remove the extra scrollbar and stay above any fixed headers
|
|
66
68
|
if (isFullScreen) {
|
|
67
|
-
document.body.classList.add(GRID_IS_FULLSCREEN_CLASSNAME);
|
|
69
|
+
document.body.classList.add(GRID_IS_FULLSCREEN_CLASSNAME, styles.euiDataGrid__restrictBody);
|
|
68
70
|
return function () {
|
|
69
|
-
document.body.classList.remove(GRID_IS_FULLSCREEN_CLASSNAME);
|
|
71
|
+
document.body.classList.remove(GRID_IS_FULLSCREEN_CLASSNAME, styles.euiDataGrid__restrictBody);
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
}, [isFullScreen]);
|
|
74
|
+
}, [isFullScreen, styles.euiDataGrid__restrictBody]);
|
|
73
75
|
return {
|
|
74
76
|
isFullScreen: isFullScreen,
|
|
75
77
|
setIsFullScreen: setIsFullScreen,
|
|
76
78
|
fullScreenSelector: fullScreenSelector,
|
|
77
|
-
handleGridKeyDown: handleGridKeyDown
|
|
79
|
+
handleGridKeyDown: handleGridKeyDown,
|
|
80
|
+
fullScreenStyles: styles['euiDataGrid--fullScreen']
|
|
78
81
|
};
|
|
79
82
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridFullScreenStyles = void 0;
|
|
7
|
+
var _css = require("@emotion/css");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
/*
|
|
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
|
+
|
|
17
|
+
var euiDataGridFullScreenStyles = exports.euiDataGridFullScreenStyles = function euiDataGridFullScreenStyles(euiThemeContext) {
|
|
18
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
19
|
+
var fullScreenZIndex = Number(euiTheme.levels.header) - 1;
|
|
20
|
+
return {
|
|
21
|
+
'euiDataGrid--fullScreen': /*#__PURE__*/(0, _css.css)("z-index:", fullScreenZIndex, ";position:fixed;inset:0;background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGrid--fullScreen;"),
|
|
22
|
+
// This is a vanilla className applied to the <body> when fullscreen is enabled.
|
|
23
|
+
// It removes extra scrollbars + tweaks components to account for fixed headers
|
|
24
|
+
euiDataGrid__restrictBody: /*#__PURE__*/(0, _css.css)((0, _global_styling.logicalCSS)('height', '100vh'), " overflow:hidden;.euiHeader[data-fixed-header]{z-index:", fullScreenZIndex - 1, "!important;}.euiOverlayMask[data-relative-to-header='below']{", (0, _global_styling.logicalCSS)('top', '0'), ";}.euiFlyout{", (0, _global_styling.logicalCSS)('top', '0'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:euiDataGrid__restrictBody;")
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -13,6 +13,7 @@ var _popover = require("../../popover");
|
|
|
13
13
|
var _description_list = require("../../description_list");
|
|
14
14
|
var _text = require("../../text");
|
|
15
15
|
var _i18n = require("../../i18n");
|
|
16
|
+
var _keyboard_shortcuts = require("./keyboard_shortcuts.styles");
|
|
16
17
|
var _react2 = require("@emotion/react");
|
|
17
18
|
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); }
|
|
18
19
|
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; }
|
|
@@ -35,6 +36,7 @@ var useDataGridKeyboardShortcuts = exports.useDataGridKeyboardShortcuts = functi
|
|
|
35
36
|
setIsOpen = _useState2[1];
|
|
36
37
|
var title = (0, _i18n.useEuiI18n)('euiKeyboardShortcuts.title', 'Keyboard shortcuts');
|
|
37
38
|
var titleId = (0, _services.useGeneratedHtmlId)();
|
|
39
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_keyboard_shortcuts.euiDataGridKeyboardShortcutsStyles);
|
|
38
40
|
var keyboardShortcuts = (0, _react.useMemo)(function () {
|
|
39
41
|
return (0, _react2.jsx)(_popover.EuiPopover, {
|
|
40
42
|
"data-test-subj": "dataGridKeyboardShortcutsPopover",
|
|
@@ -43,6 +45,7 @@ var useDataGridKeyboardShortcuts = exports.useDataGridKeyboardShortcuts = functi
|
|
|
43
45
|
return setIsOpen(false);
|
|
44
46
|
},
|
|
45
47
|
anchorPosition: "downRight",
|
|
48
|
+
panelPaddingSize: "none",
|
|
46
49
|
button: (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
47
50
|
content: title,
|
|
48
51
|
delay: "long"
|
|
@@ -61,12 +64,13 @@ var useDataGridKeyboardShortcuts = exports.useDataGridKeyboardShortcuts = functi
|
|
|
61
64
|
}, (0, _react2.jsx)("h2", {
|
|
62
65
|
id: titleId
|
|
63
66
|
}, title)), (0, _react2.jsx)(_text.EuiText, {
|
|
67
|
+
css: styles.euiDataGrid__keyboardShortcuts,
|
|
64
68
|
className: "euiDataGrid__keyboardShortcuts",
|
|
65
69
|
size: "xs"
|
|
66
70
|
}, (0, _react2.jsx)(_description_list.EuiDescriptionList, {
|
|
67
71
|
"aria-labelledby": titleId,
|
|
68
72
|
type: "column",
|
|
69
|
-
columnWidths: [
|
|
73
|
+
columnWidths: ['auto', 'auto'],
|
|
70
74
|
align: "center",
|
|
71
75
|
compressed: true,
|
|
72
76
|
listItems: [{
|
|
@@ -185,7 +189,7 @@ var useDataGridKeyboardShortcuts = exports.useDataGridKeyboardShortcuts = functi
|
|
|
185
189
|
})
|
|
186
190
|
}]
|
|
187
191
|
})));
|
|
188
|
-
}, [isOpen, title, titleId]);
|
|
192
|
+
}, [isOpen, title, titleId, styles]);
|
|
189
193
|
return {
|
|
190
194
|
keyboardShortcuts: keyboardShortcuts
|
|
191
195
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiDataGridKeyboardShortcutsStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
/*
|
|
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
|
+
|
|
17
|
+
var euiDataGridKeyboardShortcutsStyles = exports.euiDataGridKeyboardShortcutsStyles = function euiDataGridKeyboardShortcutsStyles(euiThemeContext) {
|
|
18
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
19
|
+
return {
|
|
20
|
+
euiDataGrid__keyboardShortcuts: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '80vh'), " ", (0, _global_styling.logicalCSS)('max-width', (0, _global_styling.mathWithUnits)(euiTheme.size.xxl, function (x) {
|
|
21
|
+
return x * 10;
|
|
22
|
+
})), " padding:", euiTheme.size.m, ";", (0, _global_styling.euiYScroll)(euiThemeContext), " .euiDescriptionList{row-gap:0;};label:euiDataGrid__keyboardShortcuts;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -224,6 +224,7 @@ describe('EuiDataGrid', function () {
|
|
|
224
224
|
});
|
|
225
225
|
it('has zero violations on sort and when the columns sorting menu is open', function () {
|
|
226
226
|
cy.get('.euiDataGridHeaderCell').last().realHover();
|
|
227
|
+
cy.wait(200); // Wait for transition
|
|
227
228
|
cy.get('button.euiDataGridHeaderCell__button').last().realClick();
|
|
228
229
|
cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
|
|
229
230
|
cy.get('div[data-test-subj="dataGridColumnSortingPopover"] button').realClick();
|
|
@@ -15,15 +15,16 @@ var _mutation_observer = require("../observer/mutation_observer");
|
|
|
15
15
|
var _resize_observer = require("../observer/resize_observer");
|
|
16
16
|
var _body = require("./body");
|
|
17
17
|
var _controls = require("./controls");
|
|
18
|
+
var _pagination2 = require("./pagination");
|
|
18
19
|
var _sorting = require("./utils/sorting");
|
|
19
20
|
var _focus = require("./utils/focus");
|
|
20
21
|
var _in_memory = require("./utils/in_memory");
|
|
21
22
|
var _cell = require("./body/cell");
|
|
22
23
|
var _row_count = require("./utils/row_count");
|
|
23
|
-
var _data_grid_pagination = require("./utils/data_grid_pagination");
|
|
24
24
|
var _data_grid_schema = require("./utils/data_grid_schema");
|
|
25
25
|
var _ref = require("./utils/ref");
|
|
26
26
|
var _data_grid_types = require("./data_grid_types");
|
|
27
|
+
var _data_grid = require("./data_grid.styles");
|
|
27
28
|
var _react2 = require("@emotion/react");
|
|
28
29
|
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "columnVisibility", "schemaDetectors", "rowCount", "renderCellValue", "cellContext", "renderCellPopover", "renderFooterCellValue", "className", "gridStyle", "toolbarVisibility", "pagination", "sorting", "inMemory", "onColumnResize", "minSizeForControls", "height", "width", "rowHeightsOptions", "virtualizationOptions", "renderCustomGridBody", "renderCustomToolbar"];
|
|
29
30
|
/*
|
|
@@ -124,6 +125,7 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
124
125
|
pageSizeOptions: paginationDefaults.itemsPerPageOptions
|
|
125
126
|
}, _pagination) : _pagination;
|
|
126
127
|
}, [_pagination, paginationDefaults]);
|
|
128
|
+
var showPagination = pagination && (0, _pagination2.shouldRenderPagination)(rowCount, pagination);
|
|
127
129
|
var gridStyleWithDefaults = (0, _react.useMemo)(function () {
|
|
128
130
|
return _objectSpread(_objectSpread({}, _controls.startingStyles), gridStyle);
|
|
129
131
|
}, [gridStyle]);
|
|
@@ -257,7 +259,8 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
257
259
|
isFullScreen = _useDataGridFullScree.isFullScreen,
|
|
258
260
|
setIsFullScreen = _useDataGridFullScree.setIsFullScreen,
|
|
259
261
|
fullScreenSelector = _useDataGridFullScree.fullScreenSelector,
|
|
260
|
-
handleGridKeyDown = _useDataGridFullScree.handleGridKeyDown
|
|
262
|
+
handleGridKeyDown = _useDataGridFullScree.handleGridKeyDown,
|
|
263
|
+
fullScreenStyles = _useDataGridFullScree.fullScreenStyles;
|
|
261
264
|
|
|
262
265
|
/**
|
|
263
266
|
* Expose certain internal APIs as ref to consumer
|
|
@@ -281,9 +284,9 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
281
284
|
'euiDataGrid--stripes': gridStyles.stripes
|
|
282
285
|
}, {
|
|
283
286
|
'euiDataGrid--stickyFooter': gridStyles.footer && gridStyles.stickyFooter
|
|
284
|
-
}, {
|
|
287
|
+
}, _defineProperty({
|
|
285
288
|
'euiDataGrid--fullScreen': isFullScreen
|
|
286
|
-
}, {
|
|
289
|
+
}, fullScreenStyles, isFullScreen), {
|
|
287
290
|
'euiDataGrid--noControls': !toolbarVisibility
|
|
288
291
|
}, className);
|
|
289
292
|
|
|
@@ -328,6 +331,8 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
328
331
|
focusContext: focusContext
|
|
329
332
|
})(event);
|
|
330
333
|
}, [focusContext, visibleColCount, visibleRowCount, rowCount, pagination, renderFooterCellValue]);
|
|
334
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_data_grid.euiDataGridStyles);
|
|
335
|
+
var cssStyles = [styles.euiDataGrid, styles.cellPadding[gridStyles.cellPadding], styles.fontSize[gridStyles.fontSize], styles.borders[gridStyles.border]];
|
|
331
336
|
return (0, _react2.jsx)(_focus.DataGridFocusContext.Provider, {
|
|
332
337
|
value: focusContext
|
|
333
338
|
}, (0, _react2.jsx)(_cell.DataGridCellPopoverContext.Provider, {
|
|
@@ -336,8 +341,10 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
336
341
|
value: sortedContext
|
|
337
342
|
}, (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
|
|
338
343
|
disabled: !isFullScreen,
|
|
339
|
-
className: "euiDataGrid__focusWrap"
|
|
344
|
+
className: "euiDataGrid__focusWrap",
|
|
345
|
+
css: styles.euiDataGrid__focusWrap
|
|
340
346
|
}, (0, _react2.jsx)("div", _extends({
|
|
347
|
+
css: cssStyles,
|
|
341
348
|
className: classes,
|
|
342
349
|
onKeyDown: handleGridKeyDown,
|
|
343
350
|
style: isFullScreen ? undefined : {
|
|
@@ -371,6 +378,7 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
371
378
|
ref: contentRef,
|
|
372
379
|
onKeyDown: onKeyDown,
|
|
373
380
|
"data-test-subj": "euiDataGridBody",
|
|
381
|
+
css: styles.euiDataGrid__content,
|
|
374
382
|
className: "euiDataGrid__content",
|
|
375
383
|
role: "grid",
|
|
376
384
|
"aria-rowcount": rowCount,
|
|
@@ -403,10 +411,10 @@ var EuiDataGrid = exports.EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE
|
|
|
403
411
|
gridItemsRendered: gridItemsRendered,
|
|
404
412
|
wrapperRef: contentRef,
|
|
405
413
|
renderCustomGridBody: renderCustomGridBody
|
|
406
|
-
})),
|
|
414
|
+
})), showPagination && props['aria-labelledby'] && (0, _react2.jsx)("p", {
|
|
407
415
|
id: ariaLabelledById,
|
|
408
416
|
hidden: true
|
|
409
|
-
}, ariaLabelledBy),
|
|
417
|
+
}, ariaLabelledBy), showPagination && (0, _react2.jsx)(_pagination2.EuiDataGridPagination, _extends({}, pagination, {
|
|
410
418
|
rowCount: rowCount,
|
|
411
419
|
controls: gridId,
|
|
412
420
|
"aria-label": props['aria-label']
|