@elastic/eui 93.2.0 → 93.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.d.ts +9 -0
- package/dist/eui_charts_theme.js +56 -14
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +3 -0
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -0
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/es/components/breadcrumbs/breadcrumb.js +10 -324
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/es/components/breadcrumbs/breadcrumbs.js +8 -6
- package/es/components/breadcrumbs/types.js +1 -0
- package/es/components/button/button_display/_button_display.js +2 -3
- package/es/components/button/button_empty/button_empty.js +2 -3
- package/es/components/button/button_group/button_group.js +19 -7
- package/es/components/button/button_group/button_group.styles.js +11 -14
- package/es/components/button/button_group/button_group_button.js +59 -5
- package/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/es/components/button/button_icon/button_icon.js +4 -5
- package/es/components/button/button_icon/button_icon.styles.js +11 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +102 -59
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
- package/es/components/datagrid/body/cell/index.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +14 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +54 -35
- package/es/components/datagrid/body/data_grid_body_virtualized.js +87 -56
- package/es/components/datagrid/body/data_grid_row_manager.js +7 -5
- package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
- package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
- package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
- package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/es/components/datagrid/controls/column_selector.js +126 -123
- package/es/components/datagrid/controls/column_sorting.js +605 -103
- package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/es/components/datagrid/controls/display_selector.js +109 -107
- package/es/components/datagrid/data_grid.a11y.js +13 -12
- package/es/components/datagrid/data_grid.js +47 -22
- package/es/components/datagrid/utils/col_widths.js +12 -8
- package/es/components/datagrid/utils/focus.js +10 -8
- package/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/es/components/datagrid/utils/ref.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +2 -2
- package/es/components/datagrid/utils/sorting.js +29 -27
- package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/es/components/facet/facet_button.styles.js +1 -2
- package/es/components/flex/flex_grid.js +22 -8
- package/es/components/flex/flex_grid.styles.js +13 -6
- package/es/components/flex/flex_group.js +10 -11
- package/es/components/flex/flex_item.js +9 -11
- package/es/components/flex/flex_item.styles.js +107 -122
- package/es/components/flyout/flyout.js +16 -18
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
- package/es/components/icon/icon.js +13 -16
- package/es/components/icon/icon.styles.js +6 -9
- package/es/components/link/external_link_icon.js +11 -8
- package/es/components/link/link.js +2 -3
- package/es/components/link/link.styles.js +4 -10
- package/es/components/modal/confirm_modal.js +2 -1
- package/es/components/modal/modal.js +12 -3
- package/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/es/components/page/page_header/page_header_content.js +4 -2
- package/es/components/progress/progress.styles.js +2 -2
- package/es/components/skeleton/skeleton_circle.js +2 -3
- package/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/es/components/skeleton/skeleton_text.js +16 -12
- package/es/components/skeleton/skeleton_title.js +2 -3
- package/es/components/spacer/spacer.js +2 -3
- package/es/components/text/text.js +2 -3
- package/es/components/text/text_align.js +1 -2
- package/es/components/text/text_align.styles.js +5 -7
- package/es/components/text/text_color.js +2 -3
- package/es/components/title/title.js +2 -3
- package/es/components/title/title.styles.js +0 -7
- package/es/components/toast/global_toast_list.js +70 -73
- package/es/components/toast/toast.js +27 -42
- package/es/components/toast/toast.styles.js +2 -17
- package/es/global_styling/mixins/_typography.js +17 -6
- package/es/services/color/eui_palettes.js +21 -13
- package/es/services/color/index.js +1 -1
- package/es/services/hooks/index.js +1 -0
- package/es/services/hooks/useDeepEqual.js +23 -0
- package/es/services/index.js +1 -1
- package/es/services/theme/index.js +1 -1
- package/es/services/theme/style_memoization.js +47 -14
- package/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- package/eui.d.ts +2862 -2748
- package/i18ntokens.json +267 -267
- package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/lib/components/breadcrumbs/breadcrumb.js +11 -328
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -5
- package/lib/components/breadcrumbs/types.js +5 -0
- package/lib/components/button/button_display/_button_display.js +1 -2
- package/lib/components/button/button_empty/button_empty.js +1 -2
- package/lib/components/button/button_group/button_group.js +18 -6
- package/lib/components/button/button_group/button_group.styles.js +11 -14
- package/lib/components/button/button_group/button_group_button.js +59 -5
- package/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/lib/components/button/button_icon/button_icon.js +3 -4
- package/lib/components/button/button_icon/button_icon.styles.js +10 -2
- package/lib/components/datagrid/body/cell/data_grid_cell.js +100 -58
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
- package/lib/components/datagrid/body/cell/index.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +14 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +53 -34
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +86 -55
- package/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/lib/components/datagrid/controls/column_selector.js +126 -123
- package/lib/components/datagrid/controls/column_sorting.js +615 -110
- package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/lib/components/datagrid/controls/display_selector.js +109 -107
- package/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/lib/components/datagrid/data_grid.js +45 -20
- package/lib/components/datagrid/utils/col_widths.js +12 -8
- package/lib/components/datagrid/utils/focus.js +10 -8
- package/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/lib/components/datagrid/utils/ref.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +1 -1
- package/lib/components/datagrid/utils/sorting.js +31 -29
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/lib/components/facet/facet_button.styles.js +1 -2
- package/lib/components/flex/flex_grid.js +23 -7
- package/lib/components/flex/flex_grid.styles.js +13 -6
- package/lib/components/flex/flex_group.js +10 -10
- package/lib/components/flex/flex_item.js +13 -13
- package/lib/components/flex/flex_item.styles.js +107 -122
- package/lib/components/flyout/flyout.js +16 -18
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
- package/lib/components/icon/icon.js +12 -15
- package/lib/components/icon/icon.styles.js +5 -8
- package/lib/components/link/external_link_icon.js +10 -7
- package/lib/components/link/link.js +1 -2
- package/lib/components/link/link.styles.js +6 -14
- package/lib/components/modal/confirm_modal.js +2 -1
- package/lib/components/modal/modal.js +12 -3
- package/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/lib/components/page/page_header/page_header_content.js +4 -2
- package/lib/components/progress/progress.styles.js +1 -1
- package/lib/components/skeleton/skeleton_circle.js +1 -2
- package/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/lib/components/skeleton/skeleton_text.js +18 -11
- package/lib/components/skeleton/skeleton_title.js +1 -2
- package/lib/components/spacer/spacer.js +1 -2
- package/lib/components/text/text.js +1 -2
- package/lib/components/text/text_align.js +1 -2
- package/lib/components/text/text_align.styles.js +5 -7
- package/lib/components/text/text_color.js +1 -2
- package/lib/components/title/title.js +1 -2
- package/lib/components/title/title.styles.js +2 -10
- package/lib/components/toast/global_toast_list.js +68 -71
- package/lib/components/toast/toast.js +25 -40
- package/lib/components/toast/toast.styles.js +11 -25
- package/lib/global_styling/mixins/_typography.js +27 -19
- package/lib/services/color/eui_palettes.js +24 -14
- package/lib/services/color/index.js +14 -0
- package/lib/services/hooks/index.js +11 -0
- package/lib/services/hooks/useDeepEqual.js +30 -0
- package/lib/services/index.js +15 -1
- package/lib/services/theme/index.js +6 -0
- package/lib/services/theme/style_memoization.js +49 -16
- package/lib/themes/amsterdam/global_styling/mixins/button.js +49 -25
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -109
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
- package/optimize/es/components/breadcrumbs/types.js +1 -0
- package/optimize/es/components/button/button_display/_button_display.js +2 -3
- package/optimize/es/components/button/button_empty/button_empty.js +2 -3
- package/optimize/es/components/button/button_group/button_group.js +5 -7
- package/optimize/es/components/button/button_group/button_group.styles.js +11 -14
- package/optimize/es/components/button/button_group/button_group_button.js +36 -4
- package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
- package/optimize/es/components/button/button_icon/button_icon.js +4 -5
- package/optimize/es/components/button/button_icon/button_icon.styles.js +8 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +83 -56
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
- package/optimize/es/components/datagrid/body/cell/index.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +40 -35
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +71 -49
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +7 -5
- package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
- package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
- package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/es/components/datagrid/data_grid.js +47 -22
- package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/es/components/datagrid/utils/focus.js +10 -8
- package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
- package/optimize/es/components/datagrid/utils/ref.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
- package/optimize/es/components/datagrid/utils/sorting.js +29 -27
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/es/components/facet/facet_button.styles.js +1 -2
- package/optimize/es/components/flex/flex_grid.js +19 -8
- package/optimize/es/components/flex/flex_grid.styles.js +13 -6
- package/optimize/es/components/flex/flex_group.js +9 -10
- package/optimize/es/components/flex/flex_item.js +9 -11
- package/optimize/es/components/flex/flex_item.styles.js +107 -122
- package/optimize/es/components/flyout/flyout.js +16 -18
- package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/es/components/icon/icon.js +13 -16
- package/optimize/es/components/icon/icon.styles.js +6 -9
- package/optimize/es/components/link/external_link_icon.js +11 -8
- package/optimize/es/components/link/link.js +2 -3
- package/optimize/es/components/link/link.styles.js +4 -10
- package/optimize/es/components/modal/confirm_modal.js +2 -1
- package/optimize/es/components/modal/modal.js +6 -2
- package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/es/components/progress/progress.styles.js +2 -2
- package/optimize/es/components/skeleton/skeleton_circle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_text.js +16 -12
- package/optimize/es/components/skeleton/skeleton_title.js +2 -3
- package/optimize/es/components/spacer/spacer.js +2 -3
- package/optimize/es/components/text/text.js +2 -3
- package/optimize/es/components/text/text_align.js +1 -2
- package/optimize/es/components/text/text_align.styles.js +5 -7
- package/optimize/es/components/text/text_color.js +2 -3
- package/optimize/es/components/title/title.js +2 -3
- package/optimize/es/components/title/title.styles.js +0 -7
- package/optimize/es/components/toast/global_toast_list.js +70 -73
- package/optimize/es/components/toast/toast.js +27 -42
- package/optimize/es/components/toast/toast.styles.js +2 -17
- package/optimize/es/global_styling/mixins/_typography.js +14 -6
- package/optimize/es/services/color/eui_palettes.js +21 -13
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/hooks/index.js +1 -0
- package/optimize/es/services/hooks/useDeepEqual.js +23 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +47 -14
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -112
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
- package/optimize/lib/components/breadcrumbs/types.js +5 -0
- package/optimize/lib/components/button/button_display/_button_display.js +1 -2
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -2
- package/optimize/lib/components/button/button_group/button_group.js +4 -6
- package/optimize/lib/components/button/button_group/button_group.styles.js +11 -14
- package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
- package/optimize/lib/components/button/button_icon/button_icon.js +3 -4
- package/optimize/lib/components/button/button_icon/button_icon.styles.js +8 -2
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +81 -55
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
- package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +39 -34
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +72 -50
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
- package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
- package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
- package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
- package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
- package/optimize/lib/components/datagrid/data_grid.js +45 -20
- package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
- package/optimize/lib/components/datagrid/utils/focus.js +10 -8
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
- package/optimize/lib/components/datagrid/utils/ref.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
- package/optimize/lib/components/facet/facet_button.styles.js +1 -2
- package/optimize/lib/components/flex/flex_grid.js +21 -7
- package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
- package/optimize/lib/components/flex/flex_group.js +9 -9
- package/optimize/lib/components/flex/flex_item.js +13 -13
- package/optimize/lib/components/flex/flex_item.styles.js +107 -122
- package/optimize/lib/components/flyout/flyout.js +16 -18
- package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
- package/optimize/lib/components/icon/icon.js +12 -15
- package/optimize/lib/components/icon/icon.styles.js +5 -8
- package/optimize/lib/components/link/external_link_icon.js +10 -7
- package/optimize/lib/components/link/link.js +1 -2
- package/optimize/lib/components/link/link.styles.js +6 -14
- package/optimize/lib/components/modal/confirm_modal.js +2 -1
- package/optimize/lib/components/modal/modal.js +6 -2
- package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
- package/optimize/lib/components/progress/progress.styles.js +1 -1
- package/optimize/lib/components/skeleton/skeleton_circle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_text.js +18 -11
- package/optimize/lib/components/skeleton/skeleton_title.js +1 -2
- package/optimize/lib/components/spacer/spacer.js +1 -2
- package/optimize/lib/components/text/text.js +1 -2
- package/optimize/lib/components/text/text_align.js +1 -2
- package/optimize/lib/components/text/text_align.styles.js +5 -7
- package/optimize/lib/components/text/text_color.js +1 -2
- package/optimize/lib/components/title/title.js +1 -2
- package/optimize/lib/components/title/title.styles.js +2 -10
- package/optimize/lib/components/toast/global_toast_list.js +68 -71
- package/optimize/lib/components/toast/toast.js +25 -40
- package/optimize/lib/components/toast/toast.styles.js +11 -25
- package/optimize/lib/global_styling/mixins/_typography.js +25 -19
- package/optimize/lib/services/color/eui_palettes.js +24 -14
- package/optimize/lib/services/color/index.js +14 -0
- package/optimize/lib/services/hooks/index.js +11 -0
- package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
- package/optimize/lib/services/index.js +15 -1
- package/optimize/lib/services/theme/index.js +6 -0
- package/optimize/lib/services/theme/style_memoization.js +49 -16
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +49 -26
- package/package.json +3 -3
- package/src/components/datagrid/_data_grid_data_row.scss +4 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
- package/test-env/components/breadcrumbs/breadcrumb.js +11 -323
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -5
- package/test-env/components/breadcrumbs/types.js +5 -0
- package/test-env/components/button/button_display/_button_display.js +1 -2
- package/test-env/components/button/button_empty/button_empty.js +1 -2
- package/test-env/components/button/button_group/button_group.js +18 -6
- package/test-env/components/button/button_group/button_group.styles.js +11 -14
- package/test-env/components/button/button_group/button_group_button.js +56 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
- package/test-env/components/button/button_icon/button_icon.js +3 -4
- package/test-env/components/button/button_icon/button_icon.styles.js +8 -2
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +100 -58
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
- package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
- package/test-env/components/datagrid/body/cell/index.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +14 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +53 -34
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +86 -55
- package/test-env/components/datagrid/body/data_grid_row_manager.js +6 -4
- package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
- package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
- package/test-env/components/datagrid/controls/column_selector.js +126 -123
- package/test-env/components/datagrid/controls/column_sorting.js +607 -106
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
- package/test-env/components/datagrid/controls/display_selector.js +109 -107
- package/test-env/components/datagrid/data_grid.a11y.js +13 -12
- package/test-env/components/datagrid/data_grid.js +45 -20
- package/test-env/components/datagrid/utils/col_widths.js +9 -5
- package/test-env/components/datagrid/utils/focus.js +10 -8
- package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
- package/test-env/components/datagrid/utils/ref.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +1 -1
- package/test-env/components/datagrid/utils/sorting.js +31 -29
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
- package/test-env/components/facet/facet_button.styles.js +1 -2
- package/test-env/components/flex/flex_grid.js +21 -7
- package/test-env/components/flex/flex_grid.styles.js +13 -6
- package/test-env/components/flex/flex_group.js +10 -10
- package/test-env/components/flex/flex_item.js +13 -13
- package/test-env/components/flex/flex_item.styles.js +107 -122
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
- package/test-env/components/icon/icon.styles.js +5 -8
- package/test-env/components/link/external_link_icon.js +10 -7
- package/test-env/components/link/link.js +1 -2
- package/test-env/components/link/link.styles.js +6 -14
- package/test-env/components/modal/confirm_modal.js +2 -1
- package/test-env/components/modal/modal.js +12 -3
- package/test-env/components/page/page_header/page_header_content.js +4 -2
- package/test-env/components/progress/progress.styles.js +1 -1
- package/test-env/components/skeleton/skeleton_circle.js +1 -2
- package/test-env/components/skeleton/skeleton_rectangle.js +1 -2
- package/test-env/components/skeleton/skeleton_text.js +18 -11
- package/test-env/components/skeleton/skeleton_title.js +1 -2
- package/test-env/components/spacer/spacer.js +1 -2
- package/test-env/components/text/text.js +1 -2
- package/test-env/components/text/text_align.js +1 -2
- package/test-env/components/text/text_align.styles.js +5 -7
- package/test-env/components/text/text_color.js +1 -2
- package/test-env/components/title/title.js +1 -2
- package/test-env/components/title/title.styles.js +2 -10
- package/test-env/components/toast/global_toast_list.js +68 -71
- package/test-env/components/toast/toast.js +25 -40
- package/test-env/components/toast/toast.styles.js +11 -25
- package/test-env/global_styling/mixins/_typography.js +25 -19
- package/test-env/services/color/eui_palettes.js +24 -14
- package/test-env/services/color/index.js +14 -0
- package/test-env/services/hooks/index.js +11 -0
- package/test-env/services/hooks/useDeepEqual.js +30 -0
- package/test-env/services/index.js +15 -1
- package/test-env/services/theme/index.js +6 -0
- package/test-env/services/theme/style_memoization.js +49 -16
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +49 -26
- package/src/themes/charts/theme.scss +0 -5
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import React, { createContext, useState, useCallback } from 'react';
|
|
22
|
+
import React, { createContext, useState, useCallback, useMemo } from 'react';
|
|
23
23
|
import classNames from 'classnames';
|
|
24
24
|
import { keys } from '../../../../services';
|
|
25
25
|
import { EuiWrappingPopover } from '../../../popover';
|
|
@@ -37,7 +37,6 @@ export var DataGridCellPopoverContext = /*#__PURE__*/createContext({
|
|
|
37
37
|
setCellPopoverProps: function setCellPopoverProps() {}
|
|
38
38
|
});
|
|
39
39
|
export var useCellPopover = function useCellPopover() {
|
|
40
|
-
var _cellPopoverProps$pan;
|
|
41
40
|
// Current open state & cell location are handled here
|
|
42
41
|
var _useState = useState(false),
|
|
43
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -88,16 +87,6 @@ export var useCellPopover = function useCellPopover() {
|
|
|
88
87
|
});
|
|
89
88
|
setPopoverIsOpen(true);
|
|
90
89
|
}, [popoverIsOpen, cellLocation]);
|
|
91
|
-
var cellPopoverContext = {
|
|
92
|
-
popoverIsOpen: popoverIsOpen,
|
|
93
|
-
closeCellPopover: closeCellPopover,
|
|
94
|
-
openCellPopover: openCellPopover,
|
|
95
|
-
cellLocation: cellLocation,
|
|
96
|
-
setPopoverAnchor: setPopoverAnchor,
|
|
97
|
-
setPopoverAnchorPosition: setPopoverAnchorPosition,
|
|
98
|
-
setPopoverContent: setPopoverContent,
|
|
99
|
-
setCellPopoverProps: setCellPopoverProps
|
|
100
|
-
};
|
|
101
90
|
|
|
102
91
|
// Override the default EuiPopover `onClickOutside` behavior, since the toggling
|
|
103
92
|
// popover button isn't actually the DOM node we pass to `button`. Otherwise,
|
|
@@ -109,52 +98,71 @@ export var useCellPopover = function useCellPopover() {
|
|
|
109
98
|
closeCellPopover();
|
|
110
99
|
}
|
|
111
100
|
}, [popoverAnchor, closeCellPopover]);
|
|
101
|
+
var onKeyDown = useCallback(function (event) {
|
|
102
|
+
if (event.key === keys.F2 || event.key === keys.ESCAPE) {
|
|
103
|
+
var _popoverAnchor$parent3, _popoverAnchor$parent4;
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
event.stopPropagation();
|
|
106
|
+
closeCellPopover();
|
|
107
|
+
var cell = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : (_popoverAnchor$parent3 = popoverAnchor.parentElement) === null || _popoverAnchor$parent3 === void 0 ? void 0 : (_popoverAnchor$parent4 = _popoverAnchor$parent3.parentElement) === null || _popoverAnchor$parent4 === void 0 ? void 0 : _popoverAnchor$parent4.parentElement;
|
|
112
108
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
event.preventDefault();
|
|
138
|
-
event.stopPropagation();
|
|
139
|
-
closeCellPopover();
|
|
140
|
-
var cell = (_popoverAnchor$parent3 = popoverAnchor.parentElement) === null || _popoverAnchor$parent3 === void 0 ? void 0 : (_popoverAnchor$parent4 = _popoverAnchor$parent3.parentElement) === null || _popoverAnchor$parent4 === void 0 ? void 0 : _popoverAnchor$parent4.parentElement;
|
|
109
|
+
// Prevent cell animation flash while focus is being shifted between popover and cell
|
|
110
|
+
cell === null || cell === void 0 ? void 0 : cell.setAttribute('data-keyboard-closing', 'true');
|
|
111
|
+
// Ensure focus is returned to the parent cell, and remove animation stopgap
|
|
112
|
+
requestAnimationFrame(function () {
|
|
113
|
+
popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.parentElement.focus();
|
|
114
|
+
cell === null || cell === void 0 ? void 0 : cell.removeAttribute('data-keyboard-closing');
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, [popoverAnchor, closeCellPopover]);
|
|
118
|
+
var cellPopoverContext = useMemo(function () {
|
|
119
|
+
return {
|
|
120
|
+
popoverIsOpen: popoverIsOpen,
|
|
121
|
+
closeCellPopover: closeCellPopover,
|
|
122
|
+
openCellPopover: openCellPopover,
|
|
123
|
+
cellLocation: cellLocation,
|
|
124
|
+
setPopoverAnchorPosition: setPopoverAnchorPosition,
|
|
125
|
+
setPopoverAnchor: setPopoverAnchor,
|
|
126
|
+
setPopoverContent: setPopoverContent,
|
|
127
|
+
setCellPopoverProps: setCellPopoverProps
|
|
128
|
+
};
|
|
129
|
+
}, [popoverIsOpen, closeCellPopover, openCellPopover, cellLocation]);
|
|
130
|
+
var cellPopover = useMemo(function () {
|
|
131
|
+
var _cellPopoverProps$pan;
|
|
132
|
+
if (!popoverIsOpen || !popoverAnchor) return null;
|
|
141
133
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
134
|
+
// Note that this popover is rendered once at the top grid level, rather than one popover per cell
|
|
135
|
+
return ___EmotionJSX(EuiWrappingPopover, _extends({
|
|
136
|
+
isOpen: popoverIsOpen,
|
|
137
|
+
display: "block",
|
|
138
|
+
hasArrow: false,
|
|
139
|
+
panelPaddingSize: "s",
|
|
140
|
+
anchorPosition: popoverAnchorPosition,
|
|
141
|
+
repositionToCrossAxis: false
|
|
142
|
+
}, cellPopoverProps, {
|
|
143
|
+
focusTrapProps: {
|
|
144
|
+
onClickOutside: onClickOutside,
|
|
145
|
+
clickOutsideDisables: false
|
|
146
|
+
},
|
|
147
|
+
panelProps: _objectSpread({
|
|
148
|
+
'data-test-subj': 'euiDataGridExpansionPopover'
|
|
149
|
+
}, cellPopoverProps.panelProps || {}),
|
|
150
|
+
panelClassName: classNames('euiDataGridRowCell__popover', cellPopoverProps.panelClassName, (_cellPopoverProps$pan = cellPopoverProps.panelProps) === null || _cellPopoverProps$pan === void 0 ? void 0 : _cellPopoverProps$pan.className),
|
|
151
|
+
panelStyle: {
|
|
152
|
+
maxInlineSize: "min(75vw, max(".concat(popoverAnchor.parentElement.offsetWidth, "px, 400px))"),
|
|
153
|
+
maxBlockSize: '50vh'
|
|
154
|
+
},
|
|
155
|
+
onKeyDown: onKeyDown,
|
|
156
|
+
button: popoverAnchor,
|
|
157
|
+
closePopover: closeCellPopover
|
|
158
|
+
}), popoverContent);
|
|
159
|
+
}, [popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
|
|
160
|
+
return useMemo(function () {
|
|
161
|
+
return {
|
|
162
|
+
cellPopoverContext: cellPopoverContext,
|
|
163
|
+
cellPopover: cellPopover
|
|
164
|
+
};
|
|
165
|
+
}, [cellPopoverContext, cellPopover]);
|
|
158
166
|
};
|
|
159
167
|
|
|
160
168
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
2
|
+
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "cellContext", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
@@ -14,9 +14,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React, { useContext, useMemo } from 'react';
|
|
17
|
+
import React, { useContext, useMemo, memo } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import {
|
|
19
|
+
import { DataGridSortedContext } from '../../utils/sorting';
|
|
20
20
|
import { DataGridCellPopoverContext } from './data_grid_cell_popover';
|
|
21
21
|
import { EuiDataGridCell } from './data_grid_cell';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -25,7 +25,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
25
25
|
* It grabs context, determines the type of cell being rendered
|
|
26
26
|
* (e.g. control vs data cell), & sets shared props between all cells
|
|
27
27
|
*/
|
|
28
|
-
export var
|
|
28
|
+
export var CellWrapper = /*#__PURE__*/memo(function (_ref) {
|
|
29
29
|
var colIndex = _ref.colIndex,
|
|
30
30
|
visibleRowIndex = _ref.visibleRowIndex,
|
|
31
31
|
style = _ref.style,
|
|
@@ -39,6 +39,7 @@ export var Cell = function Cell(_ref) {
|
|
|
39
39
|
columnWidths = _ref.columnWidths,
|
|
40
40
|
defaultColumnWidth = _ref.defaultColumnWidth,
|
|
41
41
|
renderCellValue = _ref.renderCellValue,
|
|
42
|
+
cellContext = _ref.cellContext,
|
|
42
43
|
renderCellPopover = _ref.renderCellPopover,
|
|
43
44
|
interactiveCellId = _ref.interactiveCellId,
|
|
44
45
|
setRowHeight = _ref.setRowHeight,
|
|
@@ -47,9 +48,8 @@ export var Cell = function Cell(_ref) {
|
|
|
47
48
|
rowManager = _ref.rowManager,
|
|
48
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
50
|
var popoverContext = useContext(DataGridCellPopoverContext);
|
|
50
|
-
var _useContext = useContext(
|
|
51
|
+
var _useContext = useContext(DataGridSortedContext),
|
|
51
52
|
getCorrectRowIndex = _useContext.getCorrectRowIndex;
|
|
52
|
-
var cellContent;
|
|
53
53
|
var isFirstColumn = colIndex === 0;
|
|
54
54
|
var isLastColumn = colIndex === visibleColCount - 1;
|
|
55
55
|
var isLeadingControlColumn = colIndex < leadingControlColumns.length;
|
|
@@ -63,30 +63,33 @@ export var Cell = function Cell(_ref) {
|
|
|
63
63
|
return column !== null && column !== void 0 && column.schema ? (column === null || column === void 0 ? void 0 : column.schema) === row.type : columnId === row.type;
|
|
64
64
|
})[0]) === null || _schemaDetectors$filt === void 0 ? void 0 : _schemaDetectors$filt.textTransform;
|
|
65
65
|
}, [columnId, column === null || column === void 0 ? void 0 : column.schema, schemaDetectors]);
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
var sharedCellProps = useMemo(function () {
|
|
67
|
+
var classes = classNames(_defineProperty({
|
|
68
|
+
'euiDataGridRowCell--firstColumn': isFirstColumn,
|
|
69
|
+
'euiDataGridRowCell--lastColumn': isLastColumn,
|
|
70
|
+
'euiDataGridRowCell--controlColumn': isLeadingControlColumn || isTrailingControlColumn
|
|
71
|
+
}, "euiDataGridRowCell--".concat(textTransform), textTransform));
|
|
72
|
+
return {
|
|
73
|
+
rowIndex: getCorrectRowIndex(visibleRowIndex),
|
|
74
|
+
visibleRowIndex: visibleRowIndex,
|
|
75
|
+
colIndex: colIndex,
|
|
76
|
+
interactiveCellId: interactiveCellId,
|
|
77
|
+
className: classes,
|
|
78
|
+
style: style,
|
|
79
|
+
rowHeightsOptions: rowHeightsOptions,
|
|
80
|
+
rowHeightUtils: rowHeightUtils,
|
|
81
|
+
setRowHeight: isFirstColumn ? setRowHeight : undefined,
|
|
82
|
+
rowManager: rowManager,
|
|
83
|
+
popoverContext: popoverContext,
|
|
84
|
+
pagination: pagination,
|
|
85
|
+
cellContext: cellContext
|
|
86
|
+
};
|
|
87
|
+
}, [colIndex, setRowHeight, visibleRowIndex, getCorrectRowIndex, interactiveCellId, style, rowHeightsOptions, rowHeightUtils, rowManager, popoverContext, pagination, cellContext, isFirstColumn, isLastColumn, isLeadingControlColumn, isTrailingControlColumn, textTransform]);
|
|
85
88
|
if (isLeadingControlColumn) {
|
|
86
89
|
var leadingColumn = leadingControlColumns[colIndex];
|
|
87
90
|
var id = leadingColumn.id,
|
|
88
91
|
rowCellRender = leadingColumn.rowCellRender;
|
|
89
|
-
|
|
92
|
+
return ___EmotionJSX(EuiDataGridCell, _extends({}, sharedCellProps, {
|
|
90
93
|
columnId: id,
|
|
91
94
|
width: leadingColumn.width,
|
|
92
95
|
renderCellValue: rowCellRender,
|
|
@@ -98,7 +101,7 @@ export var Cell = function Cell(_ref) {
|
|
|
98
101
|
var trailingColumn = trailingControlColumns[trailingcolIndex];
|
|
99
102
|
var _id = trailingColumn.id,
|
|
100
103
|
_rowCellRender = trailingColumn.rowCellRender;
|
|
101
|
-
|
|
104
|
+
return ___EmotionJSX(EuiDataGridCell, _extends({}, sharedCellProps, {
|
|
102
105
|
columnId: _id,
|
|
103
106
|
width: trailingColumn.width,
|
|
104
107
|
renderCellValue: _rowCellRender,
|
|
@@ -107,9 +110,9 @@ export var Cell = function Cell(_ref) {
|
|
|
107
110
|
} else {
|
|
108
111
|
// this is a normal data cell
|
|
109
112
|
var columnType = schema[columnId] ? schema[columnId].columnType : null;
|
|
110
|
-
var isExpandable = column.isExpandable !== undefined ? column.isExpandable : true;
|
|
113
|
+
var isExpandable = (column === null || column === void 0 ? void 0 : column.isExpandable) !== undefined ? column === null || column === void 0 ? void 0 : column.isExpandable : true;
|
|
111
114
|
var width = columnWidths[columnId] || defaultColumnWidth;
|
|
112
|
-
|
|
115
|
+
return ___EmotionJSX(EuiDataGridCell, _extends({}, sharedCellProps, {
|
|
113
116
|
columnId: columnId,
|
|
114
117
|
column: column,
|
|
115
118
|
columnType: columnType,
|
|
@@ -120,5 +123,5 @@ export var Cell = function Cell(_ref) {
|
|
|
120
123
|
isExpandable: isExpandable
|
|
121
124
|
}, rest));
|
|
122
125
|
}
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
});
|
|
127
|
+
CellWrapper.displayName = 'CellWrapper';
|
|
@@ -562,10 +562,24 @@ EuiDataGridBody.propTypes = {
|
|
|
562
562
|
visibleRowCount: PropTypes.number.isRequired
|
|
563
563
|
}).isRequired,
|
|
564
564
|
renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
565
|
+
cellContext: PropTypes.any,
|
|
565
566
|
renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
|
|
566
567
|
renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
|
|
567
568
|
renderCustomGridBody: PropTypes.func,
|
|
568
569
|
interactiveCellId: PropTypes.string.isRequired,
|
|
570
|
+
sorting: PropTypes.shape({
|
|
571
|
+
/**
|
|
572
|
+
* A function that receives updated column sort details in response to user interactions in the toolbar controls
|
|
573
|
+
*/
|
|
574
|
+
onSort: PropTypes.func.isRequired,
|
|
575
|
+
/**
|
|
576
|
+
* An array of the column ids currently being sorted and their sort direction. The array order determines the sort order. `{ id: 'A'; direction: 'asc' }`
|
|
577
|
+
*/
|
|
578
|
+
columns: PropTypes.arrayOf(PropTypes.shape({
|
|
579
|
+
id: PropTypes.string.isRequired,
|
|
580
|
+
direction: PropTypes.oneOf(["asc", "desc"]).isRequired
|
|
581
|
+
}).isRequired).isRequired
|
|
582
|
+
}),
|
|
569
583
|
pagination: PropTypes.any,
|
|
570
584
|
setVisibleColumns: PropTypes.func.isRequired,
|
|
571
585
|
switchColumnPos: PropTypes.func.isRequired,
|
|
@@ -33,28 +33,30 @@ import { useDefaultColumnWidth, useColumnWidths } from '../utils/col_widths';
|
|
|
33
33
|
import { useRowHeightUtils, useDefaultRowHeight } from '../utils/row_heights';
|
|
34
34
|
import { useDataGridHeader } from './header';
|
|
35
35
|
import { useDataGridFooter } from './footer';
|
|
36
|
-
import {
|
|
36
|
+
import { CellWrapper } from './cell';
|
|
37
37
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
38
38
|
export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_ref) {
|
|
39
39
|
var renderCustomGridBody = _ref.renderCustomGridBody,
|
|
40
|
-
leadingControlColumns = _ref.leadingControlColumns,
|
|
41
|
-
trailingControlColumns = _ref.trailingControlColumns,
|
|
42
|
-
columns = _ref.columns,
|
|
43
|
-
visibleColCount = _ref.visibleColCount,
|
|
44
|
-
schema = _ref.schema,
|
|
45
|
-
schemaDetectors = _ref.schemaDetectors,
|
|
46
|
-
visibleRows = _ref.visibleRows,
|
|
47
40
|
renderCellValue = _ref.renderCellValue,
|
|
41
|
+
cellContext = _ref.cellContext,
|
|
48
42
|
renderCellPopover = _ref.renderCellPopover,
|
|
49
43
|
renderFooterCellValue = _ref.renderFooterCellValue,
|
|
50
44
|
interactiveCellId = _ref.interactiveCellId,
|
|
45
|
+
visibleRows = _ref.visibleRows,
|
|
46
|
+
visibleColCount = _ref.visibleColCount,
|
|
47
|
+
leadingControlColumns = _ref.leadingControlColumns,
|
|
48
|
+
trailingControlColumns = _ref.trailingControlColumns,
|
|
49
|
+
columns = _ref.columns,
|
|
51
50
|
setVisibleColumns = _ref.setVisibleColumns,
|
|
52
51
|
switchColumnPos = _ref.switchColumnPos,
|
|
53
52
|
onColumnResize = _ref.onColumnResize,
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
schema = _ref.schema,
|
|
54
|
+
schemaDetectors = _ref.schemaDetectors,
|
|
55
|
+
sorting = _ref.sorting,
|
|
56
56
|
pagination = _ref.pagination,
|
|
57
|
-
rowHeightsOptions = _ref.rowHeightsOptions
|
|
57
|
+
rowHeightsOptions = _ref.rowHeightsOptions,
|
|
58
|
+
gridWidth = _ref.gridWidth,
|
|
59
|
+
gridStyles = _ref.gridStyles;
|
|
58
60
|
/**
|
|
59
61
|
* Columns & widths
|
|
60
62
|
*/
|
|
@@ -93,14 +95,15 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
93
95
|
* Header & footer
|
|
94
96
|
*/
|
|
95
97
|
var _useDataGridHeader = useDataGridHeader({
|
|
96
|
-
switchColumnPos: switchColumnPos,
|
|
97
|
-
setVisibleColumns: setVisibleColumns,
|
|
98
98
|
leadingControlColumns: leadingControlColumns,
|
|
99
99
|
trailingControlColumns: trailingControlColumns,
|
|
100
100
|
columns: columns,
|
|
101
101
|
columnWidths: columnWidths,
|
|
102
102
|
defaultColumnWidth: defaultColumnWidth,
|
|
103
103
|
setColumnWidth: setColumnWidth,
|
|
104
|
+
setVisibleColumns: setVisibleColumns,
|
|
105
|
+
switchColumnPos: switchColumnPos,
|
|
106
|
+
sorting: sorting,
|
|
104
107
|
schema: schema,
|
|
105
108
|
schemaDetectors: schemaDetectors
|
|
106
109
|
}),
|
|
@@ -123,24 +126,27 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
123
126
|
/**
|
|
124
127
|
* Cell render fn
|
|
125
128
|
*/
|
|
126
|
-
var cellProps = {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
129
|
+
var cellProps = useMemo(function () {
|
|
130
|
+
return {
|
|
131
|
+
schema: schema,
|
|
132
|
+
schemaDetectors: schemaDetectors,
|
|
133
|
+
pagination: pagination,
|
|
134
|
+
columns: columns,
|
|
135
|
+
leadingControlColumns: leadingControlColumns,
|
|
136
|
+
trailingControlColumns: trailingControlColumns,
|
|
137
|
+
visibleColCount: visibleColCount,
|
|
138
|
+
columnWidths: columnWidths,
|
|
139
|
+
defaultColumnWidth: defaultColumnWidth,
|
|
140
|
+
renderCellValue: renderCellValue,
|
|
141
|
+
cellContext: cellContext,
|
|
142
|
+
renderCellPopover: renderCellPopover,
|
|
143
|
+
interactiveCellId: interactiveCellId,
|
|
144
|
+
setRowHeight: setRowHeight,
|
|
145
|
+
rowHeightsOptions: rowHeightsOptions,
|
|
146
|
+
rowHeightUtils: rowHeightUtils
|
|
147
|
+
};
|
|
148
|
+
}, [schema, schemaDetectors, pagination, columns, leadingControlColumns, trailingControlColumns, visibleColCount, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, setRowHeight, rowHeightsOptions, rowHeightUtils]);
|
|
149
|
+
var Cell = useCallback(function (_ref2) {
|
|
144
150
|
var colIndex = _ref2.colIndex,
|
|
145
151
|
visibleRowIndex = _ref2.visibleRowIndex,
|
|
146
152
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
@@ -152,9 +158,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
152
158
|
visibleRowIndex: visibleRowIndex,
|
|
153
159
|
style: style
|
|
154
160
|
}, cellProps);
|
|
155
|
-
return ___EmotionJSX(
|
|
156
|
-
}, [
|
|
157
|
-
);
|
|
161
|
+
return ___EmotionJSX(CellWrapper, _extends({}, props, rest));
|
|
162
|
+
}, [cellProps, getRowHeight, rowHeightUtils, rowHeightsOptions]);
|
|
158
163
|
|
|
159
164
|
// Allow consumers to pass custom props/attributes/listeners etc. to the wrapping div
|
|
160
165
|
var _useState = useState({}),
|
|
@@ -166,7 +171,7 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
|
|
|
166
171
|
}), headerRow, renderCustomGridBody({
|
|
167
172
|
visibleColumns: visibleColumns,
|
|
168
173
|
visibleRowData: visibleRows,
|
|
169
|
-
Cell:
|
|
174
|
+
Cell: Cell,
|
|
170
175
|
setCustomGridBodyProps: setCustomGridBodyProps
|
|
171
176
|
}), footerRow);
|
|
172
177
|
};
|
|
@@ -705,10 +710,24 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
705
710
|
visibleRowCount: PropTypes.number.isRequired
|
|
706
711
|
}).isRequired,
|
|
707
712
|
renderCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
713
|
+
cellContext: PropTypes.any,
|
|
708
714
|
renderCellPopover: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.func.isRequired]),
|
|
709
715
|
renderFooterCellValue: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]),
|
|
710
716
|
renderCustomGridBody: PropTypes.func,
|
|
711
717
|
interactiveCellId: PropTypes.string.isRequired,
|
|
718
|
+
sorting: PropTypes.shape({
|
|
719
|
+
/**
|
|
720
|
+
* A function that receives updated column sort details in response to user interactions in the toolbar controls
|
|
721
|
+
*/
|
|
722
|
+
onSort: PropTypes.func.isRequired,
|
|
723
|
+
/**
|
|
724
|
+
* An array of the column ids currently being sorted and their sort direction. The array order determines the sort order. `{ id: 'A'; direction: 'asc' }`
|
|
725
|
+
*/
|
|
726
|
+
columns: PropTypes.arrayOf(PropTypes.shape({
|
|
727
|
+
id: PropTypes.string.isRequired,
|
|
728
|
+
direction: PropTypes.oneOf(["asc", "desc"]).isRequired
|
|
729
|
+
}).isRequired).isRequired
|
|
730
|
+
}),
|
|
712
731
|
pagination: PropTypes.any,
|
|
713
732
|
setVisibleColumns: PropTypes.func.isRequired,
|
|
714
733
|
switchColumnPos: PropTypes.func.isRequired,
|