@carbon/charts-react 1.11.2 → 1.11.3
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/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -13272,7 +13272,7 @@ class vn extends pt {
|
|
|
13272
13272
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13273
13273
|
// @ts-ignore
|
|
13274
13274
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13275
|
-
render(t = !
|
|
13275
|
+
render(t = !1) {
|
|
13276
13276
|
this.getComponentContainer().style("width", `${this.configs.size || jh.default.size}px`).style("height", `${this.configs.size || jh.default.size}px`).attr("opacity", 0);
|
|
13277
13277
|
}
|
|
13278
13278
|
}
|
|
@@ -14406,7 +14406,7 @@ class Ja extends pt {
|
|
|
14406
14406
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14407
14407
|
// @ts-ignore
|
|
14408
14408
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14409
|
-
render(t = !
|
|
14409
|
+
render(t = !1) {
|
|
14410
14410
|
const n = this.model.getOptions();
|
|
14411
14411
|
if (!this.isEventListenerAdded) {
|
|
14412
14412
|
const r = N(this.services.domUtils.getHolder()), i = _(n, "style", "prefix");
|
|
@@ -14424,7 +14424,7 @@ class is extends pt {
|
|
|
14424
14424
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14425
14425
|
// @ts-ignore
|
|
14426
14426
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14427
|
-
render(t = !
|
|
14427
|
+
render(t = !1) {
|
|
14428
14428
|
const n = this.getComponentContainer(), r = _(this.getOptions(), "title"), i = n.selectAll("p.title").data([r]);
|
|
14429
14429
|
if (i.enter().append("p").classed("title", !0).attr("role", "heading").attr("aria-level", 2).merge(i).html((s) => s), i.node() && i.node().offsetWidth < i.node().scrollWidth) {
|
|
14430
14430
|
const s = this;
|
|
@@ -14501,7 +14501,7 @@ class Xc extends pt {
|
|
|
14501
14501
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14502
14502
|
// @ts-ignore
|
|
14503
14503
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14504
|
-
render(t = !
|
|
14504
|
+
render(t = !1) {
|
|
14505
14505
|
const n = this.getOptions(), r = _(n, "legend"), i = _(r, "alignment"), s = _(n, "legend", "orientation");
|
|
14506
14506
|
let a = this.model.getDataGroups();
|
|
14507
14507
|
const { DISABLED: o } = Vt.items.status, l = a.some((x) => x.status === o), c = _(r, "order"), u = this.getComponentContainer().classed("center-aligned", i === Yt.CENTER).classed("right-aligned", i === Yt.RIGHT).classed(s, !0).classed("has-deactivated-items", l).attr("role", ut.GROUP).attr("aria-label", "Data groups").attr("data-name", "legend-items");
|
|
@@ -14876,7 +14876,7 @@ class Zc extends pt {
|
|
|
14876
14876
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14877
14877
|
// @ts-ignore
|
|
14878
14878
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14879
|
-
render(t = !
|
|
14879
|
+
render(t = !1) {
|
|
14880
14880
|
const n = this.getOptions(), r = _(n, "tooltip", "enabled");
|
|
14881
14881
|
if (r) {
|
|
14882
14882
|
const i = N(this.services.domUtils.getHolder()), s = _(n, "style", "prefix");
|
|
@@ -16004,7 +16004,7 @@ let $n = class extends pt {
|
|
|
16004
16004
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16005
16005
|
// @ts-ignore
|
|
16006
16006
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16007
|
-
render(t = !
|
|
16007
|
+
render(t = !1) {
|
|
16008
16008
|
const n = _(this.getOptions(), "ruler", "enabled");
|
|
16009
16009
|
this.drawBackdrop(), n && !this.isEventListenerAdded ? this.addBackdropEventListeners() : !n && this.isEventListenerAdded && this.removeBackdropEventListeners();
|
|
16010
16010
|
}
|
|
@@ -16348,7 +16348,7 @@ let Zm = class extends pt {
|
|
|
16348
16348
|
}), l = P.appendOrSelect(s, `g.axis.${n}`);
|
|
16349
16349
|
let c, u;
|
|
16350
16350
|
if (n === H.BOTTOM || n === H.TOP ? (c = this.configs.axes[H.LEFT] ? this.margins.left : 0, u = this.configs.axes[H.RIGHT] ? a - this.margins.right : a) : (c = o - this.margins.bottom, u = this.margins.top), !this.services.cartesianScales)
|
|
16351
|
-
throw new Error("Services cartesianScales
|
|
16351
|
+
throw new Error("Services cartesianScales undefined");
|
|
16352
16352
|
const h = this.services.cartesianScales.getScaleByPosition(n);
|
|
16353
16353
|
this.scaleType === J.LABELS || this.scaleType === J.LABELS_RATIO ? h.rangeRound([c, u]) : h.range([c, u]);
|
|
16354
16354
|
let d;
|
|
@@ -17704,7 +17704,7 @@ class Km extends Xc {
|
|
|
17704
17704
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17705
17705
|
// @ts-ignore
|
|
17706
17706
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17707
|
-
render(t = !
|
|
17707
|
+
render(t = !1) {
|
|
17708
17708
|
const n = this.getOptions(), r = this.getComponentContainer(), { width: i } = P.getSVGElementSize(r, {
|
|
17709
17709
|
useAttrs: !0
|
|
17710
17710
|
}), s = _(n, "color", "gradient", "colors"), a = _(
|
|
@@ -17786,7 +17786,7 @@ class jR extends is {
|
|
|
17786
17786
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17787
17787
|
// @ts-ignore
|
|
17788
17788
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17789
|
-
render(t = !
|
|
17789
|
+
render(t = !1) {
|
|
17790
17790
|
const n = _(this.model.getDisplayData(), 0), r = this.getOptions(), i = this.getComponentContainer(), { groupMapsTo: s } = r.data;
|
|
17791
17791
|
if (_(r, "meter", "proportional"))
|
|
17792
17792
|
this.displayTotal(), this.displayBreakdownTitle();
|
|
@@ -21242,23 +21242,24 @@ class Fe {
|
|
|
21242
21242
|
this.model.set({ holder: t }, { skipUpdate: !0 }), Object.keys(this.services).forEach((r) => {
|
|
21243
21243
|
const i = this.services[r];
|
|
21244
21244
|
this.services[r] = new i(this.model, this.services);
|
|
21245
|
-
}), this.services.events.addEventListener(A.Model.UPDATE, () => {
|
|
21246
|
-
|
|
21245
|
+
}), this.services.events.addEventListener(A.Model.UPDATE, (r) => {
|
|
21246
|
+
const i = !!_(r, "detail", "animate");
|
|
21247
|
+
this.update(i);
|
|
21247
21248
|
}), this.model.setData(n.data), this.services.events.addEventListener(A.Chart.RESIZE, () => {
|
|
21248
|
-
this.update();
|
|
21249
|
+
this.update(!1);
|
|
21249
21250
|
}), this.components = this.getComponents(), this.update();
|
|
21250
21251
|
}
|
|
21251
21252
|
getComponents() {
|
|
21252
21253
|
return console.error("getComponents() method is not implemented"), [];
|
|
21253
21254
|
}
|
|
21254
|
-
update() {
|
|
21255
|
+
update(t = !0) {
|
|
21255
21256
|
if (!this.components)
|
|
21256
21257
|
return;
|
|
21257
|
-
Object.keys(this.services).forEach((
|
|
21258
|
-
this.services[
|
|
21259
|
-
}), this.components.forEach((
|
|
21260
|
-
const
|
|
21261
|
-
Promise.all(
|
|
21258
|
+
Object.keys(this.services).forEach((i) => {
|
|
21259
|
+
this.services[i].update();
|
|
21260
|
+
}), this.components.forEach((i) => i.render(t));
|
|
21261
|
+
const n = this.services.transitions.getPendingTransitions(), r = Object.keys(n).map((i) => n[i].end().catch((s) => s));
|
|
21262
|
+
Promise.all(r).then(
|
|
21262
21263
|
() => this.services.events.dispatchEvent(A.Chart.RENDER_FINISHED)
|
|
21263
21264
|
);
|
|
21264
21265
|
}
|