@carbon/charts 1.27.14 → 1.27.15

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.
@@ -1,4 +1,4 @@
1
- import { b as f, k as i, i as b } from "./color-scale-utils-C4KU2jNr.mjs";
1
+ import { b as f, k as i, i as b } from "./color-scale-utils--mwppOF8.mjs";
2
2
  function h(r, n) {
3
3
  return r && f(r, n, i);
4
4
  }
@@ -29,4 +29,4 @@ export {
29
29
  g as c,
30
30
  k as s
31
31
  };
32
- //# sourceMappingURL=array-D6ni_TQq.mjs.map
32
+ //# sourceMappingURL=array-DpdUWKrC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"array-D6ni_TQq.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js","../../../node_modules/d3/node_modules/d3-shape/src/constant.js","../../../node_modules/d3/node_modules/d3-shape/src/array.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","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","constant","x","slice","array"],"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,IAA6B,IAC7BC,IAAW,OAAOJ,CAAU,GAEF,EAAEG,IAAQD,KAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACT;AACF;AClBG,IAACK,IAAWR,EAAeL,CAAU;ACXzB,SAAAc,EAASC,GAAG;AACzB,SAAO,WAAoB;AACzB,WAAOA;AAAA,EACT;AACF;ACJU,IAACC,IAAQ,MAAM,UAAU;AAEpB,SAAAC,EAASF,GAAG;AACzB,SAAO,OAAOA,KAAM,YAAY,YAAYA,IACxCA,IACA,MAAM,KAAKA,CAAC;AAClB;","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"array-DpdUWKrC.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js","../../../node_modules/d3/node_modules/d3-shape/src/constant.js","../../../node_modules/d3/node_modules/d3-shape/src/array.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","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","constant","x","slice","array"],"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,IAA6B,IAC7BC,IAAW,OAAOJ,CAAU,GAEF,EAAEG,IAAQD,KAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACT;AACF;AClBG,IAACK,IAAWR,EAAeL,CAAU;ACXzB,SAAAc,EAASC,GAAG;AACzB,SAAO,WAAoB;AACzB,WAAOA;AAAA,EACT;AACF;ACJU,IAACC,IAAQ,MAAM,UAAU;AAEpB,SAAAC,EAASF,GAAG;AACzB,SAAO,OAAOA,KAAM,YAAY,YAAYA,IACxCA,IACA,MAAM,KAAKA,CAAC;AAClB;","x_google_ignoreList":[0,1,2,3,4]}
@@ -1,8 +1,8 @@
1
- import { t as qr, af as fl, i as gl, ag as ml, ah as jr, ai as Kr, aj as vl, ak as yl, al as El, am as Sl, an as Qr, ao as ba, ap as hn, g as O, p as ee, a as un, C as Oa, aq as Et, w as kt, X as Nn, E as La, H as te, ar as Jr, as as Ms, c as xl, a0 as be, I as yi, K as Ei, e as le, S as Tn, R as Ee, f as xe, x as Se, P as Tl, h as an, O as bl, at as to, au as Pe, z as xt, l as Jt, a2 as Ut, a1 as Ol, M as Ll, av as eo, y as Nt, q as vn, n as Fn, W as Us, aw as Al, ax as Ml, ay as Si, az as Aa, A as Ce, aA as Ma, aB as no, aC as wl } from "./color-scale-utils-C4KU2jNr.mjs";
1
+ import { t as qr, af as fl, i as gl, ag as ml, ah as jr, ai as Kr, aj as vl, ak as yl, al as El, am as Sl, an as Qr, ao as ba, ap as hn, g as O, p as ee, a as un, C as Oa, aq as Et, w as kt, X as Nn, E as La, H as te, ar as Jr, as as Ms, c as xl, a0 as be, I as yi, K as Ei, e as le, S as Tn, R as Ee, f as xe, x as Se, P as Tl, h as an, O as bl, at as to, au as Pe, z as xt, l as Jt, a2 as Ut, a1 as Ol, M as Ll, av as eo, y as Nt, q as vn, n as Fn, W as Us, aw as Al, ax as Ml, ay as Si, az as Aa, A as Ce, aA as Ma, aB as no, aC as wl } from "./color-scale-utils--mwppOF8.mjs";
2
2
  import { z as rt, a0 as b, O as Tt, r as Ae, q as We, L as Cl, A as ie, m as st, t as _e, X as rn, S as Dt, e as Q, Z as Xe, i as qt, f as wa, K as Fs, d as _l, H as Wn, n as Ws, I as Xs, C as Ys, p as Xn, b as Ca, D as Zs, V as kl, y as ke, a1 as Yn, Q as qs } from "./axis-scales-CFRGPXH8.mjs";
3
3
  import { R as ct } from "./a11y-ePqvrObQ.mjs";
