@gitlab/ui 86.11.1 → 86.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 +7 -0
- package/dist/components/charts/chart/chart.js +4 -1
- package/dist/utils/charts/story_config.js +1 -19
- package/dist/utils/charts/theme.js +9 -3
- package/package.json +1 -1
- package/src/components/charts/chart/chart.vue +1 -1
- package/src/utils/charts/story_config.js +0 -24
- package/src/utils/charts/theme.js +13 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [86.12.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.11.1...v86.12.0) (2024-07-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **Charts:** use options.toolbox.show to show/hide toolbox ([5e8c462](https://gitlab.com/gitlab-org/gitlab-ui/commit/5e8c4624274aa9612b7e7fcf73f0e500ea6446f9))
|
|
7
|
+
|
|
1
8
|
## [86.11.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.11.0...v86.11.1) (2024-07-16)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -12,7 +12,10 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
|
12
12
|
* https://echarts.apache.org/en/api.html#echartsInstance.resize
|
|
13
13
|
*/
|
|
14
14
|
const sizeValidator = size => Number.isFinite(size) || size === 'auto' || size == null;
|
|
15
|
-
const isChartWithToolbox = options =>
|
|
15
|
+
const isChartWithToolbox = options => {
|
|
16
|
+
var _options$toolbox;
|
|
17
|
+
return Boolean(options === null || options === void 0 ? void 0 : (_options$toolbox = options.toolbox) === null || _options$toolbox === void 0 ? void 0 : _options$toolbox.show);
|
|
18
|
+
};
|
|
16
19
|
const increaseChartGridTop = (options, increaseBy) => {
|
|
17
20
|
var _options$grid;
|
|
18
21
|
return {
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import times from 'lodash/times';
|
|
2
2
|
import { SERIES_NAME, SERIES_NAME_SHORT } from '../stories_constants';
|
|
3
|
-
import { marqueeSelectionSvgPath, redoSvgPath, clearAllSvgPath, downloadSvgPath } from '../svgs/svg_paths';
|
|
4
3
|
import { colorFromDefaultPalette } from './theme';
|
|
5
4
|
|
|
6
|
-
const toolbox = {
|
|
7
|
-
feature: {
|
|
8
|
-
dataZoom: {
|
|
9
|
-
icon: {
|
|
10
|
-
zoom: marqueeSelectionSvgPath,
|
|
11
|
-
back: redoSvgPath
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
restore: {
|
|
15
|
-
icon: clearAllSvgPath
|
|
16
|
-
},
|
|
17
|
-
saveAsImage: {
|
|
18
|
-
icon: downloadSvgPath
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
5
|
/**
|
|
24
6
|
* Generates series data for usage in chart examples
|
|
25
7
|
*
|
|
@@ -39,4 +21,4 @@ const generateSeriesData = function () {
|
|
|
39
21
|
}));
|
|
40
22
|
};
|
|
41
23
|
|
|
42
|
-
export { generateSeriesData
|
|
24
|
+
export { generateSeriesData };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GRAY_600, GRAY_200, GRAY_50, GRAY_300, GRAY_100, DATA_VIZ_BLUE_200, DATA_VIZ_BLUE_400, DATA_VIZ_BLUE_600, DATA_VIZ_BLUE_800, GRAY_900, GRAY_500, DATA_VIZ_BLUE_500, DATA_VIZ_BLUE_900, DATA_VIZ_ORANGE_500, DATA_VIZ_ORANGE_600, DATA_VIZ_AQUA_500, DATA_VIZ_GREEN_600, DATA_VIZ_MAGENTA_500, DATA_VIZ_BLUE_700, DATA_VIZ_ORANGE_800, DATA_VIZ_AQUA_700, DATA_VIZ_GREEN_800, DATA_VIZ_MAGENTA_700, DATA_VIZ_ORANGE_950, DATA_VIZ_AQUA_900, DATA_VIZ_GREEN_950, DATA_VIZ_MAGENTA_900, DATA_VIZ_ORANGE_700, DATA_VIZ_AQUA_600, DATA_VIZ_GREEN_700, DATA_VIZ_MAGENTA_600, DATA_VIZ_ORANGE_900, DATA_VIZ_AQUA_800, DATA_VIZ_GREEN_900, DATA_VIZ_MAGENTA_800, DATA_VIZ_BLUE_950, DATA_VIZ_AQUA_950, DATA_VIZ_GREEN_500, DATA_VIZ_MAGENTA_950, DATA_VIZ_ORANGE_400, DATA_VIZ_GREEN_400, DATA_VIZ_BLUE_300, DATA_VIZ_ORANGE_200, DATA_VIZ_AQUA_300, DATA_VIZ_GREEN_200, DATA_VIZ_MAGENTA_300, DATA_VIZ_BLUE_100, DATA_VIZ_ORANGE_50, DATA_VIZ_AQUA_100, DATA_VIZ_GREEN_50, DATA_VIZ_MAGENTA_100, DATA_VIZ_ORANGE_300, DATA_VIZ_AQUA_400, DATA_VIZ_GREEN_300, DATA_VIZ_MAGENTA_400, DATA_VIZ_ORANGE_100, DATA_VIZ_AQUA_200, DATA_VIZ_GREEN_100, DATA_VIZ_MAGENTA_200, DATA_VIZ_BLUE_50, DATA_VIZ_AQUA_50, DATA_VIZ_MAGENTA_50, RED_500, WHITE } from '../../tokens/build/js/tokens';
|
|
2
|
-
import { scrollHandleSvgPath } from '../svgs/svg_paths';
|
|
2
|
+
import { scrollHandleSvgPath, marqueeSelectionSvgPath, redoSvgPath, clearAllSvgPath, downloadSvgPath } from '../svgs/svg_paths';
|
|
3
3
|
import { hexToRgba } from '../utils';
|
|
4
4
|
|
|
5
5
|
const GL_BORDER_RADIUS_BASE = '0.25rem';
|
|
@@ -141,14 +141,20 @@ const createTheme = function () {
|
|
|
141
141
|
title: {
|
|
142
142
|
zoom: 'Click to zoom in on a portion of the graph',
|
|
143
143
|
back: 'Remove selection'
|
|
144
|
+
},
|
|
145
|
+
icon: {
|
|
146
|
+
zoom: marqueeSelectionSvgPath,
|
|
147
|
+
back: redoSvgPath
|
|
144
148
|
}
|
|
145
149
|
},
|
|
146
150
|
restore: {
|
|
147
|
-
title: 'Remove all selections and return chart to default state'
|
|
151
|
+
title: 'Remove all selections and return chart to default state',
|
|
152
|
+
icon: clearAllSvgPath
|
|
148
153
|
},
|
|
149
154
|
saveAsImage: {
|
|
150
155
|
title: 'Save chart as an image',
|
|
151
|
-
name: 'graph'
|
|
156
|
+
name: 'graph',
|
|
157
|
+
icon: downloadSvgPath
|
|
152
158
|
}
|
|
153
159
|
}
|
|
154
160
|
},
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import { debounceByAnimationFrame } from '../../../utils/utils';
|
|
|
17
17
|
*/
|
|
18
18
|
const sizeValidator = (size) => Number.isFinite(size) || size === 'auto' || size == null;
|
|
19
19
|
|
|
20
|
-
const isChartWithToolbox = (options) => options?.toolbox
|
|
20
|
+
const isChartWithToolbox = (options) => Boolean(options?.toolbox?.show);
|
|
21
21
|
|
|
22
22
|
const increaseChartGridTop = (options, increaseBy) => ({
|
|
23
23
|
...options,
|
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
import times from 'lodash/times';
|
|
2
2
|
import { SERIES_NAME, SERIES_NAME_SHORT } from '../stories_constants';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
marqueeSelectionSvgPath,
|
|
6
|
-
redoSvgPath,
|
|
7
|
-
clearAllSvgPath,
|
|
8
|
-
downloadSvgPath,
|
|
9
|
-
} from '../svgs/svg_paths';
|
|
10
3
|
import { colorFromDefaultPalette } from './theme';
|
|
11
4
|
|
|
12
|
-
export const toolbox = {
|
|
13
|
-
feature: {
|
|
14
|
-
dataZoom: {
|
|
15
|
-
icon: {
|
|
16
|
-
zoom: marqueeSelectionSvgPath,
|
|
17
|
-
back: redoSvgPath,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
restore: {
|
|
21
|
-
icon: clearAllSvgPath,
|
|
22
|
-
},
|
|
23
|
-
saveAsImage: {
|
|
24
|
-
icon: downloadSvgPath,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
5
|
/**
|
|
30
6
|
* Generates series data for usage in chart examples
|
|
31
7
|
*
|
|
@@ -64,7 +64,13 @@ import {
|
|
|
64
64
|
DATA_VIZ_ORANGE_950,
|
|
65
65
|
DATA_VIZ_ORANGE_900,
|
|
66
66
|
} from '../../tokens/build/js/tokens';
|
|
67
|
-
import {
|
|
67
|
+
import {
|
|
68
|
+
scrollHandleSvgPath,
|
|
69
|
+
marqueeSelectionSvgPath,
|
|
70
|
+
redoSvgPath,
|
|
71
|
+
clearAllSvgPath,
|
|
72
|
+
downloadSvgPath,
|
|
73
|
+
} from '../svgs/svg_paths';
|
|
68
74
|
import { hexToRgba } from '../utils';
|
|
69
75
|
|
|
70
76
|
const GL_BORDER_RADIUS_BASE = '0.25rem';
|
|
@@ -285,13 +291,19 @@ export const createTheme = (options = {}) => ({
|
|
|
285
291
|
zoom: 'Click to zoom in on a portion of the graph',
|
|
286
292
|
back: 'Remove selection',
|
|
287
293
|
},
|
|
294
|
+
icon: {
|
|
295
|
+
zoom: marqueeSelectionSvgPath,
|
|
296
|
+
back: redoSvgPath,
|
|
297
|
+
},
|
|
288
298
|
},
|
|
289
299
|
restore: {
|
|
290
300
|
title: 'Remove all selections and return chart to default state',
|
|
301
|
+
icon: clearAllSvgPath,
|
|
291
302
|
},
|
|
292
303
|
saveAsImage: {
|
|
293
304
|
title: 'Save chart as an image',
|
|
294
305
|
name: 'graph',
|
|
306
|
+
icon: downloadSvgPath,
|
|
295
307
|
},
|
|
296
308
|
},
|
|
297
309
|
},
|