@gitlab/ui 49.9.0 → 49.9.1
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/base/pagination/pagination.js +3 -3
- package/dist/components/charts/area/area.js +1 -1
- package/dist/components/charts/chart/chart.js +1 -1
- package/dist/components/charts/column/column.js +1 -1
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
- package/dist/components/charts/line/line.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +1 -1
- package/dist/components/charts/stacked_column/stacked_column.js +1 -1
- package/dist/utils/breakpoints.js +2 -3
- package/dist/utils/charts/config.js +8 -9
- package/dist/utils/charts/theme.js +1 -2
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/src/components/base/pagination/pagination.vue +3 -3
- package/src/components/charts/area/area.vue +2 -1
- package/src/components/charts/chart/chart.spec.js +1 -1
- package/src/components/charts/chart/chart.vue +1 -1
- package/src/components/charts/column/column.vue +2 -1
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +2 -1
- package/src/components/charts/line/line.vue +2 -1
- package/src/components/charts/sparkline/sparkline.vue +2 -1
- package/src/components/charts/stacked_column/stacked_column.vue +2 -1
- package/src/utils/breakpoints.js +1 -3
- package/src/utils/breakpoints.spec.js +4 -4
- package/src/utils/charts/config.js +8 -8
- package/src/utils/charts/config.spec.js +2 -2
- package/src/utils/charts/theme.js +1 -3
- package/src/utils.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [49.9.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v49.9.0...v49.9.1) (2022-11-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency dompurify to ^2.4.1 ([1dfdf40](https://gitlab.com/gitlab-org/gitlab-ui/commit/1dfdf407820dcc42c313c6c6b95cff0be7221080))
|
|
7
|
+
|
|
1
8
|
# [49.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v49.8.0...v49.9.0) (2022-11-14)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import debounce from 'lodash/debounce';
|
|
2
2
|
import isFunction from 'lodash/isFunction';
|
|
3
3
|
import range from 'lodash/range';
|
|
4
|
-
import
|
|
4
|
+
import { breakpoints, GlBreakpointInstance } from '../../../utils/breakpoints';
|
|
5
5
|
import { alignOptions, resizeDebounceTime } from '../../../utils/constants';
|
|
6
6
|
import GlIcon from '../icon/icon';
|
|
7
7
|
import GlLink from '../link/link';
|
|
@@ -165,7 +165,7 @@ var script = {
|
|
|
165
165
|
},
|
|
166
166
|
data() {
|
|
167
167
|
return {
|
|
168
|
-
breakpoint:
|
|
168
|
+
breakpoint: GlBreakpointInstance.getBreakpointSize(),
|
|
169
169
|
// If total pages count is below or equal to minTotalPagesToCollapse, collapsing is disabled
|
|
170
170
|
minTotalPagesToCollapse: 4
|
|
171
171
|
};
|
|
@@ -268,7 +268,7 @@ var script = {
|
|
|
268
268
|
},
|
|
269
269
|
methods: {
|
|
270
270
|
setBreakpoint() {
|
|
271
|
-
this.breakpoint =
|
|
271
|
+
this.breakpoint = GlBreakpointInstance.getBreakpointSize();
|
|
272
272
|
},
|
|
273
273
|
pageIsDisabled(page) {
|
|
274
274
|
return this.disabled || page < 1 || this.isCompactPagination && page > this.value && !this.nextPage || !this.isCompactPagination && page > this.totalPages;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { defaultAreaOpacity, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, DATA_TOOLTIP_LEFT_OFFSET, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as echarts from 'echarts';
|
|
2
2
|
import { validRenderers, defaultWidth, defaultHeight } from '../../../utils/charts/config';
|
|
3
|
-
import
|
|
3
|
+
import { themeName, createTheme } from '../../../utils/charts/theme';
|
|
4
4
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, gridWithSecondaryYAxis, grid, dataZoomAdjustments, mergeSeriesToOptions, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { CHART_TYPE_LINE, TOOLTIP_LEFT_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { columnOptions } from '../../../utils/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import defaultChartOptions,
|
|
2
|
+
import { defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
3
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
4
4
|
import { debounceByAnimationFrame } from '../../../utils/utils';
|
|
5
5
|
import { ToolboxMixin } from '../../mixins/toolbox_mixin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { symbolSize, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, DATA_TOOLTIP_LEFT_OFFSET, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
2
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
3
|
-
import defaultChartOptions,
|
|
3
|
+
import { defaultChartOptions, mergeSeriesToOptions, symbolSize } from '../../../utils/charts/config';
|
|
4
4
|
import Chart from '../chart/chart';
|
|
5
5
|
import ChartTooltip from '../tooltip/tooltip';
|
|
6
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, gridWithSecondaryYAxis, grid, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, CHART_TYPE_LINE, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { columnOptions } from '../../../utils/constants';
|
|
@@ -5,7 +5,7 @@ const breakpoints = {
|
|
|
5
5
|
sm: 576,
|
|
6
6
|
xs: 0
|
|
7
7
|
};
|
|
8
|
-
const
|
|
8
|
+
const GlBreakpointInstance = {
|
|
9
9
|
windowWidth: () => window.innerWidth,
|
|
10
10
|
getBreakpointSize() {
|
|
11
11
|
const windowWidth = this.windowWidth();
|
|
@@ -17,5 +17,4 @@ const BreakpointInstance = {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export
|
|
21
|
-
export { breakpoints };
|
|
20
|
+
export { GlBreakpointInstance, breakpoints };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import castArray from 'lodash/castArray';
|
|
2
2
|
import isArray from 'lodash/isArray';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
-
import
|
|
4
|
+
import { GlBreakpointInstance } from '../breakpoints';
|
|
5
5
|
import { columnOptions } from '../constants';
|
|
6
6
|
import { areDatesEqual } from '../datetime_utility';
|
|
7
7
|
import { engineeringNotation } from '../number_utils';
|
|
@@ -38,6 +38,11 @@ const grid = {
|
|
|
38
38
|
left: 64,
|
|
39
39
|
right: 32
|
|
40
40
|
};
|
|
41
|
+
const defaultChartOptions = {
|
|
42
|
+
grid,
|
|
43
|
+
xAxis,
|
|
44
|
+
yAxis
|
|
45
|
+
};
|
|
41
46
|
const gridWithSecondaryYAxis = {
|
|
42
47
|
...grid,
|
|
43
48
|
right: 64
|
|
@@ -91,7 +96,7 @@ const getDataZoomConfig = function () {
|
|
|
91
96
|
filterMode = 'none'
|
|
92
97
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
93
98
|
const disabledBreakpoints = ['lg', 'xl'];
|
|
94
|
-
const disabled = disabledBreakpoints.includes(
|
|
99
|
+
const disabled = disabledBreakpoints.includes(GlBreakpointInstance.getBreakpointSize());
|
|
95
100
|
const minSpan = filterMode === 'none' ? 0.01 : null;
|
|
96
101
|
return {
|
|
97
102
|
grid: {
|
|
@@ -530,11 +535,5 @@ const getDefaultTooltipContent = function (params) {
|
|
|
530
535
|
tooltipContent
|
|
531
536
|
};
|
|
532
537
|
};
|
|
533
|
-
var config = {
|
|
534
|
-
grid,
|
|
535
|
-
xAxis,
|
|
536
|
-
yAxis
|
|
537
|
-
};
|
|
538
538
|
|
|
539
|
-
export
|
|
540
|
-
export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getToolboxConfig, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, validRenderers, xAxis, yAxis };
|
|
539
|
+
export { annotationsYAxisCoords, axes, dataZoomAdjustments, defaultAreaOpacity, defaultChartOptions, defaultFontSize, defaultHeight, defaultWidth, generateAnnotationSeries, generateBarSeries, generateLineSeries, getAnnotationsConfig, getDataZoomConfig, getDefaultTooltipContent, getThresholdConfig, getToolboxConfig, grid, gridWithSecondaryYAxis, lineStyle, mergeAnnotationAxisToOptions, mergeSeriesToOptions, parseAnnotations, symbolSize, validRenderers, xAxis, yAxis };
|
|
@@ -225,5 +225,4 @@ const createTheme = function () {
|
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
227
|
|
|
228
|
-
export
|
|
229
|
-
export { colorFromDefaultPalette, colorPaletteDefault, gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue, heatmapHues, themeName };
|
|
228
|
+
export { colorFromDefaultPalette, colorPaletteDefault, createTheme, gaugeNeutralHues, gaugeSafeHues, gaugeWarningHue, heatmapHues, themeName };
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GlBreakpointInstance, breakpoints } from './utils/breakpoints';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "49.9.
|
|
3
|
+
"version": "49.9.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@popperjs/core": "^2.11.2",
|
|
63
63
|
"bootstrap-vue": "2.23.1",
|
|
64
|
-
"dompurify": "^2.4.
|
|
64
|
+
"dompurify": "^2.4.1",
|
|
65
65
|
"echarts": "^5.3.2",
|
|
66
66
|
"iframe-resizer": "^4.3.2",
|
|
67
67
|
"lodash": "^4.17.20",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
4
|
import isFunction from 'lodash/isFunction';
|
|
5
5
|
import range from 'lodash/range';
|
|
6
|
-
import
|
|
6
|
+
import { GlBreakpointInstance, breakpoints } from '../../../utils/breakpoints';
|
|
7
7
|
import { alignOptions, resizeDebounceTime } from '../../../utils/constants';
|
|
8
8
|
import GlIcon from '../icon/icon.vue';
|
|
9
9
|
import GlLink from '../link/link.vue';
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
},
|
|
167
167
|
data() {
|
|
168
168
|
return {
|
|
169
|
-
breakpoint:
|
|
169
|
+
breakpoint: GlBreakpointInstance.getBreakpointSize(),
|
|
170
170
|
// If total pages count is below or equal to minTotalPagesToCollapse, collapsing is disabled
|
|
171
171
|
minTotalPagesToCollapse: 4,
|
|
172
172
|
};
|
|
@@ -287,7 +287,7 @@ export default {
|
|
|
287
287
|
},
|
|
288
288
|
methods: {
|
|
289
289
|
setBreakpoint() {
|
|
290
|
-
this.breakpoint =
|
|
290
|
+
this.breakpoint = GlBreakpointInstance.getBreakpointSize();
|
|
291
291
|
},
|
|
292
292
|
pageIsDisabled(page) {
|
|
293
293
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import * as echarts from 'echarts';
|
|
3
|
-
import createTheme from '~/utils/charts/theme';
|
|
3
|
+
import { createTheme } from '~/utils/charts/theme';
|
|
4
4
|
import { useMockResizeObserver } from '~helpers/mock_dom_observer';
|
|
5
5
|
import Chart from './chart.vue';
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script>
|
|
3
3
|
import * as echarts from 'echarts';
|
|
4
4
|
import { defaultHeight, defaultWidth, validRenderers } from '../../../utils/charts/config';
|
|
5
|
-
import createTheme,
|
|
5
|
+
import { createTheme, themeName } from '../../../utils/charts/theme';
|
|
6
6
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
3
|
import { gray200 } from '../../../../scss_to_js/scss_variables'; // eslint-disable-line import/no-unresolved
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
defaultChartOptions,
|
|
5
6
|
dataZoomAdjustments,
|
|
6
7
|
mergeSeriesToOptions,
|
|
7
8
|
} from '../../../utils/charts/config';
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
import merge from 'lodash/merge';
|
|
22
22
|
import { gray200 } from '../../../../scss_to_js/scss_variables'; // eslint-disable-line import/no-unresolved
|
|
23
|
-
import
|
|
23
|
+
import {
|
|
24
|
+
defaultChartOptions,
|
|
24
25
|
grid,
|
|
25
26
|
getThresholdConfig,
|
|
26
27
|
generateAnnotationSeries,
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<script>
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
4
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
defaultChartOptions,
|
|
6
7
|
mergeSeriesToOptions,
|
|
7
8
|
symbolSize,
|
|
8
9
|
} from '../../../utils/charts/config';
|
package/src/utils/breakpoints.js
CHANGED
|
@@ -6,7 +6,7 @@ export const breakpoints = {
|
|
|
6
6
|
xs: 0,
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
export const GlBreakpointInstance = {
|
|
10
10
|
windowWidth: () => window.innerWidth,
|
|
11
11
|
getBreakpointSize() {
|
|
12
12
|
const windowWidth = this.windowWidth();
|
|
@@ -19,5 +19,3 @@ const BreakpointInstance = {
|
|
|
19
19
|
return ['xl', 'lg'].includes(this.getBreakpointSize());
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
export default BreakpointInstance;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { GlBreakpointInstance } from './breakpoints';
|
|
2
2
|
|
|
3
3
|
describe('breakpoints', () => {
|
|
4
4
|
describe.each`
|
|
@@ -10,16 +10,16 @@ describe('breakpoints', () => {
|
|
|
10
10
|
${'xs'} | ${0} | ${false}
|
|
11
11
|
`('$key', ({ size, key, expectedDesktop }) => {
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
jest.spyOn(
|
|
13
|
+
jest.spyOn(GlBreakpointInstance, 'windowWidth').mockImplementationOnce(() => size + 10);
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
it(`returns ${key} when larger than ${size}`, () => {
|
|
17
|
-
expect(
|
|
17
|
+
expect(GlBreakpointInstance.getBreakpointSize()).toBe(key);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
describe('isDesktop', () => {
|
|
21
21
|
it(`returns ${expectedDesktop} when screen size is ${size}`, () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(GlBreakpointInstance.isDesktop()).toBe(expectedDesktop);
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
});
|
|
@@ -2,7 +2,7 @@ import castArray from 'lodash/castArray';
|
|
|
2
2
|
import isArray from 'lodash/isArray';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
4
|
import { blue500 } from '../../../scss_to_js/scss_variables'; // eslint-disable-line import/no-unresolved
|
|
5
|
-
import
|
|
5
|
+
import { GlBreakpointInstance } from '../breakpoints';
|
|
6
6
|
import { columnOptions } from '../constants';
|
|
7
7
|
import { areDatesEqual } from '../datetime_utility';
|
|
8
8
|
import { engineeringNotation } from '../number_utils';
|
|
@@ -42,6 +42,12 @@ export const grid = {
|
|
|
42
42
|
right: 32,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
export const defaultChartOptions = {
|
|
46
|
+
grid,
|
|
47
|
+
xAxis,
|
|
48
|
+
yAxis,
|
|
49
|
+
};
|
|
50
|
+
|
|
45
51
|
export const gridWithSecondaryYAxis = {
|
|
46
52
|
...grid,
|
|
47
53
|
right: 64,
|
|
@@ -93,7 +99,7 @@ const LESS_THAN = ['<', '<'];
|
|
|
93
99
|
*/
|
|
94
100
|
export const getDataZoomConfig = ({ filterMode = 'none' } = {}) => {
|
|
95
101
|
const disabledBreakpoints = ['lg', 'xl'];
|
|
96
|
-
const disabled = disabledBreakpoints.includes(
|
|
102
|
+
const disabled = disabledBreakpoints.includes(GlBreakpointInstance.getBreakpointSize());
|
|
97
103
|
const minSpan = filterMode === 'none' ? 0.01 : null;
|
|
98
104
|
|
|
99
105
|
return {
|
|
@@ -499,9 +505,3 @@ export const getDefaultTooltipContent = (params, yAxisTitle = null) => {
|
|
|
499
505
|
|
|
500
506
|
return { xLabels, tooltipContent };
|
|
501
507
|
};
|
|
502
|
-
|
|
503
|
-
export default {
|
|
504
|
-
grid,
|
|
505
|
-
xAxis,
|
|
506
|
-
yAxis,
|
|
507
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { GlBreakpointInstance } from '../breakpoints';
|
|
3
3
|
import { columnOptions } from '../constants';
|
|
4
4
|
import { hexToRgba } from '../utils';
|
|
5
5
|
import {
|
|
@@ -197,7 +197,7 @@ describe('chart config helpers', () => {
|
|
|
197
197
|
|
|
198
198
|
describe('on small viewports', () => {
|
|
199
199
|
it('creates a basic dataZoomConfig with inside scrolling being enabled', () => {
|
|
200
|
-
jest.spyOn(
|
|
200
|
+
jest.spyOn(GlBreakpointInstance, 'getBreakpointSize').mockImplementationOnce(() => 'sm');
|
|
201
201
|
const actual = getDataZoomConfig();
|
|
202
202
|
const dataZoomWithInsideEnabled = [
|
|
203
203
|
{
|
|
@@ -147,7 +147,7 @@ const isLineChartWithoutArea = (options) =>
|
|
|
147
147
|
Array.isArray(options?.series) &&
|
|
148
148
|
options.series.some((series) => series.type === 'line' && !series.areaStyle);
|
|
149
149
|
|
|
150
|
-
const createTheme = (options = {}) => ({
|
|
150
|
+
export const createTheme = (options = {}) => ({
|
|
151
151
|
color: colorPaletteDefault,
|
|
152
152
|
backgroundColor: 'transparent',
|
|
153
153
|
textStyle: {
|
|
@@ -268,5 +268,3 @@ const createTheme = (options = {}) => ({
|
|
|
268
268
|
logAxis: axes,
|
|
269
269
|
timeAxis: axes,
|
|
270
270
|
});
|
|
271
|
-
|
|
272
|
-
export default createTheme;
|
package/src/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GlBreakpointInstance, breakpoints } from './utils/breakpoints';
|