@undp/data-viz 1.4.9 → 1.4.11

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 (43) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.d.ts +4 -0
  4. package/dist/BarGraph.js +1960 -1904
  5. package/dist/BarGraph.js.map +1 -1
  6. package/dist/GraphEl-OzC-icbr.cjs +2 -0
  7. package/dist/GraphEl-OzC-icbr.cjs.map +1 -0
  8. package/dist/{GraphEl-DfPT8ffl.js → GraphEl-s3ctz7oA.js} +3 -1
  9. package/dist/GraphEl-s3ctz7oA.js.map +1 -0
  10. package/dist/GriddedGraphs.cjs +1 -1
  11. package/dist/GriddedGraphs.d.ts +7 -0
  12. package/dist/GriddedGraphs.js +1 -1
  13. package/dist/GriddedGraphsFromConfig.d.ts +7 -0
  14. package/dist/MultiGraphDashboard.d.ts +7 -0
  15. package/dist/MultiGraphDashboardFromConfig.d.ts +7 -0
  16. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +7 -0
  17. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +7 -0
  18. package/dist/PerformanceIntensiveScrollStory.d.ts +7 -0
  19. package/dist/ScrollStory.d.ts +7 -0
  20. package/dist/SingleGraphDashboard.cjs +1 -1
  21. package/dist/SingleGraphDashboard.d.ts +7 -0
  22. package/dist/SingleGraphDashboard.js +1 -1
  23. package/dist/SingleGraphDashboardFromConfig.d.ts +7 -0
  24. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +7 -0
  25. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +7 -0
  26. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  27. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  28. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +7 -0
  29. package/dist/SingleGraphDashboardThreeDGraphs.js +17 -16
  30. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  31. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +7 -0
  32. package/dist/ThreeDGlobe.cjs +1 -1
  33. package/dist/ThreeDGlobe.cjs.map +1 -1
  34. package/dist/ThreeDGlobe.d.ts +8 -0
  35. package/dist/ThreeDGlobe.js +173 -172
  36. package/dist/ThreeDGlobe.js.map +1 -1
  37. package/dist/Types.d.ts +7 -0
  38. package/dist/index.d.ts +13 -0
  39. package/dist/style.css +1 -1
  40. package/package.json +2 -3
  41. package/dist/GraphEl-C0FNZlDn.cjs +0 -2
  42. package/dist/GraphEl-C0FNZlDn.cjs.map +0 -1
  43. package/dist/GraphEl-DfPT8ffl.js.map +0 -1
@@ -1,119 +1,118 @@
1
- import { j as t, m as pe } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
- import { useRef as ge, useState as L, useEffect as S } from "react";
3
- import { y as ue } from "./Spinner-C85UF28E.js";
4
- import fe from "react-globe.gl";
5
- import { i as ye } from "./index-27yTRcko.js";
6
- import * as I from "three";
7
- import { X as xe } from "./Modal-DVVwpKhP.js";
8
- import { u as de } from "./Typography-Ctgfl1J5.js";
9
- import { T as ve } from "./Tooltip-DyM5snqx.js";
10
- import { n as be } from "./numberFormattingFunction-14YCbkN2.js";
11
- import { X as we } from "./index-BmCqpO1B.js";
12
- import { s as je } from "./string2HTML-CWHGfz_d.js";
13
- import { o as Ce } from "./ordinal-w9Lu4Stb.js";
14
- import { t as De } from "./threshold-DFfqcDMa.js";
15
- import { GraphHeader as ke } from "./GraphHeader.js";
16
- import { GraphFooter as Ne } from "./GraphFooter.js";
17
- import { f as Se } from "./fetchAndParseData-4gsYTy6_.js";
1
+ import { j as t, m as ue } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
+ import { useRef as he, useState as M, useEffect as L } from "react";
3
+ import { y as fe } from "./Spinner-C85UF28E.js";
4
+ import ye from "react-globe.gl";
5
+ import { i as xe } from "./index-27yTRcko.js";
6
+ import * as W from "three";
7
+ import { X as ve } from "./Modal-DVVwpKhP.js";
8
+ import { u as ge } from "./Typography-Ctgfl1J5.js";
9
+ import { T as be } from "./Tooltip-DyM5snqx.js";
10
+ import { n as we } from "./numberFormattingFunction-14YCbkN2.js";
11
+ import { X as je } from "./index-BmCqpO1B.js";
12
+ import { s as Ce } from "./string2HTML-CWHGfz_d.js";
13
+ import { o as De } from "./ordinal-w9Lu4Stb.js";
14
+ import { t as ke } from "./threshold-DFfqcDMa.js";
15
+ import { GraphHeader as Ne } from "./GraphHeader.js";
16
+ import { GraphFooter as Se } from "./GraphFooter.js";
17
+ import { f as Le } from "./fetchAndParseData-4gsYTy6_.js";
18
18
  import { Colors as R } from "./Colors.js";
