@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,54 +0,0 @@
|
|
|
1
|
-
import { BTooltip } from '../../../vendor/bootstrap-vue/src/components/tooltip/tooltip';
|
|
2
|
-
import tooltipMixin from '../../mixins/tooltip_mixin';
|
|
3
|
-
import { getGlTooltipDefaultContainer } from '../../../directives/tooltip/container';
|
|
4
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
-
|
|
6
|
-
const tooltipRefName = 'bvTooltip';
|
|
7
|
-
var script = {
|
|
8
|
-
name: 'GlTooltip',
|
|
9
|
-
components: {
|
|
10
|
-
BTooltip
|
|
11
|
-
},
|
|
12
|
-
mixins: [tooltipMixin(tooltipRefName)],
|
|
13
|
-
inheritAttrs: false,
|
|
14
|
-
tooltipRefName,
|
|
15
|
-
getGlTooltipDefaultContainer
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/* script */
|
|
19
|
-
const __vue_script__ = script;
|
|
20
|
-
|
|
21
|
-
/* template */
|
|
22
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-tooltip',_vm._g(_vm._b({ref:_vm.$options.tooltipRefName,attrs:{"container":_vm.$attrs.container || _vm.$options.getGlTooltipDefaultContainer()}},'b-tooltip',_vm.$attrs,false),_vm.$listeners),[_vm._t("default")],2)};
|
|
23
|
-
var __vue_staticRenderFns__ = [];
|
|
24
|
-
|
|
25
|
-
/* style */
|
|
26
|
-
const __vue_inject_styles__ = undefined;
|
|
27
|
-
/* scoped */
|
|
28
|
-
const __vue_scope_id__ = undefined;
|
|
29
|
-
/* module identifier */
|
|
30
|
-
const __vue_module_identifier__ = undefined;
|
|
31
|
-
/* functional template */
|
|
32
|
-
const __vue_is_functional_template__ = false;
|
|
33
|
-
/* style inject */
|
|
34
|
-
|
|
35
|
-
/* style inject SSR */
|
|
36
|
-
|
|
37
|
-
/* style inject shadow dom */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
42
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
43
|
-
__vue_inject_styles__,
|
|
44
|
-
__vue_script__,
|
|
45
|
-
__vue_scope_id__,
|
|
46
|
-
__vue_is_functional_template__,
|
|
47
|
-
__vue_module_identifier__,
|
|
48
|
-
false,
|
|
49
|
-
undefined,
|
|
50
|
-
undefined,
|
|
51
|
-
undefined
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export { __vue_component__ as default };
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
import { merge } from 'lodash-es';
|
|
2
|
-
import { defaultAreaOpacity, 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
|
-
* Area 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.
|
|
16
|
-
*
|
|
17
|
-
* Similar to how custom tooltips are displayed when area chart
|
|
18
|
-
* is hovered, a tooltip should be displayed when the annotation
|
|
19
|
-
* arrow is hovered. This component adds event listeners
|
|
20
|
-
* to figure out if mouse is hovered on charts to show tooltips.
|
|
21
|
-
* While that works for data points inside the grid, for arrows
|
|
22
|
-
* that live right under the chart, we use eCharts inbuilt
|
|
23
|
-
* event listeners to detect hover. Given this limitation,
|
|
24
|
-
* we use a separate tooltip for data point and arrow.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
var script = {
|
|
28
|
-
name: 'GlAreaChart',
|
|
29
|
-
components: {
|
|
30
|
-
Chart,
|
|
31
|
-
ChartLegend,
|
|
32
|
-
ChartTooltip
|
|
33
|
-
},
|
|
34
|
-
inheritAttrs: false,
|
|
35
|
-
props: {
|
|
36
|
-
data: {
|
|
37
|
-
type: Array,
|
|
38
|
-
required: true
|
|
39
|
-
},
|
|
40
|
-
option: {
|
|
41
|
-
type: Object,
|
|
42
|
-
required: false,
|
|
43
|
-
default: () => ({})
|
|
44
|
-
},
|
|
45
|
-
thresholds: {
|
|
46
|
-
type: Array,
|
|
47
|
-
required: false,
|
|
48
|
-
default: () => []
|
|
49
|
-
},
|
|
50
|
-
annotations: {
|
|
51
|
-
type: Array,
|
|
52
|
-
required: false,
|
|
53
|
-
default: () => []
|
|
54
|
-
},
|
|
55
|
-
includeLegendAvgMax: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
required: false,
|
|
58
|
-
default: true
|
|
59
|
-
},
|
|
60
|
-
formatAnnotationsTooltipText: {
|
|
61
|
-
type: Function,
|
|
62
|
-
required: false,
|
|
63
|
-
default: null
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* Callback called when showing or refreshing a tooltip.
|
|
67
|
-
* **Deprecated:** Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
68
|
-
*
|
|
69
|
-
* @deprecated Use slots `#tooltip-title`, `#tooltip-content` or `#tooltip-value`.
|
|
70
|
-
*/
|
|
71
|
-
formatTooltipText: {
|
|
72
|
-
type: Function,
|
|
73
|
-
required: false,
|
|
74
|
-
default: null
|
|
75
|
-
},
|
|
76
|
-
legendAverageText: {
|
|
77
|
-
type: String,
|
|
78
|
-
required: false,
|
|
79
|
-
default: LEGEND_AVERAGE_TEXT
|
|
80
|
-
},
|
|
81
|
-
legendMaxText: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: false,
|
|
84
|
-
default: LEGEND_MAX_TEXT
|
|
85
|
-
},
|
|
86
|
-
legendMinText: {
|
|
87
|
-
type: String,
|
|
88
|
-
required: false,
|
|
89
|
-
default: LEGEND_MIN_TEXT
|
|
90
|
-
},
|
|
91
|
-
legendCurrentText: {
|
|
92
|
-
type: String,
|
|
93
|
-
required: false,
|
|
94
|
-
default: LEGEND_CURRENT_TEXT
|
|
95
|
-
},
|
|
96
|
-
legendLayout: {
|
|
97
|
-
type: String,
|
|
98
|
-
required: false,
|
|
99
|
-
default: LEGEND_LAYOUT_INLINE,
|
|
100
|
-
validator(layout) {
|
|
101
|
-
return [LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE].indexOf(layout) !== -1;
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
106
|
-
*/
|
|
107
|
-
height: {
|
|
108
|
-
type: [Number, String],
|
|
109
|
-
required: false,
|
|
110
|
-
default: null
|
|
111
|
-
},
|
|
112
|
-
legendSeriesInfo: {
|
|
113
|
-
type: Array,
|
|
114
|
-
required: false,
|
|
115
|
-
default: () => []
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
data() {
|
|
119
|
-
// Part of the tooltip related data can be
|
|
120
|
-
// moved into the tooltip component.
|
|
121
|
-
// Tracking that progress in
|
|
122
|
-
// https://gitlab.com/gitlab-org/gitlab-ui/-/issues/618
|
|
123
|
-
return {
|
|
124
|
-
chart: null,
|
|
125
|
-
compiledOptions: null,
|
|
126
|
-
showAnnotationsTooltip: false,
|
|
127
|
-
annotationsTooltipTitle: '',
|
|
128
|
-
annotationsTooltipContent: '',
|
|
129
|
-
annotationsTooltipPosition: {
|
|
130
|
-
left: '0',
|
|
131
|
-
top: '0'
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
},
|
|
135
|
-
computed: {
|
|
136
|
-
series() {
|
|
137
|
-
const dataSeries = this.data.map((series, index) => {
|
|
138
|
-
const defaultColor = colorFromDefaultPalette(index);
|
|
139
|
-
const getColor = type => series[type] && series[type].color ? series[type].color : defaultColor;
|
|
140
|
-
return merge({
|
|
141
|
-
areaStyle: {
|
|
142
|
-
opacity: defaultAreaOpacity,
|
|
143
|
-
color: getColor('areaStyle')
|
|
144
|
-
},
|
|
145
|
-
showSymbol: false,
|
|
146
|
-
lineStyle: {
|
|
147
|
-
color: getColor('lineStyle')
|
|
148
|
-
},
|
|
149
|
-
itemStyle: {
|
|
150
|
-
color: getColor('itemStyle')
|
|
151
|
-
}
|
|
152
|
-
}, lineStyle, series, getThresholdConfig(this.thresholds));
|
|
153
|
-
});
|
|
154
|
-
// if annotation series exists, append it
|
|
155
|
-
// along with data series
|
|
156
|
-
if (this.annotationSeries) {
|
|
157
|
-
return [...dataSeries, this.annotationSeries];
|
|
158
|
-
}
|
|
159
|
-
return dataSeries;
|
|
160
|
-
},
|
|
161
|
-
annotationSeries() {
|
|
162
|
-
return generateAnnotationSeries(this.annotations);
|
|
163
|
-
},
|
|
164
|
-
options() {
|
|
165
|
-
const areaChartOptions = {
|
|
166
|
-
yAxis: {
|
|
167
|
-
axisTick: {
|
|
168
|
-
show: false
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// `formatTooltipText` is deprecated, these added options should be
|
|
174
|
-
// removed when `formatTooltipText` is removed.
|
|
175
|
-
const deprecatedTooltipFormatterOptions = {
|
|
176
|
-
xAxis: {
|
|
177
|
-
axisPointer: {
|
|
178
|
-
show: true,
|
|
179
|
-
label: {
|
|
180
|
-
formatter: this.formatTooltipText
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
const mergedOptions = merge({}, defaultChartOptions, areaChartOptions, this.formatTooltipText ? deprecatedTooltipFormatterOptions : {}, this.option, dataZoomAdjustments(this.option.dataZoom));
|
|
186
|
-
// All chart options can be merged but series
|
|
187
|
-
// needs to be handled specially.
|
|
188
|
-
return mergeSeriesToOptions(mergeAnnotationAxisToOptions(mergedOptions, this.hasAnnotations), this.series);
|
|
189
|
-
},
|
|
190
|
-
/**
|
|
191
|
-
* Annotations currently are passed as series options in monitoring dashboard.
|
|
192
|
-
* Once https://gitlab.com/gitlab-org/gitlab/-/issues/213390 is closed,
|
|
193
|
-
* annotations will be passed as props and not as series options.
|
|
194
|
-
*
|
|
195
|
-
* For backward compatibility, we're having to check for both.
|
|
196
|
-
*/
|
|
197
|
-
hasAnnotations() {
|
|
198
|
-
return this.annotations.length !== 0 || seriesHasAnnotations(this.option.series);
|
|
199
|
-
},
|
|
200
|
-
shouldShowAnnotationsTooltip() {
|
|
201
|
-
return this.chart && this.hasAnnotations;
|
|
202
|
-
},
|
|
203
|
-
legendStyle() {
|
|
204
|
-
return {
|
|
205
|
-
paddingLeft: `${grid.left}px`
|
|
206
|
-
};
|
|
207
|
-
},
|
|
208
|
-
seriesInfo() {
|
|
209
|
-
var _this$compiledOptions;
|
|
210
|
-
if (this.legendSeriesInfo.length > 0) return this.legendSeriesInfo;
|
|
211
|
-
const compiledSeries = ((_this$compiledOptions = this.compiledOptions) === null || _this$compiledOptions === void 0 ? void 0 : _this$compiledOptions.series) || [];
|
|
212
|
-
return compiledSeries.reduce((acc, series, index) => {
|
|
213
|
-
if (series.type === 'line') {
|
|
214
|
-
var _series$data;
|
|
215
|
-
acc.push({
|
|
216
|
-
name: series.name,
|
|
217
|
-
type: series.lineStyle.type,
|
|
218
|
-
color: series.lineStyle.color || colorFromDefaultPalette(index),
|
|
219
|
-
data: this.includeLegendAvgMax ? (_series$data = series.data) === null || _series$data === void 0 ? void 0 : _series$data.map(data => data[1]) : undefined
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
return acc;
|
|
223
|
-
}, []);
|
|
224
|
-
},
|
|
225
|
-
autoHeight() {
|
|
226
|
-
return this.height === 'auto';
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
beforeDestroy() {
|
|
230
|
-
this.chart.off('mouseout', this.hideAnnotationsTooltip);
|
|
231
|
-
this.chart.off('mouseover', this.onChartMouseOver);
|
|
232
|
-
},
|
|
233
|
-
methods: {
|
|
234
|
-
defaultAnnotationTooltipText(params) {
|
|
235
|
-
var _params$data$tooltipD;
|
|
236
|
-
return {
|
|
237
|
-
title: params.data.xAxis,
|
|
238
|
-
content: (_params$data$tooltipD = params.data.tooltipData) === null || _params$data$tooltipD === void 0 ? void 0 : _params$data$tooltipD.content
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
onCreated(chart) {
|
|
242
|
-
// eCharts inbuild mouse events
|
|
243
|
-
// https://echarts.apache.org/en/api.html#events.Mouse%20events
|
|
244
|
-
// is used to attach listeners to markPoints. These listeners
|
|
245
|
-
// are currently used for annotation arrows at the bottom of the chart.
|
|
246
|
-
|
|
247
|
-
// Because data points and annotations arrows are in different
|
|
248
|
-
// sections of the charts with their own mouseovers and mouseouts,
|
|
249
|
-
// there shouldn't be an overlapping situation where both tooltips
|
|
250
|
-
// are visible.
|
|
251
|
-
if (this.hasAnnotations) {
|
|
252
|
-
chart.on('mouseout', this.onChartDataPointMouseOut);
|
|
253
|
-
chart.on('mouseover', this.onChartDataPointMouseOver);
|
|
254
|
-
}
|
|
255
|
-
this.chart = chart;
|
|
256
|
-
this.$emit('created', chart);
|
|
257
|
-
},
|
|
258
|
-
onUpdated() {
|
|
259
|
-
this.compiledOptions = this.chart.getOption();
|
|
260
|
-
},
|
|
261
|
-
onChartDataPointMouseOut() {
|
|
262
|
-
this.showAnnotationsTooltip = false;
|
|
263
|
-
},
|
|
264
|
-
/**
|
|
265
|
-
* Check if the hovered data point is an annotation
|
|
266
|
-
* point to show the annotation tooltip.
|
|
267
|
-
*/
|
|
268
|
-
onChartDataPointMouseOver(params) {
|
|
269
|
-
if (isDataPointAnnotation(params)) {
|
|
270
|
-
const {
|
|
271
|
-
event
|
|
272
|
-
} = params;
|
|
273
|
-
const toolTipFormatter = this.formatAnnotationsTooltipText || this.defaultAnnotationTooltipText;
|
|
274
|
-
const {
|
|
275
|
-
title = '',
|
|
276
|
-
content = ''
|
|
277
|
-
} = toolTipFormatter(params);
|
|
278
|
-
this.showAnnotationsTooltip = true;
|
|
279
|
-
this.annotationsTooltipTitle = title;
|
|
280
|
-
this.annotationsTooltipContent = content;
|
|
281
|
-
this.annotationsTooltipPosition = {
|
|
282
|
-
left: `${event.event.zrX}px`,
|
|
283
|
-
top: `${event.event.zrY}px`
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
HEIGHT_AUTO_CLASSES
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
/* script */
|
|
292
|
-
const __vue_script__ = script;
|
|
293
|
-
|
|
294
|
-
/* template */
|
|
295
|
-
var __vue_render__ = function () {
|
|
296
|
-
var _obj;
|
|
297
|
-
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,"top":_vm.annotationsTooltipPosition.top,"left":_vm.annotationsTooltipPosition.left,"chart":_vm.chart,"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},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.compiledOptions)?_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)};
|
|
298
|
-
var __vue_staticRenderFns__ = [];
|
|
299
|
-
|
|
300
|
-
/* style */
|
|
301
|
-
const __vue_inject_styles__ = undefined;
|
|
302
|
-
/* scoped */
|
|
303
|
-
const __vue_scope_id__ = undefined;
|
|
304
|
-
/* module identifier */
|
|
305
|
-
const __vue_module_identifier__ = undefined;
|
|
306
|
-
/* functional template */
|
|
307
|
-
const __vue_is_functional_template__ = false;
|
|
308
|
-
/* style inject */
|
|
309
|
-
|
|
310
|
-
/* style inject SSR */
|
|
311
|
-
|
|
312
|
-
/* style inject shadow dom */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
317
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
318
|
-
__vue_inject_styles__,
|
|
319
|
-
__vue_script__,
|
|
320
|
-
__vue_scope_id__,
|
|
321
|
-
__vue_is_functional_template__,
|
|
322
|
-
__vue_module_identifier__,
|
|
323
|
-
false,
|
|
324
|
-
undefined,
|
|
325
|
-
undefined,
|
|
326
|
-
undefined
|
|
327
|
-
);
|
|
328
|
-
|
|
329
|
-
export { __vue_component__ as default };
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { merge, truncate } from 'lodash-es';
|
|
2
|
-
import { dataZoomAdjustments, mergeSeriesToOptions, grid } from '../../../utils/charts/config';
|
|
3
|
-
import { CHART_DEFAULT_SERIES_STACK, HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
4
|
-
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
|
-
import { engineeringNotation } from '../../../utils/number_utils';
|
|
6
|
-
import { hexToRgba } from '../../../utils/utils';
|
|
7
|
-
import Chart from '../chart/chart';
|
|
8
|
-
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
9
|
-
import { stackedPresentationOptions } from '../../../utils/constants';
|
|
10
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* `nameGap` in charts/config is set to 50 but it is not
|
|
14
|
-
* used for bar charts as the axes are flipped. That is why
|
|
15
|
-
* we're explicitly setting it here
|
|
16
|
-
*/
|
|
17
|
-
const DEFAULT_NAME_GAP = 50;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* This is the magic number at which the y-axis name
|
|
21
|
-
* and y-axis labels don't overlap
|
|
22
|
-
* @Number
|
|
23
|
-
*/
|
|
24
|
-
const AXIS_LABEL_LENGTH = 7;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Because the axes are reversed in bar charts defaultChartOptions
|
|
28
|
-
* xAxis and yAxis needs to be handled specifically.
|
|
29
|
-
*/
|
|
30
|
-
const defaultOptions = {
|
|
31
|
-
grid,
|
|
32
|
-
xAxis: {
|
|
33
|
-
nameLocation: 'center',
|
|
34
|
-
axisLabel: {
|
|
35
|
-
formatter: num => engineeringNotation(num, 2)
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
yAxis: {
|
|
39
|
-
nameGap: DEFAULT_NAME_GAP,
|
|
40
|
-
boundaryGap: true,
|
|
41
|
-
nameLocation: 'center',
|
|
42
|
-
splitLine: {
|
|
43
|
-
show: false
|
|
44
|
-
},
|
|
45
|
-
axisLabel: {
|
|
46
|
-
interval: 0,
|
|
47
|
-
formatter: str => truncate(str, {
|
|
48
|
-
length: AXIS_LABEL_LENGTH,
|
|
49
|
-
separator: '...'
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
legend: {
|
|
54
|
-
show: false
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var script = {
|
|
58
|
-
name: 'GlBarChart',
|
|
59
|
-
components: {
|
|
60
|
-
Chart,
|
|
61
|
-
ChartTooltip
|
|
62
|
-
},
|
|
63
|
-
inheritAttrs: false,
|
|
64
|
-
props: {
|
|
65
|
-
data: {
|
|
66
|
-
type: Object,
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
option: {
|
|
70
|
-
type: Object,
|
|
71
|
-
required: false,
|
|
72
|
-
default: () => ({})
|
|
73
|
-
},
|
|
74
|
-
yAxisTitle: {
|
|
75
|
-
type: String,
|
|
76
|
-
required: true
|
|
77
|
-
},
|
|
78
|
-
xAxisTitle: {
|
|
79
|
-
type: String,
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
xAxisType: {
|
|
83
|
-
type: String,
|
|
84
|
-
required: false,
|
|
85
|
-
default: 'value'
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
89
|
-
*/
|
|
90
|
-
height: {
|
|
91
|
-
type: [Number, String],
|
|
92
|
-
required: false,
|
|
93
|
-
default: null
|
|
94
|
-
},
|
|
95
|
-
/**
|
|
96
|
-
* Controls how multiple series data are displayed in the chart –
|
|
97
|
-
* `stacked` stacks series horizontally, and
|
|
98
|
-
* `tiled` displays series as grouped bars.
|
|
99
|
-
*/
|
|
100
|
-
presentation: {
|
|
101
|
-
type: String,
|
|
102
|
-
required: false,
|
|
103
|
-
default: stackedPresentationOptions.stacked,
|
|
104
|
-
validator: value => Object.values(stackedPresentationOptions).includes(value)
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
data() {
|
|
108
|
-
return {
|
|
109
|
-
chart: null
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
computed: {
|
|
113
|
-
series() {
|
|
114
|
-
return Object.keys(this.data).map((key, index) => {
|
|
115
|
-
const barColor = colorFromDefaultPalette(index);
|
|
116
|
-
return {
|
|
117
|
-
name: key,
|
|
118
|
-
data: this.data[key],
|
|
119
|
-
type: 'bar',
|
|
120
|
-
stack: this.presentation === stackedPresentationOptions.tiled ? null : CHART_DEFAULT_SERIES_STACK,
|
|
121
|
-
itemStyle: {
|
|
122
|
-
color: hexToRgba(barColor, 0.2),
|
|
123
|
-
borderColor: barColor,
|
|
124
|
-
borderWidth: 1
|
|
125
|
-
},
|
|
126
|
-
emphasis: {
|
|
127
|
-
itemStyle: {
|
|
128
|
-
color: hexToRgba(barColor, 0.4)
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
barMaxWidth: '50%'
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
options() {
|
|
136
|
-
const mergedOptions = merge({}, defaultOptions, {
|
|
137
|
-
xAxis: {
|
|
138
|
-
axisLine: {
|
|
139
|
-
show: false
|
|
140
|
-
},
|
|
141
|
-
name: this.xAxisTitle,
|
|
142
|
-
type: this.xAxisType
|
|
143
|
-
},
|
|
144
|
-
yAxis: {
|
|
145
|
-
name: this.yAxisTitle,
|
|
146
|
-
type: 'category',
|
|
147
|
-
axisTick: {
|
|
148
|
-
show: true
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, this.option, dataZoomAdjustments(this.option.dataZoom));
|
|
152
|
-
// All chart options can be merged but series
|
|
153
|
-
// needs to be handled specially
|
|
154
|
-
return mergeSeriesToOptions(mergedOptions, this.series);
|
|
155
|
-
},
|
|
156
|
-
autoHeight() {
|
|
157
|
-
return this.height === 'auto';
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
methods: {
|
|
161
|
-
onCreated(chart) {
|
|
162
|
-
this.chart = chart;
|
|
163
|
-
this.$emit('created', chart);
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
HEIGHT_AUTO_CLASSES
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
/* script */
|
|
170
|
-
const __vue_script__ = script;
|
|
171
|
-
|
|
172
|
-
/* template */
|
|
173
|
-
var __vue_render__ = function () {
|
|
174
|
-
var _obj;
|
|
175
|
-
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}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"use-default-tooltip-formatter":true,"dimension-axis":"yAxis"},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()],1)};
|
|
176
|
-
var __vue_staticRenderFns__ = [];
|
|
177
|
-
|
|
178
|
-
/* style */
|
|
179
|
-
const __vue_inject_styles__ = undefined;
|
|
180
|
-
/* scoped */
|
|
181
|
-
const __vue_scope_id__ = undefined;
|
|
182
|
-
/* module identifier */
|
|
183
|
-
const __vue_module_identifier__ = undefined;
|
|
184
|
-
/* functional template */
|
|
185
|
-
const __vue_is_functional_template__ = false;
|
|
186
|
-
/* style inject */
|
|
187
|
-
|
|
188
|
-
/* style inject SSR */
|
|
189
|
-
|
|
190
|
-
/* style inject shadow dom */
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
195
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
196
|
-
__vue_inject_styles__,
|
|
197
|
-
__vue_script__,
|
|
198
|
-
__vue_scope_id__,
|
|
199
|
-
__vue_is_functional_template__,
|
|
200
|
-
__vue_module_identifier__,
|
|
201
|
-
false,
|
|
202
|
-
undefined,
|
|
203
|
-
undefined,
|
|
204
|
-
undefined
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
export { __vue_component__ as default };
|