@devgateway/dvz-ui-react 1.9.6 → 1.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/chart/data/Line.js +1 -1
- package/dist/cjs/embeddable/common/MapTooltip.js +1 -1
- package/dist/cjs/embeddable/common/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/map/MapDataFrame.js +1 -1
- package/dist/cjs/embeddable/map/index.js +2 -2
- package/dist/cjs/embeddable/map/map.js +4 -4
- package/dist/cjs/embeddable/map/mapHelpers.js +1 -0
- package/dist/esm/embeddable/chart/colors/ManualColors.js +73 -41
- package/dist/esm/embeddable/chart/data/Line.js +132 -128
- package/dist/esm/embeddable/common/MapTooltip.js +26 -22
- package/dist/esm/embeddable/common/colors/ManualColors.js +66 -35
- package/dist/esm/embeddable/map/MapDataFrame.js +152 -18
- package/dist/esm/embeddable/map/index.js +209 -198
- package/dist/esm/embeddable/map/map.js +602 -918
- package/dist/esm/embeddable/map/mapHelpers.js +243 -0
- package/dist/types/embeddable/chart/colors/ManualColors.d.ts +2 -0
- package/dist/types/embeddable/common/colors/ManualColors.d.ts +2 -0
- package/dist/types/embeddable/map/map.d.ts +2 -1
- package/dist/types/embeddable/map/mapHelpers.d.ts +55 -0
- package/package.json +1 -1
|
@@ -1,31 +1,165 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const { data:
|
|
1
|
+
import T from "react";
|
|
2
|
+
const U = (x) => {
|
|
3
|
+
const { data: o, measures: M, customMeasureLabels: g, children: O, source: _, extraDimension: d, allDimensions: D } = x;
|
|
4
|
+
console.log("MapDataFrame props:", x);
|
|
5
|
+
const E = (_ || "").split("/").filter(Boolean), p = E.length > 0 ? E[0] : null, f = {
|
|
4
6
|
locationsData: [],
|
|
5
7
|
nationalData: {},
|
|
6
8
|
measureLabelMap: {}
|
|
7
9
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
o.metadata && o.metadata.measures && Array.isArray(o.metadata.measures), o.children && o.children[0] && o.children[0].children;
|
|
11
|
+
const h = o.metadata || {}, I = ["value", "count", "type", "children", "label", "measure"], F = D && D.length > 0 ? D : h.types || [], y = {};
|
|
12
|
+
F.forEach((e) => {
|
|
13
|
+
const n = e.category || e.type;
|
|
14
|
+
n && (y[n] = e.items || []);
|
|
10
15
|
});
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
const L = (e, n) => {
|
|
17
|
+
const a = y[e];
|
|
18
|
+
if (!a)
|
|
19
|
+
return null;
|
|
20
|
+
const r = n != null ? String(n) : n;
|
|
21
|
+
return a.find((t) => {
|
|
22
|
+
const l = t.value != null ? String(t.value) : t.value, i = t.id != null ? String(t.id) : t.id, s = t.code != null ? String(t.code) : t.code;
|
|
23
|
+
return l === r || i === r || s === r;
|
|
24
|
+
}) || null;
|
|
25
|
+
}, u = (e, n) => {
|
|
26
|
+
const a = L(e, n);
|
|
27
|
+
return a ? a.value ?? a.label ?? a.id ?? a.code ?? n : n;
|
|
28
|
+
}, K = (e = {}) => {
|
|
29
|
+
const n = {};
|
|
30
|
+
return Object.keys(e).forEach((a) => {
|
|
31
|
+
const r = e[a];
|
|
32
|
+
r != null && (Array.isArray(r) ? n[a] = r.map((t) => u(a, t)).join(" ,") : n[a] = u(a, r));
|
|
33
|
+
}), n;
|
|
34
|
+
}, N = (e) => {
|
|
35
|
+
const n = y[e] || [];
|
|
36
|
+
return n.length === 1 ? u(e, n[0].value ?? n[0].id ?? n[0].code) : null;
|
|
37
|
+
}, c = (e) => e != null && e !== "", S = (e) => {
|
|
38
|
+
if (e)
|
|
39
|
+
return c(e.value) ? e.value : c(e.id) ? e.id : e.code;
|
|
40
|
+
}, b = (e) => e == null ? "" : String(e).trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, ""), v = (e, n) => {
|
|
41
|
+
if (!e)
|
|
42
|
+
return;
|
|
43
|
+
const a = b(n), r = e[n];
|
|
44
|
+
if (r != null && r !== "")
|
|
45
|
+
return r;
|
|
46
|
+
const t = Object.keys(e);
|
|
47
|
+
for (let l = 0; l < t.length; l++) {
|
|
48
|
+
const i = t[l];
|
|
49
|
+
if (b(i) === a) {
|
|
50
|
+
const s = e[i];
|
|
51
|
+
if (s != null && s !== "")
|
|
52
|
+
return s;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, P = (e, n) => {
|
|
56
|
+
const a = [
|
|
57
|
+
p,
|
|
58
|
+
"country",
|
|
59
|
+
e.type
|
|
60
|
+
].filter(Boolean), r = [
|
|
61
|
+
v(n, "country"),
|
|
62
|
+
v(e, "country"),
|
|
63
|
+
p ? v(n, p) : void 0,
|
|
64
|
+
p ? v(e, p) : void 0,
|
|
65
|
+
e.label,
|
|
66
|
+
e.value
|
|
67
|
+
].filter((t) => c(t));
|
|
68
|
+
for (let t = 0; t < a.length; t++) {
|
|
69
|
+
const l = a[t], i = y[l] || [];
|
|
70
|
+
if (i.length)
|
|
71
|
+
for (let s = 0; s < r.length; s++) {
|
|
72
|
+
const z = r[s], G = b(z), B = i.findIndex((H) => {
|
|
73
|
+
const J = S(H);
|
|
74
|
+
return b(J) === G;
|
|
75
|
+
});
|
|
76
|
+
if (B >= 0)
|
|
77
|
+
return B;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return -1;
|
|
81
|
+
}, j = (e, n, a) => {
|
|
82
|
+
const r = P(n, a);
|
|
83
|
+
if (r < 0)
|
|
84
|
+
return;
|
|
85
|
+
const t = y[e] || [];
|
|
86
|
+
if (!t.length || r >= t.length)
|
|
87
|
+
return;
|
|
88
|
+
const l = S(t[r]);
|
|
89
|
+
if (c(l))
|
|
90
|
+
return u(e, l);
|
|
91
|
+
}, $ = (e, n, a) => {
|
|
92
|
+
const r = v(a, e);
|
|
93
|
+
if (c(r))
|
|
94
|
+
return r;
|
|
95
|
+
if (c(A[e]))
|
|
96
|
+
return A[e];
|
|
97
|
+
const t = v(n, e);
|
|
98
|
+
if (c(t))
|
|
99
|
+
return t;
|
|
100
|
+
const l = j(e, n, a);
|
|
101
|
+
if (c(l))
|
|
102
|
+
return l;
|
|
103
|
+
const i = N(e);
|
|
104
|
+
if (c(i))
|
|
105
|
+
return i;
|
|
106
|
+
const s = n.value;
|
|
107
|
+
return L(e, s) ? u(e, s) : "";
|
|
108
|
+
}, V = o.appliedFilters || {};
|
|
109
|
+
let R = null;
|
|
110
|
+
if (d) {
|
|
111
|
+
const e = V[d] ? V[d][0] : void 0;
|
|
112
|
+
R = u(d, e);
|
|
113
|
+
}
|
|
114
|
+
const A = K(V), q = (e) => {
|
|
115
|
+
const n = {};
|
|
116
|
+
return Object.keys(e).forEach((a) => {
|
|
117
|
+
I.includes(a) || (n[a] = e[a]);
|
|
118
|
+
}), e.type && e.value !== void 0 && (n[e.type] = u(e.type, e.value)), n;
|
|
119
|
+
}, C = (e) => {
|
|
120
|
+
let n = q(e);
|
|
121
|
+
return e.children && Array.isArray(e.children) && e.children.forEach((a) => {
|
|
122
|
+
n = { ...n, ...C(a) };
|
|
123
|
+
}), n;
|
|
124
|
+
}, w = (e, n) => {
|
|
125
|
+
if (!(!e.children || !Array.isArray(e.children)))
|
|
126
|
+
return e.children.map((a) => ({
|
|
15
127
|
...a,
|
|
16
128
|
label: a.value,
|
|
17
|
-
value: a[
|
|
18
|
-
|
|
129
|
+
value: a[n],
|
|
130
|
+
variables: C(a),
|
|
131
|
+
children: w(a, n)
|
|
132
|
+
}));
|
|
133
|
+
};
|
|
134
|
+
h.measures && h.measures.forEach((e) => {
|
|
135
|
+
g && g[e.value] && g[e.value].hasCustomLabel && g[e.value].customLabel ? f.measureLabelMap[e.value] = g[e.value].customLabel : f.measureLabelMap[e.value] = e.label;
|
|
136
|
+
});
|
|
137
|
+
const m = M.split(",");
|
|
138
|
+
return o && o.children && (o.children.forEach((e) => {
|
|
139
|
+
m.forEach((n) => {
|
|
140
|
+
const a = {
|
|
141
|
+
...C(e),
|
|
142
|
+
// Dynamic fields for both formats, including nested dimensions
|
|
143
|
+
...A
|
|
144
|
+
};
|
|
145
|
+
F.forEach((t) => {
|
|
146
|
+
const l = t.category || t.type;
|
|
147
|
+
l && (a[l] = $(l, e, a));
|
|
148
|
+
});
|
|
149
|
+
const r = {
|
|
150
|
+
...e,
|
|
151
|
+
label: e.value,
|
|
152
|
+
value: e[n],
|
|
153
|
+
measure: n,
|
|
154
|
+
variables: a
|
|
19
155
|
};
|
|
20
|
-
|
|
21
|
-
u.children.push({ ...n, label: n.value, value: n[r] });
|
|
22
|
-
})), l.locationsData.push(u);
|
|
156
|
+
r.variables.selectedDataFrameTooltipValue = e[n], d && (r.variables[d] = R), r.children = w(e, n), f.locationsData.push(r);
|
|
23
157
|
});
|
|
24
|
-
}),
|
|
25
|
-
...
|
|
26
|
-
types:
|
|
158
|
+
}), f.measures = m.length > 1 ? m : null, f.nationalData.value = o[M] || o[m[0]]), T.Children.map(O, (e) => T.cloneElement(e, { transformedData: {
|
|
159
|
+
...f,
|
|
160
|
+
types: h.types ? h.types : []
|
|
27
161
|
} }));
|
|
28
162
|
};
|
|
29
163
|
export {
|
|
30
|
-
|
|
164
|
+
U as default
|
|
31
165
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "react";
|
|
3
|
-
import { connect as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as He, useEffect as Ke } from "react";
|
|
3
|
+
import { connect as qe, useDispatch as Ye, useSelector as $e } from "react-redux";
|
|
4
|
+
import Qe from "../data/DataProvider.js";
|
|
5
|
+
import Xe from "../data/DataConsumer.js";
|
|
6
|
+
import { getCategories as _e } from "../reducers/data.js";
|
|
7
|
+
import ea from "./map.js";
|
|
8
|
+
import aa from "./MapDataFrame.js";
|
|
9
|
+
import ta from "./MapCSVDataFrame.js";
|
|
10
|
+
const oa = [
|
|
10
11
|
{ label: "KENYA", value: "KEN", center: [35.8166634, 0.1], scale: 2e3 },
|
|
11
12
|
{ label: "Nigeria", value: "NGA", center: [7.491302, 9.072264], scale: 2e3 },
|
|
12
13
|
{ label: "South Africa", value: "ZAF", center: [24.676997, -28.48322], scale: 2e3 },
|
|
@@ -16,212 +17,222 @@ const Ja = [
|
|
|
16
17
|
{ label: "Zambia", value: "ZMB", center: [26.459455, -14.668135], scale: 2e3 },
|
|
17
18
|
{ label: "Democratic Republic of the Congo", value: "DRC", center: [23.174338, -5.837475], scale: 1250 },
|
|
18
19
|
{ label: "World", value: "World", center: [0, 20.050043], scale: 150 }
|
|
19
|
-
],
|
|
20
|
-
var
|
|
20
|
+
], la = (n) => /* @__PURE__ */ i(ra, { ...n }), ra = (n) => {
|
|
21
|
+
var E;
|
|
21
22
|
const {
|
|
22
|
-
unique:
|
|
23
|
-
editing:
|
|
24
|
-
"data-filters":
|
|
25
|
-
"data-app":
|
|
23
|
+
unique: u,
|
|
24
|
+
editing: d,
|
|
25
|
+
"data-filters": P = "{}",
|
|
26
|
+
"data-app": o = "csv",
|
|
26
27
|
"data-csv": k = "",
|
|
27
|
-
"data-dimension1":
|
|
28
|
-
"data-dimension2":
|
|
29
|
-
"data-
|
|
30
|
-
"data-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"data-data-source-
|
|
34
|
-
"data-
|
|
35
|
-
"data-
|
|
36
|
-
"data-legend-
|
|
37
|
-
"data-
|
|
38
|
-
"data-
|
|
39
|
-
"data-
|
|
40
|
-
"data-
|
|
41
|
-
"data-
|
|
42
|
-
"data-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
"data-dimension1": O = "",
|
|
29
|
+
"data-dimension2": W = "",
|
|
30
|
+
"data-dimension3": p = "",
|
|
31
|
+
"data-measures": f = "[]",
|
|
32
|
+
"data-height": V = 600,
|
|
33
|
+
width: G = 960,
|
|
34
|
+
"data-data-source-text": j = "",
|
|
35
|
+
"data-data-source-label": J = "Source",
|
|
36
|
+
"data-national-average-label": Z = "National Average",
|
|
37
|
+
"data-legend-title": H = "Legend Title",
|
|
38
|
+
"data-legend-breaks": K = "[]",
|
|
39
|
+
"data-zoom-enabled": C = !1,
|
|
40
|
+
"data-show-legend-labels": y = !1,
|
|
41
|
+
"data-map-file": q,
|
|
42
|
+
"data-mapping-field": Y = "zone",
|
|
43
|
+
"data-map-label-field": $ = "admin",
|
|
44
|
+
"data-has-multiple-measures": v = "false",
|
|
45
|
+
topoJSONField: Q = "collection",
|
|
46
|
+
"data-map-center": X = "NGA",
|
|
45
47
|
//country
|
|
46
|
-
"data-map-label-show-value":
|
|
47
|
-
"data-show-tooltip":
|
|
48
|
-
"data-measure-selector-label":
|
|
49
|
-
"data-value-format":
|
|
50
|
-
"data-show-overall-value":
|
|
51
|
-
"data-auto-generate-breaks":
|
|
52
|
-
"data-number-of-breaks":
|
|
53
|
-
"data-scheme":
|
|
54
|
-
"data-show-no-data-label":
|
|
55
|
-
"data-group":
|
|
56
|
-
"data-map-symbols":
|
|
57
|
-
"data-tooltip-theme":
|
|
58
|
-
"data-label-font-size":
|
|
59
|
-
"data-label-font-weight":
|
|
60
|
-
"data-label-font-color":
|
|
61
|
-
"data-legend-font-size":
|
|
62
|
-
"data-legend-font-weight":
|
|
63
|
-
"data-custom-tooltips":
|
|
64
|
-
"data-format-style":
|
|
65
|
-
"data-decimals":
|
|
66
|
-
"data-currency":
|
|
67
|
-
"data-tooltip-font-size":
|
|
68
|
-
"data-show-admin-unit-label":
|
|
69
|
-
"data-map-no-data-color":
|
|
70
|
-
"data-map-boundary-color":
|
|
71
|
-
"data-map-focus-boundary-color":
|
|
72
|
-
"data-highlighted-location":
|
|
73
|
-
"data-tooltip-format":
|
|
48
|
+
"data-map-label-show-value": F = "false",
|
|
49
|
+
"data-show-tooltip": L = "true",
|
|
50
|
+
"data-measure-selector-label": _ = "",
|
|
51
|
+
"data-value-format": ee = "",
|
|
52
|
+
"data-show-overall-value": w = "false",
|
|
53
|
+
"data-auto-generate-breaks": D = "false",
|
|
54
|
+
"data-number-of-breaks": ae = 5,
|
|
55
|
+
"data-scheme": te = "reds",
|
|
56
|
+
"data-show-no-data-label": S = "false",
|
|
57
|
+
"data-group": I = "default",
|
|
58
|
+
"data-map-symbols": oe = "[]",
|
|
59
|
+
"data-tooltip-theme": le = "map-tooltip-dark",
|
|
60
|
+
"data-label-font-size": re = 12,
|
|
61
|
+
"data-label-font-weight": ne = "normal",
|
|
62
|
+
"data-label-font-color": se = "#595959",
|
|
63
|
+
"data-legend-font-size": ie = 12,
|
|
64
|
+
"data-legend-font-weight": de = "normal",
|
|
65
|
+
"data-custom-tooltips": me = "[]",
|
|
66
|
+
"data-format-style": g = "decimal",
|
|
67
|
+
"data-decimals": N = "2",
|
|
68
|
+
"data-currency": ce = "",
|
|
69
|
+
"data-tooltip-font-size": ue = 14,
|
|
70
|
+
"data-show-admin-unit-label": pe = "showAll",
|
|
71
|
+
"data-map-no-data-color": fe = "#f8f8f8",
|
|
72
|
+
"data-map-boundary-color": ge = "#000",
|
|
73
|
+
"data-map-focus-boundary-color": he = "#000",
|
|
74
|
+
"data-highlighted-location": be = "",
|
|
75
|
+
"data-tooltip-format": Ce = `{locationName} %({value},2)
|
|
74
76
|
{label}: %({value},2)`,
|
|
75
|
-
"data-show-no-data-tooltip":
|
|
76
|
-
"data-map-container-bg-color":
|
|
77
|
-
"data-map-position":
|
|
78
|
-
"data-main-layer-id":
|
|
79
|
-
"data-enabled-layers":
|
|
80
|
-
"data-point-label-color":
|
|
81
|
-
"data-point-label-format":
|
|
82
|
-
"data-show-no-data-legend-item":
|
|
83
|
-
"data-highlighted-loc-label-format":
|
|
84
|
-
"data-enable-summary-view":
|
|
85
|
-
"data-map-type":
|
|
86
|
-
"data-default-point-color":
|
|
87
|
-
"data-aggregation-formula":
|
|
88
|
-
"data-zoom-level-to-show-points":
|
|
89
|
-
"data-zoom-on-filter":
|
|
90
|
-
"data-zoom-on-filter-field":
|
|
91
|
-
"data-no-data-text":
|
|
92
|
-
"data-labels-exclusion-list":
|
|
93
|
-
"data-custom-measure-labels":
|
|
94
|
-
"data-show-shading-layer-labels":
|
|
95
|
-
"data-dvz-proxy-dataset-id":
|
|
96
|
-
"data-recently-toggled-layer-id":
|
|
97
|
-
intl:
|
|
98
|
-
settings:
|
|
99
|
-
} = n
|
|
77
|
+
"data-show-no-data-tooltip": z = "false",
|
|
78
|
+
"data-map-container-bg-color": ye = "#fff",
|
|
79
|
+
"data-map-position": ve = "{}",
|
|
80
|
+
"data-main-layer-id": Fe = "",
|
|
81
|
+
"data-enabled-layers": Le,
|
|
82
|
+
"data-point-label-color": we = "#fff",
|
|
83
|
+
"data-point-label-format": De = "{locationName} %({value},2)",
|
|
84
|
+
"data-show-no-data-legend-item": T = !1,
|
|
85
|
+
"data-highlighted-loc-label-format": Se = "{locationName} - Score: #({value},2)",
|
|
86
|
+
"data-enable-summary-view": ia = "false",
|
|
87
|
+
"data-map-type": x = "DEFAULT",
|
|
88
|
+
"data-default-point-color": Ie = "#FFFF00",
|
|
89
|
+
"data-aggregation-formula": Ne = "COUNT",
|
|
90
|
+
"data-zoom-level-to-show-points": ze = 2,
|
|
91
|
+
"data-zoom-on-filter": U = "false",
|
|
92
|
+
"data-zoom-on-filter-field": Te = "",
|
|
93
|
+
"data-no-data-text": xe = "No Data",
|
|
94
|
+
"data-labels-exclusion-list": Ue = "",
|
|
95
|
+
"data-custom-measure-labels": Ae = "{}",
|
|
96
|
+
"data-show-shading-layer-labels": Be = "ifUnitHasData",
|
|
97
|
+
"data-dvz-proxy-dataset-id": r,
|
|
98
|
+
"data-recently-toggled-layer-id": Re = null,
|
|
99
|
+
intl: da,
|
|
100
|
+
settings: ma
|
|
101
|
+
} = n;
|
|
102
|
+
console.log("MapWrapper props", n);
|
|
103
|
+
const Ee = (e) => d ? e : decodeURIComponent(e), l = (e) => {
|
|
100
104
|
try {
|
|
101
|
-
if (
|
|
102
|
-
return JSON.parse(
|
|
105
|
+
if (e)
|
|
106
|
+
return JSON.parse(Ee(e));
|
|
103
107
|
} catch {
|
|
104
|
-
console.error("error parsing value:" +
|
|
108
|
+
console.error("error parsing value:" + e);
|
|
105
109
|
}
|
|
106
110
|
return null;
|
|
107
|
-
},
|
|
108
|
-
let t =
|
|
109
|
-
return t = t.map((
|
|
110
|
-
},
|
|
111
|
-
const t =
|
|
112
|
-
let
|
|
113
|
-
return t && t.forEach ? t.forEach((
|
|
114
|
-
|
|
115
|
-
}) :
|
|
116
|
-
},
|
|
117
|
-
style:
|
|
118
|
-
notation:
|
|
119
|
-
currency:
|
|
120
|
-
minimumFractionDigits: parseInt(
|
|
121
|
-
maximumFractionDigits: parseInt(
|
|
111
|
+
}, Me = (e) => {
|
|
112
|
+
let t = l(e) || [];
|
|
113
|
+
return t = t.map((a) => (a.min && (a.min = parseFloat(a.min)), a.max && (a.max = parseFloat(a.max)), a.color = decodeURIComponent(a.color), a)), t;
|
|
114
|
+
}, Pe = (e) => {
|
|
115
|
+
const t = l(e) || [];
|
|
116
|
+
let a = {};
|
|
117
|
+
return t && t.forEach ? t.forEach((c) => {
|
|
118
|
+
c.value != null && c.value.filter((M) => M != null && M.toString().trim() != "").length > 0 && (a[c.param] = c.value);
|
|
119
|
+
}) : a = t, a;
|
|
120
|
+
}, ke = {
|
|
121
|
+
style: g === "compacted" ? "decimal" : g,
|
|
122
|
+
notation: g === "compacted" ? "compact" : "standard",
|
|
123
|
+
currency: ce,
|
|
124
|
+
minimumFractionDigits: parseInt(N),
|
|
125
|
+
maximumFractionDigits: parseInt(N)
|
|
122
126
|
};
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
let
|
|
127
|
-
const
|
|
128
|
-
unique:
|
|
129
|
-
editing:
|
|
130
|
-
source: `/${
|
|
131
|
-
center:
|
|
132
|
-
scale:
|
|
133
|
-
measures:
|
|
134
|
-
legendTitle:
|
|
135
|
-
height:
|
|
136
|
-
width:
|
|
137
|
-
topoJSONField:
|
|
138
|
-
mappingField:
|
|
139
|
-
dataSourceText:
|
|
140
|
-
dataSourceLabel:
|
|
141
|
-
nationalAverageLabel:
|
|
142
|
-
legendBreaks:
|
|
143
|
-
mapLabelField:
|
|
144
|
-
zoomEnabled:
|
|
145
|
-
showLegendLabels:
|
|
146
|
-
multipleMeasures:
|
|
147
|
-
app:
|
|
148
|
-
mapLabelShowValue:
|
|
149
|
-
showTooltip:
|
|
150
|
-
showOverallValue:
|
|
151
|
-
measureSelectorLabel:
|
|
152
|
-
valueFormat:
|
|
153
|
-
autoGenerateBreaks:
|
|
154
|
-
showNoDataLabel:
|
|
155
|
-
numberOfBreaks:
|
|
156
|
-
colorScheme:
|
|
157
|
-
group:
|
|
158
|
-
symbols:
|
|
159
|
-
tooltipTheme:
|
|
160
|
-
labelFontSize:
|
|
161
|
-
labelFontColor: decodeURIComponent(
|
|
162
|
-
labelFontWeight:
|
|
163
|
-
legendFontSize:
|
|
164
|
-
legendFontWeight:
|
|
165
|
-
customTooltips:
|
|
166
|
-
format:
|
|
167
|
-
tooltipFontSize:
|
|
168
|
-
showAdminUnitLabel:
|
|
169
|
-
mapNoDataColor: decodeURIComponent(
|
|
170
|
-
mapBoundaryColor: decodeURIComponent(
|
|
171
|
-
mapFocusBoundaryColor: decodeURIComponent(
|
|
172
|
-
highlightedLocation:
|
|
173
|
-
tooltipFormat:
|
|
174
|
-
showNoDataTooltip:
|
|
175
|
-
fields:
|
|
176
|
-
mapContainerBgColor: decodeURIComponent(
|
|
177
|
-
mapPosition:
|
|
178
|
-
mainLayerId:
|
|
179
|
-
enabledLayers:
|
|
180
|
-
pointLabelColor: decodeURIComponent(
|
|
181
|
-
pointLabelFormat:
|
|
182
|
-
showNoDataLegendItem:
|
|
183
|
-
highlightedLocLabelFormat:
|
|
184
|
-
mapType:
|
|
185
|
-
defaultPointColor: decodeURIComponent(
|
|
186
|
-
zoomLevelToShowPoints:
|
|
187
|
-
zoomOnFilter:
|
|
188
|
-
zoomOnFilterField:
|
|
189
|
-
noDataText:
|
|
190
|
-
labelsExclusionList:
|
|
191
|
-
showShadingLayerLabels:
|
|
192
|
-
dvzProxyDatasetId:
|
|
193
|
-
recentlyToggledLayerId:
|
|
127
|
+
let h = l(Le) || [];
|
|
128
|
+
h = h.map((e) => (e.bgColor = decodeURIComponent(e.bgColor), e.fontColor = decodeURIComponent(e.fontColor), e));
|
|
129
|
+
const A = oa.find((e) => e.value === X), B = v == !0 || v == "true";
|
|
130
|
+
let s = [O, W].filter((e) => e !== "none" && e !== null).join("/");
|
|
131
|
+
const Oe = p && p !== "none" ? p : null, m = {
|
|
132
|
+
unique: u,
|
|
133
|
+
editing: d,
|
|
134
|
+
source: `/${q}`,
|
|
135
|
+
center: A.center,
|
|
136
|
+
scale: A.scale,
|
|
137
|
+
measures: f,
|
|
138
|
+
legendTitle: H,
|
|
139
|
+
height: V,
|
|
140
|
+
width: G,
|
|
141
|
+
topoJSONField: Q,
|
|
142
|
+
mappingField: Y,
|
|
143
|
+
dataSourceText: j,
|
|
144
|
+
dataSourceLabel: J,
|
|
145
|
+
nationalAverageLabel: Z,
|
|
146
|
+
legendBreaks: Me(K),
|
|
147
|
+
mapLabelField: $,
|
|
148
|
+
zoomEnabled: C == !0 || C == "true",
|
|
149
|
+
showLegendLabels: y == !0 || y == "true",
|
|
150
|
+
multipleMeasures: B,
|
|
151
|
+
app: o,
|
|
152
|
+
mapLabelShowValue: F == !0 || F == "true",
|
|
153
|
+
showTooltip: L == !0 || L == "true",
|
|
154
|
+
showOverallValue: w == !0 || w == "true",
|
|
155
|
+
measureSelectorLabel: _,
|
|
156
|
+
valueFormat: ee,
|
|
157
|
+
autoGenerateBreaks: D == !0 || D == "true",
|
|
158
|
+
showNoDataLabel: S == !0 || S == "true",
|
|
159
|
+
numberOfBreaks: ae,
|
|
160
|
+
colorScheme: te,
|
|
161
|
+
group: I,
|
|
162
|
+
symbols: l(oe) || [],
|
|
163
|
+
tooltipTheme: le,
|
|
164
|
+
labelFontSize: re,
|
|
165
|
+
labelFontColor: decodeURIComponent(se),
|
|
166
|
+
labelFontWeight: ne,
|
|
167
|
+
legendFontSize: ie,
|
|
168
|
+
legendFontWeight: de,
|
|
169
|
+
customTooltips: l(me) || [],
|
|
170
|
+
format: ke,
|
|
171
|
+
tooltipFontSize: ue,
|
|
172
|
+
showAdminUnitLabel: pe,
|
|
173
|
+
mapNoDataColor: decodeURIComponent(fe),
|
|
174
|
+
mapBoundaryColor: decodeURIComponent(ge),
|
|
175
|
+
mapFocusBoundaryColor: decodeURIComponent(he),
|
|
176
|
+
highlightedLocation: be,
|
|
177
|
+
tooltipFormat: Ce,
|
|
178
|
+
showNoDataTooltip: z == !0 || z == "true",
|
|
179
|
+
fields: s.split("/"),
|
|
180
|
+
mapContainerBgColor: decodeURIComponent(ye),
|
|
181
|
+
mapPosition: l(ve),
|
|
182
|
+
mainLayerId: Fe,
|
|
183
|
+
enabledLayers: h,
|
|
184
|
+
pointLabelColor: decodeURIComponent(we),
|
|
185
|
+
pointLabelFormat: De,
|
|
186
|
+
showNoDataLegendItem: T == !0 || T == "true",
|
|
187
|
+
highlightedLocLabelFormat: Se,
|
|
188
|
+
mapType: x,
|
|
189
|
+
defaultPointColor: decodeURIComponent(Ie),
|
|
190
|
+
zoomLevelToShowPoints: ze,
|
|
191
|
+
zoomOnFilter: U == !0 || U == "true",
|
|
192
|
+
zoomOnFilterField: Te,
|
|
193
|
+
noDataText: xe,
|
|
194
|
+
labelsExclusionList: Ue.split(",").map((e) => e.trim()),
|
|
195
|
+
showShadingLayerLabels: Be,
|
|
196
|
+
dvzProxyDatasetId: r,
|
|
197
|
+
recentlyToggledLayerId: Re
|
|
194
198
|
};
|
|
195
|
-
if (
|
|
196
|
-
const
|
|
197
|
-
|
|
199
|
+
if (m.recentlyToggledLayerId) {
|
|
200
|
+
const e = m.enabledLayers.find((t) => String(t.id) === String(m.recentlyToggledLayerId));
|
|
201
|
+
e && (e != null && e.apiField) && (s = (E = e.apiField) == null ? void 0 : E.toLowerCase());
|
|
198
202
|
}
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
const We = l(Ae) || {}, Ve = o === "csv" ? ta : aa, Ge = d ? (l(f) || []).join(",") : f, R = Pe(P);
|
|
204
|
+
r && (R.dvzProxyDatasetId = r);
|
|
205
|
+
const je = Ye(), Je = ["data", "categories", o, ...r ? [r] : [], "items"], b = $e((e) => e.getIn(Je)), Ze = He(() => b ? b.toJS() : [], [b]);
|
|
206
|
+
return Ke(() => {
|
|
207
|
+
o && o !== "csv" && je(_e({ app: o, dvzProxyDatasetId: r }));
|
|
208
|
+
}, [o, r]), /* @__PURE__ */ i(
|
|
209
|
+
Qe,
|
|
202
210
|
{
|
|
203
|
-
params:
|
|
204
|
-
app:
|
|
211
|
+
params: R,
|
|
212
|
+
app: o,
|
|
205
213
|
csv: decodeURIComponent(k),
|
|
206
|
-
group:
|
|
207
|
-
editing:
|
|
208
|
-
store: [
|
|
209
|
-
source:
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
|
|
214
|
+
group: I,
|
|
215
|
+
editing: d,
|
|
216
|
+
store: [o, u, ...s.split("/")],
|
|
217
|
+
source: s,
|
|
218
|
+
children: /* @__PURE__ */ i(Xe, { children: /* @__PURE__ */ i(
|
|
219
|
+
Ve,
|
|
212
220
|
{
|
|
213
|
-
measures:
|
|
214
|
-
multipleMeasures:
|
|
215
|
-
mapType:
|
|
216
|
-
aggregationFormula:
|
|
217
|
-
customMeasureLabels:
|
|
218
|
-
source:
|
|
219
|
-
|
|
221
|
+
measures: Ge,
|
|
222
|
+
multipleMeasures: B,
|
|
223
|
+
mapType: x,
|
|
224
|
+
aggregationFormula: Ne,
|
|
225
|
+
customMeasureLabels: We,
|
|
226
|
+
source: s,
|
|
227
|
+
extraDimension: Oe,
|
|
228
|
+
allDimensions: Ze,
|
|
229
|
+
children: /* @__PURE__ */ i(ea, { ...m })
|
|
220
230
|
}
|
|
221
231
|
) })
|
|
222
232
|
}
|
|
223
233
|
);
|
|
224
|
-
},
|
|
234
|
+
}, na = (n, u) => {
|
|
235
|
+
}, sa = {}, Fa = qe(na, sa)(la);
|
|
225
236
|
export {
|
|
226
|
-
|
|
237
|
+
Fa as default
|
|
227
238
|
};
|