@redus/georedus-ui 0.1.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/CHANGELOG.md +19 -0
- package/README.md +1 -0
- package/dist/DevControls/importViewSpecsFromCsv/index.d.ts +6 -0
- package/dist/DevWebWorker/WorkerDemo.d.ts +2 -0
- package/dist/DevWebWorker/math.worker.d.ts +1 -0
- package/dist/DialogSystem/index.d.ts +4 -0
- package/dist/GeoReDUS/GeoReDUS.d.ts +2 -0
- package/dist/GeoReDUS/index.d.ts +1 -0
- package/dist/GeoReDUS/util.d.ts +6 -0
- package/dist/GeoReDUS/viewConfReducer.d.ts +25 -0
- package/dist/GeoReDUSLogo/GeoReDUSLogo.d.ts +1 -0
- package/dist/GeoReDUSLogo/GeoReDUSLogoSymbol.d.ts +1 -0
- package/dist/GeoReDUSLogo/GeoReDUSLogoText.d.ts +1 -0
- package/dist/GeoReDUSLogo/index.d.ts +3 -0
- package/dist/GeoReDUSWorker/GeoReDUSWorker.d.ts +1 -0
- package/dist/GeoReDUSWorker/GeoReDUSWorker.worker.d.ts +1 -0
- package/dist/GeoReDUSWorker/index.d.ts +1 -0
- package/dist/GeoReDUSWorker/methods/dissolveAreasPreservingIsolated.d.ts +1 -0
- package/dist/InputSystem/Inputs/GeoFile/GeoFile.d.ts +1 -0
- package/dist/InputSystem/Inputs/GeoFile/setupGdal.d.ts +5 -0
- package/dist/InputSystem/index.d.ts +1 -0
- package/dist/LeftPanel/LeftPanel.d.ts +10 -0
- package/dist/LeftPanel/SharePanel.d.ts +5 -0
- package/dist/LeftPanel/index.d.ts +1 -0
- package/dist/Markdown/index.d.ts +1 -0
- package/dist/ViewControl/CollapsibleContent.d.ts +2 -0
- package/dist/ViewControl/ViewConfTabs.d.ts +6 -0
- package/dist/ViewControl/ViewControl.d.ts +11 -0
- package/dist/ViewControl/index.d.ts +1 -0
- package/dist/ViewLayoutPopover/ViewLayoutControl.d.ts +5 -0
- package/dist/ViewLayoutPopover/ViewLayoutPopover.d.ts +6 -0
- package/dist/ViewLayoutPopover/index.d.ts +1 -0
- package/dist/ViewMenu/ViewMenu.d.ts +9 -0
- package/dist/ViewMenu/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +8314 -0
- package/dist/viewSpecs/constants.d.ts +1 -0
- package/dist/viewSpecs/index.d.ts +3 -0
- package/dist/viewSpecs/parseViewSpec.d.ts +1 -0
- package/dist/viewSpecs/presets/cem_censo_2010_2022/index.d.ts +285 -0
- package/dist/viewSpecs/presets/cem_escolas_2022/boolean_categorical.d.ts +1 -0
- package/dist/viewSpecs/presets/cem_escolas_2022/categorical.d.ts +11 -0
- package/dist/viewSpecs/presets/cem_escolas_2022/index.d.ts +1 -0
- package/dist/viewSpecs/presets/cem_escolas_2022/numerical_choropleth.d.ts +12 -0
- package/dist/viewSpecs/presets/cem_escolas_2022/numerical_size.d.ts +9 -0
- package/dist/viewSpecs/presets/cem_saude_2024/boolean_categorical.d.ts +1 -0
- package/dist/viewSpecs/presets/cem_saude_2024/categorical.d.ts +12 -0
- package/dist/viewSpecs/presets/cem_saude_2024/index.d.ts +1 -0
- package/dist/viewSpecs/presets/cem_saude_2024/numerical_choropleth.d.ts +10 -0
- package/dist/viewSpecs/presets/cem_saude_2024/numerical_size.d.ts +9 -0
- package/dist/viewSpecs/presets/index.d.ts +3 -0
- package/dist/viewSpecs/resolveView/customExpr.d.ts +12 -0
- package/dist/viewSpecs/resolveView/index.d.ts +1 -0
- package/dist/viewSpecs/resolveView/resolveExpr.d.ts +10 -0
- package/dist/viewSpecs/resolveView/resolveView.d.ts +12 -0
- package/dist/viewSpecs/resolveViewSpecs.d.ts +10 -0
- package/dist/viewSpecs/types.d.ts +41 -0
- package/dist/viewSpecs/util/BASE_MAP_LAYERS.d.ts +394 -0
- package/dist/viewSpecs/util/colorSchemes.d.ts +14 -0
- package/dist/viewSpecs/util/downloadResolver.d.ts +9 -0
- package/dist/viewSpecs/util/filter.d.ts +4 -0
- package/dist/viewSpecs/util/index.d.ts +49 -0
- package/dist/viewSpecs/util/setupVariants.d.ts +5 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VIEW_TYPE_SURFACE_CHOROPLETH = "surface_choropleth";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseViewSpec(specInput: any, otherSpecInputs: any, context: any): any;
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
export function cem_censo_2010_2022(viewSpec: any, allViewSpecs: any, context: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
path: any;
|
|
4
|
+
label: any;
|
|
5
|
+
metodology: any;
|
|
6
|
+
sourceLabel: string;
|
|
7
|
+
viewType: string;
|
|
8
|
+
keywords: any[];
|
|
9
|
+
conf: {
|
|
10
|
+
data: {
|
|
11
|
+
variableId: {
|
|
12
|
+
label: string;
|
|
13
|
+
type: string;
|
|
14
|
+
options: {
|
|
15
|
+
path: any;
|
|
16
|
+
label: any;
|
|
17
|
+
value: any;
|
|
18
|
+
}[];
|
|
19
|
+
placeholder: string;
|
|
20
|
+
clearable: boolean;
|
|
21
|
+
defaultValue: any;
|
|
22
|
+
};
|
|
23
|
+
customSpatialAggregationUnit: {
|
|
24
|
+
type: string;
|
|
25
|
+
label: string;
|
|
26
|
+
helperText: string;
|
|
27
|
+
};
|
|
28
|
+
pointsDisplayMode: {
|
|
29
|
+
inactive: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
$$resolver: symbol;
|
|
32
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
33
|
+
dependencies: any;
|
|
34
|
+
value: (...args: any[]) => any;
|
|
35
|
+
defaultValue?: any;
|
|
36
|
+
context?: any;
|
|
37
|
+
};
|
|
38
|
+
clearable: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
label: string;
|
|
41
|
+
options: {
|
|
42
|
+
path: null;
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
46
|
+
defaultValue: string;
|
|
47
|
+
};
|
|
48
|
+
bufferSize: {
|
|
49
|
+
type: string;
|
|
50
|
+
label: {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
$$resolver: symbol;
|
|
53
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
54
|
+
dependencies: any;
|
|
55
|
+
value: (...args: any[]) => any;
|
|
56
|
+
defaultValue?: any;
|
|
57
|
+
context?: any;
|
|
58
|
+
};
|
|
59
|
+
helperText: string;
|
|
60
|
+
min: number;
|
|
61
|
+
max: number;
|
|
62
|
+
step: number;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
inactive: {
|
|
65
|
+
[x: string]: any;
|
|
66
|
+
$$resolver: symbol;
|
|
67
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
68
|
+
dependencies: any;
|
|
69
|
+
value: (...args: any[]) => any;
|
|
70
|
+
defaultValue?: any;
|
|
71
|
+
context?: any;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
dissolveOverlappingGeometries: {
|
|
75
|
+
inactive: {
|
|
76
|
+
[x: string]: any;
|
|
77
|
+
$$resolver: symbol;
|
|
78
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
79
|
+
dependencies: any;
|
|
80
|
+
value: (...args: any[]) => any;
|
|
81
|
+
defaultValue?: any;
|
|
82
|
+
context?: any;
|
|
83
|
+
};
|
|
84
|
+
type: string;
|
|
85
|
+
label: string;
|
|
86
|
+
description: string;
|
|
87
|
+
defaultValue: boolean;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
style: {
|
|
91
|
+
layerOpacity: {
|
|
92
|
+
type: string;
|
|
93
|
+
label: string;
|
|
94
|
+
size: string;
|
|
95
|
+
min: number;
|
|
96
|
+
max: number;
|
|
97
|
+
step: number;
|
|
98
|
+
defaultValue: number;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
metadata: (string | {
|
|
103
|
+
customGeoJSON: (string | (string | string[])[] | {
|
|
104
|
+
[x: string]: any;
|
|
105
|
+
$$resolver: symbol;
|
|
106
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
107
|
+
dependencies: any;
|
|
108
|
+
value: (...args: any[]) => any;
|
|
109
|
+
defaultValue?: any;
|
|
110
|
+
context?: any;
|
|
111
|
+
} | null)[];
|
|
112
|
+
} | (string | {
|
|
113
|
+
variableValues: (string | (string | (string | (string | {
|
|
114
|
+
variableId: string[];
|
|
115
|
+
municipioId: string[];
|
|
116
|
+
source_table_id: any[];
|
|
117
|
+
})[])[])[] | (string | {
|
|
118
|
+
href: any;
|
|
119
|
+
pathname: string;
|
|
120
|
+
method?: undefined;
|
|
121
|
+
headers?: undefined;
|
|
122
|
+
body?: undefined;
|
|
123
|
+
} | {
|
|
124
|
+
method: string;
|
|
125
|
+
headers: {
|
|
126
|
+
'Content-Type': string;
|
|
127
|
+
};
|
|
128
|
+
body: {
|
|
129
|
+
geometries: (string | string[])[];
|
|
130
|
+
view: string;
|
|
131
|
+
agg_column: string[];
|
|
132
|
+
agg_type: (string | (string | string[])[])[];
|
|
133
|
+
};
|
|
134
|
+
href?: undefined;
|
|
135
|
+
pathname?: undefined;
|
|
136
|
+
})[])[];
|
|
137
|
+
labels?: undefined;
|
|
138
|
+
measureUnits?: undefined;
|
|
139
|
+
customGeoJSON?: undefined;
|
|
140
|
+
colorScaleStops?: undefined;
|
|
141
|
+
} | {
|
|
142
|
+
labels: any;
|
|
143
|
+
measureUnits: any;
|
|
144
|
+
variableValues: string[];
|
|
145
|
+
customGeoJSON: string[];
|
|
146
|
+
colorScaleStops: any[];
|
|
147
|
+
})[])[];
|
|
148
|
+
sources: {
|
|
149
|
+
customGeoJSON_Points: (string | {
|
|
150
|
+
[x: string]: any;
|
|
151
|
+
$$resolver: symbol;
|
|
152
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
153
|
+
dependencies: any;
|
|
154
|
+
value: (...args: any[]) => any;
|
|
155
|
+
defaultValue?: any;
|
|
156
|
+
context?: any;
|
|
157
|
+
} | (string | string[])[][] | null)[];
|
|
158
|
+
customGeoJSON_LineStrings: (string | {
|
|
159
|
+
[x: string]: any;
|
|
160
|
+
$$resolver: symbol;
|
|
161
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
162
|
+
dependencies: any;
|
|
163
|
+
value: (...args: any[]) => any;
|
|
164
|
+
defaultValue?: any;
|
|
165
|
+
context?: any;
|
|
166
|
+
} | (string | string[])[][] | null)[];
|
|
167
|
+
customGeoJSON_Areas: (string | {
|
|
168
|
+
[x: string]: any;
|
|
169
|
+
$$resolver: symbol;
|
|
170
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
171
|
+
dependencies: any;
|
|
172
|
+
value: (...args: any[]) => any;
|
|
173
|
+
defaultValue?: any;
|
|
174
|
+
context?: any;
|
|
175
|
+
} | (string | string[])[][] | null)[];
|
|
176
|
+
planet: {
|
|
177
|
+
type: string;
|
|
178
|
+
tiles: string[];
|
|
179
|
+
};
|
|
180
|
+
global_municipio: {
|
|
181
|
+
type: string;
|
|
182
|
+
tiles: string[];
|
|
183
|
+
minzoom: number;
|
|
184
|
+
maxzoom: number;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
layers: {
|
|
188
|
+
customGeoJSON_Areas_fill: {
|
|
189
|
+
hidden: (string | string[])[];
|
|
190
|
+
source: string;
|
|
191
|
+
type: string;
|
|
192
|
+
legends: {
|
|
193
|
+
type: string;
|
|
194
|
+
title: (string | string[])[];
|
|
195
|
+
unit: (string | string[])[];
|
|
196
|
+
steps: (string | (string | (string | string[])[])[])[];
|
|
197
|
+
format: {
|
|
198
|
+
number: (string | (string | string[])[] | (string | {
|
|
199
|
+
style: string;
|
|
200
|
+
})[] | {}[])[];
|
|
201
|
+
below: string;
|
|
202
|
+
above: (string | (string | string[])[] | null)[];
|
|
203
|
+
};
|
|
204
|
+
}[];
|
|
205
|
+
tooltip: {
|
|
206
|
+
title: (string | (string | (string | (string | (string | string[])[])[])[])[])[];
|
|
207
|
+
entries: (string | (string | (string | (string | string[])[])[] | {
|
|
208
|
+
number: (string | (string | string[])[] | (string | {
|
|
209
|
+
style: string;
|
|
210
|
+
})[] | {}[])[];
|
|
211
|
+
})[])[][][];
|
|
212
|
+
};
|
|
213
|
+
paint: {
|
|
214
|
+
'fill-color': (string | (string | string[])[] | (string | (string | (string | number | (string | string[])[])[])[][])[])[];
|
|
215
|
+
'fill-opacity': string[];
|
|
216
|
+
'fill-outline-color': string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
customGeoJSON_Areas_line: {
|
|
220
|
+
hidden: (string | string[])[];
|
|
221
|
+
source: string;
|
|
222
|
+
type: string;
|
|
223
|
+
paint: {
|
|
224
|
+
'line-color': any;
|
|
225
|
+
'line-width': number;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
customGeoJSON_LineStrings_line: {
|
|
229
|
+
hidden: (string | string[])[];
|
|
230
|
+
source: string;
|
|
231
|
+
type: string;
|
|
232
|
+
paint: {
|
|
233
|
+
'line-color': any;
|
|
234
|
+
'line-width': number;
|
|
235
|
+
};
|
|
236
|
+
tooltip: {
|
|
237
|
+
title: (string | (string | (string | (string | (string | string[])[])[])[])[])[];
|
|
238
|
+
entries: (string | (string | string[])[])[];
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
customGeoJSON_Points_circle: {
|
|
242
|
+
hidden: (string | (string | (string | string[])[])[])[];
|
|
243
|
+
source: string;
|
|
244
|
+
type: string;
|
|
245
|
+
paint: {
|
|
246
|
+
'circle-opacity': number;
|
|
247
|
+
'circle-radius': number;
|
|
248
|
+
'circle-stroke-width': number;
|
|
249
|
+
'circle-stroke-color': string;
|
|
250
|
+
'circle-color': string;
|
|
251
|
+
};
|
|
252
|
+
tooltip: {
|
|
253
|
+
title: (string | (string | (string | (string | (string | string[])[])[])[])[])[];
|
|
254
|
+
entries: (string | (string | string[])[])[];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
customGeoJSON_Points_heatmap: {
|
|
258
|
+
hidden: (string | (string | (string | string[])[])[])[];
|
|
259
|
+
source: string;
|
|
260
|
+
type: string;
|
|
261
|
+
};
|
|
262
|
+
municipio: {
|
|
263
|
+
zIndex: number;
|
|
264
|
+
absoluteId: string;
|
|
265
|
+
absoluteSourceId: string;
|
|
266
|
+
'source-layer': string;
|
|
267
|
+
type: string;
|
|
268
|
+
filter: (string | string[])[];
|
|
269
|
+
paint: {
|
|
270
|
+
'line-color': string;
|
|
271
|
+
'line-width': number;
|
|
272
|
+
'line-opacity': number;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
download: {
|
|
277
|
+
[x: string]: any;
|
|
278
|
+
$$resolver: symbol;
|
|
279
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
280
|
+
dependencies: any;
|
|
281
|
+
value: (...args: any[]) => any;
|
|
282
|
+
defaultValue?: any;
|
|
283
|
+
context?: any;
|
|
284
|
+
};
|
|
285
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function boolean_categorical(base: any, config: any): any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function categorical(base: any, { collection_id, measure_unit, variable_id, indicator_label, categories, $legends, $tooltip, $layerFilter, $circleRadius, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
measure_unit: any;
|
|
4
|
+
variable_id: any;
|
|
5
|
+
indicator_label: any;
|
|
6
|
+
categories: any;
|
|
7
|
+
$legends: any;
|
|
8
|
+
$tooltip: any;
|
|
9
|
+
$layerFilter: any;
|
|
10
|
+
$circleRadius: any;
|
|
11
|
+
}): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function cem_escolas_2022(config: any, allViewSpecs: any, context: any): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function numerical_choropleth(base: any, { collection_id, variable_id, indicator_label, number_format, color_scheme, measure_unit, $circleRadius, $tooltip, $layerFilter, $legends, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
variable_id: any;
|
|
4
|
+
indicator_label: any;
|
|
5
|
+
number_format: any;
|
|
6
|
+
color_scheme?: string | undefined;
|
|
7
|
+
measure_unit: any;
|
|
8
|
+
$circleRadius: any;
|
|
9
|
+
$tooltip: any;
|
|
10
|
+
$layerFilter: any;
|
|
11
|
+
$legends: any;
|
|
12
|
+
}): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function numerical_size(base: any, { collection_id, variable_id, indicator_label, color_scheme, measure_unit, $tooltip, $layerFilter, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
variable_id: any;
|
|
4
|
+
indicator_label: any;
|
|
5
|
+
color_scheme?: string | undefined;
|
|
6
|
+
measure_unit: any;
|
|
7
|
+
$tooltip: any;
|
|
8
|
+
$layerFilter: any;
|
|
9
|
+
}): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function boolean_categorical(base: any, config: any): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function categorical(base: any, { collection_id, indicator_id, variable_id, indicator_label, categories, filter, $circleRadius, $tooltip, $legends, $layerFilter, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
indicator_id: any;
|
|
4
|
+
variable_id: any;
|
|
5
|
+
indicator_label: any;
|
|
6
|
+
categories: any;
|
|
7
|
+
filter: any;
|
|
8
|
+
$circleRadius: any;
|
|
9
|
+
$tooltip: any;
|
|
10
|
+
$legends: any;
|
|
11
|
+
$layerFilter: any;
|
|
12
|
+
}): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function cem_saude_2024(viewSpec: any, allViewSpecs: any, context: any): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function numerical_choropleth(base: any, { collection_id, indicator_id, indicator_label, color_scheme, measure_unit, $circleRadius, $tooltip, $legends, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
indicator_id: any;
|
|
4
|
+
indicator_label: any;
|
|
5
|
+
color_scheme?: string | undefined;
|
|
6
|
+
measure_unit: any;
|
|
7
|
+
$circleRadius: any;
|
|
8
|
+
$tooltip: any;
|
|
9
|
+
$legends: any;
|
|
10
|
+
}): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function numerical_size(base: any, { collection_id, variable_id, indicator_label, color_scheme, measure_unit, $tooltip, $layerFilter, }: {
|
|
2
|
+
collection_id: any;
|
|
3
|
+
variable_id: any;
|
|
4
|
+
indicator_label: any;
|
|
5
|
+
color_scheme?: string | undefined;
|
|
6
|
+
measure_unit: any;
|
|
7
|
+
$tooltip: any;
|
|
8
|
+
$layerFilter: any;
|
|
9
|
+
}): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExpressionFn } from '@orioro/resolve/dist/resolvers/expressions/types';
|
|
2
|
+
import { StringifyOptions } from 'query-string';
|
|
3
|
+
import { ScaleNaturalBreaksProps } from '@orioro/react-maplibre-util';
|
|
4
|
+
type SearchParams = Record<string, any>;
|
|
5
|
+
export declare const $naturalBreaks: ExpressionFn<[
|
|
6
|
+
number[],
|
|
7
|
+
opt?: Pick<ScaleNaturalBreaksProps, 'k' | 'scalesByK'>
|
|
8
|
+
]>;
|
|
9
|
+
export declare const $urlSearch: ExpressionFn<[
|
|
10
|
+
SearchParams | [SearchParams, StringifyOptions]
|
|
11
|
+
]>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resolveView";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const resolveExprAsync: {
|
|
2
|
+
<InputT_1 = any>(nodeInput: any, resolutionCtx: any, options?: import("@orioro/resolve").ResolveOptions | "inherit" | undefined, meta?: import("@orioro/resolve").ResolveMeta | undefined): Promise<unknown>;
|
|
3
|
+
partial: <InputT_2 = any>(nodeInput: any, resolutionCtx: any, options?: import("@orioro/resolve").ResolveOptions | "inherit" | undefined, meta?: import("@orioro/resolve").ResolveMeta | undefined) => Promise<unknown>;
|
|
4
|
+
strict: <InputT_2 = any>(nodeInput: any, resolutionCtx: any, options?: import("@orioro/resolve").ResolveOptions | "inherit" | undefined, meta?: import("@orioro/resolve").ResolveMeta | undefined) => Promise<unknown>;
|
|
5
|
+
}, resolveExpr: {
|
|
6
|
+
<ResultType = any>(nodeInput: any, resolutionCtx: any, options?: import("@orioro/resolve").ResolveOptions | "inherit", meta?: import("@orioro/resolve").ResolveMeta): ResultType;
|
|
7
|
+
strict<InputT = any>(nodeInput: any, resolutionCtx: any, options?: import("@orioro/resolve").ResolveOptions | "inherit" | undefined, meta?: import("@orioro/resolve").ResolveMeta | undefined): unknown;
|
|
8
|
+
partial: (...args: any[]) => any;
|
|
9
|
+
};
|
|
10
|
+
export { resolveExpr, resolveExprAsync };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResolvedViewConf, ViewContext, ViewSpec } from '../types';
|
|
2
|
+
export declare function resolveView(viewSpec: ViewSpec, viewConf: ResolvedViewConf, viewContext: ViewContext): Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
keywords: string | string[] | undefined;
|
|
5
|
+
metadata: unknown;
|
|
6
|
+
sources: unknown;
|
|
7
|
+
layers: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
legends: any;
|
|
11
|
+
download: unknown;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResolveViewSpecsContext, ViewSpec } from './types';
|
|
2
|
+
type ViewSource = string | File;
|
|
3
|
+
export declare function fetchViewSpecs(source: ViewSource | ViewSource[] | ViewSpecInput): any;
|
|
4
|
+
type ViewSpecInput = ViewSpec & {
|
|
5
|
+
collection_id?: string;
|
|
6
|
+
indicator_id?: string;
|
|
7
|
+
skip?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function resolveViewSpecs(viewSpecsInput: ViewSpecInput[], context: ResolveViewSpecsContext): any[];
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MapView, MapViewLayer, MapViewSource } from '@orioro/react-maplibre-util';
|
|
2
|
+
export type ExpressionOf<ResultT> = ResultT | [string, ...any[]];
|
|
3
|
+
export type ViewMetadata = Record<string, any>;
|
|
4
|
+
export type ViewConfSpec = {
|
|
5
|
+
data?: Record<string, Record<string, any>>;
|
|
6
|
+
style?: Record<string, Record<string, any>>;
|
|
7
|
+
};
|
|
8
|
+
export type ViewSpec = {
|
|
9
|
+
id: string;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
keywords?: string | string[];
|
|
12
|
+
metadata: ExpressionOf<ViewMetadata>;
|
|
13
|
+
sources: ExpressionOf<Record<string, MapViewSource>>;
|
|
14
|
+
layers: ExpressionOf<Record<string, MapViewLayer>>;
|
|
15
|
+
download?: ExpressionOf<({ dialogs: {} }: {
|
|
16
|
+
dialogs: {};
|
|
17
|
+
}) => Promise<void>>;
|
|
18
|
+
conf: ViewConfSpec;
|
|
19
|
+
};
|
|
20
|
+
export type ResolvedViewConf = {
|
|
21
|
+
data?: Record<string, any>;
|
|
22
|
+
style?: Record<string, any>;
|
|
23
|
+
};
|
|
24
|
+
type ResolvedLegend = Record<string, any>;
|
|
25
|
+
export type ResolvedView = MapView & {
|
|
26
|
+
metadata: ViewMetadata;
|
|
27
|
+
legends: ResolvedLegend[];
|
|
28
|
+
conf: ResolvedViewConf;
|
|
29
|
+
};
|
|
30
|
+
export type ViewContext = {
|
|
31
|
+
focus: {
|
|
32
|
+
type: 'municipio';
|
|
33
|
+
ids: string[];
|
|
34
|
+
} | null;
|
|
35
|
+
};
|
|
36
|
+
export type PresetFn<InputT extends Record<string, any> = Record<string, any>> = (input: InputT) => ViewSpec;
|
|
37
|
+
export type ResolveViewSpecsContext = {
|
|
38
|
+
METADATA_API_ENDPOINT: string;
|
|
39
|
+
VECTOR_TILE_SERVER_ENDPOINT: string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|