@gitlab/ui 63.2.0 → 63.2.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [63.2.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v63.2.0...v63.2.1) (2023-05-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlAreaChart:** Replace the getDom to getZr for supporting edge ([2a5bef8](https://gitlab.com/gitlab-org/gitlab-ui/commit/2a5bef897dcd54422cb1163e497461558a8f06ac))
7
+
1
8
  # [63.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v63.1.3...v63.2.0) (2023-05-23)
2
9
 
3
10
 
@@ -218,8 +218,8 @@ var script = {
218
218
  }
219
219
  },
220
220
  beforeDestroy() {
221
- this.chart.getDom().removeEventListener('mousemove', this.debouncedShowHideTooltip);
222
- this.chart.getDom().removeEventListener('mouseout', this.debouncedShowHideTooltip);
221
+ this.chart.getZr().off('mousemove', this.debouncedShowHideTooltip);
222
+ this.chart.getZr().off('mouseout', this.debouncedShowHideTooltip);
223
223
  this.chart.off('mouseout', this.hideAnnotationsTooltip);
224
224
  this.chart.off('mouseover', this.onChartMouseOver);
225
225
  },
@@ -244,8 +244,8 @@ var script = {
244
244
  // when the mouse is hovered over the parent container
245
245
  // of echarts' svg element. This works only for data points
246
246
  // and not markPoints.
247
- chart.getDom().addEventListener('mousemove', this.debouncedShowHideTooltip);
248
- chart.getDom().addEventListener('mouseout', this.debouncedShowHideTooltip);
247
+ chart.getZr().on('mousemove', this.debouncedShowHideTooltip);
248
+ chart.getZr().on('mouseout', this.debouncedShowHideTooltip);
249
249
 
250
250
  // eCharts inbuild mouse events
251
251
  // https://echarts.apache.org/en/api.html#events.Mouse%20events
@@ -264,7 +264,10 @@ var script = {
264
264
  this.chart = chart;
265
265
  this.$emit('created', chart);
266
266
  },
267
- showHideTooltip(mouseEvent) {
267
+ showHideTooltip(_ref) {
268
+ let {
269
+ event: mouseEvent
270
+ } = _ref;
268
271
  this.showDataTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
269
272
  this.dataTooltipPosition = {
270
273
  left: `${mouseEvent.zrX + DATA_TOOLTIP_LEFT_OFFSET}px`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "63.2.0",
3
+ "version": "63.2.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -27,6 +27,7 @@
27
27
  "copy-fonts": "make copy-fonts",
28
28
  "build-scss-variables": "make scss_to_js/scss_variables.js",
29
29
  "clean": "rm -r dist storybook scss_to_js/scss_variables.* src/scss/utilities.scss",
30
+ "cy:edge": "cypress run --browser edge",
30
31
  "cy:run": "cypress run --browser firefox",
31
32
  "start": "yarn storybook",
32
33
  "storybook": "yarn storybook-prep && storybook dev --ci --host localhost --port 9001 -c .storybook",
@@ -269,8 +269,8 @@ export default {
269
269
  },
270
270
  },
271
271
  beforeDestroy() {
272
- this.chart.getDom().removeEventListener('mousemove', this.debouncedShowHideTooltip);
273
- this.chart.getDom().removeEventListener('mouseout', this.debouncedShowHideTooltip);
272
+ this.chart.getZr().off('mousemove', this.debouncedShowHideTooltip);
273
+ this.chart.getZr().off('mouseout', this.debouncedShowHideTooltip);
274
274
 
275
275
  this.chart.off('mouseout', this.hideAnnotationsTooltip);
276
276
  this.chart.off('mouseover', this.onChartMouseOver);
@@ -293,8 +293,8 @@ export default {
293
293
  // when the mouse is hovered over the parent container
294
294
  // of echarts' svg element. This works only for data points
295
295
  // and not markPoints.
296
- chart.getDom().addEventListener('mousemove', this.debouncedShowHideTooltip);
297
- chart.getDom().addEventListener('mouseout', this.debouncedShowHideTooltip);
296
+ chart.getZr().on('mousemove', this.debouncedShowHideTooltip);
297
+ chart.getZr().on('mouseout', this.debouncedShowHideTooltip);
298
298
 
299
299
  // eCharts inbuild mouse events
300
300
  // https://echarts.apache.org/en/api.html#events.Mouse%20events
@@ -314,7 +314,7 @@ export default {
314
314
  this.chart = chart;
315
315
  this.$emit('created', chart);
316
316
  },
317
- showHideTooltip(mouseEvent) {
317
+ showHideTooltip({ event: mouseEvent }) {
318
318
  this.showDataTooltip = this.chart.containPixel('grid', [mouseEvent.zrX, mouseEvent.zrY]);
319
319
 
320
320
  this.dataTooltipPosition = {