@undp/data-viz 1.2.7 → 1.2.8

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/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { JSX } from 'react/jsx-runtime';
3
3
  import { JSX as JSX_2 } from 'react';
4
+ import * as THREE from 'three';
4
5
 
5
6
  declare interface AdvancedDataSelectionDataType {
6
7
  label?: string;
@@ -4219,6 +4220,8 @@ declare interface GraphSettingsDataType {
4219
4220
  lineAxisTitle?: string;
4220
4221
  timeline?: TimelineDataType;
4221
4222
  naLabel?: string;
4223
+ globeOffset?: [number, number];
4224
+ polygonAltitude?: number;
4222
4225
  }
4223
4226
 
4224
4227
  export declare function GraphTitle(props: Props_59): JSX.Element | null;
@@ -5264,7 +5267,7 @@ declare interface Props_16 {
5264
5267
  /** Defines if the globe rotates automatically */
5265
5268
  autoRotate?: number | boolean;
5266
5269
  /** Defines the material property applied to the sphere of the globe */
5267
- globeMaterial?: MaterialDataType;
5270
+ globeMaterial?: THREE.MeshPhongMaterialProperties;
5268
5271
  /** Defines the colo of the glow around the globe */
5269
5272
  atmosphereColor?: string;
5270
5273
  /** Defines if the globe can be zoomed when scrolled */
@@ -5272,7 +5275,7 @@ declare interface Props_16 {
5272
5275
  /** Position offset of the globe relative to the canvas center */
5273
5276
  globeOffset?: [number, number];
5274
5277
  /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */
5275
- altitude?: number;
5278
+ scale?: number;
5276
5279
  /** Defines the spacing between the country shape polygon with the sphere */
5277
5280
  polygonAltitude?: number;
5278
5281
  /** Scale for the colors */
package/dist/index.js CHANGED
@@ -35192,7 +35192,7 @@ function GL(t) {
35192
35192
  onSeriesMouseOver: M,
35193
35193
  resetSelectionOnDoubleClick: x,
35194
35194
  highlightedIds: I,
35195
- altitude: E,
35195
+ scale: E,
35196
35196
  globeOffset: Y,
35197
35197
  polygonAltitude: re,
35198
35198
  centerLng: z,
@@ -35212,7 +35212,12 @@ function GL(t) {
35212
35212
  }, []), We(() => {
35213
35213
  b.current && b.current.pointOfView({ lat: A, lng: z, altitude: E }, 1e3);
35214
35214
  }, [E, z, A]);
35215
- const oe = new mw.MeshLambertMaterial(c);
35215
+ const oe = new mw.MeshLambertMaterial({
35216
+ color: "#fff",
35217
+ opacity: 1,
35218
+ transparent: !1,
35219
+ ...c || {}
35220
+ });
35216
35221
  return /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
35217
35222
  /* @__PURE__ */ l.jsx(
35218
35223
  pw,
@@ -35423,11 +35428,7 @@ function YL(t) {
35423
35428
  classNames: E,
35424
35429
  autoRotate: Y = !0,
35425
35430
  enableZoom: re = !0,
35426
- globeMaterial: z = {
35427
- color: "#fff",
35428
- opacity: 1,
35429
- transparent: !1
35430
- },
35431
+ globeMaterial: z,
35431
35432
  centerPoint: A = [0, 0],
35432
35433
  atmosphereColor: b = "#999",
35433
35434
  showColorScale: R = !0,
@@ -35436,7 +35437,7 @@ function YL(t) {
35436
35437
  onSeriesMouseOver: C,
35437
35438
  onSeriesMouseClick: j,
35438
35439
  highlightedIds: S = [],
35439
- altitude: _ = 1,
35440
+ scale: _ = 1,
35440
35441
  globeOffset: X = [0, 0],
35441
35442
  polygonAltitude: K = 0.01
35442
35443
  } = t, [oe, T] = be(void 0), [Q, ne] = be(0), [ce, ue] = be(0), G = Re(null);
@@ -35550,7 +35551,7 @@ function YL(t) {
35550
35551
  detailsOnClick: W,
35551
35552
  onSeriesMouseOver: C,
35552
35553
  onSeriesMouseClick: j,
35553
- altitude: _,
35554
+ scale: _,
35554
35555
  polygonAltitude: K,
35555
35556
  centerLat: A[0],
35556
35557
  centerLng: A[1]
@@ -47495,7 +47496,10 @@ function Kv(t) {
47495
47496
  };
47496
47497
  case "threeDGlobe":
47497
47498
  return {
47499
+ globeOffset: e?.globeOffset,
47500
+ polygonAltitude: e?.polygonAltitude,
47498
47501
  highlightedIds: e?.highlightedIds,
47502
+ scale: e?.scale,
47499
47503
  theme: e?.theme,
47500
47504
  resetSelectionOnDoubleClick: e?.resetSelectionOnDoubleClick,
47501
47505
  graphTitle: e?.graphTitle,