@gitlab/ui 66.27.0 → 66.28.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 +7 -0
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +6 -1
- 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/components/charts/discrete_scatter/discrete_scatter.spec.js +17 -0
- package/src/components/charts/discrete_scatter/discrete_scatter.stories.js +1 -0
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [66.28.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.27.0...v66.28.0) (2023-10-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDiscreteScatterChart:** Add disableTooltip prop ([cd430c2](https://gitlab.com/gitlab-org/gitlab-ui/commit/cd430c2ca17749af3c2fca21164141d80d1edd3a))
|
|
7
|
+
|
|
1
8
|
# [66.27.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.26.0...v66.27.0) (2023-10-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -45,6 +45,11 @@ var script = {
|
|
|
45
45
|
required: false,
|
|
46
46
|
default: null
|
|
47
47
|
},
|
|
48
|
+
disableTooltip: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: false,
|
|
51
|
+
default: () => false
|
|
52
|
+
},
|
|
48
53
|
/**
|
|
49
54
|
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
50
55
|
*/
|
|
@@ -168,7 +173,7 @@ const __vue_script__ = script;
|
|
|
168
173
|
/* template */
|
|
169
174
|
var __vue_render__ = function () {
|
|
170
175
|
var _obj;
|
|
171
|
-
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(_vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_vm._e()],1)};
|
|
176
|
+
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"position-relative",class:( _obj = {}, _obj[_vm.$options.HEIGHT_AUTO_CLASSES] = _vm.autoHeight, _obj )},[_c('chart',_vm._g(_vm._b({class:{ 'gl-flex-grow-1': _vm.autoHeight },attrs:{"height":_vm.height,"options":_vm.options},on:{"created":_vm.onCreated}},'chart',_vm.$attrs,false),_vm.$listeners)),_vm._v(" "),(!_vm.disableTooltip && _vm.chart)?_c('chart-tooltip',{attrs:{"show":_vm.showTooltip,"chart":_vm.chart,"top":_vm.tooltipPosition.top,"left":_vm.tooltipPosition.left},scopedSlots:_vm._u([{key:"title",fn:function(){return [_vm._t("tooltip-title",function(){return [_vm._v(_vm._s(_vm.tooltipTitle)+" ("+_vm._s(_vm.xAxisTitle)+")")]})]},proxy:true}],null,true)},[_vm._v(" "),_vm._t("tooltip-content",function(){return [_c('tooltip-default-format',{attrs:{"tooltip-content":_vm.tooltipContent}})]})],2):_vm._e()],1)};
|
|
172
177
|
var __vue_staticRenderFns__ = [];
|
|
173
178
|
|
|
174
179
|
/* style */
|
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { shallowMount } from '@vue/test-utils';
|
|
|
2
2
|
import { createMockChartInstance } from '~helpers/chart_stubs';
|
|
3
3
|
import { expectHeightAutoClasses } from '~helpers/chart_height';
|
|
4
4
|
import Chart from '../chart/chart.vue';
|
|
5
|
+
import ChartTooltip from '../tooltip/tooltip.vue';
|
|
5
6
|
import DiscreteScatterChart from './discrete_scatter.vue';
|
|
6
7
|
|
|
7
8
|
let mockChartInstance;
|
|
@@ -38,4 +39,20 @@ describe('column chart component', () => {
|
|
|
38
39
|
findChart,
|
|
39
40
|
});
|
|
40
41
|
});
|
|
42
|
+
|
|
43
|
+
describe('disable-tooltip', () => {
|
|
44
|
+
it('is set to false by default', async () => {
|
|
45
|
+
createComponent();
|
|
46
|
+
|
|
47
|
+
await findChart().vm.$emit('created', mockChartInstance);
|
|
48
|
+
|
|
49
|
+
expect(wrapper.findComponent(ChartTooltip).exists()).toBe(true);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('disables the tooltip', () => {
|
|
53
|
+
createComponent({ disableTooltip: true });
|
|
54
|
+
|
|
55
|
+
expect(wrapper.findComponent(ChartTooltip).exists()).toBe(false);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
41
58
|
});
|
|
@@ -49,6 +49,11 @@ export default {
|
|
|
49
49
|
required: false,
|
|
50
50
|
default: null,
|
|
51
51
|
},
|
|
52
|
+
disableTooltip: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
required: false,
|
|
55
|
+
default: () => false,
|
|
56
|
+
},
|
|
52
57
|
/**
|
|
53
58
|
* Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
|
|
54
59
|
*/
|
|
@@ -187,7 +192,7 @@ export default {
|
|
|
187
192
|
@created="onCreated"
|
|
188
193
|
/>
|
|
189
194
|
<chart-tooltip
|
|
190
|
-
v-if="chart"
|
|
195
|
+
v-if="!disableTooltip && chart"
|
|
191
196
|
:show="showTooltip"
|
|
192
197
|
:chart="chart"
|
|
193
198
|
:top="tooltipPosition.top"
|