@elastic/eui 119.1.0 → 120.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui-icons.json +74 -82
- package/dist/svgs/cloud_bolt.svg +4 -0
- package/dist/svgs/cloud_rain.svg +4 -0
- package/dist/svgs/cloud_sun.svg +4 -0
- package/dist/svgs/cube.svg +3 -0
- package/dist/svgs/kubernetes_namespace.svg +4 -0
- package/dist/svgs/memory.svg +1 -10
- package/dist/svgs/product_timelion.svg +3 -0
- package/dist/svgs/product_tsvb.svg +5 -0
- package/dist/svgs/push.svg +4 -0
- package/dist/svgs/transition_right_in.svg +4 -0
- package/dist/svgs/transition_right_out.svg +4 -0
- package/dist/svgs/wrench.svg +1 -1
- 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.js +17 -5
- 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_group/button_group.js +111 -29
- package/es/components/button/button_group/button_group.styles.js +20 -7
- package/es/components/button/button_group/use_button_group_selection.js +30 -0
- package/es/components/button/button_icon/button_icon.js +18 -7
- package/es/components/button/use_button_common_props.js +16 -7
- package/es/components/call_out/call_out.js +2 -2
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- 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 +24 -24
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/controls/column_sorting.js +13 -13
- 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 +12 -12
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/es/components/date_picker/react-datepicker/test/test_wrapper.js +38 -0
- package/es/components/date_picker/react-datepicker/test/timezone_date_picker.js +75 -0
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +224 -253
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/delay_hide/delay_hide.js +36 -93
- package/es/components/delay_render/delay_render.js +42 -80
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout_menu/flyout_menu.js +4 -4
- 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/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/{kubernetes_pod.js → cloud_bolt.js} +5 -3
- package/es/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/es/components/icon/assets/{cloud_stormy.js → cloud_sun.js} +3 -3
- package/es/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/es/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/es/components/icon/assets/memory.js +1 -3
- package/es/components/icon/assets/{continuity_below.js → product_timelion.js} +3 -3
- package/es/components/icon/assets/{cloud_sunny.js → product_tsvb.js} +7 -3
- package/es/components/icon/assets/{namespace.js → push.js} +3 -6
- package/es/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/es/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/es/components/icon/assets/wrench.js +1 -3
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_glyphs.a11y.js +1 -1
- package/es/components/icon/icon_map.js +143 -58
- package/es/components/icon/svgs/cloud_bolt.svg +4 -0
- package/es/components/icon/svgs/cloud_rain.svg +4 -0
- package/es/components/icon/svgs/cloud_sun.svg +4 -0
- package/es/components/icon/svgs/cube.svg +3 -0
- package/es/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/es/components/icon/svgs/memory.svg +1 -10
- package/es/components/icon/svgs/product_timelion.svg +3 -0
- package/es/components/icon/svgs/product_tsvb.svg +5 -0
- package/es/components/icon/svgs/push.svg +4 -0
- package/es/components/icon/svgs/transition_right_in.svg +4 -0
- package/es/components/icon/svgs/transition_right_out.svg +4 -0
- package/es/components/icon/svgs/wrench.svg +1 -1
- 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_toolbar.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/resizable_container/resizable_collapse_button.js +4 -4
- 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/table_header_cell.js +1 -1
- package/es/components/text_diff/text_diff.js +4 -6
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +2 -2
- package/es/components/toast/toast.js +2 -2
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +224 -275
- 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.js +17 -5
- 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_group/button_group.js +111 -29
- package/lib/components/button/button_group/button_group.styles.js +19 -6
- package/lib/components/button/button_group/use_button_group_selection.js +36 -0
- package/lib/components/button/button_icon/button_icon.js +18 -7
- package/lib/components/button/use_button_common_props.js +16 -7
- package/lib/components/call_out/call_out.js +2 -2
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- 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 +24 -24
- package/lib/components/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/controls/column_sorting.js +13 -13
- 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 +12 -12
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/test/helper_components/custom_input.js +80 -0
- package/lib/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/lib/components/date_picker/react-datepicker/test/timezone_date_picker.js +83 -0
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +224 -253
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/delay_hide/delay_hide.js +35 -93
- package/lib/components/delay_render/delay_render.js +41 -79
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout_menu/flyout_menu.js +4 -4
- 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/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/{kubernetes_pod.js → cloud_bolt.js} +5 -3
- package/lib/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/lib/components/icon/assets/{cloud_stormy.js → cloud_sun.js} +3 -3
- package/lib/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/lib/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/lib/components/icon/assets/memory.js +1 -3
- package/lib/components/icon/assets/{continuity_below.js → product_timelion.js} +3 -3
- package/lib/components/icon/assets/{cloud_sunny.js → product_tsvb.js} +7 -3
- package/lib/components/icon/assets/{namespace.js → push.js} +3 -6
- package/lib/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/lib/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/lib/components/icon/assets/wrench.js +1 -3
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/lib/components/icon/icon_map.js +165 -78
- package/lib/components/icon/svgs/cloud_bolt.svg +4 -0
- package/lib/components/icon/svgs/cloud_rain.svg +4 -0
- package/lib/components/icon/svgs/cloud_sun.svg +4 -0
- package/lib/components/icon/svgs/cube.svg +3 -0
- package/lib/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/lib/components/icon/svgs/memory.svg +1 -10
- package/lib/components/icon/svgs/product_timelion.svg +3 -0
- package/lib/components/icon/svgs/product_tsvb.svg +5 -0
- package/lib/components/icon/svgs/push.svg +4 -0
- package/lib/components/icon/svgs/transition_right_in.svg +4 -0
- package/lib/components/icon/svgs/transition_right_out.svg +4 -0
- package/lib/components/icon/svgs/wrench.svg +1 -1
- 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_toolbar.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/resizable_container/resizable_collapse_button.js +4 -4
- 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/table_header_cell.js +1 -1
- package/lib/components/text_diff/text_diff.js +4 -6
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +2 -2
- package/lib/components/toast/toast.js +2 -2
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/button/button.js +17 -5
- package/optimize/es/components/button/button_group/button_group.js +44 -12
- package/optimize/es/components/button/button_group/button_group.styles.js +20 -7
- package/optimize/es/components/button/button_group/use_button_group_selection.js +30 -0
- package/optimize/es/components/button/button_icon/button_icon.js +17 -6
- package/optimize/es/components/button/use_button_common_props.js +16 -7
- package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/test/helper_components/custom_input.js +68 -0
- package/optimize/es/components/date_picker/react-datepicker/test/test_wrapper.js +38 -0
- package/optimize/es/components/date_picker/react-datepicker/test/timezone_date_picker.js +69 -0
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +220 -225
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/es/components/delay_hide/delay_hide.js +31 -81
- package/optimize/es/components/delay_render/delay_render.js +36 -73
- package/optimize/es/components/icon/assets/{continuity_below.js → cloud_bolt.js} +5 -3
- package/optimize/es/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/optimize/es/components/icon/assets/{cloud_sunny.js → cloud_sun.js} +3 -3
- package/optimize/es/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/optimize/es/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/optimize/es/components/icon/assets/memory.js +1 -3
- package/optimize/es/components/icon/assets/product_timelion.js +32 -0
- package/optimize/es/components/icon/assets/{cloud_stormy.js → product_tsvb.js} +7 -3
- package/optimize/es/components/icon/assets/{namespace.js → push.js} +3 -6
- package/optimize/es/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/optimize/es/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/optimize/es/components/icon/assets/wrench.js +1 -3
- package/optimize/es/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/es/components/icon/icon_map.js +143 -58
- package/optimize/es/components/icon/svgs/cloud_bolt.svg +4 -0
- package/optimize/es/components/icon/svgs/cloud_rain.svg +4 -0
- package/optimize/es/components/icon/svgs/cloud_sun.svg +4 -0
- package/optimize/es/components/icon/svgs/cube.svg +3 -0
- package/optimize/es/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/optimize/es/components/icon/svgs/memory.svg +1 -10
- package/optimize/es/components/icon/svgs/product_timelion.svg +3 -0
- package/optimize/es/components/icon/svgs/product_tsvb.svg +5 -0
- package/optimize/es/components/icon/svgs/push.svg +4 -0
- package/optimize/es/components/icon/svgs/transition_right_in.svg +4 -0
- package/optimize/es/components/icon/svgs/transition_right_out.svg +4 -0
- package/optimize/es/components/icon/svgs/wrench.svg +1 -1
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +4 -4
- package/optimize/es/components/text_diff/text_diff.js +4 -6
- package/optimize/lib/components/button/button.js +17 -5
- package/optimize/lib/components/button/button_group/button_group.js +44 -12
- package/optimize/lib/components/button/button_group/button_group.styles.js +19 -6
- package/optimize/lib/components/button/button_group/use_button_group_selection.js +36 -0
- package/optimize/lib/components/button/button_icon/button_icon.js +17 -6
- package/optimize/lib/components/button/use_button_common_props.js +16 -7
- package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/optimize/lib/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/optimize/lib/components/date_picker/react-datepicker/test/timezone_date_picker.js +78 -0
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +219 -224
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/lib/components/delay_hide/delay_hide.js +32 -80
- package/optimize/lib/components/delay_render/delay_render.js +37 -72
- package/optimize/lib/components/icon/assets/{continuity_below.js → cloud_bolt.js} +5 -3
- package/{test-env/components/icon/assets/branch_user.js → optimize/lib/components/icon/assets/cloud_rain.js} +4 -6
- package/optimize/lib/components/icon/assets/{cloud_sunny.js → cloud_sun.js} +3 -3
- package/{test-env/components/icon/assets/kql_function.js → optimize/lib/components/icon/assets/cube.js} +3 -3
- package/optimize/lib/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/optimize/lib/components/icon/assets/memory.js +1 -3
- package/{test-env/components/icon/assets/continuity_below.js → optimize/lib/components/icon/assets/product_timelion.js} +3 -3
- package/optimize/lib/components/icon/assets/product_tsvb.js +44 -0
- package/{test-env/components/icon/assets/namespace.js → optimize/lib/components/icon/assets/push.js} +3 -6
- package/optimize/lib/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/optimize/lib/components/icon/assets/transition_right_out.js +42 -0
- package/optimize/lib/components/icon/assets/wrench.js +1 -3
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/lib/components/icon/icon_map.js +165 -78
- package/optimize/lib/components/icon/svgs/cloud_bolt.svg +4 -0
- package/optimize/lib/components/icon/svgs/cloud_rain.svg +4 -0
- package/optimize/lib/components/icon/svgs/cloud_sun.svg +4 -0
- package/optimize/lib/components/icon/svgs/cube.svg +3 -0
- package/optimize/lib/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/optimize/lib/components/icon/svgs/memory.svg +1 -10
- package/optimize/lib/components/icon/svgs/product_timelion.svg +3 -0
- package/optimize/lib/components/icon/svgs/product_tsvb.svg +5 -0
- package/optimize/lib/components/icon/svgs/push.svg +4 -0
- package/optimize/lib/components/icon/svgs/transition_right_in.svg +4 -0
- package/optimize/lib/components/icon/svgs/transition_right_out.svg +4 -0
- package/optimize/lib/components/icon/svgs/wrench.svg +1 -1
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +4 -4
- package/optimize/lib/components/text_diff/text_diff.js +4 -6
- package/package.json +12 -10
- 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.js +17 -5
- 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_group/button_group.js +111 -29
- package/test-env/components/button/button_group/button_group.styles.js +19 -6
- package/test-env/components/button/button_group/use_button_group_selection.js +36 -0
- package/test-env/components/button/button_icon/button_icon.js +18 -7
- package/test-env/components/button/use_button_common_props.js +16 -7
- package/test-env/components/call_out/call_out.js +2 -2
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- 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 +24 -24
- package/test-env/components/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/controls/column_sorting.js +13 -13
- 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 +12 -12
- 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/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/test-env/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/test-env/components/date_picker/react-datepicker/test/timezone_date_picker.js +78 -0
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +218 -249
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/delay_hide/delay_hide.js +32 -86
- package/test-env/components/delay_render/delay_render.js +38 -73
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout_menu/flyout_menu.js +4 -4
- 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/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/{optimize/lib/components/icon/assets/kubernetes_pod.js → test-env/components/icon/assets/cloud_bolt.js} +5 -3
- package/{optimize/lib/components/icon/assets/branch_user.js → test-env/components/icon/assets/cloud_rain.js} +4 -6
- package/{optimize/lib/components/icon/assets/cloud_stormy.js → test-env/components/icon/assets/cloud_sun.js} +3 -3
- package/{optimize/lib/components/icon/assets/kql_function.js → test-env/components/icon/assets/cube.js} +3 -3
- package/test-env/components/icon/assets/kubernetes_namespace.js +42 -0
- package/test-env/components/icon/assets/memory.js +1 -3
- package/test-env/components/icon/assets/product_timelion.js +40 -0
- package/test-env/components/icon/assets/product_tsvb.js +44 -0
- package/{optimize/lib/components/icon/assets/namespace.js → test-env/components/icon/assets/push.js} +3 -6
- package/{optimize/lib/components/icon/assets/continuity_above_below.js → test-env/components/icon/assets/transition_right_in.js} +5 -3
- package/test-env/components/icon/assets/transition_right_out.js +42 -0
- package/test-env/components/icon/assets/wrench.js +1 -3
- package/test-env/components/icon/icon_glyphs.a11y.js +1 -1
- package/test-env/components/icon/icon_map.js +165 -78
- 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_toolbar.js +1 -1
- 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/resizable_container/resizable_collapse_button.js +4 -4
- 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/table_header_cell.js +1 -1
- package/test-env/components/text_diff/text_diff.js +4 -6
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +2 -2
- package/test-env/components/toast/toast.js +2 -2
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/dist/svgs/branch_user.svg +0 -4
- package/dist/svgs/cloud_drizzle.svg +0 -3
- package/dist/svgs/cloud_stormy.svg +0 -3
- package/dist/svgs/cloud_sunny.svg +0 -3
- package/dist/svgs/continuity_above_below.svg +0 -3
- package/dist/svgs/continuity_below.svg +0 -3
- package/dist/svgs/function.svg +0 -3
- package/dist/svgs/kql_function.svg +0 -5
- package/dist/svgs/kubernetes_pod.svg +0 -3
- package/dist/svgs/magnet.svg +0 -3
- package/dist/svgs/menu_down.svg +0 -3
- package/dist/svgs/menu_up.svg +0 -3
- package/dist/svgs/namespace.svg +0 -3
- package/dist/svgs/page_select.svg +0 -3
- package/dist/svgs/security_signal_resolved.svg +0 -3
- package/dist/svgs/tear.svg +0 -3
- package/dist/svgs/vis_timelion.svg +0 -3
- package/dist/svgs/vis_visual_builder.svg +0 -3
- package/es/components/icon/assets/magnet.js +0 -33
- package/es/components/icon/assets/menu_down.js +0 -33
- package/es/components/icon/assets/menu_up.js +0 -33
- package/es/components/icon/assets/page_select.js +0 -34
- package/es/components/icon/assets/security_signal_resolved.js +0 -34
- package/es/components/icon/assets/tear.js +0 -33
- package/es/components/icon/assets/vis_timelion.js +0 -33
- package/es/components/icon/assets/vis_visual_builder.js +0 -33
- package/es/components/icon/svgs/branch_user.svg +0 -4
- package/es/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/es/components/icon/svgs/cloud_stormy.svg +0 -3
- package/es/components/icon/svgs/cloud_sunny.svg +0 -3
- package/es/components/icon/svgs/continuity_above_below.svg +0 -3
- package/es/components/icon/svgs/continuity_below.svg +0 -3
- package/es/components/icon/svgs/function.svg +0 -3
- package/es/components/icon/svgs/kql_function.svg +0 -5
- package/es/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/es/components/icon/svgs/magnet.svg +0 -3
- package/es/components/icon/svgs/menu_down.svg +0 -3
- package/es/components/icon/svgs/menu_up.svg +0 -3
- package/es/components/icon/svgs/namespace.svg +0 -3
- package/es/components/icon/svgs/page_select.svg +0 -3
- package/es/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/es/components/icon/svgs/tear.svg +0 -3
- package/es/components/icon/svgs/vis_timelion.svg +0 -3
- package/es/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/lib/components/icon/assets/magnet.js +0 -40
- package/lib/components/icon/assets/menu_down.js +0 -40
- package/lib/components/icon/assets/menu_up.js +0 -40
- package/lib/components/icon/assets/page_select.js +0 -41
- package/lib/components/icon/assets/security_signal_resolved.js +0 -41
- package/lib/components/icon/assets/tear.js +0 -40
- package/lib/components/icon/assets/vis_timelion.js +0 -40
- package/lib/components/icon/assets/vis_visual_builder.js +0 -40
- package/lib/components/icon/svgs/branch_user.svg +0 -4
- package/lib/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/lib/components/icon/svgs/cloud_stormy.svg +0 -3
- package/lib/components/icon/svgs/cloud_sunny.svg +0 -3
- package/lib/components/icon/svgs/continuity_above_below.svg +0 -3
- package/lib/components/icon/svgs/continuity_below.svg +0 -3
- package/lib/components/icon/svgs/function.svg +0 -3
- package/lib/components/icon/svgs/kql_function.svg +0 -5
- package/lib/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/lib/components/icon/svgs/magnet.svg +0 -3
- package/lib/components/icon/svgs/menu_down.svg +0 -3
- package/lib/components/icon/svgs/menu_up.svg +0 -3
- package/lib/components/icon/svgs/namespace.svg +0 -3
- package/lib/components/icon/svgs/page_select.svg +0 -3
- package/lib/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/lib/components/icon/svgs/tear.svg +0 -3
- package/lib/components/icon/svgs/vis_timelion.svg +0 -3
- package/lib/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/optimize/es/components/icon/assets/kubernetes_pod.js +0 -32
- package/optimize/es/components/icon/assets/magnet.js +0 -32
- package/optimize/es/components/icon/assets/menu_down.js +0 -32
- package/optimize/es/components/icon/assets/menu_up.js +0 -32
- package/optimize/es/components/icon/assets/page_select.js +0 -33
- package/optimize/es/components/icon/assets/security_signal_resolved.js +0 -33
- package/optimize/es/components/icon/assets/tear.js +0 -32
- package/optimize/es/components/icon/assets/vis_timelion.js +0 -32
- package/optimize/es/components/icon/assets/vis_visual_builder.js +0 -32
- package/optimize/es/components/icon/svgs/branch_user.svg +0 -4
- package/optimize/es/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/optimize/es/components/icon/svgs/cloud_stormy.svg +0 -3
- package/optimize/es/components/icon/svgs/cloud_sunny.svg +0 -3
- package/optimize/es/components/icon/svgs/continuity_above_below.svg +0 -3
- package/optimize/es/components/icon/svgs/continuity_below.svg +0 -3
- package/optimize/es/components/icon/svgs/function.svg +0 -3
- package/optimize/es/components/icon/svgs/kql_function.svg +0 -5
- package/optimize/es/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/optimize/es/components/icon/svgs/magnet.svg +0 -3
- package/optimize/es/components/icon/svgs/menu_down.svg +0 -3
- package/optimize/es/components/icon/svgs/menu_up.svg +0 -3
- package/optimize/es/components/icon/svgs/namespace.svg +0 -3
- package/optimize/es/components/icon/svgs/page_select.svg +0 -3
- package/optimize/es/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/optimize/es/components/icon/svgs/tear.svg +0 -3
- package/optimize/es/components/icon/svgs/vis_timelion.svg +0 -3
- package/optimize/es/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/optimize/lib/components/icon/assets/magnet.js +0 -40
- package/optimize/lib/components/icon/assets/menu_down.js +0 -40
- package/optimize/lib/components/icon/assets/menu_up.js +0 -40
- package/optimize/lib/components/icon/assets/page_select.js +0 -41
- package/optimize/lib/components/icon/assets/security_signal_resolved.js +0 -41
- package/optimize/lib/components/icon/assets/tear.js +0 -40
- package/optimize/lib/components/icon/assets/vis_timelion.js +0 -40
- package/optimize/lib/components/icon/assets/vis_visual_builder.js +0 -40
- package/optimize/lib/components/icon/svgs/branch_user.svg +0 -4
- package/optimize/lib/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/optimize/lib/components/icon/svgs/cloud_stormy.svg +0 -3
- package/optimize/lib/components/icon/svgs/cloud_sunny.svg +0 -3
- package/optimize/lib/components/icon/svgs/continuity_above_below.svg +0 -3
- package/optimize/lib/components/icon/svgs/continuity_below.svg +0 -3
- package/optimize/lib/components/icon/svgs/function.svg +0 -3
- package/optimize/lib/components/icon/svgs/kql_function.svg +0 -5
- package/optimize/lib/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/optimize/lib/components/icon/svgs/magnet.svg +0 -3
- package/optimize/lib/components/icon/svgs/menu_down.svg +0 -3
- package/optimize/lib/components/icon/svgs/menu_up.svg +0 -3
- package/optimize/lib/components/icon/svgs/namespace.svg +0 -3
- package/optimize/lib/components/icon/svgs/page_select.svg +0 -3
- package/optimize/lib/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/optimize/lib/components/icon/svgs/tear.svg +0 -3
- package/optimize/lib/components/icon/svgs/vis_timelion.svg +0 -3
- package/optimize/lib/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/test-env/components/icon/assets/cloud_drizzle.js +0 -40
- package/test-env/components/icon/assets/cloud_stormy.js +0 -40
- package/test-env/components/icon/assets/cloud_sunny.js +0 -40
- package/test-env/components/icon/assets/continuity_above_below.js +0 -40
- package/test-env/components/icon/assets/function.js +0 -40
- package/test-env/components/icon/assets/kubernetes_pod.js +0 -40
- package/test-env/components/icon/assets/magnet.js +0 -40
- package/test-env/components/icon/assets/menu_down.js +0 -40
- package/test-env/components/icon/assets/menu_up.js +0 -40
- package/test-env/components/icon/assets/page_select.js +0 -41
- package/test-env/components/icon/assets/security_signal_resolved.js +0 -41
- package/test-env/components/icon/assets/tear.js +0 -40
- package/test-env/components/icon/assets/vis_timelion.js +0 -40
- package/test-env/components/icon/assets/vis_visual_builder.js +0 -40
package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
7
3
|
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
4
|
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; }
|
|
9
5
|
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; }
|
|
10
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
6
|
/*
|
|
13
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
8
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -17,10 +11,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
17
11
|
* Side Public License, v 1.
|
|
18
12
|
*/
|
|
19
13
|
|
|
20
|
-
import React, {
|
|
14
|
+
import React, { useState } from 'react';
|
|
21
15
|
import moment from 'moment';
|
|
22
16
|
import dateMath from '@elastic/datemath';
|
|
23
|
-
import {
|
|
17
|
+
import { useGeneratedHtmlId } from '../../../../services';
|
|
24
18
|
import { EuiI18n } from '../../../i18n';
|
|
25
19
|
import { EuiScreenReaderOnly } from '../../../accessibility';
|
|
26
20
|
import { EuiButton, EuiButtonIcon } from '../../../button';
|
|
@@ -31,238 +25,239 @@ import { NEXT } from '../time_options';
|
|
|
31
25
|
import { parseTimeParts } from './quick_select_utils';
|
|
32
26
|
import { EuiQuickSelectPanel } from './quick_select_panel';
|
|
33
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
|
-
var
|
|
35
|
-
name: "
|
|
36
|
-
styles: "> div{position:relative;overflow:visible;};label:
|
|
28
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
29
|
+
name: "7yqi2-EuiQuickSelect",
|
|
30
|
+
styles: "> div{position:relative;overflow:visible;};label:EuiQuickSelect;"
|
|
37
31
|
} : {
|
|
38
|
-
name: "
|
|
39
|
-
styles: "> div{position:relative;overflow:visible;};label:
|
|
32
|
+
name: "7yqi2-EuiQuickSelect",
|
|
33
|
+
styles: "> div{position:relative;overflow:visible;};label:EuiQuickSelect;",
|
|
40
34
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
41
35
|
};
|
|
42
|
-
var
|
|
43
|
-
name: "
|
|
44
|
-
styles: "position:absolute;right:0;bottom:100%;transform:translateY(-33%);label:
|
|
36
|
+
var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
37
|
+
name: "qbrd7j-EuiQuickSelect",
|
|
38
|
+
styles: "position:absolute;right:0;bottom:100%;transform:translateY(-33%);label:EuiQuickSelect;"
|
|
45
39
|
} : {
|
|
46
|
-
name: "
|
|
47
|
-
styles: "position:absolute;right:0;bottom:100%;transform:translateY(-33%);label:
|
|
40
|
+
name: "qbrd7j-EuiQuickSelect",
|
|
41
|
+
styles: "position:absolute;right:0;bottom:100%;transform:translateY(-33%);label:EuiQuickSelect;",
|
|
48
42
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
49
43
|
};
|
|
50
|
-
export var EuiQuickSelect =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
44
|
+
export var EuiQuickSelect = function EuiQuickSelect(_ref) {
|
|
45
|
+
var applyTime = _ref.applyTime,
|
|
46
|
+
start = _ref.start,
|
|
47
|
+
end = _ref.end,
|
|
48
|
+
prevQuickSelect = _ref.prevQuickSelect,
|
|
49
|
+
timeOptions = _ref.timeOptions;
|
|
50
|
+
var _useState = useState(function () {
|
|
51
|
+
var _parseTimeParts = parseTimeParts(start, end),
|
|
52
|
+
timeTenseDefault = _parseTimeParts.timeTense,
|
|
53
|
+
timeUnitsDefault = _parseTimeParts.timeUnits,
|
|
54
|
+
timeValueDefault = _parseTimeParts.timeValue;
|
|
55
|
+
return {
|
|
56
|
+
timeTense: prevQuickSelect && prevQuickSelect.timeTense ? prevQuickSelect.timeTense : timeTenseDefault,
|
|
57
|
+
timeValue: prevQuickSelect && prevQuickSelect.timeValue ? prevQuickSelect.timeValue : timeValueDefault,
|
|
58
|
+
timeUnits: prevQuickSelect && prevQuickSelect.timeUnits ? prevQuickSelect.timeUnits : timeUnitsDefault
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
+
state = _useState2[0],
|
|
63
|
+
setState = _useState2[1];
|
|
64
|
+
var timeSelectionId = useGeneratedHtmlId();
|
|
65
|
+
var legendId = useGeneratedHtmlId();
|
|
66
|
+
var onTimeTenseChange = function onTimeTenseChange(event) {
|
|
67
|
+
var timeTense = event.target.value;
|
|
68
|
+
setState(function (state) {
|
|
69
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
70
|
+
timeTense: timeTense
|
|
61
71
|
});
|
|
62
72
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
};
|
|
74
|
+
var onTimeValueChange = function onTimeValueChange(event) {
|
|
75
|
+
var sanitizedValue = parseInt(event.target.value, 10);
|
|
76
|
+
setState(function (state) {
|
|
77
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
66
78
|
timeValue: isNaN(sanitizedValue) ? 0 : sanitizedValue
|
|
67
79
|
});
|
|
68
80
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
};
|
|
82
|
+
var onTimeUnitsChange = function onTimeUnitsChange(event) {
|
|
83
|
+
var timeUnits = event.target.value;
|
|
84
|
+
setState(function (state) {
|
|
85
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
86
|
+
timeUnits: timeUnits
|
|
72
87
|
});
|
|
73
88
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
timeUnits = _this$state.timeUnits;
|
|
85
|
-
if (timeTense === NEXT) {
|
|
86
|
-
_this.props.applyTime({
|
|
87
|
-
start: 'now',
|
|
88
|
-
end: "now+".concat(timeValue).concat(timeUnits),
|
|
89
|
-
quickSelect: _objectSpread({}, _this.state)
|
|
90
|
-
});
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
_this.props.applyTime({
|
|
94
|
-
start: "now-".concat(timeValue).concat(timeUnits),
|
|
95
|
-
end: 'now',
|
|
96
|
-
quickSelect: _objectSpread({}, _this.state)
|
|
89
|
+
};
|
|
90
|
+
var applyQuickSelect = function applyQuickSelect() {
|
|
91
|
+
var timeTense = state.timeTense,
|
|
92
|
+
timeValue = state.timeValue,
|
|
93
|
+
timeUnits = state.timeUnits;
|
|
94
|
+
if (timeTense === NEXT) {
|
|
95
|
+
applyTime({
|
|
96
|
+
start: 'now',
|
|
97
|
+
end: "now+".concat(timeValue).concat(timeUnits),
|
|
98
|
+
quickSelect: _objectSpread({}, state)
|
|
97
99
|
});
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
applyTime({
|
|
103
|
+
start: "now-".concat(timeValue).concat(timeUnits),
|
|
104
|
+
end: 'now',
|
|
105
|
+
quickSelect: _objectSpread({}, state)
|
|
98
106
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
};
|
|
108
|
+
var handleKeyDown = function handleKeyDown(_ref2) {
|
|
109
|
+
var key = _ref2.key;
|
|
110
|
+
if (key === 'Enter') {
|
|
111
|
+
applyQuickSelect();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var getBounds = function getBounds() {
|
|
115
|
+
var startMoment = dateMath.parse(start);
|
|
116
|
+
var endMoment = dateMath.parse(end, {
|
|
117
|
+
roundUp: true
|
|
108
118
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
return {
|
|
120
|
+
min: startMoment && startMoment.isValid() ? startMoment : moment().subtract(15, 'minute'),
|
|
121
|
+
max: endMoment && endMoment.isValid() ? endMoment : moment()
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
var stepForward = function stepForward() {
|
|
125
|
+
var _getBounds = getBounds(),
|
|
126
|
+
min = _getBounds.min,
|
|
127
|
+
max = _getBounds.max;
|
|
128
|
+
var diff = max.diff(min);
|
|
129
|
+
applyTime({
|
|
130
|
+
start: moment(max).toISOString(),
|
|
131
|
+
end: moment(max).add(diff, 'ms').toISOString(),
|
|
132
|
+
keepPopoverOpen: true
|
|
119
133
|
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
};
|
|
135
|
+
var stepBackward = function stepBackward() {
|
|
136
|
+
var _getBounds2 = getBounds(),
|
|
137
|
+
min = _getBounds2.min,
|
|
138
|
+
max = _getBounds2.max;
|
|
139
|
+
var diff = max.diff(min);
|
|
140
|
+
applyTime({
|
|
141
|
+
start: moment(min).subtract(diff, 'ms').toISOString(),
|
|
142
|
+
end: moment(min).toISOString(),
|
|
143
|
+
keepPopoverOpen: true
|
|
130
144
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
minWidth: 0 // Allow the button to shrink
|
|
248
|
-
,
|
|
249
|
-
size: "s",
|
|
250
|
-
onClick: this.applyQuickSelect,
|
|
251
|
-
disabled: timeValue <= 0
|
|
252
|
-
}, ___EmotionJSX(EuiI18n, {
|
|
253
|
-
token: "euiQuickSelect.applyButton",
|
|
254
|
-
default: "Apply"
|
|
255
|
-
})))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
256
|
-
id: this.timeSelectionId
|
|
257
|
-
}, ___EmotionJSX(EuiI18n, {
|
|
258
|
-
token: "euiQuickSelect.fullDescription",
|
|
259
|
-
default: "Currently set to {timeTense} {timeValue} {timeUnit}.",
|
|
260
|
-
values: {
|
|
261
|
-
timeTense: timeTense,
|
|
262
|
-
timeValue: timeValue,
|
|
263
|
-
timeUnit: timeUnit
|
|
264
|
-
}
|
|
265
|
-
}))));
|
|
145
|
+
};
|
|
146
|
+
var timeTense = state.timeTense,
|
|
147
|
+
timeValue = state.timeValue,
|
|
148
|
+
timeUnits = state.timeUnits;
|
|
149
|
+
var timeTenseOptions = timeOptions.timeTenseOptions,
|
|
150
|
+
timeUnitsOptions = timeOptions.timeUnitsOptions;
|
|
151
|
+
var matchedTimeUnit = timeUnitsOptions.find(function (_ref3) {
|
|
152
|
+
var value = _ref3.value;
|
|
153
|
+
return value === timeUnits;
|
|
154
|
+
});
|
|
155
|
+
var timeUnit = matchedTimeUnit ? matchedTimeUnit.text : '';
|
|
156
|
+
return ___EmotionJSX(EuiQuickSelectPanel, {
|
|
157
|
+
component: "fieldset",
|
|
158
|
+
title: ___EmotionJSX(EuiI18n, {
|
|
159
|
+
token: "euiQuickSelect.quickSelectTitle",
|
|
160
|
+
default: "Quick select"
|
|
161
|
+
}),
|
|
162
|
+
titleId: legendId,
|
|
163
|
+
"aria-describedby": timeSelectionId,
|
|
164
|
+
css: _ref4
|
|
165
|
+
}, ___EmotionJSX(EuiFlexGroup, {
|
|
166
|
+
css: _ref5,
|
|
167
|
+
alignItems: "center",
|
|
168
|
+
gutterSize: "s",
|
|
169
|
+
responsive: false
|
|
170
|
+
}, ___EmotionJSX(EuiFlexItem, {
|
|
171
|
+
grow: false
|
|
172
|
+
}, ___EmotionJSX(EuiI18n, {
|
|
173
|
+
token: "euiQuickSelect.previousLabel",
|
|
174
|
+
default: "Previous time window"
|
|
175
|
+
}, function (previousLabel) {
|
|
176
|
+
return ___EmotionJSX(EuiToolTip, {
|
|
177
|
+
content: previousLabel,
|
|
178
|
+
disableScreenReaderOutput: true
|
|
179
|
+
}, ___EmotionJSX(EuiButtonIcon, {
|
|
180
|
+
"aria-label": previousLabel,
|
|
181
|
+
iconType: "chevronSingleLeft",
|
|
182
|
+
onClick: stepBackward
|
|
183
|
+
}));
|
|
184
|
+
})), ___EmotionJSX(EuiFlexItem, {
|
|
185
|
+
grow: false
|
|
186
|
+
}, ___EmotionJSX(EuiI18n, {
|
|
187
|
+
token: "euiQuickSelect.nextLabel",
|
|
188
|
+
default: "Next time window"
|
|
189
|
+
}, function (nextLabel) {
|
|
190
|
+
return ___EmotionJSX(EuiToolTip, {
|
|
191
|
+
content: nextLabel,
|
|
192
|
+
disableScreenReaderOutput: true
|
|
193
|
+
}, ___EmotionJSX(EuiButtonIcon, {
|
|
194
|
+
"aria-label": nextLabel,
|
|
195
|
+
iconType: "chevronSingleRight",
|
|
196
|
+
onClick: stepForward
|
|
197
|
+
}));
|
|
198
|
+
}))), ___EmotionJSX(EuiFlexGroup, {
|
|
199
|
+
gutterSize: "s",
|
|
200
|
+
responsive: false
|
|
201
|
+
}, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiI18n, {
|
|
202
|
+
token: "euiQuickSelect.tenseLabel",
|
|
203
|
+
default: "Time tense"
|
|
204
|
+
}, function (tenseLabel) {
|
|
205
|
+
return ___EmotionJSX(EuiSelect, {
|
|
206
|
+
compressed: true,
|
|
207
|
+
onKeyDown: handleKeyDown,
|
|
208
|
+
"aria-label": tenseLabel,
|
|
209
|
+
"aria-describedby": "".concat(timeSelectionId, " ").concat(legendId),
|
|
210
|
+
value: timeTense,
|
|
211
|
+
options: timeTenseOptions,
|
|
212
|
+
onChange: onTimeTenseChange
|
|
213
|
+
});
|
|
214
|
+
})), ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiI18n, {
|
|
215
|
+
token: "euiQuickSelect.valueLabel",
|
|
216
|
+
default: "Time value"
|
|
217
|
+
}, function (valueLabel) {
|
|
218
|
+
return ___EmotionJSX(EuiFieldNumber, {
|
|
219
|
+
compressed: true,
|
|
220
|
+
onKeyDown: handleKeyDown,
|
|
221
|
+
"aria-describedby": "".concat(timeSelectionId, " ").concat(legendId),
|
|
222
|
+
"aria-label": valueLabel,
|
|
223
|
+
value: timeValue,
|
|
224
|
+
onChange: onTimeValueChange
|
|
225
|
+
});
|
|
226
|
+
})), ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiI18n, {
|
|
227
|
+
token: "euiQuickSelect.unitLabel",
|
|
228
|
+
default: "Time unit"
|
|
229
|
+
}, function (unitLabel) {
|
|
230
|
+
return ___EmotionJSX(EuiSelect, {
|
|
231
|
+
compressed: true,
|
|
232
|
+
onKeyDown: handleKeyDown,
|
|
233
|
+
"aria-label": unitLabel,
|
|
234
|
+
"aria-describedby": "".concat(timeSelectionId, " ").concat(legendId),
|
|
235
|
+
value: timeUnits,
|
|
236
|
+
options: timeUnitsOptions,
|
|
237
|
+
onChange: onTimeUnitsChange
|
|
238
|
+
});
|
|
239
|
+
})), ___EmotionJSX(EuiFlexItem, {
|
|
240
|
+
grow: false
|
|
241
|
+
}, ___EmotionJSX(EuiButton, {
|
|
242
|
+
"aria-describedby": "".concat(timeSelectionId, " ").concat(legendId),
|
|
243
|
+
"data-test-subj": "superDatePickerQuickSelectApplyButton",
|
|
244
|
+
minWidth: 0 // Allow the button to shrink
|
|
245
|
+
,
|
|
246
|
+
size: "s",
|
|
247
|
+
onClick: applyQuickSelect,
|
|
248
|
+
disabled: timeValue <= 0
|
|
249
|
+
}, ___EmotionJSX(EuiI18n, {
|
|
250
|
+
token: "euiQuickSelect.applyButton",
|
|
251
|
+
default: "Apply"
|
|
252
|
+
})))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
253
|
+
id: timeSelectionId
|
|
254
|
+
}, ___EmotionJSX(EuiI18n, {
|
|
255
|
+
token: "euiQuickSelect.fullDescription",
|
|
256
|
+
default: "Currently set to {timeTense} {timeValue} {timeUnit}.",
|
|
257
|
+
values: {
|
|
258
|
+
timeTense: timeTense,
|
|
259
|
+
timeValue: timeValue,
|
|
260
|
+
timeUnit: timeUnit
|
|
266
261
|
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
262
|
+
}))));
|
|
263
|
+
};
|
|
@@ -98,7 +98,7 @@ export var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
|
|
|
98
98
|
var classes = classNames('euiSuperUpdateButton', className);
|
|
99
99
|
var sharedButtonProps = {
|
|
100
100
|
color: needsUpdate || isLoading ? 'success' : 'primary',
|
|
101
|
-
iconType: needsUpdate || isLoading ? '
|
|
101
|
+
iconType: needsUpdate || isLoading ? 'push' : 'refresh',
|
|
102
102
|
isDisabled: isDisabled,
|
|
103
103
|
onClick: onClick,
|
|
104
104
|
isLoading: isLoading
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
2
|
/*
|
|
10
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -14,85 +7,42 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
14
7
|
* Side Public License, v 1.
|
|
15
8
|
*/
|
|
16
9
|
|
|
17
|
-
import {
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
18
11
|
function isComponentBecomingVisible() {
|
|
19
12
|
var prevHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
20
13
|
var nextHide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
21
14
|
return prevHide === true && nextHide === false;
|
|
22
15
|
}
|
|
23
|
-
export var EuiDelayHide =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
export var EuiDelayHide = function EuiDelayHide(_ref) {
|
|
17
|
+
var _ref$hide = _ref.hide,
|
|
18
|
+
hide = _ref$hide === void 0 ? false : _ref$hide,
|
|
19
|
+
_ref$minimumDuration = _ref.minimumDuration,
|
|
20
|
+
minimumDuration = _ref$minimumDuration === void 0 ? 1000 : _ref$minimumDuration,
|
|
21
|
+
render = _ref.render;
|
|
22
|
+
var _useState = useState(hide),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
countdownExpired = _useState2[0],
|
|
25
|
+
setCountdownExpired = _useState2[1];
|
|
26
|
+
var _useState3 = useState(hide),
|
|
27
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
|
+
prevHide = _useState4[0],
|
|
29
|
+
setPrevHide = _useState4[1];
|
|
30
|
+
if (hide !== prevHide) {
|
|
31
|
+
setPrevHide(hide);
|
|
32
|
+
if (isComponentBecomingVisible(prevHide, hide)) {
|
|
33
|
+
setCountdownExpired(false);
|
|
29
34
|
}
|
|
30
|
-
_this = _callSuper(this, EuiDelayHide, [].concat(args));
|
|
31
|
-
_defineProperty(_this, "state", {
|
|
32
|
-
hide: _this.props.hide,
|
|
33
|
-
countdownExpired: _this.props.hide
|
|
34
|
-
});
|
|
35
|
-
_defineProperty(_this, "timeoutId", void 0);
|
|
36
|
-
_defineProperty(_this, "startCountdown", function () {
|
|
37
|
-
// only start the countdown if there is not one in progress
|
|
38
|
-
if (_this.timeoutId == null) {
|
|
39
|
-
_this.timeoutId = setTimeout(_this.finishCountdown,
|
|
40
|
-
// even though `minimumDuration` cannot be undefined, passing a strict number type to setTimeout makes TS interpret
|
|
41
|
-
// it as a NodeJS.Timer instead of a number. The DOM lib defines the setTimeout call as taking `number | undefined`
|
|
42
|
-
// so we cast minimumDuration to this type instead to force TS's cooperation
|
|
43
|
-
_this.props.minimumDuration);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
_defineProperty(_this, "finishCountdown", function () {
|
|
47
|
-
_this.timeoutId = undefined;
|
|
48
|
-
_this.setState({
|
|
49
|
-
countdownExpired: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
return _this;
|
|
53
35
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "componentDidUpdate",
|
|
65
|
-
value: function componentDidUpdate(prevProps) {
|
|
66
|
-
var isBecomingVisible = isComponentBecomingVisible(prevProps.hide, this.props.hide);
|
|
67
|
-
if (isBecomingVisible) {
|
|
68
|
-
this.startCountdown();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "componentWillUnmount",
|
|
73
|
-
value: function componentWillUnmount() {
|
|
74
|
-
if (this.timeoutId != null) {
|
|
75
|
-
clearTimeout(this.timeoutId);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "render",
|
|
80
|
-
value: function render() {
|
|
81
|
-
var shouldHideContent = this.props.hide === true && this.state.countdownExpired;
|
|
82
|
-
return shouldHideContent ? null : this.props.render();
|
|
83
|
-
}
|
|
84
|
-
}], [{
|
|
85
|
-
key: "getDerivedStateFromProps",
|
|
86
|
-
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
87
|
-
var isBecomingVisible = isComponentBecomingVisible(prevState.hide, nextProps.hide);
|
|
88
|
-
return {
|
|
89
|
-
hide: nextProps.hide,
|
|
90
|
-
countdownExpired: isBecomingVisible ? false : prevState.countdownExpired
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
if (countdownExpired === false) {
|
|
38
|
+
var timeoutId = window.setTimeout(function () {
|
|
39
|
+
return setCountdownExpired(true);
|
|
40
|
+
}, minimumDuration);
|
|
41
|
+
return function () {
|
|
42
|
+
return window.clearTimeout(timeoutId);
|
|
91
43
|
};
|
|
92
44
|
}
|
|
93
|
-
}]);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
minimumDuration: 1000
|
|
98
|
-
});
|
|
45
|
+
}, [countdownExpired, minimumDuration]);
|
|
46
|
+
return hide === true && countdownExpired ? null : render();
|
|
47
|
+
};
|
|
48
|
+
EuiDelayHide.displayName = 'EuiDelayHide';
|