@gitlab/ui 32.43.3 → 32.46.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 +29 -0
- package/config.js +15 -3
- package/dist/components/base/avatar/avatar.documentation.js +2 -5
- package/dist/components/base/avatar_link/avatar_link.documentation.js +2 -5
- package/dist/components/base/form/form_group/form_group.js +11 -1
- package/dist/components/base/form/form_input/form_input.documentation.js +2 -27
- package/dist/components/base/form/form_input/form_input.js +23 -6
- package/dist/components/base/form/form_text/form_text.documentation.js +1 -4
- package/dist/components/base/label/label.documentation.js +2 -9
- package/dist/components/base/label/label.js +23 -1
- package/dist/components/base/pagination/pagination.documentation.js +2 -85
- package/dist/components/base/pagination/pagination.js +76 -0
- package/dist/components/base/segmented_control/segmented_control.documentation.js +2 -14
- package/dist/components/base/segmented_control/segmented_control.js +6 -0
- package/dist/components/base/skeleton_loader/skeleton_loader.documentation.js +2 -28
- package/dist/components/base/skeleton_loader/skeleton_loader.js +30 -0
- package/dist/components/charts/chart/chart.js +17 -4
- package/dist/components/charts/discrete_scatter/discrete_scatter.documentation.js +1 -7
- package/dist/components/charts/heatmap/heatmap.js +1 -9
- package/dist/components/charts/sparkline/sparkline.js +1 -1
- package/dist/components/charts/stacked_column/stacked_column.documentation.js +2 -5
- package/dist/config.js +15 -3
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/documentation/documented_stories.js +9 -0
- package/package.json +11 -10
- package/src/components/base/alert/alert.spec.js +2 -2
- package/src/components/base/avatar/avatar.documentation.js +0 -2
- package/src/components/base/avatar/avatar.md +0 -2
- package/src/components/base/avatar/avatar.spec.js +1 -2
- package/src/components/base/avatar/avatar.stories.js +88 -101
- package/src/components/base/avatar_link/avatar_link.documentation.js +0 -2
- package/src/components/base/avatar_link/avatar_link.md +4 -7
- package/src/components/base/avatar_link/avatar_link.stories.js +66 -54
- package/src/components/base/filtered_search/filtered_search.spec.js +35 -35
- package/src/components/base/filtered_search/filtered_search_term.spec.js +1 -1
- package/src/components/base/form/form_group/form_group.scss +4 -0
- package/src/components/base/form/form_group/form_group.spec.js +66 -64
- package/src/components/base/form/form_group/form_group.stories.js +36 -13
- package/src/components/base/form/form_group/form_group.vue +15 -2
- package/src/components/base/form/form_input/form_input.documentation.js +0 -31
- package/src/components/base/form/form_input/form_input.md +0 -2
- package/src/components/base/form/form_input/form_input.stories.js +50 -42
- package/src/components/base/form/form_input/form_input.vue +23 -6
- package/src/components/base/form/form_input_group/form_input_group.spec.js +1 -3
- package/src/components/base/form/form_text/form_text.documentation.js +0 -2
- package/src/components/base/form/form_text/form_text.md +1 -3
- package/src/components/base/form/form_text/form_text.stories.js +20 -8
- package/src/components/base/icon/icon.spec.js +1 -4
- package/src/components/base/infinite_scroll/infinite_scroll.spec.js +1 -4
- package/src/components/base/label/label.documentation.js +2 -12
- package/src/components/base/label/label.md +2 -7
- package/src/components/base/label/label.stories.js +66 -92
- package/src/components/base/label/label.vue +22 -2
- package/src/components/base/modal/modal.spec.js +19 -23
- package/src/components/base/paginated_list/__snapshots__/paginated_list.spec.js.snap +10 -10
- package/src/components/base/pagination/pagination.documentation.js +0 -100
- package/src/components/base/pagination/pagination.md +5 -9
- package/src/components/base/pagination/pagination.spec.js +1 -4
- package/src/components/base/pagination/pagination.stories.js +109 -117
- package/src/components/base/pagination/pagination.vue +85 -0
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +1 -5
- package/src/components/base/segmented_control/segmented_control.documentation.js +0 -15
- package/src/components/base/segmented_control/segmented_control.md +0 -2
- package/src/components/base/segmented_control/segmented_control.stories.js +46 -36
- package/src/components/base/segmented_control/segmented_control.vue +5 -0
- package/src/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -27
- package/src/components/base/skeleton_loader/skeleton_loader.md +0 -2
- package/src/components/base/skeleton_loader/skeleton_loader.stories.js +23 -9
- package/src/components/base/skeleton_loader/skeleton_loader.vue +24 -0
- package/src/components/base/sorting/sorting.spec.js +1 -4
- package/src/components/base/toast/toast.spec.js +4 -6
- package/src/components/base/token/token.spec.js +1 -4
- package/src/components/base/token_selector/token_container.spec.js +2 -3
- package/src/components/charts/chart/chart.spec.js +33 -4
- package/src/components/charts/chart/chart.vue +16 -4
- package/src/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -5
- package/src/components/charts/discrete_scatter/discrete_scatter.stories.js +34 -46
- package/src/components/charts/gauge/gauge.spec.js +7 -7
- package/src/components/charts/heatmap/heatmap.vue +2 -9
- package/src/components/charts/sparkline/sparkline.spec.js +1 -4
- package/src/components/charts/sparkline/sparkline.vue +7 -1
- package/src/components/charts/stacked_column/stacked_column.documentation.js +0 -2
- package/src/components/charts/stacked_column/stacked_column.md +0 -2
- package/src/components/charts/stacked_column/stacked_column.stories.js +74 -99
- package/src/components/utilities/friendly_wrap/friendly_wrap.spec.js +1 -4
- package/src/components/utilities/intersperse/intersperse.spec.js +1 -4
- package/src/directives/hover_load/hover_load.spec.js +2 -13
- package/src/directives/outside/outside.spec.js +1 -6
- package/src/directives/resize_observer/resize_observer.spec.js +4 -10
- package/src/scss/storybook.scss +8 -0
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/transform.scss +4 -0
- package/dist/components/base/avatar/examples/avatar.fallback.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.image.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.rect.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.tooltip.example.js +0 -38
- package/dist/components/base/avatar/examples/index.js +0 -31
- package/dist/components/base/avatar_link/examples/avatar.link.example.js +0 -38
- package/dist/components/base/avatar_link/examples/index.js +0 -13
- package/dist/components/base/form/form_input/examples/form_input/form_input.text.example.js +0 -38
- package/dist/components/base/form/form_input/examples/form_input/form_input.text_disabled.example.js +0 -38
- package/dist/components/base/form/form_input/examples/form_input/form_input.text_reactive.example.js +0 -57
- package/dist/components/base/form/form_input/examples/form_input/index.js +0 -22
- package/dist/components/base/form/form_text/examples/form_text.basic.example.js +0 -38
- package/dist/components/base/form/form_text/examples/index.js +0 -13
- package/dist/components/base/label/examples/index.js +0 -19
- package/dist/components/base/label/examples/label.basic.example.js +0 -38
- package/dist/components/base/label/examples/label.scoped.example.js +0 -38
- package/dist/components/base/pagination/examples/index.js +0 -37
- package/dist/components/base/pagination/examples/pagination.basic.example.js +0 -45
- package/dist/components/base/pagination/examples/pagination.compact.example.js +0 -58
- package/dist/components/base/pagination/examples/pagination.double_truncation.example.js +0 -45
- package/dist/components/base/pagination/examples/pagination.event.example.js +0 -51
- package/dist/components/base/pagination/examples/pagination.links.example.js +0 -45
- package/dist/components/base/segmented_control/examples/index.js +0 -19
- package/dist/components/base/segmented_control/examples/segmented_control.basic.example.js +0 -65
- package/dist/components/base/segmented_control/examples/segmented_control.whitespace.example.js +0 -55
- package/dist/components/base/skeleton_loader/examples/ci_header_skeleton.basic.example.js +0 -38
- package/dist/components/base/skeleton_loader/examples/default_skeleton.basic.example.js +0 -38
- package/dist/components/base/skeleton_loader/examples/default_skeleton_custom_props.basic.example.js +0 -38
- package/dist/components/base/skeleton_loader/examples/index.js +0 -37
- package/dist/components/base/skeleton_loader/examples/issue_card_skeleton.basic.example.js +0 -38
- package/dist/components/base/skeleton_loader/examples/job_log_skeleton.basic.example.js +0 -38
- package/dist/components/charts/discrete_scatter/examples/discrete_scatter.basic.example.js +0 -51
- package/dist/components/charts/discrete_scatter/examples/index.js +0 -13
- package/dist/components/charts/stacked_column/examples/index.js +0 -13
- package/dist/components/charts/stacked_column/examples/stacked_column.basic.example.js +0 -46
- package/src/components/base/avatar/examples/avatar.fallback.example.vue +0 -3
- package/src/components/base/avatar/examples/avatar.image.example.vue +0 -3
- package/src/components/base/avatar/examples/avatar.rect.example.vue +0 -6
- package/src/components/base/avatar/examples/avatar.tooltip.example.vue +0 -3
- package/src/components/base/avatar/examples/index.js +0 -36
- package/src/components/base/avatar_link/examples/avatar.link.example.vue +0 -5
- package/src/components/base/avatar_link/examples/index.js +0 -15
- package/src/components/base/form/form_input/examples/form_input/form_input.text.example.vue +0 -3
- package/src/components/base/form/form_input/examples/form_input/form_input.text_disabled.example.vue +0 -3
- package/src/components/base/form/form_input/examples/form_input/form_input.text_reactive.example.vue +0 -24
- package/src/components/base/form/form_input/examples/form_input/index.js +0 -26
- package/src/components/base/form/form_text/examples/form_text.basic.example.vue +0 -5
- package/src/components/base/form/form_text/examples/index.js +0 -15
- package/src/components/base/label/examples/index.js +0 -22
- package/src/components/base/label/examples/label.basic.example.vue +0 -3
- package/src/components/base/label/examples/label.scoped.example.vue +0 -3
- package/src/components/base/pagination/examples/index.js +0 -43
- package/src/components/base/pagination/examples/pagination.basic.example.vue +0 -17
- package/src/components/base/pagination/examples/pagination.compact.example.vue +0 -33
- package/src/components/base/pagination/examples/pagination.double_truncation.example.vue +0 -11
- package/src/components/base/pagination/examples/pagination.event.example.vue +0 -26
- package/src/components/base/pagination/examples/pagination.links.example.vue +0 -18
- package/src/components/base/segmented_control/examples/index.js +0 -22
- package/src/components/base/segmented_control/examples/segmented_control.basic.example.vue +0 -19
- package/src/components/base/segmented_control/examples/segmented_control.whitespace.example.vue +0 -18
- package/src/components/base/skeleton_loader/examples/ci_header_skeleton.basic.example.vue +0 -10
- package/src/components/base/skeleton_loader/examples/default_skeleton.basic.example.vue +0 -3
- package/src/components/base/skeleton_loader/examples/default_skeleton_custom_props.basic.example.vue +0 -9
- package/src/components/base/skeleton_loader/examples/index.js +0 -44
- package/src/components/base/skeleton_loader/examples/issue_card_skeleton.basic.example.vue +0 -26
- package/src/components/base/skeleton_loader/examples/job_log_skeleton.basic.example.vue +0 -13
- package/src/components/charts/discrete_scatter/discrete_scatter.md +0 -1
- package/src/components/charts/discrete_scatter/examples/discrete_scatter.basic.example.vue +0 -31
- package/src/components/charts/discrete_scatter/examples/index.js +0 -15
- package/src/components/charts/stacked_column/examples/index.js +0 -15
- package/src/components/charts/stacked_column/examples/stacked_column.basic.example.vue +0 -18
|
@@ -12,36 +12,66 @@ var script = {
|
|
|
12
12
|
name: 'GlSkeletonLoader',
|
|
13
13
|
functional: true,
|
|
14
14
|
props: {
|
|
15
|
+
/**
|
|
16
|
+
* It will be set in the viewbox attr in the <svg />.
|
|
17
|
+
* Defaults to 400 when skeleton is passed via the slot. Defaults to 235 when default skeleton is used
|
|
18
|
+
*/
|
|
15
19
|
width: {
|
|
16
20
|
type: Number,
|
|
17
21
|
default: null,
|
|
18
22
|
required: false
|
|
19
23
|
},
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* It will be set in the viewbox attr in the <svg />. Defaults to 130 when skeleton is passed via the slot.
|
|
27
|
+
* Defaults to the combined height of the lines when default skeleton is used
|
|
28
|
+
*/
|
|
20
29
|
height: {
|
|
21
30
|
type: Number,
|
|
22
31
|
default: null,
|
|
23
32
|
required: false
|
|
24
33
|
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Aspect ratio option of <svg/>
|
|
37
|
+
*/
|
|
25
38
|
preserveAspectRatio: {
|
|
26
39
|
type: String,
|
|
27
40
|
default: 'xMidYMid meet',
|
|
28
41
|
required: false
|
|
29
42
|
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Required if you're using <base url="/" /> in your <head />. Defaults to an empty string.
|
|
46
|
+
* This prop is common used as: <gl-skeleton-loader :base-url="$route.fullPath" /> which will fill the SVG attribute with the relative path.
|
|
47
|
+
*/
|
|
30
48
|
baseUrl: {
|
|
31
49
|
type: String,
|
|
32
50
|
default: '',
|
|
33
51
|
required: false
|
|
34
52
|
},
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Defaults to unique id
|
|
56
|
+
*/
|
|
35
57
|
uniqueKey: {
|
|
36
58
|
type: String,
|
|
37
59
|
default: () => uid(),
|
|
38
60
|
required: false
|
|
39
61
|
},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Number of lines to show when using the default skeleton
|
|
65
|
+
*/
|
|
40
66
|
lines: {
|
|
41
67
|
type: Number,
|
|
42
68
|
default: 3,
|
|
43
69
|
required: false
|
|
44
70
|
},
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* If the default skeleton lines should all be the same width
|
|
74
|
+
*/
|
|
45
75
|
equalWidthLines: {
|
|
46
76
|
type: Boolean,
|
|
47
77
|
default: false,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as echarts from 'echarts';
|
|
2
2
|
import { validRenderers, defaultWidth, defaultHeight } from '../../../utils/charts/config';
|
|
3
3
|
import createTheme, { themeName } from '../../../utils/charts/theme';
|
|
4
|
+
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
4
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
6
|
|
|
6
7
|
var script = {
|
|
8
|
+
directives: {
|
|
9
|
+
resizeObserver: GlResizeObserverDirective
|
|
10
|
+
},
|
|
7
11
|
props: {
|
|
8
12
|
options: {
|
|
9
13
|
type: Object,
|
|
@@ -44,6 +48,11 @@ var script = {
|
|
|
44
48
|
return validRenderers.includes(renderer);
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
},
|
|
52
|
+
responsive: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
required: false,
|
|
55
|
+
default: false
|
|
47
56
|
}
|
|
48
57
|
},
|
|
49
58
|
|
|
@@ -89,7 +98,7 @@ var script = {
|
|
|
89
98
|
echarts.connect(this.groupId);
|
|
90
99
|
}
|
|
91
100
|
|
|
92
|
-
this.chart.on('click', this.
|
|
101
|
+
this.chart.on('click', this.handleClick);
|
|
93
102
|
/**
|
|
94
103
|
* Emitted after calling `echarts.init`
|
|
95
104
|
*/
|
|
@@ -100,7 +109,7 @@ var script = {
|
|
|
100
109
|
},
|
|
101
110
|
|
|
102
111
|
beforeDestroy() {
|
|
103
|
-
this.chart.off('click', this.
|
|
112
|
+
this.chart.off('click', this.handleClick);
|
|
104
113
|
},
|
|
105
114
|
|
|
106
115
|
methods: {
|
|
@@ -120,7 +129,7 @@ var script = {
|
|
|
120
129
|
});
|
|
121
130
|
},
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
handleClick(params) {
|
|
124
133
|
/**
|
|
125
134
|
* Emitted when clicked on a data item in the chart (e.g., a bar/column).
|
|
126
135
|
*
|
|
@@ -131,6 +140,10 @@ var script = {
|
|
|
131
140
|
chart: this.chart,
|
|
132
141
|
params
|
|
133
142
|
});
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
handleResize() {
|
|
146
|
+
if (this.responsive) this.chart.resize();
|
|
134
147
|
}
|
|
135
148
|
|
|
136
149
|
}
|
|
@@ -140,7 +153,7 @@ var script = {
|
|
|
140
153
|
const __vue_script__ = script;
|
|
141
154
|
|
|
142
155
|
/* template */
|
|
143
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"chart"})};
|
|
156
|
+
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",value:(_vm.handleResize),expression:"handleResize"}],ref:"chart"})};
|
|
144
157
|
var __vue_staticRenderFns__ = [];
|
|
145
158
|
|
|
146
159
|
/* style */
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
|
-
|
|
3
|
-
var description = "### Scatter Chart\n";
|
|
4
|
-
|
|
5
1
|
var discrete_scatter_documentation = {
|
|
6
|
-
followsDesignSystem: true
|
|
7
|
-
description,
|
|
8
|
-
examples
|
|
2
|
+
followsDesignSystem: true
|
|
9
3
|
};
|
|
10
4
|
|
|
11
5
|
export default discrete_scatter_documentation;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
3
2
|
import { getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
4
3
|
import { TOOLTIP_LEFT_OFFSET } from '../../../utils/charts/constants';
|
|
5
4
|
import { heatmapHues } from '../../../utils/charts/theme';
|
|
@@ -51,9 +50,6 @@ var script = {
|
|
|
51
50
|
ChartTooltip,
|
|
52
51
|
TooltipDefaultFormat
|
|
53
52
|
},
|
|
54
|
-
directives: {
|
|
55
|
-
resizeObserver: GlResizeObserverDirective
|
|
56
|
-
},
|
|
57
53
|
mixins: [ToolboxMixin],
|
|
58
54
|
props: {
|
|
59
55
|
options: {
|
|
@@ -249,10 +245,6 @@ var script = {
|
|
|
249
245
|
this.$emit('created', chart);
|
|
250
246
|
},
|
|
251
247
|
|
|
252
|
-
handleResize() {
|
|
253
|
-
return this.responsive && this.chart.resize();
|
|
254
|
-
},
|
|
255
|
-
|
|
256
248
|
showHideTooltip(mouseEvent) {
|
|
257
249
|
this.tooltip.show = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
|
|
258
250
|
},
|
|
@@ -285,7 +277,7 @@ var script = {
|
|
|
285
277
|
const __vue_script__ = script;
|
|
286
278
|
|
|
287
279
|
/* template */
|
|
288
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{
|
|
280
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-heatmap"},[_c('chart',_vm._g(_vm._b({attrs:{"options":_vm.computedOptions},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.tooltip.show,"chart":_vm.chart,"top":_vm.tooltip.top,"left":_vm.tooltip.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [(_vm.formatTooltipText)?_vm._t("tooltip-title"):_c('div',[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n "),(_vm.computedOptions.xAxis.name)?[_vm._v("("+_vm._s(_vm.computedOptions.xAxis.name)+")")]:_vm._e()],2)]},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)};
|
|
289
281
|
var __vue_staticRenderFns__ = [];
|
|
290
282
|
|
|
291
283
|
/* style */
|
|
@@ -192,7 +192,7 @@ var script = {
|
|
|
192
192
|
const __vue_script__ = script;
|
|
193
193
|
|
|
194
194
|
/* template */
|
|
195
|
-
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",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"gl-display-flex gl-align-items-center",on:{"mouseleave":_vm.hideTooltip}},[_vm._t("default"),_vm._v(" "),_c('div',{staticClass:"gl-flex-grow-1 gl-relative"},[_c('chart',{attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onChartCreated}}),_vm._v(" "),(_vm.chartInstance)?_c('chart-tooltip',{style:({ pointerEvents: 'none' }),attrs:{"show":_vm.tooltip.show,"chart":_vm.chartInstance,"top":_vm.tooltip.position.top,"left":_vm.tooltip.position.left,"placement":"top"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',{staticClass:"gl-white-space-nowrap",attrs:{"data-testid":"tooltip-title"}},[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n ")])]},proxy:true},{key:"default",fn:function(){return [_c('div',{staticClass:"gl-display-flex",attrs:{"data-testid":"tooltip-content"}},[(_vm.tooltipLabel)?_c('span',{staticClass:"gl-pr-6 gl-mr-auto"},[_vm._v(_vm._s(_vm.tooltipLabel))]):_vm._e(),_vm._v(" "),_c('strong',[_vm._v(_vm._s(_vm.tooltip.content))])])]},proxy:true}],null,false,2830367259)}):_vm._e()],1),_vm._v(" "),(_vm.showLastYValue)?_c('span',{staticClass:"gl-display-inline-flex gl-justify-content-center gl-ml-5",attrs:{"data-testid":"last-y-value"}},[_vm._v("\n "+_vm._s(_vm.lastYValue)+"\n ")]):_vm._e()],2)};
|
|
195
|
+
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",value:(_vm.handleResize),expression:"handleResize"}],staticClass:"gl-display-flex gl-align-items-center",on:{"mouseleave":_vm.hideTooltip}},[_vm._t("default"),_vm._v(" "),_c('div',{staticClass:"gl-flex-grow-1 gl-relative"},[_c('chart',_vm._g(_vm._b({attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onChartCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chartInstance)?_c('chart-tooltip',{style:({ pointerEvents: 'none' }),attrs:{"show":_vm.tooltip.show,"chart":_vm.chartInstance,"top":_vm.tooltip.position.top,"left":_vm.tooltip.position.left,"placement":"top"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',{staticClass:"gl-white-space-nowrap",attrs:{"data-testid":"tooltip-title"}},[_vm._v("\n "+_vm._s(_vm.tooltip.title)+"\n ")])]},proxy:true},{key:"default",fn:function(){return [_c('div',{staticClass:"gl-display-flex",attrs:{"data-testid":"tooltip-content"}},[(_vm.tooltipLabel)?_c('span',{staticClass:"gl-pr-6 gl-mr-auto"},[_vm._v(_vm._s(_vm.tooltipLabel))]):_vm._e(),_vm._v(" "),_c('strong',[_vm._v(_vm._s(_vm.tooltip.content))])])]},proxy:true}],null,false,2830367259)}):_vm._e()],1),_vm._v(" "),(_vm.showLastYValue)?_c('span',{staticClass:"gl-display-inline-flex gl-justify-content-center gl-ml-5",attrs:{"data-testid":"last-y-value"}},[_vm._v("\n "+_vm._s(_vm.lastYValue)+"\n ")]):_vm._e()],2)};
|
|
196
196
|
var __vue_staticRenderFns__ = [];
|
|
197
197
|
|
|
198
198
|
/* style */
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "# Stacked Column Chart\n\nThe `presentation` property allows you to change between a stacked and tiled presentation style. It\nis only setup to accept `stacked` or `tiled` as values, the default value is `tiled`.\n\nThe `stacked` presentation allows to view multiple series of the same stack as a single column,\nwhile `tiled` presents the information in multiple columns for each series of a stack.\n\n`groupBy` is a property that defines how the data is going to be grouped by for each of the series\nthat the `data` property provides. For example if the `data` property has a total of 3 series, with\n7 elements each, `groupBy` could use a 7 element array to show 7 stacked bars or 7 groups of bars\ndepending on the preference set by the `presentation` property.\n";
|
|
1
|
+
var description = "The `presentation` property allows you to change between a stacked and tiled presentation style. It\nis only setup to accept `stacked` or `tiled` as values, the default value is `tiled`.\n\nThe `stacked` presentation allows to view multiple series of the same stack as a single column,\nwhile `tiled` presents the information in multiple columns for each series of a stack.\n\n`groupBy` is a property that defines how the data is going to be grouped by for each of the series\nthat the `data` property provides. For example if the `data` property has a total of 3 series, with\n7 elements each, `groupBy` could use a 7 element array to show 7 stacked bars or 7 groups of bars\ndepending on the preference set by the `presentation` property.\n";
|
|
4
2
|
|
|
5
3
|
var stacked_column_documentation = {
|
|
6
4
|
followsDesignSystem: false,
|
|
7
|
-
description
|
|
8
|
-
examples
|
|
5
|
+
description
|
|
9
6
|
};
|
|
10
7
|
|
|
11
8
|
export default stacked_column_documentation;
|
package/dist/config.js
CHANGED
|
@@ -9,10 +9,22 @@ const tooltipGlobalConfig = {
|
|
|
9
9
|
customClass: 'gl-tooltip',
|
|
10
10
|
delay: tooltipDelay
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Guard against nonexistent localStorage,
|
|
14
|
+
* or corrupted localStorage
|
|
15
|
+
*
|
|
16
|
+
* localStorage access is not possible in certain environments like
|
|
17
|
+
* - in iframe usage in Chrome if embedded on another domain
|
|
18
|
+
* - tests / node
|
|
19
|
+
*/
|
|
13
20
|
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
try {
|
|
22
|
+
const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
|
|
23
|
+
|
|
24
|
+
if (glTooltipDelay) {
|
|
25
|
+
tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {// localStorage doesn't exist (or the value is not properly formatted)
|
|
16
28
|
}
|
|
17
29
|
|
|
18
30
|
const setConfigs = () => {
|