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
|
@@ -1289,10 +1289,27 @@ const Q2ChartBar$1 = /*@__PURE__*/ proxyCustomElement(class Q2ChartBar extends H
|
|
|
1289
1289
|
window.addEventListener('resize', this.resizeEventListener);
|
|
1290
1290
|
this.cacheComputedStyles();
|
|
1291
1291
|
this.updateChart(chart);
|
|
1292
|
+
this.setupChartEvents(chart);
|
|
1292
1293
|
overrideFocus(this.hostElement);
|
|
1293
1294
|
}
|
|
1294
1295
|
disconnectedCallback() {
|
|
1296
|
+
// Remove event listeners
|
|
1295
1297
|
window.removeEventListener('resize', this.resizeEventListener);
|
|
1298
|
+
// Clean up chart instance
|
|
1299
|
+
if (this.chart) {
|
|
1300
|
+
if (this.chartFinishedListener) {
|
|
1301
|
+
this.chart.off('finished', this.chartFinishedListener);
|
|
1302
|
+
}
|
|
1303
|
+
this.chart.dispose();
|
|
1304
|
+
this.chart = null;
|
|
1305
|
+
}
|
|
1306
|
+
// Null out cached computed styles to allow GC
|
|
1307
|
+
this.chartContainerStyles = null;
|
|
1308
|
+
this.hostElementStyles = null;
|
|
1309
|
+
// Null out DOM references
|
|
1310
|
+
this.chartContainer = null;
|
|
1311
|
+
this.resizeEventListener = null;
|
|
1312
|
+
this.chartFinishedListener = null;
|
|
1296
1313
|
}
|
|
1297
1314
|
cacheComputedStyles() {
|
|
1298
1315
|
this.chartContainerStyles = getComputedStyle(this.chartContainer);
|
|
@@ -1391,11 +1408,21 @@ const Q2ChartBar$1 = /*@__PURE__*/ proxyCustomElement(class Q2ChartBar extends H
|
|
|
1391
1408
|
resizeChart() {
|
|
1392
1409
|
this.chart.resize();
|
|
1393
1410
|
}
|
|
1411
|
+
setupChartEvents(chart) {
|
|
1412
|
+
this.chartFinishedListener = () => {
|
|
1413
|
+
var _a;
|
|
1414
|
+
const canvas = chart.getDom().querySelector('canvas');
|
|
1415
|
+
if ((_a = canvas === null || canvas === void 0 ? void 0 : canvas.hasAttribute('aria-hidden')) !== null && _a !== void 0 ? _a : false)
|
|
1416
|
+
return;
|
|
1417
|
+
canvas.setAttribute('aria-hidden', 'true');
|
|
1418
|
+
};
|
|
1419
|
+
chart.on('finished', this.chartFinishedListener);
|
|
1420
|
+
}
|
|
1394
1421
|
propsUpdates() {
|
|
1395
1422
|
this.updateChart(this.chart);
|
|
1396
1423
|
}
|
|
1397
1424
|
render() {
|
|
1398
|
-
return (h("div", { key: '
|
|
1425
|
+
return (h("div", { key: 'd46a9bf3769e9207b97085ece599917c51df17fe', class: "container" }, h("div", { key: '2ee334a1b21bfd7c6d5195378871a91af125552a', ref: el => (this.chartContainer = el), class: "chart-container", "test-id": "barChartContainer" })));
|
|
1399
1426
|
}
|
|
1400
1427
|
get hostElement() { return this; }
|
|
1401
1428
|
static get watchers() { return {
|