19
- import { g as Le } from "./getUniqValue-BtUENB2H.js";
20
- import { g as Me } from "./getJenks-VhM3GIoC.js";
21
- function Oe(_) {
19
+ import { g as Me } from "./getUniqValue-BtUENB2H.js";
20
+ import { g as Oe } from "./getJenks-VhM3GIoC.js";
21
+ function Te(_) {
22
22
  const {
23
- width: p,
24
- autoRotate: d,
23
+ width: x,
24
+ autoRotate: p,
25
25
  data: u,
26
26
  enableZoom: E,
27
- categorical: M,
27
+ categorical: O,
28
28
  colorDomain: l,
29
29
  colors: i,
30
30
  globeMaterial: s,
31
- height: W,
32
- polygonData: Y,
31
+ height: Y,
32
+ polygonData: K,
33
33
  mapProperty: c,
34
34
  mapBorderColor: H,
35
35
  atmosphereColor: z,
36
36
  tooltip: U,
37
37
  styles: v,
38
- classNames: K,
39
- mapNoDataColor: g,
38
+ classNames: Q,
39
+ mapNoDataColor: d,
40
40
  colorLegendTitle: $,
41
- showColorScale: Q,
42
- hoverStrokeColor: ee,
41
+ showColorScale: ee,
42
+ hoverStrokeColor: te,
43
43
  detailsOnClick: f,
44
44
  onSeriesMouseClick: b,
45
- onSeriesMouseOver: h,
46
- resetSelectionOnDoubleClick: O,
45
+ onSeriesMouseOver: g,
46
+ resetSelectionOnDoubleClick: T,
47
47
  highlightedIds: q,
48
- scale: y,
48
+ scale: h,
49
49
  globeOffset: w,
50
50
  polygonAltitude: A,
51
51
  centerLng: F,
52
52
  centerLat: B,
53
53
  atmosphereAltitude: X,
54
- globeCurvatureResolution: te,
55
- lightColor: T
56
- } = _, a = ge(void 0), [D, P] = L(void 0), [oe, V] = L(!(p < 680)), [Z, re] = L({ x: 0, y: 0 }), [j, ie] = L(void 0), J = M ? Ce().domain(l).range(i) : De().domain(l).range(i);
57
- S(() => {
58
- a?.current && (a.current.controls().autoRotate = d !== 0, a.current.controls().enableZoom = E, a.current.controls().autoRotateSpeed = d);
59
- }, [d, E]), S(() => {
60
- a.current && (j ? a.current.controls().autoRotate = !1 : a.current.controls().autoRotate = d !== 0);
61
- }, [j, d]), S(() => {
54
+ globeCurvatureResolution: oe,
55
+ lightColor: G,
56
+ fogSettings: D
57
+ } = _, a = he(void 0), [k, P] = M(void 0), [re, V] = M(!(x < 680)), [Z, ie] = M({ x: 0, y: 0 }), [j, ae] = M(void 0), J = O ? De().domain(l).range(i) : ke().domain(l).range(i);
58
+ L(() => {
59
+ a.current && (a.current.controls().enableZoom = E);
60
+ }, [E]), L(() => {
61
+ a.current && (j ? a.current.controls().autoRotate = !1 : (a.current.controls().autoRotate = p !== 0, a.current.controls().autoRotateSpeed = p));
62
+ }, [j, p]), L(() => {
62
63
  const e = a.current?.renderer().domElement;
63
64
  if (!e) return;
64
65
  const o = (r) => {
65
- re({ x: r.clientX, y: r.clientY });
66
+ ie({ x: r.clientX, y: r.clientY });
66
67
  };
67
68
  return e.addEventListener("mousemove", o), () => e.removeEventListener("mousemove", o);
68
- }, []), S(() => {
69
- a.current && a.current.pointOfView({ lat: B, lng: F, altitude: y }, 1e3);
70
- }, [y, F, B]);
71
- const ae = s || new I.MeshBasicMaterial({
69
+ }, []), L(() => {
70
+ a.current && a.current.pointOfView({ lat: B, lng: F, altitude: h }, 1e3);
71
+ }, [h, F, B]);
72
+ const se = s || new W.MeshBasicMaterial({
72
73
  color: "#FFF"
73
74
  });
74
- return S(() => {
75
+ return L(() => {
75
76
  if (!a.current) return;
76
77
  const e = a.current.scene();
77
78
  e.children.filter((r) => r.type === "DirectionalLight" || r.type === "AmbientLight").forEach((r) => e.remove(r));
78
- const o = new I.AmbientLight(T, 0.2);
79
+ const o = new W.AmbientLight(G, 0.2);
79
80
  e.add(o), setTimeout(() => {
80
81
  (e.children[3]?.children[0]?.children[4]?.children || []).forEach((m) => {
81
- const x = m.children[1];
82
- x && (x.renderOrder = 2);
82
+ const y = m.children[1];
83
+ y && (y.renderOrder = 2);
83
84
  });
84
- }, 300), e.fog = new I.Fog(T, 150, 300);
85
- }, [T]), /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
85
+ }, 300), D && (e.fog = new W.Fog(D.color, D.near, D.far));
86
+ }, [G, h, D]), /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
86
87
  /* @__PURE__ */ t.jsx(
87
- fe,
88
+ ye,
88
89
  {
89
90
  ref: a,
90
- width: p,
91
- height: W,
92
91
  globeOffset: w,
93
92
  lineHoverPrecision: 0,
94
- polygonsData: Y,
93
+ polygonsData: K,
95
94
  polygonAltitude: (e) => q.includes(e?.properties?.[c]) ? 0.1 : e?.properties?.[c] === j?.id ? 0.01 : A,
96
95
  polygonCapColor: (e) => {
97
96
  const o = e?.properties?.[c], r = u.find((m) => m.id === o)?.x;
98
- return r != null ? J(r) : g;
97
+ return r != null ? J(r) : d;
99
98
  },
100
99
  polygonSideColor: (e) => {
101
- const o = e?.properties?.[c], r = u.find((x) => x.id === o)?.x, m = r != null ? J(r) : g;
100
+ const o = e?.properties?.[c], r = u.find((y) => y.id === o)?.x, m = r != null ? J(r) : d;
102
101
  return q.includes(e?.properties?.[c]) ? m : "rgba(100,100,100,0)";
103
102
  },
104
- polygonStrokeColor: (e) => e?.properties?.[c] === j?.id ? ee : H,
103
+ polygonStrokeColor: (e) => e?.properties?.[c] === j?.id ? te : H,
105
104
  onPolygonClick: (e) => {
106
105
  const o = e?.properties?.[c] ? u.find((r) => r.id === e?.properties?.[c]) : void 0;
107
- (b || f) && (ye(D, o) && O && o ? (P(void 0), b?.(void 0)) : (P(o), b?.(o))), P(o), b?.(o);
106
+ (b || f) && (xe(k, o) && T && o ? (P(void 0), b?.(void 0)) : (P(o), b?.(o))), P(o), b?.(o);
108
107
  },
109
108
  onPolygonHover: (e) => {
110
109
  const o = e?.properties?.[c] ? u.find((r) => r.id === e?.properties?.[c]) : void 0;
111
- ie(o), h?.(o);
110
+ ae(o), g?.(o);
112
111
  },
113
112
  atmosphereColor: z,
114
113
  atmosphereAltitude: X,
115
- globeCurvatureResolution: te,
116
- globeMaterial: ae,
114
+ globeCurvatureResolution: oe,
115
+ globeMaterial: se,
117
116
  backgroundColor: "rgba(0, 0, 0, 0)",
118
117
  polygonsTransitionDuration: 100,
119
118
  onGlobeReady: () => {
@@ -127,19 +126,19 @@ function Oe(_) {
127
126
  e.children.filter((C) => C.type === "DirectionalLight").map((C) => {
128
127
  e.remove(C);
129
128
  });
130
- const m = new I.AmbientLight(T, 0.2);
129
+ const m = new W.AmbientLight(G, 0.2);
131
130
  e.add(m), (e.children[3]?.children[0]?.children[4]?.children || []).forEach((C) => {
132
- const k = C.children[1];
133
- k.renderOrder = 2;
131
+ const N = C.children[1];
132
+ N.renderOrder = 2;
134
133
  });
135
134
  }, 300);
136
- const o = new I.DirectionalLight(16777215, 0.1), r = a.current.camera();
135
+ const o = new W.DirectionalLight(16777215, 0.1), r = a.current.camera();
137
136
  o.position.set(0, 0, 1), r.add(o), e.add(r);
138
137
  }
139
138
  }
140
139
  }
