@undp/data-viz 2.5.0 → 2.5.1

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 (59) hide show
  1. package/dist/BiVariateChoroplethMap.cjs +1 -1
  2. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  3. package/dist/BiVariateChoroplethMap.js +275 -272
  4. package/dist/BiVariateChoroplethMap.js.map +1 -1
  5. package/dist/ChoroplethMap.cjs +1 -1
  6. package/dist/ChoroplethMap.cjs.map +1 -1
  7. package/dist/ChoroplethMap.js +321 -318
  8. package/dist/ChoroplethMap.js.map +1 -1
  9. package/dist/DotDensityMap.cjs +1 -1
  10. package/dist/DotDensityMap.cjs.map +1 -1
  11. package/dist/DotDensityMap.js +268 -265
  12. package/dist/DotDensityMap.js.map +1 -1
  13. package/dist/{GraphEl-B7x5ku_y.cjs → GraphEl-BgkDbq50.cjs} +2 -2
  14. package/dist/GraphEl-BgkDbq50.cjs.map +1 -0
  15. package/dist/{GraphEl-B8tGXqWk.js → GraphEl-Ch0uAeZw.js} +2 -1
  16. package/dist/GraphEl-Ch0uAeZw.js.map +1 -0
  17. package/dist/GriddedGraphs.cjs +1 -1
  18. package/dist/GriddedGraphs.d.ts +1 -0
  19. package/dist/GriddedGraphs.js +1 -1
  20. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  21. package/dist/HybridMap.cjs +1 -1
  22. package/dist/HybridMap.cjs.map +1 -1
  23. package/dist/HybridMap.js +304 -301
  24. package/dist/HybridMap.js.map +1 -1
  25. package/dist/ImageDownloadButton.cjs +1 -1
  26. package/dist/ImageDownloadButton.js +1 -1
  27. package/dist/MultiGraphDashboard.d.ts +1 -0
  28. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  29. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  30. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  31. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  32. package/dist/ScatterPlot.cjs +1 -1
  33. package/dist/ScatterPlot.cjs.map +1 -1
  34. package/dist/ScatterPlot.d.ts +2 -0
  35. package/dist/ScatterPlot.js +451 -449
  36. package/dist/ScatterPlot.js.map +1 -1
  37. package/dist/ScrollStory.d.ts +1 -0
  38. package/dist/SingleGraphDashboard.cjs +1 -1
  39. package/dist/SingleGraphDashboard.d.ts +1 -0
  40. package/dist/SingleGraphDashboard.js +1 -1
  41. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  42. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  43. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  44. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  45. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  46. package/dist/Types.d.ts +1 -0
  47. package/dist/{imageDownload-Diofs_vY.js → imageDownload-BYsNEtMS.js} +11 -11
  48. package/dist/{imageDownload-Diofs_vY.js.map → imageDownload-BYsNEtMS.js.map} +1 -1
  49. package/dist/{imageDownload-61q6jyJW.cjs → imageDownload-CkMwA7Cw.cjs} +4 -4
  50. package/dist/{imageDownload-61q6jyJW.cjs.map → imageDownload-CkMwA7Cw.cjs.map} +1 -1
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.js +1 -1
  54. package/dist/style.css +1 -1
  55. package/dist/utils.cjs +1 -1
  56. package/dist/utils.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/GraphEl-B7x5ku_y.cjs.map +0 -1
  59. package/dist/GraphEl-B8tGXqWk.js.map +0 -1
@@ -390,6 +390,7 @@ declare interface GraphSettingsDataType {
390
390
  lineNumberDisplayOptions?: NumberFormatOptions;
391
391
  xNumberDisplayOptions?: NumberFormatOptions;
392
392
  yNumberDisplayOptions?: NumberFormatOptions;
393
+ defaultColor?: string;
393
394
  }
394
395
 
395
396
  declare interface HighlightAreaSettingsDataType {
@@ -397,6 +397,7 @@ declare interface GraphSettingsDataType {
397
397
  lineNumberDisplayOptions?: NumberFormatOptions;
398
398
  xNumberDisplayOptions?: NumberFormatOptions;
399
399
  yNumberDisplayOptions?: NumberFormatOptions;
400
+ defaultColor?: string;
400
401
  }
401
402
 
402
403
  declare interface HighlightAreaSettingsDataType {
@@ -476,6 +476,7 @@ declare interface GraphSettingsDataType {
476
476
  lineNumberDisplayOptions?: NumberFormatOptions;
477
477
  xNumberDisplayOptions?: NumberFormatOptions;
478
478
  yNumberDisplayOptions?: NumberFormatOptions;
479
+ defaultColor?: string;
479
480
  }
480
481
 
481
482
  declare interface HighlightAreaSettingsDataType {
@@ -499,6 +499,7 @@ declare interface GraphSettingsDataType {
499
499
  lineNumberDisplayOptions?: NumberFormatOptions;
500
500
  xNumberDisplayOptions?: NumberFormatOptions;
501
501
  yNumberDisplayOptions?: NumberFormatOptions;
502
+ defaultColor?: string;
502
503
  }
503
504
 
504
505
  declare interface HighlightAreaSettingsDataType {
package/dist/Types.d.ts CHANGED
@@ -684,6 +684,7 @@ export declare interface GraphSettingsDataType {
684
684
  lineNumberDisplayOptions?: NumberFormatOptions;
685
685
  xNumberDisplayOptions?: NumberFormatOptions;
686
686
  yNumberDisplayOptions?: NumberFormatOptions;
687
+ defaultColor?: string;
687
688
  }
688
689
 
689
690
  export declare type GraphType = GraphTypeForGriddedGraph;
@@ -80,7 +80,7 @@ function je(e, t) {
80
80
  a.onload = () => r(a.result), a.onerror = () => n(a.error), a.onabort = () => n(new Error(`Failed read blob to ${t}`)), a.readAsDataURL(e);
81
81
  });
82
82
  }
83
- const Ve = (e) => je(e, "dataUrl");
83
+ const ze = (e) => je(e, "dataUrl");
84
84
  function T(e, t) {
85
85
  const r = x(t).createElement("img");
86
86
  return r.decoding = "sync", r.loading = "eager", r.src = e, r;
@@ -139,7 +139,7 @@ function I(e, t) {
139
139
  }
140
140
  });
141
141
  }
