@carbon/charts-vue 1.14.1 → 1.14.2

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
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.14.2 (2024-02-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **config:** add SSR guard for `window.navigator`
11
+ ([#1756](https://github.com/carbon-design-system/carbon-charts/issues/1756))
12
+ ([9625ae3](https://github.com/carbon-design-system/carbon-charts/commit/9625ae321a5bb8a3c39ad6c788f9f08450a18ff3))
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
6
19
  ## 1.14.1 (2024-02-13)
7
20
 
8
21
  **Note:** Version bump only for package @carbon/charts-vue
package/dist/index.mjs CHANGED
@@ -8453,7 +8453,7 @@ const oe = "cds", dn = {
8453
8453
  threshold: 16,
8454
8454
  numCharacter: 14
8455
8455
  }, T$ = {
8456
- code: (navigator == null ? void 0 : navigator.language) || "en-US",
8456
+ code: typeof navigator < "u" && (navigator == null ? void 0 : navigator.language) || "en-US",
8457
8457
  // read from browser's navigator.language
8458
8458
  number: (e, t = (navigator == null ? void 0 : navigator.language) || "en-US") => e.toLocaleString(t),
8459
8459
  // based on code property if specified
@@ -18459,22 +18459,20 @@ class HN extends hs {
18459
18459
  }
18460
18460
  // show the total for prop meter
18461
18461
  displayTotal() {
18462
- const t = this.getComponentContainer(), n = this.getOptions(), r = x(n, "meter", "proportional", "total"), i = r ? x(n, "meter", "proportional", "total") : this.model.getMaximumDomain(this.model.getDisplayData()), s = x(n, "meter", "proportional", "unit") ? x(n, "meter", "proportional", "unit") : "", a = x(n, "meter", "proportional", "totalFormatter"), { code: o, number: l } = x(n, "locale"), c = a !== null ? a(i) : `${l(r, o)} ${s} total`, u = I.getHTMLElementSize(this.services.domUtils.getMainContainer()), d = u.width ? u.width : this.parent.node().getAttribute("width"), h = t.selectAll("text.proportional-meter-total").data([c]);
18463
- h.enter().append("text").classed("proportional-meter-total", !0).merge(h).attr(
18462
+ const t = this.getComponentContainer(), n = this.getOptions(), r = x(n, "meter", "proportional", "total"), i = r ? x(n, "meter", "proportional", "total") : this.model.getMaximumDomain(this.model.getDisplayData()), s = x(n, "meter", "proportional", "unit") ? x(n, "meter", "proportional", "unit") : "", a = x(n, "meter", "proportional", "totalFormatter"), { code: o, number: l } = x(n, "locale"), c = a !== null ? a(i) : `${l(r, o)} ${s} total`, u = I.getHTMLElementSize(this.parent.node()).width, d = t.selectAll("text.proportional-meter-total").data([c]);
18463
+ d.enter().append("text").classed("proportional-meter-total", !0).merge(d).attr(
18464
18464
  "x",
18465
- this.model.getStatus() && typeof d != "string" ? d - Yt.total.paddingRight : d
18466
- ).attr("y", "1em").attr("text-anchor", "end").text((f) => f), h.exit().remove();
18465
+ this.model.getStatus() && typeof u != "string" ? u - Yt.total.paddingRight : u
18466
+ ).attr("y", "1em").attr("text-anchor", "end").text((h) => h), d.exit().remove();
18467
18467
  }
18468
18468
  /**
18469
18469
  * Appends the corresponding status based on the value and the peak.
18470
18470
  */
18471
18471
  displayStatus() {
18472
- const t = this, n = this.getComponentContainer(), r = I.getHTMLElementSize(
18473
- this.services.domUtils.getMainContainer()
18474
- ), i = r.width ? r.width : 0, s = this.model.getStatus(), a = Yt.status.indicatorSize / 2, o = I.appendOrSelect(n, "g.status-indicator").attr("class", s !== null ? `status-indicator status--${s}` : "").attr("transform", `translate(${i - a}, 0)`), l = s ? [s] : [], c = o.selectAll("circle.status").data(l);
18475
- c.enter().append("circle").merge(c).attr("class", "status").attr("r", a).attr("cx", 0).attr("cy", 8);
18476
- const u = o.selectAll("path.innerFill").data(l);
18477
- u.enter().append("path").merge(u).attr("d", t.getStatusIconPathString(s)).attr("transform", `translate(-${a}, 0)`).attr("class", "innerFill"), u.exit().remove(), c.exit().remove();
18472
+ const t = this, n = this.getComponentContainer(), r = I.getHTMLElementSize(this.parent.node()).width || 0, i = this.model.getStatus(), s = Yt.status.indicatorSize / 2, a = I.appendOrSelect(n, "g.status-indicator").attr("class", i !== null ? `status-indicator status--${i}` : "").attr("transform", `translate(${r - s}, 0)`), o = i ? [i] : [], l = a.selectAll("circle.status").data(o);
18473
+ l.enter().append("circle").merge(l).attr("class", "status").attr("r", s).attr("cx", 0).attr("cy", 8);
18474
+ const c = a.selectAll("path.innerFill").data(o);
18475
+ c.enter().append("path").merge(c).attr("d", t.getStatusIconPathString(i)).attr("transform", `translate(-${s}, 0)`).attr("class", "innerFill"), c.exit().remove(), l.exit().remove();
18478
18476
  }
18479
18477
  /**
18480
18478
  * Appends the associated percentage to the end of the title
@@ -18499,15 +18497,15 @@ class HN extends hs {
18499
18497
  }
18500
18498
  // computes the maximum space a title can take
18501
18499
  getMaxTitleWidth() {
18502
- const t = I.getHTMLElementSize(this.services.domUtils.getMainContainer()), n = x(this.getOptions(), "meter", "proportional"), r = t.width ? t.width : this.parent.node().getBoundingClientRect().width;
18503
- if (n !== null) {
18504
- const i = I.appendOrSelect(this.parent, "text.proportional-meter-total").node(), s = I.getSVGElementSize(i, {
18500
+ const t = x(this.getOptions(), "meter", "proportional"), n = I.getHTMLElementSize(this.parent.node()).width;
18501
+ if (t !== null) {
18502
+ const r = I.appendOrSelect(this.parent, "text.proportional-meter-total").node(), i = I.getSVGElementSize(r, {
18505
18503
  useBBox: !0
18506
18504
  }).width;
18507
- return r - s - Yt.total.paddingLeft;
18505
+ return n - i - Yt.total.paddingLeft;
18508
18506
  } else {
18509
- const i = I.appendOrSelect(this.parent, "text.percent-value"), s = Yt.statusBar.paddingRight, a = i.node().getComputedTextLength(), o = I.appendOrSelect(this.parent, "g.status-indicator").node(), l = I.getSVGElementSize(o, { useBBox: !0 }).width + Yt.status.paddingLeft;
18510
- return r - a - s - l;
18507
+ const r = I.appendOrSelect(this.parent, "text.percent-value"), i = Yt.statusBar.paddingRight, s = r.node().getComputedTextLength(), a = I.appendOrSelect(this.parent, "g.status-indicator").node(), o = I.getSVGElementSize(a, { useBBox: !0 }).width + Yt.status.paddingLeft;
18508
+ return n - s - i - o;
18511
18509
  }
18512
18510
  }
18513
18511
  /**