141
140
  ),
142
- Q === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: "absolute left-4 bottom-4", children: oe ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
141
+ ee === !1 ? null : /* @__PURE__ */ t.jsx("div", { className: "absolute left-4 bottom-4", children: re ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
143
142
  /* @__PURE__ */ t.jsx(
144
143
  "div",
145
144
  {
@@ -159,7 +158,7 @@ function Oe(_) {
159
158
  onClick: () => {
160
159
  V(!1);
161
160
  },
162
- children: /* @__PURE__ */ t.jsx(we, {})
161
+ children: /* @__PURE__ */ t.jsx(je, {})
163
162
  }
164
163
  ),
165
164
  /* @__PURE__ */ t.jsxs(
@@ -168,11 +167,11 @@ function Oe(_) {
168
167
  className: "p-2",
169
168
  style: {
170
169
  backgroundColor: "rgba(240,240,240, 0.7)",
171
- width: M ? void 0 : "340px"
170
+ width: O ? void 0 : "340px"
172
171
  },
173
172
  children: [
174
173
  $ && $ !== "" ? /* @__PURE__ */ t.jsx(
175
- de,
174
+ ge,
176
175
  {
177
176
  size: "xs",
178
177
  marginBottom: "xs",
@@ -185,7 +184,7 @@ function Oe(_) {
185
184
  children: $
186
185
  }
187
186
  ) : null,
188
- M ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: l.map((e, o) => /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", children: [
187
+ O ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: l.map((e, o) => /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", children: [
189
188
  /* @__PURE__ */ t.jsx(
190
189
  "div",
191
190
  {
@@ -193,7 +192,7 @@ function Oe(_) {
193
192
  style: { backgroundColor: i[o % i.length] }
194
193
  }
195
194
  ),
196
- /* @__PURE__ */ t.jsx(de, { size: "sm", marginBottom: "none", leading: "none", children: e })
195
+ /* @__PURE__ */ t.jsx(ge, { size: "sm", marginBottom: "none", leading: "none", children: e })
197
196
  ] }, o)) }) : /* @__PURE__ */ t.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { children: [
198
197
  l.map((e, o) => /* @__PURE__ */ t.jsxs("g", { className: "cursor-pointer", children: [
199
198
  /* @__PURE__ */ t.jsx(
@@ -216,7 +215,7 @@ function Oe(_) {
216
215
  y: 25,
217
216
  className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",
218
217
  style: { textAnchor: "middle" },
219
- children: be(e, "NA")
218
+ children: we(e, "NA")
220
219
  }
221
220
  )
222
221
  ] }, o)),
@@ -249,20 +248,20 @@ function Oe(_) {
249
248
  }
250
249
  ) }),
251
250
  j && U ? /* @__PURE__ */ t.jsx(
252
- ve,
251
+ be,
253
252
  {
254
253
  data: j,
255
254
  body: U,
256
255
  xPos: Z.x,
257
256
  yPos: Z.y,
258
257
  backgroundStyle: v?.tooltip,
259
- className: K?.tooltip
258
+ className: Q?.tooltip
260
259
  }
261
260
  ) : null,
262
- f && D !== void 0 ? /* @__PURE__ */ t.jsx(
263
- xe,
261
+ f && k !== void 0 ? /* @__PURE__ */ t.jsx(
262
+ ve,
264
263
  {
265
- open: D !== void 0,
264
+ open: k !== void 0,
266
265
  onClose: () => {
267
266
  P(void 0);
268
267
  },
@@ -270,107 +269,108 @@ function Oe(_) {
270
269
  "div",
271
270
  {
272
271
  className: "graph-modal-content m-0",
273
- dangerouslySetInnerHTML: typeof f == "string" ? { __html: je(f, D) } : void 0,
274
- children: typeof f == "function" ? f(D) : null
272
+ dangerouslySetInnerHTML: typeof f == "string" ? { __html: Ce(f, k) } : void 0,
273
+ children: typeof f == "function" ? f(k) : null
275
274
  }
276
275
  )
277
276
  }
278
277
  ) : null
279
278
  ] });
280
279
  }