142
- async function ze(e, t) {
142
+ async function Ve(e, t) {
143
143
  D(e) && (A(e) || _(e) ? await I(e, t) : await Promise.all(
144
144
  ["img", "video"].flatMap((r) => Array.from(e.querySelectorAll(r)).map((n) => I(n, t)))
145
145
  ));
@@ -248,7 +248,7 @@ async function Ge(e, t) {
248
248
  isEnable: (m) => m === "restoreScrollPosition" ? typeof i == "boolean" ? !1 : i[m] ?? !1 : typeof i == "boolean" ? i : i[m] ?? !0,
249
249
  shadowRoots: []
250
250
  };
251
- l.log.time("wait until load"), await ze(e, { timeout: l.timeout, onWarn: l.log.warn }), l.log.timeEnd("wait until load");
251
+ l.log.time("wait until load"), await Ve(e, { timeout: l.timeout, onWarn: l.log.warn }), l.log.timeEnd("wait until load");
252
252
  const { width: c, height: d } = Ye(e, l);
253
253
  return l.width = c, l.height = d, l;
254
254
  }
@@ -496,14 +496,14 @@ function ct(e, t, r, n, a) {
496
496
  }
497
497
  it.forEach(u), r && lt.forEach(u);
498
498
  }
499
- const V = /* @__PURE__ */ new Set([
499
+ const z = /* @__PURE__ */ new Set([
500
500
  "symbol"
501
501
  // test/fixtures/svg.symbol.html
502
502
  ]);
503
- async function z(e, t, r, n, a) {
503
+ async function V(e, t, r, n, a) {
504
504
  if (E(r) && (xe(r) || Ue(r)) || n.filter && !n.filter(r))
505
505
  return;
506
- V.has(t.nodeName) || V.has(r.nodeName) ? n.currentParentNodeStyle = void 0 : n.currentParentNodeStyle = n.currentNodeStyle;
506
+ z.has(t.nodeName) || z.has(r.nodeName) ? n.currentParentNodeStyle = void 0 : n.currentParentNodeStyle = n.currentNodeStyle;
507
507
  const s = await W(r, n, !1, a);
508
508
  n.isEnable("restoreScrollPosition") && ut(e, s), t.appendChild(s);
509
509
  }
@@ -515,9 +515,9 @@ async function H(e, t, r, n) {
515
515
  if (E(s) && Le(s) && typeof s.assignedNodes == "function") {
516
516
  const i = s.assignedNodes();
517
517
  for (let o = 0; o < i.length; o++)
518
- await z(e, t, i[o], r, n);
518
+ await V(e, t, i[o], r, n);
519
519
  } else
520
- await z(e, t, s, r, n);
520
+ await V(e, t, s, r, n);
521
521
  }
522
522
  function ut(e, t) {
523
523
  if (!D(e) || !D(t))
@@ -599,7 +599,7 @@ function mt(e) {
599
599
  case "arrayBuffer":
600
600
  return o.arrayBuffer();
601
601
  case "dataUrl":
602
- return o.blob().then(Ve);
602
+ return o.blob().then(ze);
603
603
  default:
604
604
  return o.text();
605
605
  }
@@ -976,7 +976,7 @@ function Rt(e, t) {
976
976
  features: {
977
977
  copyScrollbar: !1
978
978
  },
979
- filter: (r) => r instanceof Element ? !r.classList.contains("undp-viz-download-button") : !0
979
+ filter: (r) => r instanceof Element ? !r.classList.contains("undp-viz-download-button") && !r.classList.contains("undp-viz-zoom-buttons") : !0
980
980
  }).then((r) => {
981
981
  const n = document.createElement("a");
982
982
  n.download = `${t}.png`, n.href = r, n.click();
@@ -987,4 +987,4 @@ function Rt(e, t) {
987
987
  export {
988
988
  Rt as i
989
989
  };
990
- //# sourceMappingURL=imageDownload-Diofs_vY.js.map
990
+ //# sourceMappingURL=imageDownload-BYsNEtMS.js.map