@elastic/eui 108.0.0 → 109.1.0-snapshot.1763390960850
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/es/components/accessibility/skip_link/skip_link.js +10 -1
- package/es/components/basic_table/collapsed_item_actions.js +3 -1
- package/es/components/basic_table/default_item_action.js +7 -4
- package/es/components/bottom_bar/bottom_bar.js +12 -2
- package/es/components/button/button.js +20 -25
- package/es/components/button/button_display/_button_display.js +32 -30
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_empty/button_empty.js +32 -14
- package/es/components/button/button_group/button_group.js +49 -31
- package/es/components/button/button_group/button_group_button.js +16 -5
- package/es/components/button/button_group/button_group_button.styles.js +12 -8
- package/es/components/button/button_icon/button_icon.js +30 -6
- package/es/components/card/card.js +20 -25
- package/es/components/card/card_select/card_select.js +20 -25
- package/es/components/code/code_block_virtualized.js +9 -7
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/es/components/datagrid/body/data_grid_body.js +23 -6
- package/es/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/es/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/es/components/datagrid/body/header/column_actions.js +5 -21
- package/es/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/es/components/datagrid/controls/column_selector.js +36 -19
- package/es/components/datagrid/controls/column_sorting.js +23 -6
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/es/components/datagrid/data_grid.js +5 -1
- package/es/components/datagrid/utils/in_memory.js +25 -7
- package/es/components/date_picker/auto_refresh/auto_refresh.js +11 -2
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +31 -5
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +98 -0
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
- package/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
- package/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
- package/es/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
- package/es/components/facet/facet_button.js +9 -19
- package/es/components/filter_group/filter_button.js +14 -1
- package/es/components/flyout/flyout.js +27 -10
- package/es/components/form/file_picker/file_picker.styles.js +3 -3
- package/es/components/form/form_control_button/form_control_button.js +13 -7
- package/es/components/header/header_links/header_link.js +13 -7
- package/es/components/header/header_section/header_section_item_button.js +13 -7
- package/es/components/icon/assets/boxes_vertical.js +1 -1
- package/es/components/icon/assets/checkInCircleFilled.js +1 -2
- package/es/components/icon/assets/errorFilled.js +1 -2
- package/es/components/icon/assets/paper_clip.js +1 -1
- package/es/components/icon/assets/streams_wired.js +3 -2
- package/es/components/icon/assets/warningFilled.js +1 -2
- package/es/components/icon/icon_map.js +3 -6
- package/es/components/list_group/list_group.js +13 -1
- package/es/components/list_group/list_group_item.js +13 -1
- package/es/components/list_group/list_group_item_extra_action.js +13 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/es/components/pagination/pagination_button.js +13 -7
- package/es/components/popover/popover.js +22 -16
- package/es/components/provider/component_defaults/component_defaults.js +22 -2
- package/es/components/table/table_row.styles.js +1 -1
- package/es/components/tool_tip/tool_tip.js +24 -24
- package/es/global_styling/index.js +2 -1
- package/es/global_styling/mixins/_button.js +1 -1
- package/es/global_styling/utility/selectors.js +9 -0
- package/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
- package/es/services/focus_trap/index.js +9 -0
- package/es/services/hooks/index.js +2 -1
- package/es/services/hooks/useEuiDisabledElement.js +195 -0
- package/es/services/index.js +1 -0
- package/es/services/popover/reposition_on_scroll.js +61 -0
- package/es/services/theme/high_contrast_overrides.js +5 -1
- package/es/test/cypress/index.d.ts +12 -0
- package/es/test/cypress/index.js +9 -0
- package/es/test/cypress/matchers.d.ts +20 -0
- package/es/test/cypress/matchers.js +54 -0
- package/es/test/cypress/test_reposition_on_scroll.js +66 -0
- package/es/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/es/test/enzyme/enzyme_matchers.js +43 -0
- package/es/test/enzyme/index.d.ts +14 -0
- package/es/test/enzyme/index.js +10 -0
- package/es/test/rtl/index.d.ts +9 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/matchers.d.ts +36 -0
- package/es/test/rtl/matchers.js +82 -0
- package/es/utils/element_can_be_disabled.js +16 -0
- package/es/utils/index.js +2 -1
- package/eui.d.ts +604 -183
- package/i18ntokens.json +1357 -1231
- package/lib/components/accessibility/skip_link/skip_link.js +10 -1
- package/lib/components/basic_table/collapsed_item_actions.js +3 -1
- package/lib/components/basic_table/default_item_action.js +7 -4
- package/lib/components/bottom_bar/bottom_bar.js +11 -1
- package/lib/components/button/button.js +21 -26
- package/lib/components/button/button_display/_button_display.js +31 -29
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_empty/button_empty.js +31 -13
- package/lib/components/button/button_group/button_group.js +49 -31
- package/lib/components/button/button_group/button_group_button.js +16 -5
- package/lib/components/button/button_group/button_group_button.styles.js +10 -6
- package/lib/components/button/button_icon/button_icon.js +29 -5
- package/lib/components/card/card.js +21 -26
- package/lib/components/card/card_select/card_select.js +21 -26
- package/lib/components/code/code_block_virtualized.js +9 -7
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/lib/components/datagrid/body/data_grid_body.js +23 -6
- package/lib/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/lib/components/datagrid/body/header/column_actions.js +5 -21
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/lib/components/datagrid/controls/column_selector.js +36 -19
- package/lib/components/datagrid/controls/column_sorting.js +23 -6
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/lib/components/datagrid/data_grid.js +5 -1
- package/lib/components/datagrid/utils/in_memory.js +25 -7
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +12 -3
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +104 -0
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/lib/components/facet/facet_button.js +9 -19
- package/lib/components/filter_group/filter_button.js +14 -1
- package/lib/components/flyout/flyout.js +26 -9
- package/lib/components/form/file_picker/file_picker.styles.js +3 -3
- package/lib/components/form/form_control_button/form_control_button.js +13 -7
- package/lib/components/header/header_links/header_link.js +13 -7
- package/lib/components/header/header_section/header_section_item_button.js +13 -7
- package/lib/components/icon/assets/boxes_vertical.js +1 -1
- package/lib/components/icon/assets/checkInCircleFilled.js +1 -2
- package/lib/components/icon/assets/errorFilled.js +1 -2
- package/lib/components/icon/assets/paper_clip.js +1 -1
- package/lib/components/icon/assets/streams_wired.js +3 -2
- package/lib/components/icon/assets/warningFilled.js +1 -2
- package/lib/components/icon/icon_map.js +3 -6
- package/lib/components/icon/svgs/boxes_vertical.svg +1 -1
- package/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
- package/lib/components/icon/svgs/errorFilled.svg +1 -1
- package/lib/components/icon/svgs/paper_clip.svg +3 -3
- package/lib/components/icon/svgs/warningFilled.svg +1 -1
- package/lib/components/list_group/list_group.js +13 -1
- package/lib/components/list_group/list_group_item.js +13 -1
- package/lib/components/list_group/list_group_item_extra_action.js +13 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/lib/components/pagination/pagination_button.js +13 -7
- package/lib/components/popover/popover.js +21 -15
- package/lib/components/provider/component_defaults/component_defaults.js +22 -2
- package/lib/components/table/table_row.styles.js +1 -1
- package/lib/components/tool_tip/tool_tip.js +24 -24
- package/lib/global_styling/index.js +16 -1
- package/lib/global_styling/mixins/_button.js +1 -1
- package/lib/global_styling/utility/selectors.js +15 -0
- package/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/lib/services/focus_trap/index.js +12 -0
- package/lib/services/hooks/index.js +18 -1
- package/lib/services/hooks/useEuiDisabledElement.js +199 -0
- package/lib/services/index.js +8 -0
- package/lib/services/popover/reposition_on_scroll.js +67 -0
- package/lib/services/theme/high_contrast_overrides.js +5 -1
- package/lib/test/cypress/index.d.ts +12 -0
- package/lib/test/cypress/index.js +18 -0
- package/lib/test/cypress/matchers.d.ts +20 -0
- package/lib/test/cypress/matchers.js +61 -0
- package/lib/test/cypress/test_reposition_on_scroll.js +69 -0
- package/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/lib/test/enzyme/enzyme_matchers.js +49 -0
- package/lib/test/enzyme/index.d.ts +14 -0
- package/lib/test/enzyme/index.js +24 -0
- package/lib/test/rtl/index.d.ts +9 -1
- package/lib/test/rtl/index.js +24 -2
- package/lib/test/rtl/matchers.d.ts +36 -0
- package/lib/test/rtl/matchers.js +86 -0
- package/lib/utils/element_can_be_disabled.js +22 -0
- package/lib/utils/index.js +14 -1
- package/optimize/es/components/basic_table/collapsed_item_actions.js +3 -1
- package/optimize/es/components/basic_table/default_item_action.js +7 -4
- package/optimize/es/components/bottom_bar/bottom_bar.js +12 -2
- package/optimize/es/components/button/button_display/_button_display.js +24 -12
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_empty/button_empty.js +18 -6
- package/optimize/es/components/button/button_group/button_group.js +10 -5
- package/optimize/es/components/button/button_group/button_group_button.js +2 -3
- package/optimize/es/components/button/button_group/button_group_button.styles.js +12 -8
- package/optimize/es/components/button/button_icon/button_icon.js +17 -5
- package/optimize/es/components/code/code_block_virtualized.js +9 -7
- package/optimize/es/components/datagrid/body/header/column_actions.js +5 -21
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +6 -4
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
- package/optimize/es/components/datagrid/controls/column_selector.js +36 -19
- package/optimize/es/components/datagrid/data_grid.js +5 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -4
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
- package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +97 -0
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
- package/optimize/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
- package/optimize/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +49 -25
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
- package/optimize/es/components/flyout/flyout.js +27 -10
- package/optimize/es/components/form/file_picker/file_picker.styles.js +3 -3
- package/optimize/es/components/icon/assets/boxes_vertical.js +1 -1
- package/optimize/es/components/icon/assets/checkInCircleFilled.js +1 -2
- package/optimize/es/components/icon/assets/errorFilled.js +1 -2
- package/optimize/es/components/icon/assets/paper_clip.js +1 -1
- package/optimize/es/components/icon/assets/streams_wired.js +3 -2
- package/optimize/es/components/icon/assets/warningFilled.js +1 -2
- package/optimize/es/components/icon/icon_map.js +3 -6
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +22 -16
- package/optimize/es/components/table/table_row.styles.js +1 -1
- package/optimize/es/components/tool_tip/tool_tip.js +24 -24
- package/optimize/es/global_styling/index.js +2 -1
- package/optimize/es/global_styling/mixins/_button.js +1 -1
- package/optimize/es/global_styling/utility/selectors.js +9 -0
- package/optimize/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
- package/optimize/es/services/focus_trap/index.js +9 -0
- package/optimize/es/services/hooks/index.js +2 -1
- package/optimize/es/services/hooks/useEuiDisabledElement.js +192 -0
- package/optimize/es/services/index.js +1 -0
- package/optimize/es/services/popover/reposition_on_scroll.js +61 -0
- package/optimize/es/services/theme/high_contrast_overrides.js +5 -1
- package/optimize/es/test/cypress/index.d.ts +12 -0
- package/optimize/es/test/cypress/index.js +9 -0
- package/optimize/es/test/cypress/matchers.d.ts +20 -0
- package/optimize/es/test/cypress/matchers.js +54 -0
- package/optimize/es/test/cypress/test_reposition_on_scroll.js +63 -0
- package/optimize/es/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/optimize/es/test/enzyme/enzyme_matchers.js +43 -0
- package/optimize/es/test/enzyme/index.d.ts +14 -0
- package/optimize/es/test/enzyme/index.js +10 -0
- package/optimize/es/test/rtl/index.d.ts +9 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/matchers.d.ts +36 -0
- package/optimize/es/test/rtl/matchers.js +82 -0
- package/optimize/es/utils/element_can_be_disabled.js +16 -0
- package/optimize/es/utils/index.js +2 -1
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +3 -1
- package/optimize/lib/components/basic_table/default_item_action.js +7 -4
- package/optimize/lib/components/bottom_bar/bottom_bar.js +11 -1
- package/optimize/lib/components/button/button_display/_button_display.js +23 -11
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_empty/button_empty.js +17 -5
- package/optimize/lib/components/button/button_group/button_group.js +10 -5
- package/optimize/lib/components/button/button_group/button_group_button.js +2 -3
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +10 -6
- package/optimize/lib/components/button/button_icon/button_icon.js +16 -4
- package/optimize/lib/components/code/code_block_virtualized.js +9 -7
- package/optimize/lib/components/datagrid/body/header/column_actions.js +5 -21
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -4
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
- package/optimize/lib/components/datagrid/controls/column_selector.js +36 -19
- package/optimize/lib/components/datagrid/data_grid.js +5 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +11 -3
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/optimize/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/optimize/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +49 -25
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/optimize/lib/components/flyout/flyout.js +26 -9
- package/optimize/lib/components/form/file_picker/file_picker.styles.js +3 -3
- package/optimize/lib/components/icon/assets/boxes_vertical.js +1 -1
- package/optimize/lib/components/icon/assets/checkInCircleFilled.js +1 -2
- package/optimize/lib/components/icon/assets/errorFilled.js +1 -2
- package/optimize/lib/components/icon/assets/paper_clip.js +1 -1
- package/optimize/lib/components/icon/assets/streams_wired.js +3 -2
- package/optimize/lib/components/icon/assets/warningFilled.js +1 -2
- package/optimize/lib/components/icon/icon_map.js +3 -6
- package/optimize/lib/components/icon/svgs/boxes_vertical.svg +1 -1
- package/optimize/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
- package/optimize/lib/components/icon/svgs/errorFilled.svg +1 -1
- package/optimize/lib/components/icon/svgs/paper_clip.svg +3 -3
- package/optimize/lib/components/icon/svgs/warningFilled.svg +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +21 -15
- package/optimize/lib/components/table/table_row.styles.js +1 -1
- package/optimize/lib/components/tool_tip/tool_tip.js +24 -24
- package/optimize/lib/global_styling/index.js +16 -1
- package/optimize/lib/global_styling/mixins/_button.js +1 -1
- package/optimize/lib/global_styling/utility/selectors.js +15 -0
- package/optimize/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/optimize/lib/services/focus_trap/index.js +12 -0
- package/optimize/lib/services/hooks/index.js +18 -1
- package/optimize/lib/services/hooks/useEuiDisabledElement.js +197 -0
- package/optimize/lib/services/index.js +8 -0
- package/optimize/lib/services/popover/reposition_on_scroll.js +67 -0
- package/optimize/lib/services/theme/high_contrast_overrides.js +5 -1
- package/optimize/lib/test/cypress/index.d.ts +12 -0
- package/optimize/lib/test/cypress/index.js +18 -0
- package/optimize/lib/test/cypress/matchers.d.ts +20 -0
- package/optimize/lib/test/cypress/matchers.js +61 -0
- package/optimize/lib/test/cypress/test_reposition_on_scroll.js +70 -0
- package/optimize/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
- package/optimize/lib/test/enzyme/enzyme_matchers.js +50 -0
- package/optimize/lib/test/enzyme/index.d.ts +14 -0
- package/optimize/lib/test/enzyme/index.js +24 -0
- package/optimize/lib/test/rtl/index.d.ts +9 -1
- package/optimize/lib/test/rtl/index.js +24 -2
- package/optimize/lib/test/rtl/matchers.d.ts +36 -0
- package/optimize/lib/test/rtl/matchers.js +86 -0
- package/optimize/lib/utils/element_can_be_disabled.js +22 -0
- package/optimize/lib/utils/index.js +14 -1
- package/package.json +6 -5
- package/test-env/components/accessibility/skip_link/skip_link.js +10 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +3 -1
- package/test-env/components/basic_table/default_item_action.js +7 -4
- package/test-env/components/bottom_bar/bottom_bar.js +11 -1
- package/test-env/components/button/button.js +21 -26
- package/test-env/components/button/button_display/_button_display.js +31 -29
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_empty/button_empty.js +31 -13
- package/test-env/components/button/button_group/button_group.js +49 -31
- package/test-env/components/button/button_group/button_group_button.js +16 -5
- package/test-env/components/button/button_group/button_group_button.styles.js +10 -6
- package/test-env/components/button/button_icon/button_icon.js +29 -5
- package/test-env/components/card/card.js +21 -26
- package/test-env/components/card/card_select/card_select.js +21 -26
- package/test-env/components/code/code_block_virtualized.js +9 -7
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +35 -12
- package/test-env/components/datagrid/body/data_grid_body.js +23 -6
- package/test-env/components/datagrid/body/data_grid_body_custom.js +23 -6
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +23 -6
- package/test-env/components/datagrid/body/header/column_actions.js +5 -21
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +29 -10
- package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
- package/test-env/components/datagrid/controls/column_selector.js +36 -19
- package/test-env/components/datagrid/controls/column_sorting.js +23 -6
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
- package/test-env/components/datagrid/data_grid.js +5 -1
- package/test-env/components/datagrid/utils/in_memory.js +25 -7
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +12 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
- package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
- package/test-env/components/date_picker/super_date_picker/pretty_duration.js +2 -9
- package/test-env/components/date_picker/super_date_picker/relative_utils.js +9 -0
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +118 -26
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
- package/test-env/components/facet/facet_button.js +9 -19
- package/test-env/components/filter_group/filter_button.js +14 -1
- package/test-env/components/form/file_picker/file_picker.styles.js +3 -3
- package/test-env/components/form/form_control_button/form_control_button.js +13 -7
- package/test-env/components/header/header_links/header_link.js +13 -7
- package/test-env/components/header/header_section/header_section_item_button.js +13 -7
- package/test-env/components/icon/assets/boxes_vertical.js +1 -1
- package/test-env/components/icon/assets/checkInCircleFilled.js +1 -2
- package/test-env/components/icon/assets/errorFilled.js +1 -2
- package/test-env/components/icon/assets/paper_clip.js +1 -1
- package/test-env/components/icon/assets/streams_wired.js +3 -2
- package/test-env/components/icon/assets/warningFilled.js +1 -2
- package/test-env/components/icon/icon_map.js +3 -6
- package/test-env/components/list_group/list_group.js +13 -1
- package/test-env/components/list_group/list_group_item.js +13 -1
- package/test-env/components/list_group/list_group_item_extra_action.js +13 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -1
- package/test-env/components/pagination/pagination_button.js +13 -7
- package/test-env/components/popover/popover.js +21 -15
- package/test-env/components/provider/component_defaults/component_defaults.js +22 -2
- package/test-env/components/table/table_row.styles.js +1 -1
- package/test-env/components/tool_tip/tool_tip.js +24 -24
- package/test-env/global_styling/index.js +16 -1
- package/test-env/global_styling/mixins/_button.js +1 -1
- package/test-env/global_styling/utility/selectors.js +15 -0
- package/test-env/services/focus_trap/focus_trap_pub_sub.js +80 -0
- package/test-env/services/focus_trap/index.js +12 -0
- package/test-env/services/hooks/index.js +18 -1
- package/test-env/services/hooks/useEuiDisabledElement.js +197 -0
- package/test-env/services/index.js +8 -0
- package/test-env/services/popover/reposition_on_scroll.js +67 -0
- package/test-env/services/theme/high_contrast_overrides.js +5 -1
- package/test-env/test/cypress/index.js +18 -0
- package/test-env/test/cypress/matchers.js +61 -0
- package/test-env/test/cypress/test_reposition_on_scroll.js +70 -0
- package/test-env/test/enzyme/enzyme_matchers.js +50 -0
- package/test-env/test/enzyme/index.js +24 -0
- package/test-env/test/rtl/index.js +24 -2
- package/test-env/test/rtl/matchers.js +86 -0
- package/test-env/utils/element_can_be_disabled.js +22 -0
- package/test-env/utils/index.js +14 -1
|
@@ -214,7 +214,6 @@ EuiDataGridBody.propTypes = {
|
|
|
214
214
|
color: PropTypes.any,
|
|
215
215
|
"aria-label": PropTypes.string,
|
|
216
216
|
"aria-labelledby": PropTypes.string,
|
|
217
|
-
isDisabled: PropTypes.bool,
|
|
218
217
|
/**
|
|
219
218
|
* Overall size of button.
|
|
220
219
|
* Matches the sizes of other EuiButtons
|
|
@@ -244,6 +243,19 @@ EuiDataGridBody.propTypes = {
|
|
|
244
243
|
className: PropTypes.string,
|
|
245
244
|
"data-test-subj": PropTypes.string,
|
|
246
245
|
css: PropTypes.any,
|
|
246
|
+
/**
|
|
247
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
248
|
+
*/
|
|
249
|
+
isDisabled: PropTypes.bool,
|
|
250
|
+
/**
|
|
251
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
252
|
+
*
|
|
253
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
254
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
255
|
+
*
|
|
256
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
257
|
+
*/
|
|
258
|
+
hasAriaDisabled: PropTypes.bool,
|
|
247
259
|
buttonRef: PropTypes.any
|
|
248
260
|
}),
|
|
249
261
|
/**
|
|
@@ -297,7 +309,6 @@ EuiDataGridBody.propTypes = {
|
|
|
297
309
|
color: PropTypes.any,
|
|
298
310
|
"aria-label": PropTypes.string,
|
|
299
311
|
"aria-labelledby": PropTypes.string,
|
|
300
|
-
isDisabled: PropTypes.bool,
|
|
301
312
|
size: PropTypes.any,
|
|
302
313
|
iconSize: PropTypes.any,
|
|
303
314
|
isSelected: PropTypes.bool,
|
|
@@ -306,6 +317,8 @@ EuiDataGridBody.propTypes = {
|
|
|
306
317
|
className: PropTypes.string,
|
|
307
318
|
"data-test-subj": PropTypes.string,
|
|
308
319
|
css: PropTypes.any,
|
|
320
|
+
isDisabled: PropTypes.bool,
|
|
321
|
+
hasAriaDisabled: PropTypes.bool,
|
|
309
322
|
buttonRef: PropTypes.any
|
|
310
323
|
}),
|
|
311
324
|
onClick: PropTypes.func,
|
|
@@ -340,7 +353,6 @@ EuiDataGridBody.propTypes = {
|
|
|
340
353
|
color: PropTypes.any,
|
|
341
354
|
"aria-label": PropTypes.string,
|
|
342
355
|
"aria-labelledby": PropTypes.string,
|
|
343
|
-
isDisabled: PropTypes.bool,
|
|
344
356
|
size: PropTypes.any,
|
|
345
357
|
iconSize: PropTypes.any,
|
|
346
358
|
isSelected: PropTypes.bool,
|
|
@@ -349,6 +361,8 @@ EuiDataGridBody.propTypes = {
|
|
|
349
361
|
className: PropTypes.string,
|
|
350
362
|
"data-test-subj": PropTypes.string,
|
|
351
363
|
css: PropTypes.any,
|
|
364
|
+
isDisabled: PropTypes.bool,
|
|
365
|
+
hasAriaDisabled: PropTypes.bool,
|
|
352
366
|
buttonRef: PropTypes.any
|
|
353
367
|
}),
|
|
354
368
|
onClick: PropTypes.func,
|
|
@@ -383,7 +397,6 @@ EuiDataGridBody.propTypes = {
|
|
|
383
397
|
color: PropTypes.any,
|
|
384
398
|
"aria-label": PropTypes.string,
|
|
385
399
|
"aria-labelledby": PropTypes.string,
|
|
386
|
-
isDisabled: PropTypes.bool,
|
|
387
400
|
size: PropTypes.any,
|
|
388
401
|
iconSize: PropTypes.any,
|
|
389
402
|
isSelected: PropTypes.bool,
|
|
@@ -392,6 +405,8 @@ EuiDataGridBody.propTypes = {
|
|
|
392
405
|
className: PropTypes.string,
|
|
393
406
|
"data-test-subj": PropTypes.string,
|
|
394
407
|
css: PropTypes.any,
|
|
408
|
+
isDisabled: PropTypes.bool,
|
|
409
|
+
hasAriaDisabled: PropTypes.bool,
|
|
395
410
|
buttonRef: PropTypes.any
|
|
396
411
|
}),
|
|
397
412
|
onClick: PropTypes.func,
|
|
@@ -426,7 +441,6 @@ EuiDataGridBody.propTypes = {
|
|
|
426
441
|
color: PropTypes.any,
|
|
427
442
|
"aria-label": PropTypes.string,
|
|
428
443
|
"aria-labelledby": PropTypes.string,
|
|
429
|
-
isDisabled: PropTypes.bool,
|
|
430
444
|
size: PropTypes.any,
|
|
431
445
|
iconSize: PropTypes.any,
|
|
432
446
|
isSelected: PropTypes.bool,
|
|
@@ -435,6 +449,8 @@ EuiDataGridBody.propTypes = {
|
|
|
435
449
|
className: PropTypes.string,
|
|
436
450
|
"data-test-subj": PropTypes.string,
|
|
437
451
|
css: PropTypes.any,
|
|
452
|
+
isDisabled: PropTypes.bool,
|
|
453
|
+
hasAriaDisabled: PropTypes.bool,
|
|
438
454
|
buttonRef: PropTypes.any
|
|
439
455
|
}),
|
|
440
456
|
onClick: PropTypes.func,
|
|
@@ -469,7 +485,6 @@ EuiDataGridBody.propTypes = {
|
|
|
469
485
|
color: PropTypes.any,
|
|
470
486
|
"aria-label": PropTypes.string,
|
|
471
487
|
"aria-labelledby": PropTypes.string,
|
|
472
|
-
isDisabled: PropTypes.bool,
|
|
473
488
|
size: PropTypes.any,
|
|
474
489
|
iconSize: PropTypes.any,
|
|
475
490
|
isSelected: PropTypes.bool,
|
|
@@ -478,6 +493,8 @@ EuiDataGridBody.propTypes = {
|
|
|
478
493
|
className: PropTypes.string,
|
|
479
494
|
"data-test-subj": PropTypes.string,
|
|
480
495
|
css: PropTypes.any,
|
|
496
|
+
isDisabled: PropTypes.bool,
|
|
497
|
+
hasAriaDisabled: PropTypes.bool,
|
|
481
498
|
buttonRef: PropTypes.any
|
|
482
499
|
}),
|
|
483
500
|
onClick: PropTypes.func,
|
|
@@ -378,7 +378,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
378
378
|
color: PropTypes.any,
|
|
379
379
|
"aria-label": PropTypes.string,
|
|
380
380
|
"aria-labelledby": PropTypes.string,
|
|
381
|
-
isDisabled: PropTypes.bool,
|
|
382
381
|
/**
|
|
383
382
|
* Overall size of button.
|
|
384
383
|
* Matches the sizes of other EuiButtons
|
|
@@ -408,6 +407,19 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
408
407
|
className: PropTypes.string,
|
|
409
408
|
"data-test-subj": PropTypes.string,
|
|
410
409
|
css: PropTypes.any,
|
|
410
|
+
/**
|
|
411
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
412
|
+
*/
|
|
413
|
+
isDisabled: PropTypes.bool,
|
|
414
|
+
/**
|
|
415
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
416
|
+
*
|
|
417
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
418
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
419
|
+
*
|
|
420
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
421
|
+
*/
|
|
422
|
+
hasAriaDisabled: PropTypes.bool,
|
|
411
423
|
buttonRef: PropTypes.any
|
|
412
424
|
}),
|
|
413
425
|
/**
|
|
@@ -461,7 +473,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
461
473
|
color: PropTypes.any,
|
|
462
474
|
"aria-label": PropTypes.string,
|
|
463
475
|
"aria-labelledby": PropTypes.string,
|
|
464
|
-
isDisabled: PropTypes.bool,
|
|
465
476
|
size: PropTypes.any,
|
|
466
477
|
iconSize: PropTypes.any,
|
|
467
478
|
isSelected: PropTypes.bool,
|
|
@@ -470,6 +481,8 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
470
481
|
className: PropTypes.string,
|
|
471
482
|
"data-test-subj": PropTypes.string,
|
|
472
483
|
css: PropTypes.any,
|
|
484
|
+
isDisabled: PropTypes.bool,
|
|
485
|
+
hasAriaDisabled: PropTypes.bool,
|
|
473
486
|
buttonRef: PropTypes.any
|
|
474
487
|
}),
|
|
475
488
|
onClick: PropTypes.func,
|
|
@@ -504,7 +517,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
504
517
|
color: PropTypes.any,
|
|
505
518
|
"aria-label": PropTypes.string,
|
|
506
519
|
"aria-labelledby": PropTypes.string,
|
|
507
|
-
isDisabled: PropTypes.bool,
|
|
508
520
|
size: PropTypes.any,
|
|
509
521
|
iconSize: PropTypes.any,
|
|
510
522
|
isSelected: PropTypes.bool,
|
|
@@ -513,6 +525,8 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
513
525
|
className: PropTypes.string,
|
|
514
526
|
"data-test-subj": PropTypes.string,
|
|
515
527
|
css: PropTypes.any,
|
|
528
|
+
isDisabled: PropTypes.bool,
|
|
529
|
+
hasAriaDisabled: PropTypes.bool,
|
|
516
530
|
buttonRef: PropTypes.any
|
|
517
531
|
}),
|
|
518
532
|
onClick: PropTypes.func,
|
|
@@ -547,7 +561,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
547
561
|
color: PropTypes.any,
|
|
548
562
|
"aria-label": PropTypes.string,
|
|
549
563
|
"aria-labelledby": PropTypes.string,
|
|
550
|
-
isDisabled: PropTypes.bool,
|
|
551
564
|
size: PropTypes.any,
|
|
552
565
|
iconSize: PropTypes.any,
|
|
553
566
|
isSelected: PropTypes.bool,
|
|
@@ -556,6 +569,8 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
556
569
|
className: PropTypes.string,
|
|
557
570
|
"data-test-subj": PropTypes.string,
|
|
558
571
|
css: PropTypes.any,
|
|
572
|
+
isDisabled: PropTypes.bool,
|
|
573
|
+
hasAriaDisabled: PropTypes.bool,
|
|
559
574
|
buttonRef: PropTypes.any
|
|
560
575
|
}),
|
|
561
576
|
onClick: PropTypes.func,
|
|
@@ -590,7 +605,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
590
605
|
color: PropTypes.any,
|
|
591
606
|
"aria-label": PropTypes.string,
|
|
592
607
|
"aria-labelledby": PropTypes.string,
|
|
593
|
-
isDisabled: PropTypes.bool,
|
|
594
608
|
size: PropTypes.any,
|
|
595
609
|
iconSize: PropTypes.any,
|
|
596
610
|
isSelected: PropTypes.bool,
|
|
@@ -599,6 +613,8 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
599
613
|
className: PropTypes.string,
|
|
600
614
|
"data-test-subj": PropTypes.string,
|
|
601
615
|
css: PropTypes.any,
|
|
616
|
+
isDisabled: PropTypes.bool,
|
|
617
|
+
hasAriaDisabled: PropTypes.bool,
|
|
602
618
|
buttonRef: PropTypes.any
|
|
603
619
|
}),
|
|
604
620
|
onClick: PropTypes.func,
|
|
@@ -633,7 +649,6 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
633
649
|
color: PropTypes.any,
|
|
634
650
|
"aria-label": PropTypes.string,
|
|
635
651
|
"aria-labelledby": PropTypes.string,
|
|
636
|
-
isDisabled: PropTypes.bool,
|
|
637
652
|
size: PropTypes.any,
|
|
638
653
|
iconSize: PropTypes.any,
|
|
639
654
|
isSelected: PropTypes.bool,
|
|
@@ -642,6 +657,8 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
642
657
|
className: PropTypes.string,
|
|
643
658
|
"data-test-subj": PropTypes.string,
|
|
644
659
|
css: PropTypes.any,
|
|
660
|
+
isDisabled: PropTypes.bool,
|
|
661
|
+
hasAriaDisabled: PropTypes.bool,
|
|
645
662
|
buttonRef: PropTypes.any
|
|
646
663
|
}),
|
|
647
664
|
onClick: PropTypes.func,
|
|
@@ -546,7 +546,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
546
546
|
color: PropTypes.any,
|
|
547
547
|
"aria-label": PropTypes.string,
|
|
548
548
|
"aria-labelledby": PropTypes.string,
|
|
549
|
-
isDisabled: PropTypes.bool,
|
|
550
549
|
/**
|
|
551
550
|
* Overall size of button.
|
|
552
551
|
* Matches the sizes of other EuiButtons
|
|
@@ -576,6 +575,19 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
576
575
|
className: PropTypes.string,
|
|
577
576
|
"data-test-subj": PropTypes.string,
|
|
578
577
|
css: PropTypes.any,
|
|
578
|
+
/**
|
|
579
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
580
|
+
*/
|
|
581
|
+
isDisabled: PropTypes.bool,
|
|
582
|
+
/**
|
|
583
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
584
|
+
*
|
|
585
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
586
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
587
|
+
*
|
|
588
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
589
|
+
*/
|
|
590
|
+
hasAriaDisabled: PropTypes.bool,
|
|
579
591
|
buttonRef: PropTypes.any
|
|
580
592
|
}),
|
|
581
593
|
/**
|
|
@@ -629,7 +641,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
629
641
|
color: PropTypes.any,
|
|
630
642
|
"aria-label": PropTypes.string,
|
|
631
643
|
"aria-labelledby": PropTypes.string,
|
|
632
|
-
isDisabled: PropTypes.bool,
|
|
633
644
|
size: PropTypes.any,
|
|
634
645
|
iconSize: PropTypes.any,
|
|
635
646
|
isSelected: PropTypes.bool,
|
|
@@ -638,6 +649,8 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
638
649
|
className: PropTypes.string,
|
|
639
650
|
"data-test-subj": PropTypes.string,
|
|
640
651
|
css: PropTypes.any,
|
|
652
|
+
isDisabled: PropTypes.bool,
|
|
653
|
+
hasAriaDisabled: PropTypes.bool,
|
|
641
654
|
buttonRef: PropTypes.any
|
|
642
655
|
}),
|
|
643
656
|
onClick: PropTypes.func,
|
|
@@ -672,7 +685,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
672
685
|
color: PropTypes.any,
|
|
673
686
|
"aria-label": PropTypes.string,
|
|
674
687
|
"aria-labelledby": PropTypes.string,
|
|
675
|
-
isDisabled: PropTypes.bool,
|
|
676
688
|
size: PropTypes.any,
|
|
677
689
|
iconSize: PropTypes.any,
|
|
678
690
|
isSelected: PropTypes.bool,
|
|
@@ -681,6 +693,8 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
681
693
|
className: PropTypes.string,
|
|
682
694
|
"data-test-subj": PropTypes.string,
|
|
683
695
|
css: PropTypes.any,
|
|
696
|
+
isDisabled: PropTypes.bool,
|
|
697
|
+
hasAriaDisabled: PropTypes.bool,
|
|
684
698
|
buttonRef: PropTypes.any
|
|
685
699
|
}),
|
|
686
700
|
onClick: PropTypes.func,
|
|
@@ -715,7 +729,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
715
729
|
color: PropTypes.any,
|
|
716
730
|
"aria-label": PropTypes.string,
|
|
717
731
|
"aria-labelledby": PropTypes.string,
|
|
718
|
-
isDisabled: PropTypes.bool,
|
|
719
732
|
size: PropTypes.any,
|
|
720
733
|
iconSize: PropTypes.any,
|
|
721
734
|
isSelected: PropTypes.bool,
|
|
@@ -724,6 +737,8 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
724
737
|
className: PropTypes.string,
|
|
725
738
|
"data-test-subj": PropTypes.string,
|
|
726
739
|
css: PropTypes.any,
|
|
740
|
+
isDisabled: PropTypes.bool,
|
|
741
|
+
hasAriaDisabled: PropTypes.bool,
|
|
727
742
|
buttonRef: PropTypes.any
|
|
728
743
|
}),
|
|
729
744
|
onClick: PropTypes.func,
|
|
@@ -758,7 +773,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
758
773
|
color: PropTypes.any,
|
|
759
774
|
"aria-label": PropTypes.string,
|
|
760
775
|
"aria-labelledby": PropTypes.string,
|
|
761
|
-
isDisabled: PropTypes.bool,
|
|
762
776
|
size: PropTypes.any,
|
|
763
777
|
iconSize: PropTypes.any,
|
|
764
778
|
isSelected: PropTypes.bool,
|
|
@@ -767,6 +781,8 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
767
781
|
className: PropTypes.string,
|
|
768
782
|
"data-test-subj": PropTypes.string,
|
|
769
783
|
css: PropTypes.any,
|
|
784
|
+
isDisabled: PropTypes.bool,
|
|
785
|
+
hasAriaDisabled: PropTypes.bool,
|
|
770
786
|
buttonRef: PropTypes.any
|
|
771
787
|
}),
|
|
772
788
|
onClick: PropTypes.func,
|
|
@@ -801,7 +817,6 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
801
817
|
color: PropTypes.any,
|
|
802
818
|
"aria-label": PropTypes.string,
|
|
803
819
|
"aria-labelledby": PropTypes.string,
|
|
804
|
-
isDisabled: PropTypes.bool,
|
|
805
820
|
size: PropTypes.any,
|
|
806
821
|
iconSize: PropTypes.any,
|
|
807
822
|
isSelected: PropTypes.bool,
|
|
@@ -810,6 +825,8 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
810
825
|
className: PropTypes.string,
|
|
811
826
|
"data-test-subj": PropTypes.string,
|
|
812
827
|
css: PropTypes.any,
|
|
828
|
+
isDisabled: PropTypes.bool,
|
|
829
|
+
hasAriaDisabled: PropTypes.bool,
|
|
813
830
|
buttonRef: PropTypes.any
|
|
814
831
|
}),
|
|
815
832
|
onClick: PropTypes.func,
|
|
@@ -83,16 +83,6 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
|
|
|
83
83
|
var closePopover = useCallback(function () {
|
|
84
84
|
setIsPopoverOpen(false);
|
|
85
85
|
}, []);
|
|
86
|
-
var _useState3 = useState(false),
|
|
87
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
88
|
-
isActionsButtonFocused = _useState4[0],
|
|
89
|
-
setIsActionsButtonFocused = _useState4[1];
|
|
90
|
-
var onFocus = useCallback(function () {
|
|
91
|
-
return setIsActionsButtonFocused(true);
|
|
92
|
-
}, []);
|
|
93
|
-
var onBlur = useCallback(function () {
|
|
94
|
-
return setIsActionsButtonFocused(false);
|
|
95
|
-
}, []);
|
|
96
86
|
var actionsButtonAriaLabel = useEuiI18n('euiDataGridHeaderCell.actionsButtonAriaLabel', '{title}. Click to view column header actions.', {
|
|
97
87
|
title: title
|
|
98
88
|
});
|
|
@@ -107,10 +97,10 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
|
|
|
107
97
|
/**
|
|
108
98
|
* Props to set on parent EuiDataGridHeaderCell
|
|
109
99
|
*/
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
isColumnMoving =
|
|
113
|
-
setIsColumnMoving =
|
|
100
|
+
var _useState3 = useState(false),
|
|
101
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
102
|
+
isColumnMoving = _useState4[0],
|
|
103
|
+
setIsColumnMoving = _useState4[1];
|
|
114
104
|
useEffect(function () {
|
|
115
105
|
setPropsFromColumnActions({
|
|
116
106
|
className: isPopoverOpen ? 'euiDataGridHeaderCell--isActionsPopoverOpen' : '',
|
|
@@ -156,17 +146,11 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
|
|
|
156
146
|
iconType: "boxesVertical",
|
|
157
147
|
iconSize: "s",
|
|
158
148
|
color: "text",
|
|
159
|
-
css: styles.euiDataGridHeaderCell__actions,
|
|
160
149
|
className: "euiDataGridHeaderCell__button",
|
|
161
150
|
onClick: togglePopover,
|
|
162
151
|
buttonRef: actionsButtonRef,
|
|
163
|
-
onFocus: onFocus,
|
|
164
|
-
onBlur: onBlur,
|
|
165
|
-
tabIndex: 0 // Override EuiButtonIcon's conditional tabindex based on aria-hidden
|
|
166
|
-
,
|
|
167
|
-
"aria-hidden": hasFocusTrap && !isActionsButtonFocused ? 'true' // prevent the actions button from being read on cell focus
|
|
168
|
-
: undefined,
|
|
169
152
|
"aria-label": hasFocusTrap ? actionsButtonAriaLabel : actionsEnterKeyInstructions,
|
|
153
|
+
css: [styles.euiDataGridHeaderCell__actions.action, styles.euiDataGridHeaderCell__actions.end, ";label:ColumnActions;"],
|
|
170
154
|
"data-test-subj": "dataGridHeaderCellActionButton-".concat(id)
|
|
171
155
|
}),
|
|
172
156
|
isOpen: isPopoverOpen,
|
|
@@ -54,6 +54,7 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
|
|
|
54
54
|
var width = columnWidths[id] || defaultColumnWidth;
|
|
55
55
|
var columnType = schema[id] ? schema[id].columnType : null;
|
|
56
56
|
var hasColumnActions = useHasColumnActions(actions);
|
|
57
|
+
var cellContentId = "dataGridHeaderCellContent-".concat(id);
|
|
57
58
|
var classes = classnames(_defineProperty(_defineProperty({}, "euiDataGridHeaderCell--".concat(columnType), columnType), 'euiDataGridHeaderCell--hasColumnActions', hasColumnActions), displayHeaderCellProps === null || displayHeaderCellProps === void 0 ? void 0 : displayHeaderCellProps.className);
|
|
58
59
|
var styles = useEuiMemoizedStyles(euiDataGridHeaderCellStyles);
|
|
59
60
|
var contentStyles = [styles.euiDataGridHeaderCell__content, (columnType === 'numeric' || columnType === 'currency') && styles.right];
|
|
@@ -97,8 +98,7 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
|
|
|
97
98
|
isLastColumn: isLastColumn,
|
|
98
99
|
width: width,
|
|
99
100
|
"aria-sort": ariaSort,
|
|
100
|
-
"aria-
|
|
101
|
-
,
|
|
101
|
+
"aria-labelledby": cellContentId,
|
|
102
102
|
"aria-describedby": classnames(sortingAriaId, dragProps === null || dragProps === void 0 ? void 0 : dragProps['aria-describedby']),
|
|
103
103
|
"data-column-moving": propsFromColumnActions['data-column-moving'] || (dragProps === null || dragProps === void 0 ? void 0 : dragProps['data-column-moving']) || undefined
|
|
104
104
|
}), function (hasFocusTrap) {
|
|
@@ -107,11 +107,13 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
|
|
|
107
107
|
}, ___EmotionJSX(EuiIcon, {
|
|
108
108
|
type: "grabOmnidirectional",
|
|
109
109
|
size: "s",
|
|
110
|
-
css: styles.euiDataGridHeaderCell__actions
|
|
110
|
+
css: [styles.euiDataGridHeaderCell__actions.action, styles.euiDataGridHeaderCell__actions.start, ";label:EuiDataGridHeaderCell;"]
|
|
111
111
|
})), ___EmotionJSX("div", {
|
|
112
112
|
css: contentStyles,
|
|
113
113
|
className: "euiDataGridHeaderCell__content",
|
|
114
|
-
title: title
|
|
114
|
+
title: title,
|
|
115
|
+
id: cellContentId,
|
|
116
|
+
"aria-label": displayAsText ? displayAsText : typeof children === 'string' ? children : undefined
|
|
115
117
|
}, children), sortingArrow, sortingScreenReaderText, hasColumnActions && ___EmotionJSX(ColumnActions, {
|
|
116
118
|
index: index,
|
|
117
119
|
id: id,
|
|
@@ -251,7 +253,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
251
253
|
color: PropTypes.any,
|
|
252
254
|
"aria-label": PropTypes.string,
|
|
253
255
|
"aria-labelledby": PropTypes.string,
|
|
254
|
-
isDisabled: PropTypes.bool,
|
|
255
256
|
/**
|
|
256
257
|
* Overall size of button.
|
|
257
258
|
* Matches the sizes of other EuiButtons
|
|
@@ -281,6 +282,19 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
281
282
|
className: PropTypes.string,
|
|
282
283
|
"data-test-subj": PropTypes.string,
|
|
283
284
|
css: PropTypes.any,
|
|
285
|
+
/**
|
|
286
|
+
* Controls the disabled behavior via the native `disabled` attribute.
|
|
287
|
+
*/
|
|
288
|
+
isDisabled: PropTypes.bool,
|
|
289
|
+
/**
|
|
290
|
+
* NOTE: Beta feature, may be changed or removed in the future
|
|
291
|
+
*
|
|
292
|
+
* Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
|
|
293
|
+
* This results in a semantically disabled button without the default browser handling of the disabled state.
|
|
294
|
+
*
|
|
295
|
+
* Use e.g. when a disabled button should have a tooltip.
|
|
296
|
+
*/
|
|
297
|
+
hasAriaDisabled: PropTypes.bool,
|
|
284
298
|
buttonRef: PropTypes.any
|
|
285
299
|
}),
|
|
286
300
|
/**
|
|
@@ -334,7 +348,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
334
348
|
color: PropTypes.any,
|
|
335
349
|
"aria-label": PropTypes.string,
|
|
336
350
|
"aria-labelledby": PropTypes.string,
|
|
337
|
-
isDisabled: PropTypes.bool,
|
|
338
351
|
size: PropTypes.any,
|
|
339
352
|
iconSize: PropTypes.any,
|
|
340
353
|
isSelected: PropTypes.bool,
|
|
@@ -343,6 +356,8 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
343
356
|
className: PropTypes.string,
|
|
344
357
|
"data-test-subj": PropTypes.string,
|
|
345
358
|
css: PropTypes.any,
|
|
359
|
+
isDisabled: PropTypes.bool,
|
|
360
|
+
hasAriaDisabled: PropTypes.bool,
|
|
346
361
|
buttonRef: PropTypes.any
|
|
347
362
|
}),
|
|
348
363
|
onClick: PropTypes.func,
|
|
@@ -377,7 +392,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
377
392
|
color: PropTypes.any,
|
|
378
393
|
"aria-label": PropTypes.string,
|
|
379
394
|
"aria-labelledby": PropTypes.string,
|
|
380
|
-
isDisabled: PropTypes.bool,
|
|
381
395
|
size: PropTypes.any,
|
|
382
396
|
iconSize: PropTypes.any,
|
|
383
397
|
isSelected: PropTypes.bool,
|
|
@@ -386,6 +400,8 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
386
400
|
className: PropTypes.string,
|
|
387
401
|
"data-test-subj": PropTypes.string,
|
|
388
402
|
css: PropTypes.any,
|
|
403
|
+
isDisabled: PropTypes.bool,
|
|
404
|
+
hasAriaDisabled: PropTypes.bool,
|
|
389
405
|
buttonRef: PropTypes.any
|
|
390
406
|
}),
|
|
391
407
|
onClick: PropTypes.func,
|
|
@@ -420,7 +436,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
420
436
|
color: PropTypes.any,
|
|
421
437
|
"aria-label": PropTypes.string,
|
|
422
438
|
"aria-labelledby": PropTypes.string,
|
|
423
|
-
isDisabled: PropTypes.bool,
|
|
424
439
|
size: PropTypes.any,
|
|
425
440
|
iconSize: PropTypes.any,
|
|
426
441
|
isSelected: PropTypes.bool,
|
|
@@ -429,6 +444,8 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
429
444
|
className: PropTypes.string,
|
|
430
445
|
"data-test-subj": PropTypes.string,
|
|
431
446
|
css: PropTypes.any,
|
|
447
|
+
isDisabled: PropTypes.bool,
|
|
448
|
+
hasAriaDisabled: PropTypes.bool,
|
|
432
449
|
buttonRef: PropTypes.any
|
|
433
450
|
}),
|
|
434
451
|
onClick: PropTypes.func,
|
|
@@ -463,7 +480,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
463
480
|
color: PropTypes.any,
|
|
464
481
|
"aria-label": PropTypes.string,
|
|
465
482
|
"aria-labelledby": PropTypes.string,
|
|
466
|
-
isDisabled: PropTypes.bool,
|
|
467
483
|
size: PropTypes.any,
|
|
468
484
|
iconSize: PropTypes.any,
|
|
469
485
|
isSelected: PropTypes.bool,
|
|
@@ -472,6 +488,8 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
472
488
|
className: PropTypes.string,
|
|
473
489
|
"data-test-subj": PropTypes.string,
|
|
474
490
|
css: PropTypes.any,
|
|
491
|
+
isDisabled: PropTypes.bool,
|
|
492
|
+
hasAriaDisabled: PropTypes.bool,
|
|
475
493
|
buttonRef: PropTypes.any
|
|
476
494
|
}),
|
|
477
495
|
onClick: PropTypes.func,
|
|
@@ -506,7 +524,6 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
506
524
|
color: PropTypes.any,
|
|
507
525
|
"aria-label": PropTypes.string,
|
|
508
526
|
"aria-labelledby": PropTypes.string,
|
|
509
|
-
isDisabled: PropTypes.bool,
|
|
510
527
|
size: PropTypes.any,
|
|
511
528
|
iconSize: PropTypes.any,
|
|
512
529
|
isSelected: PropTypes.bool,
|
|
@@ -515,6 +532,8 @@ EuiDataGridHeaderCell.propTypes = {
|
|
|
515
532
|
className: PropTypes.string,
|
|
516
533
|
"data-test-subj": PropTypes.string,
|
|
517
534
|
css: PropTypes.any,
|
|
535
|
+
isDisabled: PropTypes.bool,
|
|
536
|
+
hasAriaDisabled: PropTypes.bool,
|
|
518
537
|
buttonRef: PropTypes.any
|
|
519
538
|
}),
|
|
520
539
|
onClick: PropTypes.func,
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { euiCanAnimate, euiTextTruncate, logicalCSS, logicalTextAlignCSS } from '../../../../global_styling';
|
|
11
11
|
import { euiDataGridCellOutlineSelectors } from '../cell/data_grid_cell.styles';
|
|
12
|
-
|
|
13
12
|
/**
|
|
14
13
|
* Styles only applied to data header cell content, not control header cells
|
|
15
14
|
*/
|
|
@@ -17,11 +16,18 @@ export var euiDataGridHeaderCellStyles = function euiDataGridHeaderCellStyles(eu
|
|
|
17
16
|
var euiTheme = euiThemeContext.euiTheme;
|
|
18
17
|
var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors('.euiDataGridHeaderCell'),
|
|
19
18
|
header = _euiDataGridCellOutli.header;
|
|
19
|
+
var hideAnimation = function hideAnimation(margin, translateX) {
|
|
20
|
+
return "\n ".concat(header.hideActions, " & {\n ").concat(logicalCSS('margin-left', margin), "\n transform: translateX(").concat(translateX, ") scale(0.01);\n opacity: 0;\n }\n ");
|
|
21
|
+
};
|
|
20
22
|
return {
|
|
21
23
|
euiDataGridHeaderCell__content: /*#__PURE__*/css("flex-grow:1;", euiTextTruncate(), ";;label:euiDataGridHeaderCell__content;"),
|
|
22
24
|
// Numeric and currency schemas are aligned to the right
|
|
23
25
|
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;"),
|
|
24
26
|
euiDataGridHeaderCell__popover: /*#__PURE__*/css(logicalCSS('margin-left', 'auto'), "line-height:0;;label:euiDataGridHeaderCell__popover;"),
|
|
25
|
-
euiDataGridHeaderCell__actions:
|
|
27
|
+
euiDataGridHeaderCell__actions: {
|
|
28
|
+
action: /*#__PURE__*/css("overflow:hidden;display:flex;max-inline-size:24px;", euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ease-in,opacity ", euiTheme.animation.slow, " ease-in,margin-left ", euiTheme.animation.fast, " ease-in;animation:none!important;};label:action;"),
|
|
29
|
+
start: /*#__PURE__*/css(hideAnimation("-".concat(euiTheme.size.m), '0%'), ";;label:start;"),
|
|
30
|
+
end: /*#__PURE__*/css(hideAnimation("-".concat(euiTheme.size.l), '50%'), ";;label:end;")
|
|
31
|
+
}
|
|
26
32
|
};
|
|
27
33
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["id", "index", "isLastColumn", "width", "className", "children", "hasColumnActions", "isDragging", "onKeyDown", "aria-label"];
|
|
1
|
+
var _excluded = ["id", "index", "isLastColumn", "width", "className", "children", "hasColumnActions", "isDragging", "onKeyDown", "aria-label", "aria-labelledby"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -41,6 +41,7 @@ export var EuiDataGridHeaderCellWrapper = function EuiDataGridHeaderCellWrapper(
|
|
|
41
41
|
isDragging = _ref.isDragging,
|
|
42
42
|
_onKeyDown = _ref.onKeyDown,
|
|
43
43
|
ariaLabel = _ref['aria-label'],
|
|
44
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
44
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
46
|
var classes = classnames('euiDataGridHeaderCell', className);
|
|
46
47
|
var styles = useEuiMemoizedStyles(euiDataGridHeaderCellWrapperStyles);
|
|
@@ -106,7 +107,8 @@ export var EuiDataGridHeaderCellWrapper = function EuiDataGridHeaderCellWrapper(
|
|
|
106
107
|
style: width != null ? {
|
|
107
108
|
width: "".concat(width, "px")
|
|
108
109
|
} : {},
|
|
109
|
-
"aria-label": renderFocusTrap ? ariaLabel : undefined
|
|
110
|
+
"aria-label": renderFocusTrap ? ariaLabel : undefined,
|
|
111
|
+
"aria-labelledby": renderFocusTrap ? ariaLabelledby : undefined
|
|
110
112
|
}, rest), ___EmotionJSX(HandleInteractiveChildren, {
|
|
111
113
|
cellEl: isDragging ? null : headerEl,
|
|
112
114
|
renderFocusTrap: isDragging ? false : renderFocusTrap,
|
|
@@ -122,6 +124,7 @@ EuiDataGridHeaderCellWrapper.propTypes = {
|
|
|
122
124
|
width: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf([null])]),
|
|
123
125
|
className: PropTypes.string,
|
|
124
126
|
"aria-label": PropTypes.any,
|
|
127
|
+
"aria-labelledby": PropTypes.any,
|
|
125
128
|
hasColumnActions: PropTypes.bool,
|
|
126
129
|
isDragging: PropTypes.bool,
|
|
127
130
|
onKeyDown: PropTypes.any
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
1
2
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
4
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
4
5
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
5
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
6
6
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
7
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -43,31 +43,48 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
43
43
|
var id = _ref.id;
|
|
44
44
|
return id;
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
// remove duplicate columns to ensure unique columns
|
|
47
|
+
var availableColumnIdsSet = new Set(availableColumnIds);
|
|
48
|
+
if (process.env.NODE_ENV === 'development') {
|
|
49
|
+
if (availableColumnIds.length > availableColumnIdsSet.size) {
|
|
50
|
+
var duplicateIds = [];
|
|
51
|
+
var _iterator = _createForOfIteratorHelper(availableColumnIds),
|
|
52
|
+
_step;
|
|
53
|
+
try {
|
|
54
|
+
var _loop = function _loop() {
|
|
55
|
+
var id = _step.value;
|
|
56
|
+
if (!duplicateIds.includes(id) && availableColumnIds.filter(function (_id) {
|
|
57
|
+
return _id === id;
|
|
58
|
+
}).length > 1) {
|
|
59
|
+
duplicateIds.push(id);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
63
|
+
_loop();
|
|
64
|
+
}
|
|
65
|
+
} catch (err) {
|
|
66
|
+
_iterator.e(err);
|
|
67
|
+
} finally {
|
|
68
|
+
_iterator.f();
|
|
69
|
+
}
|
|
70
|
+
console.warn("\u26A0\uFE0F EuiDataGrid: Duplicate column IDs detected and removed: ".concat(duplicateIds.join(', '), "."), '\n Column IDs must be unique. Only the first occurrence of each duplicate will be used.');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
48
73
|
var validVisibleColumns = visibleColumns.filter(function (id) {
|
|
49
|
-
return
|
|
74
|
+
return availableColumnIdsSet.has(id);
|
|
50
75
|
});
|
|
51
76
|
var visibleSet = new Set(validVisibleColumns);
|
|
52
77
|
var result = [];
|
|
53
78
|
var visibleIndex = 0;
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var columnId = _step.value;
|
|
59
|
-
if (visibleSet.has(columnId)) {
|
|
60
|
-
// Replace with next visible column in order
|
|
79
|
+
for (var _i = 0, _arr = _toConsumableArray(availableColumnIdsSet); _i < _arr.length; _i++) {
|
|
80
|
+
var columnId = _arr[_i];
|
|
81
|
+
if (visibleSet.has(columnId)) {
|
|
82
|
+
if (visibleIndex < validVisibleColumns.length) {
|
|
61
83
|
result.push(validVisibleColumns[visibleIndex++]);
|
|
62
|
-
} else {
|
|
63
|
-
// Keep hidden column in original position
|
|
64
|
-
result.push(columnId);
|
|
65
84
|
}
|
|
85
|
+
} else {
|
|
86
|
+
result.push(columnId);
|
|
66
87
|
}
|
|
67
|
-
} catch (err) {
|
|
68
|
-
_iterator.e(err);
|
|
69
|
-
} finally {
|
|
70
|
-
_iterator.f();
|
|
71
88
|
}
|
|
72
89
|
return result;
|
|
73
90
|
// doesn't depend on visibleColumns on purpose to keep it an initial state
|
|
@@ -132,7 +149,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
132
149
|
anchorPosition: "downLeft",
|
|
133
150
|
panelPaddingSize: "none",
|
|
134
151
|
button: ___EmotionJSX(EuiDataGridToolbarControl, {
|
|
135
|
-
badgeContent: numberOfHiddenFields > 0 ? "".concat(orderedVisibleColumns.length, "/").concat(
|
|
152
|
+
badgeContent: numberOfHiddenFields > 0 ? "".concat(orderedVisibleColumns.length, "/").concat(sortedColumns.length) : sortedColumns.length,
|
|
136
153
|
iconType: "tableDensityNormal",
|
|
137
154
|
"data-test-subj": "dataGridColumnSelectorButton",
|
|
138
155
|
onClick: function onClick() {
|