@elastic/eui 88.4.0 → 88.5.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 +9 -2
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +9 -2
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.a11y.js +4 -4
- package/es/components/basic_table/basic_table.js +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.a11y.js +4 -4
- package/es/components/basic_table/in_memory_table.js +1 -1
- package/es/components/breadcrumbs/breadcrumb.js +12 -0
- package/es/components/breadcrumbs/breadcrumbs.js +12 -0
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +54 -34
- package/es/components/call_out/call_out.styles.js +36 -7
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- 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 +3 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +11 -6
- 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/control_bar/control_bar.js +12 -0
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/data_grid_cell.js +24 -24
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar.js +21 -5
- package/es/components/datagrid/controls/display_selector.js +16 -15
- package/es/components/datagrid/data_grid.a11y.js +2 -2
- package/es/components/datagrid/data_grid.js +35 -16
- package/es/components/datagrid/data_grid_types.js +3 -0
- package/es/components/datagrid/utils/in_memory.js +12 -12
- package/es/components/date_picker/date_picker.js +15 -8
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +2 -2
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/facet/facet_button.js +1 -1
- package/es/components/form/field_number/field_number.js +1 -1
- package/es/components/form/field_text/field_text.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/header/header_breadcrumbs/header_breadcrumbs.js +12 -0
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +13 -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/gradient.js +34 -0
- package/es/components/icon/assets/palette.js +35 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +2 -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_toolbar.js +1 -1
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +13 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/popover/input_popover.js +1 -0
- package/es/components/popover/popover.js +20 -3
- package/es/components/popover/popover_panel/_popover_panel.js +15 -21
- package/es/components/popover/popover_panel/_popover_panel.styles.js +47 -27
- 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/suggest/suggest.js +1 -1
- package/es/components/suggest/suggest_item.js +1 -1
- package/es/components/table/table_header_button.js +1 -1
- package/es/components/text_truncate/index.js +1 -1
- package/es/components/text_truncate/text_truncate.js +16 -26
- package/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/es/components/text_truncate/utils.js +251 -282
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tour/tour_step.js +12 -0
- package/eui.d.ts +191 -112
- package/i18ntokens.json +106 -88
- 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.a11y.js +4 -4
- package/lib/components/basic_table/basic_table.js +1 -1
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.a11y.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +1 -1
- package/lib/components/breadcrumbs/breadcrumb.js +12 -0
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +54 -34
- package/lib/components/call_out/call_out.styles.js +42 -15
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- 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 +3 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +11 -6
- 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/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/data_grid_cell.js +24 -24
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar.js +21 -5
- package/lib/components/datagrid/controls/display_selector.js +16 -15
- package/lib/components/datagrid/data_grid.a11y.js +2 -2
- package/lib/components/datagrid/data_grid.js +35 -16
- package/lib/components/datagrid/data_grid_types.js +4 -0
- package/lib/components/datagrid/utils/in_memory.js +12 -12
- package/lib/components/date_picker/date_picker.js +15 -8
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +2 -2
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/facet/facet_button.js +1 -1
- package/lib/components/form/field_number/field_number.js +1 -1
- package/lib/components/form/field_text/field_text.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/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/gradient.js +42 -0
- package/lib/components/icon/assets/palette.js +43 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +2 -0
- package/lib/components/icon/svgs/gradient.svg +3 -0
- package/lib/components/icon/svgs/palette.svg +4 -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_toolbar.js +1 -1
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/popover/input_popover.js +1 -0
- package/lib/components/popover/popover.js +20 -3
- package/lib/components/popover/popover_panel/_popover_panel.js +14 -20
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +53 -35
- 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/suggest/suggest.js +1 -1
- package/lib/components/suggest/suggest_item.js +1 -1
- package/lib/components/table/table_header_button.js +1 -1
- package/lib/components/text_truncate/index.js +6 -6
- package/lib/components/text_truncate/text_truncate.js +13 -23
- package/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/lib/components/text_truncate/utils.js +253 -284
- 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/basic_table/basic_table.a11y.js +4 -4
- package/optimize/es/components/basic_table/in_memory_table.a11y.js +4 -4
- package/optimize/es/components/call_out/call_out.js +44 -32
- package/optimize/es/components/call_out/call_out.styles.js +36 -7
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +11 -6
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +21 -5
- package/optimize/es/components/datagrid/controls/display_selector.js +16 -15
- package/optimize/es/components/datagrid/data_grid.a11y.js +2 -2
- package/optimize/es/components/datagrid/data_grid.js +4 -2
- package/optimize/es/components/datagrid/data_grid_types.js +3 -0
- package/optimize/es/components/date_picker/date_picker.js +8 -5
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +2 -2
- package/optimize/es/components/icon/assets/gradient.js +33 -0
- package/optimize/es/components/icon/assets/palette.js +34 -0
- package/optimize/es/components/icon/icon_map.js +2 -0
- package/optimize/es/components/popover/input_popover.js +1 -0
- package/optimize/es/components/popover/popover.js +8 -3
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +15 -16
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +47 -27
- package/optimize/es/components/text_truncate/index.js +1 -1
- package/optimize/es/components/text_truncate/text_truncate.js +16 -16
- package/optimize/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/es/components/text_truncate/utils.js +245 -277
- package/optimize/lib/components/basic_table/basic_table.a11y.js +4 -4
- package/optimize/lib/components/basic_table/in_memory_table.a11y.js +4 -4
- package/optimize/lib/components/call_out/call_out.js +44 -32
- package/optimize/lib/components/call_out/call_out.styles.js +42 -15
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +11 -6
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +21 -5
- package/optimize/lib/components/datagrid/controls/display_selector.js +16 -15
- package/optimize/lib/components/datagrid/data_grid.a11y.js +2 -2
- package/optimize/lib/components/datagrid/data_grid.js +4 -2
- package/optimize/lib/components/datagrid/data_grid_types.js +4 -0
- package/optimize/lib/components/date_picker/date_picker.js +8 -5
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +2 -2
- package/optimize/lib/components/icon/assets/gradient.js +42 -0
- package/optimize/lib/components/icon/assets/palette.js +43 -0
- package/optimize/lib/components/icon/icon_map.js +2 -0
- package/optimize/lib/components/icon/svgs/gradient.svg +3 -0
- package/optimize/lib/components/icon/svgs/palette.svg +4 -0
- package/optimize/lib/components/popover/input_popover.js +1 -0
- package/optimize/lib/components/popover/popover.js +8 -3
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +14 -15
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +53 -35
- package/optimize/lib/components/text_truncate/index.js +6 -6
- package/optimize/lib/components/text_truncate/text_truncate.js +13 -13
- package/optimize/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/lib/components/text_truncate/utils.js +247 -279
- package/package.json +1 -2
- package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +8 -0
- package/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss +2 -4
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.a11y.js +4 -4
- package/test-env/components/basic_table/basic_table.js +1 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.a11y.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +1 -1
- package/test-env/components/breadcrumbs/breadcrumb.js +12 -0
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +54 -34
- package/test-env/components/call_out/call_out.styles.js +42 -15
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- 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 +3 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +11 -6
- 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/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +21 -5
- package/test-env/components/datagrid/controls/display_selector.js +16 -15
- package/test-env/components/datagrid/data_grid.a11y.js +2 -2
- package/test-env/components/datagrid/data_grid.js +35 -16
- package/test-env/components/datagrid/data_grid_types.js +4 -0
- package/test-env/components/datagrid/utils/in_memory.js +12 -12
- package/test-env/components/date_picker/date_picker.js +15 -8
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +2 -2
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/facet/facet_button.js +1 -1
- package/test-env/components/form/field_number/field_number.js +1 -1
- package/test-env/components/form/field_text/field_text.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/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/gradient.js +42 -0
- package/test-env/components/icon/assets/palette.js +43 -0
- package/test-env/components/icon/icon_map.js +2 -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_toolbar.js +1 -1
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/popover/input_popover.js +1 -0
- package/test-env/components/popover/popover.js +20 -3
- package/test-env/components/popover/popover_panel/_popover_panel.js +14 -15
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +53 -35
- 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/suggest/suggest.js +1 -1
- package/test-env/components/suggest/suggest_item.js +1 -1
- package/test-env/components/table/table_header_button.js +1 -1
- package/test-env/components/text_truncate/index.js +6 -6
- package/test-env/components/text_truncate/text_truncate.js +13 -23
- package/test-env/components/text_truncate/text_truncate.styles.js +10 -10
- package/test-env/components/text_truncate/utils.js +247 -279
- 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
|
@@ -4,18 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.TruncationUtils = exports.CanvasTextUtils = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
10
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
10
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
15
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
16
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var _excluded = ["
|
|
18
|
-
_excluded2 = ["font", "container"];
|
|
18
|
+
var _excluded = ["fullText", "ellipsis", "availableWidth"];
|
|
19
19
|
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); }; }
|
|
20
20
|
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; } }
|
|
21
21
|
/*
|
|
@@ -26,313 +26,281 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
26
26
|
* Side Public License, v 1.
|
|
27
27
|
*/
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* or even necessary).
|
|
32
|
-
*
|
|
33
|
-
* How the underlying mechanism works: the full text is rendered, and then
|
|
34
|
-
* characters are removed one by one until the width of the text fits within
|
|
35
|
-
* the specified available width.
|
|
36
|
-
*
|
|
37
|
-
* Side note: The exception to this is the `truncateStartEndAtPosition` method,
|
|
38
|
-
* which works by building up from an empty string / by adding characters
|
|
39
|
-
* instead of removing them.
|
|
40
|
-
*/
|
|
41
|
-
var _TruncationUtils = /*#__PURE__*/(0, _createClass2.default)(function _TruncationUtils(_ref) {
|
|
42
|
-
var _this = this;
|
|
43
|
-
var fullText = _ref.fullText,
|
|
44
|
-
ellipsis = _ref.ellipsis,
|
|
45
|
-
availableWidth = _ref.availableWidth;
|
|
46
|
-
(0, _classCallCheck2.default)(this, _TruncationUtils);
|
|
47
|
-
(0, _defineProperty2.default)(this, "fullText", void 0);
|
|
48
|
-
(0, _defineProperty2.default)(this, "ellipsis", void 0);
|
|
49
|
-
(0, _defineProperty2.default)(this, "availableWidth", void 0);
|
|
50
|
-
/**
|
|
51
|
-
* Early return checks
|
|
52
|
-
*/
|
|
53
|
-
(0, _defineProperty2.default)(this, "checkIfTruncationIsNeeded", function () {
|
|
54
|
-
_this.setTextToCheck(_this.fullText);
|
|
55
|
-
if (_this.availableWidth >= _this.textWidth) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
(0, _defineProperty2.default)(this, "checkSufficientEllipsisWidth", function (truncation) {
|
|
60
|
-
var textToCheck = truncation === 'startEnd' ? "".concat(_this.ellipsis, " ").concat(_this.ellipsis) // startEnd needs a little more space
|
|
61
|
-
: _this.ellipsis;
|
|
62
|
-
_this.setTextToCheck(textToCheck);
|
|
63
|
-
if (_this.textWidth >= _this.availableWidth * 0.9) {
|
|
64
|
-
console.error('The truncation ellipsis is larger than the available width. No text can be rendered.');
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
(0, _defineProperty2.default)(this, "checkTruncationOffsetWidth", function (text) {
|
|
69
|
-
_this.setTextToCheck(text);
|
|
70
|
-
if (_this.textWidth > _this.availableWidth) {
|
|
71
|
-
console.error("The passed truncationOffset is too large for the available width. Truncating the offset instead.");
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
/**
|
|
76
|
-
* Truncation types logic. This is where the magic happens
|
|
77
|
-
*/
|
|
78
|
-
(0, _defineProperty2.default)(this, "truncateStart", function (truncationOffset) {
|
|
79
|
-
var truncatedText = _this.fullText;
|
|
80
|
-
var leadingText = '';
|
|
81
|
-
var combinedText = function combinedText() {
|
|
82
|
-
return "".concat(leadingText).concat(truncatedText);
|
|
83
|
-
};
|
|
84
|
-
if (truncationOffset) {
|
|
85
|
-
var _splitText$at = splitText(_this.fullText).at(truncationOffset);
|
|
86
|
-
var _splitText$at2 = (0, _slicedToArray2.default)(_splitText$at, 2);
|
|
87
|
-
leadingText = _splitText$at2[0];
|
|
88
|
-
truncatedText = _splitText$at2[1];
|
|
89
|
-
var widthCheck = "".concat(leadingText).concat(_this.ellipsis);
|
|
90
|
-
if (_this.checkTruncationOffsetWidth(widthCheck) === false) {
|
|
91
|
-
truncatedText = leadingText;
|
|
92
|
-
leadingText = '';
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
leadingText += _this.ellipsis;
|
|
96
|
-
_this.setTextToCheck(combinedText());
|
|
97
|
-
while (_this.textWidth > _this.availableWidth) {
|
|
98
|
-
truncatedText = removeFirstCharacter(truncatedText);
|
|
99
|
-
_this.setTextToCheck(combinedText());
|
|
100
|
-
}
|
|
101
|
-
return combinedText();
|
|
102
|
-
});
|
|
103
|
-
(0, _defineProperty2.default)(this, "truncateEnd", function (truncationOffset) {
|
|
104
|
-
var truncatedText = _this.fullText;
|
|
105
|
-
var trailingText = '';
|
|
106
|
-
var combinedText = function combinedText() {
|
|
107
|
-
return "".concat(truncatedText).concat(trailingText);
|
|
108
|
-
};
|
|
109
|
-
if (truncationOffset) {
|
|
110
|
-
var index = _this.fullText.length - truncationOffset;
|
|
111
|
-
var _splitText$at3 = splitText(_this.fullText).at(index);
|
|
112
|
-
var _splitText$at4 = (0, _slicedToArray2.default)(_splitText$at3, 2);
|
|
113
|
-
truncatedText = _splitText$at4[0];
|
|
114
|
-
trailingText = _splitText$at4[1];
|
|
115
|
-
var widthCheck = "".concat(_this.ellipsis).concat(trailingText);
|
|
116
|
-
if (_this.checkTruncationOffsetWidth(widthCheck) === false) {
|
|
117
|
-
truncatedText = trailingText;
|
|
118
|
-
trailingText = '';
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
trailingText = _this.ellipsis + trailingText;
|
|
122
|
-
_this.setTextToCheck(combinedText());
|
|
123
|
-
while (_this.textWidth > _this.availableWidth) {
|
|
124
|
-
truncatedText = removeLastCharacter(truncatedText);
|
|
125
|
-
_this.setTextToCheck(combinedText());
|
|
126
|
-
}
|
|
127
|
-
return combinedText();
|
|
128
|
-
});
|
|
129
|
-
(0, _defineProperty2.default)(this, "truncateStartEndAtPosition", function (truncationPosition) {
|
|
130
|
-
// If using a non-centered startEnd anchor position, we need to *build*
|
|
131
|
-
// the string from scratch instead of *removing* from the full text string,
|
|
132
|
-
// to make sure we don't go past the beginning or end of the text
|
|
133
|
-
var truncatedText = '';
|
|
134
|
-
_this.setTextToCheck(truncatedText);
|
|
135
|
-
|
|
136
|
-
// Ellipses are conditional - if the anchor is towards the beginning or end,
|
|
137
|
-
// it's possible they shouldn't render
|
|
138
|
-
var startingEllipsis = _this.ellipsis;
|
|
139
|
-
var endingEllipsis = _this.ellipsis;
|
|
140
|
-
|
|
141
|
-
// Split the text into two at the anchor position
|
|
142
|
-
var _splitText$at5 = splitText(_this.fullText).at(truncationPosition),
|
|
143
|
-
_splitText$at6 = (0, _slicedToArray2.default)(_splitText$at5, 2),
|
|
144
|
-
firstPart = _splitText$at6[0],
|
|
145
|
-
secondPart = _splitText$at6[1];
|
|
146
|
-
var combinedText = function combinedText() {
|
|
147
|
-
return "".concat(startingEllipsis).concat(truncatedText).concat(endingEllipsis);
|
|
148
|
-
};
|
|
149
|
-
while (_this.textWidth <= _this.availableWidth) {
|
|
150
|
-
if (firstPart.length > 0) {
|
|
151
|
-
truncatedText = "".concat(getLastCharacter(firstPart)).concat(truncatedText);
|
|
152
|
-
firstPart = removeLastCharacter(firstPart);
|
|
153
|
-
} else {
|
|
154
|
-
startingEllipsis = '';
|
|
155
|
-
}
|
|
156
|
-
if (secondPart.length > 0) {
|
|
157
|
-
truncatedText = "".concat(truncatedText).concat(getFirstCharacter(secondPart));
|
|
158
|
-
secondPart = removeFirstCharacter(secondPart);
|
|
159
|
-
} else {
|
|
160
|
-
endingEllipsis = '';
|
|
161
|
-
}
|
|
162
|
-
_this.setTextToCheck(combinedText());
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Because this logic builds text outwards vs. removing inwards, the final
|
|
166
|
-
// text width ends up a little larger than the container, and we need to
|
|
167
|
-
// remove the last added character(s)
|
|
168
|
-
if (!startingEllipsis) {
|
|
169
|
-
truncatedText = removeLastCharacter(truncatedText);
|
|
170
|
-
} else if (!endingEllipsis) {
|
|
171
|
-
truncatedText = removeFirstCharacter(truncatedText);
|
|
172
|
-
} else {
|
|
173
|
-
truncatedText = removeFirstAndLastCharacters(truncatedText);
|
|
174
|
-
}
|
|
175
|
-
return combinedText();
|
|
176
|
-
});
|
|
177
|
-
(0, _defineProperty2.default)(this, "truncateStartEndAtMiddle", function () {
|
|
178
|
-
var truncatedText = _this.fullText;
|
|
179
|
-
_this.setTextToCheck(truncatedText);
|
|
180
|
-
var combinedText = function combinedText() {
|
|
181
|
-
return "".concat(_this.ellipsis).concat(truncatedText).concat(_this.ellipsis);
|
|
182
|
-
};
|
|
183
|
-
while (_this.textWidth > _this.availableWidth) {
|
|
184
|
-
truncatedText = removeFirstAndLastCharacters(truncatedText);
|
|
185
|
-
_this.setTextToCheck(combinedText());
|
|
186
|
-
}
|
|
187
|
-
return combinedText();
|
|
188
|
-
});
|
|
189
|
-
(0, _defineProperty2.default)(this, "truncateMiddle", function () {
|
|
190
|
-
var middlePosition = Math.floor(_this.fullText.length / 2);
|
|
191
|
-
var _splitText$at7 = splitText(_this.fullText).at(middlePosition),
|
|
192
|
-
_splitText$at8 = (0, _slicedToArray2.default)(_splitText$at7, 2),
|
|
193
|
-
firstHalf = _splitText$at8[0],
|
|
194
|
-
secondHalf = _splitText$at8[1];
|
|
195
|
-
var trimfirstHalf;
|
|
196
|
-
var combinedText = function combinedText() {
|
|
197
|
-
return "".concat(firstHalf).concat(_this.ellipsis).concat(secondHalf);
|
|
198
|
-
};
|
|
199
|
-
_this.setTextToCheck(combinedText());
|
|
200
|
-
while (_this.textWidth > _this.availableWidth) {
|
|
201
|
-
trimfirstHalf = !trimfirstHalf;
|
|
202
|
-
if (trimfirstHalf) {
|
|
203
|
-
firstHalf = removeLastCharacter(firstHalf);
|
|
204
|
-
} else {
|
|
205
|
-
secondHalf = removeFirstCharacter(secondHalf);
|
|
206
|
-
}
|
|
207
|
-
_this.setTextToCheck(combinedText());
|
|
208
|
-
}
|
|
209
|
-
return combinedText();
|
|
210
|
-
});
|
|
211
|
-
this.fullText = fullText;
|
|
212
|
-
this.ellipsis = ellipsis;
|
|
213
|
-
this.availableWidth = availableWidth;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Internal measurement utils which will be overridden depending on the
|
|
218
|
-
* rendering approach used (e.g. DOM vs Canvas).
|
|
219
|
-
*/);
|
|
220
|
-
/**
|
|
221
|
-
* Creates a temporary vanilla JS DOM element for manipulating text and
|
|
222
|
-
* determining text width.
|
|
223
|
-
*
|
|
224
|
-
* Requires passing in a container element to which the temporary element
|
|
225
|
-
* will be appended. Any CSS/font styles that need to be accounted for should
|
|
226
|
-
* be automatically inherited from the container.
|
|
227
|
-
*
|
|
228
|
-
* NOTE: The consumer is responsible for calling the `cleanup()` method manually
|
|
229
|
-
* to remove the temporary DOM node once their usage of this utility is complete.
|
|
230
|
-
*/
|
|
231
|
-
var TruncationUtilsWithDOM = /*#__PURE__*/function (_TruncationUtils2) {
|
|
232
|
-
(0, _inherits2.default)(TruncationUtilsWithDOM, _TruncationUtils2);
|
|
233
|
-
var _super = _createSuper(TruncationUtilsWithDOM);
|
|
234
|
-
function TruncationUtilsWithDOM(_ref2) {
|
|
235
|
-
var _this2;
|
|
236
|
-
var container = _ref2.container,
|
|
237
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
238
|
-
(0, _classCallCheck2.default)(this, TruncationUtilsWithDOM);
|
|
239
|
-
_this2 = _super.call(this, rest);
|
|
240
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "container", void 0);
|
|
241
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "span", void 0);
|
|
242
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "setTextToCheck", function (text) {
|
|
243
|
-
_this2.span.textContent = text;
|
|
244
|
-
});
|
|
245
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "cleanup", function () {
|
|
246
|
-
_this2.container.removeChild(_this2.span);
|
|
247
|
-
});
|
|
248
|
-
_this2.container = container;
|
|
249
|
-
_this2.span = document.createElement('span');
|
|
250
|
-
_this2.span.style.position = 'absolute'; // Prevent page reflow/repaint for performance
|
|
251
|
-
_this2.span.style.whiteSpace = 'nowrap'; // EuiTextTruncate already sets this on the parent, but we'll set it here as well for consumers who use this util standalone
|
|
252
|
-
_this2.container.appendChild(_this2.span);
|
|
253
|
-
return _this2;
|
|
254
|
-
}
|
|
255
|
-
(0, _createClass2.default)(TruncationUtilsWithDOM, [{
|
|
256
|
-
key: "textWidth",
|
|
257
|
-
get: function get() {
|
|
258
|
-
return this.span.offsetWidth;
|
|
259
|
-
}
|
|
260
|
-
}]);
|
|
261
|
-
return TruncationUtilsWithDOM;
|
|
262
|
-
}(_TruncationUtils);
|
|
263
|
-
/**
|
|
264
|
-
* Creates a temporary Canvas element for manipulating text & determining
|
|
265
|
-
* text width. This method is compatible with charts or other canvas-rendered
|
|
266
|
-
* frameworks, and requires no cleanup method.
|
|
29
|
+
* Under the hood, a temporary Canvas element is created for manipulating text
|
|
30
|
+
* & determining text width.
|
|
267
31
|
*
|
|
268
32
|
* To accurately measure text, canvas rendering requires either a container to
|
|
269
33
|
* compute/derive font styles from, or a static font string (useful for usage
|
|
270
34
|
* outside the DOM). Particular care should be applied when fallback fonts are
|
|
271
35
|
* used, as more fallback fonts can lead to less precision.
|
|
272
36
|
*
|
|
273
|
-
* Please note that while canvas is more performant than DOM
|
|
274
|
-
* are subpixel to single digit pixel differences between
|
|
275
|
-
* measurement due to the different rendering engines used.
|
|
37
|
+
* Please note that while canvas is more significantly more performant than DOM
|
|
38
|
+
* measurement, there are subpixel to single digit pixel differences between
|
|
39
|
+
* DOM and canvas measurement due to the different rendering engines used.
|
|
276
40
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
(0, _classCallCheck2.default)(this, TruncationUtilsWithCanvas);
|
|
287
|
-
_this3 = _super2.call(this, rest);
|
|
288
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this3), "context", void 0);
|
|
289
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this3), "currentText", '');
|
|
290
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this3), "computeFontFromElement", function (element) {
|
|
41
|
+
var CanvasTextUtils = /*#__PURE__*/function () {
|
|
42
|
+
function CanvasTextUtils(_ref) {
|
|
43
|
+
var _this = this;
|
|
44
|
+
var font = _ref.font,
|
|
45
|
+
container = _ref.container;
|
|
46
|
+
(0, _classCallCheck2.default)(this, CanvasTextUtils);
|
|
47
|
+
(0, _defineProperty2.default)(this, "context", void 0);
|
|
48
|
+
(0, _defineProperty2.default)(this, "currentText", '');
|
|
49
|
+
(0, _defineProperty2.default)(this, "computeFontFromElement", function (element) {
|
|
291
50
|
var computedStyles = window.getComputedStyle(element);
|
|
51
|
+
// TODO: font-stretch is not included even though it potentially should be
|
|
52
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/font#constituent_properties
|
|
53
|
+
// It appears to be unsupported and/or breaks font computation in canvas
|
|
292
54
|
return ['font-style', 'font-variant', 'font-weight', 'font-size', 'font-family'].map(function (prop) {
|
|
293
55
|
return computedStyles.getPropertyValue(prop);
|
|
294
56
|
}).join(' ').trim();
|
|
295
57
|
});
|
|
296
|
-
(0, _defineProperty2.default)(
|
|
297
|
-
|
|
58
|
+
(0, _defineProperty2.default)(this, "setTextToCheck", function (text) {
|
|
59
|
+
_this.currentText = text;
|
|
298
60
|
});
|
|
299
|
-
|
|
61
|
+
this.context = document.createElement('canvas').getContext('2d');
|
|
300
62
|
|
|
301
63
|
// Set the canvas font to ensure text width calculations are correct
|
|
302
64
|
if (font) {
|
|
303
|
-
|
|
65
|
+
this.context.font = font;
|
|
304
66
|
} else if (container) {
|
|
305
|
-
|
|
67
|
+
this.context.font = this.computeFontFromElement(container);
|
|
306
68
|
}
|
|
307
|
-
return _this3;
|
|
308
69
|
}
|
|
309
|
-
(0, _createClass2.default)(
|
|
70
|
+
(0, _createClass2.default)(CanvasTextUtils, [{
|
|
310
71
|
key: "textWidth",
|
|
311
72
|
get: function get() {
|
|
312
73
|
return this.context.measureText(this.currentText).width;
|
|
313
74
|
}
|
|
314
75
|
}]);
|
|
315
|
-
return
|
|
316
|
-
}(
|
|
76
|
+
return CanvasTextUtils;
|
|
77
|
+
}();
|
|
78
|
+
/**
|
|
79
|
+
* Utilities for truncating types at various positions, as well as
|
|
80
|
+
* determining whether truncation is possible or even necessary.
|
|
81
|
+
*/
|
|
82
|
+
exports.CanvasTextUtils = CanvasTextUtils;
|
|
83
|
+
var TruncationUtils = /*#__PURE__*/function (_CanvasTextUtils) {
|
|
84
|
+
(0, _inherits2.default)(TruncationUtils, _CanvasTextUtils);
|
|
85
|
+
var _super = _createSuper(TruncationUtils);
|
|
86
|
+
function TruncationUtils(_ref2) {
|
|
87
|
+
var _this2;
|
|
88
|
+
var fullText = _ref2.fullText,
|
|
89
|
+
ellipsis = _ref2.ellipsis,
|
|
90
|
+
_availableWidth = _ref2.availableWidth,
|
|
91
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
92
|
+
(0, _classCallCheck2.default)(this, TruncationUtils);
|
|
93
|
+
_this2 = _super.call(this, rest);
|
|
94
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "fullText", void 0);
|
|
95
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "ellipsis", void 0);
|
|
96
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "availableWidth", void 0);
|
|
97
|
+
/**
|
|
98
|
+
* Performance utilities
|
|
99
|
+
*/
|
|
100
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "debugPerformance", false);
|
|
101
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "debugCounter", 0);
|
|
102
|
+
/**
|
|
103
|
+
* Internal utils for calculating a ratio based on the passed available width
|
|
104
|
+
* vs the full text width.
|
|
105
|
+
* This ratio is used to get an initial _approximate_ text string that should
|
|
106
|
+
* be slightly over the available width, which we can then remove from
|
|
107
|
+
* character-by-character until the text just fits within the available width.
|
|
108
|
+
*/
|
|
109
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "widthRatio", 0);
|
|
110
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "setTextWidthRatio", function () {
|
|
111
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this2.fullText;
|
|
112
|
+
var textToOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
113
|
+
// Account for reduced available width due to (e.g.) truncation offset
|
|
114
|
+
var availableWidth = _this2.availableWidth;
|
|
115
|
+
if (textToOffset) {
|
|
116
|
+
_this2.setTextToCheck(textToOffset);
|
|
117
|
+
availableWidth = availableWidth - _this2.textWidth;
|
|
118
|
+
}
|
|
119
|
+
_this2.setTextToCheck(text);
|
|
120
|
+
_this2.widthRatio = availableWidth / _this2.textWidth;
|
|
121
|
+
});
|
|
122
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "getTextFromRatio", function (text, type) {
|
|
123
|
+
var characterRatio = Math.ceil(text.length * _this2.widthRatio);
|
|
124
|
+
var index = type === 'start' ? text.length - characterRatio : characterRatio;
|
|
125
|
+
var _splitText$at = splitText(text).at(index),
|
|
126
|
+
_splitText$at2 = (0, _slicedToArray2.default)(_splitText$at, 2),
|
|
127
|
+
end = _splitText$at2[0],
|
|
128
|
+
start = _splitText$at2[1];
|
|
129
|
+
return type === 'start' ? start : end;
|
|
130
|
+
});
|
|
131
|
+
/**
|
|
132
|
+
* Early return checks
|
|
133
|
+
*/
|
|
134
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "checkIfTruncationIsNeeded", function () {
|
|
135
|
+
_this2.setTextToCheck(_this2.fullText);
|
|
136
|
+
if (_this2.availableWidth >= _this2.textWidth) {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "checkSufficientEllipsisWidth", function (truncation) {
|
|
141
|
+
var textToCheck = truncation === 'startEnd' ? "".concat(_this2.ellipsis, " ").concat(_this2.ellipsis) // startEnd needs a little more space
|
|
142
|
+
: _this2.ellipsis;
|
|
143
|
+
_this2.setTextToCheck(textToCheck);
|
|
144
|
+
if (_this2.textWidth >= _this2.availableWidth * 0.9) {
|
|
145
|
+
console.error('The truncation ellipsis is larger than the available width. No text can be rendered.');
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "checkTruncationOffsetWidth", function (text) {
|
|
150
|
+
_this2.setTextToCheck(text);
|
|
151
|
+
if (_this2.textWidth > _this2.availableWidth) {
|
|
152
|
+
console.error('The passed truncationOffset is too large for the available width. Truncating the offset instead.');
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
/**
|
|
157
|
+
* Truncation types logic. This is where the magic happens
|
|
158
|
+
*/
|
|
159
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "truncateStart", function (truncationOffset) {
|
|
160
|
+
var truncatedText = _this2.fullText;
|
|
161
|
+
var leadingText = '';
|
|
162
|
+
var combinedText = function combinedText() {
|
|
163
|
+
return leadingText + truncatedText;
|
|
164
|
+
};
|
|
165
|
+
if (truncationOffset) {
|
|
166
|
+
var _splitText$at3 = splitText(_this2.fullText).at(truncationOffset);
|
|
167
|
+
var _splitText$at4 = (0, _slicedToArray2.default)(_splitText$at3, 2);
|
|
168
|
+
leadingText = _splitText$at4[0];
|
|
169
|
+
truncatedText = _splitText$at4[1];
|
|
170
|
+
var widthCheck = leadingText + _this2.ellipsis;
|
|
171
|
+
if (_this2.checkTruncationOffsetWidth(widthCheck) === false) {
|
|
172
|
+
truncatedText = leadingText;
|
|
173
|
+
leadingText = '';
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Get text width ratio width accounting for any truncation offset text,
|
|
178
|
+
// and guesstimate an initial truncated string
|
|
179
|
+
_this2.setTextWidthRatio(truncatedText, leadingText);
|
|
180
|
+
truncatedText = _this2.getTextFromRatio(truncatedText, 'start');
|
|
181
|
+
leadingText += _this2.ellipsis;
|
|
182
|
+
_this2.setTextToCheck(combinedText());
|
|
183
|
+
while (_this2.textWidth > _this2.availableWidth) {
|
|
184
|
+
truncatedText = removeFirstCharacter(truncatedText);
|
|
185
|
+
_this2.setTextToCheck(combinedText());
|
|
186
|
+
}
|
|
187
|
+
return combinedText();
|
|
188
|
+
});
|
|
189
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "truncateEnd", function (truncationOffset) {
|
|
190
|
+
var truncatedText = _this2.fullText;
|
|
191
|
+
var trailingText = '';
|
|
192
|
+
var combinedText = function combinedText() {
|
|
193
|
+
return truncatedText + trailingText;
|
|
194
|
+
};
|
|
195
|
+
if (truncationOffset) {
|
|
196
|
+
var index = _this2.fullText.length - truncationOffset;
|
|
197
|
+
var _splitText$at5 = splitText(_this2.fullText).at(index);
|
|
198
|
+
var _splitText$at6 = (0, _slicedToArray2.default)(_splitText$at5, 2);
|
|
199
|
+
truncatedText = _splitText$at6[0];
|
|
200
|
+
trailingText = _splitText$at6[1];
|
|
201
|
+
var widthCheck = _this2.ellipsis + trailingText;
|
|
202
|
+
if (_this2.checkTruncationOffsetWidth(widthCheck) === false) {
|
|
203
|
+
truncatedText = trailingText;
|
|
204
|
+
trailingText = '';
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Get text width ratio width accounting for any truncation offset text,
|
|
209
|
+
// and guesstimate an initial truncated string
|
|
210
|
+
_this2.setTextWidthRatio(truncatedText, trailingText);
|
|
211
|
+
truncatedText = _this2.getTextFromRatio(truncatedText, 'end');
|
|
212
|
+
trailingText = _this2.ellipsis + trailingText;
|
|
213
|
+
_this2.setTextToCheck(combinedText());
|
|
214
|
+
while (_this2.textWidth > _this2.availableWidth) {
|
|
215
|
+
truncatedText = removeLastCharacter(truncatedText);
|
|
216
|
+
_this2.setTextToCheck(combinedText());
|
|
217
|
+
}
|
|
218
|
+
return combinedText();
|
|
219
|
+
});
|
|
220
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "truncateStartEndAtPosition", function (truncationPosition) {
|
|
221
|
+
// Split the text from the anchor position, using the width ratio
|
|
222
|
+
// to get the starting and ending indices from the position
|
|
223
|
+
_this2.setTextWidthRatio();
|
|
224
|
+
var characterRatio = Math.floor(_this2.fullText.length * _this2.widthRatio / 2);
|
|
225
|
+
var truncateStart = truncationPosition - characterRatio;
|
|
226
|
+
var truncateEnd = truncationPosition + characterRatio;
|
|
227
|
+
|
|
228
|
+
// If either of the approximate start/end truncation indices go beyond the
|
|
229
|
+
// bounds of the actual text, we can simply use end or start truncation instead
|
|
230
|
+
if (truncateStart < 0) {
|
|
231
|
+
return _this2.truncateEnd();
|
|
232
|
+
}
|
|
233
|
+
if (truncateEnd >= _this2.fullText.length) {
|
|
234
|
+
return _this2.truncateStart();
|
|
235
|
+
}
|
|
236
|
+
var truncatedText = _this2.fullText.substring(truncateStart, truncateEnd);
|
|
237
|
+
var combinedText = function combinedText() {
|
|
238
|
+
return _this2.ellipsis + truncatedText + _this2.ellipsis;
|
|
239
|
+
};
|
|
240
|
+
_this2.setTextToCheck(combinedText());
|
|
241
|
+
var alternating;
|
|
242
|
+
while (_this2.textWidth > _this2.availableWidth) {
|
|
243
|
+
truncatedText = alternating ? removeLastCharacter(truncatedText) : removeFirstCharacter(truncatedText);
|
|
244
|
+
alternating = !alternating;
|
|
245
|
+
_this2.setTextToCheck(combinedText());
|
|
246
|
+
}
|
|
247
|
+
return combinedText();
|
|
248
|
+
});
|
|
249
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "truncateStartEndAtMiddle", function () {
|
|
250
|
+
var middlePosition = Math.floor(_this2.fullText.length / 2);
|
|
251
|
+
return _this2.truncateStartEndAtPosition(middlePosition);
|
|
252
|
+
});
|
|
253
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "truncateMiddle", function () {
|
|
254
|
+
var middlePosition = Math.floor(_this2.fullText.length / 2);
|
|
255
|
+
var _splitText$at7 = splitText(_this2.fullText).at(middlePosition),
|
|
256
|
+
_splitText$at8 = (0, _slicedToArray2.default)(_splitText$at7, 2),
|
|
257
|
+
firstHalf = _splitText$at8[0],
|
|
258
|
+
secondHalf = _splitText$at8[1];
|
|
259
|
+
_this2.setTextWidthRatio();
|
|
260
|
+
firstHalf = _this2.getTextFromRatio(firstHalf, 'end');
|
|
261
|
+
secondHalf = _this2.getTextFromRatio(secondHalf, 'start');
|
|
262
|
+
var combinedText = function combinedText() {
|
|
263
|
+
return firstHalf + _this2.ellipsis + secondHalf;
|
|
264
|
+
};
|
|
265
|
+
_this2.setTextToCheck(combinedText());
|
|
266
|
+
var alternating;
|
|
267
|
+
while (_this2.textWidth > _this2.availableWidth) {
|
|
268
|
+
alternating = !alternating;
|
|
269
|
+
if (alternating) {
|
|
270
|
+
firstHalf = removeLastCharacter(firstHalf);
|
|
271
|
+
} else {
|
|
272
|
+
secondHalf = removeFirstCharacter(secondHalf);
|
|
273
|
+
}
|
|
274
|
+
_this2.setTextToCheck(combinedText());
|
|
275
|
+
}
|
|
276
|
+
return combinedText();
|
|
277
|
+
});
|
|
278
|
+
_this2.fullText = fullText;
|
|
279
|
+
_this2.ellipsis = ellipsis;
|
|
280
|
+
_this2.availableWidth = _availableWidth;
|
|
281
|
+
return _this2;
|
|
282
|
+
}
|
|
283
|
+
(0, _createClass2.default)(TruncationUtils, [{
|
|
284
|
+
key: "textWidth",
|
|
285
|
+
get: function get() {
|
|
286
|
+
if (this.debugPerformance) {
|
|
287
|
+
this.debugCounter++;
|
|
288
|
+
}
|
|
289
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(TruncationUtils.prototype), "textWidth", this);
|
|
290
|
+
}
|
|
291
|
+
}]);
|
|
292
|
+
return TruncationUtils;
|
|
293
|
+
}(CanvasTextUtils);
|
|
317
294
|
/**
|
|
318
295
|
* DRY character/substring utils
|
|
319
296
|
*/
|
|
320
|
-
exports.
|
|
297
|
+
exports.TruncationUtils = TruncationUtils;
|
|
321
298
|
var removeLastCharacter = function removeLastCharacter(text) {
|
|
322
299
|
return text.substring(0, text.length - 1);
|
|
323
300
|
};
|
|
324
|
-
var getLastCharacter = function getLastCharacter(text) {
|
|
325
|
-
return text.substring(text.length - 1);
|
|
326
|
-
};
|
|
327
301
|
var removeFirstCharacter = function removeFirstCharacter(text) {
|
|
328
302
|
return text.substring(1);
|
|
329
303
|
};
|
|
330
|
-
var getFirstCharacter = function getFirstCharacter(text) {
|
|
331
|
-
return text.substring(0, 1);
|
|
332
|
-
};
|
|
333
|
-
var removeFirstAndLastCharacters = function removeFirstAndLastCharacters(text) {
|
|
334
|
-
return text.substring(1, text.length - 1);
|
|
335
|
-
};
|
|
336
304
|
var splitText = function splitText(text) {
|
|
337
305
|
return {
|
|
338
306
|
at: function at(index) {
|
|
@@ -48,7 +48,7 @@ EuiTimelineItemIcon.propTypes = {
|
|
|
48
48
|
/**
|
|
49
49
|
* Any `ReactNode`, but preferably `EuiAvatar`, or a `string` as an `EuiIcon['type']`.
|
|
50
50
|
*/
|
|
51
|
-
icon: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "error", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired]).isRequired,
|
|
51
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "error", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired]).isRequired,
|
|
52
52
|
verticalAlign: _propTypes.default.any,
|
|
53
53
|
/**
|
|
54
54
|
* Specify an `aria-label` for the icon when passed as an `IconType`.
|