@undp/data-viz 1.4.2 → 1.4.3
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/GriddedGraphs.d.ts +4 -7
- package/dist/GriddedGraphsFromConfig.d.ts +4 -7
- package/dist/MultiGraphDashboard.d.ts +4 -7
- package/dist/MultiGraphDashboardFromConfig.d.ts +4 -7
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +4 -7
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +4 -7
- package/dist/PerformanceIntensiveScrollStory.d.ts +4 -7
- package/dist/ScrollStory.d.ts +4 -7
- package/dist/SingleGraphDashboard.d.ts +4 -7
- package/dist/SingleGraphDashboardFromConfig.d.ts +4 -7
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +4 -7
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +4 -7
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +4 -7
- package/dist/SingleGraphDashboardThreeDGraphs.js +28 -25
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +4 -7
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +11 -2
- package/dist/ThreeDGlobe.js +278 -253
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Types.d.ts +4 -7
- package/dist/index.d.ts +15 -9
- package/package.json +1 -1
package/dist/GriddedGraphs.d.ts
CHANGED
|
@@ -413,7 +413,7 @@ declare interface GraphSettingsDataType {
|
|
|
413
413
|
labelsToBeHidden?: (string | number)[];
|
|
414
414
|
autoRotate?: boolean;
|
|
415
415
|
enableZoom?: boolean;
|
|
416
|
-
globeMaterial?:
|
|
416
|
+
globeMaterial?: any;
|
|
417
417
|
categorical?: boolean;
|
|
418
418
|
atmosphereColor?: string;
|
|
419
419
|
lineAxisTitle?: string;
|
|
@@ -421,6 +421,9 @@ declare interface GraphSettingsDataType {
|
|
|
421
421
|
naLabel?: string;
|
|
422
422
|
globeOffset?: [number, number];
|
|
423
423
|
polygonAltitude?: number;
|
|
424
|
+
atmosphereAltitude?: number;
|
|
425
|
+
globeCurvatureResolution?: number;
|
|
426
|
+
lightColor?: string;
|
|
424
427
|
}
|
|
425
428
|
|
|
426
429
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -454,12 +457,6 @@ declare interface MapLegendDataType {
|
|
|
454
457
|
|
|
455
458
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
456
459
|
|
|
457
|
-
declare interface MaterialDataType {
|
|
458
|
-
color: string;
|
|
459
|
-
opacity: number;
|
|
460
|
-
transparent: boolean;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
460
|
declare interface Props {
|
|
464
461
|
noOfColumns?: number;
|
|
465
462
|
columnGridBy: string;
|
|
@@ -440,7 +440,7 @@ declare interface GraphSettingsDataType {
|
|
|
440
440
|
labelsToBeHidden?: (string | number)[];
|
|
441
441
|
autoRotate?: boolean;
|
|
442
442
|
enableZoom?: boolean;
|
|
443
|
-
globeMaterial?:
|
|
443
|
+
globeMaterial?: any;
|
|
444
444
|
categorical?: boolean;
|
|
445
445
|
atmosphereColor?: string;
|
|
446
446
|
lineAxisTitle?: string;
|
|
@@ -448,6 +448,9 @@ declare interface GraphSettingsDataType {
|
|
|
448
448
|
naLabel?: string;
|
|
449
449
|
globeOffset?: [number, number];
|
|
450
450
|
polygonAltitude?: number;
|
|
451
|
+
atmosphereAltitude?: number;
|
|
452
|
+
globeCurvatureResolution?: number;
|
|
453
|
+
lightColor?: string;
|
|
451
454
|
}
|
|
452
455
|
|
|
453
456
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -481,12 +484,6 @@ declare interface MapLegendDataType {
|
|
|
481
484
|
|
|
482
485
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
483
486
|
|
|
484
|
-
declare interface MaterialDataType {
|
|
485
|
-
color: string;
|
|
486
|
-
opacity: number;
|
|
487
|
-
transparent: boolean;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
487
|
declare interface Props {
|
|
491
488
|
config: string | ConfigObject;
|
|
492
489
|
}
|
|
@@ -446,7 +446,7 @@ declare interface GraphSettingsDataType {
|
|
|
446
446
|
labelsToBeHidden?: (string | number)[];
|
|
447
447
|
autoRotate?: boolean;
|
|
448
448
|
enableZoom?: boolean;
|
|
449
|
-
globeMaterial?:
|
|
449
|
+
globeMaterial?: any;
|
|
450
450
|
categorical?: boolean;
|
|
451
451
|
atmosphereColor?: string;
|
|
452
452
|
lineAxisTitle?: string;
|
|
@@ -454,6 +454,9 @@ declare interface GraphSettingsDataType {
|
|
|
454
454
|
naLabel?: string;
|
|
455
455
|
globeOffset?: [number, number];
|
|
456
456
|
polygonAltitude?: number;
|
|
457
|
+
atmosphereAltitude?: number;
|
|
458
|
+
globeCurvatureResolution?: number;
|
|
459
|
+
lightColor?: string;
|
|
457
460
|
}
|
|
458
461
|
|
|
459
462
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -485,12 +488,6 @@ declare interface MapLegendDataType {
|
|
|
485
488
|
|
|
486
489
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
487
490
|
|
|
488
|
-
declare interface MaterialDataType {
|
|
489
|
-
color: string;
|
|
490
|
-
opacity: number;
|
|
491
|
-
transparent: boolean;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
491
|
export declare function MultiGraphDashboard(props: Props): JSX.Element;
|
|
495
492
|
|
|
496
493
|
declare interface Props {
|
|
@@ -465,7 +465,7 @@ declare interface GraphSettingsDataType {
|
|
|
465
465
|
labelsToBeHidden?: (string | number)[];
|
|
466
466
|
autoRotate?: boolean;
|
|
467
467
|
enableZoom?: boolean;
|
|
468
|
-
globeMaterial?:
|
|
468
|
+
globeMaterial?: any;
|
|
469
469
|
categorical?: boolean;
|
|
470
470
|
atmosphereColor?: string;
|
|
471
471
|
lineAxisTitle?: string;
|
|
@@ -473,6 +473,9 @@ declare interface GraphSettingsDataType {
|
|
|
473
473
|
naLabel?: string;
|
|
474
474
|
globeOffset?: [number, number];
|
|
475
475
|
polygonAltitude?: number;
|
|
476
|
+
atmosphereAltitude?: number;
|
|
477
|
+
globeCurvatureResolution?: number;
|
|
478
|
+
lightColor?: string;
|
|
476
479
|
}
|
|
477
480
|
|
|
478
481
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -504,12 +507,6 @@ declare interface MapLegendDataType {
|
|
|
504
507
|
|
|
505
508
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
506
509
|
|
|
507
|
-
declare interface MaterialDataType {
|
|
508
|
-
color: string;
|
|
509
|
-
opacity: number;
|
|
510
|
-
transparent: boolean;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
510
|
export declare function MultiGraphDashboardFromConfig(props: Props): JSX.Element;
|
|
514
511
|
|
|
515
512
|
declare interface Props {
|
|
@@ -437,7 +437,7 @@ declare interface GraphSettingsDataType {
|
|
|
437
437
|
labelsToBeHidden?: (string | number)[];
|
|
438
438
|
autoRotate?: boolean;
|
|
439
439
|
enableZoom?: boolean;
|
|
440
|
-
globeMaterial?:
|
|
440
|
+
globeMaterial?: any;
|
|
441
441
|
categorical?: boolean;
|
|
442
442
|
atmosphereColor?: string;
|
|
443
443
|
lineAxisTitle?: string;
|
|
@@ -445,6 +445,9 @@ declare interface GraphSettingsDataType {
|
|
|
445
445
|
naLabel?: string;
|
|
446
446
|
globeOffset?: [number, number];
|
|
447
447
|
polygonAltitude?: number;
|
|
448
|
+
atmosphereAltitude?: number;
|
|
449
|
+
globeCurvatureResolution?: number;
|
|
450
|
+
lightColor?: string;
|
|
448
451
|
}
|
|
449
452
|
|
|
450
453
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -476,12 +479,6 @@ declare interface MapLegendDataType {
|
|
|
476
479
|
|
|
477
480
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
478
481
|
|
|
479
|
-
declare interface MaterialDataType {
|
|
480
|
-
color: string;
|
|
481
|
-
opacity: number;
|
|
482
|
-
transparent: boolean;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
482
|
declare interface PerformanceIntensiveDashboardColumnDataType extends DashboardColumnDataWithoutGraphType {
|
|
486
483
|
graphType: GraphType | ThreeDGraphType | GeoHubGraphType;
|
|
487
484
|
}
|
|
@@ -456,7 +456,7 @@ declare interface GraphSettingsDataType {
|
|
|
456
456
|
labelsToBeHidden?: (string | number)[];
|
|
457
457
|
autoRotate?: boolean;
|
|
458
458
|
enableZoom?: boolean;
|
|
459
|
-
globeMaterial?:
|
|
459
|
+
globeMaterial?: any;
|
|
460
460
|
categorical?: boolean;
|
|
461
461
|
atmosphereColor?: string;
|
|
462
462
|
lineAxisTitle?: string;
|
|
@@ -464,6 +464,9 @@ declare interface GraphSettingsDataType {
|
|
|
464
464
|
naLabel?: string;
|
|
465
465
|
globeOffset?: [number, number];
|
|
466
466
|
polygonAltitude?: number;
|
|
467
|
+
atmosphereAltitude?: number;
|
|
468
|
+
globeCurvatureResolution?: number;
|
|
469
|
+
lightColor?: string;
|
|
467
470
|
}
|
|
468
471
|
|
|
469
472
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -495,12 +498,6 @@ declare interface MapLegendDataType {
|
|
|
495
498
|
|
|
496
499
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
497
500
|
|
|
498
|
-
declare interface MaterialDataType {
|
|
499
|
-
color: string;
|
|
500
|
-
opacity: number;
|
|
501
|
-
transparent: boolean;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
501
|
declare interface PerformanceIntensiveDashboardColumnDataType extends DashboardColumnDataWithoutGraphType {
|
|
505
502
|
graphType: GraphType | ThreeDGraphType | GeoHubGraphType;
|
|
506
503
|
}
|
|
@@ -359,7 +359,7 @@ declare interface GraphSettingsDataType {
|
|
|
359
359
|
labelsToBeHidden?: (string | number)[];
|
|
360
360
|
autoRotate?: boolean;
|
|
361
361
|
enableZoom?: boolean;
|
|
362
|
-
globeMaterial?:
|
|
362
|
+
globeMaterial?: any;
|
|
363
363
|
categorical?: boolean;
|
|
364
364
|
atmosphereColor?: string;
|
|
365
365
|
lineAxisTitle?: string;
|
|
@@ -367,6 +367,9 @@ declare interface GraphSettingsDataType {
|
|
|
367
367
|
naLabel?: string;
|
|
368
368
|
globeOffset?: [number, number];
|
|
369
369
|
polygonAltitude?: number;
|
|
370
|
+
atmosphereAltitude?: number;
|
|
371
|
+
globeCurvatureResolution?: number;
|
|
372
|
+
lightColor?: string;
|
|
370
373
|
}
|
|
371
374
|
|
|
372
375
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -403,12 +406,6 @@ declare interface MapLegendDataType {
|
|
|
403
406
|
|
|
404
407
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
405
408
|
|
|
406
|
-
declare interface MaterialDataType {
|
|
407
|
-
color: string;
|
|
408
|
-
opacity: number;
|
|
409
|
-
transparent: boolean;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
409
|
declare interface PerformanceIntensiveChaptersDataType {
|
|
413
410
|
dataSettings: DataSettingsDataType;
|
|
414
411
|
graphSettings: GraphSettingsDataType;
|
package/dist/ScrollStory.d.ts
CHANGED
|
@@ -365,7 +365,7 @@ declare interface GraphSettingsDataType {
|
|
|
365
365
|
labelsToBeHidden?: (string | number)[];
|
|
366
366
|
autoRotate?: boolean;
|
|
367
367
|
enableZoom?: boolean;
|
|
368
|
-
globeMaterial?:
|
|
368
|
+
globeMaterial?: any;
|
|
369
369
|
categorical?: boolean;
|
|
370
370
|
atmosphereColor?: string;
|
|
371
371
|
lineAxisTitle?: string;
|
|
@@ -373,6 +373,9 @@ declare interface GraphSettingsDataType {
|
|
|
373
373
|
naLabel?: string;
|
|
374
374
|
globeOffset?: [number, number];
|
|
375
375
|
polygonAltitude?: number;
|
|
376
|
+
atmosphereAltitude?: number;
|
|
377
|
+
globeCurvatureResolution?: number;
|
|
378
|
+
lightColor?: string;
|
|
376
379
|
}
|
|
377
380
|
|
|
378
381
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -409,12 +412,6 @@ declare interface MapLegendDataType {
|
|
|
409
412
|
|
|
410
413
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
411
414
|
|
|
412
|
-
declare interface MaterialDataType {
|
|
413
|
-
color: string;
|
|
414
|
-
opacity: number;
|
|
415
|
-
transparent: boolean;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
415
|
declare interface Props {
|
|
419
416
|
/** Defines if the information is shown as overlay or on the side */
|
|
420
417
|
mode?: 'overlay' | 'side';
|
|
@@ -413,7 +413,7 @@ declare interface GraphSettingsDataType {
|
|
|
413
413
|
labelsToBeHidden?: (string | number)[];
|
|
414
414
|
autoRotate?: boolean;
|
|
415
415
|
enableZoom?: boolean;
|
|
416
|
-
globeMaterial?:
|
|
416
|
+
globeMaterial?: any;
|
|
417
417
|
categorical?: boolean;
|
|
418
418
|
atmosphereColor?: string;
|
|
419
419
|
lineAxisTitle?: string;
|
|
@@ -421,6 +421,9 @@ declare interface GraphSettingsDataType {
|
|
|
421
421
|
naLabel?: string;
|
|
422
422
|
globeOffset?: [number, number];
|
|
423
423
|
polygonAltitude?: number;
|
|
424
|
+
atmosphereAltitude?: number;
|
|
425
|
+
globeCurvatureResolution?: number;
|
|
426
|
+
lightColor?: string;
|
|
424
427
|
}
|
|
425
428
|
|
|
426
429
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -460,12 +463,6 @@ declare interface MapLegendDataType {
|
|
|
460
463
|
|
|
461
464
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
462
465
|
|
|
463
|
-
declare interface MaterialDataType {
|
|
464
|
-
color: string;
|
|
465
|
-
opacity: number;
|
|
466
|
-
transparent: boolean;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
466
|
declare interface Props {
|
|
470
467
|
graphSettings?: GraphSettingsDataType;
|
|
471
468
|
readableHeader?: {
|
|
@@ -436,7 +436,7 @@ declare interface GraphSettingsDataType {
|
|
|
436
436
|
labelsToBeHidden?: (string | number)[];
|
|
437
437
|
autoRotate?: boolean;
|
|
438
438
|
enableZoom?: boolean;
|
|
439
|
-
globeMaterial?:
|
|
439
|
+
globeMaterial?: any;
|
|
440
440
|
categorical?: boolean;
|
|
441
441
|
atmosphereColor?: string;
|
|
442
442
|
lineAxisTitle?: string;
|
|
@@ -444,6 +444,9 @@ declare interface GraphSettingsDataType {
|
|
|
444
444
|
naLabel?: string;
|
|
445
445
|
globeOffset?: [number, number];
|
|
446
446
|
polygonAltitude?: number;
|
|
447
|
+
atmosphereAltitude?: number;
|
|
448
|
+
globeCurvatureResolution?: number;
|
|
449
|
+
lightColor?: string;
|
|
447
450
|
}
|
|
448
451
|
|
|
449
452
|
declare type GraphType = GraphTypeForGriddedGraph;
|
|
@@ -483,12 +486,6 @@ declare interface MapLegendDataType {
|
|
|
483
486
|
|
|
484
487
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
485
488
|
|
|
486
|
-
declare interface MaterialDataType {
|
|
487
|
-
color: string;
|
|
488
|
-
opacity: number;
|
|
489
|
-
transparent: boolean;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
489
|
declare interface Props {
|
|
493
490
|
config: string | ConfigObject;
|
|
494
491
|
}
|
|
@@ -328,7 +328,7 @@ declare interface GraphSettingsDataType {
|
|
|
328
328
|
labelsToBeHidden?: (string | number)[];
|
|
329
329
|
autoRotate?: boolean;
|
|
330
330
|
enableZoom?: boolean;
|
|
331
|
-
globeMaterial?:
|
|
331
|
+
globeMaterial?: any;
|
|
332
332
|
categorical?: boolean;
|
|
333
333
|
atmosphereColor?: string;
|
|
334
334
|
lineAxisTitle?: string;
|
|
@@ -336,6 +336,9 @@ declare interface GraphSettingsDataType {
|
|
|
336
336
|
naLabel?: string;
|
|
337
337
|
globeOffset?: [number, number];
|
|
338
338
|
polygonAltitude?: number;
|
|
339
|
+
atmosphereAltitude?: number;
|
|
340
|
+
globeCurvatureResolution?: number;
|
|
341
|
+
lightColor?: string;
|
|
339
342
|
}
|
|
340
343
|
|
|
341
344
|
declare interface HighlightAreaSettingsDataType {
|
|
@@ -363,12 +366,6 @@ declare interface MapLegendDataType {
|
|
|
363
366
|
|
|
364
367
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
365
368
|
|
|
366
|
-
declare interface MaterialDataType {
|
|
367
|
-
color: string;
|
|
368
|
-
opacity: number;
|
|
369
|
-
transparent: boolean;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
369
|
declare interface Props {
|
|
373
370
|
graphSettings?: GraphSettingsDataType;
|
|
374
371
|
graphType: GeoHubGraphType;
|
|
@@ -335,7 +335,7 @@ declare interface GraphSettingsDataType {
|
|
|
335
335
|
labelsToBeHidden?: (string | number)[];
|
|
336
336
|
autoRotate?: boolean;
|
|
337
337
|
enableZoom?: boolean;
|
|
338
|
-
globeMaterial?:
|
|
338
|
+
globeMaterial?: any;
|
|
339
339
|
categorical?: boolean;
|
|
340
340
|
atmosphereColor?: string;
|
|
341
341
|
lineAxisTitle?: string;
|
|
@@ -343,6 +343,9 @@ declare interface GraphSettingsDataType {
|
|
|
343
343
|
naLabel?: string;
|
|
344
344
|
globeOffset?: [number, number];
|
|
345
345
|
polygonAltitude?: number;
|
|
346
|
+
atmosphereAltitude?: number;
|
|
347
|
+
globeCurvatureResolution?: number;
|
|
348
|
+
lightColor?: string;
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
declare interface HighlightAreaSettingsDataType {
|
|
@@ -370,12 +373,6 @@ declare interface MapLegendDataType {
|
|
|
370
373
|
|
|
371
374
|
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
372
375
|
|
|
373
|
-
declare interface MaterialDataType {
|
|
374
|
-
color: string;
|
|
375
|
-
opacity: number;
|
|
376
|
-
transparent: boolean;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
376
|
declare interface Props {
|
|
380
377
|
config: string | ConfigObject;
|
|
381
378
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-DDoeWRVt.cjs"),i=require("react"),te=require("./index-Ds0uHjK9.cjs"),A=require("./index-B0rbzOoC.cjs"),le=require("./index-BXns0-ng.cjs"),x=require("./DropdownSelect-BmE5JaeE.cjs"),d=require("./checkIfMultiple-BXbHUCWM.cjs"),M=require("./Typography-k-kOjICQ.cjs"),re=require("./Spinner-DA6Z5E4n.cjs"),ne=require("./ThreeDGlobe.cjs"),$=require("./fetchAndParseData-CQyVGCul.cjs"),W=require("./transformDataForAggregation-Du-Hei-W.cjs"),B=require("./getUniqValue-CHqgSss5.cjs"),oe=require("./GraphHeader.cjs"),J=require("./filterData-DN6py7y_.cjs"),ie=require("./getGraphList-gf02xgT2.cjs"),K=require("./transformDataForSelect-YmStusCI.cjs");function se(I){const{settings:a,graph:n,graphData:p,debugMode:g,graphDataConfiguration:C,readableHeader:o,updateFilters:R}=I;if(g&&(console.log(`Graph: ${n}`),console.log("Transformed data:",p),console.log("Settings:",a)),typeof p=="string")return r.jsxRuntimeExports.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:r.jsxRuntimeExports.jsx(M.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:p})});const D={threeDGlobe:ne.ThreeDGlobe},b=c=>{switch(c){case"threeDGlobe":return{globeOffset:a?.globeOffset,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:d.getValues("x",C||[],o||[]),scaleType:a?.scaleType,data:p,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:H=>{R?.(H.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,categorical:a?.categorical,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom};default:return{}}},E=D[n],q=b(n);return r.jsxRuntimeExports.jsx("div",{className:`grow my-0 mx-auto flex flex-col h-inherit ${a?.width?"w-fit":"w-full"} justify-center ${a?.theme||"light"}`,style:{minHeight:"inherit"},children:E?r.jsxRuntimeExports.jsx(E,{...q}):r.jsxRuntimeExports.jsx(M.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${n}`})})}const F=(I,a)=>{const n=a?.map(p=>{const g=I?.findIndex(o=>o.chartConfigId===p.chartConfigId);if(g===-1)return{};const C=I[g]?.allowedColumnIds?.findIndex(o=>o.value===p.columnId);return C===-1?{}:I[g].allowedColumnIds[C].graphSettings||{}})||[];return Object.assign({},...n)};function ue(I){const{graphSettings:a,dataSettings:n,filters:p,graphType:g,dataTransform:C,graphDataConfiguration:o,dataFilters:R,debugMode:D,dataSelectionOptions:b,advancedDataSelectionOptions:E,readableHeader:q,noOfFiltersPerRow:c=4,updateFilters:H,uiMode:f="normal",highlightDataPointSettings:v}=I,[j,Q]=i.useState(void 0),[S,X]=i.useState(void 0),[w,y]=i.useState(o),[m,V]=i.useState({}),[k,Y]=i.useState(void 0),[_,ee]=i.useState([]),L=i.useRef(null),z=i.useRef(o),[T,U]=i.useState([]),N=i.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),Z=i.useCallback(async()=>{try{const u=await(n.dataURL?typeof n.dataURL=="string"?n.fileType==="json"?$.fetchAndParseJSON(n.dataURL,n.columnsToArray,n.dataTransformation,D):n.fileType==="api"?$.fetchAndTransformDataFromAPI(n.dataURL,n.apiHeaders,n.columnsToArray,n.dataTransformation,D):$.fetchAndParseCSV(n.dataURL,n.dataTransformation,n.columnsToArray,D,n.delimiter,!0):$.fetchAndParseMultipleDataSources(n.dataURL,n.idColumnTitle):$.transformColumnsToArray(n.data,n.columnsToArray));X(u);const t=(p||[]).map(l=>({filter:l.column,label:l.label||`Filter by ${l.column}`,singleSelect:l.singleSelect,clearable:l.clearable,defaultValue:K.transformDefaultValue(l.defaultValue),value:K.transformDefaultValue(l.defaultValue),availableValues:B.getUniqValue(u,l.column).filter(s=>!l.excludeValues?.includes(`${s}`)).map(s=>({value:s,label:s})),allowSelectAll:l.allowSelectAll,width:l.width}));U(t)}catch(e){console.error("Data fetching error:",e)}},[n,p,D]);i.useEffect(()=>{Z()},[Z]);const G=i.useMemo(()=>!S||T.length===0?S:S.filter(u=>T.every(t=>t.value&&A.flattenDeep([t.value]).length>0?te.intersection(A.flattenDeep([u[t.filter]]),A.flattenDeep([t.value]).map(l=>l.value)).length>0:!0)),[T,S]);i.useEffect(()=>{b&&V(F(b,o))},[b,o]),i.useEffect(()=>{S&&Q(G)},[G,S]),i.useEffect(()=>{v?.column&&G&&ee(B.getUniqValue(G,v.column).filter(e=>!v?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))},[G,v]),i.useEffect(()=>{le.isEqual(z.current,o)||(y(o),z.current=o)},[o]);const O=i.useCallback((e,u)=>{U(t=>t.map(l=>l.filter===e?{...l,value:u}:l))},[]),ae=i.useMemo(()=>{if(!j)return;const e=w;return W.transformDataForGraph(C?W.transformDataForAggregation(J.filterData(j,R||[]),C.keyColumn,C.aggregationColumnsSetting):J.filterData(j,R||[]),g,e)},[g,w,j,R,C]);return n?r.jsxRuntimeExports.jsx("div",{className:`${a?.theme||"light"} flex ${a?.width?"w-fit grow-0":"w-full grow"}${a?.height?"":" h-full"}`,dir:a?.language==="he"||a?.language==="ar"?"rtl":void 0,children:r.jsxRuntimeExports.jsx("div",{className:r.mo(`${a?.backgroundColor?a?.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${a?.language||"en"}`,a?.classNames?.graphContainer),style:{...a?.styles?.graphContainer||{},...a?.backgroundColor&&a?.backgroundColor!==!0?{backgroundColor:a?.backgroundColor}:{}},id:a?.graphID,ref:L,children:r.jsxRuntimeExports.jsx("div",{style:{padding:a?.backgroundColor?a?.padding||"1rem":a?.padding||0,flexGrow:1,display:"flex"},children:r.jsxRuntimeExports.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:j||ie.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(g)!==-1?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[m?.graphTitle||m?.graphDescription||a?.graphTitle||a?.graphDescription||a?.graphDownload||a?.dataDownload?r.jsxRuntimeExports.jsx(oe.GraphHeader,{styles:{title:m?.styles?.title||a?.styles?.title,description:m?.styles?.description||a?.styles?.description},classNames:{title:m?.classNames?.title||a?.classNames?.title,description:m?.classNames?.description||a?.classNames?.description},graphTitle:m?.graphTitle||a?.graphTitle,graphDescription:m?.graphDescription||a?.graphDescription,width:m?.width||a?.width,graphDownload:a?.graphDownload?L.current:void 0,dataDownload:a?.dataDownload&&j&&j.length>0?j:null}):null,T.length!==0||(b||[]).length!==0||(E||[]).length!==0||v?r.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[E?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/c}% - ${(c-1)/c}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(d.f,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.options.map(t=>({...t,value:t.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:t=>{V(t?.graphSettings||{}),y(t?.dataConfiguration)}}):r.jsxRuntimeExports.jsx(d.fe,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:f,onValueChange:t=>{const l=e.options[e.options.findIndex(s=>s.label===t)];V(l.graphSettings||{}),y(l.dataConfiguration)},children:e.options.map((t,l)=>r.jsxRuntimeExports.jsx(d.ve,{label:t.label,value:t.label},l))})]},u)),b?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/c}% - ${(c-1)/c}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(d.f,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),d.checkIfMultiple(e.chartConfigId,w||[])?e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:o?o[o.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId.map(t=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===t)]):void 0,filterOption:x.Hu(N),onChange:t=>{const l={columnId:(t||[]).map(h=>h.value),chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);y(s)}}):r.jsxRuntimeExports.jsx(d.w,{variant:f,defaultValue:o?o[o.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId.map(t=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===t)]).map(t=>t.value):[],onValueChange:t=>{const l={columnId:t||[],chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);y(s)},children:e.allowedColumnIds.map((t,l)=>r.jsxRuntimeExports.jsx(d.G,{label:t.label,value:t.label},l))}):e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:f,controlShouldRenderValue:!0,defaultValue:o?e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===o[o.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:t=>{const l={columnId:t?.value,chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);V(F(b,s)),y(s)}}):r.jsxRuntimeExports.jsx(d.fe,{variant:f,defaultValue:o?e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===o[o.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:t=>{const s={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(P=>P.label===t)].value,chartConfigId:e.chartConfigId},h=w?.map(P=>P.chartConfigId===s.chartConfigId?s:P);V(F(b,h)),y(h)},children:e.allowedColumnIds.map((t,l)=>r.jsxRuntimeExports.jsx(d.ve,{label:t.label,value:t.label},l))})]},u)),T?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/c}% - ${(c-1)/c}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(d.f,{className:"mb-2",children:e.label}),e.singleSelect?r.jsxRuntimeExports.jsx(x.Za,{options:e.availableValues,variant:f,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:t=>{O(e.filter,t)},value:e.value,defaultValue:e.defaultValue}):r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.availableValues,variant:f,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:t=>{O(e.filter,t)},value:e.value,defaultValue:e.defaultValue}):r.jsxRuntimeExports.jsx(d.w,{variant:f,defaultValue:e.defaultValue?e.defaultValue.map(t=>`${t.value}`):[],value:e.value?e.value.map(t=>`${t.value}`):void 0,onValueChange:t=>{O(e.filter,e.availableValues.filter(l=>t.indexOf(`${l.value}`)!==-1))},children:e.availableValues.map((t,l)=>r.jsxRuntimeExports.jsx(d.G,{label:`${t.label}`,value:`${t.value}`},l))}),e.allowSelectAll?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{O(e.filter,e.availableValues)},children:"Select all options"}):null]})]},u)),v?r.jsxRuntimeExports.jsxs("div",{style:{width:v.width||`calc(${100/c}% - ${(c-1)/c}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(d.f,{className:"mb-2",children:v.label||"Highlight data"}),r.jsxRuntimeExports.jsx(x.Za,{options:_,variant:f,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:e=>{Y(e?.map(u=>u.value))},value:k?.map(e=>({label:e,value:e})),defaultValue:v.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,r.jsxRuntimeExports.jsx(se,{graph:g,graphData:ae,graphDataConfiguration:w,debugMode:D,readableHeader:q||[],updateFilters:H,settings:{...a||{},...m,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:a?.theme,...k?{highlightedDataPoints:k,highlightedIds:k?.map(e=>`${e}`),highlightedLines:k?.map(e=>e)}:{}}})]}):r.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:r.jsxRuntimeExports.jsx(re.y,{})})})})})}):r.jsxRuntimeExports.jsx(M.u,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."})}exports.SingleGraphDashboardThreeDGraphs=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CHPV5EwG-DDoeWRVt.cjs"),i=require("react"),te=require("./index-Ds0uHjK9.cjs"),H=require("./index-B0rbzOoC.cjs"),le=require("./index-BXns0-ng.cjs"),x=require("./DropdownSelect-BmE5JaeE.cjs"),c=require("./checkIfMultiple-BXbHUCWM.cjs"),M=require("./Typography-k-kOjICQ.cjs"),re=require("./Spinner-DA6Z5E4n.cjs"),oe=require("./ThreeDGlobe.cjs"),$=require("./fetchAndParseData-CQyVGCul.cjs"),W=require("./transformDataForAggregation-Du-Hei-W.cjs"),B=require("./getUniqValue-CHqgSss5.cjs"),ne=require("./GraphHeader.cjs"),J=require("./filterData-DN6py7y_.cjs"),ie=require("./getGraphList-gf02xgT2.cjs"),K=require("./transformDataForSelect-YmStusCI.cjs");function se(I){const{settings:a,graph:o,graphData:p,debugMode:g,graphDataConfiguration:C,readableHeader:n,updateFilters:S}=I;if(g&&(console.log(`Graph: ${o}`),console.log("Transformed data:",p),console.log("Settings:",a)),typeof p=="string")return r.jsxRuntimeExports.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${a?.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:r.jsxRuntimeExports.jsx(M.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:p})});const D={threeDGlobe:oe.ThreeDGlobe},b=d=>{switch(d){case"threeDGlobe":return{globeOffset:a?.globeOffset,polygonAltitude:a?.polygonAltitude,highlightedIds:a?.highlightedIds,scale:a?.scale,theme:a?.theme,resetSelectionOnDoubleClick:a?.resetSelectionOnDoubleClick,graphTitle:a?.graphTitle,mapData:a?.mapData,graphDescription:a?.graphDescription,footNote:a?.footNote,width:a?.width,height:a?.height,sources:a?.sources,colorDomain:a?.colorDomain,colors:a?.colors,colorLegendTitle:Object.keys(a||{}).indexOf("colorLegendTitle")!==-1?a?.colorLegendTitle:c.getValues("x",C||[],n||[]),scaleType:a?.scaleType,data:p,centerPoint:a?.centerPoint,backgroundColor:a?.backgroundColor,mapNoDataColor:a?.mapNoDataColor,mapBorderColor:a?.mapBorderColor,relativeHeight:a?.relativeHeight,padding:a?.padding,tooltip:a?.tooltip,showColorScale:a?.showColorScale,graphID:a?.graphID,dataDownload:a?.dataDownload,mapProperty:a?.mapProperty,language:a?.language,minHeight:a?.minHeight,ariaLabel:a?.ariaLabel,onSeriesMouseClick:A=>{S?.(A.id)},detailsOnClick:a?.detailsOnClick,styles:a?.styles,classNames:a?.classNames,categorical:a?.categorical,autoRotate:a?.autoRotate,globeMaterial:a?.globeMaterial,atmosphereColor:a?.atmosphereColor,enableZoom:a?.enableZoom,atmosphereAltitude:a?.atmosphereAltitude,globeCurvatureResolution:a?.globeCurvatureResolution,lightColor:a?.lightColor};default:return{}}},E=D[o],q=b(o);return r.jsxRuntimeExports.jsx("div",{className:`grow my-0 mx-auto flex flex-col h-inherit ${a?.width?"w-fit":"w-full"} justify-center ${a?.theme||"light"}`,style:{minHeight:"inherit"},children:E?r.jsxRuntimeExports.jsx(E,{...q}):r.jsxRuntimeExports.jsx(M.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${o}`})})}const F=(I,a)=>{const o=a?.map(p=>{const g=I?.findIndex(n=>n.chartConfigId===p.chartConfigId);if(g===-1)return{};const C=I[g]?.allowedColumnIds?.findIndex(n=>n.value===p.columnId);return C===-1?{}:I[g].allowedColumnIds[C].graphSettings||{}})||[];return Object.assign({},...o)};function ue(I){const{graphSettings:a,dataSettings:o,filters:p,graphType:g,dataTransform:C,graphDataConfiguration:n,dataFilters:S,debugMode:D,dataSelectionOptions:b,advancedDataSelectionOptions:E,readableHeader:q,noOfFiltersPerRow:d=4,updateFilters:A,uiMode:m="normal",highlightDataPointSettings:v}=I,[j,Q]=i.useState(void 0),[R,X]=i.useState(void 0),[w,y]=i.useState(n),[f,V]=i.useState({}),[k,Y]=i.useState(void 0),[_,ee]=i.useState([]),L=i.useRef(null),z=i.useRef(n),[T,U]=i.useState([]),N=i.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),Z=i.useCallback(async()=>{try{const u=await(o.dataURL?typeof o.dataURL=="string"?o.fileType==="json"?$.fetchAndParseJSON(o.dataURL,o.columnsToArray,o.dataTransformation,D):o.fileType==="api"?$.fetchAndTransformDataFromAPI(o.dataURL,o.apiHeaders,o.columnsToArray,o.dataTransformation,D):$.fetchAndParseCSV(o.dataURL,o.dataTransformation,o.columnsToArray,D,o.delimiter,!0):$.fetchAndParseMultipleDataSources(o.dataURL,o.idColumnTitle):$.transformColumnsToArray(o.data,o.columnsToArray));X(u);const t=(p||[]).map(l=>({filter:l.column,label:l.label||`Filter by ${l.column}`,singleSelect:l.singleSelect,clearable:l.clearable,defaultValue:K.transformDefaultValue(l.defaultValue),value:K.transformDefaultValue(l.defaultValue),availableValues:B.getUniqValue(u,l.column).filter(s=>!l.excludeValues?.includes(`${s}`)).map(s=>({value:s,label:s})),allowSelectAll:l.allowSelectAll,width:l.width}));U(t)}catch(e){console.error("Data fetching error:",e)}},[o,p,D]);i.useEffect(()=>{Z()},[Z]);const G=i.useMemo(()=>!R||T.length===0?R:R.filter(u=>T.every(t=>t.value&&H.flattenDeep([t.value]).length>0?te.intersection(H.flattenDeep([u[t.filter]]),H.flattenDeep([t.value]).map(l=>l.value)).length>0:!0)),[T,R]);i.useEffect(()=>{b&&V(F(b,n))},[b,n]),i.useEffect(()=>{R&&Q(G)},[G,R]),i.useEffect(()=>{v?.column&&G&&ee(B.getUniqValue(G,v.column).filter(e=>!v?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))},[G,v]),i.useEffect(()=>{le.isEqual(z.current,n)||(y(n),z.current=n)},[n]);const O=i.useCallback((e,u)=>{U(t=>t.map(l=>l.filter===e?{...l,value:u}:l))},[]),ae=i.useMemo(()=>{if(!j)return;const e=w;return W.transformDataForGraph(C?W.transformDataForAggregation(J.filterData(j,S||[]),C.keyColumn,C.aggregationColumnsSetting):J.filterData(j,S||[]),g,e)},[g,w,j,S,C]);return o?r.jsxRuntimeExports.jsx("div",{className:`${a?.theme||"light"} flex ${a?.width?"w-fit grow-0":"w-full grow"}${a?.height?"":" h-full"}`,dir:a?.language==="he"||a?.language==="ar"?"rtl":void 0,children:r.jsxRuntimeExports.jsx("div",{className:r.mo(`${a?.backgroundColor?a?.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${a?.language||"en"}`,a?.classNames?.graphContainer),style:{...a?.styles?.graphContainer||{},...a?.backgroundColor&&a?.backgroundColor!==!0?{backgroundColor:a?.backgroundColor}:{}},id:a?.graphID,ref:L,children:r.jsxRuntimeExports.jsx("div",{style:{padding:a?.backgroundColor?a?.padding||"1rem":a?.padding||0,flexGrow:1,display:"flex"},children:r.jsxRuntimeExports.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:j||ie.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(g)!==-1?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[f?.graphTitle||f?.graphDescription||a?.graphTitle||a?.graphDescription||a?.graphDownload||a?.dataDownload?r.jsxRuntimeExports.jsx(ne.GraphHeader,{styles:{title:f?.styles?.title||a?.styles?.title,description:f?.styles?.description||a?.styles?.description},classNames:{title:f?.classNames?.title||a?.classNames?.title,description:f?.classNames?.description||a?.classNames?.description},graphTitle:f?.graphTitle||a?.graphTitle,graphDescription:f?.graphDescription||a?.graphDescription,width:f?.width||a?.width,graphDownload:a?.graphDownload?L.current:void 0,dataDownload:a?.dataDownload&&j&&j.length>0?j:null}):null,T.length!==0||(b||[]).length!==0||(E||[]).length!==0||v?r.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[E?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(c.f,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.options.map(t=>({...t,value:t.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:m,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:t=>{V(t?.graphSettings||{}),y(t?.dataConfiguration)}}):r.jsxRuntimeExports.jsx(c.fe,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:m,onValueChange:t=>{const l=e.options[e.options.findIndex(s=>s.label===t)];V(l.graphSettings||{}),y(l.dataConfiguration)},children:e.options.map((t,l)=>r.jsxRuntimeExports.jsx(c.ve,{label:t.label,value:t.label},l))})]},u)),b?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(c.f,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),c.checkIfMultiple(e.chartConfigId,w||[])?e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:m,controlShouldRenderValue:!0,defaultValue:n?n[n.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId.map(t=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===t)]):void 0,filterOption:x.Hu(N),onChange:t=>{const l={columnId:(t||[]).map(h=>h.value),chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);y(s)}}):r.jsxRuntimeExports.jsx(c.w,{variant:m,defaultValue:n?n[n.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId.map(t=>e.allowedColumnIds[e.allowedColumnIds.findIndex(l=>l.value===t)]).map(t=>t.value):[],onValueChange:t=>{const l={columnId:t||[],chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);y(s)},children:e.allowedColumnIds.map((t,l)=>r.jsxRuntimeExports.jsx(c.G,{label:t.label,value:t.label},l))}):e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:m,controlShouldRenderValue:!0,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:t=>{const l={columnId:t?.value,chartConfigId:e.chartConfigId},s=w?.map(h=>h.chartConfigId===l.chartConfigId?l:h);V(F(b,s)),y(s)}}):r.jsxRuntimeExports.jsx(c.fe,{variant:m,defaultValue:n?e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===n[n.findIndex(l=>l.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:t=>{const s={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(P=>P.label===t)].value,chartConfigId:e.chartConfigId},h=w?.map(P=>P.chartConfigId===s.chartConfigId?s:P);V(F(b,h)),y(h)},children:e.allowedColumnIds.map((t,l)=>r.jsxRuntimeExports.jsx(c.ve,{label:t.label,value:t.label},l))})]},u)),T?.map((e,u)=>r.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(c.f,{className:"mb-2",children:e.label}),e.singleSelect?r.jsxRuntimeExports.jsx(x.Za,{options:e.availableValues,variant:m,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:t=>{O(e.filter,t)},value:e.value,defaultValue:e.defaultValue}):r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?r.jsxRuntimeExports.jsx(x.Za,{options:e.availableValues,variant:m,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:t=>{O(e.filter,t)},value:e.value,defaultValue:e.defaultValue}):r.jsxRuntimeExports.jsx(c.w,{variant:m,defaultValue:e.defaultValue?e.defaultValue.map(t=>`${t.value}`):[],value:e.value?e.value.map(t=>`${t.value}`):void 0,onValueChange:t=>{O(e.filter,e.availableValues.filter(l=>t.indexOf(`${l.value}`)!==-1))},children:e.availableValues.map((t,l)=>r.jsxRuntimeExports.jsx(c.G,{label:`${t.label}`,value:`${t.value}`},l))}),e.allowSelectAll?r.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{O(e.filter,e.availableValues)},children:"Select all options"}):null]})]},u)),v?r.jsxRuntimeExports.jsxs("div",{style:{width:v.width||`calc(${100/d}% - ${(d-1)/d}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[r.jsxRuntimeExports.jsx(c.f,{className:"mb-2",children:v.label||"Highlight data"}),r.jsxRuntimeExports.jsx(x.Za,{options:_,variant:m,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:x.Hu(N),onChange:e=>{Y(e?.map(u=>u.value))},value:k?.map(e=>({label:e,value:e})),defaultValue:v.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,r.jsxRuntimeExports.jsx(se,{graph:g,graphData:ae,graphDataConfiguration:w,debugMode:D,readableHeader:q||[],updateFilters:A,settings:{...a||{},...f,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:a?.theme,...k?{highlightedDataPoints:k,highlightedIds:k?.map(e=>`${e}`),highlightedLines:k?.map(e=>e)}:{}}})]}):r.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:r.jsxRuntimeExports.jsx(re.y,{})})})})})}):r.jsxRuntimeExports.jsx(M.u,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."})}exports.SingleGraphDashboardThreeDGraphs=ue;
|
|
2
2
|
//# sourceMappingURL=SingleGraphDashboardThreeDGraphs.cjs.map
|