@gitlab/ui 131.3.0 → 131.3.2

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 (384) hide show
  1. package/package.json +4 -4
  2. package/src/components/utilities/truncate/truncate.scss +3 -1
  3. package/src/scss/mixins.scss +3 -1
  4. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +86 -25
  5. package/tailwind.defaults.js +10 -1
  6. package/dist/charts.js +0 -13
  7. package/dist/components/base/accordion/accordion.js +0 -69
  8. package/dist/components/base/accordion/accordion_item.js +0 -160
  9. package/dist/components/base/accordion/constants.js +0 -3
  10. package/dist/components/base/alert/alert.js +0 -263
  11. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
  12. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
  13. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
  14. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
  15. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
  16. package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
  17. package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
  18. package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
  19. package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
  20. package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
  21. package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
  22. package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
  23. package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
  24. package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
  25. package/dist/components/base/attribute_list/attribute_list.js +0 -100
  26. package/dist/components/base/avatar/avatar.js +0 -175
  27. package/dist/components/base/avatar/utils.js +0 -17
  28. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
  29. package/dist/components/base/avatar_link/avatar_link.js +0 -47
  30. package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
  31. package/dist/components/base/badge/badge.js +0 -197
  32. package/dist/components/base/banner/banner.js +0 -149
  33. package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
  34. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
  35. package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
  36. package/dist/components/base/broadcast_message/constants.js +0 -5
  37. package/dist/components/base/button/button.js +0 -419
  38. package/dist/components/base/button_group/button_group.js +0 -53
  39. package/dist/components/base/card/card.js +0 -69
  40. package/dist/components/base/collapse/collapse.js +0 -163
  41. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
  42. package/dist/components/base/datepicker/datepicker.js +0 -475
  43. package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
  44. package/dist/components/base/drawer/drawer.js +0 -156
  45. package/dist/components/base/dropdown/dropdown.js +0 -330
  46. package/dist/components/base/dropdown/dropdown_divider.js +0 -48
  47. package/dist/components/base/dropdown/dropdown_form.js +0 -48
  48. package/dist/components/base/dropdown/dropdown_item.js +0 -175
  49. package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
  50. package/dist/components/base/dropdown/dropdown_text.js +0 -48
  51. package/dist/components/base/filtered_search/common_story_options.js +0 -14
  52. package/dist/components/base/filtered_search/filtered_search.js +0 -428
  53. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
  54. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
  55. package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
  56. package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
  57. package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
  58. package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
  59. package/dist/components/base/form/form.js +0 -43
  60. package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
  61. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
  62. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
  63. package/dist/components/base/form/form_combobox/constants.js +0 -55
  64. package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
  65. package/dist/components/base/form/form_date/form_date.js +0 -143
  66. package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
  67. package/dist/components/base/form/form_fields/form_fields.js +0 -289
  68. package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
  69. package/dist/components/base/form/form_fields/mappers.js +0 -13
  70. package/dist/components/base/form/form_fields/validators.js +0 -48
  71. package/dist/components/base/form/form_group/form_group.js +0 -119
  72. package/dist/components/base/form/form_input/form_input.js +0 -695
  73. package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
  74. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
  75. package/dist/components/base/form/form_radio/form_radio.js +0 -259
  76. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
  77. package/dist/components/base/form/form_select/constants.js +0 -12
  78. package/dist/components/base/form/form_select/form_select.js +0 -96
  79. package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
  80. package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
  81. package/dist/components/base/icon/icon.js +0 -113
  82. package/dist/components/base/illustration/illustration.js +0 -80
  83. package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
  84. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
  85. package/dist/components/base/label/label.js +0 -174
  86. package/dist/components/base/link/link.js +0 -332
  87. package/dist/components/base/loading_icon/loading_icon.js +0 -120
  88. package/dist/components/base/markdown/markdown.js +0 -50
  89. package/dist/components/base/modal/modal.js +0 -259
  90. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
  91. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
  92. package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
  93. package/dist/components/base/new_dropdowns/constants.js +0 -24
  94. package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
  95. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
  96. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
  97. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
  98. package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
  99. package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
  100. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
  101. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
  102. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
  103. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
  104. package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
  105. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
  106. package/dist/components/base/pagination/pagination.js +0 -397
  107. package/dist/components/base/path/data.js +0 -34
  108. package/dist/components/base/path/path.js +0 -177
  109. package/dist/components/base/popover/popover.js +0 -142
  110. package/dist/components/base/progress_bar/progress_bar.js +0 -117
  111. package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
  112. package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
  113. package/dist/components/base/segmented_control/segmented_control.js +0 -73
  114. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
  115. package/dist/components/base/sorting/sorting.js +0 -180
  116. package/dist/components/base/table/constants.js +0 -5
  117. package/dist/components/base/table/table.js +0 -187
  118. package/dist/components/base/table_lite/table_lite.js +0 -80
  119. package/dist/components/base/tabs/constants.js +0 -3
  120. package/dist/components/base/tabs/tab/tab.js +0 -113
  121. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
  122. package/dist/components/base/tabs/tabs/tabs.js +0 -223
  123. package/dist/components/base/toast/index.js +0 -66
  124. package/dist/components/base/toast/toast.js +0 -125
  125. package/dist/components/base/toast/toaster.js +0 -87
  126. package/dist/components/base/toggle/toggle.js +0 -178
  127. package/dist/components/base/token/token.js +0 -97
  128. package/dist/components/base/token_selector/helpers.js +0 -5
  129. package/dist/components/base/token_selector/token_container.js +0 -160
  130. package/dist/components/base/token_selector/token_selector.js +0 -454
  131. package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
  132. package/dist/components/base/tooltip/tooltip.js +0 -54
  133. package/dist/components/charts/area/area.js +0 -329
  134. package/dist/components/charts/bar/bar.js +0 -207
  135. package/dist/components/charts/chart/chart.js +0 -215
  136. package/dist/components/charts/column/column.js +0 -221
  137. package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
  138. package/dist/components/charts/gauge/gauge.js +0 -205
  139. package/dist/components/charts/heatmap/heatmap.js +0 -299
  140. package/dist/components/charts/heatmap/index.js +0 -2
  141. package/dist/components/charts/legend/legend.js +0 -245
  142. package/dist/components/charts/line/line.js +0 -340
  143. package/dist/components/charts/series_label/series_label.js +0 -101
  144. package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
  145. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
  146. package/dist/components/charts/single_stat/single_stat.js +0 -164
  147. package/dist/components/charts/sparkline/sparkline.js +0 -299
  148. package/dist/components/charts/stacked_column/stacked_column.js +0 -380
  149. package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
  150. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
  151. package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
  152. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
  153. package/dist/components/dashboards/mock_data.js +0 -49
  154. package/dist/components/experimental/experiment_badge/constants.js +0 -4
  155. package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
  156. package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
  157. package/dist/components/index.js +0 -107
  158. package/dist/components/mixins/button_mixin.js +0 -11
  159. package/dist/components/mixins/safe_link_mixin.js +0 -30
  160. package/dist/components/mixins/tooltip_mixin.js +0 -21
  161. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
  162. package/dist/components/regions/empty_state/empty_state.js +0 -181
  163. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
  164. package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
  165. package/dist/components/shared_components/close_button/close_button.js +0 -55
  166. package/dist/components/utilities/animated_number/animated_number.js +0 -131
  167. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
  168. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
  169. package/dist/components/utilities/intersperse/intersperse.js +0 -104
  170. package/dist/components/utilities/sprintf/sprintf.js +0 -171
  171. package/dist/components/utilities/truncate/constants.js +0 -8
  172. package/dist/components/utilities/truncate/truncate.js +0 -154
  173. package/dist/components/utilities/truncate_text/constants.js +0 -7
  174. package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
  175. package/dist/config.js +0 -53
  176. package/dist/directives/hover_load/hover_load.js +0 -45
  177. package/dist/directives/index.js +0 -8
  178. package/dist/directives/modal.js +0 -1
  179. package/dist/directives/outside/outside.js +0 -149
  180. package/dist/directives/resize_observer/resize_observer.js +0 -58
  181. package/dist/directives/safe_html/constants.js +0 -6
  182. package/dist/directives/safe_html/safe_html.js +0 -39
  183. package/dist/directives/safe_link/mock_data.js +0 -10
  184. package/dist/directives/safe_link/safe_link.js +0 -67
  185. package/dist/directives/tooltip/container.js +0 -7
  186. package/dist/directives/tooltip/tooltip.js +0 -18
  187. package/dist/index.css +0 -7
  188. package/dist/index.css.map +0 -1
  189. package/dist/index.js +0 -2
  190. package/dist/tailwind.css +0 -2
  191. package/dist/tailwind.css.map +0 -1
  192. package/dist/tokens/build/js/tokens.dark.js +0 -1410
  193. package/dist/tokens/build/js/tokens.js +0 -1410
  194. package/dist/tokens/common_story_options.js +0 -29
  195. package/dist/tokens/tokens_story.js +0 -76
  196. package/dist/utils/breakpoints.js +0 -20
  197. package/dist/utils/charts/config.js +0 -616
  198. package/dist/utils/charts/constants.js +0 -69
  199. package/dist/utils/charts/mock_data.js +0 -191
  200. package/dist/utils/charts/story_config.js +0 -24
  201. package/dist/utils/charts/theme.js +0 -200
  202. package/dist/utils/charts/utils.js +0 -54
  203. package/dist/utils/constants.js +0 -333
  204. package/dist/utils/data_utils.js +0 -19
  205. package/dist/utils/datetime_utility.js +0 -61
  206. package/dist/utils/equality_utils.js +0 -84
  207. package/dist/utils/i18n.js +0 -65
  208. package/dist/utils/is_slot_empty.js +0 -34
  209. package/dist/utils/number_utils.js +0 -132
  210. package/dist/utils/play_utils.js +0 -11
  211. package/dist/utils/set_utils.js +0 -25
  212. package/dist/utils/stories_constants.js +0 -29
  213. package/dist/utils/stories_utils.js +0 -62
  214. package/dist/utils/story_decorators/container.js +0 -19
  215. package/dist/utils/string_utils.js +0 -69
  216. package/dist/utils/svgs/svg_paths.js +0 -7
  217. package/dist/utils/test_utils.js +0 -33
  218. package/dist/utils/use_fake_date.js +0 -29
  219. package/dist/utils/use_mock_intersection_observer.js +0 -105
  220. package/dist/utils/utils.js +0 -205
  221. package/dist/utils.js +0 -5
  222. package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
  223. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
  224. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
  225. package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
  226. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
  227. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
  228. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
  229. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
  230. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
  231. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
  232. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
  233. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
  234. package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
  235. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
  236. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
  237. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
  238. package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
  239. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  240. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
  241. package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
  242. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
  243. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
  244. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
  245. package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
  246. package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
  247. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
  248. package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
  249. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
  250. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
  251. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
  252. package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
  253. package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
  254. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
  255. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
  256. package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
  257. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
  258. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
  259. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
  260. package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
  261. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
  262. package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
  263. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
  264. package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
  265. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
  266. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
  267. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
  268. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
  269. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
  270. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
  271. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
  272. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
  273. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
  274. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
  275. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
  276. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
  277. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
  278. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
  279. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
  280. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
  281. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
  282. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
  283. package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
  284. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
  285. package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
  286. package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
  287. package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
  288. package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
  289. package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
  290. package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
  291. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
  292. package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
  293. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
  294. package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
  295. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
  296. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
  297. package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
  298. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
  299. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
  300. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
  301. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
  302. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
  303. package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
  304. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
  305. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
  306. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
  307. package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
  308. package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
  309. package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
  310. package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
  311. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
  312. package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
  313. package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
  314. package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
  315. package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
  316. package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
  317. package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
  318. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
  319. package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
  320. package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
  321. package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
  322. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
  323. package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
  324. package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
  325. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
  326. package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
  327. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
  328. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
  329. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
  330. package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
  331. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
  332. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
  333. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
  334. package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
  335. package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
  336. package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
  337. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
  338. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
  339. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
  340. package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
  341. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  342. package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
  343. package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
  344. package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
  345. package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
  346. package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
  347. package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
  348. package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
  349. package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
  350. package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
  351. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
  352. package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
  353. package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
  354. package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
  355. package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
  356. package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
  357. package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
  358. package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
  359. package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
  360. package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
  361. package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
  362. package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
  363. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
  364. package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
  365. package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
  366. package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
  367. package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
  368. package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
  369. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  370. package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
  371. package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
  372. package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
  373. package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
  374. package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
  375. package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
  376. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
  377. package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
  378. package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
  379. package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
  380. package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
  381. package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
  382. package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
  383. package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
  384. package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