4
- import { t as as, s as D, h as _a, e as Xt, c as rs, f as Ie, g as de, m as js, i as ka, j as Ia, k as on, l as $t, n as Ra, o as Il, q as Rl, u as Zi, D as I, v as Dl, w as xi, G as Da, x as ps, y as Nl, a as Pl, p as Ot, r as Na, b as $l } from "./angle-utils-Dy0Gf7Eb.mjs";
5
- import { b as so, c as pt, a as qi, s as Gl } from "./array-D6ni_TQq.mjs";
4
+ import { t as as, s as D, h as _a, e as Xt, c as rs, f as Ie, g as de, m as js, i as ka, j as Ia, k as on, l as $t, n as Ra, o as Il, q as Rl, u as Zi, D as I, v as Dl, w as xi, G as Da, x as ps, y as Nl, a as Pl, p as Ot, r as Na, b as $l } from "./angle-utils-Br0vKMAk.mjs";
5
+ import { b as so, c as pt, a as qi, s as Gl } from "./array-DpdUWKrC.mjs";
6
6
  function Vl(i, t, e, n) {
7
7
  for (var s = -1, a = i == null ? 0 : i.length; ++s < a; )
8
8
  e = t(e, i[s], s, i);
@@ -7696,44 +7696,48 @@ class Wm extends Wd {
7696
7696
  n.html("");
7697
7697
  return;
7698
7698
  }
7699
- const h = !Jr(a), d = Ll(this.model.getDisplayData()), u = !(s <= kt.color.barWidth), p = u ? kt.color.barWidth : s, f = I.appendOrSelect(n, "g.legend"), m = I.appendOrSelect(f, "g.legend-axis");
7699
+ const h = !Jr(a), d = O(
7700
+ e,
7701
+ this.chartType,
7702
+ "colorDomain"
7703
+ ), u = Ll(this.model.getDisplayData(), d), p = !(s <= kt.color.barWidth), f = p ? kt.color.barWidth : s, m = I.appendOrSelect(n, "g.legend"), g = I.appendOrSelect(m, "g.legend-axis");
7700
7704
  if (c) {
7701
- const R = I.appendOrSelect(n, "g.legend-title");
7702
- I.appendOrSelect(R, "text").text(c).attr("dy", "0.7em"), f.attr("transform", "translate(0, 16)");
7705
+ const M = I.appendOrSelect(n, "g.legend-title");
7706
+ I.appendOrSelect(M, "text").text(c).attr("dy", "0.7em"), m.attr("transform", "translate(0, 16)");
7703
7707
  }
7704
- const g = d[0] < 0 && d[1] > 0 ? "diverge" : "mono";
7705
- (o < 1 && o > 4 && g === "mono" || o < 1 && o > 2 && g === "diverge") && (o = 1);
7706
- let v = [];
7707
- const x = g === "diverge" ? 17 : 11;
7708
+ const v = u[0] < 0 && u[1] > 0 ? "diverge" : "mono";
7709
+ (o < 1 && o > 4 && v === "mono" || o < 1 && o > 2 && v === "diverge") && (o = 1);
7710
+ let x = [];
7711
+ const y = v === "diverge" ? 17 : 11;
7708
7712
  if (h)
7709
- v = a;
7713
+ x = a;
7710
7714
  else
7711
- for (let R = 1; R < x + 1; R++)
7712
- v.push(
7713
- r === Ws.LINEAR ? `stop-color-${g}-${o}-${R}` : `fill-${g}-${o}-${R}`
7715
+ for (let M = 1; M < y + 1; M++)
7716
+ x.push(
7717
+ r === Ws.LINEAR ? `stop-color-${v}-${o}-${M}` : `fill-${v}-${o}-${M}`
7714
7718
  );
7715
- const y = eo(d[0], d[1]), E = qc(y, 3), S = Pe().domain(d).range([0, p]), T = ji(S).tickSize(0).tickValues(E), { code: C, number: k } = O(e, "locale");
7716
- T.tickFormat((R) => k(R, C));
7717
- let G;
7719
+ const E = eo(u[0], u[1]), S = qc(E, 3), T = Pe().domain(u).range([0, f]), C = ji(T).tickSize(0).tickValues(S), { code: k, number: G } = O(e, "locale");
7720
+ C.tickFormat((M) => G(M, k));
7721
+ let R;
7718
7722
  switch (r) {
7719
7723
  case Ws.LINEAR:
7720
- this.drawLinear(v, f, p);
7724
+ this.drawLinear(x, m, f);
7721
7725
  break;
7722
7726
  case Ws.QUANTIZE:
7723
- G = this.drawQuantize(
7727
+ R = this.drawQuantize(
7728
+ x,
7724
7729
  v,
7725
- g,
7726
7730
  h,
7727
- f,
7728
- p
7729
- ), S.range([G, p]);
7731
+ m,
7732
+ f
7733
+ ), T.range([R, f]);
7730
7734
  break;
7731
7735
  default:
7732
7736
  throw Error("Entered color legend type is not supported.");
7733
7737
  }
7734
- m.attr("transform", `translate(0,${kt.color.axisYTranslation})`).call(T), m.select(".domain").remove(), m.select("g.tick:last-of-type text").style("text-anchor", u ? "middle" : "end"), m.select("g.tick:first-of-type text").style(
7738
+ g.attr("transform", `translate(0,${kt.color.axisYTranslation})`).call(C), g.select(".domain").remove(), g.select("g.tick:last-of-type text").style("text-anchor", p ? "middle" : "end"), g.select("g.tick:first-of-type text").style(
7735
7739
  "text-anchor",
7736
- u && this.chartType !== "choropleth" ? "middle" : "start"
7740
+ p && this.chartType !== "choropleth" ? "middle" : "start"
7737
7741
  );
7738
7742
  }
7739
7743
  // Renders gradient legend
@@ -10868,4 +10872,4 @@ export {
10868
10872
  rv as y,
10869
10873
  qm as z
10870
10874
  };
10871
- //# sourceMappingURL=choropleth-Bn8eKXA6.mjs.map
10875
+ //# sourceMappingURL=choropleth-Bqh-oBJ7.mjs.map