281
- function _e(_) {
280
+ function Ye(_) {
282
281
  const {
283
- data: p,
284
- mapData: d = "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json",
282
+ data: x,
283
+ mapData: p = "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json",
285
284
  graphTitle: u,
286
285
  colors: E,
287
- sources: M,
286
+ sources: O,
288
287
  graphDescription: l,
289
288
  height: i,
290
289
  width: s,
291
- footNote: W = "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",
292
- colorDomain: Y,
290
+ footNote: Y = "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",
291
+ colorDomain: K,
293
292
  colorLegendTitle: c,
294
293
  scaleType: H = "threshold",
295
294
  padding: z,
296
295
  mapNoDataColor: U = R.light.graphNoData,
297
296
  backgroundColor: v = !1,
298
- mapBorderColor: K = R.light.grays["gray-500"],
299
- relativeHeight: g,
297
+ mapBorderColor: Q = R.light.grays["gray-500"],
298
+ relativeHeight: d,
300
299
  tooltip: $,
301
- graphID: Q,
302
- mapProperty: ee = "ISO3",
300
+ graphID: ee,
301
+ mapProperty: te = "ISO3",
303
302
  dataDownload: f = !1,
304
303
  language: b = "en",
305
- minHeight: h = 0,
306
- theme: O = "light",
304
+ minHeight: g = 0,
305
+ theme: T = "light",
307
306
  ariaLabel: q,
308
- styles: y,
307
+ styles: h,
309
308
  classNames: w,
310
309
  autoRotate: A = !0,
311
310
  enableZoom: F = !0,
312
311
  globeMaterial: B,
313
312
  centerPoint: X = [0, 0],
314
- atmosphereColor: te = "#999",
315
- showColorScale: T = !0,
316
- resetSelectionOnDoubleClick: a = !0,
317
- detailsOnClick: D,
318
- onSeriesMouseOver: P,
319
- onSeriesMouseClick: oe,
320
- highlightedIds: V = [],
321
- scale: Z = 1,
322
- globeOffset: re = [0, 0],
323
- polygonAltitude: j = 0.01,
324
- globeCurvatureResolution: ie = 4,
325
- atmosphereAltitude: J = 0.15,
326
- lightColor: ae = "#dce9fe"
327
- } = _, [e, o] = L(void 0), [r, m] = L(0), [x, C] = L(0), k = ge(null);
328
- S(() => {
329
- const n = new ResizeObserver((G) => {
330
- m(s || G[0].target.clientWidth || 760), C(i || G[0].target.clientHeight || 480);
313
+ atmosphereColor: oe = "#999",
314
+ showColorScale: G = !0,
315
+ resetSelectionOnDoubleClick: D = !0,
316
+ detailsOnClick: a,
317
+ onSeriesMouseOver: k,
318
+ onSeriesMouseClick: P,
319
+ highlightedIds: re = [],
320
+ scale: V = 1,
321
+ globeOffset: Z = [0, 0],
322
+ polygonAltitude: ie = 0.01,
323
+ globeCurvatureResolution: j = 4,
324
+ atmosphereAltitude: ae = 0.15,
325
+ lightColor: J = "#dce9fe",
326
+ fogSettings: se
327
+ } = _, [e, o] = M(void 0), [r, m] = M(0), [y, C] = M(0), N = he(null);
328
+ L(() => {
329
+ const n = new ResizeObserver((I) => {
330
+ m(s || I[0].target.clientWidth || 760), C(i || I[0].target.clientHeight || 480);
331
331
  });
332
- return k.current && (C(k.current.clientHeight || 480), m(k.current.clientWidth || 760), s || n.observe(k.current)), () => n.disconnect();
333
- }, [s, i]), S(() => {
334
- typeof d == "string" ? Se(d).then((G) => {
335
- if (d === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
336
- const he = G.features.map((N) => {
337
- if (N.geometry.type === "Polygon") {
338
- const ne = [...N.geometry.coordinates[0]].reverse(), le = { ...N.geometry, coordinates: [ne] };
339
- return { ...N, geometry: le };
332
+ return N.current && (C(N.current.clientHeight || 480), m(N.current.clientWidth || 760), s || n.observe(N.current)), () => n.disconnect();
333
+ }, [s, i]), L(() => {
334
+ typeof p == "string" ? Le(p).then((I) => {
335
+ if (p === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
336
+ const me = I.features.map((S) => {
337
+ if (S.geometry.type === "Polygon") {
338
+ const le = [...S.geometry.coordinates[0]].reverse(), ce = { ...S.geometry, coordinates: [le] };
339
+ return { ...S, geometry: ce };
340
340
  }
341
- const ce = [];
342
- N.geometry.coordinates.forEach((ne) => {
343
- const le = [...ne[0]].reverse();
344
- ce.push([le]);
341
+ const de = [];
342
+ S.geometry.coordinates.forEach((le) => {
343
+ const ce = [...le[0]].reverse();
344
+ de.push([ce]);
345
345
  });
346
- const me = { ...N.geometry, coordinates: ce };
347
- return { ...N, geometry: me };
346
+ const pe = { ...S.geometry, coordinates: de };
347
+ return { ...S, geometry: pe };
348
348
  });
349
- o(he);
350
- } else o(G.features);
351
- }) : o(d.features);
352
- }, [d]);
353
- const se = Y || (H === "categorical" ? Le(p, "x") : Me(
354
- p.map((n) => n.x),
349
+ o(me);
350
+ } else o(I.features);
351
+ }) : o(p.features);
352
+ }, [p]);
353
+ const ne = K || (H === "categorical" ? Me(x, "x") : Oe(
354
+ x.map((n) => n.x),
355
355
  E?.length || 4
356
356
  ));
357
357
  return /* @__PURE__ */ t.jsx(
358
358
  "div",
359
359
  {
360
- className: `${O || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
360
+ className: `${T || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
361
361
  dir: b === "he" || b === "ar" ? "rtl" : void 0,
362
362
  children: /* @__PURE__ */ t.jsx(
363
363
  "div",
364
364
  {
365
- className: pe(
365
+ className: ue(
366
366
  `${v ? v === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${b || "en"}`,
367
367
  w?.graphContainer
368
368
  ),
369
369
  style: {
370
- ...y?.graphContainer || {},
370
+ ...h?.graphContainer || {},
371
371
  ...v && v !== !0 ? { backgroundColor: v } : {}
372
372
  },
373
- id: Q,
373
+ id: ee,
374
374
  "aria-label": q || `${u ? `The graph shows ${u}. ` : ""}This is a map.${l ? ` ${l}` : ""}`,
375
375
  children: /* @__PURE__ */ t.jsx(
376
376
  "div",
@@ -379,11 +379,11 @@ function _e(_) {
379
379
  style: { padding: v ? z || "1rem" : z || 0 },
380
380
  children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
381
381
  u || l || f ? /* @__PURE__ */ t.jsx(
382
- ke,
382
+ Ne,
383
383
  {
384
384
  styles: {
385
- title: y?.title,
386
- description: y?.description
385
+ title: h?.title,
386
+ description: h?.description
387
387
  },
388
388
  classNames: {
389
389
  title: w?.title,
@@ -393,80 +393,81 @@ function _e(_) {
393
393
  graphDescription: l,
394
394
  width: s,
395
395
  graphDownload: void 0,
396
- dataDownload: f ? p.map((n) => n.data).filter((n) => n !== void 0).length > 0 ? p.map((n) => n.data).filter((n) => n !== void 0) : p.filter((n) => n !== void 0) : null
396
+ dataDownload: f ? x.map((n) => n.data).filter((n) => n !== void 0).length > 0 ? x.map((n) => n.data).filter((n) => n !== void 0) : x.filter((n) => n !== void 0) : null
397
397
  }
398
398
  ) : null,
399
399
  /* @__PURE__ */ t.jsx(
400
400
  "div",
401
401
  {
402
402
  className: "flex flex-col grow justify-center leading-0",
403
- ref: k,
403
+ ref: N,
404
404
  "aria-label": "Map area",
405
- children: (s || r) && (i || x) && e ? /* @__PURE__ */ t.jsx(
406
- Oe,
405
+ children: (s || r) && (i || y) && e ? /* @__PURE__ */ t.jsx(
406
+ Te,
407
407
  {
408
- data: p,
409
- globeOffset: re,
408
+ data: x,
409
+ globeOffset: Z,
410
410
  polygonData: e,
411
- colorDomain: se,
411
+ colorDomain: ne,
412
412
  width: s || r,
413
413
  height: Math.max(
414
- h,
415
- i || (g ? h ? (s || r) * g > h ? (s || r) * g : h : (s || r) * g : x)
414
+ g,
415
+ i || (d ? g ? (s || r) * d > g ? (s || r) * d : g : (s || r) * d : y)
416
416
  ),
417
- colors: E || (H === "categorical" ? R[O].sequentialColors[`neutralColorsx0${se.length}`] : R[O].sequentialColors[`neutralColorsx0${se.length + 1}`]),
417
+ colors: E || (H === "categorical" ? R[T].sequentialColors[`neutralColorsx0${ne.length}`] : R[T].sequentialColors[`neutralColorsx0${ne.length + 1}`]),
418
418
  mapNoDataColor: U,
419
419
  categorical: H === "categorical",
420
- mapBorderColor: K,
420
+ mapBorderColor: Q,
421
421
  tooltip: $,
422
- mapProperty: ee,
423
- styles: y,
422
+ mapProperty: te,
423
+ styles: h,
424
424
  classNames: w,
425
425
  autoRotate: A === !0 ? 1.5 : A === !1 ? 0 : A,
426
426
  enableZoom: F,
427
427
  globeMaterial: B,
428
- atmosphereColor: te,
428
+ atmosphereColor: oe,
429
429
  colorLegendTitle: c,
430
- showColorScale: T,
431
- hoverStrokeColor: O === "light" ? R.light.grays["gray-700"] : R.light.grays["gray-300"],
432
- highlightedIds: V,
433
- resetSelectionOnDoubleClick: a,
434
- detailsOnClick: D,
435
- onSeriesMouseOver: P,
436
- onSeriesMouseClick: oe,
437
- scale: Z,
438
- polygonAltitude: j,
430
+ showColorScale: G,
431
+ hoverStrokeColor: T === "light" ? R.light.grays["gray-700"] : R.light.grays["gray-300"],
432
+ highlightedIds: re,
433
+ resetSelectionOnDoubleClick: D,
434
+ detailsOnClick: a,
435
+ onSeriesMouseOver: k,
436
+ onSeriesMouseClick: P,
437
+ scale: V,
438
+ polygonAltitude: ie,
439
439
  centerLat: X[0],
440
440
  centerLng: X[1],
441
- atmosphereAltitude: J,
442
- globeCurvatureResolution: ie,
443
- lightColor: ae
441
+ atmosphereAltitude: ae,
442
+ globeCurvatureResolution: j,
443
+ lightColor: J,
444
+ fogSettings: se
444
445
  }
445
446
  ) : /* @__PURE__ */ t.jsx(
446
447
  "div",
447
448
  {
448
449
  style: {
449
450
  height: `${Math.max(
450
- h,
451
- i || (g ? h ? (s || r) * g > h ? (s || r) * g : h : (s || r) * g : x)
451
+ g,
452
+ i || (d ? g ? (s || r) * d > g ? (s || r) * d : g : (s || r) * d : y)
452
453
  )}px`
453
454
  },
454
455
  className: "flex items-center justify-center",
455
- children: /* @__PURE__ */ t.jsx(ue, { "aria-label": "Loading graph" })
456
+ children: /* @__PURE__ */ t.jsx(fe, { "aria-label": "Loading graph" })
456
457
  }
457
458
  )
458
459
  }
459
460
  ),
460
- M || W ? /* @__PURE__ */ t.jsx(
461
- Ne,
461
+ O || Y ? /* @__PURE__ */ t.jsx(
462
+ Se,
462
463
  {
463
- styles: { footnote: y?.footnote, source: y?.source },
464
+ styles: { footnote: h?.footnote, source: h?.source },
464
465
  classNames: {
465
466
  footnote: w?.footnote,
466
467
  source: w?.source
467
468
  },
468
- sources: M,
469
- footNote: W,
469
+ sources: O,
470
+ footNote: Y,
470
471
  width: s
471
472
  }
472
473
  ) : null
@@ -479,6 +480,6 @@ function _e(_) {
479
480
  );
480
481
  }
481
482
  export {
482
- _e as ThreeDGlobe
483
+ Ye as ThreeDGlobe
483
484
  };
484
485
  //# sourceMappingURL=ThreeDGlobe.js.map