@elastic/eui 113.3.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.
Files changed (358) hide show
  1. package/es/components/avatar/avatar.js +1 -1
  2. package/es/components/badge/badge.js +1 -1
  3. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  4. package/es/components/basic_table/basic_table.js +4 -4
  5. package/es/components/basic_table/in_memory_table.js +4 -4
  6. package/es/components/button/button_display/_button_display_content.js +1 -1
  7. package/es/components/button/button_empty/button_empty.js +1 -1
  8. package/es/components/button/button_icon/button_icon.js +1 -1
  9. package/es/components/button/split_button/split_button.js +13 -0
  10. package/es/components/button/split_button/split_button_actions.js +15 -0
  11. package/es/components/call_out/call_out.js +1 -1
  12. package/es/components/card/card.js +1 -1
  13. package/es/components/collapsible_nav/collapsible_nav.js +6 -1
  14. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  15. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  16. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  17. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  18. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  19. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  20. package/es/components/color_picker/color_picker.js +31 -8
  21. package/es/components/comment_list/comment.js +2 -2
  22. package/es/components/comment_list/comment_event.js +1 -1
  23. package/es/components/comment_list/comment_list.js +2 -2
  24. package/es/components/comment_list/comment_timeline.js +1 -1
  25. package/es/components/context_menu/context_menu_item.js +1 -1
  26. package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
  27. package/es/components/datagrid/body/data_grid_body.js +7 -7
  28. package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
  29. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  30. package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  31. package/es/components/datagrid/controls/column_sorting.js +7 -7
  32. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  33. package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  34. package/es/components/datagrid/utils/in_memory.js +6 -6
  35. package/es/components/datagrid/utils/scrolling.js +39 -10
  36. package/es/components/date_picker/date_picker.js +2 -2
  37. package/es/components/date_picker/date_picker_range.js +1 -1
  38. package/es/components/empty_prompt/empty_prompt.js +1 -1
  39. package/es/components/flyout/_flyout_overlay.js +34 -4
  40. package/es/components/flyout/flyout.component.js +13 -9
  41. package/es/components/flyout/flyout.js +10 -2
  42. package/es/components/flyout/flyout.styles.js +2 -2
  43. package/es/components/flyout/flyout_menu.js +4 -3
  44. package/es/components/flyout/flyout_resizable.js +6 -1
  45. package/es/components/flyout/manager/actions.js +5 -2
  46. package/es/components/flyout/manager/activity_stage.js +45 -43
  47. package/es/components/flyout/manager/flyout_child.js +2 -1
  48. package/es/components/flyout/manager/flyout_managed.js +36 -18
  49. package/es/components/flyout/manager/flyout_managed.styles.js +4 -16
  50. package/es/components/flyout/manager/reducer.js +116 -57
  51. package/es/components/flyout/manager/store.js +13 -6
  52. package/es/components/form/field_number/field_number.js +2 -2
  53. package/es/components/form/field_text/field_text.js +2 -2
  54. package/es/components/form/form_control_button/form_control_button.js +1 -1
  55. package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  56. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  57. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  58. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  59. package/es/components/form/text_area/text_area.js +2 -2
  60. package/es/components/header/header_links/header_link.js +1 -1
  61. package/es/components/header/header_links/header_links.js +1 -1
  62. package/es/components/header/header_logo/header_logo.js +1 -1
  63. package/es/components/header/header_section/header_section_item_button.js +1 -1
  64. package/es/components/icon/assets/transition_bottom_in.js +37 -0
  65. package/es/components/icon/assets/transition_bottom_out.js +37 -0
  66. package/es/components/icon/icon.js +1 -1
  67. package/es/components/icon/icon_map.js +6 -0
  68. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  69. package/es/components/list_group/list_group.js +2 -2
  70. package/es/components/list_group/list_group_item.js +2 -2
  71. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  72. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  73. package/es/components/loading/loading_logo.js +1 -1
  74. package/es/components/markdown_editor/markdown_editor.js +1 -1
  75. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  76. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  77. package/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
  78. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  79. package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
  80. package/es/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +172 -0
  81. package/es/components/overlay_mask/overlay_mask.js +10 -3
  82. package/es/components/page/page_header/page_header_content.js +1 -1
  83. package/es/components/pagination/pagination_button.js +1 -1
  84. package/es/components/search_bar/filters/field_value_toggle_filter.js +42 -99
  85. package/es/components/search_bar/search_filters.js +18 -46
  86. package/es/components/selectable/selectable_list/selectable_list.js +1 -1
  87. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  88. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  89. package/es/components/table/mobile/table_header_mobile.js +1 -1
  90. package/es/components/table/table_header_cell.js +1 -1
  91. package/es/components/table/utils.js +29 -9
  92. package/es/components/timeline/timeline_item_icon.js +1 -1
  93. package/es/components/toast/global_toast_list.js +1 -1
  94. package/es/components/toast/toast.js +1 -1
  95. package/es/components/tool_tip/icon_tip.js +1 -1
  96. package/es/components/tree_view/tree_view_item.styles.js +1 -1
  97. package/es/services/hooks/index.js +8 -8
  98. package/es/services/hooks/useIsPointerDown.js +6 -15
  99. package/es/services/index.js +1 -1
  100. package/eui.d.ts +130 -71
  101. package/i18ntokens.json +661 -643
  102. package/lib/components/avatar/avatar.js +1 -1
  103. package/lib/components/badge/badge.js +1 -1
  104. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  105. package/lib/components/basic_table/basic_table.js +4 -4
  106. package/lib/components/basic_table/in_memory_table.js +4 -4
  107. package/lib/components/button/button_display/_button_display_content.js +1 -1
  108. package/lib/components/button/button_empty/button_empty.js +1 -1
  109. package/lib/components/button/button_icon/button_icon.js +1 -1
  110. package/lib/components/button/split_button/split_button.js +13 -0
  111. package/lib/components/button/split_button/split_button_actions.js +15 -0
  112. package/lib/components/call_out/call_out.js +1 -1
  113. package/lib/components/card/card.js +1 -1
  114. package/lib/components/collapsible_nav/collapsible_nav.js +6 -1
  115. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  116. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  117. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  118. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  119. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  120. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  121. package/lib/components/color_picker/color_picker.js +30 -7
  122. package/lib/components/comment_list/comment.js +2 -2
  123. package/lib/components/comment_list/comment_event.js +1 -1
  124. package/lib/components/comment_list/comment_list.js +2 -2
  125. package/lib/components/comment_list/comment_timeline.js +1 -1
  126. package/lib/components/context_menu/context_menu_item.js +1 -1
  127. package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
  128. package/lib/components/datagrid/body/data_grid_body.js +7 -7
  129. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
  130. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  131. package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  132. package/lib/components/datagrid/controls/column_sorting.js +7 -7
  133. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  134. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  135. package/lib/components/datagrid/utils/in_memory.js +6 -6
  136. package/lib/components/datagrid/utils/scrolling.js +37 -8
  137. package/lib/components/date_picker/date_picker.js +2 -2
  138. package/lib/components/date_picker/date_picker_range.js +1 -1
  139. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  140. package/lib/components/flyout/_flyout_overlay.js +33 -3
  141. package/lib/components/flyout/flyout.component.js +13 -9
  142. package/lib/components/flyout/flyout.js +10 -2
  143. package/lib/components/flyout/flyout.styles.js +2 -2
  144. package/lib/components/flyout/flyout_menu.js +4 -3
  145. package/lib/components/flyout/flyout_resizable.js +6 -1
  146. package/lib/components/flyout/manager/actions.js +5 -2
  147. package/lib/components/flyout/manager/activity_stage.js +45 -43
  148. package/lib/components/flyout/manager/flyout_child.js +2 -1
  149. package/lib/components/flyout/manager/flyout_managed.js +46 -31
  150. package/lib/components/flyout/manager/flyout_managed.styles.js +3 -15
  151. package/lib/components/flyout/manager/reducer.js +116 -57
  152. package/lib/components/flyout/manager/store.js +13 -6
  153. package/lib/components/form/field_number/field_number.js +2 -2
  154. package/lib/components/form/field_text/field_text.js +2 -2
  155. package/lib/components/form/form_control_button/form_control_button.js +1 -1
  156. package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  157. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  158. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  159. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  160. package/lib/components/form/text_area/text_area.js +2 -2
  161. package/lib/components/header/header_links/header_link.js +1 -1
  162. package/lib/components/header/header_links/header_links.js +1 -1
  163. package/lib/components/header/header_logo/header_logo.js +1 -1
  164. package/lib/components/header/header_section/header_section_item_button.js +1 -1
  165. package/lib/components/icon/assets/transition_bottom_in.js +44 -0
  166. package/lib/components/icon/assets/transition_bottom_out.js +44 -0
  167. package/lib/components/icon/icon.js +1 -1
  168. package/lib/components/icon/icon_map.js +10 -0
  169. package/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
  170. package/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
  171. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  172. package/lib/components/list_group/list_group.js +2 -2
  173. package/lib/components/list_group/list_group_item.js +2 -2
  174. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  175. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  176. package/lib/components/loading/loading_logo.js +1 -1
  177. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  178. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  179. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  180. package/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
  181. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  182. package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
  183. package/lib/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
  184. package/lib/components/overlay_mask/overlay_mask.js +10 -3
  185. package/lib/components/page/page_header/page_header_content.js +1 -1
  186. package/lib/components/pagination/pagination_button.js +1 -1
  187. package/lib/components/search_bar/filters/field_value_toggle_filter.js +44 -101
  188. package/lib/components/search_bar/search_filters.js +20 -45
  189. package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
  190. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  191. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  192. package/lib/components/table/mobile/table_header_mobile.js +1 -1
  193. package/lib/components/table/table_header_cell.js +1 -1
  194. package/lib/components/table/utils.js +30 -10
  195. package/lib/components/timeline/timeline_item_icon.js +1 -1
  196. package/lib/components/toast/global_toast_list.js +1 -1
  197. package/lib/components/toast/toast.js +1 -1
  198. package/lib/components/tool_tip/icon_tip.js +1 -1
  199. package/lib/components/tree_view/tree_view_item.styles.js +1 -1
  200. package/lib/services/hooks/index.js +60 -91
  201. package/lib/services/hooks/useIsPointerDown.js +7 -14
  202. package/lib/services/index.js +70 -11
  203. package/optimize/es/components/color_picker/color_picker.js +31 -8
  204. package/optimize/es/components/datagrid/utils/scrolling.js +39 -10
  205. package/optimize/es/components/flyout/_flyout_overlay.js +34 -4
  206. package/optimize/es/components/flyout/flyout.component.js +13 -9
  207. package/optimize/es/components/flyout/flyout.js +4 -1
  208. package/optimize/es/components/flyout/flyout.styles.js +2 -2
  209. package/optimize/es/components/flyout/flyout_menu.js +2 -1
  210. package/optimize/es/components/flyout/manager/actions.js +5 -2
  211. package/optimize/es/components/flyout/manager/activity_stage.js +45 -43
  212. package/optimize/es/components/flyout/manager/flyout_managed.js +33 -16
  213. package/optimize/es/components/flyout/manager/flyout_managed.styles.js +4 -16
  214. package/optimize/es/components/flyout/manager/reducer.js +116 -57
  215. package/optimize/es/components/flyout/manager/store.js +13 -6
  216. package/optimize/es/components/icon/assets/transition_bottom_in.js +36 -0
  217. package/optimize/es/components/icon/assets/transition_bottom_out.js +36 -0
  218. package/optimize/es/components/icon/icon_map.js +6 -0
  219. package/optimize/es/components/markdown_editor/markdown_editor_help_button.js +5 -3
  220. package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
  221. package/optimize/es/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +172 -0
  222. package/optimize/es/components/overlay_mask/overlay_mask.js +4 -2
  223. package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +43 -66
  224. package/optimize/es/components/search_bar/search_filters.js +18 -40
  225. package/optimize/es/components/table/mobile/table_header_mobile.js +1 -1
  226. package/optimize/es/components/table/utils.js +29 -9
  227. package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -1
  228. package/optimize/es/services/hooks/index.js +8 -8
  229. package/optimize/es/services/hooks/useIsPointerDown.js +6 -10
  230. package/optimize/es/services/index.js +1 -1
  231. package/optimize/lib/components/color_picker/color_picker.js +30 -7
  232. package/optimize/lib/components/datagrid/utils/scrolling.js +37 -8
  233. package/optimize/lib/components/flyout/_flyout_overlay.js +33 -3
  234. package/optimize/lib/components/flyout/flyout.component.js +13 -9
  235. package/optimize/lib/components/flyout/flyout.js +4 -1
  236. package/optimize/lib/components/flyout/flyout.styles.js +2 -2
  237. package/optimize/lib/components/flyout/flyout_menu.js +2 -1
  238. package/optimize/lib/components/flyout/manager/actions.js +5 -2
  239. package/optimize/lib/components/flyout/manager/activity_stage.js +45 -43
  240. package/optimize/lib/components/flyout/manager/flyout_managed.js +38 -24
  241. package/optimize/lib/components/flyout/manager/flyout_managed.styles.js +3 -16
  242. package/optimize/lib/components/flyout/manager/reducer.js +116 -57
  243. package/optimize/lib/components/flyout/manager/store.js +13 -6
  244. package/optimize/lib/components/icon/assets/transition_bottom_in.js +44 -0
  245. package/optimize/lib/components/icon/assets/transition_bottom_out.js +44 -0
  246. package/optimize/lib/components/icon/icon_map.js +10 -0
  247. package/optimize/lib/components/icon/svgs/transition_bottom_in.svg +1 -0
  248. package/optimize/lib/components/icon/svgs/transition_bottom_out.svg +1 -0
  249. package/optimize/lib/components/markdown_editor/markdown_editor_help_button.js +5 -3
  250. package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
  251. package/optimize/lib/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
  252. package/optimize/lib/components/overlay_mask/overlay_mask.js +4 -2
  253. package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +45 -69
  254. package/optimize/lib/components/search_bar/search_filters.js +19 -40
  255. package/optimize/lib/components/table/mobile/table_header_mobile.js +1 -1
  256. package/optimize/lib/components/table/utils.js +30 -10
  257. package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -1
  258. package/optimize/lib/services/hooks/index.js +60 -91
  259. package/optimize/lib/services/hooks/useIsPointerDown.js +5 -10
  260. package/optimize/lib/services/index.js +70 -11
  261. package/package.json +5 -4
  262. package/test-env/components/avatar/avatar.js +1 -1
  263. package/test-env/components/badge/badge.js +1 -1
  264. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  265. package/test-env/components/basic_table/basic_table.js +4 -4
  266. package/test-env/components/basic_table/in_memory_table.js +4 -4
  267. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  268. package/test-env/components/button/button_empty/button_empty.js +1 -1
  269. package/test-env/components/button/button_icon/button_icon.js +1 -1
  270. package/test-env/components/button/split_button/split_button.js +13 -0
  271. package/test-env/components/button/split_button/split_button_actions.js +15 -0
  272. package/test-env/components/call_out/call_out.js +1 -1
  273. package/test-env/components/card/card.js +1 -1
  274. package/test-env/components/collapsible_nav/collapsible_nav.js +6 -1
  275. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  276. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  277. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  278. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  279. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  280. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  281. package/test-env/components/color_picker/color_picker.js +30 -7
  282. package/test-env/components/comment_list/comment.js +2 -2
  283. package/test-env/components/comment_list/comment_event.js +1 -1
  284. package/test-env/components/comment_list/comment_list.js +2 -2
  285. package/test-env/components/comment_list/comment_timeline.js +1 -1
  286. package/test-env/components/context_menu/context_menu_item.js +1 -1
  287. package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
  288. package/test-env/components/datagrid/body/data_grid_body.js +7 -7
  289. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
  290. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  291. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  292. package/test-env/components/datagrid/controls/column_sorting.js +7 -7
  293. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  294. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  295. package/test-env/components/datagrid/utils/in_memory.js +6 -6
  296. package/test-env/components/datagrid/utils/scrolling.js +37 -8
  297. package/test-env/components/date_picker/date_picker.js +2 -2
  298. package/test-env/components/date_picker/date_picker_range.js +1 -1
  299. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  300. package/test-env/components/flyout/_flyout_overlay.js +33 -3
  301. package/test-env/components/flyout/flyout.component.js +13 -9
  302. package/test-env/components/flyout/flyout.styles.js +2 -2
  303. package/test-env/components/flyout/flyout_menu.js +4 -3
  304. package/test-env/components/flyout/flyout_resizable.js +6 -1
  305. package/test-env/components/flyout/manager/actions.js +5 -2
  306. package/test-env/components/flyout/manager/activity_stage.js +45 -43
  307. package/test-env/components/flyout/manager/flyout_child.js +2 -1
  308. package/test-env/components/flyout/manager/flyout_managed.js +40 -25
  309. package/test-env/components/flyout/manager/flyout_managed.styles.js +3 -16
  310. package/test-env/components/flyout/manager/reducer.js +116 -57
  311. package/test-env/components/flyout/manager/store.js +13 -6
  312. package/test-env/components/form/field_number/field_number.js +2 -2
  313. package/test-env/components/form/field_text/field_text.js +2 -2
  314. package/test-env/components/form/form_control_button/form_control_button.js +1 -1
  315. package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  316. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  317. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  318. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  319. package/test-env/components/form/text_area/text_area.js +2 -2
  320. package/test-env/components/header/header_links/header_link.js +1 -1
  321. package/test-env/components/header/header_links/header_links.js +1 -1
  322. package/test-env/components/header/header_logo/header_logo.js +1 -1
  323. package/test-env/components/header/header_section/header_section_item_button.js +1 -1
  324. package/test-env/components/icon/assets/transition_bottom_in.js +44 -0
  325. package/test-env/components/icon/assets/transition_bottom_out.js +44 -0
  326. package/test-env/components/icon/icon_map.js +10 -0
  327. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  328. package/test-env/components/list_group/list_group.js +2 -2
  329. package/test-env/components/list_group/list_group_item.js +2 -2
  330. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  331. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  332. package/test-env/components/loading/loading_logo.js +1 -1
  333. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  334. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  335. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  336. package/test-env/components/markdown_editor/markdown_editor_help_button.js +5 -3
  337. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  338. package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -1
  339. package/test-env/components/markdown_editor/plugins/remark/remark_intraword_underscore.js +179 -0
  340. package/test-env/components/overlay_mask/overlay_mask.js +10 -3
  341. package/test-env/components/page/page_header/page_header_content.js +1 -1
  342. package/test-env/components/pagination/pagination_button.js +1 -1
  343. package/test-env/components/search_bar/filters/field_value_toggle_filter.js +44 -96
  344. package/test-env/components/search_bar/search_filters.js +19 -39
  345. package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
  346. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  347. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  348. package/test-env/components/table/mobile/table_header_mobile.js +1 -1
  349. package/test-env/components/table/table_header_cell.js +1 -1
  350. package/test-env/components/table/utils.js +30 -10
  351. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  352. package/test-env/components/toast/global_toast_list.js +1 -1
  353. package/test-env/components/toast/toast.js +1 -1
  354. package/test-env/components/tool_tip/icon_tip.js +1 -1
  355. package/test-env/components/tree_view/tree_view_item.styles.js +1 -1
  356. package/test-env/services/hooks/index.js +60 -91
  357. package/test-env/services/hooks/useIsPointerDown.js +5 -10
  358. package/test-env/services/index.js +70 -11
