@elastic/eui 113.3.0 → 114.1.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/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/button/split_button/split_button.js +13 -0
- package/es/components/button/split_button/split_button_actions.js +15 -0
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav.js +6 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/color_picker/color_picker.js +31 -8
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/controls/column_sorting.js +7 -7
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/datagrid/utils/scrolling.js +39 -10
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/_flyout_overlay.js +34 -4
- package/es/components/flyout/flyout.component.js +13 -9
- package/es/components/flyout/flyout.js +10 -2
- package/es/components/flyout/flyout.styles.js +2 -2
- package/es/components/flyout/flyout_menu.js +4 -3
- package/es/components/flyout/flyout_resizable.js +6 -1
- package/es/components/flyout/manager/actions.js +5 -2
- package/es/components/flyout/manager/activity_stage.js +45 -43
- package/es/components/flyout/manager/flyout_child.js +2 -1
- package/es/components/flyout/manager/flyout_managed.js +36 -18
- package/es/components/flyout/manager/flyout_managed.styles.js +4 -16
- package/es/components/flyout/manager/reducer.js +116 -57
- package/es/components/flyout/manager/store.js +13 -6
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/transition_bottom_in.js +37 -0
- package/es/components/icon/assets/transition_bottom_out.js +37 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +6 -0
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
- package/es/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +172 -0
- package/es/components/overlay_mask/overlay_mask.js +10 -3
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/search_bar/filters/field_value_toggle_filter.js +42 -99
- package/es/components/search_bar/search_filters.js +18 -46
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/table/mobile/table_header_mobile.js +1 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/table/utils.js +29 -9
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tree_view/tree_view_item.styles.js +1 -1
- package/es/services/hooks/index.js +8 -8
- package/es/services/hooks/useIsPointerDown.js +6 -15
- package/es/services/index.js +1 -1
- package/eui.d.ts +130 -71
- package/i18ntokens.json +661 -643
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/button/split_button/split_button.js +13 -0
- package/lib/components/button/split_button/split_button_actions.js +15 -0
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav.js +6 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/color_picker/color_picker.js +30 -7
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/controls/column_sorting.js +7 -7
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/datagrid/utils/scrolling.js +37 -8
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/_flyout_overlay.js +33 -3
- package/lib/components/flyout/flyout.component.js +13 -9
- package/lib/components/flyout/flyout.js +10 -2
- package/lib/components/flyout/flyout.styles.js +2 -2
- package/lib/components/flyout/flyout_menu.js +4 -3
- package/lib/components/flyout/flyout_resizable.js +6 -1
- package/lib/components/flyout/manager/actions.js +5 -2
- package/lib/components/flyout/manager/activity_stage.js +45 -43
- package/lib/components/flyout/manager/flyout_child.js +2 -1
- package/lib/components/flyout/manager/flyout_managed.js +46 -31
- package/lib/components/flyout/manager/flyout_managed.styles.js +3 -15
- package/lib/components/flyout/manager/reducer.js +116 -57
- package/lib/components/flyout/manager/store.js +13 -6
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/transition_bottom_in.js +44 -0
- package/lib/components/icon/assets/transition_bottom_out.js +44 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +10 -0
- package/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
- package/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
- package/lib/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
- package/lib/components/overlay_mask/overlay_mask.js +10 -3
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/search_bar/filters/field_value_toggle_filter.js +44 -101
- package/lib/components/search_bar/search_filters.js +20 -45
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/table/mobile/table_header_mobile.js +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/table/utils.js +30 -10
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/components/tree_view/tree_view_item.styles.js +1 -1
- package/lib/services/hooks/index.js +60 -91
- package/lib/services/hooks/useIsPointerDown.js +7 -14
- package/lib/services/index.js +70 -11
- package/optimize/es/components/color_picker/color_picker.js +31 -8
- package/optimize/es/components/datagrid/utils/scrolling.js +39 -10
- package/optimize/es/components/flyout/_flyout_overlay.js +34 -4
- package/optimize/es/components/flyout/flyout.component.js +13 -9
- package/optimize/es/components/flyout/flyout.js +4 -1
- package/optimize/es/components/flyout/flyout.styles.js +2 -2
- package/optimize/es/components/flyout/flyout_menu.js +2 -1
- package/optimize/es/components/flyout/manager/actions.js +5 -2
- package/optimize/es/components/flyout/manager/activity_stage.js +45 -43
- package/optimize/es/components/flyout/manager/flyout_managed.js +33 -16
- package/optimize/es/components/flyout/manager/flyout_managed.styles.js +4 -16
- package/optimize/es/components/flyout/manager/reducer.js +116 -57
- package/optimize/es/components/flyout/manager/store.js +13 -6
- package/optimize/es/components/icon/assets/transition_bottom_in.js +36 -0
- package/optimize/es/components/icon/assets/transition_bottom_out.js +36 -0
- package/optimize/es/components/icon/icon_map.js +6 -0
- package/optimize/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
- package/optimize/es/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +172 -0
- package/optimize/es/components/overlay_mask/overlay_mask.js +4 -2
- package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +43 -66
- package/optimize/es/components/search_bar/search_filters.js +18 -40
- package/optimize/es/components/table/mobile/table_header_mobile.js +1 -1
- package/optimize/es/components/table/utils.js +29 -9
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -1
- package/optimize/es/services/hooks/index.js +8 -8
- package/optimize/es/services/hooks/useIsPointerDown.js +6 -10
- package/optimize/es/services/index.js +1 -1
- package/optimize/lib/components/color_picker/color_picker.js +30 -7
- package/optimize/lib/components/datagrid/utils/scrolling.js +37 -8
- package/optimize/lib/components/flyout/_flyout_overlay.js +33 -3
- package/optimize/lib/components/flyout/flyout.component.js +13 -9
- package/optimize/lib/components/flyout/flyout.js +4 -1
- package/optimize/lib/components/flyout/flyout.styles.js +2 -2
- package/optimize/lib/components/flyout/flyout_menu.js +2 -1
- package/optimize/lib/components/flyout/manager/actions.js +5 -2
- package/optimize/lib/components/flyout/manager/activity_stage.js +45 -43
- package/optimize/lib/components/flyout/manager/flyout_managed.js +38 -24
- package/optimize/lib/components/flyout/manager/flyout_managed.styles.js +3 -16
- package/optimize/lib/components/flyout/manager/reducer.js +116 -57
- package/optimize/lib/components/flyout/manager/store.js +13 -6
- package/optimize/lib/components/icon/assets/transition_bottom_in.js +44 -0
- package/optimize/lib/components/icon/assets/transition_bottom_out.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +10 -0
- package/optimize/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
- package/optimize/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
- package/optimize/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
- package/optimize/lib/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
- package/optimize/lib/components/overlay_mask/overlay_mask.js +4 -2
- package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +45 -69
- package/optimize/lib/components/search_bar/search_filters.js +19 -40
- package/optimize/lib/components/table/mobile/table_header_mobile.js +1 -1
- package/optimize/lib/components/table/utils.js +30 -10
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -1
- package/optimize/lib/services/hooks/index.js +60 -91
- package/optimize/lib/services/hooks/useIsPointerDown.js +5 -10
- package/optimize/lib/services/index.js +70 -11
- package/package.json +5 -4
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/button/split_button/split_button.js +13 -0
- package/test-env/components/button/split_button/split_button_actions.js +15 -0
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav.js +6 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/color_picker/color_picker.js +30 -7
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting.js +7 -7
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/datagrid/utils/scrolling.js +37 -8
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/_flyout_overlay.js +33 -3
- package/test-env/components/flyout/flyout.component.js +13 -9
- package/test-env/components/flyout/flyout.styles.js +2 -2
- package/test-env/components/flyout/flyout_menu.js +4 -3
- package/test-env/components/flyout/flyout_resizable.js +6 -1
- package/test-env/components/flyout/manager/actions.js +5 -2
- package/test-env/components/flyout/manager/activity_stage.js +45 -43
- package/test-env/components/flyout/manager/flyout_child.js +2 -1
- package/test-env/components/flyout/manager/flyout_managed.js +40 -25
- package/test-env/components/flyout/manager/flyout_managed.styles.js +3 -16
- package/test-env/components/flyout/manager/reducer.js +116 -57
- package/test-env/components/flyout/manager/store.js +13 -6
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/transition_bottom_in.js +44 -0
- package/test-env/components/icon/assets/transition_bottom_out.js +44 -0
- package/test-env/components/icon/icon_map.js +10 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
- package/test-env/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
- package/test-env/components/overlay_mask/overlay_mask.js +10 -3
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/search_bar/filters/field_value_toggle_filter.js +44 -96
- package/test-env/components/search_bar/search_filters.js +19 -39
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/table/mobile/table_header_mobile.js +1 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/table/utils.js +30 -10
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -1
- package/test-env/services/hooks/index.js +60 -91
- package/test-env/services/hooks/useIsPointerDown.js +5 -10
- package/test-env/services/index.js +70 -11
|
@@ -69,9 +69,9 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
|
69
69
|
push: {
|
|
70
70
|
push: /*#__PURE__*/css("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
|
|
71
71
|
right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
|
|
72
|
-
left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
|
|
73
|
-
noAnimation: _ref
|
|
72
|
+
left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
|
|
74
73
|
},
|
|
74
|
+
noAnimation: _ref,
|
|
75
75
|
// Padding
|
|
76
76
|
paddingSizes: {
|
|
77
77
|
none: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
var _excluded = ["className", "title", "titleId", "hideTitle", "hideCloseButton", "historyItems", "showBackButton", "backButtonProps", "customActions"];
|
|
4
|
+
var _excluded = ["className", "title", "titleId", "hideTitle", "hideCloseButton", "historyItems", "showBackButton", "backButtonProps", "customActions", "iconType"];
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
7
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -107,6 +107,7 @@ export var EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
|
|
|
107
107
|
showBackButton = _ref2.showBackButton,
|
|
108
108
|
backButtonProps = _ref2.backButtonProps,
|
|
109
109
|
customActions = _ref2.customActions,
|
|
110
|
+
_iconType = _ref2.iconType,
|
|
110
111
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
111
112
|
var _useContext = useContext(EuiFlyoutMenuContext),
|
|
112
113
|
onClose = _useContext.onClose;
|
|
@@ -69,19 +69,22 @@ export var ACTION_CLOSE_UNMANAGED_FLYOUT = "".concat(PREFIX, "/closeUnmanagedFly
|
|
|
69
69
|
* - `title` is used for the flyout menu.
|
|
70
70
|
* - `level` determines whether the flyout is `main` or `child`.
|
|
71
71
|
* - Optional `size` is the named EUI size (e.g. `s`, `m`, `l`).
|
|
72
|
+
* - Optional `historyKey` (Symbol) scopes history; only flyouts with the same reference share Back/history. Omit for a unique group per session.
|
|
72
73
|
* - Optional `iconType` is shown next to the session title in the history menu.
|
|
73
74
|
*/
|
|
74
75
|
export var addFlyout = function addFlyout(flyoutId, title) {
|
|
75
76
|
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LEVEL_MAIN;
|
|
76
77
|
var size = arguments.length > 3 ? arguments[3] : undefined;
|
|
77
|
-
var
|
|
78
|
-
var
|
|
78
|
+
var historyKey = arguments.length > 4 ? arguments[4] : undefined;
|
|
79
|
+
var iconType = arguments.length > 5 ? arguments[5] : undefined;
|
|
80
|
+
var minWidth = arguments.length > 6 ? arguments[6] : undefined;
|
|
79
81
|
return {
|
|
80
82
|
type: ACTION_ADD,
|
|
81
83
|
flyoutId: flyoutId,
|
|
82
84
|
title: title,
|
|
83
85
|
level: level,
|
|
84
86
|
size: size,
|
|
87
|
+
historyKey: historyKey,
|
|
85
88
|
iconType: iconType,
|
|
86
89
|
minWidth: minWidth
|
|
87
90
|
};
|
|
@@ -10,6 +10,24 @@ import { useCallback, useEffect, useRef } from 'react';
|
|
|
10
10
|
import { LAYOUT_MODE_SIDE_BY_SIDE, LAYOUT_MODE_STACKED, LEVEL_MAIN, STAGE_ACTIVE, STAGE_BACKGROUNDED, STAGE_BACKGROUNDING, STAGE_CLOSING, STAGE_INACTIVE, STAGE_OPENING, STAGE_RETURNING } from './const';
|
|
11
11
|
import { setActivityStage } from './actions';
|
|
12
12
|
import { useFlyoutManager } from './provider';
|
|
13
|
+
/**
|
|
14
|
+
* Returns the final stage after an animation completes.
|
|
15
|
+
* OPENING/RETURNING -> ACTIVE; CLOSING -> INACTIVE; BACKGROUNDING -> BACKGROUNDED.
|
|
16
|
+
*/
|
|
17
|
+
var getNextStage = function getNextStage(stage) {
|
|
18
|
+
switch (stage) {
|
|
19
|
+
case STAGE_OPENING:
|
|
20
|
+
case STAGE_RETURNING:
|
|
21
|
+
return STAGE_ACTIVE;
|
|
22
|
+
case STAGE_CLOSING:
|
|
23
|
+
return STAGE_INACTIVE;
|
|
24
|
+
case STAGE_BACKGROUNDING:
|
|
25
|
+
return STAGE_BACKGROUNDED;
|
|
26
|
+
default:
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
13
31
|
/**
|
|
14
32
|
* Encapsulates all activity-stage transitions and animation-driven updates
|
|
15
33
|
* for managed flyouts.
|
|
@@ -21,7 +39,9 @@ import { useFlyoutManager } from './provider';
|
|
|
21
39
|
export var useFlyoutActivityStage = function useFlyoutActivityStage(_ref) {
|
|
22
40
|
var _sessions, _state$sessions$find, _state$layoutMode, _state$flyouts$find;
|
|
23
41
|
var flyoutId = _ref.flyoutId,
|
|
24
|
-
level = _ref.level
|
|
42
|
+
level = _ref.level,
|
|
43
|
+
_ref$shouldAnimate = _ref.shouldAnimate,
|
|
44
|
+
shouldAnimate = _ref$shouldAnimate === void 0 ? false : _ref$shouldAnimate;
|
|
25
45
|
var ctx = useFlyoutManager();
|
|
26
46
|
var state = ctx === null || ctx === void 0 ? void 0 : ctx.state;
|
|
27
47
|
|
|
@@ -41,64 +61,46 @@ export var useFlyoutActivityStage = function useFlyoutActivityStage(_ref) {
|
|
|
41
61
|
if (stageRef.current !== stage) {
|
|
42
62
|
stageRef.current = stage;
|
|
43
63
|
}
|
|
64
|
+
var transitionTo = useCallback(function (nextStage) {
|
|
65
|
+
var _ctx$dispatch;
|
|
66
|
+
ctx === null || ctx === void 0 || (_ctx$dispatch = ctx.dispatch) === null || _ctx$dispatch === void 0 || _ctx$dispatch.call(ctx, setActivityStage(flyoutId, nextStage));
|
|
67
|
+
stageRef.current = nextStage;
|
|
68
|
+
}, [ctx, flyoutId]);
|
|
44
69
|
|
|
45
70
|
/**
|
|
46
|
-
* 1. ACTIVE -> CLOSING when no longer the active flyout.
|
|
47
|
-
* 2. INACTIVE -> RETURNING when it becomes active again
|
|
48
|
-
* 3. (Main
|
|
49
|
-
* 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (
|
|
50
|
-
*
|
|
51
|
-
* Any stages that depend on animation end (OPENING, RETURNING, CLOSING, BACKGROUNDING) are finalized in `onAnimationEnd`.
|
|
71
|
+
* 1. ACTIVE -> CLOSING (or INACTIVE when !shouldAnimate) when no longer the active flyout.
|
|
72
|
+
* 2. INACTIVE -> RETURNING (or ACTIVE when !shouldAnimate) when it becomes active again.
|
|
73
|
+
* 3. (Main only) ACTIVE + stacked + has child -> BACKGROUNDING (or BACKGROUNDED when !shouldAnimate).
|
|
74
|
+
* 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (or ACTIVE when !shouldAnimate).
|
|
52
75
|
*/
|
|
53
76
|
useEffect(function () {
|
|
54
77
|
var s = stageRef.current;
|
|
55
78
|
var next = null;
|
|
56
|
-
if (s === STAGE_ACTIVE && !isActive)
|
|
57
|
-
next =
|
|
58
|
-
} else if (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
79
|
+
if (s === STAGE_ACTIVE && !isActive) {
|
|
80
|
+
next = shouldAnimate ? STAGE_CLOSING : STAGE_INACTIVE;
|
|
81
|
+
} else if (s === STAGE_INACTIVE && isActive) {
|
|
82
|
+
next = shouldAnimate ? STAGE_RETURNING : STAGE_ACTIVE;
|
|
83
|
+
} else if (level === LEVEL_MAIN && isActive && s === STAGE_ACTIVE && hasChild && layoutMode === LAYOUT_MODE_STACKED) {
|
|
84
|
+
next = shouldAnimate ? STAGE_BACKGROUNDING : STAGE_BACKGROUNDED;
|
|
85
|
+
} else if (level === LEVEL_MAIN && (s === STAGE_BACKGROUNDED || s === STAGE_BACKGROUNDING) && (!hasChild || layoutMode === LAYOUT_MODE_SIDE_BY_SIDE)) {
|
|
86
|
+
next = shouldAnimate ? STAGE_RETURNING : STAGE_ACTIVE;
|
|
63
87
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Get the stage to transition to for given current stage.
|
|
68
|
-
* Returns `null` if stage should remain unchanged.
|
|
69
|
-
*
|
|
70
|
-
* Stage transitions:
|
|
71
|
-
* - OPENING / RETURNING -> ACTIVE
|
|
72
|
-
* - CLOSING -> INACTIVE
|
|
73
|
-
* - BACKGROUNDING -> BACKGROUNDED
|
|
74
|
-
*/
|
|
75
|
-
var getNextStage = function getNextStage(stage) {
|
|
76
|
-
switch (stage) {
|
|
77
|
-
case STAGE_OPENING:
|
|
78
|
-
case STAGE_RETURNING:
|
|
79
|
-
return STAGE_ACTIVE;
|
|
80
|
-
case STAGE_CLOSING:
|
|
81
|
-
return STAGE_INACTIVE;
|
|
82
|
-
case STAGE_BACKGROUNDING:
|
|
83
|
-
return STAGE_BACKGROUNDED;
|
|
88
|
+
if (next && next !== s) {
|
|
89
|
+
transitionTo(next);
|
|
84
90
|
}
|
|
85
|
-
|
|
86
|
-
};
|
|
91
|
+
}, [isActive, hasChild, layoutMode, level, shouldAnimate, transitionTo, stage]);
|
|
87
92
|
|
|
88
93
|
/**
|
|
89
|
-
* onAnimationEnd
|
|
90
|
-
*
|
|
91
|
-
* in EuiFlyoutManagerContext.
|
|
94
|
+
* onAnimationEnd: browser signal when a CSS animation completes.
|
|
95
|
+
* Calls transitionTo to move to the final stage (e.g. CLOSING -> INACTIVE).
|
|
92
96
|
*/
|
|
93
97
|
var onAnimationEnd = useCallback(function () {
|
|
94
98
|
var currentStage = stageRef.current;
|
|
95
99
|
var nextStage = getNextStage(currentStage);
|
|
96
100
|
if (nextStage && nextStage !== currentStage) {
|
|
97
|
-
|
|
98
|
-
ctx === null || ctx === void 0 || (_ctx$dispatch2 = ctx.dispatch) === null || _ctx$dispatch2 === void 0 || _ctx$dispatch2.call(ctx, setActivityStage(flyoutId, nextStage));
|
|
99
|
-
stageRef.current = nextStage;
|
|
101
|
+
transitionTo(nextStage);
|
|
100
102
|
}
|
|
101
|
-
}, [
|
|
103
|
+
}, [transitionTo]);
|
|
102
104
|
return {
|
|
103
105
|
activityStage: stage,
|
|
104
106
|
onAnimationEnd: onAnimationEnd
|
|
@@ -2,9 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "css", "flyoutMenuProps"];
|
|
5
|
+
var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "historyKey", "css", "flyoutMenuProps"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
9
|
/*
|
|
9
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -14,6 +15,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
import React, { useEffect, useLayoutEffect, useMemo, useRef, useState, forwardRef } from 'react';
|
|
18
|
+
import { css } from '@emotion/react';
|
|
17
19
|
import { flushSync } from 'react-dom';
|
|
18
20
|
import { useCombinedRefs, useEuiMemoizedStyles } from '../../../services';
|
|
19
21
|
import { useEuiI18n } from '../../i18n';
|
|
@@ -50,17 +52,26 @@ var useFlyoutManager = function useFlyoutManager() {
|
|
|
50
52
|
* - width tracking for responsive layouts
|
|
51
53
|
* - lifecycle stage transitions and data attributes for styling
|
|
52
54
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
56
|
+
name: "1wrw3pf-EuiManagedFlyout",
|
|
57
|
+
styles: "animation-duration:0s!important;label:EuiManagedFlyout;"
|
|
58
|
+
} : {
|
|
59
|
+
name: "1wrw3pf-EuiManagedFlyout",
|
|
60
|
+
styles: "animation-duration:0s!important;label:EuiManagedFlyout;",
|
|
61
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
62
|
+
};
|
|
63
|
+
export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
64
|
+
var _managerSessions, _managerState$layoutM, _managerState$flyouts, _managerState$session, _managerState$flyouts2, _managerSessions$leng, _session$childHistory, _session$childHistory2;
|
|
65
|
+
var id = _ref2.id,
|
|
66
|
+
onCloseProp = _ref2.onClose,
|
|
67
|
+
onActiveProp = _ref2.onActive,
|
|
68
|
+
level = _ref2.level,
|
|
69
|
+
sizeProp = _ref2.size,
|
|
70
|
+
minWidth = _ref2.minWidth,
|
|
71
|
+
historyKey = _ref2.historyKey,
|
|
72
|
+
customCss = _ref2.css,
|
|
73
|
+
_flyoutMenuProps = _ref2.flyoutMenuProps,
|
|
74
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
64
75
|
var flyoutId = useFlyoutId(id);
|
|
65
76
|
var _useState = useState(null),
|
|
66
77
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -96,6 +107,9 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
96
107
|
var parentSize = session !== null && session !== void 0 && session.mainFlyoutId ? managerState === null || managerState === void 0 || (_managerState$flyouts2 = managerState.flyouts.find(function (f) {
|
|
97
108
|
return f.flyoutId === session.mainFlyoutId;
|
|
98
109
|
})) === null || _managerState$flyouts2 === void 0 ? void 0 : _managerState$flyouts2.size : undefined;
|
|
110
|
+
|
|
111
|
+
// Animate opening only for the first main flyout (sole session) or first child (no prior child in session).
|
|
112
|
+
var shouldAnimateOpening = level === LEVEL_MAIN ? ((_managerSessions$leng = managerSessions === null || managerSessions === void 0 ? void 0 : managerSessions.length) !== null && _managerSessions$leng !== void 0 ? _managerSessions$leng : 0) <= 1 && (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId : ((_session$childHistory = session === null || session === void 0 || (_session$childHistory2 = session.childHistory) === null || _session$childHistory2 === void 0 ? void 0 : _session$childHistory2.length) !== null && _session$childHistory !== void 0 ? _session$childHistory : 0) === 0;
|
|
99
113
|
var styles = useEuiMemoizedStyles(euiManagedFlyoutStyles);
|
|
100
114
|
|
|
101
115
|
// Set default size based on level: main defaults to 'm', child defaults to 's'
|
|
@@ -156,7 +170,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
156
170
|
// Register with flyout manager context when open, remove when closed
|
|
157
171
|
// Using useLayoutEffect to run synchronously before DOM updates
|
|
158
172
|
useLayoutEffect(function () {
|
|
159
|
-
addFlyout(flyoutId, title, level, size, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
|
|
173
|
+
addFlyout(flyoutId, title, level, size, level === LEVEL_MAIN ? historyKey : undefined, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
|
|
160
174
|
return function () {
|
|
161
175
|
var currentStoreState = getFlyoutManagerStore().getState();
|
|
162
176
|
var stillInStore = currentStoreState.flyouts.some(function (f) {
|
|
@@ -172,7 +186,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
172
186
|
}
|
|
173
187
|
wasRegisteredRef.current = false;
|
|
174
188
|
};
|
|
175
|
-
}, [flyoutId, title, level, size, minWidth, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
|
|
189
|
+
}, [flyoutId, title, level, size, minWidth, historyKey, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
|
|
176
190
|
|
|
177
191
|
// Detect when flyout has been removed from manager state (e.g., via Back button)
|
|
178
192
|
// and trigger onClose callback to notify the parent component
|
|
@@ -232,7 +246,8 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
232
246
|
}, [flyoutId, level, isActive, width, setFlyoutWidth]);
|
|
233
247
|
var _useFlyoutActivitySta = useFlyoutActivityStage({
|
|
234
248
|
flyoutId: flyoutId,
|
|
235
|
-
level: level
|
|
249
|
+
level: level,
|
|
250
|
+
shouldAnimate: false
|
|
236
251
|
}),
|
|
237
252
|
activityStage = _useFlyoutActivitySta.activityStage,
|
|
238
253
|
onAnimationEnd = _useFlyoutActivitySta.onAnimationEnd;
|
|
@@ -263,7 +278,9 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
263
278
|
}, ___EmotionJSX(EuiFlyoutComponent, _extends({
|
|
264
279
|
id: flyoutId,
|
|
265
280
|
ref: combinedRef,
|
|
266
|
-
css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level),
|
|
281
|
+
css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level),
|
|
282
|
+
// Suppress EuiFlyout's built-in opening animation for non-initial flyouts.
|
|
283
|
+
!shouldAnimateOpening && _ref, ";label:EuiManagedFlyout;"]
|
|
267
284
|
}, _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty(_defineProperty({
|
|
268
285
|
onClose: onClose,
|
|
269
286
|
size: size,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
4
2
|
/*
|
|
5
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -9,7 +7,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
7
|
* Side Public License, v 1.
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
|
-
import { css
|
|
10
|
+
import { css } from '@emotion/react';
|
|
13
11
|
import { euiCanAnimate, logicalCSS } from '../../../global_styling';
|
|
14
12
|
import { LEVEL_MAIN, STAGE_ACTIVE, STAGE_BACKGROUNDED, STAGE_BACKGROUNDING, STAGE_CLOSING, STAGE_INACTIVE, STAGE_OPENING, STAGE_RETURNING } from './const';
|
|
15
13
|
import { DEFAULT_SIDE } from '../const';
|
|
@@ -32,16 +30,6 @@ export var euiManagedFlyoutStyles = function euiManagedFlyoutStyles(euiThemeCont
|
|
|
32
30
|
stage: function stage(activeStage) {
|
|
33
31
|
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_SIDE;
|
|
34
32
|
var level = arguments.length > 2 ? arguments[2] : undefined;
|
|
35
|
-
// Animation for moving flyout backwards in 3D space (z-axis) when inactive
|
|
36
|
-
var euiFlyoutSlideBack3D = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n transform: translateZ(0) translateX(0) scale(1);\n filter: blur(0px);\n opacity: 1;\n }\n to {\n transform: translateZ(-1500px) translateX(", ") scale(0.5);\n filter: blur(3px);\n opacity: 0.6;\n }\n "])), side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)');
|
|
37
|
-
|
|
38
|
-
// Animation for bringing flyout forward from 3D space when transitioning to active
|
|
39
|
-
var euiFlyoutSlideForward3D = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n from {\n transform: translateZ(-500px) translateX(", ") scale(0.85);\n filter: blur(3px);\n opacity: 0.6;\n }\n to {\n transform: translateZ(0) translateX(0) scale(1);\n filter: blur(0px);\n opacity: 1;\n }\n "])), side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)');
|
|
40
|
-
// When flyout is becoming inactive, animate backwards in 3D space
|
|
41
|
-
var inactiveTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:", euiFlyoutSlideBack3D, " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.resistance, " forwards;pointer-events:none;};label:inactiveTransition;");
|
|
42
|
-
|
|
43
|
-
// When flyout is becoming active from a backgrounded state, animate forward in 3D space
|
|
44
|
-
var returningTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:", euiFlyoutSlideForward3D, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, " forwards;};label:returningTransition;");
|
|
45
33
|
var noTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:none;opacity:1;};label:noTransition;");
|
|
46
34
|
var activeFlyout = /*#__PURE__*/css("z-index:", parseInt(euiTheme.levels.flyout) + 1, ";pointer-events:auto;;label:activeFlyout;");
|
|
47
35
|
var inactiveFlyout = /*#__PURE__*/css(side === 'left' ? logicalCSS('right', '100vw') : logicalCSS('left', '100vw'), " transform:translateX(", side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)', ");;label:inactiveFlyout;");
|
|
@@ -53,15 +41,15 @@ export var euiManagedFlyoutStyles = function euiManagedFlyoutStyles(euiThemeCont
|
|
|
53
41
|
case STAGE_ACTIVE:
|
|
54
42
|
return [activeFlyout, noTransition];
|
|
55
43
|
case STAGE_BACKGROUNDING:
|
|
56
|
-
return [
|
|
44
|
+
return [inactiveFlyout, noTransition];
|
|
57
45
|
case STAGE_BACKGROUNDED:
|
|
58
46
|
return [inactiveFlyout, noTransition];
|
|
59
47
|
case STAGE_RETURNING:
|
|
60
|
-
return [activeFlyout,
|
|
48
|
+
return [activeFlyout, noTransition];
|
|
61
49
|
case STAGE_INACTIVE:
|
|
62
50
|
return [inactiveFlyout, noTransition];
|
|
63
51
|
case STAGE_CLOSING:
|
|
64
|
-
return [
|
|
52
|
+
return [inactiveFlyout, noTransition];
|
|
65
53
|
}
|
|
66
54
|
},
|
|
67
55
|
managedFlyout: _ref
|
|
@@ -26,6 +26,28 @@ export var initialState = {
|
|
|
26
26
|
currentZIndex: 0,
|
|
27
27
|
unmanagedFlyouts: []
|
|
28
28
|
};
|
|
29
|
+
var addSessionFlyoutsToRemove = function addSessionFlyoutsToRemove(session, flyoutsToRemove) {
|
|
30
|
+
var _session$childHistory;
|
|
31
|
+
flyoutsToRemove.add(session.mainFlyoutId);
|
|
32
|
+
if (session.childFlyoutId) {
|
|
33
|
+
flyoutsToRemove.add(session.childFlyoutId);
|
|
34
|
+
}
|
|
35
|
+
((_session$childHistory = session.childHistory) !== null && _session$childHistory !== void 0 ? _session$childHistory : []).forEach(function (e) {
|
|
36
|
+
return flyoutsToRemove.add(e.flyoutId);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var moveHistoryGroupToTop = function moveHistoryGroupToTop(sessions, historyKey) {
|
|
40
|
+
var groupSessions = [];
|
|
41
|
+
var otherSessions = [];
|
|
42
|
+
sessions.forEach(function (session) {
|
|
43
|
+
if (session.historyKey === historyKey) {
|
|
44
|
+
groupSessions.push(session);
|
|
45
|
+
} else {
|
|
46
|
+
otherSessions.push(session);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return [].concat(otherSessions, groupSessions);
|
|
50
|
+
};
|
|
29
51
|
|
|
30
52
|
/**
|
|
31
53
|
* Reducer handling all flyout manager actions and state transitions.
|
|
@@ -74,6 +96,7 @@ export function flyoutManagerReducer() {
|
|
|
74
96
|
title = action.title,
|
|
75
97
|
level = action.level,
|
|
76
98
|
size = action.size,
|
|
99
|
+
historyKey = action.historyKey,
|
|
77
100
|
iconType = action.iconType,
|
|
78
101
|
minWidth = action.minWidth;
|
|
79
102
|
var isDuplicate = state.flyouts.some(function (f) {
|
|
@@ -100,7 +123,8 @@ export function flyoutManagerReducer() {
|
|
|
100
123
|
iconType: iconType,
|
|
101
124
|
childFlyoutId: null,
|
|
102
125
|
childHistory: [],
|
|
103
|
-
zIndex: state.currentZIndex
|
|
126
|
+
zIndex: state.currentZIndex,
|
|
127
|
+
historyKey: historyKey !== null && historyKey !== void 0 ? historyKey : Symbol()
|
|
104
128
|
};
|
|
105
129
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
106
130
|
sessions: [].concat(_toConsumableArray(state.sessions), [newSession]),
|
|
@@ -227,8 +251,8 @@ export function flyoutManagerReducer() {
|
|
|
227
251
|
});
|
|
228
252
|
}
|
|
229
253
|
var owningSessionIndex = state.sessions.findIndex(function (session) {
|
|
230
|
-
var _session$
|
|
231
|
-
return session.childFlyoutId === action.flyoutId || ((_session$
|
|
254
|
+
var _session$childHistory2;
|
|
255
|
+
return session.childFlyoutId === action.flyoutId || ((_session$childHistory2 = session.childHistory) !== null && _session$childHistory2 !== void 0 ? _session$childHistory2 : []).some(function (entry) {
|
|
232
256
|
return entry.flyoutId === action.flyoutId;
|
|
233
257
|
});
|
|
234
258
|
});
|
|
@@ -260,21 +284,37 @@ export function flyoutManagerReducer() {
|
|
|
260
284
|
});
|
|
261
285
|
}
|
|
262
286
|
|
|
263
|
-
// Unregister all flyouts.
|
|
287
|
+
// Unregister all flyouts (within the current history group only).
|
|
264
288
|
case ACTION_CLOSE_ALL:
|
|
265
289
|
{
|
|
266
290
|
if (state.sessions.length === 0) {
|
|
267
291
|
return state;
|
|
268
292
|
}
|
|
293
|
+
var _currentSessionIndex = state.sessions.length - 1;
|
|
294
|
+
var _currentSession = state.sessions[_currentSessionIndex];
|
|
295
|
+
var currentKey = _currentSession.historyKey;
|
|
269
296
|
|
|
270
|
-
//
|
|
297
|
+
// Remove all sessions that have the current historyKey (entire group)
|
|
298
|
+
var _newSessions = state.sessions.filter(function (s) {
|
|
299
|
+
return s.historyKey !== currentKey;
|
|
300
|
+
});
|
|
301
|
+
var _flyoutsToRemove = new Set();
|
|
302
|
+
state.sessions.forEach(function (session) {
|
|
303
|
+
if (session.historyKey === currentKey) {
|
|
304
|
+
addSessionFlyoutsToRemove(session, _flyoutsToRemove);
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
var _newFlyouts3 = state.flyouts.filter(function (f) {
|
|
308
|
+
return !_flyoutsToRemove.has(f.flyoutId);
|
|
309
|
+
});
|
|
271
310
|
var _newCurrentZIndex2 = state.currentZIndex;
|
|
272
|
-
if (state.unmanagedFlyouts.length === 0) {
|
|
311
|
+
if (_newSessions.length === 0 && state.unmanagedFlyouts.length === 0) {
|
|
273
312
|
_newCurrentZIndex2 = 0;
|
|
274
313
|
}
|
|
275
|
-
return _objectSpread(_objectSpread({},
|
|
276
|
-
|
|
277
|
-
|
|
314
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
315
|
+
sessions: _newSessions,
|
|
316
|
+
flyouts: _newFlyouts3,
|
|
317
|
+
currentZIndex: _newCurrentZIndex2
|
|
278
318
|
});
|
|
279
319
|
}
|
|
280
320
|
|
|
@@ -286,8 +326,8 @@ export function flyoutManagerReducer() {
|
|
|
286
326
|
return state;
|
|
287
327
|
}
|
|
288
328
|
var _updatedSessions2 = _toConsumableArray(state.sessions);
|
|
289
|
-
var
|
|
290
|
-
_updatedSessions2[
|
|
329
|
+
var _currentSessionIndex2 = _updatedSessions2.length - 1;
|
|
330
|
+
_updatedSessions2[_currentSessionIndex2] = _objectSpread(_objectSpread({}, _updatedSessions2[_currentSessionIndex2]), {}, {
|
|
291
331
|
childFlyoutId: action.flyoutId
|
|
292
332
|
});
|
|
293
333
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -333,51 +373,50 @@ export function flyoutManagerReducer() {
|
|
|
333
373
|
});
|
|
334
374
|
}
|
|
335
375
|
|
|
336
|
-
// Go back: pop child history when any, else pop current session
|
|
376
|
+
// Go back: pop child history when any, else pop current session (only within same historyKey).
|
|
337
377
|
case ACTION_GO_BACK:
|
|
338
378
|
{
|
|
339
|
-
var
|
|
379
|
+
var _currentSession2$chil;
|
|
340
380
|
if (state.sessions.length === 0) {
|
|
341
381
|
return state;
|
|
342
382
|
}
|
|
343
|
-
var
|
|
344
|
-
var
|
|
345
|
-
var _childHistory = (
|
|
383
|
+
var _currentSessionIndex3 = state.sessions.length - 1;
|
|
384
|
+
var _currentSession2 = state.sessions[_currentSessionIndex3];
|
|
385
|
+
var _childHistory = (_currentSession2$chil = _currentSession2.childHistory) !== null && _currentSession2$chil !== void 0 ? _currentSession2$chil : [];
|
|
346
386
|
if (_childHistory.length > 0) {
|
|
347
387
|
// Pop one child: set current child to the last entry in history, remove the current child flyout
|
|
348
388
|
var popped = _childHistory[_childHistory.length - 1];
|
|
349
389
|
var newChildHistory = _childHistory.slice(0, -1);
|
|
350
390
|
var _updatedSessions3 = _toConsumableArray(state.sessions);
|
|
351
|
-
_updatedSessions3[
|
|
391
|
+
_updatedSessions3[_currentSessionIndex3] = _objectSpread(_objectSpread({}, _currentSession2), {}, {
|
|
352
392
|
childHistory: newChildHistory,
|
|
353
393
|
childFlyoutId: popped.flyoutId,
|
|
354
394
|
childTitle: popped.title,
|
|
355
395
|
childIconType: popped.iconType
|
|
356
396
|
});
|
|
357
|
-
var
|
|
358
|
-
return f.flyoutId !==
|
|
397
|
+
var _newFlyouts4 = state.flyouts.filter(function (f) {
|
|
398
|
+
return f.flyoutId !== _currentSession2.childFlyoutId;
|
|
359
399
|
});
|
|
360
400
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
361
401
|
sessions: _updatedSessions3,
|
|
362
|
-
flyouts:
|
|
402
|
+
flyouts: _newFlyouts4
|
|
363
403
|
});
|
|
364
404
|
}
|
|
365
405
|
|
|
366
406
|
// No child history: pop current session (main + all its children)
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return _flyoutsToRemove.add(e.flyoutId);
|
|
407
|
+
var _flyoutsToRemove2 = new Set();
|
|
408
|
+
addSessionFlyoutsToRemove(_currentSession2, _flyoutsToRemove2);
|
|
409
|
+
var sessionsWithoutCurrent = state.sessions.slice(0, _currentSessionIndex3);
|
|
410
|
+
var hasRemainingInCurrentGroup = sessionsWithoutCurrent.some(function (s) {
|
|
411
|
+
return s.historyKey === _currentSession2.historyKey;
|
|
373
412
|
});
|
|
374
|
-
var
|
|
375
|
-
|
|
413
|
+
var _newSessions2 = hasRemainingInCurrentGroup ? moveHistoryGroupToTop(sessionsWithoutCurrent, _currentSession2.historyKey) : sessionsWithoutCurrent;
|
|
414
|
+
var _newFlyouts5 = state.flyouts.filter(function (f) {
|
|
415
|
+
return !_flyoutsToRemove2.has(f.flyoutId);
|
|
376
416
|
});
|
|
377
|
-
var _newSessions = state.sessions.slice(0, _currentSessionIndex2);
|
|
378
417
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
379
|
-
sessions:
|
|
380
|
-
flyouts:
|
|
418
|
+
sessions: _newSessions2,
|
|
419
|
+
flyouts: _newFlyouts5
|
|
381
420
|
});
|
|
382
421
|
}
|
|
383
422
|
|
|
@@ -386,11 +425,11 @@ export function flyoutManagerReducer() {
|
|
|
386
425
|
{
|
|
387
426
|
var _flyoutId3 = action.flyoutId,
|
|
388
427
|
_level = action.level;
|
|
389
|
-
var
|
|
428
|
+
var _currentSessionIndex4 = state.sessions.length - 1;
|
|
390
429
|
if (_level === LEVEL_CHILD && state.sessions.length > 0) {
|
|
391
|
-
var
|
|
392
|
-
var
|
|
393
|
-
var _childHistory2 = (
|
|
430
|
+
var _currentSession3$chil;
|
|
431
|
+
var _currentSession3 = state.sessions[_currentSessionIndex4];
|
|
432
|
+
var _childHistory2 = (_currentSession3$chil = _currentSession3.childHistory) !== null && _currentSession3$chil !== void 0 ? _currentSession3$chil : [];
|
|
394
433
|
var targetIndex = _childHistory2.findIndex(function (entry) {
|
|
395
434
|
return entry.flyoutId === _flyoutId3;
|
|
396
435
|
});
|
|
@@ -399,18 +438,18 @@ export function flyoutManagerReducer() {
|
|
|
399
438
|
}
|
|
400
439
|
var targetEntry = _childHistory2[targetIndex];
|
|
401
440
|
var _newChildHistory = _childHistory2.slice(0, targetIndex);
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
404
|
-
|
|
441
|
+
var _flyoutsToRemove3 = new Set();
|
|
442
|
+
if (_currentSession3.childFlyoutId) {
|
|
443
|
+
_flyoutsToRemove3.add(_currentSession3.childFlyoutId);
|
|
405
444
|
}
|
|
406
445
|
_childHistory2.slice(targetIndex + 1).forEach(function (e) {
|
|
407
|
-
|
|
446
|
+
_flyoutsToRemove3.add(e.flyoutId);
|
|
408
447
|
});
|
|
409
|
-
var
|
|
410
|
-
return !
|
|
448
|
+
var _newFlyouts6 = state.flyouts.filter(function (f) {
|
|
449
|
+
return !_flyoutsToRemove3.has(f.flyoutId);
|
|
411
450
|
});
|
|
412
451
|
var _updatedSessions4 = _toConsumableArray(state.sessions);
|
|
413
|
-
_updatedSessions4[
|
|
452
|
+
_updatedSessions4[_currentSessionIndex4] = _objectSpread(_objectSpread({}, _currentSession3), {}, {
|
|
414
453
|
childHistory: _newChildHistory,
|
|
415
454
|
childFlyoutId: targetEntry.flyoutId,
|
|
416
455
|
childTitle: targetEntry.title,
|
|
@@ -418,7 +457,7 @@ export function flyoutManagerReducer() {
|
|
|
418
457
|
});
|
|
419
458
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
420
459
|
sessions: _updatedSessions4,
|
|
421
|
-
flyouts:
|
|
460
|
+
flyouts: _newFlyouts6
|
|
422
461
|
});
|
|
423
462
|
}
|
|
424
463
|
|
|
@@ -429,25 +468,45 @@ export function flyoutManagerReducer() {
|
|
|
429
468
|
if (targetSessionIndex === -1) {
|
|
430
469
|
return state; // Target flyout not found
|
|
431
470
|
}
|
|
471
|
+
var _currentSession4 = state.sessions[_currentSessionIndex4];
|
|
472
|
+
var targetSession = state.sessions[targetSessionIndex];
|
|
473
|
+
|
|
474
|
+
// Group-local navigation: keep other history groups, remove only newer sessions in target's group,
|
|
475
|
+
// then bring that group to the top.
|
|
476
|
+
if (targetSession.historyKey === _currentSession4.historyKey) {
|
|
477
|
+
var _flyoutsToRemove4 = new Set();
|
|
478
|
+
var sessionsAfterTargetInGroup = state.sessions.filter(function (session, index) {
|
|
479
|
+
return index > targetSessionIndex && session.historyKey === targetSession.historyKey;
|
|
480
|
+
});
|
|
481
|
+
sessionsAfterTargetInGroup.forEach(function (session) {
|
|
482
|
+
addSessionFlyoutsToRemove(session, _flyoutsToRemove4);
|
|
483
|
+
});
|
|
484
|
+
var sessionsWithoutRemoved = state.sessions.filter(function (session) {
|
|
485
|
+
return !sessionsAfterTargetInGroup.some(function (removed) {
|
|
486
|
+
return removed.mainFlyoutId === session.mainFlyoutId;
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
var reorderedSessions = moveHistoryGroupToTop(sessionsWithoutRemoved, targetSession.historyKey);
|
|
490
|
+
var _newFlyouts7 = state.flyouts.filter(function (f) {
|
|
491
|
+
return !_flyoutsToRemove4.has(f.flyoutId);
|
|
492
|
+
});
|
|
493
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
494
|
+
sessions: reorderedSessions,
|
|
495
|
+
flyouts: _newFlyouts7
|
|
496
|
+
});
|
|
497
|
+
}
|
|
432
498
|
var sessionsToClose = state.sessions.slice(targetSessionIndex + 1);
|
|
433
|
-
var
|
|
499
|
+
var _flyoutsToRemove5 = new Set();
|
|
434
500
|
sessionsToClose.forEach(function (session) {
|
|
435
|
-
|
|
436
|
-
_flyoutsToRemove3.add(session.mainFlyoutId);
|
|
437
|
-
if (session.childFlyoutId) {
|
|
438
|
-
_flyoutsToRemove3.add(session.childFlyoutId);
|
|
439
|
-
}
|
|
440
|
-
((_session$childHistory2 = session.childHistory) !== null && _session$childHistory2 !== void 0 ? _session$childHistory2 : []).forEach(function (e) {
|
|
441
|
-
return _flyoutsToRemove3.add(e.flyoutId);
|
|
442
|
-
});
|
|
501
|
+
addSessionFlyoutsToRemove(session, _flyoutsToRemove5);
|
|
443
502
|
});
|
|
444
|
-
var
|
|
445
|
-
return !
|
|
503
|
+
var _newFlyouts8 = state.flyouts.filter(function (f) {
|
|
504
|
+
return !_flyoutsToRemove5.has(f.flyoutId);
|
|
446
505
|
});
|
|
447
|
-
var
|
|
506
|
+
var _newSessions3 = state.sessions.slice(0, targetSessionIndex + 1);
|
|
448
507
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
449
|
-
sessions:
|
|
450
|
-
flyouts:
|
|
508
|
+
sessions: _newSessions3,
|
|
509
|
+
flyouts: _newFlyouts8
|
|
451
510
|
});
|
|
452
511
|
}
|
|
453
512
|
|