@gitlab/ui 132.0.0 → 132.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts.js +13 -0
- package/dist/components/base/accordion/accordion.js +69 -0
- package/dist/components/base/accordion/accordion_item.js +160 -0
- package/dist/components/base/accordion/constants.js +3 -0
- package/dist/components/base/alert/alert.js +263 -0
- package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_duo_chat_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_loader_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_notifications_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_sidebar_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_smile_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_sort_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_star_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_todo_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_upload_icon.js +45 -0
- package/dist/components/base/animated_icon/base_animated_icon.js +77 -0
- package/dist/components/base/attribute_list/attribute_list.js +100 -0
- package/dist/components/base/avatar/avatar.js +175 -0
- package/dist/components/base/avatar/utils.js +17 -0
- package/dist/components/base/avatar_labeled/avatar_labeled.js +198 -0
- package/dist/components/base/avatar_link/avatar_link.js +47 -0
- package/dist/components/base/avatars_inline/avatars_inline.js +139 -0
- package/dist/components/base/badge/badge.js +197 -0
- package/dist/components/base/banner/banner.js +149 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +282 -0
- package/dist/components/base/breadcrumb/breadcrumb_item.js +96 -0
- package/dist/components/base/broadcast_message/broadcast_message.js +113 -0
- package/dist/components/base/broadcast_message/constants.js +5 -0
- package/dist/components/base/button/button.js +419 -0
- package/dist/components/base/button_group/button_group.js +53 -0
- package/dist/components/base/card/card.js +69 -0
- package/dist/components/base/collapse/collapse.js +163 -0
- package/dist/components/base/color_mode_toggle/color_mode_toggle.js +92 -0
- package/dist/components/base/datepicker/datepicker.js +475 -0
- package/dist/components/base/daterange_picker/daterange_picker.js +394 -0
- package/dist/components/base/drawer/drawer.js +156 -0
- package/dist/components/base/dropdown/dropdown.js +330 -0
- package/dist/components/base/dropdown/dropdown_divider.js +48 -0
- package/dist/components/base/dropdown/dropdown_form.js +48 -0
- package/dist/components/base/dropdown/dropdown_item.js +175 -0
- package/dist/components/base/dropdown/dropdown_section_header.js +48 -0
- package/dist/components/base/dropdown/dropdown_text.js +48 -0
- package/dist/components/base/filtered_search/common_story_options.js +14 -0
- package/dist/components/base/filtered_search/filtered_search.js +428 -0
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +95 -0
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +139 -0
- package/dist/components/base/filtered_search/filtered_search_term.js +217 -0
- package/dist/components/base/filtered_search/filtered_search_token.js +383 -0
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +444 -0
- package/dist/components/base/filtered_search/filtered_search_utils.js +241 -0
- package/dist/components/base/form/form.js +43 -0
- package/dist/components/base/form/form_character_count/form_character_count.js +107 -0
- package/dist/components/base/form/form_checkbox/form_checkbox.js +342 -0
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +188 -0
- package/dist/components/base/form/form_combobox/constants.js +55 -0
- package/dist/components/base/form/form_combobox/form_combobox.js +239 -0
- package/dist/components/base/form/form_date/form_date.js +143 -0
- package/dist/components/base/form/form_fields/form_field_validator.js +93 -0
- package/dist/components/base/form/form_fields/form_fields.js +289 -0
- package/dist/components/base/form/form_fields/form_fields_loop.js +75 -0
- package/dist/components/base/form/form_fields/mappers.js +13 -0
- package/dist/components/base/form/form_fields/validators.js +48 -0
- package/dist/components/base/form/form_group/form_group.js +119 -0
- package/dist/components/base/form/form_input/form_input.js +695 -0
- package/dist/components/base/form/form_input_group/form_input_group.js +120 -0
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +41 -0
- package/dist/components/base/form/form_radio/form_radio.js +259 -0
- package/dist/components/base/form/form_radio_group/form_radio_group.js +189 -0
- package/dist/components/base/form/form_select/constants.js +12 -0
- package/dist/components/base/form/form_select/form_select.js +96 -0
- package/dist/components/base/form/form_textarea/form_textarea.js +166 -0
- package/dist/components/base/form/input_group_text/input_group_text.js +43 -0
- package/dist/components/base/icon/icon.js +113 -0
- package/dist/components/base/illustration/illustration.js +80 -0
- package/dist/components/base/infinite_scroll/infinite_scroll.js +196 -0
- package/dist/components/base/keyset_pagination/keyset_pagination.js +152 -0
- package/dist/components/base/label/label.js +174 -0
- package/dist/components/base/link/link.js +330 -0
- package/dist/components/base/loading_icon/loading_icon.js +120 -0
- package/dist/components/base/markdown/markdown.js +50 -0
- package/dist/components/base/modal/modal.js +259 -0
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +716 -0
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +5 -0
- package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +32 -0
- package/dist/components/base/new_dropdowns/constants.js +24 -0
- package/dist/components/base/new_dropdowns/disclosure/constants.js +8 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +400 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +112 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +196 -0
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +168 -0
- package/dist/components/base/new_dropdowns/disclosure/utils.js +84 -0
- package/dist/components/base/new_dropdowns/listbox/listbox.js +997 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +58 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +112 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +94 -0
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +131 -0
- package/dist/components/base/new_dropdowns/listbox/utils.js +33 -0
- package/dist/components/base/pagination/pagination.js +397 -0
- package/dist/components/base/path/data.js +34 -0
- package/dist/components/base/path/path.js +177 -0
- package/dist/components/base/popover/popover.js +142 -0
- package/dist/components/base/progress_bar/progress_bar.js +117 -0
- package/dist/components/base/search_box_by_click/search_box_by_click.js +245 -0
- package/dist/components/base/search_box_by_type/search_box_by_type.js +187 -0
- package/dist/components/base/segmented_control/segmented_control.js +73 -0
- package/dist/components/base/skeleton_loader/skeleton_loader.js +232 -0
- package/dist/components/base/sorting/sorting.js +180 -0
- package/dist/components/base/table/constants.js +5 -0
- package/dist/components/base/table/table.js +187 -0
- package/dist/components/base/table_lite/table_lite.js +80 -0
- package/dist/components/base/tabs/constants.js +3 -0
- package/dist/components/base/tabs/tab/tab.js +113 -0
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +162 -0
- package/dist/components/base/tabs/tabs/tabs.js +223 -0
- package/dist/components/base/toast/index.js +66 -0
- package/dist/components/base/toast/toast.js +125 -0
- package/dist/components/base/toast/toaster.js +87 -0
- package/dist/components/base/toggle/toggle.js +178 -0
- package/dist/components/base/token/token.js +97 -0
- package/dist/components/base/token_selector/helpers.js +5 -0
- package/dist/components/base/token_selector/token_container.js +160 -0
- package/dist/components/base/token_selector/token_selector.js +454 -0
- package/dist/components/base/token_selector/token_selector_dropdown.js +223 -0
- package/dist/components/base/tooltip/tooltip.js +54 -0
- package/dist/components/charts/area/area.js +329 -0
- package/dist/components/charts/bar/bar.js +207 -0
- package/dist/components/charts/chart/chart.js +215 -0
- package/dist/components/charts/column/column.js +221 -0
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +199 -0
- package/dist/components/charts/gauge/gauge.js +205 -0
- package/dist/components/charts/heatmap/heatmap.js +299 -0
- package/dist/components/charts/heatmap/index.js +2 -0
- package/dist/components/charts/legend/legend.js +245 -0
- package/dist/components/charts/line/line.js +340 -0
- package/dist/components/charts/series_label/series_label.js +101 -0
- package/dist/components/charts/shared/tooltip/tooltip.js +369 -0
- package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +53 -0
- package/dist/components/charts/single_stat/single_stat.js +164 -0
- package/dist/components/charts/sparkline/sparkline.js +299 -0
- package/dist/components/charts/stacked_column/stacked_column.js +380 -0
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +125 -0
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +326 -0
- package/dist/components/dashboards/dashboard_layout/validators.js +14 -0
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +236 -0
- package/dist/components/dashboards/mock_data.js +49 -0
- package/dist/components/experimental/experiment_badge/constants.js +4 -0
- package/dist/components/experimental/experiment_badge/experiment_badge.js +102 -0
- package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +87 -0
- package/dist/components/index.js +107 -0
- package/dist/components/mixins/button_mixin.js +11 -0
- package/dist/components/mixins/safe_link_mixin.js +30 -0
- package/dist/components/mixins/tooltip_mixin.js +21 -0
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +53 -0
- package/dist/components/regions/empty_state/empty_state.js +181 -0
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +64 -0
- package/dist/components/shared_components/clipboard_button/clipboard_button.js +100 -0
- package/dist/components/shared_components/close_button/close_button.js +55 -0
- package/dist/components/utilities/animated_number/animated_number.js +131 -0
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +75 -0
- package/dist/components/utilities/intersection_observer/intersection_observer.js +88 -0
- package/dist/components/utilities/intersperse/intersperse.js +104 -0
- package/dist/components/utilities/sprintf/sprintf.js +171 -0
- package/dist/components/utilities/truncate/constants.js +8 -0
- package/dist/components/utilities/truncate/truncate.js +154 -0
- package/dist/components/utilities/truncate_text/constants.js +7 -0
- package/dist/components/utilities/truncate_text/truncate_text.js +146 -0
- package/dist/config.js +53 -0
- package/dist/directives/hover_load/hover_load.js +45 -0
- package/dist/directives/index.js +8 -0
- package/dist/directives/modal.js +1 -0
- package/dist/directives/outside/outside.js +149 -0
- package/dist/directives/resize_observer/resize_observer.js +58 -0
- package/dist/directives/safe_html/constants.js +6 -0
- package/dist/directives/safe_html/safe_html.js +39 -0
- package/dist/directives/safe_link/mock_data.js +10 -0
- package/dist/directives/safe_link/safe_link.js +67 -0
- package/dist/directives/tooltip/container.js +7 -0
- package/dist/directives/tooltip/tooltip.js +18 -0
- package/dist/index.css +7 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +2 -0
- package/dist/tailwind.css +2 -0
- package/dist/tailwind.css.map +1 -0
- package/dist/tokens/build/js/tokens.dark.js +1410 -0
- package/dist/tokens/build/js/tokens.js +1410 -0
- package/dist/tokens/common_story_options.js +29 -0
- package/dist/tokens/tokens_story.js +76 -0
- package/dist/utils/breakpoints.js +20 -0
- package/dist/utils/charts/config.js +616 -0
- package/dist/utils/charts/constants.js +69 -0
- package/dist/utils/charts/mock_data.js +191 -0
- package/dist/utils/charts/story_config.js +24 -0
- package/dist/utils/charts/theme.js +200 -0
- package/dist/utils/charts/utils.js +54 -0
- package/dist/utils/constants.js +331 -0
- package/dist/utils/data_utils.js +19 -0
- package/dist/utils/datetime_utility.js +61 -0
- package/dist/utils/equality_utils.js +84 -0
- package/dist/utils/form_options_utils.js +46 -0
- package/dist/utils/i18n.js +65 -0
- package/dist/utils/is_slot_empty.js +34 -0
- package/dist/utils/number_utils.js +132 -0
- package/dist/utils/play_utils.js +11 -0
- package/dist/utils/set_utils.js +25 -0
- package/dist/utils/stories_constants.js +29 -0
- package/dist/utils/stories_utils.js +62 -0
- package/dist/utils/story_decorators/container.js +19 -0
- package/dist/utils/string_utils.js +69 -0
- package/dist/utils/svgs/svg_paths.js +7 -0
- package/dist/utils/test_utils.js +33 -0
- package/dist/utils/use_fake_date.js +29 -0
- package/dist/utils/use_mock_intersection_observer.js +105 -0
- package/dist/utils/utils.js +205 -0
- package/dist/utils/vue_utils.js +57 -0
- package/dist/utils.js +5 -0
- package/dist/vendor/bootstrap-vue/src/bv-config.js +8 -0
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +81 -0
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +204 -0
- package/dist/vendor/bootstrap-vue/src/components/button/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +41 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +52 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +75 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +52 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +85 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +97 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +60 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +270 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +8 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +53 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +55 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +53 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +56 -0
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +4 -0
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +347 -0
- package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +54 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +41 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +143 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +56 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +3 -0
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +217 -0
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +155 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +34 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/link/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +283 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +21 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +212 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +1059 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +55 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +31 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +49 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +22 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +64 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +40 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +43 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +83 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +50 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +32 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +82 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +292 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +154 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +44 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +191 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +213 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +274 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +39 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +186 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +338 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +243 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +50 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +218 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +42 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +86 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +31 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +11 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +14 -0
- package/dist/vendor/bootstrap-vue/src/components/table/index.js +9 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +51 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +44 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +67 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +116 -0
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +204 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +96 -0
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +26 -0
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +99 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +121 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +238 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +690 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +251 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +118 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +932 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +337 -0
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +103 -0
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +205 -0
- package/dist/vendor/bootstrap-vue/src/constants/components.js +55 -0
- package/dist/vendor/bootstrap-vue/src/constants/config.js +11 -0
- package/dist/vendor/bootstrap-vue/src/constants/env.js +36 -0
- package/dist/vendor/bootstrap-vue/src/constants/events.js +56 -0
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +11 -0
- package/dist/vendor/bootstrap-vue/src/constants/popper.js +10 -0
- package/dist/vendor/bootstrap-vue/src/constants/props.js +24 -0
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +35 -0
- package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +15 -0
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +36 -0
- package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +112 -0
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +267 -0
- package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +187 -0
- package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +5 -0
- package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +54 -0
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +470 -0
- package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +46 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +73 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +26 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +91 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +26 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +50 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +293 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +50 -0
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +29 -0
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +57 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +120 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +25 -0
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +10 -0
- package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +30 -0
- package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +18 -0
- package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/array.js +27 -0
- package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +60 -0
- package/dist/vendor/bootstrap-vue/src/utils/cache.js +60 -0
- package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +18 -0
- package/dist/vendor/bootstrap-vue/src/utils/config-set.js +86 -0
- package/dist/vendor/bootstrap-vue/src/utils/config.js +71 -0
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +133 -0
- package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +70 -0
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +298 -0
- package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +28 -0
- package/dist/vendor/bootstrap-vue/src/utils/env.js +16 -0
- package/dist/vendor/bootstrap-vue/src/utils/events.js +78 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +5 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +9 -0
- package/dist/vendor/bootstrap-vue/src/utils/get.js +63 -0
- package/dist/vendor/bootstrap-vue/src/utils/html.js +16 -0
- package/dist/vendor/bootstrap-vue/src/utils/identity.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +35 -0
- package/dist/vendor/bootstrap-vue/src/utils/locale.js +18 -0
- package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +59 -0
- package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +13 -0
- package/dist/vendor/bootstrap-vue/src/utils/math.js +9 -0
- package/dist/vendor/bootstrap-vue/src/utils/memoize.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/model.js +33 -0
- package/dist/vendor/bootstrap-vue/src/utils/noop.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +51 -0
- package/dist/vendor/bootstrap-vue/src/utils/number.js +23 -0
- package/dist/vendor/bootstrap-vue/src/utils/object.js +72 -0
- package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +76 -0
- package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +22 -0
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +124 -0
- package/dist/vendor/bootstrap-vue/src/utils/props.js +67 -0
- package/dist/vendor/bootstrap-vue/src/utils/router.js +150 -0
- package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +28 -0
- package/dist/vendor/bootstrap-vue/src/utils/string.js +47 -0
- package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +31 -0
- package/dist/vendor/bootstrap-vue/src/utils/warn.js +45 -0
- package/dist/vendor/bootstrap-vue/src/vue.js +55 -0
- package/package.json +6 -5
- package/src/components/base/link/link.vue +5 -8
- package/src/utils/constants.js +0 -3
- package/src/utils/vue_utils.js +56 -0
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/layout/col.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/modal/modal.js +219 -52
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +30 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +3 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +4 -4
- package/src/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +8 -9
- package/src/vendor/bootstrap-vue/src/constants/config.js +2 -2
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +1 -1
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.js +1 -2
- package/src/vendor/bootstrap-vue/src/utils/array.js +0 -1
- package/src/vendor/bootstrap-vue/src/utils/locale.js +1 -2
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import * as echarts from 'echarts';
|
|
2
|
+
import { merge } from 'lodash-es';
|
|
3
|
+
import { validRenderers, toolboxHeight, defaultWidth, defaultHeight } from '../../../utils/charts/config';
|
|
4
|
+
import { themeName, createTheme } from '../../../utils/charts/theme';
|
|
5
|
+
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
6
|
+
import { debounceByAnimationFrame } from '../../../utils/utils';
|
|
7
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Allowed values by eCharts
|
|
11
|
+
* https://echarts.apache.org/en/api.html#echartsInstance.resize
|
|
12
|
+
*/
|
|
13
|
+
const sizeValidator = size => Number.isFinite(size) || size === 'auto' || size == null;
|
|
14
|
+
var script = {
|
|
15
|
+
name: 'GlChart',
|
|
16
|
+
directives: {
|
|
17
|
+
resizeObserver: GlResizeObserverDirective
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
/**
|
|
21
|
+
* The ECharts configuration object.
|
|
22
|
+
* https://echarts.apache.org/en/option.html#title
|
|
23
|
+
*/
|
|
24
|
+
options: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
width: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
required: false,
|
|
31
|
+
default: null,
|
|
32
|
+
validator: sizeValidator
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
36
|
+
*/
|
|
37
|
+
height: {
|
|
38
|
+
type: [Number, String],
|
|
39
|
+
required: false,
|
|
40
|
+
default: null,
|
|
41
|
+
validator: sizeValidator
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* An ECharts group id. Used to connect multiple charts.
|
|
45
|
+
* https://echarts.apache.org/en/api.html#echarts.connect
|
|
46
|
+
*/
|
|
47
|
+
groupId: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: false,
|
|
50
|
+
default: ''
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* How the chart should be rendered. Valid options are 'canvas' or 'svg'.
|
|
54
|
+
* https://echarts.apache.org/handbook/en/best-practices/canvas-vs-svg/
|
|
55
|
+
*/
|
|
56
|
+
renderer: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: false,
|
|
59
|
+
default: 'svg',
|
|
60
|
+
validator(renderer) {
|
|
61
|
+
return validRenderers.includes(renderer);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
responsive: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
required: false,
|
|
67
|
+
default: true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
chart: null,
|
|
73
|
+
debouncedHandleResize: debounceByAnimationFrame(this.handleResize)
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
modifiedOptions() {
|
|
78
|
+
var _options$aria, _options$toolbox;
|
|
79
|
+
let options = {
|
|
80
|
+
...this.options
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Enable aria by default
|
|
84
|
+
if (((_options$aria = options.aria) === null || _options$aria === void 0 ? void 0 : _options$aria.enabled) === undefined) {
|
|
85
|
+
options = merge({}, options, {
|
|
86
|
+
aria: {
|
|
87
|
+
enabled: true
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Add space at the top to fit the toolbox
|
|
93
|
+
if (((_options$toolbox = options.toolbox) === null || _options$toolbox === void 0 ? void 0 : _options$toolbox.show) === true) {
|
|
94
|
+
var _options$grid;
|
|
95
|
+
const top = (((_options$grid = options.grid) === null || _options$grid === void 0 ? void 0 : _options$grid.top) || 0) + toolboxHeight;
|
|
96
|
+
options = merge({}, options, {
|
|
97
|
+
grid: {
|
|
98
|
+
top
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return options;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
watch: {
|
|
106
|
+
options() {
|
|
107
|
+
if (this.chart) {
|
|
108
|
+
this.draw();
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
width() {
|
|
112
|
+
this.setChartSize();
|
|
113
|
+
},
|
|
114
|
+
height() {
|
|
115
|
+
this.setChartSize();
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
created() {
|
|
119
|
+
echarts.registerTheme(themeName, createTheme(this.options));
|
|
120
|
+
},
|
|
121
|
+
async mounted() {
|
|
122
|
+
await this.$nextTick();
|
|
123
|
+
const chart = echarts.init(this.$refs.chart, themeName, {
|
|
124
|
+
renderer: this.renderer,
|
|
125
|
+
width: defaultWidth,
|
|
126
|
+
height: defaultHeight
|
|
127
|
+
});
|
|
128
|
+
// FIXME: temporary workaround to ensure compatibility with @vue/compat
|
|
129
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
130
|
+
chart.__v_skip = true;
|
|
131
|
+
this.chart = chart;
|
|
132
|
+
if (this.groupId.length) {
|
|
133
|
+
this.chart.group = this.groupId;
|
|
134
|
+
echarts.connect(this.groupId);
|
|
135
|
+
}
|
|
136
|
+
this.chart.on('click', this.handleClick);
|
|
137
|
+
/**
|
|
138
|
+
* Emitted after calling `echarts.init`
|
|
139
|
+
*/
|
|
140
|
+
this.$emit('created', this.chart);
|
|
141
|
+
this.draw();
|
|
142
|
+
this.setChartSize();
|
|
143
|
+
},
|
|
144
|
+
beforeDestroy() {
|
|
145
|
+
this.chart.off('click', this.handleClick);
|
|
146
|
+
},
|
|
147
|
+
methods: {
|
|
148
|
+
draw() {
|
|
149
|
+
this.chart.setOption(this.modifiedOptions);
|
|
150
|
+
/**
|
|
151
|
+
* Emitted after calling `echarts.setOption`
|
|
152
|
+
*/
|
|
153
|
+
this.$emit('updated', this.chart);
|
|
154
|
+
},
|
|
155
|
+
setChartSize() {
|
|
156
|
+
this.chart.resize({
|
|
157
|
+
width: this.width || 'auto',
|
|
158
|
+
height: this.height || defaultHeight
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
handleClick(params) {
|
|
162
|
+
/**
|
|
163
|
+
* Emitted when clicked on a data item in the chart (e.g., a bar/column).
|
|
164
|
+
*
|
|
165
|
+
* @property {object} chart The chart instance
|
|
166
|
+
* @property {object} params A params object, see also https://echarts.apache.org/en/api.html#events.Mouse%20events
|
|
167
|
+
*/
|
|
168
|
+
this.$emit('chartItemClicked', {
|
|
169
|
+
chart: this.chart,
|
|
170
|
+
params
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
handleResize() {
|
|
174
|
+
this.chart.resize();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/* script */
|
|
180
|
+
const __vue_script__ = script;
|
|
181
|
+
|
|
182
|
+
/* template */
|
|
183
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"resize-observer",rawName:"v-resize-observer:[responsive]",value:(_vm.debouncedHandleResize),expression:"debouncedHandleResize",arg:_vm.responsive}],ref:"chart"})};
|
|
184
|
+
var __vue_staticRenderFns__ = [];
|
|
185
|
+
|
|
186
|
+
/* style */
|
|
187
|
+
const __vue_inject_styles__ = undefined;
|
|
188
|
+
/* scoped */
|
|
189
|
+
const __vue_scope_id__ = undefined;
|
|
190
|
+
/* module identifier */
|
|
191
|
+
const __vue_module_identifier__ = undefined;
|
|
192
|
+
/* functional template */
|
|
193
|
+
const __vue_is_functional_template__ = false;
|
|
194
|
+
/* style inject */
|
|
195
|
+
|
|
196
|
+
/* style inject SSR */
|
|
197
|
+
|
|
198
|
+
/* style inject shadow dom */
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
203
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
204
|
+
__vue_inject_styles__,
|
|
205
|
+
__vue_script__,
|
|
206
|
+
__vue_scope_id__,
|
|
207
|
+
__vue_is_functional_template__,
|
|
208
|
+
__vue_module_identifier__,
|
|
209
|
+
false,
|
|
210
|
+
undefined,
|
|
211
|
+
undefined,
|
|
212
|
+
undefined
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { merge } from 'lodash-es';
|
|
2
|
+
import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, gridWithSecondaryYAxis, grid, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
|
+
import { CHART_TYPE_LINE, HEIGHT_AUTO_CLASSES, CHART_DEFAULT_SERIES_STACK, CHART_DEFAULT_SERIES_SECONDARY_STACK } from '../../../utils/charts/constants';
|
|
4
|
+
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
|
+
import Chart from '../chart/chart';
|
|
6
|
+
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
7
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
|
+
|
|
9
|
+
const yAxisDefaults = {
|
|
10
|
+
...yAxis,
|
|
11
|
+
nameLocation: 'center',
|
|
12
|
+
axisTick: {
|
|
13
|
+
show: false
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var script = {
|
|
17
|
+
name: 'GlColumnChart',
|
|
18
|
+
components: {
|
|
19
|
+
Chart,
|
|
20
|
+
ChartTooltip
|
|
21
|
+
},
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: {
|
|
24
|
+
bars: {
|
|
25
|
+
type: Array,
|
|
26
|
+
required: false,
|
|
27
|
+
default: () => []
|
|
28
|
+
},
|
|
29
|
+
lines: {
|
|
30
|
+
type: Array,
|
|
31
|
+
required: false,
|
|
32
|
+
default: () => []
|
|
33
|
+
},
|
|
34
|
+
secondaryData: {
|
|
35
|
+
type: Array,
|
|
36
|
+
required: false,
|
|
37
|
+
default: () => []
|
|
38
|
+
},
|
|
39
|
+
option: {
|
|
40
|
+
type: Object,
|
|
41
|
+
required: false,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
44
|
+
yAxisTitle: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
secondaryDataTitle: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
default: ''
|
|
52
|
+
},
|
|
53
|
+
xAxisTitle: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
xAxisType: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: true,
|
|
60
|
+
validator: value => ['value', 'category', 'time', 'log'].indexOf(value) !== -1
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
64
|
+
*/
|
|
65
|
+
height: {
|
|
66
|
+
type: [Number, String],
|
|
67
|
+
required: false,
|
|
68
|
+
default: null
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
data() {
|
|
72
|
+
return {
|
|
73
|
+
chart: null
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
hasSecondaryAxis() {
|
|
78
|
+
return Boolean(this.secondaryData.length);
|
|
79
|
+
},
|
|
80
|
+
barSeries() {
|
|
81
|
+
return this.bars.map((_ref, index) => {
|
|
82
|
+
let {
|
|
83
|
+
name,
|
|
84
|
+
data,
|
|
85
|
+
stack = CHART_DEFAULT_SERIES_STACK
|
|
86
|
+
} = _ref;
|
|
87
|
+
const color = colorFromDefaultPalette(index);
|
|
88
|
+
return generateBarSeries({
|
|
89
|
+
name,
|
|
90
|
+
data,
|
|
91
|
+
stack,
|
|
92
|
+
color
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
lineSeries() {
|
|
97
|
+
const offset = this.bars.length;
|
|
98
|
+
return this.lines.map((_ref2, index) => {
|
|
99
|
+
let {
|
|
100
|
+
name,
|
|
101
|
+
data
|
|
102
|
+
} = _ref2;
|
|
103
|
+
const color = colorFromDefaultPalette(offset + index);
|
|
104
|
+
return generateLineSeries({
|
|
105
|
+
name,
|
|
106
|
+
data,
|
|
107
|
+
color
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
secondarySeries() {
|
|
112
|
+
const offset = this.bars.length + this.lines.length;
|
|
113
|
+
return this.secondaryData.map((_ref3, index) => {
|
|
114
|
+
let {
|
|
115
|
+
name,
|
|
116
|
+
data,
|
|
117
|
+
type,
|
|
118
|
+
stack = CHART_DEFAULT_SERIES_SECONDARY_STACK
|
|
119
|
+
} = _ref3;
|
|
120
|
+
const color = colorFromDefaultPalette(offset + index);
|
|
121
|
+
return type === CHART_TYPE_LINE ? generateLineSeries({
|
|
122
|
+
color,
|
|
123
|
+
name,
|
|
124
|
+
data,
|
|
125
|
+
yAxisIndex: 1
|
|
126
|
+
}) : generateBarSeries({
|
|
127
|
+
color,
|
|
128
|
+
name,
|
|
129
|
+
data,
|
|
130
|
+
yAxisIndex: 1,
|
|
131
|
+
stack
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
series() {
|
|
136
|
+
return [...this.barSeries, ...this.lineSeries, ...this.secondarySeries];
|
|
137
|
+
},
|
|
138
|
+
options() {
|
|
139
|
+
const yAxisPrimary = {
|
|
140
|
+
...yAxisDefaults,
|
|
141
|
+
name: this.yAxisTitle
|
|
142
|
+
};
|
|
143
|
+
const mergedOptions = merge({}, defaultChartOptions, {
|
|
144
|
+
grid: this.hasSecondaryAxis ? gridWithSecondaryYAxis : grid,
|
|
145
|
+
xAxis: {
|
|
146
|
+
boundaryGap: true,
|
|
147
|
+
axisLabel: {
|
|
148
|
+
margin: 20,
|
|
149
|
+
verticalAlign: 'bottom'
|
|
150
|
+
},
|
|
151
|
+
axisLine: {
|
|
152
|
+
show: false
|
|
153
|
+
},
|
|
154
|
+
axisPointer: {
|
|
155
|
+
type: 'none'
|
|
156
|
+
},
|
|
157
|
+
name: this.xAxisTitle,
|
|
158
|
+
type: this.xAxisType
|
|
159
|
+
},
|
|
160
|
+
yAxis: this.hasSecondaryAxis ? [yAxisPrimary, {
|
|
161
|
+
...yAxisDefaults,
|
|
162
|
+
name: this.secondaryDataTitle,
|
|
163
|
+
show: this.hasSecondaryAxis
|
|
164
|
+
}] : yAxisPrimary
|
|
165
|
+
}, this.option, dataZoomAdjustments(this.option.dataZoom));
|
|
166
|
+
// All chart options can be merged but series
|
|
167
|
+
// needs to be handled specially
|
|
168
|
+
return mergeSeriesToOptions(mergedOptions, this.series);
|
|
169
|
+
},
|
|
170
|
+
autoHeight() {
|
|
171
|
+
return this.height === 'auto';
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
methods: {
|
|
175
|
+
onCreated(chart) {
|
|
176
|
+
this.chart = chart;
|
|
177
|
+
this.$emit('created', chart);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
HEIGHT_AUTO_CLASSES
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/* script */
|
|
184
|
+
const __vue_script__ = script;
|
|
185
|
+
|
|
186
|
+
/* template */
|
|
187
|
+
var __vue_render__ = function () {
|
|
188
|
+
var _obj;
|
|
189
|
+
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',{ref:"dataTooltip",attrs:{"chart":_vm.chart,"use-default-tooltip-formatter":true},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)};
|
|
190
|
+
var __vue_staticRenderFns__ = [];
|
|
191
|
+
|
|
192
|
+
/* style */
|
|
193
|
+
const __vue_inject_styles__ = undefined;
|
|
194
|
+
/* scoped */
|
|
195
|
+
const __vue_scope_id__ = undefined;
|
|
196
|
+
/* module identifier */
|
|
197
|
+
const __vue_module_identifier__ = undefined;
|
|
198
|
+
/* functional template */
|
|
199
|
+
const __vue_is_functional_template__ = false;
|
|
200
|
+
/* style inject */
|
|
201
|
+
|
|
202
|
+
/* style inject SSR */
|
|
203
|
+
|
|
204
|
+
/* style inject shadow dom */
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
209
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
210
|
+
__vue_inject_styles__,
|
|
211
|
+
__vue_script__,
|
|
212
|
+
__vue_scope_id__,
|
|
213
|
+
__vue_is_functional_template__,
|
|
214
|
+
__vue_module_identifier__,
|
|
215
|
+
false,
|
|
216
|
+
undefined,
|
|
217
|
+
undefined,
|
|
218
|
+
undefined
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { merge } from 'lodash-es';
|
|
2
|
+
import { defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
|
+
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
4
|
+
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
5
|
+
import TooltipDefaultFormat from '../shared/tooltip/tooltip_default_format/tooltip_default_format';
|
|
6
|
+
import Chart from '../chart/chart';
|
|
7
|
+
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
8
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
9
|
+
|
|
10
|
+
var script = {
|
|
11
|
+
name: 'GlDiscreteScatterChart',
|
|
12
|
+
components: {
|
|
13
|
+
Chart,
|
|
14
|
+
ChartTooltip,
|
|
15
|
+
TooltipDefaultFormat
|
|
16
|
+
},
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: {
|
|
19
|
+
data: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
option: {
|
|
24
|
+
type: Object,
|
|
25
|
+
required: false,
|
|
26
|
+
default: () => ({})
|
|
27
|
+
},
|
|
28
|
+
yAxisTitle: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
xAxisTitle: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
symbolSize: {
|
|
37
|
+
type: Number,
|
|
38
|
+
required: false,
|
|
39
|
+
default: 8
|
|
40
|
+
},
|
|
41
|
+
formatTooltipText: {
|
|
42
|
+
type: Function,
|
|
43
|
+
required: false,
|
|
44
|
+
default: null
|
|
45
|
+
},
|
|
46
|
+
disableTooltip: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
53
|
+
*/
|
|
54
|
+
height: {
|
|
55
|
+
type: [Number, String],
|
|
56
|
+
required: false,
|
|
57
|
+
default: null
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
chart: null,
|
|
63
|
+
tooltipTitle: '',
|
|
64
|
+
tooltipContent: {},
|
|
65
|
+
tooltipPosition: {
|
|
66
|
+
left: '0',
|
|
67
|
+
top: '0'
|
|
68
|
+
},
|
|
69
|
+
selectedFormatTooltipText: this.formatTooltipText || this.defaultFormatTooltipText
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
series() {
|
|
74
|
+
return this.data.map((series, index) => {
|
|
75
|
+
const defaultColor = colorFromDefaultPalette(index);
|
|
76
|
+
const getColor = type => series[type] && series[type].color ? series[type].color : defaultColor;
|
|
77
|
+
return merge({
|
|
78
|
+
symbolSize: this.symbolSize,
|
|
79
|
+
lineStyle: {
|
|
80
|
+
color: getColor('lineStyle')
|
|
81
|
+
},
|
|
82
|
+
itemStyle: {
|
|
83
|
+
color: getColor('itemStyle')
|
|
84
|
+
}
|
|
85
|
+
}, series);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
options() {
|
|
89
|
+
const mergedOptions = merge({}, defaultChartOptions, {
|
|
90
|
+
tooltip: this.disableTooltip ? undefined : {
|
|
91
|
+
formatter: this.onLabelChange
|
|
92
|
+
},
|
|
93
|
+
xAxis: {
|
|
94
|
+
type: 'category',
|
|
95
|
+
name: this.xAxisTitle,
|
|
96
|
+
axisTick: {
|
|
97
|
+
alignWithLabel: true,
|
|
98
|
+
show: true,
|
|
99
|
+
lineStyle: {
|
|
100
|
+
color: 'var(--gl-chart-axis-line-color)'
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
axisLabel: {
|
|
104
|
+
margin: 20,
|
|
105
|
+
verticalAlign: 'bottom'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
yAxis: {
|
|
109
|
+
type: 'value',
|
|
110
|
+
name: this.yAxisTitle
|
|
111
|
+
}
|
|
112
|
+
}, this.option, dataZoomAdjustments(this.option.dataZoom));
|
|
113
|
+
// All chart options can be merged but series
|
|
114
|
+
// needs to be handled specially
|
|
115
|
+
return mergeSeriesToOptions(mergedOptions, this.series);
|
|
116
|
+
},
|
|
117
|
+
autoHeight() {
|
|
118
|
+
return this.height === 'auto';
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
methods: {
|
|
122
|
+
defaultFormatTooltipText(params) {
|
|
123
|
+
const data = this.getChartData(params);
|
|
124
|
+
const [title, content] = data;
|
|
125
|
+
this.tooltipTitle = title;
|
|
126
|
+
const seriesName = this.yAxisTitle;
|
|
127
|
+
const tooltipContent = {
|
|
128
|
+
[seriesName]: {
|
|
129
|
+
value: content,
|
|
130
|
+
color: ''
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
this.$set(this, 'tooltipContent', tooltipContent);
|
|
134
|
+
},
|
|
135
|
+
onCreated(chart) {
|
|
136
|
+
this.chart = chart;
|
|
137
|
+
this.$emit('created', chart);
|
|
138
|
+
},
|
|
139
|
+
onLabelChange(params) {
|
|
140
|
+
this.selectedFormatTooltipText(params);
|
|
141
|
+
const data = this.getChartData(params);
|
|
142
|
+
if (data.length) {
|
|
143
|
+
const [left, top] = this.chart.convertToPixel('grid', data);
|
|
144
|
+
this.tooltipPosition = {
|
|
145
|
+
left: `${left}px`,
|
|
146
|
+
top: `${top}px`
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
getChartData(_ref) {
|
|
151
|
+
let {
|
|
152
|
+
data
|
|
153
|
+
} = _ref;
|
|
154
|
+
const chartData = (data === null || data === void 0 ? void 0 : data.value) || data;
|
|
155
|
+
return Array.isArray(chartData) ? chartData : [];
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
HEIGHT_AUTO_CLASSES
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/* script */
|
|
162
|
+
const __vue_script__ = script;
|
|
163
|
+
|
|
164
|
+
/* template */
|
|
165
|
+
var __vue_render__ = function () {
|
|
166
|
+
var _obj;
|
|
167
|
+
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.disableTooltip && _vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_vm._e()],1)};
|
|
168
|
+
var __vue_staticRenderFns__ = [];
|
|
169
|
+
|
|
170
|
+
/* style */
|
|
171
|
+
const __vue_inject_styles__ = undefined;
|
|
172
|
+
/* scoped */
|
|
173
|
+
const __vue_scope_id__ = undefined;
|
|
174
|
+
/* module identifier */
|
|
175
|
+
const __vue_module_identifier__ = undefined;
|
|
176
|
+
/* functional template */
|
|
177
|
+
const __vue_is_functional_template__ = false;
|
|
178
|
+
/* style inject */
|
|
179
|
+
|
|
180
|
+
/* style inject SSR */
|
|
181
|
+
|
|
182
|
+
/* style inject shadow dom */
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
187
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
188
|
+
__vue_inject_styles__,
|
|
189
|
+
__vue_script__,
|
|
190
|
+
__vue_scope_id__,
|
|
191
|
+
__vue_is_functional_template__,
|
|
192
|
+
__vue_module_identifier__,
|
|
193
|
+
false,
|
|
194
|
+
undefined,
|
|
195
|
+
undefined,
|
|
196
|
+
undefined
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
export { __vue_component__ as default };
|