@carbon/charts 1.13.31 → 1.13.32
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 +13 -0
- package/dist/{_baseEach-70Y6bksF.mjs → _baseEach-prRbMbTH.mjs} +2 -2
- package/dist/{_baseEach-70Y6bksF.mjs.map → _baseEach-prRbMbTH.mjs.map} +1 -1
- package/dist/{angle-utils-dwZwPD9W.mjs → angle-utils-nunJYhKU.mjs} +32 -29
- package/dist/{angle-utils-dwZwPD9W.mjs.map → angle-utils-nunJYhKU.mjs.map} +1 -1
- package/dist/{choropleth-5mgcLFan.mjs → choropleth-ctjqFBTr.mjs} +272 -249
- package/dist/choropleth-ctjqFBTr.mjs.map +1 -0
- package/dist/{color-scale-utils-05Wy3zGY.mjs → color-scale-utils-bHW60Oxp.mjs} +2 -2
- package/dist/{color-scale-utils-05Wy3zGY.mjs.map → color-scale-utils-bHW60Oxp.mjs.map} +1 -1
- package/dist/components/axes/toolbar.d.ts +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/demo/index.mjs +6 -6
- package/dist/{enums-tMKLWMMm.mjs → enums-lWSDG4ik.mjs} +7 -7
- package/dist/{enums-tMKLWMMm.mjs.map → enums-lWSDG4ik.mjs.map} +1 -1
- package/dist/{index-Ez18Vgtt.mjs → index-2XiCVv0D.mjs} +2 -2
- package/dist/index-2XiCVv0D.mjs.map +1 -0
- package/dist/index.mjs +12 -12
- package/dist/interfaces/enums.d.ts +1 -0
- package/dist/interfaces/index.mjs +1 -1
- package/dist/model/index.mjs +4 -4
- package/dist/services/essentials/dom-utils.d.ts +1 -0
- package/dist/services/index.mjs +4 -4
- package/dist/umd/bundle.umd.js +16 -16
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-7JPbYYMG.mjs → wordcloud-1zN0_3LJ.mjs} +4 -4
- package/dist/{wordcloud-7JPbYYMG.mjs.map → wordcloud-1zN0_3LJ.mjs.map} +1 -1
- package/dist/{zoom-wI-Jcyj4.mjs → zoom-KwtDsQ73.mjs} +4 -4
- package/dist/{zoom-wI-Jcyj4.mjs.map → zoom-KwtDsQ73.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/choropleth-5mgcLFan.mjs.map +0 -1
- package/dist/index-Ez18Vgtt.mjs.map +0 -1
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.13.32 (2024-02-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **toolbar:** add minimized icon for fullscreen
|
|
11
|
+
([#1744](https://github.com/carbon-design-system/carbon-charts/issues/1744))
|
|
12
|
+
([4e43021](https://github.com/carbon-design-system/carbon-charts/commit/4e43021b51e4255b5a5ca2e887c83954f53412dc))
|
|
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.13.31 (2024-02-07)
|
|
7
20
|
|
|
8
21
|
### Bug Fixes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as f, k as h, h as t } from "./color-scale-utils-
|
|
1
|
+
import { e as f, k as h, h as t } from "./color-scale-utils-bHW60Oxp.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-
|
|
21
|
+
//# sourceMappingURL=_baseEach-prRbMbTH.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseEach-
|
|
1
|
+
{"version":3,"file":"_baseEach-prRbMbTH.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
|
|
2
|
-
import { j as fe, l as O, r as de, m as T, n as _ } from "./color-scale-utils-
|
|
3
|
-
import { _ as P, T as E, o as b } from "./enums-
|
|
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-bHW60Oxp.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,
|
|
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,
|
|
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
|
|
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 ||
|
|
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 (
|
|
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((
|
|
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(
|
|
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:
|
|
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 =
|
|
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
|
|
605
|
-
if (a instanceof SVGSVGElement && (
|
|
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(
|
|
612
|
-
return
|
|
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(
|
|
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 =
|
|
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),
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
707
|
+
d(this.mainContainer),
|
|
705
708
|
{
|
|
706
709
|
useBBox: !0
|
|
707
710
|
}
|
|
708
|
-
), n =
|
|
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(
|
|
715
|
+
k.getSVGElementSize(d(s), {
|
|
713
716
|
useBBox: !0
|
|
714
717
|
}).height
|
|
715
718
|
);
|
|
716
|
-
}), i <= e ?
|
|
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 &&
|
|
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-
|
|
847
|
+
//# sourceMappingURL=angle-utils-nunJYhKU.mjs.map
|