@@ -1,616 +0,0 @@
1
- import { merge, castArray } from 'lodash-es';
2
- import { BLUE_500 } from '../../tokens/build/js/tokens';
3
- import { GlBreakpointInstance } from '../breakpoints';
4
- import { areDatesEqual } from '../datetime_utility';
5
- import { engineeringNotation } from '../number_utils';
6
- import { hexToRgba } from '../utils';
7
- import { arrowSymbol, ANNOTATIONS_SERIES_NAME, CHART_TYPE_BAR, CHART_TYPE_LINE } from './constants';
8
-
9
- const defaultAreaOpacity = 0.2;
10
- const defaultFontSize = 12;
11
- const defaultHeight = 400;
12
- const defaultWidth = 300;
13
- const validRenderers = ['canvas', 'svg'];
14
- const toolboxHeight = 14;
15
- const axes = {
16
- name: 'Value',
17
- type: 'value',
18
- nameLocation: 'center'
19
- };
20
- const xAxis = merge({}, axes, {
21
- boundaryGap: false,
22
- splitLine: {
23
- show: false
24
- }
25
- });
26
- const yAxis = merge({}, axes, {
27
- nameGap: 50,
28
- axisLabel: {
29
- formatter: num => engineeringNotation(num, 2)
30
- }
31
- });
32
- const grid = {
33
- top: 16,
34
- bottom: 44,
35
- left: 64,
36
- right: 32
37
- };
38
-
39
- /**
40
- * Options for charts where the y-axis is the metrics axis.
41
- */
42
- const defaultChartOptions = {
43
- grid,
44
- xAxis,
45
- yAxis,
46
- legend: {
47
- show: false
48
- }
49
- };
50
- const gridWithSecondaryYAxis = {
51
- ...grid,
52
- right: 64
53
- };
54
- const lineStyle = {
55
- symbol: 'circle',
56
- type: 'line',
57
- width: 2
58
- };
59
-
60
- /**
61
- * Annotations series consists of annotations lines
62
- * along with markers. Annotations co-exist with data
63
- * series but have their own virtual coords so that they stay put
64
- * irrespective of data series extents.
65
- */
66
- const annotationsYAxisCoords = {
67
- min: 0,
68
- pos: 3,
69
- // 3% height of chart's grid
70
- max: 100,
71
- show: false
72
- };
73
- const symbolSize = 6;
74
-
75
- /**
76
- * These comparison operators are currently in monitoring
77
- * charts that have alerting related data.
78
- *
79
- * {Array} Possible values for greater than
80
- */
81
- const GREATER_THAN = ['>', '>'];
82
-
83
- /**
84
- * These comparison operators are currently in monitoring
85
- * charts that have alerting related data.
86
- *
87
- * {Array} Possible values for less than
88
- */
89
- const LESS_THAN = ['<', '&lt;'];
90
-
91
- /**
92
- * All default dataZoom configs will have slider & inside
93
- * (for reference, see https://gitlab.com/gitlab-org/gitlab-ui/issues/240)
94
- * Inside is disabled for larger viewports (lg and xl)
95
- * and is specifically to enable touch zoom for mobile devices
96
- * @param {Object} options
97
- */
98
- const getDataZoomConfig = function () {
99
- let {
100
- filterMode = 'none'
101
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
102
- const disabledBreakpoints = ['lg', 'xl'];
103
- const disabled = disabledBreakpoints.includes(GlBreakpointInstance.getBreakpointSize());
104
- const minSpan = filterMode === 'none' ? 0.01 : null;
105
- return {
106
- grid: {
107
- bottom: 81
108
- },
109
- xAxis: {
110
- nameGap: 67
111
- },
112
- dataZoom: [{
113
- type: 'slider',
114
- bottom: 22,
115
- filterMode,
116
- minSpan
117
- }, {
118
- type: 'inside',
119
- filterMode,
120
- minSpan,
121
- disabled
122
- }]
123
- };
124
- };
125
-
126
- // All chart options can be merged but series
127
- // needs to be concatenated.
128
- // Series can be an object for single series or
129
- // an array of objects.
130
- const mergeSeriesToOptions = function (options) {
131
- let series = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
132
- const {
133
- series: optSeries = []
134
- } = options;
135
- return {
136
- ...options,
137
- series: [...castArray(series), ...castArray(optSeries)]
138
- };
139
- };
140
-
141
- /**
142
- * If an annotation series exists, the chart options should have an
143
- * array of yAxis settings so that the series can exist in its own
144
- * coordinate system without interfering with the data series
145
- *
146
- * @param {Object} options options to merge annotation series yAxis with
147
- * @param {Boolean} hasAnnotations if annotation series yAxis should be merged
148
- * @returns {Object} options
149
- */
150
- const mergeAnnotationAxisToOptions = function (options) {
151
- let hasAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
152
- return {
153
- ...options,
154
- ...(hasAnnotations && {
155
- yAxis: [options.yAxis, annotationsYAxisCoords]
156
- })
157
- };
158
- };
159
- const dataZoomAdjustments = dataZoom => {
160
- // handle cases where dataZoom is array and object.
161
- const useSlider = dataZoom && Array.isArray(dataZoom) ? dataZoom.length : Boolean(dataZoom);
162
- return useSlider ? getDataZoomConfig({
163
- filterMode: 'weakFilter'
164
- }) : [];
165
- };
166
-
167
- /**
168
- * Generate eCharts markArea arrays for thresholds and annotations.
169
- *
170
- * This method purposefully has no knowledge of comparison
171
- * operators used in thresholds as it is not necessary and instead
172
- * expects explict value bounds
173
- *
174
- * Examples:
175
- * { min: 7, max: 10 } => markArea from 7 to 10
176
- * { min: 1, max: 7 } => markArea from 1 to 7
177
- *
178
- * If min and max are equal it would be markLine and would be
179
- * generated by `generateMarkLines`
180
- *
181
- * @param {Object} threshold Threshold/Annotation object with min and max values
182
- * @param {String} axis markArea is generated against this axis
183
- * @returns {Array}
184
- */
185
- const generateMarkArea = function (_ref) {
186
- let {
187
- min,
188
- max
189
- } = _ref;
190
- let axis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yAxis';
191
- return [{
192
- [axis]: min
193
- }, {
194
- [axis]: max
195
- }];
196
- };
197
-
198
- /**
199
- * Generate eCharts markLine objects for thresholds and annotations.
200
- *
201
- * This method purposefully has no knowledge of comparison
202
- * operators used in thresholds as it is not necessary and instead
203
- * expects explict value bounds
204
- *
205
- * In order to continue supporting existing thresholds format, min
206
- * is passed as undefined so the correct markLine object is generated.
207
- *
208
- * For annotations, min and max will be the same value.
209
- *
210
- * Threshold Examples:
211
- * { max: 7 } => markLine at 7
212
- *
213
- * Annotation Examples:
214
- * { min: 7, max: 7 } => markLine at 7
215
- *
216
- * @param {Object} threshold Threshold/Annotation object with min and max values
217
- * @param {String} axis markLine is generated against this axis
218
- * @returns {Object}
219
- */
220
- const generateMarkLines = function (_ref2) {
221
- let {
222
- min,
223
- max
224
- } = _ref2;
225
- let axis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yAxis';
226
- if (min) {
227
- return {
228
- [axis]: min
229
- };
230
- }
231
- return {
232
- [axis]: max
233
- };
234
- };
235
-
236
- /**
237
- * Generates markPoints that are placed under the markLines.
238
- *
239
- * These are used only in annotation lines. For annotation lines,
240
- * both min and max are same values so only one is enough to generate
241
- * the markPoint.
242
- *
243
- * @param {Object} annotation object
244
- * @return {Object}
245
- */
246
- const generateMarkPoints = _ref3 => {
247
- let {
248
- min,
249
- tooltipData
250
- } = _ref3;
251
- return {
252
- name: 'annotations',
253
- xAxis: min,
254
- yAxis: 0,
255
- tooltipData
256
- };
257
- };
258
-
259
- /**
260
- * Generate set of markAreas and markLines to draw on charts
261
- * as alert thresholds.
262
- *
263
- * Alert thresholds always have a markLine associated with a markArea
264
- *
265
- * @param {Array} thresholds Array of alert thresholds
266
- * @returns {Object} markAreas and markLines
267
- */
268
- function getThresholdConfig(thresholds) {
269
- if (!thresholds.length) {
270
- return {};
271
- }
272
- const data = thresholds.reduce((acc, alert) => {
273
- const {
274
- threshold,
275
- operator
276
- } = alert;
277
- if (GREATER_THAN.includes(operator)) {
278
- acc.areas.push(generateMarkArea({
279
- min: threshold,
280
- max: Infinity
281
- }));
282
- } else if (LESS_THAN.includes(operator)) {
283
- acc.areas.push(generateMarkArea({
284
- min: Number.NEGATIVE_INFINITY,
285
- max: threshold
286
- }));
287
- }
288
- acc.lines.push(generateMarkLines({
289
- max: threshold
290
- }));
291
- return acc;
292
- }, {
293
- lines: [],
294
- areas: []
295
- });
296
- return {
297
- markLine: {
298
- data: data.lines
299
- },
300
- markArea: {
301
- data: data.areas,
302
- zlevel: -1
303
- }
304
- };
305
- }
306
-
307
- /**
308
- * This method is only for testing both markLines and markAreas
309
- * that are used for annotations.
310
- *
311
- * `getAnnotationsConfig` as of %12.10 supports only markLines.
312
- * But this method can generate lines, points and areas.
313
- *
314
- * @param {Array} annotations Array of annotation objects
315
- * @returns {Object} { areas, lines, points }
316
- */
317
- const parseAnnotations = annotations => annotations.reduce((acc, annotation) => {
318
- // because only markLines are supported all cases will
319
- // satisfy this condition. This is more of a sanity check
320
- // until markAreas are supported.
321
- // https://gitlab.com/gitlab-org/gitlab/-/issues/212910
322
- if (areDatesEqual(annotation.min, annotation.max)) {
323
- acc.lines.push(generateMarkLines(annotation, 'xAxis'));
324
- acc.points.push(generateMarkPoints(annotation));
325
- return acc;
326
- }
327
- acc.areas.push(generateMarkArea(annotation, 'xAxis'));
328
- return acc;
329
- }, {
330
- areas: [],
331
- lines: [],
332
- points: []
333
- });
334
-
335
- /**
336
- * Generate set of markAreas and markLines to draw on charts
337
- * as annotations.
338
- *
339
- * Annotations as of %12.10 will only be markLines.
340
- * markAreas are not supported yet. They are generated by
341
- * `parseAnnotations` but not rendered.
342
- *
343
- * @param {Array} annotations Array of annotations
344
- * @returns {Object} { markLines }
345
- */
346
- const getAnnotationsConfig = annotations => {
347
- if (!annotations.length) {
348
- return {};
349
- }
350
-
351
- // annotations parsing is moved out so that it can be tested
352
- // for markLines and markAreas.
353
- const {
354
- lines,
355
- points
356
- } = parseAnnotations(annotations);
357
- return {
358
- markLine: {
359
- lineStyle: {
360
- color: BLUE_500
361
- },
362
- silent: true,
363
- data: lines
364
- },
365
- markPoint: {
366
- itemStyle: {
367
- color: BLUE_500
368
- },
369
- symbol: arrowSymbol,
370
- symbolSize: '8',
371
- symbolOffset: [0, ' 60%'],
372
- data: points
373
- }
374
- };
375
- };
376
-
377
- /**
378
- * Given thresholds and annotations options, this method generates
379
- * an annotation series that co-exists along with the data series.
380
- *
381
- * yAxis option is useful in cases where multiple yAxis settings
382
- * are used in a chart. Currently, all of our charts have single
383
- * yAxis settings.
384
- *
385
- * @param {Object} params Thresholds, annotations and yAxis options
386
- * @returns {Object} Annotation series
387
- */
388
- const generateAnnotationSeries = function (annotations) {
389
- let yAxisIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
390
- if (!annotations.length) {
391
- return null;
392
- }
393
- return merge({
394
- name: ANNOTATIONS_SERIES_NAME,
395
- yAxisIndex,
396
- type: 'scatter',
397
- data: []
398
- }, getAnnotationsConfig(annotations));
399
- };
400
-
401
- /**
402
- * This method generates the data series and relevant defaults for a bar chart
403
- *
404
- * @param {Object} options
405
- * @param {string} options.name - xAxis name for the chart
406
- * @param {string} options.color - color to render the data series
407
- * @param {Array} options.data - data set to be rendered
408
- * @param {string} [options.stack] - controls how the stacked charts should render either `stacked` or `tiled`
409
- * @param {number} [options.yAxisIndex] - specifies the yAxis to use (if there are multiple)
410
- * @returns {Object} Bar chart series
411
- */
412
- const generateBarSeries = _ref4 => {
413
- let {
414
- name,
415
- color,
416
- stack,
417
- data = [],
418
- yAxisIndex = 0
419
- } = _ref4;
420
- return {
421
- type: CHART_TYPE_BAR,
422
- name,
423
- data,
424
- stack,
425
- barMaxWidth: '50%',
426
- yAxisIndex,
427
- itemStyle: {
428
- color: hexToRgba(color, 0.2),
429
- borderColor: color,
430
- borderWidth: 1
431
- },
432
- emphasis: {
433
- itemStyle: {
434
- color: hexToRgba(color, 0.4)
435
- }
436
- }
437
- };
438
- };
439
-
440
- /**
441
- * This method generates the data series and relevant defaults for a line chart
442
- *
443
- * @param {Object} options
444
- * @param {string} options.name - xAxis name for the chart
445
- * @param {string} options.color - color to render the data series
446
- * @param {Array} options.data - data set to be rendered
447
- * @param {number} [options.yAxisIndex] - specifies the yAxis to use (if there are multiple)
448
- * @returns {Object} Line chart series
449
- */
450
- const generateLineSeries = _ref5 => {
451
- let {
452
- name,
453
- color,
454
- data = [],
455
- yAxisIndex = 0
456
- } = _ref5;
457
- return {
458
- name,
459
- data,
460
- type: CHART_TYPE_LINE,
461
- yAxisIndex,
462
- lineStyle: {
463
- color
464
- },
465
- itemStyle: {
466
- color
467
- }
468
- };
469
- };
470
- const getTooltipAxisConfig = dimensionAxis => {
471
- if (!['xAxis', 'yAxis'].includes(dimensionAxis)) {
472
- throw new Error(`\`dimensionAxis\` must be "xAxis" or "yAxis", received ${dimensionAxis}`);
473
- }
474
- if (dimensionAxis === 'xAxis') {
475
- return {
476
- dimensionIndex: 0,
477
- metricIndex: 1,
478
- valueAxis: 'yAxis'
479
- };
480
- }
481
- return {
482
- dimensionIndex: 1,
483
- metricIndex: 0,
484
- valueAxis: 'xAxis'
485
- };
486
- };
487
- const getTooltipTitle = function () {
488
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
489
- let titleAxisName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
490
- let dimensionIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
491
- if (!params) return '';
492
- const title = params.seriesData.reduce((acc, _ref6) => {
493
- let {
494
- value
495
- } = _ref6;
496
- const dimension = value[dimensionIndex];
497
- if (acc.includes(dimension)) {
498
- return acc;
499
- }
500
- return [...acc, dimension];
501
- }, []).join(', ');
502
- return titleAxisName ? `${title} (${titleAxisName})` : title;
503
- };
504
- const getTooltipContent = function () {
505
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
506
- let valueAxisName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
507
- let metricIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
508
- if (!params) {
509
- return {};
510
- }
511
- const {
512
- seriesData
513
- } = params;
514
- if (seriesData.length === 1) {
515
- const {
516
- value,
517
- seriesName
518
- } = seriesData[0];
519
- return {
520
- [valueAxisName || seriesName]: {
521
- value: value[metricIndex],
522
- color: '' // ignore color when showing a single series
523
- }
524
- };
525
- }
526
- return seriesData.reduce((acc, _ref7) => {
527
- let {
528
- value,
529
- seriesName,
530
- color
531
- } = _ref7;
532
- acc[seriesName] = {
533
- value: value[metricIndex],
534
- color
535
- };
536
- return acc;
537
- }, {});
538
- };
539
-
540
- /**
541
- * Enriches tooltip parameters with stack information for proper series ordering.
542
- *
543
- * In stacked column charts, series are grouped by their `stack` property to determine
544
- * visual stacking and tooltip display order. ECharts doesn't provide stack data
545
- * in tooltip params by default, so this function manually adds it by mapping
546
- * series names to their configured stack values.
547
- *
548
- * @param {Object} params - Tooltip parameters from ECharts
549
- * @param {Object} options - Chart configuration with series definitions
550
- * @returns {Object} Enhanced tooltip parameters with stack data
551
- */
552
- const getTooltipParams = function () {
553
- let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
554
- let options = arguments.length > 1 ? arguments[1] : undefined;
555
- if (!params) return null;
556
- const {
557
- series: optionsSeries = []
558
- } = options !== null && options !== void 0 ? options : {};
559
- const seriesStacks = Object.fromEntries(optionsSeries.map(_ref8 => {
560
- let {
561
- name,
562
- stack
563
- } = _ref8;
564
- return [name, stack];
565
- }));
566
- return {
567
- ...params,
568
- seriesData: params.seriesData.map(series => ({
569
- ...series,
570
- stack: seriesStacks[series.seriesName]
571
- }))
572
- };
573
- };
574
-
575
- /**
576
- * The method works well if tooltip content should be against y-axis values.
577
- * However, for bar charts, the tooltip should be against x-axis values.
578
- * This method should be updated to work with all types of visualizations.
579
- * https://gitlab.com/gitlab-org/gitlab-ui/-/issues/674
580
- *
581
- * @param {Object} params series data
582
- * @param {String} yAxisTitle y-axis title
583
- * @returns {Object} tooltip title and content
584
- * @deprecated Use getTooltipContent and getTooltipContent to obtain the tooltip
585
- */
586
- const getDefaultTooltipContent = function (params) {
587
- let yAxisTitle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
588
- const seriesDataLength = params.seriesData.length;
589
- const {
590
- xLabels,
591
- tooltipContent
592
- } = params.seriesData.reduce((acc, chartItem) => {
593
- const [title, value] = chartItem.value || [];
594
- // Let's use the y axis title as series name when only one series exists
595
- // This way, TooltipDefaultFormat will display the y axis title as label
596
- const seriesName = seriesDataLength === 1 && yAxisTitle ? yAxisTitle : chartItem.seriesName;
597
- const color = seriesDataLength === 1 ? '' : chartItem.color;
598
- acc.tooltipContent[seriesName] = {
599
- value,
600
- color
601
- };
602
- if (!acc.xLabels.includes(title)) {
603
- acc.xLabels.push(title);
604
- }
605
- return acc;
606
- }, {
607
- xLabels: [],
608
- tooltipContent: {}
609
- });
610
- return {
611
- xLabels,
612
- tooltipContent
613
- };
614
- };
615
-
616
- export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultChartOptions, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getTooltipAxisConfig, getTooltipContent, getTooltipParams, getTooltipTitle, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, toolboxHeight, validRenderers, xAxis, yAxis };
@@ -1,69 +0,0 @@
1
- import { translate } from '../i18n';
2
-
3
- /**
4
- * As of %12.10 all annotations are added as a decorations
5
- * by piggybacking a scatter series. The series should
6
- * have 'annotations' as name for the annotation tooltips
7
- * to work.
8
- *
9
- * More info here https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28825
10
- *
11
- */
12
- const ANNOTATIONS_SERIES_NAME = 'annotations';
13
- /**
14
- * Annotations have a line (markLine) and an arrow (markPoint).
15
- * When the markPoint is hovered, a tooltip is displayed to
16
- * show the annotation description.
17
- *
18
- * All markPoints have this component type
19
- */
20
- const ANNOTATIONS_COMPONENT_TYPE = 'markPoint';
21
-
22
- /**
23
- * This is a slight offset that gets applied to the left
24
- * of the chart tooltips to ensure a correct position.
25
- */
26
- const TOOLTIP_LEFT_OFFSET = 2;
27
-
28
- /**
29
- * This is a slight offset that gets applied to the left
30
- * of the chart tooltips to ensure a correct position.
31
- */
32
- const TOOLTIP_TOP_OFFSET = 10;
33
-
34
- /**
35
- * These are the accepted values for the layout prop
36
- * of the chart legend component
37
- */
38
- const LEGEND_LAYOUT_INLINE = 'inline';
39
- const LEGEND_LAYOUT_TABLE = 'table';
40
-
41
- /**
42
- * Default values for the chart legend field labels
43
- */
44
- const LEGEND_AVERAGE_TEXT = () => translate('GlChartLegend.average', 'Avg');
45
- const LEGEND_CURRENT_TEXT = () => translate('GlChartLegend.current', 'Current');
46
- const LEGEND_MIN_TEXT = () => translate('GlChartLegend.min', 'Min');
47
- const LEGEND_MAX_TEXT = () => translate('GlChartLegend.max', 'Max');
48
-
49
- /**
50
- * These arrow symbols are used as markPoints under the annotations lines
51
- * within area and line charts. This icon doesn't exist in the svg
52
- * library yet. The below issue is to track the progress of the svg icon
53
- * https://gitlab.com/gitlab-org/gitlab-svgs/-/issues/118
54
- */
55
- const arrowSymbol = 'path://m5 229 5 8h-10z';
56
-
57
- // Constants for the type property of charts
58
- const CHART_TYPE_BAR = 'bar';
59
- const CHART_TYPE_LINE = 'line';
60
-
61
- // Constants for "series.stack" option, series with the same value stack on top of each other
62
- const CHART_DEFAULT_SERIES_STACK = 'default-series-stack';
63
- const CHART_DEFAULT_SERIES_SECONDARY_STACK = 'default-series-secondary-stack';
64
-
65
- // Constants for height "auto"
66
- const HEIGHT_AUTO_CLASSES = 'gl-chart-h-auto gl-flex gl-flex-col gl-h-full';
67
- const HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES = 'gl-flex gl-h-full';
68
-
69
- export { ANNOTATIONS_COMPONENT_TYPE, ANNOTATIONS_SERIES_NAME, CHART_DEFAULT_SERIES_SECONDARY_STACK, CHART_DEFAULT_SERIES_STACK, CHART_TYPE_BAR, CHART_TYPE_LINE, HEIGHT_AUTO_CLASSES, HEIGHT_AUTO_HORIZONTAL_LAYOUT_CLASSES, LEGEND_AVERAGE_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, TOOLTIP_LEFT_OFFSET, TOOLTIP_TOP_OFFSET, arrowSymbol };