@gitlab/ui 72.11.0 → 72.12.0
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/CHANGELOG.md +14 -0
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +1 -1
- package/src/directives/safe_html/safe_html.js +5 -0
- package/src/directives/safe_html/safe_html.spec.js +17 -0
- package/src/internal/color_contrast/color_contrast.md +8 -0
- package/src/internal/color_contrast/color_contrast.spec.js +34 -0
- package/src/internal/color_contrast/color_contrast.stories.js +41 -0
- package/src/internal/color_contrast/color_contrast.vue +52 -0
- package/src/tokens/color.dark.tokens.stories.js +36 -22
- package/src/tokens/color.data_viz.dark.tokens.stories.js +13 -30
- package/src/tokens/color.data_viz.tokens.stories.js +13 -30
- package/src/tokens/color.theme.dark.tokens.stories.js +15 -30
- package/src/tokens/color.theme.tokens.stories.js +15 -30
- package/src/tokens/color.tokens.stories.js +36 -22
- package/src/tokens/color.transparency.tokens.stories.js +9 -12
- package/src/tokens/common_story_options.js +22 -80
- package/src/utils/constants.js +25 -0
- package/src/utils/utils.js +21 -1
- package/dist/charts.js +0 -14
- package/dist/components/base/accordion/accordion.js +0 -73
- package/dist/components/base/accordion/accordion_item.js +0 -133
- package/dist/components/base/alert/alert.js +0 -222
- package/dist/components/base/avatar/avatar.js +0 -160
- package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -107
- package/dist/components/base/avatar_link/avatar_link.js +0 -47
- package/dist/components/base/avatars_inline/avatars_inline.js +0 -119
- package/dist/components/base/badge/badge.js +0 -105
- package/dist/components/base/banner/banner.js +0 -139
- package/dist/components/base/breadcrumb/breadcrumb.js +0 -122
- package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -73
- package/dist/components/base/broadcast_message/broadcast_message.js +0 -112
- package/dist/components/base/broadcast_message/constants.js +0 -5
- package/dist/components/base/button/button.js +0 -151
- package/dist/components/base/button_group/button_group.js +0 -47
- package/dist/components/base/card/card.js +0 -71
- package/dist/components/base/carousel/carousel.js +0 -48
- package/dist/components/base/carousel/carousel_slide.js +0 -47
- package/dist/components/base/collapse/collapse.js +0 -59
- package/dist/components/base/datepicker/datepicker.js +0 -386
- package/dist/components/base/daterange_picker/daterange_picker.js +0 -288
- package/dist/components/base/drawer/drawer.js +0 -127
- package/dist/components/base/dropdown/dropdown.js +0 -261
- package/dist/components/base/dropdown/dropdown_divider.js +0 -48
- package/dist/components/base/dropdown/dropdown_form.js +0 -48
- package/dist/components/base/dropdown/dropdown_item.js +0 -131
- package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
- package/dist/components/base/dropdown/dropdown_text.js +0 -48
- package/dist/components/base/filtered_search/common_story_options.js +0 -14
- package/dist/components/base/filtered_search/filtered_search.js +0 -388
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -89
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -138
- package/dist/components/base/filtered_search/filtered_search_term.js +0 -203
- package/dist/components/base/filtered_search/filtered_search_token.js +0 -384
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -420
- package/dist/components/base/filtered_search/filtered_search_utils.js +0 -242
- package/dist/components/base/form/form.js +0 -49
- package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -78
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -60
- package/dist/components/base/form/form_checkbox_tree/checkbox_tree_node.js +0 -79
- package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +0 -138
- package/dist/components/base/form/form_checkbox_tree/models/constants.js +0 -12
- package/dist/components/base/form/form_checkbox_tree/models/node.js +0 -51
- package/dist/components/base/form/form_checkbox_tree/models/tree.js +0 -199
- package/dist/components/base/form/form_combobox/constants.js +0 -55
- package/dist/components/base/form/form_combobox/form_combobox.js +0 -230
- package/dist/components/base/form/form_date/form_date.js +0 -143
- package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
- package/dist/components/base/form/form_fields/form_fields.js +0 -214
- package/dist/components/base/form/form_fields/mappers.js +0 -13
- package/dist/components/base/form/form_fields/validators.js +0 -48
- package/dist/components/base/form/form_group/form_group.js +0 -97
- package/dist/components/base/form/form_input/form_input.js +0 -121
- package/dist/components/base/form/form_input_group/form_input_group.js +0 -108
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
- package/dist/components/base/form/form_radio/form_radio.js +0 -65
- package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -78
- package/dist/components/base/form/form_select/constants.js +0 -12
- package/dist/components/base/form/form_select/form_select.js +0 -82
- package/dist/components/base/form/form_text/form_text.js +0 -38
- package/dist/components/base/form/form_textarea/form_textarea.js +0 -112
- package/dist/components/base/form/input_group_text/input_group_text.js +0 -48
- package/dist/components/base/icon/icon.js +0 -111
- package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -197
- package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -151
- package/dist/components/base/label/label.js +0 -163
- package/dist/components/base/link/link.js +0 -50
- package/dist/components/base/loading_icon/loading_icon.js +0 -111
- package/dist/components/base/markdown/markdown.js +0 -52
- package/dist/components/base/modal/modal.js +0 -204
- package/dist/components/base/nav/nav.js +0 -48
- package/dist/components/base/nav/nav_item.js +0 -48
- package/dist/components/base/nav/nav_item_dropdown.js +0 -62
- package/dist/components/base/navbar/navbar.js +0 -48
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -453
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -4
- package/dist/components/base/new_dropdowns/constants.js +0 -21
- package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -370
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -110
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -143
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -147
- package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -39
- package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -767
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -91
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -93
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -118
- package/dist/components/base/new_dropdowns/listbox/utils.js +0 -34
- package/dist/components/base/paginated_list/paginated_list.js +0 -180
- package/dist/components/base/pagination/pagination.js +0 -399
- package/dist/components/base/path/data.js +0 -34
- package/dist/components/base/path/path.js +0 -189
- package/dist/components/base/popover/popover.js +0 -110
- package/dist/components/base/progress_bar/progress_bar.js +0 -48
- package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -235
- package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -167
- package/dist/components/base/segmented_control/segmented_control.js +0 -109
- package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -224
- package/dist/components/base/sorting/sorting.js +0 -171
- package/dist/components/base/sorting/sorting_item.js +0 -109
- package/dist/components/base/table/constants.js +0 -5
- package/dist/components/base/table/table.js +0 -89
- package/dist/components/base/table_lite/table_lite.js +0 -72
- package/dist/components/base/tabs/constants.js +0 -3
- package/dist/components/base/tabs/tab/tab.js +0 -83
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -143
- package/dist/components/base/tabs/tabs/tabs.js +0 -224
- package/dist/components/base/toast/toast.js +0 -82
- package/dist/components/base/toggle/toggle.js +0 -180
- package/dist/components/base/token/token.js +0 -85
- package/dist/components/base/token_selector/helpers.js +0 -5
- package/dist/components/base/token_selector/token_container.js +0 -165
- package/dist/components/base/token_selector/token_selector.js +0 -403
- package/dist/components/base/token_selector/token_selector_dropdown.js +0 -199
- package/dist/components/base/tooltip/tooltip.js +0 -55
- package/dist/components/charts/area/area.js +0 -311
- package/dist/components/charts/bar/bar.js +0 -253
- package/dist/components/charts/chart/chart.js +0 -215
- package/dist/components/charts/column/column.js +0 -226
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -203
- package/dist/components/charts/gauge/gauge.js +0 -208
- package/dist/components/charts/heatmap/heatmap.js +0 -295
- package/dist/components/charts/heatmap/index.js +0 -2
- package/dist/components/charts/legend/legend.js +0 -228
- package/dist/components/charts/line/line.js +0 -308
- package/dist/components/charts/series_label/series_label.js +0 -100
- package/dist/components/charts/single_stat/single_stat.js +0 -152
- package/dist/components/charts/sparkline/sparkline.js +0 -261
- package/dist/components/charts/stacked_column/stacked_column.js +0 -335
- package/dist/components/charts/tooltip/tooltip.js +0 -251
- package/dist/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.js +0 -83
- package/dist/components/experimental/duo/chat/components/duo_chat_loader/duo_chat_loader.js +0 -100
- package/dist/components/experimental/duo/chat/components/duo_chat_message/copy_code_element.js +0 -35
- package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +0 -115
- package/dist/components/experimental/duo/chat/components/duo_chat_message_sources/duo_chat_message_sources.js +0 -104
- package/dist/components/experimental/duo/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.js +0 -64
- package/dist/components/experimental/duo/chat/constants.js +0 -23
- package/dist/components/experimental/duo/chat/duo_chat.js +0 -359
- package/dist/components/experimental/duo/chat/mock_data.js +0 -83
- package/dist/components/experimental/duo/user_feedback/user_feedback.js +0 -94
- package/dist/components/experimental/duo/user_feedback/user_feedback_modal.js +0 -124
- package/dist/components/experimental/experiment_badge/constants.js +0 -4
- package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -107
- package/dist/components/mixins/button_mixin.js +0 -11
- package/dist/components/mixins/safe_link_mixin.js +0 -30
- package/dist/components/mixins/tooltip_mixin.js +0 -21
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
- package/dist/components/regions/empty_state/empty_state.js +0 -154
- package/dist/components/shared_components/charts/tooltip_default_format.js +0 -53
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
- package/dist/components/shared_components/close_button/close_button.js +0 -54
- package/dist/components/utilities/animated_number/animated_number.js +0 -131
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
- package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
- package/dist/components/utilities/intersperse/intersperse.js +0 -86
- package/dist/components/utilities/sprintf/sprintf.js +0 -172
- package/dist/components/utilities/truncate/constants.js +0 -7
- package/dist/components/utilities/truncate/truncate.js +0 -111
- package/dist/components/utilities/truncate_text/constants.js +0 -7
- package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
- package/dist/config.js +0 -86
- package/dist/directives/collapse_toggle.js +0 -1
- package/dist/directives/hover_load/hover_load.js +0 -45
- package/dist/directives/modal.js +0 -1
- package/dist/directives/outside/get_event_like_time_stamp.js +0 -33
- package/dist/directives/outside/outside.js +0 -106
- package/dist/directives/resize_observer/resize_observer.js +0 -51
- package/dist/directives/safe_html/constants.js +0 -6
- package/dist/directives/safe_html/safe_html.js +0 -35
- package/dist/directives/safe_link/mock_data.js +0 -10
- package/dist/directives/safe_link/safe_link.js +0 -65
- package/dist/directives/tooltip.js +0 -1
- package/dist/index.css +0 -7
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -105
- package/dist/tokens/common_story_options.js +0 -109
- package/dist/utils/breakpoints.js +0 -20
- package/dist/utils/charts/config.js +0 -556
- package/dist/utils/charts/constants.js +0 -63
- package/dist/utils/charts/mock_data.js +0 -211
- package/dist/utils/charts/story_config.js +0 -42
- package/dist/utils/charts/theme.js +0 -192
- package/dist/utils/charts/utils.js +0 -54
- package/dist/utils/constants.js +0 -270
- package/dist/utils/data_utils.js +0 -21
- package/dist/utils/datetime_utility.js +0 -61
- package/dist/utils/i18n.js +0 -15
- package/dist/utils/is_slot_empty.js +0 -38
- package/dist/utils/number_utils.js +0 -124
- package/dist/utils/stories_constants.js +0 -29
- package/dist/utils/stories_utils.js +0 -13
- package/dist/utils/story_decorators/container.js +0 -16
- package/dist/utils/string_utils.js +0 -69
- package/dist/utils/svgs/svg_paths.js +0 -7
- package/dist/utils/test_utils.js +0 -33
- package/dist/utils/use_fake_date.js +0 -29
- package/dist/utils/use_mock_intersection_observer.js +0 -108
- package/dist/utils/utils.js +0 -177
- package/dist/utils.js +0 -5
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import uniqueId from 'lodash/uniqueId';
|
|
2
|
-
import GlBadge from '../../base/badge/badge';
|
|
3
|
-
import GlLink from '../../base/link/link';
|
|
4
|
-
import GlPopover from '../../base/popover/popover';
|
|
5
|
-
import GlSprintf from '../../utilities/sprintf/sprintf';
|
|
6
|
-
import { badgeTypes, badgeTypeValidator } from './constants';
|
|
7
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
8
|
-
|
|
9
|
-
const i18n = {
|
|
10
|
-
experiment: {
|
|
11
|
-
BADGE: 'Experiment',
|
|
12
|
-
POPOVER_TITLE: "What's an Experiment?",
|
|
13
|
-
POPOVER_CONTENT: "An %{linkStart}Experiment%{linkEnd} is a feature that's in the process of being developed. It's not production-ready. We encourage users to try Experimental features and provide feedback. An Experiment: %{bullets}",
|
|
14
|
-
POPOVER_BULLETS: ['May be unstable', 'Has no support and might not be documented', 'Can be removed at any time']
|
|
15
|
-
},
|
|
16
|
-
beta: {
|
|
17
|
-
BADGE: 'Beta',
|
|
18
|
-
POPOVER_TITLE: "What's a Beta?",
|
|
19
|
-
POPOVER_CONTENT: "A %{linkStart}Beta%{linkEnd} feature is not production-ready, but is unlikely to change drastically before it's released. We encourage users to try Beta features and provide feedback.\nA Beta feature: %{bullets}",
|
|
20
|
-
POPOVER_BULLETS: ['May be unstable', 'Should not cause data loss', 'Is supported by a commercially reasonable effort', 'Is complete or near completion']
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var script = {
|
|
24
|
-
name: 'GlExperimentBadge',
|
|
25
|
-
components: {
|
|
26
|
-
GlBadge,
|
|
27
|
-
GlPopover,
|
|
28
|
-
GlSprintf,
|
|
29
|
-
GlLink
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
/**
|
|
33
|
-
* The URL of a page to provide more explanations on the experiment.
|
|
34
|
-
*/
|
|
35
|
-
helpPageUrl: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: false,
|
|
38
|
-
default: ''
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* The placement of the popover in relation to the button.
|
|
42
|
-
*/
|
|
43
|
-
popoverPlacement: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: false,
|
|
46
|
-
default: 'bottom'
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* The type of the badge.
|
|
50
|
-
*/
|
|
51
|
-
type: {
|
|
52
|
-
type: String,
|
|
53
|
-
required: false,
|
|
54
|
-
default: badgeTypes[0],
|
|
55
|
-
validator: badgeTypeValidator
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
computed: {
|
|
59
|
-
activeType() {
|
|
60
|
-
return i18n[this.type];
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
created() {
|
|
64
|
-
this.triggerId = uniqueId('experiment-badge-');
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/* script */
|
|
69
|
-
const __vue_script__ = script;
|
|
70
|
-
|
|
71
|
-
/* template */
|
|
72
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-badge',{staticClass:"gl-mx-4 gl-hover-cursor-pointer",attrs:{"id":_vm.triggerId,"variant":"neutral","size":"md"}},[_c('span',[_vm._v(_vm._s(_vm.activeType.BADGE))]),_vm._v(" "),_c('gl-popover',{attrs:{"triggers":"click","show-close-button":"","placement":_vm.popoverPlacement,"target":_vm.triggerId,"css-classes":['gl-z-index-9999!'],"title":_vm.activeType.POPOVER_TITLE}},[_c('gl-sprintf',{attrs:{"message":_vm.activeType.POPOVER_CONTENT},scopedSlots:_vm._u([{key:"link",fn:function(ref){
|
|
73
|
-
var content = ref.content;
|
|
74
|
-
return [(_vm.helpPageUrl)?_c('gl-link',{staticClass:"gl-font-sm!",attrs:{"href":_vm.helpPageUrl,"target":"_blank"}},[_vm._v("\n "+_vm._s(content)+"\n ")]):_c('span',[_vm._v(_vm._s(content))])]}},{key:"bullets",fn:function(){return [_c('ul',{staticClass:"gl-mb-0 gl-pl-5"},_vm._l((_vm.activeType.POPOVER_BULLETS),function(item,i){return _c('li',{key:("li-" + i)},[_vm._v("\n "+_vm._s(item)+"\n ")])}),0)]},proxy:true}])})],1)],1)};
|
|
75
|
-
var __vue_staticRenderFns__ = [];
|
|
76
|
-
|
|
77
|
-
/* style */
|
|
78
|
-
const __vue_inject_styles__ = undefined;
|
|
79
|
-
/* scoped */
|
|
80
|
-
const __vue_scope_id__ = undefined;
|
|
81
|
-
/* module identifier */
|
|
82
|
-
const __vue_module_identifier__ = undefined;
|
|
83
|
-
/* functional template */
|
|
84
|
-
const __vue_is_functional_template__ = false;
|
|
85
|
-
/* style inject */
|
|
86
|
-
|
|
87
|
-
/* style inject SSR */
|
|
88
|
-
|
|
89
|
-
/* style inject shadow dom */
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const __vue_component__ = __vue_normalize__(
|
|
94
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
95
|
-
__vue_inject_styles__,
|
|
96
|
-
__vue_script__,
|
|
97
|
-
__vue_scope_id__,
|
|
98
|
-
__vue_is_functional_template__,
|
|
99
|
-
__vue_module_identifier__,
|
|
100
|
-
false,
|
|
101
|
-
undefined,
|
|
102
|
-
undefined,
|
|
103
|
-
undefined
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
export default __vue_component__;
|
|
107
|
-
export { i18n };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SafeLinkDirective } from '../../directives/safe_link/safe_link';
|
|
2
|
-
|
|
3
|
-
const SafeLinkMixin = {
|
|
4
|
-
directives: {
|
|
5
|
-
SafeLink: SafeLinkDirective
|
|
6
|
-
},
|
|
7
|
-
props: {
|
|
8
|
-
isUnsafeLink: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
required: false,
|
|
11
|
-
default: false
|
|
12
|
-
},
|
|
13
|
-
// This prevents bootstrap-vue from setting target="_self"
|
|
14
|
-
// when target attribute is not present
|
|
15
|
-
target: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
default: null
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
safeLinkConfig() {
|
|
23
|
-
return {
|
|
24
|
-
skipSanitization: this.isUnsafeLink
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { SafeLinkMixin };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { tooltipActionEvents } from '../../utils/constants';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line import/no-default-export
|
|
4
|
-
var tooltip_mixin = (tooltipRefName => ({
|
|
5
|
-
mounted() {
|
|
6
|
-
/**
|
|
7
|
-
* Pass through the events to programmatically open, close, enable
|
|
8
|
-
* and disable a tooltip or a popover.
|
|
9
|
-
*
|
|
10
|
-
* References
|
|
11
|
-
* https://bootstrap-vue.org/docs/components/popover#programmatically-show-and-hide-popover
|
|
12
|
-
* https://bootstrap-vue.org/docs/components/tooltip#programmatically-show-and-hide-tooltip
|
|
13
|
-
*/
|
|
14
|
-
tooltipActionEvents.forEach(event => this.$on(event, () => this.$refs[tooltipRefName].$emit(event)));
|
|
15
|
-
},
|
|
16
|
-
beforeDestroy() {
|
|
17
|
-
tooltipActionEvents.forEach(event => this.$off(event));
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
export default tooltip_mixin;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
name: 'GlDashboardSkeleton',
|
|
5
|
-
props: {
|
|
6
|
-
/**
|
|
7
|
-
* Number of cards to be shown
|
|
8
|
-
*/
|
|
9
|
-
cards: {
|
|
10
|
-
type: Number,
|
|
11
|
-
required: false,
|
|
12
|
-
default: 3
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/* script */
|
|
18
|
-
const __vue_script__ = script;
|
|
19
|
-
|
|
20
|
-
/* template */
|
|
21
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"row dashboard-cards"},_vm._l((_vm.cards),function(index){return _c('div',{key:index,staticClass:"col-12 col-md-6 col-xl-4 px-2"},[_c('div',{staticClass:"rounded-top py-4 bg-light"}),_vm._v(" "),_vm._m(0,true)])}),0)};
|
|
22
|
-
var __vue_staticRenderFns__ = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"dashboard-card-body card-body bg-secondary"},[_c('div',{staticClass:"row"},[_c('div',{staticClass:"col-1 align-self-center"},[_c('div',{staticClass:"bg-light p-3 rounded-circle"})]),_vm._v(" "),_c('div',{staticClass:"col-10 col-sm-6 align-self-center pl-4"},[_c('div',{staticClass:"dashboard-card-skeleton-info bg-light py-2 w-100 mb-2"}),_vm._v(" "),_c('div',{staticClass:"dashboard-card-skeleton-info bg-light py-2 w-100"})]),_vm._v(" "),_c('div',{staticClass:"col-sm-5 align-self-center d-none d-sm-block"},[_c('div',{staticClass:"dashboard-card-skeleton-info bg-light py-2 w-100"})])]),_vm._v(" "),_c('div',{staticClass:"dashboard-card-footer bg-light py-3 mt-3"})])}];
|
|
23
|
-
|
|
24
|
-
/* style */
|
|
25
|
-
const __vue_inject_styles__ = undefined;
|
|
26
|
-
/* scoped */
|
|
27
|
-
const __vue_scope_id__ = undefined;
|
|
28
|
-
/* module identifier */
|
|
29
|
-
const __vue_module_identifier__ = undefined;
|
|
30
|
-
/* functional template */
|
|
31
|
-
const __vue_is_functional_template__ = false;
|
|
32
|
-
/* style inject */
|
|
33
|
-
|
|
34
|
-
/* style inject SSR */
|
|
35
|
-
|
|
36
|
-
/* style inject shadow dom */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const __vue_component__ = __vue_normalize__(
|
|
41
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
42
|
-
__vue_inject_styles__,
|
|
43
|
-
__vue_script__,
|
|
44
|
-
__vue_scope_id__,
|
|
45
|
-
__vue_is_functional_template__,
|
|
46
|
-
__vue_module_identifier__,
|
|
47
|
-
false,
|
|
48
|
-
undefined,
|
|
49
|
-
undefined,
|
|
50
|
-
undefined
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export default __vue_component__;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import GlButton from '../../base/button/button';
|
|
2
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
-
|
|
4
|
-
var script = {
|
|
5
|
-
name: 'GlEmptyState',
|
|
6
|
-
components: {
|
|
7
|
-
GlButton
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
/**
|
|
11
|
-
* The title (heading) of the empty state.
|
|
12
|
-
*/
|
|
13
|
-
title: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: false,
|
|
16
|
-
default: null
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* The illustration's URL.
|
|
20
|
-
*/
|
|
21
|
-
svgPath: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: false,
|
|
24
|
-
default: null
|
|
25
|
-
},
|
|
26
|
-
/**
|
|
27
|
-
* The illustration's height used to prevent content reflow.
|
|
28
|
-
*/
|
|
29
|
-
svgHeight: {
|
|
30
|
-
type: Number,
|
|
31
|
-
required: false,
|
|
32
|
-
default: 144
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* The desciption/body text of the empty state.
|
|
36
|
-
*/
|
|
37
|
-
description: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
default: null
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* The primary GlButton's href.
|
|
44
|
-
*/
|
|
45
|
-
primaryButtonLink: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false,
|
|
48
|
-
default: null
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* The primary GlButton's text. If falsey, the button is not shown.
|
|
52
|
-
*/
|
|
53
|
-
primaryButtonText: {
|
|
54
|
-
type: String,
|
|
55
|
-
required: false,
|
|
56
|
-
default: null
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* The secondary GlButton's href.
|
|
60
|
-
*/
|
|
61
|
-
secondaryButtonLink: {
|
|
62
|
-
type: String,
|
|
63
|
-
required: false,
|
|
64
|
-
default: null
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* The secondary GlButton's text. If falsey, the button is not shown.
|
|
68
|
-
*/
|
|
69
|
-
secondaryButtonText: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: false,
|
|
72
|
-
default: null
|
|
73
|
-
},
|
|
74
|
-
/**
|
|
75
|
-
* Determines whether to render the compact layout.
|
|
76
|
-
*/
|
|
77
|
-
compact: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
required: false,
|
|
80
|
-
default: false
|
|
81
|
-
},
|
|
82
|
-
invertInDarkMode: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
required: false,
|
|
85
|
-
default: true
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
* CSS classes to add to the content container
|
|
89
|
-
*/
|
|
90
|
-
contentClass: {
|
|
91
|
-
type: [Array, String, Object],
|
|
92
|
-
required: false,
|
|
93
|
-
default: () => []
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
computed: {
|
|
97
|
-
height() {
|
|
98
|
-
return this.shouldPreventImageReflow ? this.svgHeight : null;
|
|
99
|
-
},
|
|
100
|
-
shouldPreventImageReflow() {
|
|
101
|
-
return Boolean(this.svgHeight);
|
|
102
|
-
},
|
|
103
|
-
shouldRenderPrimaryButton() {
|
|
104
|
-
return Boolean(this.primaryButtonLink && this.primaryButtonText);
|
|
105
|
-
},
|
|
106
|
-
shouldRenderSecondaryButton() {
|
|
107
|
-
return Boolean(this.secondaryButtonLink && this.secondaryButtonText);
|
|
108
|
-
},
|
|
109
|
-
contentClasses() {
|
|
110
|
-
return [this.compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-m-auto gl-p-5', this.contentClass];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/* script */
|
|
116
|
-
const __vue_script__ = script;
|
|
117
|
-
|
|
118
|
-
/* template */
|
|
119
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"gl-display-flex",class:{
|
|
120
|
-
'gl-empty-state gl-text-center gl-flex-direction-column': !_vm.compact,
|
|
121
|
-
'gl-flex-direction-row': _vm.compact,
|
|
122
|
-
}},[_c('div',{class:{ 'gl-display-none gl-sm-display-block gl-px-4': _vm.compact, 'gl-max-w-full': !_vm.compact }},[(_vm.svgPath)?_c('img',{staticClass:"gl-max-w-full",class:{ 'gl-dark-invert-keep-hue': _vm.invertInDarkMode },attrs:{"src":_vm.svgPath,"alt":"","height":_vm.height}}):_vm._e()]),_vm._v(" "),_c('div',{staticClass:"gl-empty-state-content gl-mx-auto gl-my-0",class:_vm.contentClasses,attrs:{"data-testid":"gl-empty-state-content"}},[_vm._t("title",function(){return [_c('h1',{staticClass:"gl-font-size-h-display gl-line-height-36 gl-mt-0 gl-mb-0",class:_vm.compact ? 'h5' : 'h4'},[_vm._v("\n "+_vm._s(_vm.title)+"\n ")])]}),_vm._v(" "),(_vm.description || _vm.$scopedSlots.description)?_c('p',{ref:"description",staticClass:"gl-mt-4 gl-mb-0"},[_vm._t("description",function(){return [_vm._v("\n "+_vm._s(_vm.description)+"\n ")]})],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-flex-wrap gl-mt-5",class:{ 'gl-justify-content-center': !_vm.compact }},[_vm._t("actions",function(){return [(_vm.shouldRenderPrimaryButton)?_c('gl-button',{staticClass:"gl-mb-3",class:_vm.compact ? 'gl-mr-3' : 'gl-mx-2',attrs:{"variant":"confirm","href":_vm.primaryButtonLink}},[_vm._v(_vm._s(_vm.primaryButtonText))]):_vm._e(),_vm._v(" "),(_vm.shouldRenderSecondaryButton)?_c('gl-button',{staticClass:"gl-mb-3 gl-mr-3",class:{ 'gl-mx-2!': !_vm.compact },attrs:{"href":_vm.secondaryButtonLink}},[_vm._v(_vm._s(_vm.secondaryButtonText)+"\n ")]):_vm._e()]})],2)],2)])};
|
|
123
|
-
var __vue_staticRenderFns__ = [];
|
|
124
|
-
|
|
125
|
-
/* style */
|
|
126
|
-
const __vue_inject_styles__ = undefined;
|
|
127
|
-
/* scoped */
|
|
128
|
-
const __vue_scope_id__ = undefined;
|
|
129
|
-
/* module identifier */
|
|
130
|
-
const __vue_module_identifier__ = undefined;
|
|
131
|
-
/* functional template */
|
|
132
|
-
const __vue_is_functional_template__ = false;
|
|
133
|
-
/* style inject */
|
|
134
|
-
|
|
135
|
-
/* style inject SSR */
|
|
136
|
-
|
|
137
|
-
/* style inject shadow dom */
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const __vue_component__ = __vue_normalize__(
|
|
142
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
143
|
-
__vue_inject_styles__,
|
|
144
|
-
__vue_script__,
|
|
145
|
-
__vue_scope_id__,
|
|
146
|
-
__vue_is_functional_template__,
|
|
147
|
-
__vue_module_identifier__,
|
|
148
|
-
false,
|
|
149
|
-
undefined,
|
|
150
|
-
undefined,
|
|
151
|
-
undefined
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
export default __vue_component__;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import SeriesLabel from '../../charts/series_label/series_label';
|
|
2
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
-
|
|
4
|
-
var script = {
|
|
5
|
-
name: 'TooltipDefaultFormat',
|
|
6
|
-
components: {
|
|
7
|
-
SeriesLabel
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
tooltipContent: {
|
|
11
|
-
type: Object,
|
|
12
|
-
required: true
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/* script */
|
|
18
|
-
const __vue_script__ = script;
|
|
19
|
-
|
|
20
|
-
/* template */
|
|
21
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.tooltipContent),function(value,label){return _c('div',{key:("" + label + (value.value)),staticClass:"gl-charts-tooltip-default-format-series"},[_c('series-label',{staticClass:"gl-charts-tooltip-default-format-series-label",attrs:{"color":value.color}},[_vm._v("\n "+_vm._s(label)+"\n ")]),_vm._v(" "),_c('div',{staticClass:"gl-charts-tooltip-default-format-series-value"},[_vm._t("tooltip-value",function(){return [_vm._v(_vm._s(value.value))]},{"value":value.value})],2)],1)}),0)};
|
|
22
|
-
var __vue_staticRenderFns__ = [];
|
|
23
|
-
|
|
24
|
-
/* style */
|
|
25
|
-
const __vue_inject_styles__ = undefined;
|
|
26
|
-
/* scoped */
|
|
27
|
-
const __vue_scope_id__ = undefined;
|
|
28
|
-
/* module identifier */
|
|
29
|
-
const __vue_module_identifier__ = undefined;
|
|
30
|
-
/* functional template */
|
|
31
|
-
const __vue_is_functional_template__ = false;
|
|
32
|
-
/* style inject */
|
|
33
|
-
|
|
34
|
-
/* style inject SSR */
|
|
35
|
-
|
|
36
|
-
/* style inject shadow dom */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const __vue_component__ = __vue_normalize__(
|
|
41
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
42
|
-
__vue_inject_styles__,
|
|
43
|
-
__vue_script__,
|
|
44
|
-
__vue_scope_id__,
|
|
45
|
-
__vue_is_functional_template__,
|
|
46
|
-
__vue_module_identifier__,
|
|
47
|
-
false,
|
|
48
|
-
undefined,
|
|
49
|
-
undefined,
|
|
50
|
-
undefined
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export default __vue_component__;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { GlTooltipDirective } from '../../../directives/tooltip';
|
|
2
|
-
import GlButton from '../../base/button/button';
|
|
3
|
-
import { translate } from '../../../utils/i18n';
|
|
4
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
-
|
|
6
|
-
var script = {
|
|
7
|
-
name: 'ClearIconButton',
|
|
8
|
-
components: {
|
|
9
|
-
GlButton
|
|
10
|
-
},
|
|
11
|
-
directives: {
|
|
12
|
-
GlTooltip: GlTooltipDirective
|
|
13
|
-
},
|
|
14
|
-
props: {
|
|
15
|
-
title: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
default: () => translate('ClearIconButton.title', 'Clear')
|
|
19
|
-
},
|
|
20
|
-
tooltipContainer: {
|
|
21
|
-
required: false,
|
|
22
|
-
default: false,
|
|
23
|
-
validator: value => value === false || typeof value === 'string' || value instanceof HTMLElement
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/* script */
|
|
29
|
-
const __vue_script__ = script;
|
|
30
|
-
|
|
31
|
-
/* template */
|
|
32
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button',_vm._g({directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",value:({ container: _vm.tooltipContainer }),expression:"{ container: tooltipContainer }",modifiers:{"hover":true}}],staticClass:"gl-clear-icon-button",attrs:{"variant":"default","category":"tertiary","size":"small","name":"clear","icon":"clear","title":_vm.title,"aria-label":_vm.title}},_vm.$listeners))};
|
|
33
|
-
var __vue_staticRenderFns__ = [];
|
|
34
|
-
|
|
35
|
-
/* style */
|
|
36
|
-
const __vue_inject_styles__ = undefined;
|
|
37
|
-
/* scoped */
|
|
38
|
-
const __vue_scope_id__ = undefined;
|
|
39
|
-
/* module identifier */
|
|
40
|
-
const __vue_module_identifier__ = undefined;
|
|
41
|
-
/* functional template */
|
|
42
|
-
const __vue_is_functional_template__ = false;
|
|
43
|
-
/* style inject */
|
|
44
|
-
|
|
45
|
-
/* style inject SSR */
|
|
46
|
-
|
|
47
|
-
/* style inject shadow dom */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const __vue_component__ = __vue_normalize__(
|
|
52
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
53
|
-
__vue_inject_styles__,
|
|
54
|
-
__vue_script__,
|
|
55
|
-
__vue_scope_id__,
|
|
56
|
-
__vue_is_functional_template__,
|
|
57
|
-
__vue_module_identifier__,
|
|
58
|
-
false,
|
|
59
|
-
undefined,
|
|
60
|
-
undefined,
|
|
61
|
-
undefined
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
export default __vue_component__;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import GlButton from '../../base/button/button';
|
|
2
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
-
|
|
4
|
-
var script = {
|
|
5
|
-
name: 'CloseButton',
|
|
6
|
-
components: {
|
|
7
|
-
GlButton
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
label: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: false,
|
|
13
|
-
default: 'Close'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/* script */
|
|
19
|
-
const __vue_script__ = script;
|
|
20
|
-
|
|
21
|
-
/* template */
|
|
22
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button',_vm._g(_vm._b({attrs:{"category":"tertiary","size":"small","icon":"close","aria-label":_vm.label}},'gl-button',_vm.$attrs,false),_vm.$listeners))};
|
|
23
|
-
var __vue_staticRenderFns__ = [];
|
|
24
|
-
|
|
25
|
-
/* style */
|
|
26
|
-
const __vue_inject_styles__ = undefined;
|
|
27
|
-
/* scoped */
|
|
28
|
-
const __vue_scope_id__ = undefined;
|
|
29
|
-
/* module identifier */
|
|
30
|
-
const __vue_module_identifier__ = undefined;
|
|
31
|
-
/* functional template */
|
|
32
|
-
const __vue_is_functional_template__ = false;
|
|
33
|
-
/* style inject */
|
|
34
|
-
|
|
35
|
-
/* style inject SSR */
|
|
36
|
-
|
|
37
|
-
/* style inject shadow dom */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const __vue_component__ = __vue_normalize__(
|
|
42
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
43
|
-
__vue_inject_styles__,
|
|
44
|
-
__vue_script__,
|
|
45
|
-
__vue_scope_id__,
|
|
46
|
-
__vue_is_functional_template__,
|
|
47
|
-
__vue_module_identifier__,
|
|
48
|
-
false,
|
|
49
|
-
undefined,
|
|
50
|
-
undefined,
|
|
51
|
-
undefined
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export default __vue_component__;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { formatNumberToLocale } from '../../../utils/number_utils';
|
|
2
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
-
|
|
4
|
-
var script = {
|
|
5
|
-
name: 'AnimatedNumber',
|
|
6
|
-
props: {
|
|
7
|
-
number: {
|
|
8
|
-
type: Number,
|
|
9
|
-
required: true
|
|
10
|
-
},
|
|
11
|
-
/**
|
|
12
|
-
* Controls how long it takes for the animation to complete.
|
|
13
|
-
*/
|
|
14
|
-
duration: {
|
|
15
|
-
type: Number,
|
|
16
|
-
required: false,
|
|
17
|
-
default: 2000
|
|
18
|
-
},
|
|
19
|
-
/**
|
|
20
|
-
* Controls the number of decimal places displayed in the output.
|
|
21
|
-
*/
|
|
22
|
-
decimalPlaces: {
|
|
23
|
-
type: Number,
|
|
24
|
-
required: false,
|
|
25
|
-
default: 0
|
|
26
|
-
},
|
|
27
|
-
useDelimiters: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
required: false,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
animateOnMount: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
required: false,
|
|
35
|
-
default: false
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
displayNumber: 0,
|
|
41
|
-
startTime: null
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
computed: {
|
|
45
|
-
animatedNumber() {
|
|
46
|
-
const number = this.displayNumber.toFixed(this.decimalPlaces);
|
|
47
|
-
if (this.useDelimiters) {
|
|
48
|
-
return formatNumberToLocale(number, {
|
|
49
|
-
minimumFractionDigits: this.decimalPlaces
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return number;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
ready() {
|
|
56
|
-
this.displayNumber = this.number ? this.number : 0;
|
|
57
|
-
},
|
|
58
|
-
watch: {
|
|
59
|
-
number() {
|
|
60
|
-
this.animate();
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
mounted() {
|
|
64
|
-
if (this.animateOnMount) {
|
|
65
|
-
this.animate();
|
|
66
|
-
} else {
|
|
67
|
-
this.displayNumber = this.number;
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
methods: {
|
|
71
|
-
animate() {
|
|
72
|
-
this.$emit('animating');
|
|
73
|
-
window.requestAnimationFrame(this.count);
|
|
74
|
-
},
|
|
75
|
-
count(timestamp) {
|
|
76
|
-
if (!this.startTime) {
|
|
77
|
-
this.startTime = timestamp;
|
|
78
|
-
}
|
|
79
|
-
const progress = timestamp - this.startTime;
|
|
80
|
-
if (progress < this.duration) {
|
|
81
|
-
if (this.displayNumber !== this.number) {
|
|
82
|
-
const change = (this.number - this.displayNumber) / (this.duration / 100);
|
|
83
|
-
this.displayNumber += change;
|
|
84
|
-
}
|
|
85
|
-
window.requestAnimationFrame(this.count);
|
|
86
|
-
} else {
|
|
87
|
-
this.displayNumber = this.number; // Ensures that the final number is accurate.
|
|
88
|
-
this.startTime = null;
|
|
89
|
-
this.$emit('animated');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/* script */
|
|
96
|
-
const __vue_script__ = script;
|
|
97
|
-
|
|
98
|
-
/* template */
|
|
99
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_vm._v(_vm._s(_vm.animatedNumber))])};
|
|
100
|
-
var __vue_staticRenderFns__ = [];
|
|
101
|
-
|
|
102
|
-
/* style */
|
|
103
|
-
const __vue_inject_styles__ = undefined;
|
|
104
|
-
/* scoped */
|
|
105
|
-
const __vue_scope_id__ = undefined;
|
|
106
|
-
/* module identifier */
|
|
107
|
-
const __vue_module_identifier__ = undefined;
|
|
108
|
-
/* functional template */
|
|
109
|
-
const __vue_is_functional_template__ = false;
|
|
110
|
-
/* style inject */
|
|
111
|
-
|
|
112
|
-
/* style inject SSR */
|
|
113
|
-
|
|
114
|
-
/* style inject shadow dom */
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const __vue_component__ = __vue_normalize__(
|
|
119
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
120
|
-
__vue_inject_styles__,
|
|
121
|
-
__vue_script__,
|
|
122
|
-
__vue_scope_id__,
|
|
123
|
-
__vue_is_functional_template__,
|
|
124
|
-
__vue_module_identifier__,
|
|
125
|
-
false,
|
|
126
|
-
undefined,
|
|
127
|
-
undefined,
|
|
128
|
-
undefined
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
export default __vue_component__;
|