@gitlab/ui 132.0.1 → 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 +4 -3
- 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 +2 -2
- 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/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,205 @@
|
|
|
1
|
+
import { merge, uniq, sortBy } from 'lodash-es';
|
|
2
|
+
import { gaugeSafeHues, gaugeWarningHue, gaugeNeutralHues } from '../../../utils/charts/theme';
|
|
3
|
+
import Chart from '../chart/chart';
|
|
4
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
+
|
|
6
|
+
const AXIS_LABEL_FONT_SIZE_PX = 14;
|
|
7
|
+
const ARC_RADIUS = '80%';
|
|
8
|
+
const DETAIL_FONT_SIZE_PX = 30;
|
|
9
|
+
const DETAIL_FONT_FAMILY = 'sans-serif';
|
|
10
|
+
const DETAIL_FONT_WEIGHT = 'bold';
|
|
11
|
+
const POINTER_LENGTH = '65%';
|
|
12
|
+
const POINTER_WIDTH_PX = 5;
|
|
13
|
+
const gaugeChartSeries = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
value,
|
|
16
|
+
text,
|
|
17
|
+
min,
|
|
18
|
+
max,
|
|
19
|
+
splitNumber,
|
|
20
|
+
axisColor
|
|
21
|
+
} = _ref;
|
|
22
|
+
return [{
|
|
23
|
+
type: 'gauge',
|
|
24
|
+
detail: {
|
|
25
|
+
show: true,
|
|
26
|
+
formatter: () => {
|
|
27
|
+
const currentValue = Number.isFinite(value) ? value : null;
|
|
28
|
+
return text || (currentValue !== null && currentValue !== void 0 ? currentValue : '--');
|
|
29
|
+
},
|
|
30
|
+
color: `${gaugeNeutralHues[0]}`,
|
|
31
|
+
fontSize: DETAIL_FONT_SIZE_PX,
|
|
32
|
+
fontFamily: DETAIL_FONT_FAMILY,
|
|
33
|
+
fontWeight: DETAIL_FONT_WEIGHT
|
|
34
|
+
},
|
|
35
|
+
axisLabel: {
|
|
36
|
+
show: true,
|
|
37
|
+
fontSize: AXIS_LABEL_FONT_SIZE_PX,
|
|
38
|
+
formatter: theValue => Number.isFinite(theValue) ? theValue : '--',
|
|
39
|
+
color: `${gaugeNeutralHues[1]}`
|
|
40
|
+
},
|
|
41
|
+
axisLine: {
|
|
42
|
+
lineStyle: {
|
|
43
|
+
color: axisColor
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
radius: ARC_RADIUS,
|
|
47
|
+
pointer: {
|
|
48
|
+
length: POINTER_LENGTH,
|
|
49
|
+
width: POINTER_WIDTH_PX
|
|
50
|
+
},
|
|
51
|
+
data: [{
|
|
52
|
+
value
|
|
53
|
+
}],
|
|
54
|
+
min,
|
|
55
|
+
max,
|
|
56
|
+
splitNumber
|
|
57
|
+
}];
|
|
58
|
+
};
|
|
59
|
+
var script = {
|
|
60
|
+
name: 'GlGaugeChart',
|
|
61
|
+
components: {
|
|
62
|
+
Chart
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
value: {
|
|
66
|
+
type: Number,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
min: {
|
|
70
|
+
type: Number,
|
|
71
|
+
required: false,
|
|
72
|
+
default: 0
|
|
73
|
+
},
|
|
74
|
+
max: {
|
|
75
|
+
type: Number,
|
|
76
|
+
required: false,
|
|
77
|
+
default: 100
|
|
78
|
+
},
|
|
79
|
+
thresholds: {
|
|
80
|
+
type: Array,
|
|
81
|
+
required: false,
|
|
82
|
+
default: () => [],
|
|
83
|
+
validator: value => {
|
|
84
|
+
return value !== null && value !== void 0 && value.length ? value.every(item => Number.isFinite(item)) : true;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
text: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: false,
|
|
90
|
+
default: ''
|
|
91
|
+
},
|
|
92
|
+
splitNumber: {
|
|
93
|
+
type: Number,
|
|
94
|
+
required: false,
|
|
95
|
+
default: 10
|
|
96
|
+
},
|
|
97
|
+
option: {
|
|
98
|
+
type: Object,
|
|
99
|
+
required: false,
|
|
100
|
+
default: () => ({})
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
computed: {
|
|
104
|
+
options() {
|
|
105
|
+
const mergedOptions = merge({}, {
|
|
106
|
+
series: gaugeChartSeries({
|
|
107
|
+
value: this.value,
|
|
108
|
+
text: this.text,
|
|
109
|
+
min: this.min,
|
|
110
|
+
max: this.max,
|
|
111
|
+
splitNumber: this.splitNumber,
|
|
112
|
+
axisColor: this.axisColor
|
|
113
|
+
})
|
|
114
|
+
}, this.option);
|
|
115
|
+
return mergedOptions;
|
|
116
|
+
},
|
|
117
|
+
validThresholds() {
|
|
118
|
+
const {
|
|
119
|
+
thresholds,
|
|
120
|
+
min,
|
|
121
|
+
max
|
|
122
|
+
} = this;
|
|
123
|
+
if (!(thresholds !== null && thresholds !== void 0 && thresholds.length)) return [];
|
|
124
|
+
const uniqueThresholds = uniq(thresholds);
|
|
125
|
+
const filteredThresholds = uniqueThresholds.filter(threshold => {
|
|
126
|
+
return Number.isFinite(threshold) && threshold > min && threshold < max;
|
|
127
|
+
});
|
|
128
|
+
/**
|
|
129
|
+
* Only the first two thresholds will be used
|
|
130
|
+
*/
|
|
131
|
+
const reducedThresholdsList = filteredThresholds.length > 2 ? [filteredThresholds[0], filteredThresholds[1]] : [...filteredThresholds];
|
|
132
|
+
const sortedThresholds = sortBy(reducedThresholdsList);
|
|
133
|
+
return sortedThresholds;
|
|
134
|
+
},
|
|
135
|
+
valueIsInLastThreshold() {
|
|
136
|
+
const {
|
|
137
|
+
validThresholds,
|
|
138
|
+
value
|
|
139
|
+
} = this;
|
|
140
|
+
return validThresholds.length > 0 && value >= validThresholds[validThresholds.length - 1];
|
|
141
|
+
},
|
|
142
|
+
axisColor() {
|
|
143
|
+
const {
|
|
144
|
+
validThresholds,
|
|
145
|
+
max
|
|
146
|
+
} = this;
|
|
147
|
+
let color;
|
|
148
|
+
if (validThresholds.length === 0) {
|
|
149
|
+
color = [[1, gaugeSafeHues[0]]];
|
|
150
|
+
} else if (validThresholds.length === 1) {
|
|
151
|
+
color = [[validThresholds[0] / max, gaugeSafeHues[0]], [1, gaugeWarningHue]];
|
|
152
|
+
} else if (validThresholds.length >= 2) {
|
|
153
|
+
/**
|
|
154
|
+
* If there are more than two ranges set, only the first two will
|
|
155
|
+
* be used
|
|
156
|
+
*/
|
|
157
|
+
color = [[validThresholds[0] / max, gaugeSafeHues[0]], [validThresholds[1] / max, gaugeSafeHues[1]], [1, gaugeWarningHue]];
|
|
158
|
+
}
|
|
159
|
+
return color;
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
methods: {
|
|
163
|
+
onCreated(chart) {
|
|
164
|
+
this.$emit('created', chart);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/* script */
|
|
170
|
+
const __vue_script__ = script;
|
|
171
|
+
|
|
172
|
+
/* template */
|
|
173
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('chart',_vm._g(_vm._b({attrs:{"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners))};
|
|
174
|
+
var __vue_staticRenderFns__ = [];
|
|
175
|
+
|
|
176
|
+
/* style */
|
|
177
|
+
const __vue_inject_styles__ = undefined;
|
|
178
|
+
/* scoped */
|
|
179
|
+
const __vue_scope_id__ = undefined;
|
|
180
|
+
/* module identifier */
|
|
181
|
+
const __vue_module_identifier__ = undefined;
|
|
182
|
+
/* functional template */
|
|
183
|
+
const __vue_is_functional_template__ = false;
|
|
184
|
+
/* style inject */
|
|
185
|
+
|
|
186
|
+
/* style inject SSR */
|
|
187
|
+
|
|
188
|
+
/* style inject shadow dom */
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
193
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
194
|
+
__vue_inject_styles__,
|
|
195
|
+
__vue_script__,
|
|
196
|
+
__vue_scope_id__,
|
|
197
|
+
__vue_is_functional_template__,
|
|
198
|
+
__vue_module_identifier__,
|
|
199
|
+
false,
|
|
200
|
+
undefined,
|
|
201
|
+
undefined,
|
|
202
|
+
undefined
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { merge } from 'lodash-es';
|
|
2
|
+
import { GL_COLOR_NEUTRAL_100, GL_COLOR_NEUTRAL_0 } from '../../../tokens/build/js/tokens';
|
|
3
|
+
import { getTooltipTitle, getTooltipContent } from '../../../utils/charts/config';
|
|
4
|
+
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
5
|
+
import { heatmapHues } from '../../../utils/charts/theme';
|
|
6
|
+
import { engineeringNotation } from '../../../utils/number_utils';
|
|
7
|
+
import TooltipDefaultFormat from '../shared/tooltip/tooltip_default_format/tooltip_default_format';
|
|
8
|
+
import Chart from '../chart/chart';
|
|
9
|
+
import ChartLegend from '../legend/legend';
|
|
10
|
+
import ChartTooltip from '../shared/tooltip/tooltip';
|
|
11
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
12
|
+
|
|
13
|
+
const defaultOptions = {
|
|
14
|
+
visualMap: {
|
|
15
|
+
show: false,
|
|
16
|
+
inRange: {
|
|
17
|
+
color: heatmapHues
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
series: {
|
|
21
|
+
type: 'heatmap'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The series is an array of arrays containing [x, y, value]
|
|
27
|
+
* x and y are position, value determines the color
|
|
28
|
+
* We want the min and max from value field to make the range of colors
|
|
29
|
+
*/
|
|
30
|
+
function getRange(series) {
|
|
31
|
+
return series.reduce((acc, curr) => {
|
|
32
|
+
const value = curr[2] || 0;
|
|
33
|
+
if (value < acc.min) acc.min = value;
|
|
34
|
+
if (value > acc.max) acc.max = value;
|
|
35
|
+
return acc;
|
|
36
|
+
}, {
|
|
37
|
+
min: 0,
|
|
38
|
+
max: 0
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var script = {
|
|
42
|
+
name: 'GlHeatmap',
|
|
43
|
+
components: {
|
|
44
|
+
Chart,
|
|
45
|
+
ChartLegend,
|
|
46
|
+
ChartTooltip,
|
|
47
|
+
TooltipDefaultFormat
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
option: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: false,
|
|
53
|
+
default: () => ({})
|
|
54
|
+
},
|
|
55
|
+
dataSeries: {
|
|
56
|
+
type: Array,
|
|
57
|
+
required: true
|
|
58
|
+
},
|
|
59
|
+
xAxisLabels: {
|
|
60
|
+
type: Array,
|
|
61
|
+
required: false,
|
|
62
|
+
default: () => []
|
|
63
|
+
},
|
|
64
|
+
yAxisLabels: {
|
|
65
|
+
type: Array,
|
|
66
|
+
required: false,
|
|
67
|
+
default: () => []
|
|
68
|
+
},
|
|
69
|
+
xAxisName: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: false,
|
|
72
|
+
default: ''
|
|
73
|
+
},
|
|
74
|
+
yAxisName: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: false,
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
formatTooltipText: {
|
|
80
|
+
type: Function,
|
|
81
|
+
required: false,
|
|
82
|
+
default: null
|
|
83
|
+
},
|
|
84
|
+
legendAverageText: {
|
|
85
|
+
type: String,
|
|
86
|
+
required: false,
|
|
87
|
+
default: 'Avg'
|
|
88
|
+
},
|
|
89
|
+
legendMaxText: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: false,
|
|
92
|
+
default: 'Max'
|
|
93
|
+
},
|
|
94
|
+
responsive: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: false,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
101
|
+
*/
|
|
102
|
+
height: {
|
|
103
|
+
type: [Number, String],
|
|
104
|
+
required: false,
|
|
105
|
+
default: null
|
|
106
|
+
},
|
|
107
|
+
showTooltip: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: true,
|
|
110
|
+
required: false
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
data() {
|
|
114
|
+
return {
|
|
115
|
+
chart: null,
|
|
116
|
+
tooltip: {
|
|
117
|
+
title: '',
|
|
118
|
+
content: {},
|
|
119
|
+
left: '0',
|
|
120
|
+
top: '0'
|
|
121
|
+
},
|
|
122
|
+
selectedFormatTooltipText: this.formatTooltipText || this.defaultFormatTooltipText
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
computed: {
|
|
126
|
+
computedOptions() {
|
|
127
|
+
const {
|
|
128
|
+
min,
|
|
129
|
+
max
|
|
130
|
+
} = getRange(this.dataSeries);
|
|
131
|
+
return merge({}, defaultOptions, {
|
|
132
|
+
series: {
|
|
133
|
+
data: this.dataSeries,
|
|
134
|
+
z: 2
|
|
135
|
+
},
|
|
136
|
+
grid: {
|
|
137
|
+
left: '64px',
|
|
138
|
+
right: '32px',
|
|
139
|
+
show: true,
|
|
140
|
+
borderWidth: 0,
|
|
141
|
+
backgroundColor: GL_COLOR_NEUTRAL_100
|
|
142
|
+
},
|
|
143
|
+
visualMap: {
|
|
144
|
+
min,
|
|
145
|
+
max
|
|
146
|
+
},
|
|
147
|
+
xAxis: {
|
|
148
|
+
data: this.xAxisLabels,
|
|
149
|
+
z: 3,
|
|
150
|
+
axisTick: false,
|
|
151
|
+
axisLabel: {
|
|
152
|
+
margin: 2
|
|
153
|
+
},
|
|
154
|
+
name: this.xAxisName,
|
|
155
|
+
nameGap: 16,
|
|
156
|
+
nameLocation: 'middle',
|
|
157
|
+
nameTextStyle: {
|
|
158
|
+
verticalAlign: 'middle'
|
|
159
|
+
},
|
|
160
|
+
offset: 0,
|
|
161
|
+
splitLine: {
|
|
162
|
+
show: true,
|
|
163
|
+
interval: 0,
|
|
164
|
+
lineStyle: {
|
|
165
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
166
|
+
width: 2
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
axisPointer: {
|
|
170
|
+
show: true,
|
|
171
|
+
label: {
|
|
172
|
+
formatter: this.onLabelChange
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
yAxis: {
|
|
177
|
+
data: this.yAxisLabels,
|
|
178
|
+
z: 3,
|
|
179
|
+
type: 'category',
|
|
180
|
+
axisTick: false,
|
|
181
|
+
axisLabel: {
|
|
182
|
+
margin: 8
|
|
183
|
+
},
|
|
184
|
+
name: this.yAxisName,
|
|
185
|
+
nameLocation: 'center',
|
|
186
|
+
nameGap: 50,
|
|
187
|
+
nameRotate: 90,
|
|
188
|
+
splitLine: {
|
|
189
|
+
show: true,
|
|
190
|
+
interval: 0,
|
|
191
|
+
lineStyle: {
|
|
192
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
193
|
+
width: 2
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}, this.option);
|
|
198
|
+
},
|
|
199
|
+
legendStyle() {
|
|
200
|
+
return {
|
|
201
|
+
paddingLeft: this.computedOptions.grid.left,
|
|
202
|
+
marginTop: '-32px'
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
compiledOptions() {
|
|
206
|
+
return this.chart ? this.chart.getOption() : null;
|
|
207
|
+
},
|
|
208
|
+
seriesInfo() {
|
|
209
|
+
const {
|
|
210
|
+
min,
|
|
211
|
+
max
|
|
212
|
+
} = getRange(this.dataSeries);
|
|
213
|
+
const step = (max - min) / heatmapHues.length;
|
|
214
|
+
return heatmapHues.map((color, index) => {
|
|
215
|
+
const lowerBound = engineeringNotation(min + step * index);
|
|
216
|
+
const upperBound = engineeringNotation(min + step * (index + 1));
|
|
217
|
+
return {
|
|
218
|
+
name: `${lowerBound} - ${upperBound}`,
|
|
219
|
+
color,
|
|
220
|
+
type: 'solid'
|
|
221
|
+
};
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
autoHeight() {
|
|
225
|
+
return this.height === 'auto';
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
methods: {
|
|
229
|
+
defaultFormatTooltipText(params) {
|
|
230
|
+
this.tooltip.title = getTooltipTitle(params, this.computedOptions.xAxis.name);
|
|
231
|
+
this.tooltip.content = getTooltipContent(params, this.computedOptions.yAxis.name);
|
|
232
|
+
},
|
|
233
|
+
onCreated(chart) {
|
|
234
|
+
this.chart = chart;
|
|
235
|
+
this.$emit('created', chart);
|
|
236
|
+
},
|
|
237
|
+
onLabelChange(params) {
|
|
238
|
+
this.selectedFormatTooltipText(params);
|
|
239
|
+
const {
|
|
240
|
+
seriesData = []
|
|
241
|
+
} = params;
|
|
242
|
+
if (seriesData.length && seriesData[0].value) {
|
|
243
|
+
const {
|
|
244
|
+
seriesId,
|
|
245
|
+
value
|
|
246
|
+
} = seriesData[0];
|
|
247
|
+
const [left, top] = this.chart.convertToPixel({
|
|
248
|
+
seriesId
|
|
249
|
+
}, value);
|
|
250
|
+
this.tooltip = {
|
|
251
|
+
...this.tooltip,
|
|
252
|
+
left: `${left}px`,
|
|
253
|
+
top: `${top}px`
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
HEIGHT_AUTO_CLASSES
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/* script */
|
|
262
|
+
const __vue_script__ = script;
|
|
263
|
+
|
|
264
|
+
/* template */
|
|
265
|
+
var __vue_render__ = function () {
|
|
266
|
+
var _obj;
|
|
267
|
+
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-heatmap",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.computedOptions},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"chart":_vm.chart,"top":_vm.tooltip.top,"left":_vm.tooltip.left,"show":_vm.showTooltip},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v(_vm._s(_vm.tooltip.title))])]},proxy:true}],null,true)},[_vm._v(" "),(_vm.formatTooltipText)?_vm._t("tooltip-content"):_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltip.content}})],2):_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,"max-text":_vm.legendMaxText,"average-text":_vm.legendAverageText}}):_vm._e()],1)};
|
|
268
|
+
var __vue_staticRenderFns__ = [];
|
|
269
|
+
|
|
270
|
+
/* style */
|
|
271
|
+
const __vue_inject_styles__ = undefined;
|
|
272
|
+
/* scoped */
|
|
273
|
+
const __vue_scope_id__ = undefined;
|
|
274
|
+
/* module identifier */
|
|
275
|
+
const __vue_module_identifier__ = undefined;
|
|
276
|
+
/* functional template */
|
|
277
|
+
const __vue_is_functional_template__ = false;
|
|
278
|
+
/* style inject */
|
|
279
|
+
|
|
280
|
+
/* style inject SSR */
|
|
281
|
+
|
|
282
|
+
/* style inject shadow dom */
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
287
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
288
|
+
__vue_inject_styles__,
|
|
289
|
+
__vue_script__,
|
|
290
|
+
__vue_scope_id__,
|
|
291
|
+
__vue_is_functional_template__,
|
|
292
|
+
__vue_module_identifier__,
|
|
293
|
+
false,
|
|
294
|
+
undefined,
|
|
295
|
+
undefined,
|
|
296
|
+
undefined
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
export { __vue_component__ as default };
|