@gitlab/ui 131.3.0 → 131.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/components/utilities/truncate/truncate.scss +3 -1
- package/src/scss/mixins.scss +3 -1
- package/tailwind.defaults.js +10 -1
- package/dist/charts.js +0 -13
- package/dist/components/base/accordion/accordion.js +0 -69
- package/dist/components/base/accordion/accordion_item.js +0 -160
- package/dist/components/base/accordion/constants.js +0 -3
- package/dist/components/base/alert/alert.js +0 -263
- package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
- package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
- package/dist/components/base/attribute_list/attribute_list.js +0 -100
- package/dist/components/base/avatar/avatar.js +0 -175
- package/dist/components/base/avatar/utils.js +0 -17
- package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
- package/dist/components/base/avatar_link/avatar_link.js +0 -47
- package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
- package/dist/components/base/badge/badge.js +0 -197
- package/dist/components/base/banner/banner.js +0 -149
- package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
- package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
- package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
- package/dist/components/base/broadcast_message/constants.js +0 -5
- package/dist/components/base/button/button.js +0 -419
- package/dist/components/base/button_group/button_group.js +0 -53
- package/dist/components/base/card/card.js +0 -69
- package/dist/components/base/collapse/collapse.js +0 -163
- package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
- package/dist/components/base/datepicker/datepicker.js +0 -475
- package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
- package/dist/components/base/drawer/drawer.js +0 -156
- package/dist/components/base/dropdown/dropdown.js +0 -330
- package/dist/components/base/dropdown/dropdown_divider.js +0 -48
- package/dist/components/base/dropdown/dropdown_form.js +0 -48
- package/dist/components/base/dropdown/dropdown_item.js +0 -175
- package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
- package/dist/components/base/dropdown/dropdown_text.js +0 -48
- package/dist/components/base/filtered_search/common_story_options.js +0 -14
- package/dist/components/base/filtered_search/filtered_search.js +0 -428
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
- package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
- package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
- package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
- package/dist/components/base/form/form.js +0 -43
- package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
- package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
- package/dist/components/base/form/form_combobox/constants.js +0 -55
- package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
- package/dist/components/base/form/form_date/form_date.js +0 -143
- package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
- package/dist/components/base/form/form_fields/form_fields.js +0 -289
- package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
- package/dist/components/base/form/form_fields/mappers.js +0 -13
- package/dist/components/base/form/form_fields/validators.js +0 -48
- package/dist/components/base/form/form_group/form_group.js +0 -119
- package/dist/components/base/form/form_input/form_input.js +0 -695
- package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
- package/dist/components/base/form/form_radio/form_radio.js +0 -259
- package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
- package/dist/components/base/form/form_select/constants.js +0 -12
- package/dist/components/base/form/form_select/form_select.js +0 -96
- package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
- package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
- package/dist/components/base/icon/icon.js +0 -113
- package/dist/components/base/illustration/illustration.js +0 -80
- package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
- package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
- package/dist/components/base/label/label.js +0 -174
- package/dist/components/base/link/link.js +0 -332
- package/dist/components/base/loading_icon/loading_icon.js +0 -120
- package/dist/components/base/markdown/markdown.js +0 -50
- package/dist/components/base/modal/modal.js +0 -259
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
- package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
- package/dist/components/base/new_dropdowns/constants.js +0 -24
- package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
- package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
- package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
- package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
- package/dist/components/base/pagination/pagination.js +0 -397
- package/dist/components/base/path/data.js +0 -34
- package/dist/components/base/path/path.js +0 -177
- package/dist/components/base/popover/popover.js +0 -142
- package/dist/components/base/progress_bar/progress_bar.js +0 -117
- package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
- package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
- package/dist/components/base/segmented_control/segmented_control.js +0 -73
- package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
- package/dist/components/base/sorting/sorting.js +0 -180
- package/dist/components/base/table/constants.js +0 -5
- package/dist/components/base/table/table.js +0 -187
- package/dist/components/base/table_lite/table_lite.js +0 -80
- package/dist/components/base/tabs/constants.js +0 -3
- package/dist/components/base/tabs/tab/tab.js +0 -113
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
- package/dist/components/base/tabs/tabs/tabs.js +0 -223
- package/dist/components/base/toast/index.js +0 -66
- package/dist/components/base/toast/toast.js +0 -125
- package/dist/components/base/toast/toaster.js +0 -87
- package/dist/components/base/toggle/toggle.js +0 -178
- package/dist/components/base/token/token.js +0 -97
- package/dist/components/base/token_selector/helpers.js +0 -5
- package/dist/components/base/token_selector/token_container.js +0 -160
- package/dist/components/base/token_selector/token_selector.js +0 -454
- package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
- package/dist/components/base/tooltip/tooltip.js +0 -54
- package/dist/components/charts/area/area.js +0 -329
- package/dist/components/charts/bar/bar.js +0 -207
- package/dist/components/charts/chart/chart.js +0 -215
- package/dist/components/charts/column/column.js +0 -221
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
- package/dist/components/charts/gauge/gauge.js +0 -205
- package/dist/components/charts/heatmap/heatmap.js +0 -299
- package/dist/components/charts/heatmap/index.js +0 -2
- package/dist/components/charts/legend/legend.js +0 -245
- package/dist/components/charts/line/line.js +0 -340
- package/dist/components/charts/series_label/series_label.js +0 -101
- package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
- package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
- package/dist/components/charts/single_stat/single_stat.js +0 -164
- package/dist/components/charts/sparkline/sparkline.js +0 -299
- package/dist/components/charts/stacked_column/stacked_column.js +0 -380
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
- package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
- package/dist/components/dashboards/mock_data.js +0 -49
- package/dist/components/experimental/experiment_badge/constants.js +0 -4
- package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
- package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
- package/dist/components/index.js +0 -107
- package/dist/components/mixins/button_mixin.js +0 -11
- package/dist/components/mixins/safe_link_mixin.js +0 -30
- package/dist/components/mixins/tooltip_mixin.js +0 -21
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
- package/dist/components/regions/empty_state/empty_state.js +0 -181
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
- package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
- package/dist/components/shared_components/close_button/close_button.js +0 -55
- package/dist/components/utilities/animated_number/animated_number.js +0 -131
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
- package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
- package/dist/components/utilities/intersperse/intersperse.js +0 -104
- package/dist/components/utilities/sprintf/sprintf.js +0 -171
- package/dist/components/utilities/truncate/constants.js +0 -8
- package/dist/components/utilities/truncate/truncate.js +0 -154
- package/dist/components/utilities/truncate_text/constants.js +0 -7
- package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
- package/dist/config.js +0 -53
- package/dist/directives/hover_load/hover_load.js +0 -45
- package/dist/directives/index.js +0 -8
- package/dist/directives/modal.js +0 -1
- package/dist/directives/outside/outside.js +0 -149
- package/dist/directives/resize_observer/resize_observer.js +0 -58
- package/dist/directives/safe_html/constants.js +0 -6
- package/dist/directives/safe_html/safe_html.js +0 -39
- package/dist/directives/safe_link/mock_data.js +0 -10
- package/dist/directives/safe_link/safe_link.js +0 -67
- package/dist/directives/tooltip/container.js +0 -7
- package/dist/directives/tooltip/tooltip.js +0 -18
- package/dist/index.css +0 -7
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -2
- package/dist/tailwind.css +0 -2
- package/dist/tailwind.css.map +0 -1
- package/dist/tokens/build/js/tokens.dark.js +0 -1410
- package/dist/tokens/build/js/tokens.js +0 -1410
- package/dist/tokens/common_story_options.js +0 -29
- package/dist/tokens/tokens_story.js +0 -76
- package/dist/utils/breakpoints.js +0 -20
- package/dist/utils/charts/config.js +0 -616
- package/dist/utils/charts/constants.js +0 -69
- package/dist/utils/charts/mock_data.js +0 -191
- package/dist/utils/charts/story_config.js +0 -24
- package/dist/utils/charts/theme.js +0 -200
- package/dist/utils/charts/utils.js +0 -54
- package/dist/utils/constants.js +0 -333
- package/dist/utils/data_utils.js +0 -19
- package/dist/utils/datetime_utility.js +0 -61
- package/dist/utils/equality_utils.js +0 -84
- package/dist/utils/i18n.js +0 -65
- package/dist/utils/is_slot_empty.js +0 -34
- package/dist/utils/number_utils.js +0 -132
- package/dist/utils/play_utils.js +0 -11
- package/dist/utils/set_utils.js +0 -25
- package/dist/utils/stories_constants.js +0 -29
- package/dist/utils/stories_utils.js +0 -62
- package/dist/utils/story_decorators/container.js +0 -19
- package/dist/utils/string_utils.js +0 -69
- package/dist/utils/svgs/svg_paths.js +0 -7
- package/dist/utils/test_utils.js +0 -33
- package/dist/utils/use_fake_date.js +0 -29
- package/dist/utils/use_mock_intersection_observer.js +0 -105
- package/dist/utils/utils.js +0 -205
- package/dist/utils.js +0 -5
- package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
- package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
- package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
- package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
- package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
- package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
- package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
- package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
- package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
- package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
- package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
- package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
- package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
- package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
- package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
- package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
- package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
- package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
- package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
- package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
- package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
- package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
- package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
- package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
- package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
- package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
- package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
- package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
- package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
- package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
- package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
- package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
- package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
- package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
- package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
- package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
- package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
- package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
- package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
- package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
- package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
- package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
- package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import * as echarts from 'echarts';
|
|
2
|
-
import { defaultFontSize } from '../../../utils/charts/config';
|
|
3
|
-
import { LEGEND_AVERAGE_TEXT, LEGEND_CURRENT_TEXT, LEGEND_MIN_TEXT, LEGEND_MAX_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE } from '../../../utils/charts/constants';
|
|
4
|
-
import { engineeringNotation, average } from '../../../utils/number_utils';
|
|
5
|
-
import GlTruncate from '../../utilities/truncate/truncate';
|
|
6
|
-
import GlChartSeriesLabel from '../series_label/series_label';
|
|
7
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
|
-
|
|
9
|
-
var script = {
|
|
10
|
-
name: 'GlChartLegend',
|
|
11
|
-
components: {
|
|
12
|
-
GlChartSeriesLabel,
|
|
13
|
-
GlTruncate
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
chart: {
|
|
17
|
-
type: Object,
|
|
18
|
-
required: true,
|
|
19
|
-
validator(chart) {
|
|
20
|
-
return Object.is(chart, echarts.getInstanceByDom(chart.getDom()));
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
seriesInfo: {
|
|
24
|
-
type: Array,
|
|
25
|
-
required: true,
|
|
26
|
-
validator(seriesInfo) {
|
|
27
|
-
return seriesInfo.every(series => series.type && series.name && series.color);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
textStyle: {
|
|
31
|
-
type: Object,
|
|
32
|
-
required: false,
|
|
33
|
-
default: () => ({})
|
|
34
|
-
},
|
|
35
|
-
/**
|
|
36
|
-
* Text for data average (overridden by prop if needed for internationalization)
|
|
37
|
-
*/
|
|
38
|
-
averageText: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: false,
|
|
41
|
-
default: LEGEND_AVERAGE_TEXT
|
|
42
|
-
},
|
|
43
|
-
currentText: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: false,
|
|
46
|
-
default: LEGEND_CURRENT_TEXT
|
|
47
|
-
},
|
|
48
|
-
minText: {
|
|
49
|
-
type: String,
|
|
50
|
-
required: false,
|
|
51
|
-
default: LEGEND_MIN_TEXT
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* Text for max amount (overridden by prop if needed for internationalization)
|
|
55
|
-
*/
|
|
56
|
-
maxText: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: false,
|
|
59
|
-
default: LEGEND_MAX_TEXT
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* Sets the display layout
|
|
63
|
-
*/
|
|
64
|
-
layout: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: false,
|
|
67
|
-
default: LEGEND_LAYOUT_INLINE,
|
|
68
|
-
validator(layout) {
|
|
69
|
-
return [LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE].indexOf(layout) !== -1;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
data() {
|
|
74
|
-
return {
|
|
75
|
-
disabledSeries: {},
|
|
76
|
-
lastActiveSeriesLabel: null,
|
|
77
|
-
shouldApplyFadeClass: false
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
computed: {
|
|
81
|
-
fontStyle() {
|
|
82
|
-
return {
|
|
83
|
-
fontFamily: this.textStyle.fontFamily || 'sans-serif',
|
|
84
|
-
fontSize: `${this.textStyle.fontSize || defaultFontSize}px`
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
hasOneSeriesElement() {
|
|
88
|
-
return this.seriesInfo.length === 1;
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
created() {
|
|
92
|
-
this.chart.on('legendselectchanged', this.suppressLastActiveSeriesLabelToggle);
|
|
93
|
-
},
|
|
94
|
-
mounted() {
|
|
95
|
-
this.applyFadeClass();
|
|
96
|
-
},
|
|
97
|
-
async updated() {
|
|
98
|
-
await this.$nextTick();
|
|
99
|
-
this.applyFadeClass();
|
|
100
|
-
},
|
|
101
|
-
beforeDestroy() {
|
|
102
|
-
this.chart.off('legendselectchanged', this.suppressLastActiveSeriesLabelToggle);
|
|
103
|
-
},
|
|
104
|
-
methods: {
|
|
105
|
-
sanitizeSeriesData(seriesData) {
|
|
106
|
-
var _seriesData$filter;
|
|
107
|
-
return (_seriesData$filter = seriesData === null || seriesData === void 0 ? void 0 : seriesData.filter(d => !Number.isNaN(d))) !== null && _seriesData$filter !== void 0 ? _seriesData$filter : [];
|
|
108
|
-
},
|
|
109
|
-
seriesAverage(seriesData) {
|
|
110
|
-
const sanitized = this.sanitizeSeriesData(seriesData);
|
|
111
|
-
return engineeringNotation(average(...sanitized));
|
|
112
|
-
},
|
|
113
|
-
seriesMax(seriesData) {
|
|
114
|
-
const sanitized = this.sanitizeSeriesData(seriesData);
|
|
115
|
-
return engineeringNotation(Math.max(...sanitized));
|
|
116
|
-
},
|
|
117
|
-
seriesMin(seriesData) {
|
|
118
|
-
const sanitized = this.sanitizeSeriesData(seriesData);
|
|
119
|
-
return engineeringNotation(Math.min(...sanitized));
|
|
120
|
-
},
|
|
121
|
-
seriesLast(seriesData) {
|
|
122
|
-
const sanitized = this.sanitizeSeriesData(seriesData);
|
|
123
|
-
return engineeringNotation(sanitized[sanitized.length - 1]);
|
|
124
|
-
},
|
|
125
|
-
seriesNameIsLong(seriesName) {
|
|
126
|
-
return seriesName.length > 120;
|
|
127
|
-
},
|
|
128
|
-
handleClick(_ref, key) {
|
|
129
|
-
let {
|
|
130
|
-
name,
|
|
131
|
-
disabled
|
|
132
|
-
} = _ref;
|
|
133
|
-
if (this.hasOneSeriesElement || this.isToggleDisabled(name, disabled)) return;
|
|
134
|
-
this.chart.dispatchAction({
|
|
135
|
-
type: 'legendToggleSelect',
|
|
136
|
-
name
|
|
137
|
-
});
|
|
138
|
-
this.disabledSeries = {
|
|
139
|
-
...this.disabledSeries,
|
|
140
|
-
[key]: !this.disabledSeries[key]
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
handleMouseEnter(name) {
|
|
144
|
-
this.chart.dispatchAction({
|
|
145
|
-
type: 'highlight',
|
|
146
|
-
seriesName: name
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
handleMouseLeave(name) {
|
|
150
|
-
this.chart.dispatchAction({
|
|
151
|
-
type: 'downplay',
|
|
152
|
-
seriesName: name
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
getColor(color, key) {
|
|
156
|
-
return this.disabledSeries[key] ? 'var(--gl-chart-axis-line-color)' : color;
|
|
157
|
-
},
|
|
158
|
-
suppressLastActiveSeriesLabelToggle(_ref2) {
|
|
159
|
-
let {
|
|
160
|
-
selected
|
|
161
|
-
} = _ref2;
|
|
162
|
-
const selectedSeriesLabels = Object.entries(selected).filter(_ref3 => {
|
|
163
|
-
let [, isSelected] = _ref3;
|
|
164
|
-
return Boolean(isSelected);
|
|
165
|
-
});
|
|
166
|
-
this.lastActiveSeriesLabel = null;
|
|
167
|
-
if (selectedSeriesLabels.length === 1) {
|
|
168
|
-
const [lastActiveSeriesLabelName] = selectedSeriesLabels[0];
|
|
169
|
-
this.lastActiveSeriesLabel = lastActiveSeriesLabelName;
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* Disables toggling legend if it is the last active one or if its data series
|
|
174
|
-
* has a disabled property set to true
|
|
175
|
-
* @param {String} name Series name
|
|
176
|
-
* @param {Boolean} isDisabled Value of the series element's disabled property
|
|
177
|
-
* @returns {boolean}
|
|
178
|
-
*/
|
|
179
|
-
isToggleDisabled(name, isDisabled) {
|
|
180
|
-
return name === this.lastActiveSeriesLabel || isDisabled;
|
|
181
|
-
},
|
|
182
|
-
applyFadeClass() {
|
|
183
|
-
if (this.$refs.inlineLegendEl) {
|
|
184
|
-
const {
|
|
185
|
-
scrollHeight,
|
|
186
|
-
clientHeight
|
|
187
|
-
} = this.$refs.inlineLegendEl;
|
|
188
|
-
this.shouldApplyFadeClass = scrollHeight > clientHeight;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
legendLayoutTypes: {
|
|
193
|
-
LEGEND_LAYOUT_INLINE,
|
|
194
|
-
LEGEND_LAYOUT_TABLE
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/* script */
|
|
199
|
-
const __vue_script__ = script;
|
|
200
|
-
|
|
201
|
-
/* template */
|
|
202
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-legend",attrs:{"data-testid":"gl-chart-legend"}},[(_vm.layout === _vm.$options.legendLayoutTypes.LEGEND_LAYOUT_INLINE)?[_c('div',{ref:"inlineLegendEl",staticClass:"gl-legend-inline",class:{ 'gl-legend-b-fade': _vm.shouldApplyFadeClass }},_vm._l((_vm.seriesInfo),function(series,key){return _c('div',{key:key,staticClass:"gl-legend-inline-series",class:{
|
|
203
|
-
'gl-text-subtle': _vm.disabledSeries[key],
|
|
204
|
-
'gl-text-strong': !_vm.disabledSeries[key],
|
|
205
|
-
'gl-w-full': _vm.seriesNameIsLong(series.name),
|
|
206
|
-
'hover:!gl-cursor-not-allowed':
|
|
207
|
-
_vm.hasOneSeriesElement || _vm.isToggleDisabled(series.name, series.disabled),
|
|
208
|
-
},style:(_vm.fontStyle),attrs:{"aria-disabled":_vm.hasOneSeriesElement || _vm.isToggleDisabled(series.name, series.disabled),"role":"button"},on:{"click":function($event){return _vm.handleClick(series, key)},"mouseenter":function($event){return _vm.handleMouseEnter(series.name)},"mouseleave":function($event){return _vm.handleMouseLeave(series.name)}}},[_c('gl-chart-series-label',{staticClass:"gl-legend-inline-series-label",class:{ 'gl-w-3/4': _vm.seriesNameIsLong(series.name) },attrs:{"color":_vm.getColor(series.color, key),"type":series.type}},[_c('gl-truncate',{staticClass:"gl-font-bold",attrs:{"text":series.name}})],1),_vm._v(" "),(series.data && series.data.length)?_c('span',{class:{ 'gl-whitespace-nowrap': _vm.seriesNameIsLong(series.name) }},[_vm._v("\n "+_vm._s(_vm.averageText)+": "+_vm._s(_vm.seriesAverage(series.data))+" · "+_vm._s(_vm.maxText)+":\n "+_vm._s(_vm.seriesMax(series.data))+"\n ")]):_vm._e()],1)}),0)]:_vm._e(),_vm._v(" "),(_vm.layout === _vm.$options.legendLayoutTypes.LEGEND_LAYOUT_TABLE)?[_c('div',{staticClass:"gl-legend-tabular gl-legend-b-fade",style:(_vm.fontStyle)},[_c('header',{staticClass:"gl-legend-tabular-header"},[_c('div',{staticClass:"gl-legend-tabular-header-cell"},[_vm._v(_vm._s(_vm.minText))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-header-cell"},[_vm._v(_vm._s(_vm.maxText))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-header-cell"},[_vm._v(_vm._s(_vm.averageText))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-header-cell"},[_vm._v(_vm._s(_vm.currentText))])]),_vm._v(" "),_c('section',{staticClass:"gl-legend-tabular-body"},_vm._l((_vm.seriesInfo),function(series,key){return _c('div',{key:key,staticClass:"gl-legend-tabular-row",class:{
|
|
209
|
-
'gl-text-subtle': _vm.disabledSeries[key],
|
|
210
|
-
'gl-text-strong': !_vm.disabledSeries[key],
|
|
211
|
-
'hover:!gl-cursor-not-allowed':
|
|
212
|
-
_vm.hasOneSeriesElement || _vm.isToggleDisabled(series.name, series.disabled),
|
|
213
|
-
},style:(_vm.fontStyle),attrs:{"aria-disabled":_vm.isToggleDisabled(series.name, series.disabled),"role":"button"},on:{"click":function($event){return _vm.handleClick(series, key)},"mouseenter":function($event){return _vm.handleMouseEnter(series.name)},"mouseleave":function($event){return _vm.handleMouseLeave(series.name)}}},[_c('div',{staticClass:"gl-legend-tabular-title-cell"},[_c('gl-chart-series-label',{style:(_vm.fontStyle),attrs:{"color":_vm.getColor(series.color, key),"type":series.type}},[_c('gl-truncate',{staticClass:"gl-font-bold",attrs:{"text":series.name}})],1)],1),_vm._v(" "),(_vm.sanitizeSeriesData(series.data).length)?[_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v(_vm._s(_vm.seriesMin(series.data)))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v(_vm._s(_vm.seriesMax(series.data)))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v(_vm._s(_vm.seriesAverage(series.data)))]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v(_vm._s(_vm.seriesLast(series.data)))])]:[_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v("-")]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v("-")]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v("-")]),_vm._v(" "),_c('div',{staticClass:"gl-legend-tabular-details-cell"},[_vm._v("-")])]],2)}),0)])]:_vm._e()],2)};
|
|
214
|
-
var __vue_staticRenderFns__ = [];
|
|
215
|
-
|
|
216
|
-
/* style */
|
|
217
|
-
const __vue_inject_styles__ = undefined;
|
|
218
|
-
/* scoped */
|
|
219
|
-
const __vue_scope_id__ = undefined;
|
|
220
|
-
/* module identifier */
|
|
221
|
-
const __vue_module_identifier__ = undefined;
|
|
222
|
-
/* functional template */
|
|
223
|
-
const __vue_is_functional_template__ = false;
|
|
224
|
-
/* style inject */
|
|
225
|
-
|
|
226
|
-
/* style inject SSR */
|
|
227
|
-
|
|
228
|
-
/* style inject shadow dom */
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
233
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
234
|
-
__vue_inject_styles__,
|
|
235
|
-
__vue_script__,
|
|
236
|
-
__vue_scope_id__,
|
|
237
|
-
__vue_is_functional_template__,
|
|
238
|
-
__vue_module_identifier__,
|
|
239
|
-
false,
|
|
240
|
-
undefined,
|
|
241
|
-
undefined,
|
|
242
|
-
undefined
|
|
243
|
-
);
|
|
244
|
-
|
|
245
|
-
export { __vue_component__ as default };
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import { merge } from 'lodash-es';
|
|
2
|
-
import { symbolSize, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid } from '../../../utils/charts/config';
|
|
3
|
-
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
4
|
-
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
|
-
import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
|
|
6
|
-
import Chart from '../chart/chart';
|
|
7
|
-
import ChartLegend from '../legend/legend';
|
|
8
|
-
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
9
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Line charts as of %12.10 support annotations.
|
|
13
|
-
* Annotations is composed of a dotted line and an arrow
|
|
14
|
-
* at the bottom. The dotted line is constructed
|
|
15
|
-
* with markLine and arrows with markPoint. Most of this
|
|
16
|
-
* logic is in GitLab and should be eventually moved to
|
|
17
|
-
* GitLab UI https://gitlab.com/gitlab-org/gitlab/-/issues/213390.
|
|
18
|
-
*
|
|
19
|
-
* Similar to how custom tooltips are displayed when line chart
|
|
20
|
-
* is hovered, a tooltip should be displayed when the annotation
|
|
21
|
-
* arrow is hovered. This component adds event listeners
|
|
22
|
-
* to figure out if mouse is hovered on charts to show tooltips.
|
|
23
|
-
* While that works for data points inside the grid, for arrows
|
|
24
|
-
* that live right under the chart, we use eCharts inbuilt
|
|
25
|
-
* event listeners to detect hover. Given this limitation,
|
|
26
|
-
* we use a separate tooltip for data point and arrow.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
var script = {
|
|
30
|
-
name: 'GlLineChart',
|
|
31
|
-
components: {
|
|
32
|
-
Chart,
|
|
33
|
-
ChartLegend,
|
|
34
|
-
ChartTooltip
|
|
35
|
-
},
|
|
36
|
-
inheritAttrs: false,
|
|
37
|
-
props: {
|
|
38
|
-
data: {
|
|
39
|
-
type: Array,
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
option: {
|
|
43
|
-
type: Object,
|
|
44
|
-
required: false,
|
|
45
|
-
default: () => ({})
|
|
46
|
-
},
|
|
47
|
-
thresholds: {
|
|
48
|
-
type: Array,
|
|
49
|
-
required: false,
|
|
50
|
-
default: () => []
|
|
51
|
-
},
|
|
52
|
-
annotations: {
|
|
53
|
-
type: Array,
|
|
54
|
-
required: false,
|
|
55
|
-
default: () => []
|
|
56
|
-
},
|
|
57
|
-
includeLegendAvgMax: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
required: false,
|
|
60
|
-
default: true
|
|
61
|
-
},
|
|
62
|
-
/**
|
|
63
|
-
* Callback called when showing or refreshing a tooltip.
|
|
64
|
-
* **Deprecated:** Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
65
|
-
*
|
|
66
|
-
* @deprecated Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
67
|
-
*/
|
|
68
|
-
formatTooltipText: {
|
|
69
|
-
type: Function,
|
|
70
|
-
required: false,
|
|
71
|
-
default: null
|
|
72
|
-
},
|
|
73
|
-
legendAverageText: {
|
|
74
|
-
type: String,
|
|
75
|
-
required: false,
|
|
76
|
-
default: LEGEND_AVERAGE_TEXT
|
|
77
|
-
},
|
|
78
|
-
legendMaxText: {
|
|
79
|
-
type: String,
|
|
80
|
-
required: false,
|
|
81
|
-
default: LEGEND_MAX_TEXT
|
|
82
|
-
},
|
|
83
|
-
legendMinText: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: false,
|
|
86
|
-
default: LEGEND_MIN_TEXT
|
|
87
|
-
},
|
|
88
|
-
legendCurrentText: {
|
|
89
|
-
type: String,
|
|
90
|
-
required: false,
|
|
91
|
-
default: LEGEND_CURRENT_TEXT
|
|
92
|
-
},
|
|
93
|
-
legendLayout: {
|
|
94
|
-
type: String,
|
|
95
|
-
required: false,
|
|
96
|
-
default: LEGEND_LAYOUT_INLINE,
|
|
97
|
-
validator(layout) {
|
|
98
|
-
return [LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE].indexOf(layout) !== -1;
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
showLegend: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
required: false,
|
|
104
|
-
default: true
|
|
105
|
-
},
|
|
106
|
-
/**
|
|
107
|
-
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
108
|
-
*/
|
|
109
|
-
height: {
|
|
110
|
-
type: [Number, String],
|
|
111
|
-
required: false,
|
|
112
|
-
default: null
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Controls whether the tooltip should be pinned when clicked.
|
|
116
|
-
*/
|
|
117
|
-
clickToPinTooltip: {
|
|
118
|
-
type: Boolean,
|
|
119
|
-
required: false,
|
|
120
|
-
default: false
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
data() {
|
|
124
|
-
// Part of the tooltip related data can be
|
|
125
|
-
// moved into the tooltip component.
|
|
126
|
-
// Tracking that progress in
|
|
127
|
-
// https://gitlab.com/gitlab-org/gitlab-ui/-/issues/618
|
|
128
|
-
return {
|
|
129
|
-
chart: null,
|
|
130
|
-
compiledOptions: null,
|
|
131
|
-
showAnnotationsTooltip: false,
|
|
132
|
-
annotationsTooltipTitle: '',
|
|
133
|
-
annotationsTooltipContent: '',
|
|
134
|
-
annotationsTooltipPosition: {
|
|
135
|
-
left: '0',
|
|
136
|
-
top: '0'
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
},
|
|
140
|
-
computed: {
|
|
141
|
-
series() {
|
|
142
|
-
const dataSeries = this.data.map((series, index) => {
|
|
143
|
-
const defaultColor = colorFromDefaultPalette(index);
|
|
144
|
-
const getColor = type => {
|
|
145
|
-
var _series$type$color, _series$type;
|
|
146
|
-
return (_series$type$color = (_series$type = series[type]) === null || _series$type === void 0 ? void 0 : _series$type.color) !== null && _series$type$color !== void 0 ? _series$type$color : defaultColor;
|
|
147
|
-
};
|
|
148
|
-
return merge({
|
|
149
|
-
showSymbol: true,
|
|
150
|
-
lineStyle: {
|
|
151
|
-
color: getColor('lineStyle')
|
|
152
|
-
},
|
|
153
|
-
itemStyle: {
|
|
154
|
-
color: getColor('itemStyle')
|
|
155
|
-
}
|
|
156
|
-
}, symbolSize, lineStyle, series, getThresholdConfig(this.thresholds));
|
|
157
|
-
});
|
|
158
|
-
// if annotation series exists, append it
|
|
159
|
-
// along with data series
|
|
160
|
-
if (this.annotationSeries) {
|
|
161
|
-
return [...dataSeries, this.annotationSeries];
|
|
162
|
-
}
|
|
163
|
-
return dataSeries;
|
|
164
|
-
},
|
|
165
|
-
annotationSeries() {
|
|
166
|
-
return generateAnnotationSeries(this.annotations);
|
|
167
|
-
},
|
|
168
|
-
options() {
|
|
169
|
-
const lineChartOptions = {
|
|
170
|
-
xAxis: {
|
|
171
|
-
axisTick: {
|
|
172
|
-
alignWithLabel: true,
|
|
173
|
-
show: true,
|
|
174
|
-
lineStyle: {
|
|
175
|
-
color: 'var(--gl-chart-axis-line-color)'
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// `formatTooltipText` is deprecated, these added options should be
|
|
182
|
-
// removed when `formatTooltipText` is removed.
|
|
183
|
-
const deprecatedTooltipFormatterOptions = {
|
|
184
|
-
xAxis: {
|
|
185
|
-
axisPointer: {
|
|
186
|
-
show: true,
|
|
187
|
-
label: {
|
|
188
|
-
formatter: this.formatTooltipText
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
const mergedOptions = merge({}, defaultChartOptions, lineChartOptions, this.formatTooltipText ? deprecatedTooltipFormatterOptions : {}, this.option, dataZoomAdjustments(this.option.dataZoom));
|
|
194
|
-
// All chart options can be merged but series
|
|
195
|
-
// needs to be handled specially
|
|
196
|
-
return mergeSeriesToOptions(mergeAnnotationAxisToOptions(mergedOptions, this.hasAnnotations), this.series);
|
|
197
|
-
},
|
|
198
|
-
/**
|
|
199
|
-
* Annotations currently are passed as series options in monitoring dashboard.
|
|
200
|
-
* Once https://gitlab.com/gitlab-org/gitlab/-/issues/213390 is closed,
|
|
201
|
-
* annotations will be passed as props and not as series options.
|
|
202
|
-
*
|
|
203
|
-
* For backward compatibility, we're having to check for both.
|
|
204
|
-
*/
|
|
205
|
-
hasAnnotations() {
|
|
206
|
-
return this.annotations.length !== 0 || seriesHasAnnotations(this.option.series);
|
|
207
|
-
},
|
|
208
|
-
shouldShowAnnotationsTooltip() {
|
|
209
|
-
return this.chart && this.hasAnnotations;
|
|
210
|
-
},
|
|
211
|
-
legendStyle() {
|
|
212
|
-
return {
|
|
213
|
-
paddingLeft: `${grid.left}px`
|
|
214
|
-
};
|
|
215
|
-
},
|
|
216
|
-
hasLegend() {
|
|
217
|
-
return this.showLegend && this.compiledOptions;
|
|
218
|
-
},
|
|
219
|
-
seriesInfo() {
|
|
220
|
-
var _this$compiledOptions;
|
|
221
|
-
const compiledSeries = ((_this$compiledOptions = this.compiledOptions) === null || _this$compiledOptions === void 0 ? void 0 : _this$compiledOptions.series) || [];
|
|
222
|
-
return compiledSeries.reduce((acc, series, index) => {
|
|
223
|
-
if (series.type === 'line') {
|
|
224
|
-
var _series$data;
|
|
225
|
-
acc.push({
|
|
226
|
-
name: series.name,
|
|
227
|
-
type: series.lineStyle.type,
|
|
228
|
-
color: series.lineStyle.color || colorFromDefaultPalette(index),
|
|
229
|
-
data: this.includeLegendAvgMax ? (_series$data = series.data) === null || _series$data === void 0 ? void 0 : _series$data.map(data => data[1]) : undefined
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
return acc;
|
|
233
|
-
}, []);
|
|
234
|
-
},
|
|
235
|
-
autoHeight() {
|
|
236
|
-
return this.height === 'auto';
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
beforeDestroy() {
|
|
240
|
-
this.chart.off('mouseout', this.onChartDataPointMouseOut);
|
|
241
|
-
this.chart.off('mouseover', this.onChartDataPointMouseOver);
|
|
242
|
-
},
|
|
243
|
-
methods: {
|
|
244
|
-
defaultAnnotationTooltipText(params) {
|
|
245
|
-
var _params$data$tooltipD;
|
|
246
|
-
return {
|
|
247
|
-
title: params.data.xAxis,
|
|
248
|
-
content: (_params$data$tooltipD = params.data.tooltipData) === null || _params$data$tooltipD === void 0 ? void 0 : _params$data$tooltipD.content
|
|
249
|
-
};
|
|
250
|
-
},
|
|
251
|
-
onCreated(chart) {
|
|
252
|
-
// eCharts inbuild mouse events
|
|
253
|
-
// https://echarts.apache.org/en/api.html#events.Mouse%20events
|
|
254
|
-
// is used to attach listeners to markPoints. These listeners
|
|
255
|
-
// are currently used for annotation arrows at the bottom of the chart.
|
|
256
|
-
|
|
257
|
-
// Because data points and annotations arrows are in different
|
|
258
|
-
// sections of the charts with their own mouseovers and mouseouts,
|
|
259
|
-
// there shouldn't be an overlapping situation where both tooltips
|
|
260
|
-
// are visible.
|
|
261
|
-
|
|
262
|
-
if (this.hasAnnotations) {
|
|
263
|
-
chart.on('mouseout', this.onChartDataPointMouseOut);
|
|
264
|
-
chart.on('mouseover', this.onChartDataPointMouseOver);
|
|
265
|
-
}
|
|
266
|
-
this.chart = chart;
|
|
267
|
-
this.$emit('created', chart);
|
|
268
|
-
},
|
|
269
|
-
onUpdated() {
|
|
270
|
-
this.compiledOptions = this.chart.getOption();
|
|
271
|
-
},
|
|
272
|
-
onChartDataPointMouseOut() {
|
|
273
|
-
this.showAnnotationsTooltip = false;
|
|
274
|
-
},
|
|
275
|
-
/**
|
|
276
|
-
* Check if the hovered data point is an annotation
|
|
277
|
-
* point to show the annotation tooltip.
|
|
278
|
-
*/
|
|
279
|
-
onChartDataPointMouseOver(params) {
|
|
280
|
-
if (isDataPointAnnotation(params)) {
|
|
281
|
-
const {
|
|
282
|
-
event
|
|
283
|
-
} = params;
|
|
284
|
-
const toolTipFormatter = this.formatAnnotationsTooltipText || this.defaultAnnotationTooltipText;
|
|
285
|
-
const {
|
|
286
|
-
title = '',
|
|
287
|
-
content = ''
|
|
288
|
-
} = toolTipFormatter(params);
|
|
289
|
-
this.showAnnotationsTooltip = true;
|
|
290
|
-
this.annotationsTooltipTitle = title;
|
|
291
|
-
this.annotationsTooltipContent = content;
|
|
292
|
-
this.annotationsTooltipPosition = {
|
|
293
|
-
left: `${event.event.zrX}px`,
|
|
294
|
-
top: `${event.event.zrY}px`
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
HEIGHT_AUTO_CLASSES
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
/* script */
|
|
303
|
-
const __vue_script__ = script;
|
|
304
|
-
|
|
305
|
-
/* template */
|
|
306
|
-
var __vue_render__ = function () {
|
|
307
|
-
var _obj;
|
|
308
|
-
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-grow': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated,"updated":_vm.onUpdated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.shouldShowAnnotationsTooltip)?_c('chart-tooltip',{ref:"annotationsTooltip",attrs:{"id":"annotationsTooltip","show":_vm.showAnnotationsTooltip,"chart":_vm.chart,"top":_vm.annotationsTooltipPosition.top,"left":_vm.annotationsTooltipPosition.left,"placement":"bottom"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipTitle))])]},proxy:true}],null,false,1889294429)},[_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.annotationsTooltipContent))])]):_vm._e(),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{ref:"dataTooltip",attrs:{"chart":_vm.chart,"use-default-tooltip-formatter":!_vm.formatTooltipText,"click-to-pin":_vm.clickToPinTooltip},scopedSlots:_vm._u([(_vm.$scopedSlots['tooltip-title'])?{key:"title",fn:function(scope){return [_vm._t("tooltip-title",null,null,scope)]}}:null,(_vm.$scopedSlots['tooltip-content'])?{key:"default",fn:function(scope){return [_vm._t("tooltip-content",null,null,scope)]}}:null,(_vm.$scopedSlots['tooltip-value'])?{key:"tooltip-value",fn:function(scope){return [_vm._t("tooltip-value",null,null,scope)]}}:null],null,true)}):_vm._e(),_vm._v(" "),(_vm.hasLegend)?_c('chart-legend',{style:(_vm.legendStyle),attrs:{"chart":_vm.chart,"series-info":_vm.seriesInfo,"text-style":_vm.compiledOptions.textStyle,"min-text":_vm.legendMinText,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText,"current-text":_vm.legendCurrentText,"layout":_vm.legendLayout}}):_vm._e()],1)};
|
|
309
|
-
var __vue_staticRenderFns__ = [];
|
|
310
|
-
|
|
311
|
-
/* style */
|
|
312
|
-
const __vue_inject_styles__ = undefined;
|
|
313
|
-
/* scoped */
|
|
314
|
-
const __vue_scope_id__ = undefined;
|
|
315
|
-
/* module identifier */
|
|
316
|
-
const __vue_module_identifier__ = undefined;
|
|
317
|
-
/* functional template */
|
|
318
|
-
const __vue_is_functional_template__ = false;
|
|
319
|
-
/* style inject */
|
|
320
|
-
|
|
321
|
-
/* style inject SSR */
|
|
322
|
-
|
|
323
|
-
/* style inject shadow dom */
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
328
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
329
|
-
__vue_inject_styles__,
|
|
330
|
-
__vue_script__,
|
|
331
|
-
__vue_scope_id__,
|
|
332
|
-
__vue_is_functional_template__,
|
|
333
|
-
__vue_module_identifier__,
|
|
334
|
-
false,
|
|
335
|
-
undefined,
|
|
336
|
-
undefined,
|
|
337
|
-
undefined
|
|
338
|
-
);
|
|
339
|
-
|
|
340
|
-
export { __vue_component__ as default };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line max-params
|
|
4
|
-
const makePathRect = (startX, startY, width, height) => `M${startX},${startY}H${startX + width}V${startY + height}H${startX}Z`;
|
|
5
|
-
var script = {
|
|
6
|
-
name: 'GlChartSeriesLabel',
|
|
7
|
-
props: {
|
|
8
|
-
color: {
|
|
9
|
-
type: String,
|
|
10
|
-
required: true
|
|
11
|
-
},
|
|
12
|
-
type: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: false,
|
|
15
|
-
default: 'solid'
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
labelLineHeight: 0
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
pathContent() {
|
|
25
|
-
const width = this.$options.svgWidth;
|
|
26
|
-
const height = this.$options.svgHeight;
|
|
27
|
-
if (this.type === 'dashed') {
|
|
28
|
-
const dashWidth = Math.ceil(width / 3);
|
|
29
|
-
const firstDash = makePathRect(0, 0, dashWidth, height);
|
|
30
|
-
const secondDash = makePathRect(width - dashWidth, 0, dashWidth, height);
|
|
31
|
-
return `${firstDash}${secondDash}`;
|
|
32
|
-
}
|
|
33
|
-
return makePathRect(0, 0, width, height);
|
|
34
|
-
},
|
|
35
|
-
svgStyles() {
|
|
36
|
-
return {
|
|
37
|
-
fill: this.color,
|
|
38
|
-
transform: `translateY(${this.formatPixelDimension(this.svgYTranslationValue)})`,
|
|
39
|
-
width: 'auto'
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
svgYTranslationValue() {
|
|
43
|
-
const value = this.labelLineHeight / 2 - this.$options.svgHeight / 2;
|
|
44
|
-
return Math.round(value) || 0;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
mounted() {
|
|
48
|
-
if (getComputedStyle && this.$refs.label) {
|
|
49
|
-
const computedStyle = getComputedStyle(this.$refs.label);
|
|
50
|
-
const lineHeight = computedStyle['line-height'].match(/(\d+)px/);
|
|
51
|
-
if (lineHeight !== null) {
|
|
52
|
-
this.labelLineHeight = parseFloat(lineHeight[1]);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
methods: {
|
|
57
|
-
formatPixelDimension(dimension) {
|
|
58
|
-
return `${dimension}px`;
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
svgWidth: 16,
|
|
62
|
-
svgHeight: 4
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/* script */
|
|
66
|
-
const __vue_script__ = script;
|
|
67
|
-
|
|
68
|
-
/* template */
|
|
69
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-series-label-container"},[(_vm.color.length)?_c('div',{staticClass:"gl-series-label-color"},[_c('svg',{style:(_vm.svgStyles),attrs:{"width":_vm.formatPixelDimension(_vm.$options.svgWidth),"height":_vm.formatPixelDimension(_vm.$options.svgHeight)}},[_c('path',{attrs:{"d":_vm.pathContent}})])]):_vm._e(),_vm._v(" "),_c('div',{ref:"label",staticClass:"gl-series-label-text"},[_vm._t("default")],2)])};
|
|
70
|
-
var __vue_staticRenderFns__ = [];
|
|
71
|
-
|
|
72
|
-
/* style */
|
|
73
|
-
const __vue_inject_styles__ = undefined;
|
|
74
|
-
/* scoped */
|
|
75
|
-
const __vue_scope_id__ = undefined;
|
|
76
|
-
/* module identifier */
|
|
77
|
-
const __vue_module_identifier__ = undefined;
|
|
78
|
-
/* functional template */
|
|
79
|
-
const __vue_is_functional_template__ = false;
|
|
80
|
-
/* style inject */
|
|
81
|
-
|
|
82
|
-
/* style inject SSR */
|
|
83
|
-
|
|
84
|
-
/* style inject shadow dom */
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
89
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
90
|
-
__vue_inject_styles__,
|
|
91
|
-
__vue_script__,
|
|
92
|
-
__vue_scope_id__,
|
|
93
|
-
__vue_is_functional_template__,
|
|
94
|
-
__vue_module_identifier__,
|
|
95
|
-
false,
|
|
96
|
-
undefined,
|
|
97
|
-
undefined,
|
|
98
|
-
undefined
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
export { __vue_component__ as default };
|