q2-tecton-elements 1.47.4 → 1.47.5
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/dist/cjs/q2-chart-area.cjs.entry.js +14 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +28 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +24 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +14 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +28 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +24 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-chart-area.js +14 -1
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +28 -1
- package/dist/components/q2-chart-bar.js.map +1 -1
- package/dist/components/q2-chart-donut.js +24 -1
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/esm/q2-chart-area.entry.js +14 -1
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +28 -1
- package/dist/esm/q2-chart-bar.entry.js.map +1 -1
- package/dist/esm/q2-chart-donut.entry.js +24 -1
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/q2-tecton-elements/p-3ccb7031.entry.js +2 -0
- package/dist/q2-tecton-elements/p-3ccb7031.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-0097a699.entry.js → p-4d1e5572.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4d1e5572.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-bcd6b43b.entry.js → p-52bb49a9.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-52bb49a9.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +2 -0
- package/package.json +3 -3
- package/dist/q2-tecton-elements/p-0097a699.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-aa7e150c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-aa7e150c.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-bcd6b43b.entry.js.map +0 -1
|
@@ -1287,10 +1287,27 @@ const Q2ChartBar = class {
|
|
|
1287
1287
|
window.addEventListener('resize', this.resizeEventListener);
|
|
1288
1288
|
this.cacheComputedStyles();
|
|
1289
1289
|
this.updateChart(chart);
|
|
1290
|
+
this.setupChartEvents(chart);
|
|
1290
1291
|
overrideFocus(this.hostElement);
|
|
1291
1292
|
}
|
|
1292
1293
|
disconnectedCallback() {
|
|
1294
|
+
// Remove event listeners
|
|
1293
1295
|
window.removeEventListener('resize', this.resizeEventListener);
|
|
1296
|
+
// Clean up chart instance
|
|
1297
|
+
if (this.chart) {
|
|
1298
|
+
if (this.chartFinishedListener) {
|
|
1299
|
+
this.chart.off('finished', this.chartFinishedListener);
|
|
1300
|
+
}
|
|
1301
|
+
this.chart.dispose();
|
|
1302
|
+
this.chart = null;
|
|
1303
|
+
}
|
|
1304
|
+
// Null out cached computed styles to allow GC
|
|
1305
|
+
this.chartContainerStyles = null;
|
|
1306
|
+
this.hostElementStyles = null;
|
|
1307
|
+
// Null out DOM references
|
|
1308
|
+
this.chartContainer = null;
|
|
1309
|
+
this.resizeEventListener = null;
|
|
1310
|
+
this.chartFinishedListener = null;
|
|
1294
1311
|
}
|
|
1295
1312
|
cacheComputedStyles() {
|
|
1296
1313
|
this.chartContainerStyles = getComputedStyle(this.chartContainer);
|
|
@@ -1389,11 +1406,21 @@ const Q2ChartBar = class {
|
|
|
1389
1406
|
resizeChart() {
|
|
1390
1407
|
this.chart.resize();
|
|
1391
1408
|
}
|
|
1409
|
+
setupChartEvents(chart) {
|
|
1410
|
+
this.chartFinishedListener = () => {
|
|
1411
|
+
var _a;
|
|
1412
|
+
const canvas = chart.getDom().querySelector('canvas');
|
|
1413
|
+
if ((_a = canvas === null || canvas === void 0 ? void 0 : canvas.hasAttribute('aria-hidden')) !== null && _a !== void 0 ? _a : false)
|
|
1414
|
+
return;
|
|
1415
|
+
canvas.setAttribute('aria-hidden', 'true');
|
|
1416
|
+
};
|
|
1417
|
+
chart.on('finished', this.chartFinishedListener);
|
|
1418
|
+
}
|
|
1392
1419
|
propsUpdates() {
|
|
1393
1420
|
this.updateChart(this.chart);
|
|
1394
1421
|
}
|
|
1395
1422
|
render() {
|
|
1396
|
-
return (h("div", { key: '
|
|
1423
|
+
return (h("div", { key: 'd46a9bf3769e9207b97085ece599917c51df17fe', class: "container" }, h("div", { key: '2ee334a1b21bfd7c6d5195378871a91af125552a', ref: el => (this.chartContainer = el), class: "chart-container", "test-id": "barChartContainer" })));
|
|
1397
1424
|
}
|
|
1398
1425
|
get hostElement() { return getElement(this); }
|
|
1399
1426
|
static get watchers() { return {
|