@elastic/eui 114.0.0 → 114.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/controls/column_sorting.js +7 -7
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout_menu.js +2 -2
- package/es/components/flyout/flyout_resizable.js +1 -1
- package/es/components/flyout/manager/activity_stage.js +45 -43
- package/es/components/flyout/manager/flyout_child.js +1 -1
- package/es/components/flyout/manager/flyout_managed.js +32 -16
- package/es/components/flyout/manager/flyout_managed.styles.js +4 -16
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/transition_bottom_in.js +37 -0
- package/es/components/icon/assets/transition_bottom_out.js +37 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +6 -0
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/search_bar/filters/field_value_toggle_filter.js +42 -99
- package/es/components/search_bar/search_filters.js +18 -46
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/table/mobile/table_header_mobile.js +1 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/table/utils.js +29 -9
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +47 -20
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/controls/column_sorting.js +7 -7
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout_menu.js +2 -2
- package/lib/components/flyout/flyout_resizable.js +1 -1
- package/lib/components/flyout/manager/activity_stage.js +45 -43
- package/lib/components/flyout/manager/flyout_child.js +1 -1
- package/lib/components/flyout/manager/flyout_managed.js +42 -29
- package/lib/components/flyout/manager/flyout_managed.styles.js +3 -15
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/transition_bottom_in.js +44 -0
- package/lib/components/icon/assets/transition_bottom_out.js +44 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +10 -0
- package/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
- package/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/search_bar/filters/field_value_toggle_filter.js +44 -101
- package/lib/components/search_bar/search_filters.js +20 -45
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/table/mobile/table_header_mobile.js +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/table/utils.js +30 -10
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/flyout/manager/activity_stage.js +45 -43
- package/optimize/es/components/flyout/manager/flyout_managed.js +30 -14
- package/optimize/es/components/flyout/manager/flyout_managed.styles.js +4 -16
- package/optimize/es/components/icon/assets/transition_bottom_in.js +36 -0
- package/optimize/es/components/icon/assets/transition_bottom_out.js +36 -0
- package/optimize/es/components/icon/icon_map.js +6 -0
- package/optimize/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +43 -66
- package/optimize/es/components/search_bar/search_filters.js +18 -40
- package/optimize/es/components/table/mobile/table_header_mobile.js +1 -1
- package/optimize/es/components/table/utils.js +29 -9
- package/optimize/lib/components/flyout/manager/activity_stage.js +45 -43
- package/optimize/lib/components/flyout/manager/flyout_managed.js +35 -22
- package/optimize/lib/components/flyout/manager/flyout_managed.styles.js +3 -16
- package/optimize/lib/components/icon/assets/transition_bottom_in.js +44 -0
- package/optimize/lib/components/icon/assets/transition_bottom_out.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +10 -0
- package/optimize/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
- package/optimize/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
- package/optimize/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +45 -69
- package/optimize/lib/components/search_bar/search_filters.js +19 -40
- package/optimize/lib/components/table/mobile/table_header_mobile.js +1 -1
- package/optimize/lib/components/table/utils.js +30 -10
- package/package.json +2 -1
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting.js +7 -7
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout_menu.js +2 -2
- package/test-env/components/flyout/flyout_resizable.js +1 -1
- package/test-env/components/flyout/manager/activity_stage.js +45 -43
- package/test-env/components/flyout/manager/flyout_child.js +1 -1
- package/test-env/components/flyout/manager/flyout_managed.js +36 -23
- package/test-env/components/flyout/manager/flyout_managed.styles.js +3 -16
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/transition_bottom_in.js +44 -0
- package/test-env/components/icon/assets/transition_bottom_out.js +44 -0
- package/test-env/components/icon/icon_map.js +10 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_help_button.js +5 -3
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/search_bar/filters/field_value_toggle_filter.js +44 -96
- package/test-env/components/search_bar/search_filters.js +19 -39
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/table/mobile/table_header_mobile.js +1 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/table/utils.js +30 -10
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
/*
|
|
3
4
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -33,7 +34,8 @@ var mdSyntaxLink = ___EmotionJSX(EuiLink, {
|
|
|
33
34
|
default: "GitHub flavored markdown"
|
|
34
35
|
}));
|
|
35
36
|
export var EuiMarkdownEditorHelpButton = function EuiMarkdownEditorHelpButton(_ref) {
|
|
36
|
-
var uiPlugins = _ref.uiPlugins
|
|
37
|
+
var uiPlugins = _ref.uiPlugins,
|
|
38
|
+
tooltipProps = _ref.tooltipProps;
|
|
37
39
|
var _useState = useState(false),
|
|
38
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
41
|
isShowingHelpModal = _useState2[0],
|
|
@@ -56,9 +58,9 @@ export var EuiMarkdownEditorHelpButton = function EuiMarkdownEditorHelpButton(_r
|
|
|
56
58
|
});
|
|
57
59
|
var hasUiPluginsWithHelpText = uiPluginsWithHelpText.length > 0;
|
|
58
60
|
if (hasUiPluginsWithHelpText) {
|
|
59
|
-
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTip, {
|
|
61
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTip, _extends({}, tooltipProps, {
|
|
60
62
|
content: syntaxTitle
|
|
61
|
-
}, ___EmotionJSX(EuiButtonIcon, {
|
|
63
|
+
}), ___EmotionJSX(EuiButtonIcon, {
|
|
62
64
|
size: "s",
|
|
63
65
|
css: styles.euiMarkdownEditorFooter__helpButton,
|
|
64
66
|
className: "euiMarkdownEditorFooter__helpButton",
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
1
|
/*
|
|
9
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -13,69 +6,53 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
13
6
|
* Side Public License, v 1.
|
|
14
7
|
*/
|
|
15
8
|
|
|
16
|
-
import React
|
|
9
|
+
import React from 'react';
|
|
17
10
|
import { EuiFilterButton } from '../../filter_group';
|
|
18
11
|
import { isNil } from '../../../services/predicate';
|
|
19
12
|
import { Query } from '../query';
|
|
20
13
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
-
export var FieldValueToggleFilter =
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
value: function resolveDisplay(clause) {
|
|
30
|
-
var _this$props$config = this.props.config,
|
|
31
|
-
name = _this$props$config.name,
|
|
32
|
-
negatedName = _this$props$config.negatedName;
|
|
33
|
-
if (isNil(clause)) {
|
|
34
|
-
return {
|
|
35
|
-
hasActiveFilters: false,
|
|
36
|
-
name: name
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return Query.isMust(clause) ? {
|
|
40
|
-
hasActiveFilters: true,
|
|
14
|
+
export var FieldValueToggleFilter = function FieldValueToggleFilter(props) {
|
|
15
|
+
var resolveDisplay = function resolveDisplay(clause) {
|
|
16
|
+
var _props$config = props.config,
|
|
17
|
+
name = _props$config.name,
|
|
18
|
+
negatedName = _props$config.negatedName;
|
|
19
|
+
if (isNil(clause)) {
|
|
20
|
+
return {
|
|
21
|
+
hasActiveFilters: false,
|
|
41
22
|
name: name
|
|
42
|
-
} : {
|
|
43
|
-
hasActiveFilters: true,
|
|
44
|
-
name: negatedName ? negatedName : "Not ".concat(name)
|
|
45
23
|
};
|
|
46
24
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}(Component);
|
|
25
|
+
return Query.isMust(clause) ? {
|
|
26
|
+
hasActiveFilters: true,
|
|
27
|
+
name: name
|
|
28
|
+
} : {
|
|
29
|
+
hasActiveFilters: true,
|
|
30
|
+
name: negatedName ? negatedName : "Not ".concat(name)
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
var valueChanged = function valueChanged(checked) {
|
|
34
|
+
var _props$config2 = props.config,
|
|
35
|
+
field = _props$config2.field,
|
|
36
|
+
value = _props$config2.value,
|
|
37
|
+
operator = _props$config2.operator;
|
|
38
|
+
var query = checked ? props.query.removeSimpleFieldValue(field, value) : props.query.addSimpleFieldValue(field, value, true, operator);
|
|
39
|
+
props.onChange(query);
|
|
40
|
+
};
|
|
41
|
+
var query = props.query,
|
|
42
|
+
config = props.config;
|
|
43
|
+
var clause = query.getSimpleFieldClause(config.field, config.value);
|
|
44
|
+
var checked = !isNil(clause);
|
|
45
|
+
var _resolveDisplay = resolveDisplay(clause),
|
|
46
|
+
hasActiveFilters = _resolveDisplay.hasActiveFilters,
|
|
47
|
+
name = _resolveDisplay.name;
|
|
48
|
+
var onClick = function onClick() {
|
|
49
|
+
valueChanged(checked);
|
|
50
|
+
};
|
|
51
|
+
return ___EmotionJSX(EuiFilterButton, {
|
|
52
|
+
onClick: onClick,
|
|
53
|
+
isSelected: hasActiveFilters,
|
|
54
|
+
hasActiveFilters: hasActiveFilters,
|
|
55
|
+
"aria-pressed": !!hasActiveFilters,
|
|
56
|
+
isToggle: true
|
|
57
|
+
}, name);
|
|
58
|
+
};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
1
|
/*
|
|
10
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -14,39 +6,25 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
14
6
|
* Side Public License, v 1.
|
|
15
7
|
*/
|
|
16
8
|
|
|
17
|
-
import React, {
|
|
9
|
+
import React, { Fragment } from 'react';
|
|
18
10
|
import { createFilter } from './filters';
|
|
19
11
|
import { EuiFilterGroup } from '../filter_group';
|
|
20
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
-
export var EuiSearchBarFilters =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
value: function render() {
|
|
30
|
-
var _this$props = this.props,
|
|
31
|
-
_this$props$filters = _this$props.filters,
|
|
32
|
-
filters = _this$props$filters === void 0 ? [] : _this$props$filters,
|
|
33
|
-
query = _this$props.query,
|
|
34
|
-
onChange = _this$props.onChange;
|
|
35
|
-
var items = [];
|
|
36
|
-
filters.forEach(function (filterConfig, index) {
|
|
37
|
-
if (filterConfig.available && !filterConfig.available()) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
var key = "filter_".concat(index);
|
|
41
|
-
var control = createFilter(index, filterConfig, query, onChange);
|
|
42
|
-
items.push(___EmotionJSX(Fragment, {
|
|
43
|
-
key: key
|
|
44
|
-
}, control));
|
|
45
|
-
});
|
|
46
|
-
return ___EmotionJSX(EuiFilterGroup, null, items);
|
|
13
|
+
export var EuiSearchBarFilters = function EuiSearchBarFilters(_ref) {
|
|
14
|
+
var _ref$filters = _ref.filters,
|
|
15
|
+
filters = _ref$filters === void 0 ? [] : _ref$filters,
|
|
16
|
+
query = _ref.query,
|
|
17
|
+
onChange = _ref.onChange;
|
|
18
|
+
var items = filters.reduce(function (acc, filterConfig, index) {
|
|
19
|
+
if (filterConfig.available && !filterConfig.available()) {
|
|
20
|
+
return acc;
|
|
47
21
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
22
|
+
var key = "filter_".concat(index);
|
|
23
|
+
var control = createFilter(index, filterConfig, query, onChange);
|
|
24
|
+
acc.push(___EmotionJSX(Fragment, {
|
|
25
|
+
key: key
|
|
26
|
+
}, control));
|
|
27
|
+
return acc;
|
|
28
|
+
}, []);
|
|
29
|
+
return ___EmotionJSX(EuiFilterGroup, null, items);
|
|
30
|
+
};
|
|
@@ -23,7 +23,7 @@ export var EuiTableHeaderMobile = function EuiTableHeaderMobile(_ref) {
|
|
|
23
23
|
responsiveBreakpointProp = _ref.responsiveBreakpoint,
|
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
var responsiveBreakpointDefault = (_useComponentDefaults = useComponentDefaults().EuiTable) === null || _useComponentDefaults === void 0 ? void 0 : _useComponentDefaults.responsiveBreakpoint;
|
|
26
|
-
var responsiveBreakpoint = responsiveBreakpointProp
|
|
26
|
+
var responsiveBreakpoint = responsiveBreakpointProp !== null && responsiveBreakpointProp !== void 0 ? responsiveBreakpointProp : responsiveBreakpointDefault;
|
|
27
27
|
var isResponsive = useIsEuiTableResponsive(responsiveBreakpoint);
|
|
28
28
|
var styles = useEuiMemoizedStyles(euiTableHeaderMobileStyles);
|
|
29
29
|
var classes = classNames('euiTableHeaderMobile', className);
|
|
@@ -20,6 +20,11 @@ export var WARNING_MESSAGE_MIN_WIDTH = 'Two `minWidth` properties were provided.
|
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
22
|
export var WARNING_MESSAGE_MAX_WIDTH = 'Two `maxWidth` properties were provided. Provide only one of `style.maxWidth` or `maxWidth` to avoid conflicts.';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export var WARNING_MESSAGE_NOT_RECOMMENDED_UNIT = 'Detected not recommended unit (%, vw, cqw, cqi) in cell width settings. Adjust the `width`, `minWidth` and `maxWidth` values to use absolute length units like `em` for text cells or `px` for static elements like icons or plots.';
|
|
23
28
|
var normalizeValue = function normalizeValue(value) {
|
|
24
29
|
if (value === undefined || Number.isNaN(value)) {
|
|
25
30
|
return undefined;
|
|
@@ -29,6 +34,13 @@ var normalizeValue = function normalizeValue(value) {
|
|
|
29
34
|
}
|
|
30
35
|
return value;
|
|
31
36
|
};
|
|
37
|
+
var UNIT_VALIDATOR_REGEX = /%|vw|cqw|cqi/;
|
|
38
|
+
var shouldWarnAboutNotRecommendedUnit = function shouldWarnAboutNotRecommendedUnit(value) {
|
|
39
|
+
if (typeof value === 'string') {
|
|
40
|
+
return UNIT_VALIDATOR_REGEX.test(value);
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
};
|
|
32
44
|
|
|
33
45
|
/**
|
|
34
46
|
* @internal
|
|
@@ -39,23 +51,31 @@ export var resolveWidthPropsAsStyle = function resolveWidthPropsAsStyle() {
|
|
|
39
51
|
rawWidth = _ref.width,
|
|
40
52
|
rawMinWidth = _ref.minWidth,
|
|
41
53
|
rawMaxWidth = _ref.maxWidth;
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
54
|
+
var widthProp = normalizeValue(rawWidth);
|
|
55
|
+
var minWidthProp = normalizeValue(rawMinWidth);
|
|
56
|
+
var maxWidthProp = normalizeValue(rawMaxWidth);
|
|
57
|
+
var width = widthProp !== null && widthProp !== void 0 ? widthProp : style.width;
|
|
58
|
+
var minWidth = minWidthProp !== null && minWidthProp !== void 0 ? minWidthProp : style.minWidth;
|
|
59
|
+
var maxWidth = maxWidthProp !== null && maxWidthProp !== void 0 ? maxWidthProp : style.maxWidth;
|
|
60
|
+
|
|
61
|
+
// Value validation block
|
|
45
62
|
if (process.env.NODE_ENV !== 'production') {
|
|
46
|
-
if (style.width &&
|
|
63
|
+
if (style.width && widthProp !== undefined) {
|
|
47
64
|
console.warn(WARNING_MESSAGE_WIDTH);
|
|
48
65
|
}
|
|
49
|
-
if (style.minWidth &&
|
|
66
|
+
if (style.minWidth && minWidthProp !== undefined) {
|
|
50
67
|
console.warn(WARNING_MESSAGE_MIN_WIDTH);
|
|
51
68
|
}
|
|
52
|
-
if (style.maxWidth &&
|
|
69
|
+
if (style.maxWidth && maxWidthProp !== undefined) {
|
|
53
70
|
console.warn(WARNING_MESSAGE_MAX_WIDTH);
|
|
54
71
|
}
|
|
72
|
+
if (shouldWarnAboutNotRecommendedUnit(width) || shouldWarnAboutNotRecommendedUnit(minWidth) || shouldWarnAboutNotRecommendedUnit(maxWidth)) {
|
|
73
|
+
console.warn(WARNING_MESSAGE_NOT_RECOMMENDED_UNIT);
|
|
74
|
+
}
|
|
55
75
|
}
|
|
56
76
|
return {
|
|
57
|
-
width: width
|
|
58
|
-
minWidth: minWidth
|
|
59
|
-
maxWidth: maxWidth
|
|
77
|
+
width: width,
|
|
78
|
+
minWidth: minWidth,
|
|
79
|
+
maxWidth: maxWidth
|
|
60
80
|
};
|
|
61
81
|
};
|
|
@@ -16,6 +16,24 @@ var _provider = require("./provider");
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Returns the final stage after an animation completes.
|
|
21
|
+
* OPENING/RETURNING -> ACTIVE; CLOSING -> INACTIVE; BACKGROUNDING -> BACKGROUNDED.
|
|
22
|
+
*/
|
|
23
|
+
var getNextStage = function getNextStage(stage) {
|
|
24
|
+
switch (stage) {
|
|
25
|
+
case _const.STAGE_OPENING:
|
|
26
|
+
case _const.STAGE_RETURNING:
|
|
27
|
+
return _const.STAGE_ACTIVE;
|
|
28
|
+
case _const.STAGE_CLOSING:
|
|
29
|
+
return _const.STAGE_INACTIVE;
|
|
30
|
+
case _const.STAGE_BACKGROUNDING:
|
|
31
|
+
return _const.STAGE_BACKGROUNDED;
|
|
32
|
+
default:
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
19
37
|
/**
|
|
20
38
|
* Encapsulates all activity-stage transitions and animation-driven updates
|
|
21
39
|
* for managed flyouts.
|
|
@@ -27,7 +45,9 @@ var _provider = require("./provider");
|
|
|
27
45
|
var useFlyoutActivityStage = exports.useFlyoutActivityStage = function useFlyoutActivityStage(_ref) {
|
|
28
46
|
var _sessions, _state$sessions$find, _state$layoutMode, _state$flyouts$find;
|
|
29
47
|
var flyoutId = _ref.flyoutId,
|
|
30
|
-
level = _ref.level
|
|
48
|
+
level = _ref.level,
|
|
49
|
+
_ref$shouldAnimate = _ref.shouldAnimate,
|
|
50
|
+
shouldAnimate = _ref$shouldAnimate === void 0 ? false : _ref$shouldAnimate;
|
|
31
51
|
var ctx = (0, _provider.useFlyoutManager)();
|
|
32
52
|
var state = ctx === null || ctx === void 0 ? void 0 : ctx.state;
|
|
33
53
|
|
|
@@ -47,64 +67,46 @@ var useFlyoutActivityStage = exports.useFlyoutActivityStage = function useFlyout
|
|
|
47
67
|
if (stageRef.current !== stage) {
|
|
48
68
|
stageRef.current = stage;
|
|
49
69
|
}
|
|
70
|
+
var transitionTo = (0, _react.useCallback)(function (nextStage) {
|
|
71
|
+
var _ctx$dispatch;
|
|
72
|
+
ctx === null || ctx === void 0 || (_ctx$dispatch = ctx.dispatch) === null || _ctx$dispatch === void 0 || _ctx$dispatch.call(ctx, (0, _actions.setActivityStage)(flyoutId, nextStage));
|
|
73
|
+
stageRef.current = nextStage;
|
|
74
|
+
}, [ctx, flyoutId]);
|
|
50
75
|
|
|
51
76
|
/**
|
|
52
|
-
* 1. ACTIVE -> CLOSING when no longer the active flyout.
|
|
53
|
-
* 2. INACTIVE -> RETURNING when it becomes active again
|
|
54
|
-
* 3. (Main
|
|
55
|
-
* 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (
|
|
56
|
-
*
|
|
57
|
-
* Any stages that depend on animation end (OPENING, RETURNING, CLOSING, BACKGROUNDING) are finalized in `onAnimationEnd`.
|
|
77
|
+
* 1. ACTIVE -> CLOSING (or INACTIVE when !shouldAnimate) when no longer the active flyout.
|
|
78
|
+
* 2. INACTIVE -> RETURNING (or ACTIVE when !shouldAnimate) when it becomes active again.
|
|
79
|
+
* 3. (Main only) ACTIVE + stacked + has child -> BACKGROUNDING (or BACKGROUNDED when !shouldAnimate).
|
|
80
|
+
* 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (or ACTIVE when !shouldAnimate).
|
|
58
81
|
*/
|
|
59
82
|
(0, _react.useEffect)(function () {
|
|
60
83
|
var s = stageRef.current;
|
|
61
84
|
var next = null;
|
|
62
|
-
if (s === _const.STAGE_ACTIVE && !isActive)
|
|
63
|
-
next = _const.
|
|
64
|
-
} else if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
if (s === _const.STAGE_ACTIVE && !isActive) {
|
|
86
|
+
next = shouldAnimate ? _const.STAGE_CLOSING : _const.STAGE_INACTIVE;
|
|
87
|
+
} else if (s === _const.STAGE_INACTIVE && isActive) {
|
|
88
|
+
next = shouldAnimate ? _const.STAGE_RETURNING : _const.STAGE_ACTIVE;
|
|
89
|
+
} else if (level === _const.LEVEL_MAIN && isActive && s === _const.STAGE_ACTIVE && hasChild && layoutMode === _const.LAYOUT_MODE_STACKED) {
|
|
90
|
+
next = shouldAnimate ? _const.STAGE_BACKGROUNDING : _const.STAGE_BACKGROUNDED;
|
|
91
|
+
} else if (level === _const.LEVEL_MAIN && (s === _const.STAGE_BACKGROUNDED || s === _const.STAGE_BACKGROUNDING) && (!hasChild || layoutMode === _const.LAYOUT_MODE_SIDE_BY_SIDE)) {
|
|
92
|
+
next = shouldAnimate ? _const.STAGE_RETURNING : _const.STAGE_ACTIVE;
|
|
69
93
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Get the stage to transition to for given current stage.
|
|
74
|
-
* Returns `null` if stage should remain unchanged.
|
|
75
|
-
*
|
|
76
|
-
* Stage transitions:
|
|
77
|
-
* - OPENING / RETURNING -> ACTIVE
|
|
78
|
-
* - CLOSING -> INACTIVE
|
|
79
|
-
* - BACKGROUNDING -> BACKGROUNDED
|
|
80
|
-
*/
|
|
81
|
-
var getNextStage = function getNextStage(stage) {
|
|
82
|
-
switch (stage) {
|
|
83
|
-
case _const.STAGE_OPENING:
|
|
84
|
-
case _const.STAGE_RETURNING:
|
|
85
|
-
return _const.STAGE_ACTIVE;
|
|
86
|
-
case _const.STAGE_CLOSING:
|
|
87
|
-
return _const.STAGE_INACTIVE;
|
|
88
|
-
case _const.STAGE_BACKGROUNDING:
|
|
89
|
-
return _const.STAGE_BACKGROUNDED;
|
|
94
|
+
if (next && next !== s) {
|
|
95
|
+
transitionTo(next);
|
|
90
96
|
}
|
|
91
|
-
|
|
92
|
-
};
|
|
97
|
+
}, [isActive, hasChild, layoutMode, level, shouldAnimate, transitionTo, stage]);
|
|
93
98
|
|
|
94
99
|
/**
|
|
95
|
-
* onAnimationEnd
|
|
96
|
-
*
|
|
97
|
-
* in EuiFlyoutManagerContext.
|
|
100
|
+
* onAnimationEnd: browser signal when a CSS animation completes.
|
|
101
|
+
* Calls transitionTo to move to the final stage (e.g. CLOSING -> INACTIVE).
|
|
98
102
|
*/
|
|
99
103
|
var onAnimationEnd = (0, _react.useCallback)(function () {
|
|
100
104
|
var currentStage = stageRef.current;
|
|
101
105
|
var nextStage = getNextStage(currentStage);
|
|
102
106
|
if (nextStage && nextStage !== currentStage) {
|
|
103
|
-
|
|
104
|
-
ctx === null || ctx === void 0 || (_ctx$dispatch2 = ctx.dispatch) === null || _ctx$dispatch2 === void 0 || _ctx$dispatch2.call(ctx, (0, _actions.setActivityStage)(flyoutId, nextStage));
|
|
105
|
-
stageRef.current = nextStage;
|
|
107
|
+
transitionTo(nextStage);
|
|
106
108
|
}
|
|
107
|
-
}, [
|
|
109
|
+
}, [transitionTo]);
|
|
108
110
|
return {
|
|
109
111
|
activityStage: stage,
|
|
110
112
|
onAnimationEnd: onAnimationEnd
|
|
@@ -11,6 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
14
15
|
var _reactDom = require("react-dom");
|
|
15
16
|
var _services = require("../../../services");
|
|
16
17
|
var _i18n = require("../../i18n");
|
|
@@ -25,24 +26,22 @@ var _hooks = require("./hooks");
|
|
|
25
26
|
var _selectors = require("./selectors");
|
|
26
27
|
var _store = require("./store");
|
|
27
28
|
var _validation = require("./validation");
|
|
28
|
-
var _react2 = require("@emotion/react");
|
|
29
29
|
var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "historyKey", "css", "flyoutMenuProps"];
|
|
30
|
-
|
|
30
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
31
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
31
35
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
32
36
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
33
37
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
34
38
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
35
39
|
* Side Public License, v 1.
|
|
36
|
-
*/
|
|
37
|
-
/**
|
|
40
|
+
*/ /**
|
|
38
41
|
* Props for `EuiManagedFlyout`, the internal persistent flyout used by
|
|
39
42
|
* the manager. Extends base flyout props and requires a `level` to
|
|
40
43
|
* distinguish `main` vs `child` behavior.
|
|
41
44
|
*/
|
|
42
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
43
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
44
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
46
45
|
var useFlyoutManager = function useFlyoutManager() {
|
|
47
46
|
var context = (0, _hooks.useFlyoutManager)();
|
|
48
47
|
if (!context) {
|
|
@@ -58,18 +57,26 @@ var useFlyoutManager = function useFlyoutManager() {
|
|
|
58
57
|
* - width tracking for responsive layouts
|
|
59
58
|
* - lifecycle stage transitions and data attributes for styling
|
|
60
59
|
*/
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
61
|
+
name: "1wrw3pf-EuiManagedFlyout",
|
|
62
|
+
styles: "animation-duration:0s!important;label:EuiManagedFlyout;"
|
|
63
|
+
} : {
|
|
64
|
+
name: "1wrw3pf-EuiManagedFlyout",
|
|
65
|
+
styles: "animation-duration:0s!important;label:EuiManagedFlyout;",
|
|
66
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
67
|
+
};
|
|
68
|
+
var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
69
|
+
var _managerSessions, _managerState$layoutM, _managerState$flyouts, _managerState$session, _managerState$flyouts2, _managerSessions$leng, _session$childHistory, _session$childHistory2;
|
|
70
|
+
var id = _ref2.id,
|
|
71
|
+
onCloseProp = _ref2.onClose,
|
|
72
|
+
onActiveProp = _ref2.onActive,
|
|
73
|
+
level = _ref2.level,
|
|
74
|
+
sizeProp = _ref2.size,
|
|
75
|
+
minWidth = _ref2.minWidth,
|
|
76
|
+
historyKey = _ref2.historyKey,
|
|
77
|
+
customCss = _ref2.css,
|
|
78
|
+
_flyoutMenuProps = _ref2.flyoutMenuProps,
|
|
79
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
73
80
|
var flyoutId = (0, _hooks.useFlyoutId)(id);
|
|
74
81
|
var _useState = (0, _react.useState)(null),
|
|
75
82
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -105,6 +112,9 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
105
112
|
var parentSize = session !== null && session !== void 0 && session.mainFlyoutId ? managerState === null || managerState === void 0 || (_managerState$flyouts2 = managerState.flyouts.find(function (f) {
|
|
106
113
|
return f.flyoutId === session.mainFlyoutId;
|
|
107
114
|
})) === null || _managerState$flyouts2 === void 0 ? void 0 : _managerState$flyouts2.size : undefined;
|
|
115
|
+
|
|
116
|
+
// Animate opening only for the first main flyout (sole session) or first child (no prior child in session).
|
|
117
|
+
var shouldAnimateOpening = level === _const.LEVEL_MAIN ? ((_managerSessions$leng = managerSessions === null || managerSessions === void 0 ? void 0 : managerSessions.length) !== null && _managerSessions$leng !== void 0 ? _managerSessions$leng : 0) <= 1 && (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId : ((_session$childHistory = session === null || session === void 0 || (_session$childHistory2 = session.childHistory) === null || _session$childHistory2 === void 0 ? void 0 : _session$childHistory2.length) !== null && _session$childHistory !== void 0 ? _session$childHistory : 0) === 0;
|
|
108
118
|
var styles = (0, _services.useEuiMemoizedStyles)(_flyout_managed.euiManagedFlyoutStyles);
|
|
109
119
|
|
|
110
120
|
// Set default size based on level: main defaults to 'm', child defaults to 's'
|
|
@@ -241,7 +251,8 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
241
251
|
}, [flyoutId, level, isActive, width, setFlyoutWidth]);
|
|
242
252
|
var _useFlyoutActivitySta = (0, _activity_stage.useFlyoutActivityStage)({
|
|
243
253
|
flyoutId: flyoutId,
|
|
244
|
-
level: level
|
|
254
|
+
level: level,
|
|
255
|
+
shouldAnimate: false
|
|
245
256
|
}),
|
|
246
257
|
activityStage = _useFlyoutActivitySta.activityStage,
|
|
247
258
|
onAnimationEnd = _useFlyoutActivitySta.onAnimationEnd;
|
|
@@ -272,7 +283,9 @@ var EuiManagedFlyout = exports.EuiManagedFlyout = /*#__PURE__*/(0, _react.forwar
|
|
|
272
283
|
}, (0, _react2.jsx)(_flyout.EuiFlyoutComponent, (0, _extends2.default)({
|
|
273
284
|
id: flyoutId,
|
|
274
285
|
ref: combinedRef,
|
|
275
|
-
css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level),
|
|
286
|
+
css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level),
|
|
287
|
+
// Suppress EuiFlyout's built-in opening animation for non-initial flyouts.
|
|
288
|
+
!shouldAnimateOpening && _ref, ";label:EuiManagedFlyout;"]
|
|
276
289
|
}, _objectSpread(_objectSpread({}, props), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
277
290
|
onClose: onClose,
|
|
278
291
|
size: size,
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.euiManagedFlyoutStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _global_styling = require("../../../global_styling");
|
|
11
9
|
var _const = require("./const");
|
|
12
10
|
var _const2 = require("../const");
|
|
13
|
-
var _templateObject, _templateObject2;
|
|
14
11
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
15
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -37,16 +34,6 @@ var euiManagedFlyoutStyles = exports.euiManagedFlyoutStyles = function euiManage
|
|
|
37
34
|
stage: function stage(activeStage) {
|
|
38
35
|
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _const2.DEFAULT_SIDE;
|
|
39
36
|
var level = arguments.length > 2 ? arguments[2] : undefined;
|
|
40
|
-
// Animation for moving flyout backwards in 3D space (z-axis) when inactive
|
|
41
|
-
var euiFlyoutSlideBack3D = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from {\n transform: translateZ(0) translateX(0) scale(1);\n filter: blur(0px);\n opacity: 1;\n }\n to {\n transform: translateZ(-1500px) translateX(", ") scale(0.5);\n filter: blur(3px);\n opacity: 0.6;\n }\n "])), side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)');
|
|
42
|
-
|
|
43
|
-
// Animation for bringing flyout forward from 3D space when transitioning to active
|
|
44
|
-
var euiFlyoutSlideForward3D = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n from {\n transform: translateZ(-500px) translateX(", ") scale(0.85);\n filter: blur(3px);\n opacity: 0.6;\n }\n to {\n transform: translateZ(0) translateX(0) scale(1);\n filter: blur(0px);\n opacity: 1;\n }\n "])), side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)');
|
|
45
|
-
// When flyout is becoming inactive, animate backwards in 3D space
|
|
46
|
-
var inactiveTransition = /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideBack3D, " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.resistance, " forwards;pointer-events:none;};label:inactiveTransition;");
|
|
47
|
-
|
|
48
|
-
// When flyout is becoming active from a backgrounded state, animate forward in 3D space
|
|
49
|
-
var returningTransition = /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideForward3D, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, " forwards;};label:returningTransition;");
|
|
50
37
|
var noTransition = /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:none;opacity:1;};label:noTransition;");
|
|
51
38
|
var activeFlyout = /*#__PURE__*/(0, _react.css)("z-index:", parseInt(euiTheme.levels.flyout) + 1, ";pointer-events:auto;;label:activeFlyout;");
|
|
52
39
|
var inactiveFlyout = /*#__PURE__*/(0, _react.css)(side === 'left' ? (0, _global_styling.logicalCSS)('right', '100vw') : (0, _global_styling.logicalCSS)('left', '100vw'), " transform:translateX(", side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)', ");;label:inactiveFlyout;");
|
|
@@ -58,15 +45,15 @@ var euiManagedFlyoutStyles = exports.euiManagedFlyoutStyles = function euiManage
|
|
|
58
45
|
case _const.STAGE_ACTIVE:
|
|
59
46
|
return [activeFlyout, noTransition];
|
|
60
47
|
case _const.STAGE_BACKGROUNDING:
|
|
61
|
-
return [
|
|
48
|
+
return [inactiveFlyout, noTransition];
|
|
62
49
|
case _const.STAGE_BACKGROUNDED:
|
|
63
50
|
return [inactiveFlyout, noTransition];
|
|
64
51
|
case _const.STAGE_RETURNING:
|
|
65
|
-
return [activeFlyout,
|
|
52
|
+
return [activeFlyout, noTransition];
|
|
66
53
|
case _const.STAGE_INACTIVE:
|
|
67
54
|
return [inactiveFlyout, noTransition];
|
|
68
55
|
case _const.STAGE_CLOSING:
|
|
69
|
-
return [
|
|
56
|
+
return [inactiveFlyout, noTransition];
|
|
70
57
|
}
|
|
71
58
|
},
|
|
72
59
|
managedFlyout: _ref
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.icon = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _excluded = ["title", "titleId"];
|
|
14
|
+
/*
|
|
15
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
+
* Side Public License, v 1.
|
|
20
|
+
*/
|
|
21
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
var EuiIconTransitionBottomIn = function EuiIconTransitionBottomIn(_ref) {
|
|
25
|
+
var title = _ref.title,
|
|
26
|
+
titleId = _ref.titleId,
|
|
27
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
return (0, _react2.jsx)("svg", (0, _extends2.default)({
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
width: 16,
|
|
31
|
+
height: 16,
|
|
32
|
+
viewBox: "0 0 16 16",
|
|
33
|
+
"aria-labelledby": titleId
|
|
34
|
+
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
|
+
id: titleId
|
|
36
|
+
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
+
d: "M7.5 9V5.207L5.854 6.854l-.708-.708L8 3.293l2.854 2.853-.707.708L8.5 5.207V9z"
|
|
38
|
+
}), (0, _react2.jsx)("path", {
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
d: "M2 15a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1zM14 2H2v8h12zm0 9.793V11h-.793l-3 3h1.586zM11.793 11h-1.586l-3 3h1.586zm-3 0H7.207l-3 3h1.586zm-3 0H4.207L2 13.207V14h.793zm-3 0H2v.793zM14 13.207l-.793.793H14z",
|
|
41
|
+
clipRule: "evenodd"
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
var icon = exports.icon = EuiIconTransitionBottomIn;
|