@@ -69,9 +69,9 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
69
69
  push: {
70
70
  push: /*#__PURE__*/css("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
71
71
  right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
72
- left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;"),
73
- noAnimation: _ref
72
+ left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
74
73
  },
74
+ noAnimation: _ref,
75
75
  // Padding
76
76
  paddingSizes: {
77
77
  none: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
- var _excluded = ["className", "title", "titleId", "hideTitle", "hideCloseButton", "historyItems", "showBackButton", "backButtonProps", "customActions"];
4
+ var _excluded = ["className", "title", "titleId", "hideTitle", "hideCloseButton", "historyItems", "showBackButton", "backButtonProps", "customActions", "iconType"];
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
7
  * or more contributor license agreements. Licensed under the Elastic License
@@ -107,6 +107,7 @@ export var EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
107
107
  showBackButton = _ref2.showBackButton,
108
108
  backButtonProps = _ref2.backButtonProps,
109
109
  customActions = _ref2.customActions,
110
+ _iconType = _ref2.iconType,
110
111
  rest = _objectWithoutProperties(_ref2, _excluded);
111
112
  var _useContext = useContext(EuiFlyoutMenuContext),
112
113
  onClose = _useContext.onClose;
@@ -69,19 +69,22 @@ export var ACTION_CLOSE_UNMANAGED_FLYOUT = "".concat(PREFIX, "/closeUnmanagedFly
69
69
  * - `title` is used for the flyout menu.
70
70
  * - `level` determines whether the flyout is `main` or `child`.
71
71
  * - Optional `size` is the named EUI size (e.g. `s`, `m`, `l`).
72
+ * - Optional `historyKey` (Symbol) scopes history; only flyouts with the same reference share Back/history. Omit for a unique group per session.
72
73
  * - Optional `iconType` is shown next to the session title in the history menu.
73
74
  */
74
75
  export var addFlyout = function addFlyout(flyoutId, title) {
75
76
  var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LEVEL_MAIN;
76
77
  var size = arguments.length > 3 ? arguments[3] : undefined;
77
- var iconType = arguments.length > 4 ? arguments[4] : undefined;
78
- var minWidth = arguments.length > 5 ? arguments[5] : undefined;
78
+ var historyKey = arguments.length > 4 ? arguments[4] : undefined;
79
+ var iconType = arguments.length > 5 ? arguments[5] : undefined;
80
+ var minWidth = arguments.length > 6 ? arguments[6] : undefined;
79
81
  return {
80
82
  type: ACTION_ADD,
81
83
  flyoutId: flyoutId,
82
84
  title: title,
83
85
  level: level,
84
86
  size: size,
87
+ historyKey: historyKey,
85
88
  iconType: iconType,
86
89
  minWidth: minWidth
87
90
  };
@@ -10,6 +10,24 @@ import { useCallback, useEffect, useRef } from 'react';
10
10
  import { LAYOUT_MODE_SIDE_BY_SIDE, LAYOUT_MODE_STACKED, LEVEL_MAIN, STAGE_ACTIVE, STAGE_BACKGROUNDED, STAGE_BACKGROUNDING, STAGE_CLOSING, STAGE_INACTIVE, STAGE_OPENING, STAGE_RETURNING } from './const';
11
11
  import { setActivityStage } from './actions';
12
12
  import { useFlyoutManager } from './provider';
13
+ /**
14
+ * Returns the final stage after an animation completes.
15
+ * OPENING/RETURNING -> ACTIVE; CLOSING -> INACTIVE; BACKGROUNDING -> BACKGROUNDED.
16
+ */
17
+ var getNextStage = function getNextStage(stage) {
18
+ switch (stage) {
19
+ case STAGE_OPENING:
20
+ case STAGE_RETURNING:
21
+ return STAGE_ACTIVE;
22
+ case STAGE_CLOSING:
23
+ return STAGE_INACTIVE;
24
+ case STAGE_BACKGROUNDING:
25
+ return STAGE_BACKGROUNDED;
26
+ default:
27
+ return null;
28
+ }
29
+ };
30
+
13
31
  /**
14
32
  * Encapsulates all activity-stage transitions and animation-driven updates
15
33
  * for managed flyouts.
@@ -21,7 +39,9 @@ import { useFlyoutManager } from './provider';
21
39
  export var useFlyoutActivityStage = function useFlyoutActivityStage(_ref) {
22
40
  var _sessions, _state$sessions$find, _state$layoutMode, _state$flyouts$find;
23
41
  var flyoutId = _ref.flyoutId,
24
- level = _ref.level;
42
+ level = _ref.level,
43
+ _ref$shouldAnimate = _ref.shouldAnimate,
44
+ shouldAnimate = _ref$shouldAnimate === void 0 ? false : _ref$shouldAnimate;
25
45
  var ctx = useFlyoutManager();
26
46
  var state = ctx === null || ctx === void 0 ? void 0 : ctx.state;
27
47
 
@@ -41,64 +61,46 @@ export var useFlyoutActivityStage = function useFlyoutActivityStage(_ref) {
41
61
  if (stageRef.current !== stage) {
42
62
  stageRef.current = stage;
43
63
  }
64
+ var transitionTo = useCallback(function (nextStage) {
65
+ var _ctx$dispatch;
66
+ ctx === null || ctx === void 0 || (_ctx$dispatch = ctx.dispatch) === null || _ctx$dispatch === void 0 || _ctx$dispatch.call(ctx, setActivityStage(flyoutId, nextStage));
67
+ stageRef.current = nextStage;
68
+ }, [ctx, flyoutId]);
44
69
 
45
70
  /**
46
- * 1. ACTIVE -> CLOSING when no longer the active flyout.
47
- * 2. INACTIVE -> RETURNING when it becomes active again (e.g., reopened or brought forward).
48
- * 3. (Main flyout only) ACTIVE + stacked + has child -> BACKGROUNDING (begin background animation).
49
- * 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (bring main to foreground).
50
- *
51
- * Any stages that depend on animation end (OPENING, RETURNING, CLOSING, BACKGROUNDING) are finalized in `onAnimationEnd`.
71
+ * 1. ACTIVE -> CLOSING (or INACTIVE when !shouldAnimate) when no longer the active flyout.
72
+ * 2. INACTIVE -> RETURNING (or ACTIVE when !shouldAnimate) when it becomes active again.
73
+ * 3. (Main only) ACTIVE + stacked + has child -> BACKGROUNDING (or BACKGROUNDED when !shouldAnimate).
74
+ * 4. (Main only) BACKGROUNDED/BACKGROUNDING + (child gone OR side-by-side) -> RETURNING (or ACTIVE when !shouldAnimate).
52
75
  */
53
76
  useEffect(function () {
54
77
  var s = stageRef.current;
55
78
  var next = null;
56
- if (s === STAGE_ACTIVE && !isActive) next = STAGE_CLOSING;else if (s === STAGE_INACTIVE && isActive) {
57
- next = STAGE_RETURNING;
58
- } else if (level === LEVEL_MAIN && isActive && s === STAGE_ACTIVE && hasChild && layoutMode === LAYOUT_MODE_STACKED) next = STAGE_BACKGROUNDING;else if (level === LEVEL_MAIN && (s === STAGE_BACKGROUNDED || s === STAGE_BACKGROUNDING) && (!hasChild || layoutMode === LAYOUT_MODE_SIDE_BY_SIDE)) next = STAGE_RETURNING;
59
- if (next && next !== s) {
60
- var _ctx$dispatch;
61
- ctx === null || ctx === void 0 || (_ctx$dispatch = ctx.dispatch) === null || _ctx$dispatch === void 0 || _ctx$dispatch.call(ctx, setActivityStage(flyoutId, next));
62
- stageRef.current = next;
79
+ if (s === STAGE_ACTIVE && !isActive) {
80
+ next = shouldAnimate ? STAGE_CLOSING : STAGE_INACTIVE;
81
+ } else if (s === STAGE_INACTIVE && isActive) {
82
+ next = shouldAnimate ? STAGE_RETURNING : STAGE_ACTIVE;
83
+ } else if (level === LEVEL_MAIN && isActive && s === STAGE_ACTIVE && hasChild && layoutMode === LAYOUT_MODE_STACKED) {
84
+ next = shouldAnimate ? STAGE_BACKGROUNDING : STAGE_BACKGROUNDED;
85
+ } else if (level === LEVEL_MAIN && (s === STAGE_BACKGROUNDED || s === STAGE_BACKGROUNDING) && (!hasChild || layoutMode === LAYOUT_MODE_SIDE_BY_SIDE)) {
86
+ next = shouldAnimate ? STAGE_RETURNING : STAGE_ACTIVE;
63
87
  }
64
- }, [isActive, hasChild, layoutMode, level, ctx, flyoutId, stage]);
65
-
66
- /**
67
- * Get the stage to transition to for given current stage.
68
- * Returns `null` if stage should remain unchanged.
69
- *
70
- * Stage transitions:
71
- * - OPENING / RETURNING -> ACTIVE
72
- * - CLOSING -> INACTIVE
73
- * - BACKGROUNDING -> BACKGROUNDED
74
- */
75
- var getNextStage = function getNextStage(stage) {
76
- switch (stage) {
77
- case STAGE_OPENING:
78
- case STAGE_RETURNING:
79
- return STAGE_ACTIVE;
80
- case STAGE_CLOSING:
81
- return STAGE_INACTIVE;
82
- case STAGE_BACKGROUNDING:
83
- return STAGE_BACKGROUNDED;
88
+ if (next && next !== s) {
89
+ transitionTo(next);
84
90
  }
85
- return null;
86
- };
91
+ }, [isActive, hasChild, layoutMode, level, shouldAnimate, transitionTo, stage]);
87
92
 
88
93
  /**
89
- * onAnimationEnd event handler that must be passed to EuiFlyout.
90
- * It handles transitions between stages and updates activity stage
91
- * in EuiFlyoutManagerContext.
94
+ * onAnimationEnd: browser signal when a CSS animation completes.
95
+ * Calls transitionTo to move to the final stage (e.g. CLOSING -> INACTIVE).
92
96
  */
93
97
  var onAnimationEnd = useCallback(function () {
94
98
  var currentStage = stageRef.current;
95
99
  var nextStage = getNextStage(currentStage);
96
100
  if (nextStage && nextStage !== currentStage) {
97
- var _ctx$dispatch2;
98
- ctx === null || ctx === void 0 || (_ctx$dispatch2 = ctx.dispatch) === null || _ctx$dispatch2 === void 0 || _ctx$dispatch2.call(ctx, setActivityStage(flyoutId, nextStage));
99
- stageRef.current = nextStage;
101
+ transitionTo(nextStage);
100
102
  }
101
- }, [ctx, flyoutId]);
103
+ }, [transitionTo]);
102
104
  return {
103
105
  activityStage: stage,
104
106
  onAnimationEnd: onAnimationEnd
@@ -2,9 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "css", "flyoutMenuProps"];
5
+ var _excluded = ["id", "onClose", "onActive", "level", "size", "minWidth", "historyKey", "css", "flyoutMenuProps"];
6
6
  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; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
8
9
  /*
9
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
11
  * or more contributor license agreements. Licensed under the Elastic License
@@ -14,6 +15,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
14
15
  */
15
16
 
16
17
  import React, { useEffect, useLayoutEffect, useMemo, useRef, useState, forwardRef } from 'react';
18
+ import { css } from '@emotion/react';
17
19
  import { flushSync } from 'react-dom';
18
20
  import { useCombinedRefs, useEuiMemoizedStyles } from '../../../services';
19
21
  import { useEuiI18n } from '../../i18n';
@@ -50,17 +52,26 @@ var useFlyoutManager = function useFlyoutManager() {
50
52
  * - width tracking for responsive layouts
51
53
  * - lifecycle stage transitions and data attributes for styling
52
54
  */
53
- export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
54
- var _managerSessions, _managerState$layoutM, _managerState$flyouts, _managerState$session, _managerState$flyouts2;
55
- var id = _ref.id,
56
- onCloseProp = _ref.onClose,
57
- onActiveProp = _ref.onActive,
58
- level = _ref.level,
59
- sizeProp = _ref.size,
60
- minWidth = _ref.minWidth,
61
- customCss = _ref.css,
62
- _flyoutMenuProps = _ref.flyoutMenuProps,
63
- props = _objectWithoutProperties(_ref, _excluded);
55
+ var _ref = process.env.NODE_ENV === "production" ? {
56
+ name: "1wrw3pf-EuiManagedFlyout",
57
+ styles: "animation-duration:0s!important;label:EuiManagedFlyout;"
58
+ } : {
59
+ name: "1wrw3pf-EuiManagedFlyout",
60
+ styles: "animation-duration:0s!important;label:EuiManagedFlyout;",
61
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
62
+ };
63
+ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
64
+ var _managerSessions, _managerState$layoutM, _managerState$flyouts, _managerState$session, _managerState$flyouts2, _managerSessions$leng, _session$childHistory, _session$childHistory2;
65
+ var id = _ref2.id,
66
+ onCloseProp = _ref2.onClose,
67
+ onActiveProp = _ref2.onActive,
68
+ level = _ref2.level,
69
+ sizeProp = _ref2.size,
70
+ minWidth = _ref2.minWidth,
71
+ historyKey = _ref2.historyKey,
72
+ customCss = _ref2.css,
73
+ _flyoutMenuProps = _ref2.flyoutMenuProps,
74
+ props = _objectWithoutProperties(_ref2, _excluded);
64
75
  var flyoutId = useFlyoutId(id);
65
76
  var _useState = useState(null),
66
77
  _useState2 = _slicedToArray(_useState, 2),
@@ -96,6 +107,9 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
96
107
  var parentSize = session !== null && session !== void 0 && session.mainFlyoutId ? managerState === null || managerState === void 0 || (_managerState$flyouts2 = managerState.flyouts.find(function (f) {
97
108
  return f.flyoutId === session.mainFlyoutId;
98
109
  })) === null || _managerState$flyouts2 === void 0 ? void 0 : _managerState$flyouts2.size : undefined;
110
+
111
+ // Animate opening only for the first main flyout (sole session) or first child (no prior child in session).
112
+ var shouldAnimateOpening = level === 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;
99
113
  var styles = useEuiMemoizedStyles(euiManagedFlyoutStyles);
100
114
 
101
115
  // Set default size based on level: main defaults to 'm', child defaults to 's'
@@ -156,7 +170,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
156
170
  // Register with flyout manager context when open, remove when closed
157
171
  // Using useLayoutEffect to run synchronously before DOM updates
158
172
  useLayoutEffect(function () {
159
- addFlyout(flyoutId, title, level, size, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
173
+ addFlyout(flyoutId, title, level, size, level === LEVEL_MAIN ? historyKey : undefined, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
160
174
  return function () {
161
175
  var currentStoreState = getFlyoutManagerStore().getState();
162
176
  var stillInStore = currentStoreState.flyouts.some(function (f) {
@@ -172,7 +186,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
172
186
  }
173
187
  wasRegisteredRef.current = false;
174
188
  };
175
- }, [flyoutId, title, level, size, minWidth, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
189
+ }, [flyoutId, title, level, size, minWidth, historyKey, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, addFlyout, closeFlyout, closeAllFlyouts]);
176
190
 
177
191
  // Detect when flyout has been removed from manager state (e.g., via Back button)
178
192
  // and trigger onClose callback to notify the parent component
@@ -232,7 +246,8 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
232
246
  }, [flyoutId, level, isActive, width, setFlyoutWidth]);
233
247
  var _useFlyoutActivitySta = useFlyoutActivityStage({
234
248
  flyoutId: flyoutId,
235
- level: level
249
+ level: level,
250
+ shouldAnimate: false
236
251
  }),
237
252
  activityStage = _useFlyoutActivitySta.activityStage,
238
253
  onAnimationEnd = _useFlyoutActivitySta.onAnimationEnd;
@@ -263,7 +278,9 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
263
278
  }, ___EmotionJSX(EuiFlyoutComponent, _extends({
264
279
  id: flyoutId,
265
280
  ref: combinedRef,
266
- css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level), ";label:EuiManagedFlyout;"]
281
+ css: [styles.managedFlyout, customCss, styles.stage(activityStage, props.side, level),
282
+ // Suppress EuiFlyout's built-in opening animation for non-initial flyouts.
283
+ !shouldAnimateOpening && _ref, ";label:EuiManagedFlyout;"]
267
284
  }, _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty(_defineProperty({
268
285
  onClose: onClose,
269
286
  size: size,
@@ -1,5 +1,3 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
1
  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)."; }
4
2
  /*
5
3
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -9,7 +7,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
9
7
  * Side Public License, v 1.
10
8
  */
11
9
 
12
- import { css, keyframes } from '@emotion/react';
10
+ import { css } from '@emotion/react';
13
11
  import { euiCanAnimate, logicalCSS } from '../../../global_styling';
14
12
  import { LEVEL_MAIN, STAGE_ACTIVE, STAGE_BACKGROUNDED, STAGE_BACKGROUNDING, STAGE_CLOSING, STAGE_INACTIVE, STAGE_OPENING, STAGE_RETURNING } from './const';
15
13
  import { DEFAULT_SIDE } from '../const';
@@ -32,16 +30,6 @@ export var euiManagedFlyoutStyles = function euiManagedFlyoutStyles(euiThemeCont
32
30
  stage: function stage(activeStage) {
33
31
  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_SIDE;
34
32
  var level = arguments.length > 2 ? arguments[2] : undefined;
35
- // Animation for moving flyout backwards in 3D space (z-axis) when inactive
36
- var euiFlyoutSlideBack3D = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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%)');
37
-
38
- // Animation for bringing flyout forward from 3D space when transitioning to active
39
- var euiFlyoutSlideForward3D = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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%)');
40
- // When flyout is becoming inactive, animate backwards in 3D space
41
- var inactiveTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:", euiFlyoutSlideBack3D, " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.resistance, " forwards;pointer-events:none;};label:inactiveTransition;");
42
-
43
- // When flyout is becoming active from a backgrounded state, animate forward in 3D space
44
- var returningTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:", euiFlyoutSlideForward3D, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, " forwards;};label:returningTransition;");
45
33
  var noTransition = /*#__PURE__*/css(euiCanAnimate, "{animation:none;opacity:1;};label:noTransition;");
46
34
  var activeFlyout = /*#__PURE__*/css("z-index:", parseInt(euiTheme.levels.flyout) + 1, ";pointer-events:auto;;label:activeFlyout;");
47
35
  var inactiveFlyout = /*#__PURE__*/css(side === 'left' ? logicalCSS('right', '100vw') : logicalCSS('left', '100vw'), " transform:translateX(", side === 'left' ? 'calc(-100vw - 100%)' : 'calc(100vw + 100%)', ");;label:inactiveFlyout;");
@@ -53,15 +41,15 @@ export var euiManagedFlyoutStyles = function euiManagedFlyoutStyles(euiThemeCont
53
41
  case STAGE_ACTIVE:
54
42
  return [activeFlyout, noTransition];
55
43
  case STAGE_BACKGROUNDING:
56
- return [inactiveTransition];
44
+ return [inactiveFlyout, noTransition];
57
45
  case STAGE_BACKGROUNDED:
58
46
  return [inactiveFlyout, noTransition];
59
47
  case STAGE_RETURNING:
60
- return [activeFlyout, returningTransition];
48
+ return [activeFlyout, noTransition];
61
49
  case STAGE_INACTIVE:
62
50
  return [inactiveFlyout, noTransition];
63
51
  case STAGE_CLOSING:
64
- return [inactiveTransition];
52
+ return [inactiveFlyout, noTransition];
65
53
  }
66
54
  },
67
55
  managedFlyout: _ref
@@ -26,6 +26,28 @@ export var initialState = {
26
26
  currentZIndex: 0,
27
27
  unmanagedFlyouts: []
28
28
  };
29
+ var addSessionFlyoutsToRemove = function addSessionFlyoutsToRemove(session, flyoutsToRemove) {
30
+ var _session$childHistory;
31
+ flyoutsToRemove.add(session.mainFlyoutId);
32
+ if (session.childFlyoutId) {
33
+ flyoutsToRemove.add(session.childFlyoutId);
34
+ }
35
+ ((_session$childHistory = session.childHistory) !== null && _session$childHistory !== void 0 ? _session$childHistory : []).forEach(function (e) {
36
+ return flyoutsToRemove.add(e.flyoutId);
37
+ });
38
+ };
39
+ var moveHistoryGroupToTop = function moveHistoryGroupToTop(sessions, historyKey) {
40
+ var groupSessions = [];
41
+ var otherSessions = [];
42
+ sessions.forEach(function (session) {
43
+ if (session.historyKey === historyKey) {
44
+ groupSessions.push(session);
45
+ } else {
46
+ otherSessions.push(session);
47
+ }
48
+ });
49
+ return [].concat(otherSessions, groupSessions);
50
+ };
29
51
 
30
52
  /**
31
53
  * Reducer handling all flyout manager actions and state transitions.
@@ -74,6 +96,7 @@ export function flyoutManagerReducer() {
74
96
  title = action.title,
75
97
  level = action.level,
76
98
  size = action.size,
99
+ historyKey = action.historyKey,
77
100
  iconType = action.iconType,
78
101
  minWidth = action.minWidth;
79
102
  var isDuplicate = state.flyouts.some(function (f) {
@@ -100,7 +123,8 @@ export function flyoutManagerReducer() {
100
123
  iconType: iconType,
101
124
  childFlyoutId: null,
102
125
  childHistory: [],
103
- zIndex: state.currentZIndex
126
+ zIndex: state.currentZIndex,
127
+ historyKey: historyKey !== null && historyKey !== void 0 ? historyKey : Symbol()
104
128
  };
105
129
  return _objectSpread(_objectSpread({}, state), {}, {
106
130
  sessions: [].concat(_toConsumableArray(state.sessions), [newSession]),
@@ -227,8 +251,8 @@ export function flyoutManagerReducer() {
227
251
  });
228
252
  }
229
253
  var owningSessionIndex = state.sessions.findIndex(function (session) {
230
- var _session$childHistory;
231
- return session.childFlyoutId === action.flyoutId || ((_session$childHistory = session.childHistory) !== null && _session$childHistory !== void 0 ? _session$childHistory : []).some(function (entry) {
254
+ var _session$childHistory2;
255
+ return session.childFlyoutId === action.flyoutId || ((_session$childHistory2 = session.childHistory) !== null && _session$childHistory2 !== void 0 ? _session$childHistory2 : []).some(function (entry) {
232
256
  return entry.flyoutId === action.flyoutId;
233
257
  });
234
258
  });
@@ -260,21 +284,37 @@ export function flyoutManagerReducer() {
260
284
  });
261
285
  }
262
286
 
263
- // Unregister all flyouts.
287
+ // Unregister all flyouts (within the current history group only).
264
288
  case ACTION_CLOSE_ALL:
265
289
  {
266
290
  if (state.sessions.length === 0) {
267
291
  return state;
268
292
  }
293
+ var _currentSessionIndex = state.sessions.length - 1;
294
+ var _currentSession = state.sessions[_currentSessionIndex];
295
+ var currentKey = _currentSession.historyKey;
269
296
 
270
- // Reset current z-index to 0 only if no unmanaged flyouts remain.
297
+ // Remove all sessions that have the current historyKey (entire group)
298
+ var _newSessions = state.sessions.filter(function (s) {
299
+ return s.historyKey !== currentKey;
300
+ });
301
+ var _flyoutsToRemove = new Set();
302
+ state.sessions.forEach(function (session) {
303
+ if (session.historyKey === currentKey) {
304
+ addSessionFlyoutsToRemove(session, _flyoutsToRemove);
305
+ }
306
+ });
307
+ var _newFlyouts3 = state.flyouts.filter(function (f) {
308
+ return !_flyoutsToRemove.has(f.flyoutId);
309
+ });
271
310
  var _newCurrentZIndex2 = state.currentZIndex;
272
- if (state.unmanagedFlyouts.length === 0) {
311
+ if (_newSessions.length === 0 && state.unmanagedFlyouts.length === 0) {
273
312
  _newCurrentZIndex2 = 0;
274
313
  }
275
- return _objectSpread(_objectSpread({}, initialState), {}, {
276
- currentZIndex: _newCurrentZIndex2,
277
- unmanagedFlyouts: state.unmanagedFlyouts
314
+ return _objectSpread(_objectSpread({}, state), {}, {
315
+ sessions: _newSessions,
316
+ flyouts: _newFlyouts3,
317
+ currentZIndex: _newCurrentZIndex2
278
318
  });
279
319
  }
280
320
 
@@ -286,8 +326,8 @@ export function flyoutManagerReducer() {
286
326
  return state;
287
327
  }
288
328
  var _updatedSessions2 = _toConsumableArray(state.sessions);
289
- var _currentSessionIndex = _updatedSessions2.length - 1;
290
- _updatedSessions2[_currentSessionIndex] = _objectSpread(_objectSpread({}, _updatedSessions2[_currentSessionIndex]), {}, {
329
+ var _currentSessionIndex2 = _updatedSessions2.length - 1;
330
+ _updatedSessions2[_currentSessionIndex2] = _objectSpread(_objectSpread({}, _updatedSessions2[_currentSessionIndex2]), {}, {
291
331
  childFlyoutId: action.flyoutId
292
332
  });
293
333
  return _objectSpread(_objectSpread({}, state), {}, {
@@ -333,51 +373,50 @@ export function flyoutManagerReducer() {
333
373
  });
334
374
  }
335
375
 
336
- // Go back: pop child history when any, else pop current session
376
+ // Go back: pop child history when any, else pop current session (only within same historyKey).
337
377
  case ACTION_GO_BACK:
338
378
  {
339
- var _currentSession$child3, _currentSession$child4;
379
+ var _currentSession2$chil;
340
380
  if (state.sessions.length === 0) {
341
381
  return state;
342
382
  }
343
- var _currentSessionIndex2 = state.sessions.length - 1;
344
- var _currentSession = state.sessions[_currentSessionIndex2];
345
- var _childHistory = (_currentSession$child3 = _currentSession.childHistory) !== null && _currentSession$child3 !== void 0 ? _currentSession$child3 : [];
383
+ var _currentSessionIndex3 = state.sessions.length - 1;
384
+ var _currentSession2 = state.sessions[_currentSessionIndex3];
385
+ var _childHistory = (_currentSession2$chil = _currentSession2.childHistory) !== null && _currentSession2$chil !== void 0 ? _currentSession2$chil : [];
346
386
  if (_childHistory.length > 0) {
347
387
  // Pop one child: set current child to the last entry in history, remove the current child flyout
348
388
  var popped = _childHistory[_childHistory.length - 1];
349
389
  var newChildHistory = _childHistory.slice(0, -1);
350
390
  var _updatedSessions3 = _toConsumableArray(state.sessions);
351
- _updatedSessions3[_currentSessionIndex2] = _objectSpread(_objectSpread({}, _currentSession), {}, {
391
+ _updatedSessions3[_currentSessionIndex3] = _objectSpread(_objectSpread({}, _currentSession2), {}, {
352
392
  childHistory: newChildHistory,
353
393
  childFlyoutId: popped.flyoutId,
354
394
  childTitle: popped.title,
355
395
  childIconType: popped.iconType
356
396
  });
357
- var _newFlyouts3 = state.flyouts.filter(function (f) {
358
- return f.flyoutId !== _currentSession.childFlyoutId;
397
+ var _newFlyouts4 = state.flyouts.filter(function (f) {
398
+ return f.flyoutId !== _currentSession2.childFlyoutId;
359
399
  });
360
400
  return _objectSpread(_objectSpread({}, state), {}, {
361
401
  sessions: _updatedSessions3,
362
- flyouts: _newFlyouts3
402
+ flyouts: _newFlyouts4
363
403
  });
364
404
  }
365
405
 
366
406
  // No child history: pop current session (main + all its children)
367
- var _flyoutsToRemove = new Set([_currentSession.mainFlyoutId]);
368
- if (_currentSession.childFlyoutId) {
369
- _flyoutsToRemove.add(_currentSession.childFlyoutId);
370
- }
371
- ((_currentSession$child4 = _currentSession.childHistory) !== null && _currentSession$child4 !== void 0 ? _currentSession$child4 : []).forEach(function (e) {
372
- return _flyoutsToRemove.add(e.flyoutId);
407
+ var _flyoutsToRemove2 = new Set();
408
+ addSessionFlyoutsToRemove(_currentSession2, _flyoutsToRemove2);
409
+ var sessionsWithoutCurrent = state.sessions.slice(0, _currentSessionIndex3);
410
+ var hasRemainingInCurrentGroup = sessionsWithoutCurrent.some(function (s) {
411
+ return s.historyKey === _currentSession2.historyKey;
373
412
  });
374
- var _newFlyouts4 = state.flyouts.filter(function (f) {
375
- return !_flyoutsToRemove.has(f.flyoutId);
413
+ var _newSessions2 = hasRemainingInCurrentGroup ? moveHistoryGroupToTop(sessionsWithoutCurrent, _currentSession2.historyKey) : sessionsWithoutCurrent;
414
+ var _newFlyouts5 = state.flyouts.filter(function (f) {
415
+ return !_flyoutsToRemove2.has(f.flyoutId);
376
416
  });
377
- var _newSessions = state.sessions.slice(0, _currentSessionIndex2);
378
417
  return _objectSpread(_objectSpread({}, state), {}, {
379
- sessions: _newSessions,
380
- flyouts: _newFlyouts4
418
+ sessions: _newSessions2,
419
+ flyouts: _newFlyouts5
381
420
  });
382
421
  }
383
422
 
@@ -386,11 +425,11 @@ export function flyoutManagerReducer() {
386
425
  {
387
426
  var _flyoutId3 = action.flyoutId,
388
427
  _level = action.level;
389
- var _currentSessionIndex3 = state.sessions.length - 1;
428
+ var _currentSessionIndex4 = state.sessions.length - 1;
390
429
  if (_level === LEVEL_CHILD && state.sessions.length > 0) {
391
- var _currentSession2$chil;
392
- var _currentSession2 = state.sessions[_currentSessionIndex3];
393
- var _childHistory2 = (_currentSession2$chil = _currentSession2.childHistory) !== null && _currentSession2$chil !== void 0 ? _currentSession2$chil : [];
430
+ var _currentSession3$chil;
431
+ var _currentSession3 = state.sessions[_currentSessionIndex4];
432
+ var _childHistory2 = (_currentSession3$chil = _currentSession3.childHistory) !== null && _currentSession3$chil !== void 0 ? _currentSession3$chil : [];
394
433
  var targetIndex = _childHistory2.findIndex(function (entry) {
395
434
  return entry.flyoutId === _flyoutId3;
396
435
  });
@@ -399,18 +438,18 @@ export function flyoutManagerReducer() {
399
438
  }
400
439
  var targetEntry = _childHistory2[targetIndex];
401
440
  var _newChildHistory = _childHistory2.slice(0, targetIndex);
402
- var _flyoutsToRemove2 = new Set();
403
- if (_currentSession2.childFlyoutId) {
404
- _flyoutsToRemove2.add(_currentSession2.childFlyoutId);
441
+ var _flyoutsToRemove3 = new Set();
442
+ if (_currentSession3.childFlyoutId) {
443
+ _flyoutsToRemove3.add(_currentSession3.childFlyoutId);
405
444
  }
406
445
  _childHistory2.slice(targetIndex + 1).forEach(function (e) {
407
- _flyoutsToRemove2.add(e.flyoutId);
446
+ _flyoutsToRemove3.add(e.flyoutId);
408
447
  });
409
- var _newFlyouts5 = state.flyouts.filter(function (f) {
410
- return !_flyoutsToRemove2.has(f.flyoutId);
448
+ var _newFlyouts6 = state.flyouts.filter(function (f) {
449
+ return !_flyoutsToRemove3.has(f.flyoutId);
411
450
  });
412
451
  var _updatedSessions4 = _toConsumableArray(state.sessions);
413
- _updatedSessions4[_currentSessionIndex3] = _objectSpread(_objectSpread({}, _currentSession2), {}, {
452
+ _updatedSessions4[_currentSessionIndex4] = _objectSpread(_objectSpread({}, _currentSession3), {}, {
414
453
  childHistory: _newChildHistory,
415
454
  childFlyoutId: targetEntry.flyoutId,
416
455
  childTitle: targetEntry.title,
@@ -418,7 +457,7 @@ export function flyoutManagerReducer() {
418
457
  });
419
458
  return _objectSpread(_objectSpread({}, state), {}, {
420
459
  sessions: _updatedSessions4,
421
- flyouts: _newFlyouts5
460
+ flyouts: _newFlyouts6
422
461
  });
423
462
  }
424
463
 
@@ -429,25 +468,45 @@ export function flyoutManagerReducer() {
429
468
  if (targetSessionIndex === -1) {
430
469
  return state; // Target flyout not found
431
470
  }
471
+ var _currentSession4 = state.sessions[_currentSessionIndex4];
472
+ var targetSession = state.sessions[targetSessionIndex];
473
+
474
+ // Group-local navigation: keep other history groups, remove only newer sessions in target's group,
475
+ // then bring that group to the top.
476
+ if (targetSession.historyKey === _currentSession4.historyKey) {
477
+ var _flyoutsToRemove4 = new Set();
478
+ var sessionsAfterTargetInGroup = state.sessions.filter(function (session, index) {
479
+ return index > targetSessionIndex && session.historyKey === targetSession.historyKey;
480
+ });
481
+ sessionsAfterTargetInGroup.forEach(function (session) {
482
+ addSessionFlyoutsToRemove(session, _flyoutsToRemove4);
483
+ });
484
+ var sessionsWithoutRemoved = state.sessions.filter(function (session) {
485
+ return !sessionsAfterTargetInGroup.some(function (removed) {
486
+ return removed.mainFlyoutId === session.mainFlyoutId;
487
+ });
488
+ });
489
+ var reorderedSessions = moveHistoryGroupToTop(sessionsWithoutRemoved, targetSession.historyKey);
490
+ var _newFlyouts7 = state.flyouts.filter(function (f) {
491
+ return !_flyoutsToRemove4.has(f.flyoutId);
492
+ });
493
+ return _objectSpread(_objectSpread({}, state), {}, {
494
+ sessions: reorderedSessions,
495
+ flyouts: _newFlyouts7
496
+ });
497
+ }
432
498
  var sessionsToClose = state.sessions.slice(targetSessionIndex + 1);
433
- var _flyoutsToRemove3 = new Set();
499
+ var _flyoutsToRemove5 = new Set();
434
500
  sessionsToClose.forEach(function (session) {
435
- var _session$childHistory2;
436
- _flyoutsToRemove3.add(session.mainFlyoutId);
437
- if (session.childFlyoutId) {
438
- _flyoutsToRemove3.add(session.childFlyoutId);
439
- }
440
- ((_session$childHistory2 = session.childHistory) !== null && _session$childHistory2 !== void 0 ? _session$childHistory2 : []).forEach(function (e) {
441
- return _flyoutsToRemove3.add(e.flyoutId);
442
- });
501
+ addSessionFlyoutsToRemove(session, _flyoutsToRemove5);
443
502
  });
444
- var _newFlyouts6 = state.flyouts.filter(function (f) {
445
- return !_flyoutsToRemove3.has(f.flyoutId);
503
+ var _newFlyouts8 = state.flyouts.filter(function (f) {
504
+ return !_flyoutsToRemove5.has(f.flyoutId);
446
505
  });
447
- var _newSessions2 = state.sessions.slice(0, targetSessionIndex + 1);
506
+ var _newSessions3 = state.sessions.slice(0, targetSessionIndex + 1);
448
507
  return _objectSpread(_objectSpread({}, state), {}, {
449
- sessions: _newSessions2,
450
- flyouts: _newFlyouts6
508
+ sessions: _newSessions3,
509
+ flyouts: _newFlyouts8
451
510
  });
452
511
  }
453
512