@elastic/eui 77.0.0 → 77.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/dist/eui_theme_dark.css +22 -51
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +22 -51
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.a11y.js +3 -1
- package/es/components/accordion/accordion.js +4 -2
- package/es/components/basic_table/table.a11y.js +3 -1
- package/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/es/components/card/card.a11y.js +3 -1
- package/es/components/color_picker/color_picker.a11y.js +3 -1
- package/es/components/combo_box/combo_box.a11y.js +3 -1
- package/es/components/combo_box/combo_box.js +2 -21
- package/es/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/es/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/es/components/control_bar/control_bar.a11y.js +3 -1
- package/es/components/copy/copy.a11y.js +6 -5
- package/es/components/datagrid/data_grid.a11y.js +3 -1
- package/es/components/date_picker/date_picker.a11y.js +3 -1
- package/es/components/date_picker/date_picker.js +148 -155
- package/es/components/date_picker/date_picker_range.js +2 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/es/components/delay_hide/delay_hide.a11y.js +9 -9
- package/es/components/delay_render/delay_render.a11y.js +9 -9
- package/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/es/components/error_boundary/error_boundary.a11y.js +3 -1
- package/es/components/expression/expression.a11y.js +3 -1
- package/es/components/filter_group/filter_group.a11y.js +4 -3
- package/es/components/flyout/flyout.a11y.js +3 -1
- package/es/components/focus_trap/focus_trap.a11y.js +3 -1
- package/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
- package/es/components/form/file_picker/file_picker.js +4 -2
- package/es/components/form/radio/radio_group.a11y.js +4 -5
- package/es/components/form/range/range.a11y.js +3 -1
- package/es/components/form/switch/switch.a11y.js +4 -5
- package/es/components/form/text_area/text_area.js +11 -3
- package/es/components/form/validatable_control/index.js +1 -1
- package/es/components/form/validatable_control/validatable_control.js +49 -13
- package/es/components/header/header.a11y.js +3 -1
- package/es/components/icon/icon_ML.a11y.js +3 -1
- package/es/components/icon/icon_apps.a11y.js +3 -1
- package/es/components/icon/icon_editor.a11y.js +3 -1
- package/es/components/icon/icon_elastic.a11y.js +3 -1
- package/es/components/icon/icon_glyphs.a11y.js +3 -1
- package/es/components/icon/icon_tokens.a11y.js +3 -1
- package/es/components/image/image.a11y.js +3 -1
- package/es/components/index.js +1 -0
- package/es/components/inline_edit/index.js +10 -0
- package/es/components/inline_edit/inline_edit.styles.js +15 -0
- package/es/components/inline_edit/inline_edit_form.js +190 -0
- package/es/components/inline_edit/inline_edit_text.js +97 -0
- package/es/components/inline_edit/inline_edit_title.js +105 -0
- package/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/es/components/modal/modal.a11y.js +3 -1
- package/es/components/notification/notification_event.a11y.js +3 -1
- package/es/components/page/page_header/page_header.a11y.js +3 -1
- package/es/components/pagination/pagination.a11y.js +3 -1
- package/es/components/popover/popover.a11y.js +3 -1
- package/es/components/popover/popover_footer.js +4 -4
- package/es/components/popover/popover_footer.styles.js +16 -5
- package/es/components/popover/popover_panel/_popover_panel.js +8 -5
- package/es/components/portal/portal.a11y.js +3 -1
- package/es/components/progress/progress.a11y.js +3 -1
- package/es/components/resizable_container/resizable_container.a11y.js +3 -1
- package/es/components/search_bar/search_bar.a11y.js +8 -7
- package/es/components/selectable/selectable.a11y.js +3 -1
- package/es/components/side_nav/side_nav.a11y.js +3 -1
- package/es/components/tabs/tabs.a11y.js +3 -1
- package/es/components/tree_view/tree_view.a11y.js +3 -1
- package/eui.d.ts +161 -37
- package/i18ntokens.json +40 -4
- package/lib/components/accordion/accordion.a11y.js +3 -1
- package/lib/components/accordion/accordion.js +4 -2
- package/lib/components/basic_table/table.a11y.js +3 -1
- package/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/lib/components/combo_box/combo_box.js +2 -21
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/lib/components/copy/copy.a11y.js +3 -4
- package/lib/components/date_picker/date_picker.js +147 -153
- package/lib/components/date_picker/date_picker_range.js +2 -2
- package/lib/components/delay_hide/delay_hide.a11y.js +6 -8
- package/lib/components/delay_render/delay_render.a11y.js +6 -8
- package/lib/components/drag_and_drop/drag_and_drop.a11y.js +0 -1
- package/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/lib/components/error_boundary/error_boundary.a11y.js +3 -1
- package/lib/components/filter_group/filter_group.a11y.js +7 -8
- package/lib/components/form/file_picker/file_picker.js +4 -2
- package/lib/components/form/radio/radio_group.a11y.js +1 -4
- package/lib/components/form/switch/switch.a11y.js +1 -4
- package/lib/components/form/text_area/text_area.js +11 -3
- package/lib/components/form/validatable_control/index.js +6 -0
- package/lib/components/form/validatable_control/validatable_control.js +51 -14
- package/lib/components/icon/icon_ML.a11y.js +3 -1
- package/lib/components/icon/icon_apps.a11y.js +3 -1
- package/lib/components/icon/icon_editor.a11y.js +3 -1
- package/lib/components/icon/icon_elastic.a11y.js +3 -1
- package/lib/components/icon/icon_glyphs.a11y.js +3 -1
- package/lib/components/icon/icon_tokens.a11y.js +3 -1
- package/lib/components/image/image.a11y.js +3 -1
- package/lib/components/index.js +11 -0
- package/lib/components/inline_edit/index.js +19 -0
- package/lib/components/inline_edit/inline_edit.styles.js +22 -0
- package/lib/components/inline_edit/inline_edit_form.js +193 -0
- package/lib/components/inline_edit/inline_edit_text.js +97 -0
- package/lib/components/inline_edit/inline_edit_title.js +106 -0
- package/lib/components/page/page_header/page_header.a11y.js +3 -1
- package/lib/components/popover/popover_footer.js +4 -4
- package/lib/components/popover/popover_footer.styles.js +19 -7
- package/lib/components/popover/popover_panel/_popover_panel.js +7 -4
- package/lib/components/resizable_container/resizable_container.a11y.js +3 -1
- package/lib/components/search_bar/search_bar.a11y.js +5 -6
- package/lib/components/tree_view/tree_view.a11y.js +3 -1
- package/optimize/es/components/accordion/accordion.a11y.js +3 -1
- package/optimize/es/components/accordion/accordion.js +4 -2
- package/optimize/es/components/basic_table/table.a11y.js +3 -1
- package/optimize/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/optimize/es/components/card/card.a11y.js +3 -1
- package/optimize/es/components/color_picker/color_picker.a11y.js +3 -1
- package/optimize/es/components/combo_box/combo_box.a11y.js +3 -1
- package/optimize/es/components/combo_box/combo_box.js +2 -21
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +63 -34
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/es/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/optimize/es/components/control_bar/control_bar.a11y.js +3 -1
- package/optimize/es/components/copy/copy.a11y.js +6 -5
- package/optimize/es/components/datagrid/data_grid.a11y.js +3 -1
- package/optimize/es/components/date_picker/date_picker.a11y.js +3 -1
- package/optimize/es/components/date_picker/date_picker.js +142 -148
- package/optimize/es/components/date_picker/date_picker_range.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/optimize/es/components/delay_hide/delay_hide.a11y.js +9 -9
- package/optimize/es/components/delay_render/delay_render.a11y.js +9 -9
- package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/optimize/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/optimize/es/components/error_boundary/error_boundary.a11y.js +3 -1
- package/optimize/es/components/expression/expression.a11y.js +3 -1
- package/optimize/es/components/filter_group/filter_group.a11y.js +4 -3
- package/optimize/es/components/flyout/flyout.a11y.js +3 -1
- package/optimize/es/components/focus_trap/focus_trap.a11y.js +3 -1
- package/optimize/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
- package/optimize/es/components/form/file_picker/file_picker.js +4 -2
- package/optimize/es/components/form/radio/radio_group.a11y.js +4 -5
- package/optimize/es/components/form/range/range.a11y.js +3 -1
- package/optimize/es/components/form/switch/switch.a11y.js +4 -5
- package/optimize/es/components/form/text_area/text_area.js +10 -3
- package/optimize/es/components/form/validatable_control/index.js +1 -1
- package/optimize/es/components/form/validatable_control/validatable_control.js +49 -9
- package/optimize/es/components/header/header.a11y.js +3 -1
- package/optimize/es/components/icon/icon_ML.a11y.js +3 -1
- package/optimize/es/components/icon/icon_apps.a11y.js +3 -1
- package/optimize/es/components/icon/icon_editor.a11y.js +3 -1
- package/optimize/es/components/icon/icon_elastic.a11y.js +3 -1
- package/optimize/es/components/icon/icon_glyphs.a11y.js +3 -1
- package/optimize/es/components/icon/icon_tokens.a11y.js +3 -1
- package/optimize/es/components/image/image.a11y.js +3 -1
- package/optimize/es/components/index.js +1 -0
- package/optimize/es/components/inline_edit/index.js +10 -0
- package/optimize/es/components/inline_edit/inline_edit.styles.js +15 -0
- package/optimize/es/components/inline_edit/inline_edit_form.js +133 -0
- package/optimize/es/components/inline_edit/inline_edit_text.js +52 -0
- package/optimize/es/components/inline_edit/inline_edit_title.js +56 -0
- package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/optimize/es/components/modal/modal.a11y.js +3 -1
- package/optimize/es/components/notification/notification_event.a11y.js +3 -1
- package/optimize/es/components/page/page_header/page_header.a11y.js +3 -1
- package/optimize/es/components/pagination/pagination.a11y.js +3 -1
- package/optimize/es/components/popover/popover.a11y.js +3 -1
- package/optimize/es/components/popover/popover_footer.js +4 -4
- package/optimize/es/components/popover/popover_footer.styles.js +16 -5
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +8 -5
- package/optimize/es/components/portal/portal.a11y.js +3 -1
- package/optimize/es/components/progress/progress.a11y.js +3 -1
- package/optimize/es/components/resizable_container/resizable_container.a11y.js +3 -1
- package/optimize/es/components/search_bar/search_bar.a11y.js +8 -7
- package/optimize/es/components/selectable/selectable.a11y.js +3 -1
- package/optimize/es/components/side_nav/side_nav.a11y.js +3 -1
- package/optimize/es/components/tabs/tabs.a11y.js +3 -1
- package/optimize/es/components/tree_view/tree_view.a11y.js +3 -1
- package/optimize/lib/components/accordion/accordion.a11y.js +3 -1
- package/optimize/lib/components/accordion/accordion.js +4 -2
- package/optimize/lib/components/basic_table/table.a11y.js +3 -1
- package/optimize/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/optimize/lib/components/card/card.a11y.js +3 -1
- package/optimize/lib/components/color_picker/color_picker.a11y.js +3 -1
- package/optimize/lib/components/combo_box/combo_box.a11y.js +3 -1
- package/optimize/lib/components/combo_box/combo_box.js +2 -21
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +63 -34
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/optimize/lib/components/control_bar/control_bar.a11y.js +3 -1
- package/optimize/lib/components/copy/copy.a11y.js +6 -5
- package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -1
- package/optimize/lib/components/date_picker/date_picker.a11y.js +3 -1
- package/optimize/lib/components/date_picker/date_picker.js +141 -147
- package/optimize/lib/components/date_picker/date_picker_range.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/optimize/lib/components/delay_hide/delay_hide.a11y.js +9 -9
- package/optimize/lib/components/delay_render/delay_render.a11y.js +9 -9
- package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/optimize/lib/components/error_boundary/error_boundary.a11y.js +3 -1
- package/optimize/lib/components/filter_group/filter_group.a11y.js +10 -9
- package/optimize/lib/components/focus_trap/focus_trap.a11y.js +3 -1
- package/optimize/lib/components/form/file_picker/file_picker.js +4 -2
- package/optimize/lib/components/form/radio/radio_group.a11y.js +4 -5
- package/optimize/lib/components/form/range/range.a11y.js +3 -1
- package/optimize/lib/components/form/switch/switch.a11y.js +4 -5
- package/optimize/lib/components/form/text_area/text_area.js +10 -3
- package/optimize/lib/components/form/validatable_control/index.js +6 -0
- package/optimize/lib/components/form/validatable_control/validatable_control.js +52 -12
- package/optimize/lib/components/header/header.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_ML.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_apps.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_editor.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_elastic.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_tokens.a11y.js +3 -1
- package/optimize/lib/components/image/image.a11y.js +3 -1
- package/optimize/lib/components/index.js +11 -0
- package/optimize/lib/components/inline_edit/index.js +19 -0
- package/optimize/lib/components/inline_edit/inline_edit.styles.js +22 -0
- package/optimize/lib/components/inline_edit/inline_edit_form.js +144 -0
- package/optimize/lib/components/inline_edit/inline_edit_text.js +52 -0
- package/optimize/lib/components/inline_edit/inline_edit_title.js +57 -0
- package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/optimize/lib/components/modal/modal.a11y.js +3 -1
- package/optimize/lib/components/notification/notification_event.a11y.js +3 -1
- package/optimize/lib/components/page/page_header/page_header.a11y.js +3 -1
- package/optimize/lib/components/pagination/pagination.a11y.js +3 -1
- package/optimize/lib/components/popover/popover.a11y.js +3 -1
- package/optimize/lib/components/popover/popover_footer.js +4 -4
- package/optimize/lib/components/popover/popover_footer.styles.js +19 -7
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +7 -4
- package/optimize/lib/components/portal/portal.a11y.js +3 -1
- package/optimize/lib/components/progress/progress.a11y.js +3 -1
- package/optimize/lib/components/resizable_container/resizable_container.a11y.js +3 -1
- package/optimize/lib/components/search_bar/search_bar.a11y.js +8 -7
- package/optimize/lib/components/selectable/selectable.a11y.js +3 -1
- package/optimize/lib/components/side_nav/side_nav.a11y.js +3 -1
- package/optimize/lib/components/tree_view/tree_view.a11y.js +3 -1
- package/package.json +1 -1
- package/src/components/combo_box/_combo_box.scss +2 -38
- package/src/components/date_picker/_date_picker_range.scss +1 -1
- package/src/components/form/field_text/_field_text.scss +0 -7
- package/src/components/form/file_picker/_file_picker.scss +3 -2
- package/src/components/form/form_control_layout/_form_control_layout.scss +7 -2
- package/src/components/form/text_area/_text_area.scss +9 -0
- package/test-env/components/accordion/accordion.a11y.js +3 -1
- package/test-env/components/accordion/accordion.js +4 -2
- package/test-env/components/basic_table/table.a11y.js +3 -1
- package/test-env/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/test-env/components/card/card.a11y.js +3 -1
- package/test-env/components/color_picker/color_picker.a11y.js +3 -1
- package/test-env/components/combo_box/combo_box.a11y.js +3 -1
- package/test-env/components/combo_box/combo_box.js +2 -21
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/test-env/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/test-env/components/control_bar/control_bar.a11y.js +3 -1
- package/test-env/components/copy/copy.a11y.js +6 -5
- package/test-env/components/datagrid/data_grid.a11y.js +3 -1
- package/test-env/components/date_picker/date_picker.a11y.js +3 -1
- package/test-env/components/date_picker/date_picker.js +141 -147
- package/test-env/components/date_picker/date_picker_range.js +2 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/test-env/components/delay_hide/delay_hide.a11y.js +9 -9
- package/test-env/components/delay_render/delay_render.a11y.js +9 -9
- package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/test-env/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/test-env/components/error_boundary/error_boundary.a11y.js +3 -1
- package/test-env/components/filter_group/filter_group.a11y.js +10 -9
- package/test-env/components/focus_trap/focus_trap.a11y.js +3 -1
- package/test-env/components/form/file_picker/file_picker.js +4 -2
- package/test-env/components/form/radio/radio_group.a11y.js +4 -5
- package/test-env/components/form/range/range.a11y.js +3 -1
- package/test-env/components/form/switch/switch.a11y.js +4 -5
- package/test-env/components/form/text_area/text_area.js +11 -3
- package/test-env/components/form/validatable_control/index.js +6 -0
- package/test-env/components/form/validatable_control/validatable_control.js +51 -14
- package/test-env/components/header/header.a11y.js +3 -1
- package/test-env/components/icon/icon_ML.a11y.js +3 -1
- package/test-env/components/icon/icon_apps.a11y.js +3 -1
- package/test-env/components/icon/icon_editor.a11y.js +3 -1
- package/test-env/components/icon/icon_elastic.a11y.js +3 -1
- package/test-env/components/icon/icon_glyphs.a11y.js +3 -1
- package/test-env/components/icon/icon_tokens.a11y.js +3 -1
- package/test-env/components/image/image.a11y.js +3 -1
- package/test-env/components/index.js +11 -0
- package/test-env/components/inline_edit/index.js +19 -0
- package/test-env/components/inline_edit/inline_edit.styles.js +22 -0
- package/test-env/components/inline_edit/inline_edit_form.js +196 -0
- package/test-env/components/inline_edit/inline_edit_text.js +96 -0
- package/test-env/components/inline_edit/inline_edit_title.js +105 -0
- package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/test-env/components/modal/modal.a11y.js +3 -1
- package/test-env/components/notification/notification_event.a11y.js +3 -1
- package/test-env/components/page/page_header/page_header.a11y.js +3 -1
- package/test-env/components/pagination/pagination.a11y.js +3 -1
- package/test-env/components/popover/popover.a11y.js +3 -1
- package/test-env/components/popover/popover_footer.js +4 -4
- package/test-env/components/popover/popover_footer.styles.js +19 -7
- package/test-env/components/popover/popover_panel/_popover_panel.js +7 -4
- package/test-env/components/portal/portal.a11y.js +3 -1
- package/test-env/components/progress/progress.a11y.js +3 -1
- package/test-env/components/resizable_container/resizable_container.a11y.js +3 -1
- package/test-env/components/search_bar/search_bar.a11y.js +8 -7
- package/test-env/components/selectable/selectable.a11y.js +3 -1
- package/test-env/components/side_nav/side_nav.a11y.js +3 -1
- package/test-env/components/tree_view/tree_view.a11y.js +3 -1
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
var _excluded = ["adjustDateOnChange", "calendarClassName", "className", "customInput", "dateFormat", "dayClassName", "disabled", "excludeDates", "filterDate", "fullWidth", "iconType", "injectTimes", "inline", "inputRef", "isInvalid", "isLoading", "locale", "maxDate", "maxTime", "minDate", "minTime", "onChange", "onClear", "openToDate", "placeholder", "popperClassName", "popoverPlacement", "selected", "shadow", "shouldCloseOnSelect", "showIcon", "showTimeSelect", "showTimeSelectOnly", "timeFormat", "utcOffset"];
|
|
2
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
4
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
8
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
9
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
13
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
14
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
16
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
11
|
/*
|
|
20
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -24,12 +16,14 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
24
16
|
* Side Public License, v 1.
|
|
25
17
|
*/
|
|
26
18
|
|
|
27
|
-
import React, {
|
|
19
|
+
import React, { useState, useCallback } from 'react';
|
|
28
20
|
import PropTypes from "prop-types";
|
|
29
21
|
import classNames from 'classnames';
|
|
30
22
|
// eslint-disable-line import/named
|
|
31
23
|
|
|
32
|
-
import { EuiFormControlLayout,
|
|
24
|
+
import { EuiFormControlLayout, useEuiValidatableControl } from '../form';
|
|
25
|
+
import { getFormControlClassNameForIconCount } from '../form/form_control_layout/_num_icons';
|
|
26
|
+
import { useCombinedRefs } from '../../services';
|
|
33
27
|
import { EuiI18nConsumer } from '../context';
|
|
34
28
|
import { ReactDatePicker } from './react-datepicker';
|
|
35
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -62,146 +56,145 @@ var unsupportedProps = [
|
|
|
62
56
|
'showMonthYearDropdown',
|
|
63
57
|
// We overridde this with `popoverPlacement`
|
|
64
58
|
'popperPlacement'];
|
|
65
|
-
export var EuiDatePicker =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
export var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
60
|
+
var _ref$adjustDateOnChan = _ref.adjustDateOnChange,
|
|
61
|
+
adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
|
|
62
|
+
calendarClassName = _ref.calendarClassName,
|
|
63
|
+
className = _ref.className,
|
|
64
|
+
customInput = _ref.customInput,
|
|
65
|
+
_ref$dateFormat = _ref.dateFormat,
|
|
66
|
+
dateFormat = _ref$dateFormat === void 0 ? euiDatePickerDefaultDateFormat : _ref$dateFormat,
|
|
67
|
+
dayClassName = _ref.dayClassName,
|
|
68
|
+
disabled = _ref.disabled,
|
|
69
|
+
excludeDates = _ref.excludeDates,
|
|
70
|
+
filterDate = _ref.filterDate,
|
|
71
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
72
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
73
|
+
iconType = _ref.iconType,
|
|
74
|
+
injectTimes = _ref.injectTimes,
|
|
75
|
+
inline = _ref.inline,
|
|
76
|
+
inputRef = _ref.inputRef,
|
|
77
|
+
isInvalid = _ref.isInvalid,
|
|
78
|
+
isLoading = _ref.isLoading,
|
|
79
|
+
locale = _ref.locale,
|
|
80
|
+
maxDate = _ref.maxDate,
|
|
81
|
+
maxTime = _ref.maxTime,
|
|
82
|
+
minDate = _ref.minDate,
|
|
83
|
+
minTime = _ref.minTime,
|
|
84
|
+
onChange = _ref.onChange,
|
|
85
|
+
onClear = _ref.onClear,
|
|
86
|
+
openToDate = _ref.openToDate,
|
|
87
|
+
placeholder = _ref.placeholder,
|
|
88
|
+
popperClassName = _ref.popperClassName,
|
|
89
|
+
_ref$popoverPlacement = _ref.popoverPlacement,
|
|
90
|
+
popoverPlacement = _ref$popoverPlacement === void 0 ? 'downLeft' : _ref$popoverPlacement,
|
|
91
|
+
selected = _ref.selected,
|
|
92
|
+
_ref$shadow = _ref.shadow,
|
|
93
|
+
shadow = _ref$shadow === void 0 ? true : _ref$shadow,
|
|
94
|
+
_ref$shouldCloseOnSel = _ref.shouldCloseOnSelect,
|
|
95
|
+
shouldCloseOnSelect = _ref$shouldCloseOnSel === void 0 ? true : _ref$shouldCloseOnSel,
|
|
96
|
+
_ref$showIcon = _ref.showIcon,
|
|
97
|
+
showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
|
|
98
|
+
_ref$showTimeSelect = _ref.showTimeSelect,
|
|
99
|
+
showTimeSelect = _ref$showTimeSelect === void 0 ? false : _ref$showTimeSelect,
|
|
100
|
+
showTimeSelectOnly = _ref.showTimeSelectOnly,
|
|
101
|
+
_ref$timeFormat = _ref.timeFormat,
|
|
102
|
+
timeFormat = _ref$timeFormat === void 0 ? euiDatePickerDefaultTimeFormat : _ref$timeFormat,
|
|
103
|
+
utcOffset = _ref.utcOffset,
|
|
104
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
105
|
+
var classes = classNames('euiDatePicker', {
|
|
106
|
+
'euiDatePicker--shadow': shadow,
|
|
107
|
+
'euiDatePicker--inline': inline
|
|
108
|
+
});
|
|
109
|
+
var numIconsClass = getFormControlClassNameForIconCount({
|
|
110
|
+
isInvalid: isInvalid,
|
|
111
|
+
isLoading: isLoading
|
|
112
|
+
});
|
|
113
|
+
var datePickerClasses = classNames('euiDatePicker', 'euiFieldText', numIconsClass, {
|
|
114
|
+
'euiFieldText--fullWidth': fullWidth,
|
|
115
|
+
'euiFieldText-isLoading': isLoading,
|
|
116
|
+
'euiFieldText--withIcon': !inline && showIcon,
|
|
117
|
+
'euiFieldText--isClearable': !inline && selected && onClear
|
|
118
|
+
}, className);
|
|
119
|
+
var optionalIcon;
|
|
120
|
+
if (inline || customInput || !showIcon) {
|
|
121
|
+
optionalIcon = undefined;
|
|
122
|
+
} else if (iconType) {
|
|
123
|
+
optionalIcon = iconType;
|
|
124
|
+
} else if (showTimeSelectOnly) {
|
|
125
|
+
optionalIcon = 'clock';
|
|
126
|
+
} else {
|
|
127
|
+
optionalIcon = 'calendar';
|
|
71
128
|
}
|
|
72
|
-
_createClass(EuiDatePicker, [{
|
|
73
|
-
key: "render",
|
|
74
|
-
value: function render() {
|
|
75
|
-
var _this$props = this.props,
|
|
76
|
-
adjustDateOnChange = _this$props.adjustDateOnChange,
|
|
77
|
-
calendarClassName = _this$props.calendarClassName,
|
|
78
|
-
className = _this$props.className,
|
|
79
|
-
customInput = _this$props.customInput,
|
|
80
|
-
dateFormat = _this$props.dateFormat,
|
|
81
|
-
dayClassName = _this$props.dayClassName,
|
|
82
|
-
disabled = _this$props.disabled,
|
|
83
|
-
excludeDates = _this$props.excludeDates,
|
|
84
|
-
filterDate = _this$props.filterDate,
|
|
85
|
-
fullWidth = _this$props.fullWidth,
|
|
86
|
-
iconType = _this$props.iconType,
|
|
87
|
-
injectTimes = _this$props.injectTimes,
|
|
88
|
-
inline = _this$props.inline,
|
|
89
|
-
inputRef = _this$props.inputRef,
|
|
90
|
-
isInvalid = _this$props.isInvalid,
|
|
91
|
-
isLoading = _this$props.isLoading,
|
|
92
|
-
locale = _this$props.locale,
|
|
93
|
-
maxDate = _this$props.maxDate,
|
|
94
|
-
maxTime = _this$props.maxTime,
|
|
95
|
-
minDate = _this$props.minDate,
|
|
96
|
-
minTime = _this$props.minTime,
|
|
97
|
-
onChange = _this$props.onChange,
|
|
98
|
-
onClear = _this$props.onClear,
|
|
99
|
-
openToDate = _this$props.openToDate,
|
|
100
|
-
placeholder = _this$props.placeholder,
|
|
101
|
-
popperClassName = _this$props.popperClassName,
|
|
102
|
-
popoverPlacement = _this$props.popoverPlacement,
|
|
103
|
-
selected = _this$props.selected,
|
|
104
|
-
shadow = _this$props.shadow,
|
|
105
|
-
shouldCloseOnSelect = _this$props.shouldCloseOnSelect,
|
|
106
|
-
showIcon = _this$props.showIcon,
|
|
107
|
-
showTimeSelect = _this$props.showTimeSelect,
|
|
108
|
-
showTimeSelectOnly = _this$props.showTimeSelectOnly,
|
|
109
|
-
timeFormat = _this$props.timeFormat,
|
|
110
|
-
utcOffset = _this$props.utcOffset,
|
|
111
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
112
|
-
var classes = classNames('euiDatePicker', {
|
|
113
|
-
'euiDatePicker--shadow': shadow,
|
|
114
|
-
'euiDatePicker--inline': inline
|
|
115
|
-
});
|
|
116
|
-
var datePickerClasses = classNames('euiDatePicker', 'euiFieldText', {
|
|
117
|
-
'euiFieldText--fullWidth': fullWidth,
|
|
118
|
-
'euiFieldText-isLoading': isLoading,
|
|
119
|
-
'euiFieldText--withIcon': !inline && showIcon,
|
|
120
|
-
'euiFieldText--isClearable': !inline && selected && onClear,
|
|
121
|
-
'euiFieldText-isInvalid': isInvalid
|
|
122
|
-
}, className);
|
|
123
|
-
var optionalIcon;
|
|
124
|
-
if (inline || customInput || !showIcon) {
|
|
125
|
-
optionalIcon = undefined;
|
|
126
|
-
} else if (iconType) {
|
|
127
|
-
optionalIcon = iconType;
|
|
128
|
-
} else if (showTimeSelectOnly) {
|
|
129
|
-
optionalIcon = 'clock';
|
|
130
|
-
} else {
|
|
131
|
-
optionalIcon = 'calendar';
|
|
132
|
-
}
|
|
133
129
|
|
|
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
|
-
timeFormat: euiDatePickerDefaultTimeFormat,
|
|
203
|
-
popoverPlacement: 'downLeft'
|
|
204
|
-
});
|
|
130
|
+
// In case the consumer did not alter the default date format but wants
|
|
131
|
+
// to add the time select, we append the default time format
|
|
132
|
+
var fullDateFormat = dateFormat;
|
|
133
|
+
if (showTimeSelect && dateFormat === euiDatePickerDefaultDateFormat) {
|
|
134
|
+
fullDateFormat = "".concat(dateFormat, " ").concat(timeFormat);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Set an internal ref on ReactDatePicker's `input` so we can set its :invalid state via useEuiValidatableControl
|
|
138
|
+
var _useState = useState(null),
|
|
139
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
140
|
+
inputValidityRef = _useState2[0],
|
|
141
|
+
_setInputValidityRef = _useState2[1];
|
|
142
|
+
var setInputValidityRef = useCallback(function (ref) {
|
|
143
|
+
_setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
|
|
144
|
+
}, []);
|
|
145
|
+
useEuiValidatableControl({
|
|
146
|
+
isInvalid: isInvalid,
|
|
147
|
+
controlEl: inputValidityRef
|
|
148
|
+
});
|
|
149
|
+
var inputRefs = useCombinedRefs([inputRef, setInputValidityRef]);
|
|
150
|
+
return ___EmotionJSX("span", {
|
|
151
|
+
className: classes
|
|
152
|
+
}, ___EmotionJSX(EuiFormControlLayout, {
|
|
153
|
+
icon: optionalIcon,
|
|
154
|
+
fullWidth: fullWidth,
|
|
155
|
+
clear: selected && onClear ? {
|
|
156
|
+
onClick: onClear
|
|
157
|
+
} : undefined,
|
|
158
|
+
isLoading: isLoading,
|
|
159
|
+
isInvalid: isInvalid
|
|
160
|
+
}, ___EmotionJSX(EuiI18nConsumer, null, function (_ref2) {
|
|
161
|
+
var contextLocale = _ref2.locale;
|
|
162
|
+
return ___EmotionJSX(ReactDatePicker, _extends({
|
|
163
|
+
adjustDateOnChange: adjustDateOnChange,
|
|
164
|
+
calendarClassName: calendarClassName,
|
|
165
|
+
className: datePickerClasses,
|
|
166
|
+
customInput: customInput,
|
|
167
|
+
dateFormat: fullDateFormat,
|
|
168
|
+
dayClassName: dayClassName,
|
|
169
|
+
disabled: disabled,
|
|
170
|
+
excludeDates: excludeDates,
|
|
171
|
+
filterDate: filterDate,
|
|
172
|
+
injectTimes: injectTimes,
|
|
173
|
+
inline: inline,
|
|
174
|
+
locale: locale || contextLocale,
|
|
175
|
+
maxDate: maxDate,
|
|
176
|
+
maxTime: maxTime,
|
|
177
|
+
minDate: minDate,
|
|
178
|
+
minTime: minTime,
|
|
179
|
+
onChange: onChange,
|
|
180
|
+
openToDate: openToDate,
|
|
181
|
+
placeholderText: placeholder,
|
|
182
|
+
popperClassName: popperClassName,
|
|
183
|
+
ref: inputRefs,
|
|
184
|
+
selected: selected,
|
|
185
|
+
shouldCloseOnSelect: shouldCloseOnSelect,
|
|
186
|
+
showMonthDropdown: true,
|
|
187
|
+
showTimeSelect: showTimeSelectOnly ? true : showTimeSelect,
|
|
188
|
+
showTimeSelectOnly: showTimeSelectOnly,
|
|
189
|
+
showYearDropdown: true,
|
|
190
|
+
timeFormat: timeFormat,
|
|
191
|
+
utcOffset: utcOffset,
|
|
192
|
+
yearDropdownItemNumber: 7,
|
|
193
|
+
accessibleMode: true,
|
|
194
|
+
popperPlacement: popoverPlacement
|
|
195
|
+
}, rest));
|
|
196
|
+
})));
|
|
197
|
+
};
|
|
205
198
|
EuiDatePicker.propTypes = {
|
|
206
199
|
className: PropTypes.string,
|
|
207
200
|
"aria-label": PropTypes.string,
|
|
@@ -218,7 +211,7 @@ EuiDatePicker.propTypes = {
|
|
|
218
211
|
/**
|
|
219
212
|
* ref for the ReactDatePicker instance
|
|
220
213
|
*/
|
|
221
|
-
inputRef: PropTypes.any
|
|
214
|
+
inputRef: PropTypes.any,
|
|
222
215
|
/**
|
|
223
216
|
* Provides styling to the input when invalid
|
|
224
217
|
*/
|
|
@@ -82,7 +82,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
82
82
|
className: "euiDatePickerRange__delimeter"
|
|
83
83
|
}, ___EmotionJSX(EuiIcon, {
|
|
84
84
|
color: isInvalid ? 'danger' : 'subdued',
|
|
85
|
-
type:
|
|
85
|
+
type: "sortRight"
|
|
86
86
|
}));
|
|
87
87
|
return ___EmotionJSX("div", _extends({
|
|
88
88
|
className: classes
|
|
@@ -114,7 +114,7 @@ EuiDatePickerRange.propTypes = {
|
|
|
114
114
|
*/
|
|
115
115
|
isCustom: PropTypes.bool,
|
|
116
116
|
/**
|
|
117
|
-
* Will
|
|
117
|
+
* Will color the range delimiter the `danger` color and pass through to each control
|
|
118
118
|
*/
|
|
119
119
|
isInvalid: PropTypes.bool,
|
|
120
120
|
/**
|
|
@@ -13,7 +13,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
/// <reference types="
|
|
16
|
+
/// <reference types="cypress" />
|
|
17
|
+
/// <reference types="cypress-real-events" />
|
|
18
|
+
/// <reference types="../../../../cypress/support" />
|
|
17
19
|
|
|
18
20
|
import React, { useState } from 'react';
|
|
19
21
|
import { EuiSuperDatePicker } from './super_date_picker';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiDelayHide } from './delay_hide';
|
|
@@ -29,22 +31,20 @@ var DelayHide = function DelayHide() {
|
|
|
29
31
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
32
|
hide = _useState4[0],
|
|
31
33
|
setHide = _useState4[1];
|
|
32
|
-
var onChangeMinimumDuration = function onChangeMinimumDuration(event) {
|
|
33
|
-
setDuration(parseInt(event.target.value, 10));
|
|
34
|
-
};
|
|
35
|
-
var onChangeHide = function onChangeHide(event) {
|
|
36
|
-
setHide(event.target.checked);
|
|
37
|
-
};
|
|
38
34
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiCheckbox, {
|
|
39
35
|
id: "dummy-id",
|
|
40
36
|
checked: hide,
|
|
41
|
-
onChange:
|
|
37
|
+
onChange: function onChange(event) {
|
|
38
|
+
return setHide(event.target.checked);
|
|
39
|
+
},
|
|
42
40
|
label: "Hide child"
|
|
43
41
|
})), ___EmotionJSX(EuiFormRow, {
|
|
44
42
|
label: "Minimum duration"
|
|
45
43
|
}, ___EmotionJSX(EuiFieldNumber, {
|
|
46
44
|
value: minimumDuration,
|
|
47
|
-
onChange:
|
|
45
|
+
onChange: function onChange(event) {
|
|
46
|
+
return setDuration(parseInt(event.target.value, 10));
|
|
47
|
+
}
|
|
48
48
|
})), ___EmotionJSX(EuiFormRow, {
|
|
49
49
|
label: "Child to render"
|
|
50
50
|
}, ___EmotionJSX(EuiDelayHide, {
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiDelayRender } from './delay_render';
|
|
@@ -29,24 +31,22 @@ var DelayRender = function DelayRender() {
|
|
|
29
31
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
32
|
render = _useState4[0],
|
|
31
33
|
setRender = _useState4[1];
|
|
32
|
-
var onChangeMinimumDelay = function onChangeMinimumDelay(event) {
|
|
33
|
-
setDelay(parseInt(event.target.value, 10));
|
|
34
|
-
};
|
|
35
|
-
var onChangeHide = function onChangeHide(event) {
|
|
36
|
-
setRender(event.target.checked);
|
|
37
|
-
};
|
|
38
34
|
var status = render ? 'showing' : 'hidden';
|
|
39
35
|
var label = "Child (".concat(status, ")");
|
|
40
36
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiCheckbox, {
|
|
41
37
|
id: "dummy-id",
|
|
42
38
|
checked: render,
|
|
43
|
-
onChange:
|
|
39
|
+
onChange: function onChange(event) {
|
|
40
|
+
return setRender(event.target.checked);
|
|
41
|
+
},
|
|
44
42
|
label: "Show child"
|
|
45
43
|
})), ___EmotionJSX(EuiFormRow, {
|
|
46
44
|
label: "Minimum delay"
|
|
47
45
|
}, ___EmotionJSX(EuiFieldNumber, {
|
|
48
46
|
value: minimumDelay,
|
|
49
|
-
onChange:
|
|
47
|
+
onChange: function onChange(event) {
|
|
48
|
+
return setDelay(parseInt(event.target.value, 10));
|
|
49
|
+
}
|
|
50
50
|
})), ___EmotionJSX(EuiFormRow, {
|
|
51
51
|
label: label
|
|
52
52
|
}, render ? ___EmotionJSX(EuiDelayRender, {
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiDragDropContext } from './drag_drop_context';
|
|
@@ -41,7 +43,6 @@ var DragAndDrop = function DragAndDrop() {
|
|
|
41
43
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
44
|
list = _useState2[0],
|
|
43
45
|
setList = _useState2[1];
|
|
44
|
-
console.log(list);
|
|
45
46
|
var onDragEnd = function onDragEnd(_ref) {
|
|
46
47
|
var source = _ref.source,
|
|
47
48
|
destination = _ref.destination;
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/// <reference types="
|
|
9
|
+
/// <reference types="cypress" />
|
|
10
|
+
/// <reference types="cypress-real-events" />
|
|
11
|
+
/// <reference types="../../../cypress/support" />
|
|
10
12
|
|
|
11
13
|
import React from 'react';
|
|
12
14
|
import { EuiButton } from '../button';
|
|
@@ -14,10 +16,11 @@ import { EuiEmptyPrompt } from './empty_prompt';
|
|
|
14
16
|
import { EuiLink } from '../link';
|
|
15
17
|
import { EuiTitle } from '../title';
|
|
16
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
-
|
|
18
|
-
var addCaseSpy =
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
beforeEach(function () {
|
|
20
|
+
var addCaseSpy = cy.spy().as('addCaseSpy');
|
|
21
|
+
var addLinkSpy = cy.spy().as('addLinkSpy');
|
|
22
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
23
|
+
cy.realMount(___EmotionJSX(EuiEmptyPrompt, {
|
|
21
24
|
iconType: "logoSecurity",
|
|
22
25
|
title: ___EmotionJSX("h2", null, "Start adding cases"),
|
|
23
26
|
body: ___EmotionJSX("p", null, "Add a new case or change your filter settings."),
|
|
@@ -32,15 +35,6 @@ var EmptyPrompt = function EmptyPrompt(_ref) {
|
|
|
32
35
|
href: "#",
|
|
33
36
|
onClick: addLinkSpy
|
|
34
37
|
}, "Read the docs"))
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
beforeEach(function () {
|
|
38
|
-
var addCaseSpy = cy.spy().as('addCaseSpy');
|
|
39
|
-
var addLinkSpy = cy.spy().as('addLinkSpy');
|
|
40
|
-
cy.viewport(1024, 768); // medium breakpoint
|
|
41
|
-
cy.realMount(___EmotionJSX(EmptyPrompt, {
|
|
42
|
-
addCaseSpy: addCaseSpy,
|
|
43
|
-
addLinkSpy: addLinkSpy
|
|
44
38
|
}));
|
|
45
39
|
});
|
|
46
40
|
describe('EuiEmptyPrompt', function () {
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/// <reference types="
|
|
9
|
+
/// <reference types="cypress" />
|
|
10
|
+
/// <reference types="cypress-real-events" />
|
|
11
|
+
/// <reference types="../../../cypress/support" />
|
|
10
12
|
|
|
11
13
|
import React from 'react';
|
|
12
14
|
import { EuiButton } from '../button';
|
|
@@ -18,7 +18,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
* Side Public License, v 1.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/// <reference types="
|
|
21
|
+
/// <reference types="cypress" />
|
|
22
|
+
/// <reference types="cypress-real-events" />
|
|
23
|
+
/// <reference types="../../../cypress/support" />
|
|
22
24
|
|
|
23
25
|
import React, { useState } from 'react';
|
|
24
26
|
import { EuiExpression } from './expression';
|
|
@@ -12,14 +12,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
|
-
import { EuiFilterButton } from './filter_button';
|
|
19
|
-
import { EuiFilterGroup } from './filter_group';
|
|
20
20
|
import { EuiPopover, EuiPopoverTitle } from '../popover';
|
|
21
21
|
import { EuiSelectable } from '../selectable';
|
|
22
22
|
import { useGeneratedHtmlId } from '../../services';
|
|
23
|
+
import { EuiFilterGroup, EuiFilterButton } from './index';
|
|
23
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
25
|
describe('EuiFilterGroup single filter example', function () {
|
|
25
26
|
var SingleFilter = function SingleFilter() {
|
|
@@ -16,7 +16,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/// <reference types="
|
|
19
|
+
/// <reference types="cypress" />
|
|
20
|
+
/// <reference types="cypress-real-events" />
|
|
21
|
+
/// <reference types="../../../cypress/support" />
|
|
20
22
|
|
|
21
23
|
import React, { useState } from 'react';
|
|
22
24
|
import { EuiFlyout } from './flyout';
|
|
@@ -16,7 +16,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/// <reference types="
|
|
19
|
+
/// <reference types="cypress" />
|
|
20
|
+
/// <reference types="cypress-real-events" />
|
|
21
|
+
/// <reference types="../../../cypress/support" />
|
|
20
22
|
|
|
21
23
|
import React, { useState } from 'react';
|
|
22
24
|
import { EuiBadge } from '../badge';
|
|
@@ -18,7 +18,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
* Side Public License, v 1.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/// <reference types="
|
|
21
|
+
/// <reference types="cypress" />
|
|
22
|
+
/// <reference types="cypress-real-events" />
|
|
23
|
+
/// <reference types="../../../../cypress/support" />
|
|
22
24
|
|
|
23
25
|
import React, { useState } from 'react';
|
|
24
26
|
import { EuiCheckboxGroup } from './checkbox_group';
|
|
@@ -203,8 +203,10 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
203
203
|
id: promptId
|
|
204
204
|
}, ___EmotionJSX(EuiIcon, {
|
|
205
205
|
className: "euiFilePicker__icon",
|
|
206
|
-
color: disabled ? 'subdued' : 'primary'
|
|
207
|
-
|
|
206
|
+
color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary' // eslint-disable-line no-nested-ternary
|
|
207
|
+
,
|
|
208
|
+
|
|
209
|
+
type: isInvalid ? 'alert' : 'importAction',
|
|
208
210
|
size: normalFormControl ? 'm' : 'l',
|
|
209
211
|
"aria-hidden": "true"
|
|
210
212
|
}), ___EmotionJSX("div", {
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiRadioGroup } from './radio_group';
|
|
@@ -40,14 +42,11 @@ var RadioGroup = function RadioGroup() {
|
|
|
40
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
41
43
|
radioIdSelected = _useState2[0],
|
|
42
44
|
setRadioIdSelected = _useState2[1];
|
|
43
|
-
var _onChange = function onChange(optionId) {
|
|
44
|
-
setRadioIdSelected(optionId);
|
|
45
|
-
};
|
|
46
45
|
return ___EmotionJSX(EuiRadioGroup, {
|
|
47
46
|
options: radios,
|
|
48
47
|
idSelected: radioIdSelected,
|
|
49
48
|
onChange: function onChange(id) {
|
|
50
|
-
return
|
|
49
|
+
return setRadioIdSelected(id);
|
|
51
50
|
},
|
|
52
51
|
name: "radio group",
|
|
53
52
|
legend: {
|