@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.
@@ -1,31 +1,165 @@
1
- import c from "react";
2
- const i = (d) => {
3
- const { data: e, measures: o, customMeasureLabels: t, children: h, source: m } = d, l = {
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
- e.metadata && e.metadata.measures && e.metadata.measures.forEach((a) => {
9
- t && t[a.value] && t[a.value].hasCustomLabel && t[a.value].customLabel ? l.measureLabelMap[a.value] = t[a.value].customLabel : l.measureLabelMap[a.value] = a.label;
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 s = o.split(",");
12
- return e && e.children && (e.children.forEach((a) => {
13
- s.forEach((r) => {
14
- const u = {
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[r],
18
- measure: r
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
- a.children && (u.children = [], a.children.forEach((n) => {
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
- }), l.measures = s.length > 1 ? s : null, l.nationalData.value = e[o]), c.Children.map(h, (a) => c.cloneElement(a, { transformedData: {
25
- ...l,
26
- types: e.metadata ? e.metadata.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
- i as default
164
+ U as default
31
165
  };
@@ -1,12 +1,13 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import "react";
3
- import { connect as Va } from "react-redux";
4
- import Wa from "../data/DataProvider.js";
5
- import Ga from "../data/DataConsumer.js";
6
- import ja from "./map.js";
7
- import Za from "./MapDataFrame.js";
8
- import Ha from "./MapCSVDataFrame.js";
9
- const Ja = [
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
- ], Ka = (n) => /* @__PURE__ */ r(qa, { ...n }), qa = (n) => {
20
- var B;
20
+ ], la = (n) => /* @__PURE__ */ i(ra, { ...n }), ra = (n) => {
21
+ var E;
21
22
  const {
22
- unique: c,
23
- editing: s,
24
- "data-filters": E = "{}",
25
- "data-app": i = "csv",
23
+ unique: u,
24
+ editing: d,
25
+ "data-filters": P = "{}",
26
+ "data-app": o = "csv",
26
27
  "data-csv": k = "",
27
- "data-dimension1": M = "",
28
- "data-dimension2": P = "",
29
- "data-measures": u = "[]",
30
- "data-height": O = 600,
31
- width: V = 960,
32
- "data-data-source-text": W = "",
33
- "data-data-source-label": G = "Source",
34
- "data-national-average-label": j = "National Average",
35
- "data-legend-title": Z = "Legend Title",
36
- "data-legend-breaks": H = "[]",
37
- "data-zoom-enabled": b = !1,
38
- "data-show-legend-labels": h = !1,
39
- "data-map-file": J,
40
- "data-mapping-field": K = "zone",
41
- "data-map-label-field": q = "admin",
42
- "data-has-multiple-measures": C = "false",
43
- topoJSONField: Y = "collection",
44
- "data-map-center": $ = "NGA",
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": y = "false",
47
- "data-show-tooltip": F = "true",
48
- "data-measure-selector-label": Q = "",
49
- "data-value-format": X = "",
50
- "data-show-overall-value": v = "false",
51
- "data-auto-generate-breaks": L = "false",
52
- "data-number-of-breaks": _ = 5,
53
- "data-scheme": aa = "reds",
54
- "data-show-no-data-label": w = "false",
55
- "data-group": S = "default",
56
- "data-map-symbols": ea = "[]",
57
- "data-tooltip-theme": ta = "map-tooltip-dark",
58
- "data-label-font-size": oa = 12,
59
- "data-label-font-weight": la = "normal",
60
- "data-label-font-color": ra = "#595959",
61
- "data-legend-font-size": na = 12,
62
- "data-legend-font-weight": sa = "normal",
63
- "data-custom-tooltips": ia = "[]",
64
- "data-format-style": p = "decimal",
65
- "data-decimals": D = "2",
66
- "data-currency": da = "",
67
- "data-tooltip-font-size": ma = 14,
68
- "data-show-admin-unit-label": ca = "showAll",
69
- "data-map-no-data-color": ua = "#f8f8f8",
70
- "data-map-boundary-color": pa = "#000",
71
- "data-map-focus-boundary-color": fa = "#000",
72
- "data-highlighted-location": ga = "",
73
- "data-tooltip-format": ba = `{locationName} %({value},2)
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": I = "false",
76
- "data-map-container-bg-color": ha = "#fff",
77
- "data-map-position": Ca = "{}",
78
- "data-main-layer-id": ya = "",
79
- "data-enabled-layers": Fa,
80
- "data-point-label-color": va = "#fff",
81
- "data-point-label-format": La = "{locationName} %({value},2)",
82
- "data-show-no-data-legend-item": N = !1,
83
- "data-highlighted-loc-label-format": wa = "{locationName} - Score: #({value},2)",
84
- "data-enable-summary-view": Qa = "false",
85
- "data-map-type": z = "DEFAULT",
86
- "data-default-point-color": Sa = "#FFFF00",
87
- "data-aggregation-formula": Da = "COUNT",
88
- "data-zoom-level-to-show-points": Ia = 2,
89
- "data-zoom-on-filter": T = "false",
90
- "data-zoom-on-filter-field": Na = "",
91
- "data-no-data-text": za = "No Data",
92
- "data-labels-exclusion-list": Ta = "",
93
- "data-custom-measure-labels": xa = "{}",
94
- "data-show-shading-layer-labels": Ua = "ifUnitHasData",
95
- "data-dvz-proxy-dataset-id": f,
96
- "data-recently-toggled-layer-id": Aa = null,
97
- intl: Xa,
98
- settings: _a
99
- } = n, Ba = (a) => s ? a : decodeURIComponent(a), o = (a) => {
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 (a)
102
- return JSON.parse(Ba(a));
105
+ if (e)
106
+ return JSON.parse(Ee(e));
103
107
  } catch {
104
- console.error("error parsing value:" + a);
108
+ console.error("error parsing value:" + e);
105
109
  }
106
110
  return null;
107
- }, Ra = (a) => {
108
- let t = o(a) || [];
109
- return t = t.map((e) => (e.min && (e.min = parseFloat(e.min)), e.max && (e.max = parseFloat(e.max)), e.color = decodeURIComponent(e.color), e)), t;
110
- }, Ea = (a) => {
111
- const t = o(a) || [];
112
- let e = {};
113
- return t && t.forEach ? t.forEach((m) => {
114
- m.value != null && m.value.filter((R) => R != null && R.toString().trim() != "").length > 0 && (e[m.param] = m.value);
115
- }) : e = t, e;
116
- }, ka = {
117
- style: p === "compacted" ? "decimal" : p,
118
- notation: p === "compacted" ? "compact" : "standard",
119
- currency: da,
120
- minimumFractionDigits: parseInt(D),
121
- maximumFractionDigits: parseInt(D)
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 g = o(Fa) || [];
124
- g = g.map((a) => (a.bgColor = decodeURIComponent(a.bgColor), a.fontColor = decodeURIComponent(a.fontColor), a));
125
- const x = Ja.find((a) => a.value === $), U = C == !0 || C == "true";
126
- let l = [M, P].filter((a) => a != "none" && a != null).join("/");
127
- const d = {
128
- unique: c,
129
- editing: s,
130
- source: `/${J}`,
131
- center: x.center,
132
- scale: x.scale,
133
- measures: u,
134
- legendTitle: Z,
135
- height: O,
136
- width: V,
137
- topoJSONField: Y,
138
- mappingField: K,
139
- dataSourceText: W,
140
- dataSourceLabel: G,
141
- nationalAverageLabel: j,
142
- legendBreaks: Ra(H),
143
- mapLabelField: q,
144
- zoomEnabled: b == !0 || b == "true",
145
- showLegendLabels: h == !0 || h == "true",
146
- multipleMeasures: U,
147
- app: i,
148
- mapLabelShowValue: y == !0 || y == "true",
149
- showTooltip: F == !0 || F == "true",
150
- showOverallValue: v == !0 || v == "true",
151
- measureSelectorLabel: Q,
152
- valueFormat: X,
153
- autoGenerateBreaks: L == !0 || L == "true",
154
- showNoDataLabel: w == !0 || w == "true",
155
- numberOfBreaks: _,
156
- colorScheme: aa,
157
- group: S,
158
- symbols: o(ea) || [],
159
- tooltipTheme: ta,
160
- labelFontSize: oa,
161
- labelFontColor: decodeURIComponent(ra),
162
- labelFontWeight: la,
163
- legendFontSize: na,
164
- legendFontWeight: sa,
165
- customTooltips: o(ia) || [],
166
- format: ka,
167
- tooltipFontSize: ma,
168
- showAdminUnitLabel: ca,
169
- mapNoDataColor: decodeURIComponent(ua),
170
- mapBoundaryColor: decodeURIComponent(pa),
171
- mapFocusBoundaryColor: decodeURIComponent(fa),
172
- highlightedLocation: ga,
173
- tooltipFormat: ba,
174
- showNoDataTooltip: I == !0 || I == "true",
175
- fields: l.split("/"),
176
- mapContainerBgColor: decodeURIComponent(ha),
177
- mapPosition: o(Ca),
178
- mainLayerId: ya,
179
- enabledLayers: g,
180
- pointLabelColor: decodeURIComponent(va),
181
- pointLabelFormat: La,
182
- showNoDataLegendItem: N == !0 || N == "true",
183
- highlightedLocLabelFormat: wa,
184
- mapType: z,
185
- defaultPointColor: decodeURIComponent(Sa),
186
- zoomLevelToShowPoints: Ia,
187
- zoomOnFilter: T == !0 || T == "true",
188
- zoomOnFilterField: Na,
189
- noDataText: za,
190
- labelsExclusionList: Ta.split(",").map((a) => a.trim()),
191
- showShadingLayerLabels: Ua,
192
- dvzProxyDatasetId: f,
193
- recentlyToggledLayerId: Aa
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 (d.recentlyToggledLayerId) {
196
- const a = d.enabledLayers.find((t) => String(t.id) === String(d.recentlyToggledLayerId));
197
- a && (a != null && a.apiField) && (l = (B = a.apiField) == null ? void 0 : B.toLowerCase());
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 Ma = o(xa) || {}, Pa = i === "csv" ? Ha : Za, Oa = s ? (o(u) || []).join(",") : u, A = Ea(E);
200
- return f && (A.dvzProxyDatasetId = f), /* @__PURE__ */ r(
201
- Wa,
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: A,
204
- app: i,
211
+ params: R,
212
+ app: o,
205
213
  csv: decodeURIComponent(k),
206
- group: S,
207
- editing: s,
208
- store: [i, c, ...l.split("/")],
209
- source: l,
210
- children: /* @__PURE__ */ r(Ga, { children: /* @__PURE__ */ r(
211
- Pa,
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: Oa,
214
- multipleMeasures: U,
215
- mapType: z,
216
- aggregationFormula: Da,
217
- customMeasureLabels: Ma,
218
- source: l,
219
- children: /* @__PURE__ */ r(ja, { ...d })
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
- }, Ya = (n, c) => ({}), $a = {}, de = Va(Ya, $a)(Ka);
234
+ }, na = (n, u) => {
235
+ }, sa = {}, Fa = qe(na, sa)(la);
225
236
  export {
226
- de as default
237
+ Fa as default
227
238
  };