@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
|
@@ -7,25 +7,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.euiDatePickerDefaultTimeFormat = exports.euiDatePickerDefaultDateFormat = exports.EuiDatePicker = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
20
15
|
var _form = require("../form");
|
|
16
|
+
var _num_icons = require("../form/form_control_layout/_num_icons");
|
|
17
|
+
var _services = require("../../services");
|
|
21
18
|
var _context = require("../context");
|
|
22
19
|
var _reactDatepicker = require("./react-datepicker");
|
|
23
20
|
var _react2 = require("@emotion/react");
|
|
24
21
|
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"];
|
|
25
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
|
-
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; } }
|
|
29
24
|
var euiDatePickerDefaultDateFormat = 'MM/DD/YYYY';
|
|
30
25
|
exports.euiDatePickerDefaultDateFormat = euiDatePickerDefaultDateFormat;
|
|
31
26
|
var euiDatePickerDefaultTimeFormat = 'hh:mm A';
|
|
@@ -57,147 +52,146 @@ var unsupportedProps = [
|
|
|
57
52
|
'showMonthYearDropdown',
|
|
58
53
|
// We overridde this with `popoverPlacement`
|
|
59
54
|
'popperPlacement'];
|
|
60
|
-
var EuiDatePicker =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
var EuiDatePicker = function EuiDatePicker(_ref) {
|
|
56
|
+
var _ref$adjustDateOnChan = _ref.adjustDateOnChange,
|
|
57
|
+
adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
|
|
58
|
+
calendarClassName = _ref.calendarClassName,
|
|
59
|
+
className = _ref.className,
|
|
60
|
+
customInput = _ref.customInput,
|
|
61
|
+
_ref$dateFormat = _ref.dateFormat,
|
|
62
|
+
dateFormat = _ref$dateFormat === void 0 ? euiDatePickerDefaultDateFormat : _ref$dateFormat,
|
|
63
|
+
dayClassName = _ref.dayClassName,
|
|
64
|
+
disabled = _ref.disabled,
|
|
65
|
+
excludeDates = _ref.excludeDates,
|
|
66
|
+
filterDate = _ref.filterDate,
|
|
67
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
68
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
69
|
+
iconType = _ref.iconType,
|
|
70
|
+
injectTimes = _ref.injectTimes,
|
|
71
|
+
inline = _ref.inline,
|
|
72
|
+
inputRef = _ref.inputRef,
|
|
73
|
+
isInvalid = _ref.isInvalid,
|
|
74
|
+
isLoading = _ref.isLoading,
|
|
75
|
+
locale = _ref.locale,
|
|
76
|
+
maxDate = _ref.maxDate,
|
|
77
|
+
maxTime = _ref.maxTime,
|
|
78
|
+
minDate = _ref.minDate,
|
|
79
|
+
minTime = _ref.minTime,
|
|
80
|
+
onChange = _ref.onChange,
|
|
81
|
+
onClear = _ref.onClear,
|
|
82
|
+
openToDate = _ref.openToDate,
|
|
83
|
+
placeholder = _ref.placeholder,
|
|
84
|
+
popperClassName = _ref.popperClassName,
|
|
85
|
+
_ref$popoverPlacement = _ref.popoverPlacement,
|
|
86
|
+
popoverPlacement = _ref$popoverPlacement === void 0 ? 'downLeft' : _ref$popoverPlacement,
|
|
87
|
+
selected = _ref.selected,
|
|
88
|
+
_ref$shadow = _ref.shadow,
|
|
89
|
+
shadow = _ref$shadow === void 0 ? true : _ref$shadow,
|
|
90
|
+
_ref$shouldCloseOnSel = _ref.shouldCloseOnSelect,
|
|
91
|
+
shouldCloseOnSelect = _ref$shouldCloseOnSel === void 0 ? true : _ref$shouldCloseOnSel,
|
|
92
|
+
_ref$showIcon = _ref.showIcon,
|
|
93
|
+
showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
|
|
94
|
+
_ref$showTimeSelect = _ref.showTimeSelect,
|
|
95
|
+
showTimeSelect = _ref$showTimeSelect === void 0 ? false : _ref$showTimeSelect,
|
|
96
|
+
showTimeSelectOnly = _ref.showTimeSelectOnly,
|
|
97
|
+
_ref$timeFormat = _ref.timeFormat,
|
|
98
|
+
timeFormat = _ref$timeFormat === void 0 ? euiDatePickerDefaultTimeFormat : _ref$timeFormat,
|
|
99
|
+
utcOffset = _ref.utcOffset,
|
|
100
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
101
|
+
var classes = (0, _classnames.default)('euiDatePicker', {
|
|
102
|
+
'euiDatePicker--shadow': shadow,
|
|
103
|
+
'euiDatePicker--inline': inline
|
|
104
|
+
});
|
|
105
|
+
var numIconsClass = (0, _num_icons.getFormControlClassNameForIconCount)({
|
|
106
|
+
isInvalid: isInvalid,
|
|
107
|
+
isLoading: isLoading
|
|
108
|
+
});
|
|
109
|
+
var datePickerClasses = (0, _classnames.default)('euiDatePicker', 'euiFieldText', numIconsClass, {
|
|
110
|
+
'euiFieldText--fullWidth': fullWidth,
|
|
111
|
+
'euiFieldText-isLoading': isLoading,
|
|
112
|
+
'euiFieldText--withIcon': !inline && showIcon,
|
|
113
|
+
'euiFieldText--isClearable': !inline && selected && onClear
|
|
114
|
+
}, className);
|
|
115
|
+
var optionalIcon;
|
|
116
|
+
if (inline || customInput || !showIcon) {
|
|
117
|
+
optionalIcon = undefined;
|
|
118
|
+
} else if (iconType) {
|
|
119
|
+
optionalIcon = iconType;
|
|
120
|
+
} else if (showTimeSelectOnly) {
|
|
121
|
+
optionalIcon = 'clock';
|
|
122
|
+
} else {
|
|
123
|
+
optionalIcon = 'calendar';
|
|
66
124
|
}
|
|
67
|
-
(0, _createClass2.default)(EuiDatePicker, [{
|
|
68
|
-
key: "render",
|
|
69
|
-
value: function render() {
|
|
70
|
-
var _this$props = this.props,
|
|
71
|
-
adjustDateOnChange = _this$props.adjustDateOnChange,
|
|
72
|
-
calendarClassName = _this$props.calendarClassName,
|
|
73
|
-
className = _this$props.className,
|
|
74
|
-
customInput = _this$props.customInput,
|
|
75
|
-
dateFormat = _this$props.dateFormat,
|
|
76
|
-
dayClassName = _this$props.dayClassName,
|
|
77
|
-
disabled = _this$props.disabled,
|
|
78
|
-
excludeDates = _this$props.excludeDates,
|
|
79
|
-
filterDate = _this$props.filterDate,
|
|
80
|
-
fullWidth = _this$props.fullWidth,
|
|
81
|
-
iconType = _this$props.iconType,
|
|
82
|
-
injectTimes = _this$props.injectTimes,
|
|
83
|
-
inline = _this$props.inline,
|
|
84
|
-
inputRef = _this$props.inputRef,
|
|
85
|
-
isInvalid = _this$props.isInvalid,
|
|
86
|
-
isLoading = _this$props.isLoading,
|
|
87
|
-
locale = _this$props.locale,
|
|
88
|
-
maxDate = _this$props.maxDate,
|
|
89
|
-
maxTime = _this$props.maxTime,
|
|
90
|
-
minDate = _this$props.minDate,
|
|
91
|
-
minTime = _this$props.minTime,
|
|
92
|
-
onChange = _this$props.onChange,
|
|
93
|
-
onClear = _this$props.onClear,
|
|
94
|
-
openToDate = _this$props.openToDate,
|
|
95
|
-
placeholder = _this$props.placeholder,
|
|
96
|
-
popperClassName = _this$props.popperClassName,
|
|
97
|
-
popoverPlacement = _this$props.popoverPlacement,
|
|
98
|
-
selected = _this$props.selected,
|
|
99
|
-
shadow = _this$props.shadow,
|
|
100
|
-
shouldCloseOnSelect = _this$props.shouldCloseOnSelect,
|
|
101
|
-
showIcon = _this$props.showIcon,
|
|
102
|
-
showTimeSelect = _this$props.showTimeSelect,
|
|
103
|
-
showTimeSelectOnly = _this$props.showTimeSelectOnly,
|
|
104
|
-
timeFormat = _this$props.timeFormat,
|
|
105
|
-
utcOffset = _this$props.utcOffset,
|
|
106
|
-
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
107
|
-
var classes = (0, _classnames.default)('euiDatePicker', {
|
|
108
|
-
'euiDatePicker--shadow': shadow,
|
|
109
|
-
'euiDatePicker--inline': inline
|
|
110
|
-
});
|
|
111
|
-
var datePickerClasses = (0, _classnames.default)('euiDatePicker', 'euiFieldText', {
|
|
112
|
-
'euiFieldText--fullWidth': fullWidth,
|
|
113
|
-
'euiFieldText-isLoading': isLoading,
|
|
114
|
-
'euiFieldText--withIcon': !inline && showIcon,
|
|
115
|
-
'euiFieldText--isClearable': !inline && selected && onClear,
|
|
116
|
-
'euiFieldText-isInvalid': isInvalid
|
|
117
|
-
}, className);
|
|
118
|
-
var optionalIcon;
|
|
119
|
-
if (inline || customInput || !showIcon) {
|
|
120
|
-
optionalIcon = undefined;
|
|
121
|
-
} else if (iconType) {
|
|
122
|
-
optionalIcon = iconType;
|
|
123
|
-
} else if (showTimeSelectOnly) {
|
|
124
|
-
optionalIcon = 'clock';
|
|
125
|
-
} else {
|
|
126
|
-
optionalIcon = 'calendar';
|
|
127
|
-
}
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
126
|
+
// In case the consumer did not alter the default date format but wants
|
|
127
|
+
// to add the time select, we append the default time format
|
|
128
|
+
var fullDateFormat = dateFormat;
|
|
129
|
+
if (showTimeSelect && dateFormat === euiDatePickerDefaultDateFormat) {
|
|
130
|
+
fullDateFormat = "".concat(dateFormat, " ").concat(timeFormat);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Set an internal ref on ReactDatePicker's `input` so we can set its :invalid state via useEuiValidatableControl
|
|
134
|
+
var _useState = (0, _react.useState)(null),
|
|
135
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
136
|
+
inputValidityRef = _useState2[0],
|
|
137
|
+
_setInputValidityRef = _useState2[1];
|
|
138
|
+
var setInputValidityRef = (0, _react.useCallback)(function (ref) {
|
|
139
|
+
_setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
|
|
140
|
+
}, []);
|
|
141
|
+
(0, _form.useEuiValidatableControl)({
|
|
142
|
+
isInvalid: isInvalid,
|
|
143
|
+
controlEl: inputValidityRef
|
|
144
|
+
});
|
|
145
|
+
var inputRefs = (0, _services.useCombinedRefs)([inputRef, setInputValidityRef]);
|
|
146
|
+
return (0, _react2.jsx)("span", {
|
|
147
|
+
className: classes
|
|
148
|
+
}, (0, _react2.jsx)(_form.EuiFormControlLayout, {
|
|
149
|
+
icon: optionalIcon,
|
|
150
|
+
fullWidth: fullWidth,
|
|
151
|
+
clear: selected && onClear ? {
|
|
152
|
+
onClick: onClear
|
|
153
|
+
} : undefined,
|
|
154
|
+
isLoading: isLoading,
|
|
155
|
+
isInvalid: isInvalid
|
|
156
|
+
}, (0, _react2.jsx)(_context.EuiI18nConsumer, null, function (_ref2) {
|
|
157
|
+
var contextLocale = _ref2.locale;
|
|
158
|
+
return (0, _react2.jsx)(_reactDatepicker.ReactDatePicker, (0, _extends2.default)({
|
|
159
|
+
adjustDateOnChange: adjustDateOnChange,
|
|
160
|
+
calendarClassName: calendarClassName,
|
|
161
|
+
className: datePickerClasses,
|
|
162
|
+
customInput: customInput,
|
|
163
|
+
dateFormat: fullDateFormat,
|
|
164
|
+
dayClassName: dayClassName,
|
|
165
|
+
disabled: disabled,
|
|
166
|
+
excludeDates: excludeDates,
|
|
167
|
+
filterDate: filterDate,
|
|
168
|
+
injectTimes: injectTimes,
|
|
169
|
+
inline: inline,
|
|
170
|
+
locale: locale || contextLocale,
|
|
171
|
+
maxDate: maxDate,
|
|
172
|
+
maxTime: maxTime,
|
|
173
|
+
minDate: minDate,
|
|
174
|
+
minTime: minTime,
|
|
175
|
+
onChange: onChange,
|
|
176
|
+
openToDate: openToDate,
|
|
177
|
+
placeholderText: placeholder,
|
|
178
|
+
popperClassName: popperClassName,
|
|
179
|
+
ref: inputRefs,
|
|
180
|
+
selected: selected,
|
|
181
|
+
shouldCloseOnSelect: shouldCloseOnSelect,
|
|
182
|
+
showMonthDropdown: true,
|
|
183
|
+
showTimeSelect: showTimeSelectOnly ? true : showTimeSelect,
|
|
184
|
+
showTimeSelectOnly: showTimeSelectOnly,
|
|
185
|
+
showYearDropdown: true,
|
|
186
|
+
timeFormat: timeFormat,
|
|
187
|
+
utcOffset: utcOffset,
|
|
188
|
+
yearDropdownItemNumber: 7,
|
|
189
|
+
accessibleMode: true,
|
|
190
|
+
popperPlacement: popoverPlacement
|
|
191
|
+
}, rest));
|
|
192
|
+
})));
|
|
193
|
+
};
|
|
187
194
|
exports.EuiDatePicker = EuiDatePicker;
|
|
188
|
-
(0, _defineProperty2.default)(EuiDatePicker, "defaultProps", {
|
|
189
|
-
adjustDateOnChange: true,
|
|
190
|
-
dateFormat: euiDatePickerDefaultDateFormat,
|
|
191
|
-
fullWidth: false,
|
|
192
|
-
inputRef: function inputRef() {},
|
|
193
|
-
isLoading: false,
|
|
194
|
-
shadow: true,
|
|
195
|
-
shouldCloseOnSelect: true,
|
|
196
|
-
showIcon: true,
|
|
197
|
-
showTimeSelect: false,
|
|
198
|
-
timeFormat: euiDatePickerDefaultTimeFormat,
|
|
199
|
-
popoverPlacement: 'downLeft'
|
|
200
|
-
});
|
|
201
195
|
EuiDatePicker.propTypes = {
|
|
202
196
|
className: _propTypes.default.string,
|
|
203
197
|
"aria-label": _propTypes.default.string,
|
|
@@ -214,7 +208,7 @@ EuiDatePicker.propTypes = {
|
|
|
214
208
|
/**
|
|
215
209
|
* ref for the ReactDatePicker instance
|
|
216
210
|
*/
|
|
217
|
-
inputRef: _propTypes.default.any
|
|
211
|
+
inputRef: _propTypes.default.any,
|
|
218
212
|
/**
|
|
219
213
|
* Provides styling to the input when invalid
|
|
220
214
|
*/
|
|
@@ -83,7 +83,7 @@ var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
83
83
|
className: "euiDatePickerRange__delimeter"
|
|
84
84
|
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
85
85
|
color: isInvalid ? 'danger' : 'subdued',
|
|
86
|
-
type:
|
|
86
|
+
type: "sortRight"
|
|
87
87
|
}));
|
|
88
88
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
89
89
|
className: classes
|
|
@@ -116,7 +116,7 @@ EuiDatePickerRange.propTypes = {
|
|
|
116
116
|
*/
|
|
117
117
|
isCustom: _propTypes.default.bool,
|
|
118
118
|
/**
|
|
119
|
-
* Will
|
|
119
|
+
* Will color the range delimiter the `danger` color and pass through to each control
|
|
120
120
|
*/
|
|
121
121
|
isInvalid: _propTypes.default.bool,
|
|
122
122
|
/**
|
|
@@ -17,7 +17,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
* Side Public License, v 1.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
/// <reference types="
|
|
20
|
+
/// <reference types="cypress" />
|
|
21
|
+
/// <reference types="cypress-real-events" />
|
|
22
|
+
/// <reference types="../../../../cypress/support" />
|
|
21
23
|
|
|
22
24
|
var SuperDatePicker = function SuperDatePicker() {
|
|
23
25
|
var _useState = (0, _react.useState)(false),
|
|
@@ -19,7 +19,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/// <reference types="
|
|
22
|
+
/// <reference types="cypress" />
|
|
23
|
+
/// <reference types="cypress-real-events" />
|
|
24
|
+
/// <reference types="../../../cypress/support" />
|
|
23
25
|
|
|
24
26
|
var DelayHide = function DelayHide() {
|
|
25
27
|
var _useState = (0, _react.useState)(1000),
|
|
@@ -30,22 +32,20 @@ var DelayHide = function DelayHide() {
|
|
|
30
32
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
31
33
|
hide = _useState4[0],
|
|
32
34
|
setHide = _useState4[1];
|
|
33
|
-
var onChangeMinimumDuration = function onChangeMinimumDuration(event) {
|
|
34
|
-
setDuration(parseInt(event.target.value, 10));
|
|
35
|
-
};
|
|
36
|
-
var onChangeHide = function onChangeHide(event) {
|
|
37
|
-
setHide(event.target.checked);
|
|
38
|
-
};
|
|
39
35
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_form.EuiFormRow, null, (0, _react2.jsx)(_form.EuiCheckbox, {
|
|
40
36
|
id: "dummy-id",
|
|
41
37
|
checked: hide,
|
|
42
|
-
onChange:
|
|
38
|
+
onChange: function onChange(event) {
|
|
39
|
+
return setHide(event.target.checked);
|
|
40
|
+
},
|
|
43
41
|
label: "Hide child"
|
|
44
42
|
})), (0, _react2.jsx)(_form.EuiFormRow, {
|
|
45
43
|
label: "Minimum duration"
|
|
46
44
|
}, (0, _react2.jsx)(_form.EuiFieldNumber, {
|
|
47
45
|
value: minimumDuration,
|
|
48
|
-
onChange:
|
|
46
|
+
onChange: function onChange(event) {
|
|
47
|
+
return setDuration(parseInt(event.target.value, 10));
|
|
48
|
+
}
|
|
49
49
|
})), (0, _react2.jsx)(_form.EuiFormRow, {
|
|
50
50
|
label: "Child to render"
|
|
51
51
|
}, (0, _react2.jsx)(_delay_hide.EuiDelayHide, {
|
|
@@ -19,7 +19,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/// <reference types="
|
|
22
|
+
/// <reference types="cypress" />
|
|
23
|
+
/// <reference types="cypress-real-events" />
|
|
24
|
+
/// <reference types="../../../cypress/support" />
|
|
23
25
|
|
|
24
26
|
var DelayRender = function DelayRender() {
|
|
25
27
|
var _useState = (0, _react.useState)(1000),
|
|
@@ -30,24 +32,22 @@ var DelayRender = function DelayRender() {
|
|
|
30
32
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
31
33
|
render = _useState4[0],
|
|
32
34
|
setRender = _useState4[1];
|
|
33
|
-
var onChangeMinimumDelay = function onChangeMinimumDelay(event) {
|
|
34
|
-
setDelay(parseInt(event.target.value, 10));
|
|
35
|
-
};
|
|
36
|
-
var onChangeHide = function onChangeHide(event) {
|
|
37
|
-
setRender(event.target.checked);
|
|
38
|
-
};
|
|
39
35
|
var status = render ? 'showing' : 'hidden';
|
|
40
36
|
var label = "Child (".concat(status, ")");
|
|
41
37
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_form.EuiFormRow, null, (0, _react2.jsx)(_form.EuiCheckbox, {
|
|
42
38
|
id: "dummy-id",
|
|
43
39
|
checked: render,
|
|
44
|
-
onChange:
|
|
40
|
+
onChange: function onChange(event) {
|
|
41
|
+
return setRender(event.target.checked);
|
|
42
|
+
},
|
|
45
43
|
label: "Show child"
|
|
46
44
|
})), (0, _react2.jsx)(_form.EuiFormRow, {
|
|
47
45
|
label: "Minimum delay"
|
|
48
46
|
}, (0, _react2.jsx)(_form.EuiFieldNumber, {
|
|
49
47
|
value: minimumDelay,
|
|
50
|
-
onChange:
|
|
48
|
+
onChange: function onChange(event) {
|
|
49
|
+
return setDelay(parseInt(event.target.value, 10));
|
|
50
|
+
}
|
|
51
51
|
})), (0, _react2.jsx)(_form.EuiFormRow, {
|
|
52
52
|
label: label
|
|
53
53
|
}, render ? (0, _react2.jsx)(_delay_render.EuiDelayRender, {
|
|
@@ -21,7 +21,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
21
|
* Side Public License, v 1.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
/// <reference types="
|
|
24
|
+
/// <reference types="cypress" />
|
|
25
|
+
/// <reference types="cypress-real-events" />
|
|
26
|
+
/// <reference types="../../../cypress/support" />
|
|
25
27
|
|
|
26
28
|
var makeId = (0, _services2.htmlIdGenerator)();
|
|
27
29
|
var makeList = function makeList(number) {
|
|
@@ -42,7 +44,6 @@ var DragAndDrop = function DragAndDrop() {
|
|
|
42
44
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
45
|
list = _useState2[0],
|
|
44
46
|
setList = _useState2[1];
|
|
45
|
-
console.log(list);
|
|
46
47
|
var onDragEnd = function onDragEnd(_ref) {
|
|
47
48
|
var source = _ref.source,
|
|
48
49
|
destination = _ref.destination;
|
|
@@ -15,12 +15,15 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
/// <reference types="
|
|
18
|
+
/// <reference types="cypress" />
|
|
19
|
+
/// <reference types="cypress-real-events" />
|
|
20
|
+
/// <reference types="../../../cypress/support" />
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
var addCaseSpy =
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
beforeEach(function () {
|
|
23
|
+
var addCaseSpy = cy.spy().as('addCaseSpy');
|
|
24
|
+
var addLinkSpy = cy.spy().as('addLinkSpy');
|
|
25
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
26
|
+
cy.realMount((0, _react2.jsx)(_empty_prompt.EuiEmptyPrompt, {
|
|
24
27
|
iconType: "logoSecurity",
|
|
25
28
|
title: (0, _react2.jsx)("h2", null, "Start adding cases"),
|
|
26
29
|
body: (0, _react2.jsx)("p", null, "Add a new case or change your filter settings."),
|
|
@@ -35,15 +38,6 @@ var EmptyPrompt = function EmptyPrompt(_ref) {
|
|
|
35
38
|
href: "#",
|
|
36
39
|
onClick: addLinkSpy
|
|
37
40
|
}, "Read the docs"))
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
beforeEach(function () {
|
|
41
|
-
var addCaseSpy = cy.spy().as('addCaseSpy');
|
|
42
|
-
var addLinkSpy = cy.spy().as('addLinkSpy');
|
|
43
|
-
cy.viewport(1024, 768); // medium breakpoint
|
|
44
|
-
cy.realMount((0, _react2.jsx)(EmptyPrompt, {
|
|
45
|
-
addCaseSpy: addCaseSpy,
|
|
46
|
-
addLinkSpy: addLinkSpy
|
|
47
41
|
}));
|
|
48
42
|
});
|
|
49
43
|
describe('EuiEmptyPrompt', function () {
|
|
@@ -14,7 +14,9 @@ var _react2 = require("@emotion/react");
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
/// <reference types="
|
|
17
|
+
/// <reference types="cypress" />
|
|
18
|
+
/// <reference types="cypress-real-events" />
|
|
19
|
+
/// <reference types="../../../cypress/support" />
|
|
18
20
|
|
|
19
21
|
var handleFocus = function handleFocus() {
|
|
20
22
|
var target = document.querySelector('pre.euiCodeBlock__pre');
|
|
@@ -4,11 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
var _filter_button = require("./filter_button");
|
|
8
|
-
var _filter_group = require("./filter_group");
|
|
9
7
|
var _popover = require("../popover");
|
|
10
8
|
var _selectable = require("../selectable");
|
|
11
9
|
var _services = require("../../services");
|
|
10
|
+
var _index = require("./index");
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
13
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -20,7 +19,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
20
19
|
* Side Public License, v 1.
|
|
21
20
|
*/
|
|
22
21
|
|
|
23
|
-
/// <reference types="
|
|
22
|
+
/// <reference types="cypress" />
|
|
23
|
+
/// <reference types="cypress-real-events" />
|
|
24
|
+
/// <reference types="../../../cypress/support" />
|
|
24
25
|
|
|
25
26
|
describe('EuiFilterGroup single filter example', function () {
|
|
26
27
|
var SingleFilter = function SingleFilter() {
|
|
@@ -31,7 +32,7 @@ describe('EuiFilterGroup single filter example', function () {
|
|
|
31
32
|
var toggleFilter = function toggleFilter() {
|
|
32
33
|
setIsFilterOn(!isFilterOn);
|
|
33
34
|
};
|
|
34
|
-
return (0, _react2.jsx)(
|
|
35
|
+
return (0, _react2.jsx)(_index.EuiFilterGroup, null, (0, _react2.jsx)(_index.EuiFilterButton, {
|
|
35
36
|
hasActiveFilters: isFilterOn,
|
|
36
37
|
onClick: toggleFilter
|
|
37
38
|
}, "Single filter"));
|
|
@@ -59,7 +60,7 @@ describe('EuiFilterGroup filter with long name example', function () {
|
|
|
59
60
|
var toggleFilter = function toggleFilter() {
|
|
60
61
|
setIsFilterOn(!isFilterOn);
|
|
61
62
|
};
|
|
62
|
-
return (0, _react2.jsx)(
|
|
63
|
+
return (0, _react2.jsx)(_index.EuiFilterGroup, null, (0, _react2.jsx)(_index.EuiFilterButton, {
|
|
63
64
|
hasActiveFilters: isFilterOn,
|
|
64
65
|
numFilters: 12,
|
|
65
66
|
onClick: toggleFilter
|
|
@@ -97,11 +98,11 @@ describe('EuiFilterGroup two filter example', function () {
|
|
|
97
98
|
setIsOffFilterOn(!isOffFilterOn);
|
|
98
99
|
setIsOnFilterOn(isOnFilterOn && !isOffFilterOn ? false : isOnFilterOn);
|
|
99
100
|
};
|
|
100
|
-
return (0, _react2.jsx)(
|
|
101
|
+
return (0, _react2.jsx)(_index.EuiFilterGroup, null, (0, _react2.jsx)(_index.EuiFilterButton, {
|
|
101
102
|
withNext: true,
|
|
102
103
|
hasActiveFilters: isOnFilterOn,
|
|
103
104
|
onClick: toggleOnFilter
|
|
104
|
-
}, "Yes"), (0, _react2.jsx)(
|
|
105
|
+
}, "Yes"), (0, _react2.jsx)(_index.EuiFilterButton, {
|
|
105
106
|
withNext: true,
|
|
106
107
|
hasActiveFilters: isOffFilterOn,
|
|
107
108
|
onClick: toggleOffFilter
|
|
@@ -173,7 +174,7 @@ describe('EuiFilterGroup multiselect example', function () {
|
|
|
173
174
|
_useState16 = (0, _slicedToArray2.default)(_useState15, 2),
|
|
174
175
|
items = _useState16[0],
|
|
175
176
|
setItems = _useState16[1];
|
|
176
|
-
var button = (0, _react2.jsx)(
|
|
177
|
+
var button = (0, _react2.jsx)(_index.EuiFilterButton, {
|
|
177
178
|
iconType: "arrowDown",
|
|
178
179
|
onClick: onButtonClick,
|
|
179
180
|
isSelected: isPopoverOpen,
|
|
@@ -187,7 +188,7 @@ describe('EuiFilterGroup multiselect example', function () {
|
|
|
187
188
|
return item.checked === 'on';
|
|
188
189
|
}).length
|
|
189
190
|
}, "Composers");
|
|
190
|
-
return (0, _react2.jsx)(
|
|
191
|
+
return (0, _react2.jsx)(_index.EuiFilterGroup, null, (0, _react2.jsx)(_popover.EuiPopover, {
|
|
191
192
|
id: filterGroupPopoverId,
|
|
192
193
|
button: button,
|
|
193
194
|
isOpen: isPopoverOpen,
|
|
@@ -24,7 +24,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
* Side Public License, v 1.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
/// <reference types="
|
|
27
|
+
/// <reference types="cypress" />
|
|
28
|
+
/// <reference types="cypress-real-events" />
|
|
29
|
+
/// <reference types="../../../cypress/support" />
|
|
28
30
|
|
|
29
31
|
var CheckboxGroup = function CheckboxGroup() {
|
|
30
32
|
var checkboxGroupItemId__1 = (0, _services.useGeneratedHtmlId)({
|
|
@@ -200,8 +200,10 @@ var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
200
200
|
id: promptId
|
|
201
201
|
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
202
202
|
className: "euiFilePicker__icon",
|
|
203
|
-
color: disabled ? 'subdued' : 'primary'
|
|
204
|
-
|
|
203
|
+
color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary' // eslint-disable-line no-nested-ternary
|
|
204
|
+
,
|
|
205
|
+
|
|
206
|
+
type: isInvalid ? 'alert' : 'importAction',
|
|
205
207
|
size: normalFormControl ? 'm' : 'l',
|
|
206
208
|
"aria-hidden": "true"
|
|
207
209
|
}), (0, _react2.jsx)("div", {
|
|
@@ -16,7 +16,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
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
|
var RadioGroup = function RadioGroup() {
|
|
22
24
|
var radioGroupItemId__1 = 'cy-radio-id-1';
|
|
@@ -41,14 +43,11 @@ var RadioGroup = function RadioGroup() {
|
|
|
41
43
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
44
|
radioIdSelected = _useState2[0],
|
|
43
45
|
setRadioIdSelected = _useState2[1];
|
|
44
|
-
var _onChange = function onChange(optionId) {
|
|
45
|
-
setRadioIdSelected(optionId);
|
|
46
|
-
};
|
|
47
46
|
return (0, _react2.jsx)(_radio_group.EuiRadioGroup, {
|
|
48
47
|
options: radios,
|
|
49
48
|
idSelected: radioIdSelected,
|
|
50
49
|
onChange: function onChange(id) {
|
|
51
|
-
return
|
|
50
|
+
return setRadioIdSelected(id);
|
|
52
51
|
},
|
|
53
52
|
name: "radio group",
|
|
54
53
|
legend: {
|
|
@@ -17,7 +17,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
* Side Public License, v 1.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
/// <reference types="
|
|
20
|
+
/// <reference types="cypress" />
|
|
21
|
+
/// <reference types="cypress-real-events" />
|
|
22
|
+
/// <reference types="../../../../cypress/support" />
|
|
21
23
|
|
|
22
24
|
describe('Single EuiRange', function () {
|
|
23
25
|
var SingleRange = function SingleRange() {
|