@carbon/charts 1.13.31 → 1.13.33

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{_baseEach-70Y6bksF.mjs → _baseEach-fBb6x0bv.mjs} +2 -2
  3. package/dist/{_baseEach-70Y6bksF.mjs.map → _baseEach-fBb6x0bv.mjs.map} +1 -1
  4. package/dist/{angle-utils-dwZwPD9W.mjs → angle-utils-uYSg57eT.mjs} +32 -29
  5. package/dist/{angle-utils-dwZwPD9W.mjs.map → angle-utils-uYSg57eT.mjs.map} +1 -1
  6. package/dist/{choropleth-5mgcLFan.mjs → choropleth-QJfTyxqo.mjs} +272 -249
  7. package/dist/choropleth-QJfTyxqo.mjs.map +1 -0
  8. package/dist/{color-scale-utils-05Wy3zGY.mjs → color-scale-utils-k_4IkKRj.mjs} +705 -698
  9. package/dist/color-scale-utils-k_4IkKRj.mjs.map +1 -0
  10. package/dist/components/axes/toolbar.d.ts +1 -1
  11. package/dist/components/index.mjs +64 -72
  12. package/dist/components/index.mjs.map +1 -1
  13. package/dist/demo/index.mjs +20 -20
  14. package/dist/demo/styles.css +1 -0
  15. package/dist/demo/styles.css.map +1 -1
  16. package/dist/{enums-tMKLWMMm.mjs → enums-lWSDG4ik.mjs} +7 -7
  17. package/dist/{enums-tMKLWMMm.mjs.map → enums-lWSDG4ik.mjs.map} +1 -1
  18. package/dist/{index-Ez18Vgtt.mjs → index-2XiCVv0D.mjs} +2 -2
  19. package/dist/index-2XiCVv0D.mjs.map +1 -0
  20. package/dist/index.mjs +154 -159
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/interfaces/enums.d.ts +1 -0
  23. package/dist/interfaces/index.mjs +1 -1
  24. package/dist/model/index.mjs +17 -21
  25. package/dist/model/index.mjs.map +1 -1
  26. package/dist/services/essentials/dom-utils.d.ts +1 -0
  27. package/dist/services/index.mjs +26 -28
  28. package/dist/services/index.mjs.map +1 -1
  29. package/dist/styles.css +1 -0
  30. package/dist/styles.css.map +1 -1
  31. package/dist/styles.min.css +1 -1
  32. package/dist/styles.min.css.map +1 -1
  33. package/dist/umd/bundle.umd.js +17 -17
  34. package/dist/umd/bundle.umd.js.map +1 -1
  35. package/dist/{wordcloud-7JPbYYMG.mjs → wordcloud-a6lxyv6s.mjs} +4 -4
  36. package/dist/{wordcloud-7JPbYYMG.mjs.map → wordcloud-a6lxyv6s.mjs.map} +1 -1
  37. package/dist/{zoom-wI-Jcyj4.mjs → zoom-PYRfEo-q.mjs} +4 -4
  38. package/dist/{zoom-wI-Jcyj4.mjs.map → zoom-PYRfEo-q.mjs.map} +1 -1
  39. package/package.json +4 -4
  40. package/scss/components/toolbar/_modal.scss +1 -0
  41. package/styles.css +1 -0
  42. package/styles.min.css +1 -1
  43. package/dist/choropleth-5mgcLFan.mjs.map +0 -1
  44. package/dist/color-scale-utils-05Wy3zGY.mjs.map +0 -1
  45. package/dist/index-Ez18Vgtt.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,32 @@
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.13.33 (2024-02-08)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **modal:** padding of export to csv button
11
+ ([#1748](https://github.com/carbon-design-system/carbon-charts/issues/1748))
12
+ ([aa3caba](https://github.com/carbon-design-system/carbon-charts/commit/aa3caba334a0e810b6563c4c446c53a93b36ac7f))
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
+
19
+ ## 1.13.32 (2024-02-07)
20
+
21
+ ### Bug Fixes
22
+
23
+ - **toolbar:** add minimized icon for fullscreen
24
+ ([#1744](https://github.com/carbon-design-system/carbon-charts/issues/1744))
25
+ ([4e43021](https://github.com/carbon-design-system/carbon-charts/commit/4e43021b51e4255b5a5ca2e887c83954f53412dc))
26
+
27
+ # Change Log
28
+
29
+ All notable changes to this project will be documented in this file. See
30
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
31
+
6
32
  ## 1.13.31 (2024-02-07)
7
33
 
8
34
  ### Bug Fixes
@@ -1,4 +1,4 @@
1
- import { e as f, k as h, h as t } from "./color-scale-utils-05Wy3zGY.mjs";
1
+ import { e as f, k as h, h as t } from "./color-scale-utils-k_4IkKRj.mjs";
2
2
  function i(a, e) {
3
3
  return a && f(a, e, h);
4
4
  }
@@ -18,4 +18,4 @@ const v = E;
18
18
  export {
19
19
  v as b
20
20
  };
21
- //# sourceMappingURL=_baseEach-70Y6bksF.mjs.map
21
+ //# sourceMappingURL=_baseEach-fBb6x0bv.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"_baseEach-70Y6bksF.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","baseEach$1"],"mappings":";AAWA,SAASA,EAAWC,GAAQC,GAAU;AACpC,SAAOD,KAAUE,EAAQF,GAAQC,GAAUE,CAAI;AACjD;ACHA,SAASC,EAAeC,GAAUC,GAAW;AAC3C,SAAO,SAASC,GAAYN,GAAU;AACpC,QAAIM,KAAc;AAChB,aAAOA;AAET,QAAI,CAACC,EAAYD,CAAU;AACzB,aAAOF,EAASE,GAAYN,CAAQ;AAMtC,aAJIQ,IAASF,EAAW,QACpBG,IAAQJ,IAAYG,IAAS,IAC7BE,IAAW,OAAOJ,CAAU,IAExBD,IAAYI,MAAU,EAAEA,IAAQD,MAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACX;AACA;AClBA,IAAIK,IAAWR,EAAeL,CAAU;AAExC,MAAAc,IAAeD;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"_baseEach-fBb6x0bv.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","baseEach$1"],"mappings":";AAWA,SAASA,EAAWC,GAAQC,GAAU;AACpC,SAAOD,KAAUE,EAAQF,GAAQC,GAAUE,CAAI;AACjD;ACHA,SAASC,EAAeC,GAAUC,GAAW;AAC3C,SAAO,SAASC,GAAYN,GAAU;AACpC,QAAIM,KAAc;AAChB,aAAOA;AAET,QAAI,CAACC,EAAYD,CAAU;AACzB,aAAOF,EAASE,GAAYN,CAAQ;AAMtC,aAJIQ,IAASF,EAAW,QACpBG,IAAQJ,IAAYG,IAAS,IAC7BE,IAAW,OAAOJ,CAAU,IAExBD,IAAYI,MAAU,EAAEA,IAAQD,MAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACX;AACA;AClBA,IAAIK,IAAWR,EAAeL,CAAU;AAExC,MAAAc,IAAeD;","x_google_ignoreList":[0,1,2]}
@@ -1,6 +1,6 @@
1
- import { select as m } from "d3";
2
- import { j as fe, l as O, r as de, m as T, n as _ } from "./color-scale-utils-05Wy3zGY.mjs";
3
- import { _ as P, T as E, o as b } from "./enums-tMKLWMMm.mjs";
1
+ import { select as d } from "d3";
2
+ import { j as fe, l as O, r as de, m as T, n as _ } from "./color-scale-utils-k_4IkKRj.mjs";
3
+ import { _ as P, T as E, o as b } from "./enums-lWSDG4ik.mjs";
4
4
  var me = /\s/;
5
5
  function ge(t) {
6
6
  for (var e = t.length; e-- && me.test(t.charAt(e)); )
@@ -33,10 +33,10 @@ var xe = function() {
33
33
  const M = xe;
34
34
  var Re = "Expected a function", Ce = Math.max, Te = Math.min;
35
35
  function Ie(t, e, n) {
36
- var r, i, s, a, c, o, u = 0, f = !1, d = !1, h = !0;
36
+ var r, i, s, a, c, o, u = 0, f = !1, m = !1, h = !0;
37
37
  if (typeof t != "function")
38
38
  throw new TypeError(Re);
39
- e = j(e) || 0, O(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Ce(j(n.maxWait) || 0, e) : s, h = "trailing" in n ? !!n.trailing : h);
39
+ e = j(e) || 0, O(n) && (f = !!n.leading, m = "maxWait" in n, s = m ? Ce(j(n.maxWait) || 0, e) : s, h = "trailing" in n ? !!n.trailing : h);
40
40
  function w(l) {
41
41
  var S = r, C = i;
42
42
  return r = i = void 0, u = l, a = t.apply(C, S), a;
@@ -46,11 +46,11 @@ function Ie(t, e, n) {
46
46
  }
47
47
  function I(l) {
48
48
  var S = l - o, C = l - u, U = e - S;
49
- return d ? Te(U, s - C) : U;
49
+ return m ? Te(U, s - C) : U;
50
50
  }
51
51
  function z(l) {
52
52
  var S = l - o, C = l - u;
53
- return o === void 0 || S >= e || S < 0 || d && C >= s;
53
+ return o === void 0 || S >= e || S < 0 || m && C >= s;
54
54
  }
55
55
  function L() {
56
56
  var l = M();
@@ -72,7 +72,7 @@ function Ie(t, e, n) {
72
72
  if (r = arguments, i = this, o = l, S) {
73
73
  if (c === void 0)
74
74
  return R(o);
75
- if (d)
75
+ if (m)
76
76
  return clearTimeout(c), c = setTimeout(L, e), w(o);
77
77
  }
78
78
  return c === void 0 && (c = setTimeout(L, e)), a;
@@ -462,12 +462,12 @@ async function ut(t, e) {
462
462
  y(i.cssRules || []).forEach((s, a) => {
463
463
  if (s.type === CSSRule.IMPORT_RULE) {
464
464
  let c = a + 1;
465
- const o = s.href, u = Y(o).then((f) => Z(f, e)).then((f) => K(f).forEach((d) => {
465
+ const o = s.href, u = Y(o).then((f) => Z(f, e)).then((f) => K(f).forEach((m) => {
466
466
  try {
467
- i.insertRule(d, d.startsWith("@import") ? c += 1 : i.cssRules.length);
467
+ i.insertRule(m, m.startsWith("@import") ? c += 1 : i.cssRules.length);
468
468
  } catch (h) {
469
469
  console.error("Error inserting rule from remote css", {
470
- rule: d,
470
+ rule: m,
471
471
  error: h
472
472
  });
473
473
  }
@@ -569,7 +569,7 @@ class k extends oe {
569
569
  useBBox: !1,
570
570
  useBoundingRect: !1
571
571
  }) {
572
- e.attr || (e = m(e));
572
+ e.attr || (e = d(e));
573
573
  const r = {
574
574
  width: 0,
575
575
  height: 0
@@ -601,15 +601,15 @@ class k extends oe {
601
601
  } catch (h) {
602
602
  console.error(h);
603
603
  }
604
- let d;
605
- if (a instanceof SVGSVGElement && (d = {
604
+ let m;
605
+ if (a instanceof SVGSVGElement && (m = {
606
606
  width: a.clientWidth,
607
607
  height: a.clientHeight
608
608
  }), n) {
609
609
  if (n.useAttrs && (i(s), r.width > 0 && r.height > 0))
610
610
  return r;
611
- if (n.useClientDimensions && (i(d), r.width > 0 && r.height > 0))
612
- return d;
611
+ if (n.useClientDimensions && (i(m), r.width > 0 && r.height > 0))
612
+ return m;
613
613
  if (n.useBBox && (i(o), r.width > 0 && r.height > 0))
614
614
  return o;
615
615
  if (n.useBoundingRect && (i(f), r.width > 0 && r.height > 0))
@@ -622,7 +622,7 @@ class k extends oe {
622
622
  };
623
623
  i(h);
624
624
  } catch {
625
- i(d), i(o), i(s);
625
+ i(m), i(o), i(s);
626
626
  }
627
627
  return r;
628
628
  }
@@ -647,7 +647,7 @@ class k extends oe {
647
647
  this.chartID = Math.floor((1 + Math.random()) * 281474976710656).toString(16);
648
648
  }
649
649
  addMainContainer() {
650
- const e = this.model.getOptions(), n = T(e, "style", "prefix"), r = m(this.getHolder()).append("div").classed(`${_}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
650
+ const e = this.model.getOptions(), n = T(e, "style", "prefix"), r = d(this.getHolder()).append("div").classed(`${_}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
651
651
  r.append("g").attr("class", wt), this.mainContainer = r.node();
652
652
  }
653
653
  update() {
@@ -655,13 +655,13 @@ class k extends oe {
655
655
  }
656
656
  styleHolderElement() {
657
657
  const e = this.getHolder(), { width: n, height: r, theme: i } = this.model.getOptions();
658
- n !== this.width && (e.style.width = n, this.width = n), r !== this.height && (e.style.height = r, this.height = r), m(this.getHolder()).classed(`${_}--chart-holder`, !0).attr("data-carbon-theme", i);
658
+ n !== this.width && (e.style.width = n, this.width = n), r !== this.height && (e.style.height = r, this.height = r), d(this.getHolder()).classed(`${_}--chart-holder`, !0).attr("data-carbon-theme", i);
659
659
  }
660
660
  getHolder() {
661
661
  return this.model.get("holder");
662
662
  }
663
663
  exportToJPG() {
664
- const e = this, n = this.model.getOptions(), r = this.getHolder(), i = m(r);
664
+ const e = this, n = this.model.getOptions(), r = this.getHolder(), i = d(r);
665
665
  i.classed("filled", !0), yt(this.getMainContainer(), {
666
666
  quality: 1,
667
667
  // Remove toolbar
@@ -674,7 +674,7 @@ class k extends oe {
674
674
  });
675
675
  }
676
676
  exportToPNG() {
677
- const e = this, n = this.model.getOptions(), r = this.getHolder(), i = m(r);
677
+ const e = this, n = this.model.getOptions(), r = this.getHolder(), i = d(r);
678
678
  i.classed("filled", !0), pt(this.getMainContainer(), {
679
679
  quality: 1,
680
680
  // Remove toolbar
@@ -688,32 +688,35 @@ class k extends oe {
688
688
  console.error("oops, something went wrong!", s);
689
689
  });
690
690
  }
691
+ isFullScreenMode() {
692
+ return d(this.getHolder()).classed("fullscreen");
693
+ }
691
694
  toggleFullscreen() {
692
695
  const e = this.getHolder();
693
- m(e).classed("fullscreen") && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) ? document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen() : e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen && e.msRequestFullscreen();
696
+ d(e).classed("fullscreen") && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) ? document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen() : e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen && e.msRequestFullscreen();
694
697
  }
695
698
  handleFullscreenChange() {
696
699
  document.addEventListener("fullscreenchange", () => {
697
- const e = m(this.getHolder()), n = e.classed("fullscreen");
700
+ const e = d(this.getHolder()), n = e.classed("fullscreen");
698
701
  e.classed("fullscreen", !n);
699
702
  });
700
703
  }
701
704
  setSVGMaxHeight() {
702
705
  if (!this.model.getOptions().height) {
703
706
  const { height: e } = k.getSVGElementSize(
704
- m(this.mainContainer),
707
+ d(this.mainContainer),
705
708
  {
706
709
  useBBox: !0
707
710
  }
708
- ), n = m(this.mainContainer).attr("class"), r = m(this.mainContainer).selectAll(`.${n} > svg`);
711
+ ), n = d(this.mainContainer).attr("class"), r = d(this.mainContainer).selectAll(`.${n} > svg`);
709
712
  let i = 0;
710
713
  r.nodes().forEach(function(s) {
711
714
  i += Number(
712
- k.getSVGElementSize(m(s), {
715
+ k.getSVGElementSize(d(s), {
713
716
  useBBox: !0
714
717
  }).height
715
718
  );
716
- }), i <= e ? m(this.mainContainer).attr("height", i) : m(this.mainContainer).attr("height", "100%");
719
+ }), i <= e ? d(this.mainContainer).attr("height", i) : d(this.mainContainer).attr("height", "100%");
717
720
  }
718
721
  }
719
722
  getMainContainer() {
@@ -721,7 +724,7 @@ class k extends oe {
721
724
  }
722
725
  addHolderListeners() {
723
726
  const e = this.getHolder();
724
- e && m(e).on("mouseover", () => {
727
+ e && d(e).on("mouseover", () => {
725
728
  var n;
726
729
  (n = this.services.events) == null || n.dispatchEvent(P.Chart.MOUSEOVER);
727
730
  }).on("mouseout", () => {
@@ -841,4 +844,4 @@ export {
841
844
  Ct as r,
842
845
  j as t
843
846
  };
844
- //# sourceMappingURL=angle-utils-dwZwPD9W.mjs.map
847
+ //# sourceMappingURL=angle-utils-uYSg57eT.mjs.map