@undp/data-viz 1.3.1 → 1.4.0
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/DataCards.cjs +21 -1
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +622 -12
- package/dist/DataCards.js.map +1 -1
- package/dist/GraphEl-B6SoGRFW.cjs +2 -0
- package/dist/GraphEl-B6SoGRFW.cjs.map +1 -0
- package/dist/{checkIfMultiple-BB7PlCNh.js → GraphEl-Cw2tDUb3.js} +129 -1163
- package/dist/GraphEl-Cw2tDUb3.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -4
- package/dist/GriddedGraphs.js +9 -8
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -4
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +16 -12
- package/dist/MultiGraphDashboard.js +2 -2
- package/dist/MultiGraphDashboardFromConfig.d.ts +16 -12
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +566 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +353 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +570 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +38 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.cjs +2 -0
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +493 -0
- package/dist/PerformanceIntensiveScrollStory.js +122 -0
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -0
- package/dist/ScrollStory.cjs.map +1 -1
- package/dist/ScrollStory.d.ts +3 -5
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -5
- package/dist/SingleGraphDashboard.js +194 -194
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -4
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +428 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +185 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +432 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +540 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +610 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +543 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +35 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -0
- package/dist/Types.d.ts +38 -11
- package/dist/checkIfMultiple-CYp3vADF.js +912 -0
- package/dist/checkIfMultiple-CYp3vADF.js.map +1 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs +12 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs.map +1 -0
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.d.ts +7 -5
- package/dist/getSchema.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +330 -163
- package/dist/index.js +150 -136
- package/dist/index.js.map +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.d.ts +5 -5
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForAggregation-DAQJWGNL.js → transformDataForAggregation-CdcwlnNe.js} +2 -2
- package/dist/transformDataForAggregation-CdcwlnNe.js.map +1 -0
- package/dist/{transformDataForAggregation-BUGJnson.cjs → transformDataForAggregation-Du-Hei-W.cjs} +2 -2
- package/dist/transformDataForAggregation-Du-Hei-W.cjs.map +1 -0
- package/dist/{transformDataForGraphFromFile-DdNiOWeC.js → transformDataForGraphFromFile-CA0rw80A.js} +2 -2
- package/dist/{transformDataForGraphFromFile-DdNiOWeC.js.map → transformDataForGraphFromFile-CA0rw80A.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CrntpaMU.cjs → transformDataForGraphFromFile-D9G3ToQf.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CrntpaMU.cjs.map → transformDataForGraphFromFile-D9G3ToQf.cjs.map} +1 -1
- package/dist/transformDataForSelect-D8AuvYdf.js +14 -0
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -0
- package/dist/transformDataForSelect-YmStusCI.cjs +2 -0
- package/dist/transformDataForSelect-YmStusCI.cjs.map +1 -0
- package/dist/validateSchema.d.ts +2 -4
- package/package.json +36 -1
- package/dist/checkIfMultiple-BB7PlCNh.js.map +0 -1
- package/dist/checkIfMultiple-D5ysrI7G.cjs +0 -12
- package/dist/checkIfMultiple-D5ysrI7G.cjs.map +0 -1
- package/dist/index-D9h2WYDS.cjs +0 -22
- package/dist/index-D9h2WYDS.cjs.map +0 -1
- package/dist/index-OCoyy1wG.js +0 -635
- package/dist/index-OCoyy1wG.js.map +0 -1
- package/dist/transformDataForAggregation-BUGJnson.cjs.map +0 -1
- package/dist/transformDataForAggregation-DAQJWGNL.js.map +0 -1
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare interface AnimateDataType {
|
|
4
|
+
duration: number;
|
|
5
|
+
once: boolean;
|
|
6
|
+
amount: 'some' | 'all' | number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface AnnotationSettingsDataType {
|
|
10
|
+
text: string;
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
xCoordinate?: number | string;
|
|
13
|
+
yCoordinate?: number | string;
|
|
14
|
+
xOffset?: number;
|
|
15
|
+
yOffset?: number;
|
|
16
|
+
align?: 'center' | 'left' | 'right';
|
|
17
|
+
color?: string;
|
|
18
|
+
fontWeight?: 'regular' | 'bold' | 'medium';
|
|
19
|
+
showConnector?: boolean | number;
|
|
20
|
+
connectorRadius?: number;
|
|
21
|
+
classNames?: {
|
|
22
|
+
connector?: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
};
|
|
25
|
+
styles?: {
|
|
26
|
+
connector?: React.CSSProperties;
|
|
27
|
+
text?: React.CSSProperties;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare interface AxesClassNameObject {
|
|
32
|
+
gridLines?: string;
|
|
33
|
+
labels?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
axis?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare interface AxesStyleObject {
|
|
39
|
+
gridLines?: React.CSSProperties;
|
|
40
|
+
labels?: React.CSSProperties;
|
|
41
|
+
title?: React.CSSProperties;
|
|
42
|
+
axis?: React.CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare interface ClassNameObject {
|
|
46
|
+
title?: string;
|
|
47
|
+
footnote?: string;
|
|
48
|
+
source?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
tooltip?: string;
|
|
51
|
+
xAxis?: AxesClassNameObject;
|
|
52
|
+
yAxis?: AxesClassNameObject;
|
|
53
|
+
legend?: string;
|
|
54
|
+
graphContainer?: string;
|
|
55
|
+
graphObjectValues?: string;
|
|
56
|
+
dataConnectors?: string;
|
|
57
|
+
mouseOverLine?: string;
|
|
58
|
+
regLine?: string;
|
|
59
|
+
dataCards?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
63
|
+
|
|
64
|
+
declare interface CustomHighlightAreaSettingsDataType {
|
|
65
|
+
coordinates: (number | string)[];
|
|
66
|
+
closePath?: boolean;
|
|
67
|
+
style?: React.CSSProperties;
|
|
68
|
+
className?: string;
|
|
69
|
+
color?: string;
|
|
70
|
+
strokeWidth?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare interface CustomLayerDataType {
|
|
74
|
+
position: 'before' | 'after';
|
|
75
|
+
layer: React.ReactNode;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare interface DataTableColumnDataType {
|
|
79
|
+
columnTitle?: string;
|
|
80
|
+
columnId: string;
|
|
81
|
+
sortable?: boolean;
|
|
82
|
+
filterOptions?: string[];
|
|
83
|
+
chip?: boolean;
|
|
84
|
+
chipColumnId?: string;
|
|
85
|
+
chipColors?: {
|
|
86
|
+
value: string;
|
|
87
|
+
color: string;
|
|
88
|
+
}[];
|
|
89
|
+
separator?: string;
|
|
90
|
+
align?: 'left' | 'right' | 'center';
|
|
91
|
+
suffix?: string;
|
|
92
|
+
prefix?: string;
|
|
93
|
+
columnWidth?: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare type GeoHubGraphType = 'geoHubCompareMap' | 'geoHubMap' | 'geoHubMapWithLayerSelection';
|
|
97
|
+
|
|
98
|
+
declare interface GraphSettingsDataType {
|
|
99
|
+
colors?: string | string[] | string[][];
|
|
100
|
+
orientation?: 'horizontal' | 'vertical';
|
|
101
|
+
axisTitles?: [string, string];
|
|
102
|
+
graphTitle?: string | React.ReactNode;
|
|
103
|
+
labelOrder?: string[];
|
|
104
|
+
graphDescription?: string | React.ReactNode;
|
|
105
|
+
footNote?: string | React.ReactNode;
|
|
106
|
+
height?: number;
|
|
107
|
+
width?: number;
|
|
108
|
+
suffix?: string;
|
|
109
|
+
prefix?: string;
|
|
110
|
+
sources?: SourcesDataType[];
|
|
111
|
+
barPadding?: number;
|
|
112
|
+
showTicks?: boolean;
|
|
113
|
+
leftMargin?: number;
|
|
114
|
+
rightMargin?: number;
|
|
115
|
+
truncateBy?: number;
|
|
116
|
+
colorDomain?: string[] | number[];
|
|
117
|
+
colorLegendTitle?: string;
|
|
118
|
+
backgroundColor?: string | boolean;
|
|
119
|
+
padding?: string;
|
|
120
|
+
topMargin?: number;
|
|
121
|
+
bottomMargin?: number;
|
|
122
|
+
relativeHeight?: number;
|
|
123
|
+
showColorScale?: boolean;
|
|
124
|
+
maxValue?: number;
|
|
125
|
+
minValue?: number;
|
|
126
|
+
tooltip?: string | ((_d: any) => React.ReactNode);
|
|
127
|
+
refValues?: ReferenceDataType[];
|
|
128
|
+
graphID?: string;
|
|
129
|
+
highlightedDataPoints?: (string | number)[];
|
|
130
|
+
graphDownload?: boolean;
|
|
131
|
+
sortData?: 'desc' | 'asc';
|
|
132
|
+
dataDownload?: boolean;
|
|
133
|
+
maxRadiusValue?: number;
|
|
134
|
+
leftBarTitle?: string;
|
|
135
|
+
rightBarTitle?: string;
|
|
136
|
+
barColors?: [string, string];
|
|
137
|
+
centerGap?: number;
|
|
138
|
+
columnData?: DataTableColumnDataType[];
|
|
139
|
+
mainText?: string;
|
|
140
|
+
subNote?: string;
|
|
141
|
+
radius?: number;
|
|
142
|
+
strokeWidth?: number;
|
|
143
|
+
showValues?: boolean;
|
|
144
|
+
scaleType?: ScaleDataType;
|
|
145
|
+
showColumnLabels?: boolean;
|
|
146
|
+
showRowLabels?: boolean;
|
|
147
|
+
noDataColor?: string;
|
|
148
|
+
fillContainer?: boolean;
|
|
149
|
+
numberOfBins?: number;
|
|
150
|
+
donutStrokeWidth?: number;
|
|
151
|
+
barGraphLayout?: 'horizontal' | 'vertical';
|
|
152
|
+
graphType?: 'circlePacking' | 'treeMap' | 'barGraph' | 'donutChart';
|
|
153
|
+
donutColorDomain?: string[];
|
|
154
|
+
lineTitles?: [string, string];
|
|
155
|
+
noOfXTicks?: number;
|
|
156
|
+
dateFormat?: string;
|
|
157
|
+
lineColors?: string[];
|
|
158
|
+
sameAxes?: boolean;
|
|
159
|
+
highlightAreaSettings?: HighlightAreaSettingsDataType[] | HighlightAreaSettingsForScatterPlotDataType[];
|
|
160
|
+
labels?: (string | number)[];
|
|
161
|
+
showColorLegendAtTop?: boolean;
|
|
162
|
+
highlightedLines?: (string | number)[];
|
|
163
|
+
area?: boolean;
|
|
164
|
+
mapData?: any;
|
|
165
|
+
xColorLegendTitle?: string;
|
|
166
|
+
yColorLegendTitle?: string;
|
|
167
|
+
xDomain?: [number, number, number, number];
|
|
168
|
+
yDomain?: [number, number, number, number];
|
|
169
|
+
scale?: number;
|
|
170
|
+
centerPoint?: [number, number];
|
|
171
|
+
mapBorderWidth?: number;
|
|
172
|
+
mapNoDataColor?: string;
|
|
173
|
+
mapBorderColor?: string;
|
|
174
|
+
isWorldMap?: boolean;
|
|
175
|
+
zoomScaleExtend?: [number, number];
|
|
176
|
+
zoomTranslateExtend?: [[number, number], [number, number]];
|
|
177
|
+
highlightedIds?: string[];
|
|
178
|
+
mapProperty?: string;
|
|
179
|
+
showAntarctica?: boolean;
|
|
180
|
+
mapStyles?: [string, string];
|
|
181
|
+
center?: [number, number];
|
|
182
|
+
zoomLevel?: number;
|
|
183
|
+
mapStyle?: string | {
|
|
184
|
+
style: string;
|
|
185
|
+
name: string;
|
|
186
|
+
}[];
|
|
187
|
+
barTitle?: string;
|
|
188
|
+
lineTitle?: string;
|
|
189
|
+
barColor?: string;
|
|
190
|
+
lineColor?: string;
|
|
191
|
+
showLabels?: boolean;
|
|
192
|
+
xAxisTitle?: string;
|
|
193
|
+
yAxisTitle?: string;
|
|
194
|
+
refXValues?: ReferenceDataType[];
|
|
195
|
+
refYValues?: ReferenceDataType[];
|
|
196
|
+
customHighlightAreaSettings?: CustomHighlightAreaSettingsDataType[];
|
|
197
|
+
maxXValue?: number;
|
|
198
|
+
minXValue?: number;
|
|
199
|
+
maxYValue?: number;
|
|
200
|
+
minYValue?: number;
|
|
201
|
+
axisTitle?: [string, string];
|
|
202
|
+
year?: number | string;
|
|
203
|
+
aggregationMethod?: 'count' | 'max' | 'min' | 'average' | 'sum';
|
|
204
|
+
stripType?: 'strip' | 'dot';
|
|
205
|
+
language?: Languages;
|
|
206
|
+
animate?: boolean | AnimateDataType;
|
|
207
|
+
highlightColor?: string;
|
|
208
|
+
dotOpacity?: number;
|
|
209
|
+
sortParameter?: number | 'diff' | 'total';
|
|
210
|
+
arrowConnector?: boolean;
|
|
211
|
+
connectorStrokeWidth?: number;
|
|
212
|
+
countOnly?: (string | number)[];
|
|
213
|
+
value?: number;
|
|
214
|
+
gridSize?: number;
|
|
215
|
+
unitPadding?: number;
|
|
216
|
+
size?: number;
|
|
217
|
+
totalNoOfDots?: number;
|
|
218
|
+
showStrokeForWhiteDots?: boolean;
|
|
219
|
+
note?: string;
|
|
220
|
+
showNAColor?: boolean;
|
|
221
|
+
minHeight?: number;
|
|
222
|
+
autoPlay?: boolean;
|
|
223
|
+
autoSort?: boolean;
|
|
224
|
+
showOnlyActiveDate?: boolean;
|
|
225
|
+
showDots?: boolean;
|
|
226
|
+
diffAreaColors?: [string, string];
|
|
227
|
+
theme?: 'dark' | 'light';
|
|
228
|
+
uiMode?: 'light' | 'normal';
|
|
229
|
+
maxBarThickness?: number;
|
|
230
|
+
minBarThickness?: number;
|
|
231
|
+
maxNumberOfBars?: number;
|
|
232
|
+
includeLayers?: string[];
|
|
233
|
+
excludeLayers?: string[];
|
|
234
|
+
layerSelection?: {
|
|
235
|
+
layerID: string;
|
|
236
|
+
name: string[];
|
|
237
|
+
}[];
|
|
238
|
+
annotations?: AnnotationSettingsDataType[];
|
|
239
|
+
regressionLine?: boolean | string;
|
|
240
|
+
ariaLabel?: string;
|
|
241
|
+
nodePadding?: number;
|
|
242
|
+
nodeWidth?: number;
|
|
243
|
+
highlightedSourceDataPoints?: string[];
|
|
244
|
+
highlightedTargetDataPoints?: string[];
|
|
245
|
+
defaultLinkOpacity?: number;
|
|
246
|
+
sourceTitle?: string;
|
|
247
|
+
targetTitle?: string;
|
|
248
|
+
sortNodes?: 'asc' | 'desc' | 'mostReadable' | 'none';
|
|
249
|
+
sourceColors?: string[] | string;
|
|
250
|
+
targetColors?: string[] | string;
|
|
251
|
+
sourceColorDomain?: string[];
|
|
252
|
+
targetColorDomain?: string[];
|
|
253
|
+
showIntervalDots?: boolean;
|
|
254
|
+
showIntervalValues?: boolean;
|
|
255
|
+
intervalLineStrokeWidth?: number;
|
|
256
|
+
intervalLineColors?: [string, string];
|
|
257
|
+
intervalAreaColor?: string;
|
|
258
|
+
cardTemplate?: string | ((_d: any) => React.ReactNode);
|
|
259
|
+
cardBackgroundColor?: string;
|
|
260
|
+
legendMaxWidth?: string;
|
|
261
|
+
cardFilters?: {
|
|
262
|
+
column: string;
|
|
263
|
+
label?: string;
|
|
264
|
+
defaultValue?: string | number;
|
|
265
|
+
excludeValues?: (string | number)[];
|
|
266
|
+
width?: string;
|
|
267
|
+
}[];
|
|
268
|
+
cardSortingOptions?: {
|
|
269
|
+
defaultValue?: string;
|
|
270
|
+
options: {
|
|
271
|
+
value: string;
|
|
272
|
+
label: string;
|
|
273
|
+
type: 'asc' | 'desc';
|
|
274
|
+
}[];
|
|
275
|
+
width?: string;
|
|
276
|
+
};
|
|
277
|
+
cardSearchColumns?: string[];
|
|
278
|
+
cardMinWidth?: number;
|
|
279
|
+
textBackground?: boolean;
|
|
280
|
+
headingFontSize?: string;
|
|
281
|
+
centerAlign?: boolean;
|
|
282
|
+
verticalAlign?: 'center' | 'top' | 'bottom';
|
|
283
|
+
resetSelectionOnDoubleClick?: boolean;
|
|
284
|
+
intervalAreaOpacity?: number;
|
|
285
|
+
detailsOnClick?: string | ((_d: any) => React.ReactNode);
|
|
286
|
+
valueColor?: string;
|
|
287
|
+
labelColor?: string;
|
|
288
|
+
noOfYTicks?: number;
|
|
289
|
+
noOfTicks?: number;
|
|
290
|
+
minDate?: string | number;
|
|
291
|
+
maxDate?: string | number;
|
|
292
|
+
colorLegendColors?: string[];
|
|
293
|
+
colorLegendDomain?: string[];
|
|
294
|
+
barAxisTitle?: string;
|
|
295
|
+
barSuffix?: string;
|
|
296
|
+
barPrefix?: string;
|
|
297
|
+
lineSuffix?: string;
|
|
298
|
+
linePrefix?: string;
|
|
299
|
+
xSuffix?: string;
|
|
300
|
+
xPrefix?: string;
|
|
301
|
+
ySuffix?: string;
|
|
302
|
+
yPrefix?: string;
|
|
303
|
+
lineSuffixes?: [string, string];
|
|
304
|
+
linePrefixes?: [string, string];
|
|
305
|
+
allowDataDownloadOnDetail?: string | boolean;
|
|
306
|
+
noOfItemsInAPage?: number;
|
|
307
|
+
curveType?: CurveTypes;
|
|
308
|
+
styles?: StyleObject;
|
|
309
|
+
classNames?: ClassNameObject;
|
|
310
|
+
mapProjection?: MapProjectionTypes;
|
|
311
|
+
filterNA?: boolean;
|
|
312
|
+
fillShape?: boolean;
|
|
313
|
+
colorScaleMaxWidth?: string;
|
|
314
|
+
axisLabels?: (string | number)[];
|
|
315
|
+
minWidth?: string;
|
|
316
|
+
zoomInteraction?: ZoomInteractionTypes;
|
|
317
|
+
layout?: 'primary' | 'secondary';
|
|
318
|
+
qualitativeRangeColors?: string[];
|
|
319
|
+
targetStyle?: 'background' | 'line';
|
|
320
|
+
targetColor?: 'string';
|
|
321
|
+
measureBarWidthFactor?: number;
|
|
322
|
+
mapLegend?: string | React.ReactNode | MapLegendDataType[];
|
|
323
|
+
dimmedOpacity?: number;
|
|
324
|
+
precision?: number;
|
|
325
|
+
customLayers?: CustomLayerDataType[];
|
|
326
|
+
dashedLines?: (string | number)[];
|
|
327
|
+
dashSettings?: string[];
|
|
328
|
+
labelsToBeHidden?: (string | number)[];
|
|
329
|
+
autoRotate?: boolean;
|
|
330
|
+
enableZoom?: boolean;
|
|
331
|
+
globeMaterial?: MaterialDataType;
|
|
332
|
+
categorical?: boolean;
|
|
333
|
+
atmosphereColor?: string;
|
|
334
|
+
lineAxisTitle?: string;
|
|
335
|
+
timeline?: TimelineDataType;
|
|
336
|
+
naLabel?: string;
|
|
337
|
+
globeOffset?: [number, number];
|
|
338
|
+
polygonAltitude?: number;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare interface HighlightAreaSettingsDataType {
|
|
342
|
+
coordinates: [number | string | null, number | string | null];
|
|
343
|
+
style?: React.CSSProperties;
|
|
344
|
+
className?: string;
|
|
345
|
+
color?: string;
|
|
346
|
+
strokeWidth?: number;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare interface HighlightAreaSettingsForScatterPlotDataType {
|
|
350
|
+
coordinates: [number | null, number | null, number | null, number | null];
|
|
351
|
+
style?: React.CSSProperties;
|
|
352
|
+
className?: string;
|
|
353
|
+
color?: string;
|
|
354
|
+
strokeWidth?: number;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
|
|
358
|
+
|
|
359
|
+
declare interface MapLegendDataType {
|
|
360
|
+
mapStyleName: string;
|
|
361
|
+
legend: string | React.ReactNode;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare type MapProjectionTypes = 'mercator' | 'equalEarth' | 'naturalEarth' | 'orthographic' | 'albersUSA';
|
|
365
|
+
|
|
366
|
+
declare interface MaterialDataType {
|
|
367
|
+
color: string;
|
|
368
|
+
opacity: number;
|
|
369
|
+
transparent: boolean;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare interface Props {
|
|
373
|
+
graphSettings?: GraphSettingsDataType;
|
|
374
|
+
graphType: GeoHubGraphType;
|
|
375
|
+
debugMode?: boolean;
|
|
376
|
+
uiMode?: 'light' | 'normal';
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
declare interface ReferenceDataType {
|
|
380
|
+
value: number | null;
|
|
381
|
+
text: string;
|
|
382
|
+
color?: string;
|
|
383
|
+
styles?: {
|
|
384
|
+
line?: React.CSSProperties;
|
|
385
|
+
text?: React.CSSProperties;
|
|
386
|
+
};
|
|
387
|
+
classNames?: {
|
|
388
|
+
line?: string;
|
|
389
|
+
text?: string;
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare type ScaleDataType = 'categorical' | 'linear' | 'threshold';
|
|
394
|
+
|
|
395
|
+
export declare function SingleGraphDashboardGeoHubMaps(props: Props): JSX.Element;
|
|
396
|
+
|
|
397
|
+
declare interface SourcesDataType {
|
|
398
|
+
source: string;
|
|
399
|
+
link?: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare interface StyleObject {
|
|
403
|
+
title?: React.CSSProperties;
|
|
404
|
+
footnote?: React.CSSProperties;
|
|
405
|
+
source?: React.CSSProperties;
|
|
406
|
+
description?: React.CSSProperties;
|
|
407
|
+
graphContainer?: React.CSSProperties;
|
|
408
|
+
tooltip?: React.CSSProperties;
|
|
409
|
+
xAxis?: AxesStyleObject;
|
|
410
|
+
yAxis?: AxesStyleObject;
|
|
411
|
+
graphObjectValues?: React.CSSProperties;
|
|
412
|
+
dataConnectors?: React.CSSProperties;
|
|
413
|
+
mouseOverLine?: React.CSSProperties;
|
|
414
|
+
regLine?: React.CSSProperties;
|
|
415
|
+
dataCards?: React.CSSProperties;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
declare interface TimelineDataType {
|
|
419
|
+
autoplay: boolean;
|
|
420
|
+
enabled: boolean;
|
|
421
|
+
showOnlyActiveDate: boolean;
|
|
422
|
+
speed?: number;
|
|
423
|
+
dateFormat?: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare type ZoomInteractionTypes = 'scroll' | 'ctrlScroll' | 'button' | 'noZoom';
|
|
427
|
+
|
|
428
|
+
export { }
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { j as a, m as p } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
+
import { useRef as h } from "react";
|
|
3
|
+
import { u as d } from "./Typography-Ctgfl1J5.js";
|
|
4
|
+
import { GeoHubCompareMaps as c } from "./GeoHubCompareMaps.js";
|
|
5
|
+
import { GeoHubMap as m } from "./GeoHubMap.js";
|
|
6
|
+
import { GeoHubMapWithLayerSelection as u } from "./GeoHubMapWithLayerSelection.js";
|
|
7
|
+
import { GraphHeader as b } from "./GraphHeader.js";
|
|
8
|
+
function f(t) {
|
|
9
|
+
const { settings: e, graph: r, debugMode: o } = t;
|
|
10
|
+
o && (console.log(`Graph: ${r}`), console.log("Settings:", e));
|
|
11
|
+
const i = {
|
|
12
|
+
geoHubCompareMap: c,
|
|
13
|
+
geoHubMap: m,
|
|
14
|
+
geoHubMapWithLayerSelection: u
|
|
15
|
+
}, l = (n) => {
|
|
16
|
+
switch (n) {
|
|
17
|
+
case "geoHubCompareMap":
|
|
18
|
+
return {
|
|
19
|
+
theme: e?.theme,
|
|
20
|
+
graphTitle: e?.graphTitle,
|
|
21
|
+
sources: e?.sources,
|
|
22
|
+
graphDescription: e?.graphDescription,
|
|
23
|
+
footNote: e?.footNote,
|
|
24
|
+
backgroundColor: e?.backgroundColor,
|
|
25
|
+
padding: e?.padding,
|
|
26
|
+
width: e?.width,
|
|
27
|
+
height: e?.height,
|
|
28
|
+
relativeHeight: e?.relativeHeight,
|
|
29
|
+
graphID: e?.graphID,
|
|
30
|
+
mapStyles: e?.mapStyles,
|
|
31
|
+
center: e?.center,
|
|
32
|
+
zoomLevel: e?.zoomLevel,
|
|
33
|
+
language: e?.language,
|
|
34
|
+
minHeight: e?.minHeight,
|
|
35
|
+
ariaLabel: e?.ariaLabel,
|
|
36
|
+
styles: e?.styles,
|
|
37
|
+
classNames: e?.classNames,
|
|
38
|
+
mapLegend: e?.mapLegend
|
|
39
|
+
};
|
|
40
|
+
case "geoHubMap":
|
|
41
|
+
return {
|
|
42
|
+
theme: e?.theme,
|
|
43
|
+
mapStyle: e?.mapStyle,
|
|
44
|
+
center: e?.center,
|
|
45
|
+
zoomLevel: e?.zoomLevel,
|
|
46
|
+
graphTitle: e?.graphTitle,
|
|
47
|
+
sources: e?.sources,
|
|
48
|
+
graphDescription: e?.graphDescription,
|
|
49
|
+
footNote: e?.footNote,
|
|
50
|
+
backgroundColor: e?.backgroundColor,
|
|
51
|
+
padding: e?.padding,
|
|
52
|
+
width: e?.width,
|
|
53
|
+
height: e?.height,
|
|
54
|
+
relativeHeight: e?.relativeHeight,
|
|
55
|
+
graphID: e?.graphID,
|
|
56
|
+
language: e?.language,
|
|
57
|
+
minHeight: e?.minHeight,
|
|
58
|
+
includeLayers: e?.includeLayers,
|
|
59
|
+
excludeLayers: e?.excludeLayers,
|
|
60
|
+
ariaLabel: e?.ariaLabel,
|
|
61
|
+
uiMode: e?.uiMode,
|
|
62
|
+
styles: e?.styles,
|
|
63
|
+
classNames: e?.classNames,
|
|
64
|
+
mapLegend: e?.mapLegend
|
|
65
|
+
};
|
|
66
|
+
case "geoHubMapWithLayerSelection":
|
|
67
|
+
return {
|
|
68
|
+
theme: e?.theme,
|
|
69
|
+
mapStyle: e?.mapStyle,
|
|
70
|
+
center: e?.center,
|
|
71
|
+
zoomLevel: e?.zoomLevel,
|
|
72
|
+
graphTitle: e?.graphTitle,
|
|
73
|
+
sources: e?.sources,
|
|
74
|
+
graphDescription: e?.graphDescription,
|
|
75
|
+
footNote: e?.footNote,
|
|
76
|
+
backgroundColor: e?.backgroundColor,
|
|
77
|
+
padding: e?.padding,
|
|
78
|
+
width: e?.width,
|
|
79
|
+
height: e?.height,
|
|
80
|
+
relativeHeight: e?.relativeHeight,
|
|
81
|
+
graphID: e?.graphID,
|
|
82
|
+
language: e?.language,
|
|
83
|
+
minHeight: e?.minHeight,
|
|
84
|
+
layerSelection: e?.layerSelection,
|
|
85
|
+
excludeLayers: e?.excludeLayers,
|
|
86
|
+
ariaLabel: e?.ariaLabel,
|
|
87
|
+
uiMode: e?.uiMode,
|
|
88
|
+
mapLegend: e?.mapLegend
|
|
89
|
+
};
|
|
90
|
+
default:
|
|
91
|
+
return {};
|
|
92
|
+
}
|
|
93
|
+
}, s = i[r], g = l(r);
|
|
94
|
+
return /* @__PURE__ */ a.jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: `grow my-0 mx-auto flex flex-col h-inherit ${e?.width ? "w-fit" : "w-full"} justify-center ${e?.theme || "light"}`,
|
|
98
|
+
style: { minHeight: "inherit" },
|
|
99
|
+
children: s ? /* @__PURE__ */ a.jsx(s, { ...g }) : /* @__PURE__ */ a.jsx(
|
|
100
|
+
d,
|
|
101
|
+
{
|
|
102
|
+
size: "sm",
|
|
103
|
+
marginBottom: "none",
|
|
104
|
+
className: "p-2 text-center text-accent-dark-red dark:text-accent-red",
|
|
105
|
+
children: `Invalid chart type: ${r}`
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function D(t) {
|
|
112
|
+
const { graphSettings: e, graphType: r, debugMode: o, uiMode: i = "normal" } = t, l = h(null);
|
|
113
|
+
return /* @__PURE__ */ a.jsx(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
className: `${e?.theme || "light"} flex ${e?.width ? "w-fit grow-0" : "w-full grow"}${e?.height ? "" : " h-full"}`,
|
|
117
|
+
dir: e?.language === "he" || e?.language === "ar" ? "rtl" : void 0,
|
|
118
|
+
children: /* @__PURE__ */ a.jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: p(
|
|
122
|
+
`${e?.backgroundColor ? e?.backgroundColor === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${e?.language || "en"}`,
|
|
123
|
+
e?.classNames?.graphContainer
|
|
124
|
+
),
|
|
125
|
+
style: {
|
|
126
|
+
...e?.styles?.graphContainer || {},
|
|
127
|
+
...e?.backgroundColor && e?.backgroundColor !== !0 ? { backgroundColor: e?.backgroundColor } : {}
|
|
128
|
+
},
|
|
129
|
+
id: e?.graphID,
|
|
130
|
+
ref: l,
|
|
131
|
+
children: /* @__PURE__ */ a.jsx(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
style: {
|
|
135
|
+
padding: e?.backgroundColor ? e?.padding || "1rem" : e?.padding || 0,
|
|
136
|
+
flexGrow: 1,
|
|
137
|
+
display: "flex"
|
|
138
|
+
},
|
|
139
|
+
children: /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
140
|
+
/* @__PURE__ */ a.jsx(
|
|
141
|
+
b,
|
|
142
|
+
{
|
|
143
|
+
styles: {
|
|
144
|
+
title: e?.styles?.title,
|
|
145
|
+
description: e?.styles?.description
|
|
146
|
+
},
|
|
147
|
+
classNames: {
|
|
148
|
+
title: e?.classNames?.title,
|
|
149
|
+
description: e?.classNames?.description
|
|
150
|
+
},
|
|
151
|
+
graphTitle: e?.graphTitle,
|
|
152
|
+
graphDescription: e?.graphDescription,
|
|
153
|
+
width: e?.width
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ a.jsx(
|
|
157
|
+
f,
|
|
158
|
+
{
|
|
159
|
+
graph: r,
|
|
160
|
+
debugMode: o,
|
|
161
|
+
settings: {
|
|
162
|
+
...e || {},
|
|
163
|
+
graphTitle: void 0,
|
|
164
|
+
graphDescription: void 0,
|
|
165
|
+
graphDownload: !1,
|
|
166
|
+
dataDownload: !1,
|
|
167
|
+
backgroundColor: void 0,
|
|
168
|
+
padding: "0",
|
|
169
|
+
uiMode: i,
|
|
170
|
+
theme: e?.theme
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] })
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
D as SingleGraphDashboardGeoHubMaps
|
|
184
|
+
};
|
|
185
|
+
//# sourceMappingURL=SingleGraphDashboardGeoHubMaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleGraphDashboardGeoHubMaps.js","sources":["../src/Components/Dashboard/PerformanceIntensive/GeoHubMapsEl.tsx","../src/Components/Dashboard/PerformanceIntensive/SingleGraphDashboardGeoHubMaps.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { GeoHubCompareMaps } from '../../Graphs/Maps/GeoHubMaps/CompareMaps';\r\nimport { GeoHubMap } from '../../Graphs/Maps/GeoHubMaps/SimpleMap';\r\nimport { GeoHubMapWithLayerSelection } from '../../Graphs/Maps/GeoHubMaps/MapWithLayerSelection';\r\n\r\nimport { GraphSettingsDataType, GeoHubGraphType } from '@/Types';\r\n\r\ninterface Props {\r\n graph: GeoHubGraphType;\r\n settings?: GraphSettingsDataType;\r\n debugMode?: boolean;\r\n}\r\n\r\nfunction GeoHubMapsEl(props: Props) {\r\n const { settings, graph, debugMode } = props;\r\n if (debugMode) {\r\n // eslint-disable-next-line no-console\r\n console.log(`Graph: ${graph}`);\r\n // eslint-disable-next-line no-console\r\n console.log('Settings:', settings);\r\n }\r\n const graphComponents: Record<GeoHubGraphType, React.ElementType | null> = {\r\n geoHubCompareMap: GeoHubCompareMaps,\r\n geoHubMap: GeoHubMap,\r\n geoHubMapWithLayerSelection: GeoHubMapWithLayerSelection,\r\n };\r\n const getGraphProps = (graphType: GeoHubGraphType) => {\r\n switch (graphType) {\r\n case 'geoHubCompareMap':\r\n return {\r\n theme: settings?.theme,\r\n graphTitle: settings?.graphTitle,\r\n sources: settings?.sources,\r\n graphDescription: settings?.graphDescription,\r\n footNote: settings?.footNote,\r\n backgroundColor: settings?.backgroundColor,\r\n padding: settings?.padding,\r\n width: settings?.width,\r\n height: settings?.height,\r\n relativeHeight: settings?.relativeHeight,\r\n graphID: settings?.graphID,\r\n mapStyles: settings?.mapStyles as [string, string],\r\n center: settings?.center,\r\n zoomLevel: settings?.zoomLevel,\r\n language: settings?.language,\r\n minHeight: settings?.minHeight,\r\n ariaLabel: settings?.ariaLabel,\r\n styles: settings?.styles,\r\n classNames: settings?.classNames,\r\n mapLegend: settings?.mapLegend,\r\n };\r\n case 'geoHubMap':\r\n return {\r\n theme: settings?.theme,\r\n mapStyle: settings?.mapStyle,\r\n center: settings?.center,\r\n zoomLevel: settings?.zoomLevel,\r\n graphTitle: settings?.graphTitle,\r\n sources: settings?.sources,\r\n graphDescription: settings?.graphDescription,\r\n footNote: settings?.footNote,\r\n backgroundColor: settings?.backgroundColor,\r\n padding: settings?.padding,\r\n width: settings?.width,\r\n height: settings?.height,\r\n relativeHeight: settings?.relativeHeight,\r\n graphID: settings?.graphID,\r\n language: settings?.language,\r\n minHeight: settings?.minHeight,\r\n includeLayers: settings?.includeLayers,\r\n excludeLayers: settings?.excludeLayers,\r\n ariaLabel: settings?.ariaLabel,\r\n uiMode: settings?.uiMode,\r\n styles: settings?.styles,\r\n classNames: settings?.classNames,\r\n mapLegend: settings?.mapLegend,\r\n };\r\n case 'geoHubMapWithLayerSelection':\r\n return {\r\n theme: settings?.theme,\r\n mapStyle: settings?.mapStyle,\r\n center: settings?.center,\r\n zoomLevel: settings?.zoomLevel,\r\n graphTitle: settings?.graphTitle,\r\n sources: settings?.sources,\r\n graphDescription: settings?.graphDescription,\r\n footNote: settings?.footNote,\r\n backgroundColor: settings?.backgroundColor,\r\n padding: settings?.padding,\r\n width: settings?.width,\r\n height: settings?.height,\r\n relativeHeight: settings?.relativeHeight,\r\n graphID: settings?.graphID,\r\n language: settings?.language,\r\n minHeight: settings?.minHeight,\r\n layerSelection: settings?.layerSelection,\r\n excludeLayers: settings?.excludeLayers,\r\n ariaLabel: settings?.ariaLabel,\r\n uiMode: settings?.uiMode,\r\n mapLegend: settings?.mapLegend,\r\n };\r\n default:\r\n return {};\r\n }\r\n };\r\n const GraphComponent = graphComponents[graph];\r\n const graphProps = getGraphProps(graph);\r\n return (\r\n <div\r\n className={`grow my-0 mx-auto flex flex-col h-inherit ${settings?.width ? 'w-fit' : 'w-full'} justify-center ${settings?.theme || 'light'}`}\r\n style={{ minHeight: 'inherit' }}\r\n >\r\n {GraphComponent ? (\r\n <GraphComponent {...graphProps} />\r\n ) : (\r\n <P\r\n size='sm'\r\n marginBottom='none'\r\n className='p-2 text-center text-accent-dark-red dark:text-accent-red'\r\n >\r\n {`Invalid chart type: ${graph}`}\r\n </P>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nexport default GeoHubMapsEl;\r\n","import { useRef } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport GeoHubMapsEl from './GeoHubMapsEl';\r\n\r\nimport { GeoHubGraphType, GraphSettingsDataType } from '@/Types';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\n\r\ninterface Props {\r\n graphSettings?: GraphSettingsDataType;\r\n graphType: GeoHubGraphType;\r\n debugMode?: boolean;\r\n uiMode?: 'light' | 'normal';\r\n}\r\n\r\nexport function SingleGraphDashboardGeoHubMaps(props: Props) {\r\n const { graphSettings, graphType, debugMode, uiMode = 'normal' } = props;\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n return (\r\n <div\r\n className={`${graphSettings?.theme || 'light'} flex ${\r\n graphSettings?.width ? 'w-fit grow-0' : 'w-full grow'\r\n }${graphSettings?.height ? '' : ' h-full'}`}\r\n dir={graphSettings?.language === 'he' || graphSettings?.language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !graphSettings?.backgroundColor\r\n ? 'bg-transparent '\r\n : graphSettings?.backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${graphSettings?.language || 'en'}`,\r\n graphSettings?.classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(graphSettings?.styles?.graphContainer || {}),\r\n ...(graphSettings?.backgroundColor && graphSettings?.backgroundColor !== true\r\n ? { backgroundColor: graphSettings?.backgroundColor }\r\n : {}),\r\n }}\r\n id={graphSettings?.graphID}\r\n ref={graphParentDiv}\r\n >\r\n <div\r\n style={{\r\n padding: graphSettings?.backgroundColor\r\n ? graphSettings?.padding || '1rem'\r\n : graphSettings?.padding || 0,\r\n flexGrow: 1,\r\n display: 'flex',\r\n }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n <GraphHeader\r\n styles={{\r\n title: graphSettings?.styles?.title,\r\n description: graphSettings?.styles?.description,\r\n }}\r\n classNames={{\r\n title: graphSettings?.classNames?.title,\r\n description: graphSettings?.classNames?.description,\r\n }}\r\n graphTitle={graphSettings?.graphTitle}\r\n graphDescription={graphSettings?.graphDescription}\r\n width={graphSettings?.width}\r\n />\r\n <GeoHubMapsEl\r\n graph={graphType}\r\n debugMode={debugMode}\r\n settings={{\r\n ...(graphSettings || {}),\r\n graphTitle: undefined,\r\n graphDescription: undefined,\r\n graphDownload: false,\r\n dataDownload: false,\r\n backgroundColor: undefined,\r\n padding: '0',\r\n uiMode,\r\n theme: graphSettings?.theme,\r\n }}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["GeoHubMapsEl","props","settings","graph","debugMode","graphComponents","GeoHubCompareMaps","GeoHubMap","GeoHubMapWithLayerSelection","getGraphProps","graphType","GraphComponent","graphProps","jsx","P","SingleGraphDashboardGeoHubMaps","graphSettings","uiMode","graphParentDiv","useRef","cn","jsxs","GraphHeader"],"mappings":";;;;;;;AAcA,SAASA,EAAaC,GAAc;AAClC,QAAM,EAAE,UAAAC,GAAU,OAAAC,GAAO,WAAAC,EAAA,IAAcH;AACvC,EAAIG,MAEF,QAAQ,IAAI,UAAUD,CAAK,EAAE,GAE7B,QAAQ,IAAI,aAAaD,CAAQ;AAEnC,QAAMG,IAAqE;AAAA,IACzE,kBAAkBC;AAAA,IAClB,WAAWC;AAAA,IACX,6BAA6BC;AAAA,EAAA,GAEzBC,IAAgB,CAACC,MAA+B;AACpD,YAAQA,GAAA;AAAA,MACN,KAAK;AACH,eAAO;AAAA,UACL,OAAOR,GAAU;AAAA,UACjB,YAAYA,GAAU;AAAA,UACtB,SAASA,GAAU;AAAA,UACnB,kBAAkBA,GAAU;AAAA,UAC5B,UAAUA,GAAU;AAAA,UACpB,iBAAiBA,GAAU;AAAA,UAC3B,SAASA,GAAU;AAAA,UACnB,OAAOA,GAAU;AAAA,UACjB,QAAQA,GAAU;AAAA,UAClB,gBAAgBA,GAAU;AAAA,UAC1B,SAASA,GAAU;AAAA,UACnB,WAAWA,GAAU;AAAA,UACrB,QAAQA,GAAU;AAAA,UAClB,WAAWA,GAAU;AAAA,UACrB,UAAUA,GAAU;AAAA,UACpB,WAAWA,GAAU;AAAA,UACrB,WAAWA,GAAU;AAAA,UACrB,QAAQA,GAAU;AAAA,UAClB,YAAYA,GAAU;AAAA,UACtB,WAAWA,GAAU;AAAA,QAAA;AAAA,MAEzB,KAAK;AACH,eA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DoeWRVt.cjs"),n=require("react"),a=require("./Spinner-DA6Z5E4n.cjs"),u=require("./SingleGraphDashboardGeoHubMaps.cjs"),g=require("./fetchAndParseData-DmgQtB9n.cjs");function c(o){const{config:t}=o,[e,s]=n.useState(void 0);return n.useEffect(()=>{typeof t=="string"?g.fetchAndParseJSON(t).then(i=>{s(i)}):s(t)},[t]),e?r.jsxRuntimeExports.jsx(u.SingleGraphDashboardGeoHubMaps,{graphSettings:e.graphSettings,graphType:e.graphType,debugMode:e.debugMode,uiMode:e.uiMode}):r.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:r.jsxRuntimeExports.jsx(a.y,{})})}exports.SingleGraphDashboardGeoHubMapsFromConfig=c;
|
|
2
|
+
//# sourceMappingURL=SingleGraphDashboardGeoHubMapsFromConfig.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleGraphDashboardGeoHubMapsFromConfig.cjs","sources":["../src/Components/Dashboard/PerformanceIntensive/SingleGraphDashboardGeoHubMapsFromConfig.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { SingleGraphDashboardGeoHubMaps } from './SingleGraphDashboardGeoHubMaps';\r\n\r\nimport { GeoHubGraphType, GraphSettingsDataType } from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\n\r\ninterface ConfigObject {\r\n graphSettings?: GraphSettingsDataType;\r\n graphType: GeoHubGraphType;\r\n debugMode?: boolean;\r\n uiMode?: 'light' | 'normal';\r\n}\r\n\r\ninterface Props {\r\n config: string | ConfigObject;\r\n}\r\n\r\nexport function SingleGraphDashboardGeoHubMapsFromConfig(props: Props) {\r\n const { config } = props;\r\n const [configSettings, setConfigSettings] = useState<ConfigObject | undefined>(undefined);\r\n\r\n useEffect(() => {\r\n if (typeof config === 'string') {\r\n const fetchData = fetchAndParseJSON(config);\r\n fetchData.then(d => {\r\n setConfigSettings(d);\r\n });\r\n } else {\r\n setConfigSettings(config);\r\n }\r\n }, [config]);\r\n if (!configSettings)\r\n return (\r\n <div className='w-full flex justify-center p-4'>\r\n <Spinner />\r\n </div>\r\n );\r\n return (\r\n <SingleGraphDashboardGeoHubMaps\r\n graphSettings={configSettings.graphSettings}\r\n graphType={configSettings.graphType}\r\n debugMode={configSettings.debugMode}\r\n uiMode={configSettings.uiMode}\r\n />\r\n );\r\n}\r\n"],"names":["SingleGraphDashboardGeoHubMapsFromConfig","props","config","configSettings","setConfigSettings","useState","useEffect","fetchAndParseJSON","d","jsx","SingleGraphDashboardGeoHubMaps","Spinner"],"mappings":"wRAmBO,SAASA,EAAyCC,EAAc,CACrE,KAAM,CAAE,OAAAC,GAAWD,EACb,CAACE,EAAgBC,CAAiB,EAAIC,EAAAA,SAAmC,MAAS,EAYxF,OAVAC,EAAAA,UAAU,IAAM,CACV,OAAOJ,GAAW,SACFK,EAAAA,kBAAkBL,CAAM,EAChC,KAAKM,GAAK,CAClBJ,EAAkBI,CAAC,CACrB,CAAC,EAEDJ,EAAkBF,CAAM,CAE5B,EAAG,CAACA,CAAM,CAAC,EACNC,EAOHM,EAAAA,kBAAAA,IAACC,EAAAA,+BAAA,CACC,cAAeP,EAAe,cAC9B,UAAWA,EAAe,UAC1B,UAAWA,EAAe,UAC1B,OAAQA,EAAe,MAAA,CAAA,0BATtB,MAAA,CAAI,UAAU,iCACb,SAAAM,wBAACE,EAAAA,IAAQ,EACX,CAUN"}
|