@devgateway/dvz-ui-react 1.8.7 → 1.9.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/cjs/common.css +1 -1
- package/dist/cjs/conf/index.js +1 -1
- package/dist/cjs/embeddable/big-number-trend/Alternative.js +1 -1
- package/dist/cjs/embeddable/big-number-trend/BigNumberTrendContainer.js +1 -0
- package/dist/cjs/embeddable/big-number-trend/Classic.js +1 -1
- package/dist/cjs/embeddable/big-number-trend/useBigNumberTrendData.js +1 -0
- package/dist/cjs/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/Messages.js +2 -2
- package/dist/cjs/embeddable/chart/data/Line.js +1 -1
- package/dist/cjs/embeddable/chart/data/Utils.js +1 -1
- package/dist/cjs/embeddable/chart/index.js +1 -1
- package/dist/cjs/embeddable/d3Map/index.js +1 -1
- package/dist/cjs/embeddable/data/CategoriesProvider.js +1 -1
- package/dist/cjs/embeddable/data/DataConsumer.js +1 -1
- package/dist/cjs/embeddable/data/DataProvider.js +1 -1
- package/dist/cjs/embeddable/featuredtabs/index.js +1 -1
- package/dist/cjs/embeddable/map/index.js +2 -2
- package/dist/cjs/embeddable/reducers/data.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/layout/FlexWrapDetector.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/cjs/tracker/InternalTrafficToggle.js +1 -1
- package/dist/cjs/tracker/InternalTrafficWatermark.js +1 -0
- package/dist/cjs/tracker/index.js +1 -1
- package/dist/cjs/tracker/internalTrafficUtils.js +1 -1
- package/dist/cjs/tracker/useInternalTrafficBypass.js +1 -0
- package/dist/esm/common.css +1 -1
- package/dist/esm/conf/index.js +1 -2
- package/dist/esm/embeddable/big-number-trend/Alternative.js +62 -211
- package/dist/esm/embeddable/big-number-trend/BigNumberTrendContainer.js +125 -0
- package/dist/esm/embeddable/big-number-trend/Classic.js +51 -181
- package/dist/esm/embeddable/big-number-trend/index.js +8 -8
- package/dist/esm/embeddable/big-number-trend/useBigNumberTrendData.js +49 -0
- package/dist/esm/embeddable/chart/Bar.js +464 -471
- package/dist/esm/embeddable/chart/Messages.js +18 -15
- package/dist/esm/embeddable/chart/data/Line.js +1 -4
- package/dist/esm/embeddable/chart/data/Utils.js +0 -1
- package/dist/esm/embeddable/chart/index.js +363 -359
- package/dist/esm/embeddable/d3Map/index.js +129 -125
- package/dist/esm/embeddable/data/CategoriesProvider.js +31 -38
- package/dist/esm/embeddable/data/DataConsumer.js +12 -8
- package/dist/esm/embeddable/data/DataProvider.js +62 -124
- package/dist/esm/embeddable/featuredtabs/index.js +64 -61
- package/dist/esm/embeddable/map/index.js +42 -42
- package/dist/esm/embeddable/reducers/data.js +46 -44
- package/dist/esm/index.js +71 -67
- package/dist/esm/layout/FlexWrapDetector.js +10 -10
- package/dist/esm/styles.css +1 -1
- package/dist/esm/tracker/InternalTrafficToggle.js +21 -73
- package/dist/esm/tracker/InternalTrafficWatermark.js +67 -0
- package/dist/esm/tracker/index.js +11 -8
- package/dist/esm/tracker/internalTrafficUtils.js +9 -10
- package/dist/esm/tracker/useInternalTrafficBypass.js +34 -0
- package/dist/types/conf/index.d.ts +0 -1
- package/dist/types/embeddable/big-number-trend/Alternative.d.ts +2 -4
- package/dist/types/embeddable/big-number-trend/BigNumberTrendContainer.d.ts +5 -0
- package/dist/types/embeddable/big-number-trend/Classic.d.ts +2 -4
- package/dist/types/embeddable/big-number-trend/useBigNumberTrendData.d.ts +21 -0
- package/dist/types/embeddable/chart/Bar.d.ts +1 -2
- package/dist/types/embeddable/data/DataConsumer.d.ts +5 -2
- package/dist/types/embeddable/data/DataProvider.d.ts +18 -3
- package/dist/types/layout/FlexWrapDetector.d.ts +2 -1
- package/dist/types/tracker/InternalTrafficToggle.d.ts +0 -1
- package/dist/types/tracker/InternalTrafficWatermark.d.ts +13 -0
- package/dist/types/tracker/index.d.ts +2 -0
- package/dist/types/tracker/internalTrafficUtils.d.ts +0 -7
- package/dist/types/tracker/useInternalTrafficBypass.d.ts +13 -0
- package/package.json +2 -2
|
@@ -17,34 +17,34 @@ const Ja = [
|
|
|
17
17
|
{ label: "Democratic Republic of the Congo", value: "DRC", center: [23.174338, -5.837475], scale: 1250 },
|
|
18
18
|
{ label: "World", value: "World", center: [0, 20.050043], scale: 150 }
|
|
19
19
|
], Ka = (n) => /* @__PURE__ */ r(qa, { ...n }), qa = (n) => {
|
|
20
|
-
var
|
|
20
|
+
var B;
|
|
21
21
|
const {
|
|
22
22
|
unique: c,
|
|
23
23
|
editing: s,
|
|
24
|
-
"data-filters":
|
|
24
|
+
"data-filters": k = "{}",
|
|
25
25
|
"data-app": i = "csv",
|
|
26
|
-
"data-csv":
|
|
27
|
-
"data-dimension1":
|
|
28
|
-
"data-dimension2":
|
|
26
|
+
"data-csv": E = "",
|
|
27
|
+
"data-dimension1": M = "",
|
|
28
|
+
"data-dimension2": P = "",
|
|
29
29
|
"data-measures": u = '["prevalenceSmokeAny"]',
|
|
30
30
|
"data-height": O = 600,
|
|
31
31
|
width: V = 960,
|
|
32
|
-
"data-data-source-text": W = "
|
|
32
|
+
"data-data-source-text": W = "",
|
|
33
33
|
"data-data-source-label": G = "Source",
|
|
34
|
-
"data-national-average-label": j = "National
|
|
35
|
-
"data-legend-title": Z = "
|
|
34
|
+
"data-national-average-label": j = "National Average",
|
|
35
|
+
"data-legend-title": Z = "Legend Title",
|
|
36
36
|
"data-legend-breaks": H = "[]",
|
|
37
|
-
"data-zoom-enabled":
|
|
37
|
+
"data-zoom-enabled": b = !1,
|
|
38
38
|
"data-show-legend-labels": h = !1,
|
|
39
39
|
"data-map-file": J,
|
|
40
40
|
"data-mapping-field": K = "zone",
|
|
41
41
|
"data-map-label-field": q = "admin",
|
|
42
|
-
"data-has-multiple-measures":
|
|
42
|
+
"data-has-multiple-measures": y = "false",
|
|
43
43
|
topoJSONField: Y = "collection",
|
|
44
44
|
"data-map-center": $ = "NGA",
|
|
45
45
|
//country
|
|
46
|
-
"data-map-label-show-value":
|
|
47
|
-
"data-show-tooltip":
|
|
46
|
+
"data-map-label-show-value": C = "false",
|
|
47
|
+
"data-show-tooltip": v = "true",
|
|
48
48
|
"data-measure-selector-label": Q = "",
|
|
49
49
|
"data-value-format": X = "",
|
|
50
50
|
"data-show-overall-value": F = "false",
|
|
@@ -69,14 +69,14 @@ const Ja = [
|
|
|
69
69
|
"data-map-no-data-color": ua = "#f8f8f8",
|
|
70
70
|
"data-map-boundary-color": pa = "#000",
|
|
71
71
|
"data-map-focus-boundary-color": fa = "#000",
|
|
72
|
-
"data-highlighted-location":
|
|
73
|
-
"data-tooltip-format":
|
|
72
|
+
"data-highlighted-location": ga = "",
|
|
73
|
+
"data-tooltip-format": ba = `{locationName} %({value},2)
|
|
74
74
|
{label}: %({value},2)`,
|
|
75
75
|
"data-show-no-data-tooltip": I = "false",
|
|
76
76
|
"data-map-container-bg-color": ha = "#fff",
|
|
77
|
-
"data-map-position":
|
|
78
|
-
"data-main-layer-id":
|
|
79
|
-
"data-enabled-layers":
|
|
77
|
+
"data-map-position": ya = "{}",
|
|
78
|
+
"data-main-layer-id": Ca = "",
|
|
79
|
+
"data-enabled-layers": va,
|
|
80
80
|
"data-point-label-color": Fa = "#fff",
|
|
81
81
|
"data-point-label-format": La = "{locationName} %({value},2)",
|
|
82
82
|
"data-show-no-data-legend-item": N = !1,
|
|
@@ -96,34 +96,34 @@ const Ja = [
|
|
|
96
96
|
"data-recently-toggled-layer-id": Ua = null,
|
|
97
97
|
intl: Xa,
|
|
98
98
|
settings: _a
|
|
99
|
-
} = n,
|
|
99
|
+
} = n, Ba = (a) => s ? a : decodeURIComponent(a), o = (a) => {
|
|
100
100
|
try {
|
|
101
101
|
if (a)
|
|
102
|
-
return JSON.parse(
|
|
102
|
+
return JSON.parse(Ba(a));
|
|
103
103
|
} catch {
|
|
104
104
|
console.error("error parsing value:" + a);
|
|
105
105
|
}
|
|
106
106
|
return null;
|
|
107
|
-
},
|
|
107
|
+
}, Ra = (a) => {
|
|
108
108
|
let t = o(a) || [];
|
|
109
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
|
-
},
|
|
110
|
+
}, ka = (a) => {
|
|
111
111
|
const t = o(a) || [];
|
|
112
112
|
let e = {};
|
|
113
113
|
return t && t.forEach ? t.forEach((m) => {
|
|
114
|
-
m.value != null && m.value.filter((
|
|
114
|
+
m.value != null && m.value.filter((R) => R != null && R.toString().trim() != "").length > 0 && (e[m.param] = m.value);
|
|
115
115
|
}) : e = t, e;
|
|
116
|
-
},
|
|
116
|
+
}, Ea = {
|
|
117
117
|
style: p === "compacted" ? "decimal" : p,
|
|
118
118
|
notation: p === "compacted" ? "compact" : "standard",
|
|
119
119
|
currency: da,
|
|
120
120
|
minimumFractionDigits: parseInt(D),
|
|
121
121
|
maximumFractionDigits: parseInt(D)
|
|
122
122
|
};
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
const x = Ja.find((a) => a.value === $), A =
|
|
126
|
-
let l = [
|
|
123
|
+
let g = o(va) || [];
|
|
124
|
+
g = g.map((a) => (a.bgColor = decodeURIComponent(a.bgColor), a.fontColor = decodeURIComponent(a.fontColor), a));
|
|
125
|
+
const x = Ja.find((a) => a.value === $), A = y == !0 || y == "true";
|
|
126
|
+
let l = [M, P].filter((a) => a != "none" && a != null).join("/");
|
|
127
127
|
const d = {
|
|
128
128
|
unique: c,
|
|
129
129
|
editing: s,
|
|
@@ -139,14 +139,14 @@ const Ja = [
|
|
|
139
139
|
dataSourceText: W,
|
|
140
140
|
dataSourceLabel: G,
|
|
141
141
|
nationalAverageLabel: j,
|
|
142
|
-
legendBreaks:
|
|
142
|
+
legendBreaks: Ra(H),
|
|
143
143
|
mapLabelField: q,
|
|
144
|
-
zoomEnabled:
|
|
144
|
+
zoomEnabled: b == !0 || b == "true",
|
|
145
145
|
showLegendLabels: h == !0 || h == "true",
|
|
146
146
|
multipleMeasures: A,
|
|
147
147
|
app: i,
|
|
148
|
-
mapLabelShowValue:
|
|
149
|
-
showTooltip:
|
|
148
|
+
mapLabelShowValue: C == !0 || C == "true",
|
|
149
|
+
showTooltip: v == !0 || v == "true",
|
|
150
150
|
showOverallValue: F == !0 || F == "true",
|
|
151
151
|
measureSelectorLabel: Q,
|
|
152
152
|
valueFormat: X,
|
|
@@ -163,20 +163,20 @@ const Ja = [
|
|
|
163
163
|
legendFontSize: na,
|
|
164
164
|
legendFontWeight: sa,
|
|
165
165
|
customTooltips: o(ia) || [],
|
|
166
|
-
format:
|
|
166
|
+
format: Ea,
|
|
167
167
|
tooltipFontSize: ma,
|
|
168
168
|
showAdminUnitLabel: ca,
|
|
169
169
|
mapNoDataColor: decodeURIComponent(ua),
|
|
170
170
|
mapBoundaryColor: decodeURIComponent(pa),
|
|
171
171
|
mapFocusBoundaryColor: decodeURIComponent(fa),
|
|
172
|
-
highlightedLocation:
|
|
173
|
-
tooltipFormat:
|
|
172
|
+
highlightedLocation: ga,
|
|
173
|
+
tooltipFormat: ba,
|
|
174
174
|
showNoDataTooltip: I == !0 || I == "true",
|
|
175
175
|
fields: l.split("/"),
|
|
176
176
|
mapContainerBgColor: decodeURIComponent(ha),
|
|
177
|
-
mapPosition: o(
|
|
178
|
-
mainLayerId:
|
|
179
|
-
enabledLayers:
|
|
177
|
+
mapPosition: o(ya),
|
|
178
|
+
mainLayerId: Ca,
|
|
179
|
+
enabledLayers: g,
|
|
180
180
|
pointLabelColor: decodeURIComponent(Fa),
|
|
181
181
|
pointLabelFormat: La,
|
|
182
182
|
showNoDataLegendItem: N == !0 || N == "true",
|
|
@@ -194,27 +194,27 @@ const Ja = [
|
|
|
194
194
|
};
|
|
195
195
|
if (d.recentlyToggledLayerId) {
|
|
196
196
|
const a = d.enabledLayers.find((t) => String(t.id) === String(d.recentlyToggledLayerId));
|
|
197
|
-
a && (a != null && a.apiField) && (l = (
|
|
197
|
+
a && (a != null && a.apiField) && (l = (B = a.apiField) == null ? void 0 : B.toLowerCase());
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Ma = o(xa) || {}, Pa = i === "csv" ? Ha : Za, Oa = s ? (o(u) || []).join(",") : u, U = ka(k);
|
|
200
200
|
return f && (U.dvzProxyDatasetId = f), /* @__PURE__ */ r(
|
|
201
201
|
Wa,
|
|
202
202
|
{
|
|
203
203
|
params: U,
|
|
204
204
|
app: i,
|
|
205
|
-
csv: decodeURIComponent(
|
|
205
|
+
csv: decodeURIComponent(E),
|
|
206
206
|
group: S,
|
|
207
207
|
editing: s,
|
|
208
208
|
store: [i, c, ...l.split("/")],
|
|
209
209
|
source: l,
|
|
210
210
|
children: /* @__PURE__ */ r(Ga, { children: /* @__PURE__ */ r(
|
|
211
|
-
|
|
211
|
+
Pa,
|
|
212
212
|
{
|
|
213
213
|
measures: Oa,
|
|
214
214
|
multipleMeasures: A,
|
|
215
215
|
mapType: z,
|
|
216
216
|
aggregationFormula: Da,
|
|
217
|
-
customMeasureLabels:
|
|
217
|
+
customMeasureLabels: Ma,
|
|
218
218
|
source: l,
|
|
219
219
|
children: /* @__PURE__ */ r(ja, { ...d })
|
|
220
220
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { getData as
|
|
1
|
+
import { getData as V, getCategory as j, getCategories as J } from "./data-api.js";
|
|
2
2
|
import * as A from "immutable";
|
|
3
3
|
import H from "papaparse";
|
|
4
|
-
const y = "LOAD_DATA", d = "LOAD_DATA_DONE",
|
|
4
|
+
const y = "LOAD_DATA", d = "LOAD_DATA_DONE", R = "LOAD_DATA_ERROR", O = "LOAD_CATEGORIES", D = "LOAD_CATEGORIES_DONE", F = "LOAD_CATEGORIES_ERROR", L = "SET_PAGE_MODULE_PROPS", h = "RELOAD_CHILD_FILTER_ITEMS", N = "SET_FILTER", Y = "SET_FILTERS", P = "SET_INITIAL_FILTER", C = "SET_APPLY", w = "CLEAN_FILTER", M = "UNSET_FILTER", $ = A.Map({ mode: "info" }), v = "SET_MEASURES", U = "CLEAN_MEASURES", B = "SET_POSTS_PAGINATION", K = "SET_POSTS_FILTER", G = "SET_INITIAL_POSTS_FILTER", X = ({ app: r, group: a }) => (s, e) => {
|
|
5
5
|
s({ type: U, app: r, group: a });
|
|
6
6
|
}, Z = ({ app: r, group: a, mGroup: s }) => (e, t) => {
|
|
7
7
|
const o = Object.keys(s.measures).filter((l) => s.measures[l].selected), n = { ...s };
|
|
8
8
|
n[r] = { measures: {} }, o.forEach((l) => {
|
|
9
9
|
n[r].measures[l] = { ...s.measures[l] };
|
|
10
10
|
}), n[r].format = s.format, e({ type: v, app: r, group: a, measure: n });
|
|
11
|
-
}, k = ({ app: r, type: a, group: s, param: e, autoApply: t, params: o, parentParam: n, parentType: l, parentSelectedItems: i, uniqueStorage:
|
|
12
|
-
const
|
|
13
|
-
|
|
11
|
+
}, k = ({ app: r, type: a, group: s, param: e, autoApply: t, params: o, parentParam: n, parentType: l, parentSelectedItems: i, uniqueStorage: E, dvzProxyDatasetId: u }) => (I, p) => {
|
|
12
|
+
const g = { ...o };
|
|
13
|
+
g[n] = i, j({ app: r, params: g, type: a }).then(
|
|
14
14
|
(f) => {
|
|
15
|
-
|
|
15
|
+
I({
|
|
16
16
|
type: h,
|
|
17
17
|
filterType: a,
|
|
18
18
|
parentType: l,
|
|
@@ -20,8 +20,8 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
20
20
|
app: r,
|
|
21
21
|
group: s,
|
|
22
22
|
data: f,
|
|
23
|
-
uniqueStorage:
|
|
24
|
-
dvzProxyDatasetId:
|
|
23
|
+
uniqueStorage: E,
|
|
24
|
+
dvzProxyDatasetId: u,
|
|
25
25
|
autoApply: t
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -39,14 +39,14 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
39
39
|
t({ type: P, app: r, group: a, param: s, value: e });
|
|
40
40
|
}, ae = (r) => (a, s) => {
|
|
41
41
|
const { app: e, params: t, dvzProxyDatasetId: o, uniqueStorage: n } = r;
|
|
42
|
-
a({ type:
|
|
43
|
-
type:
|
|
42
|
+
a({ type: O, params: t, app: e, uniqueStorage: n, dvzProxyDatasetId: o }), J({ app: e, params: t }).then((l) => (l.appliedFilters = t, a({
|
|
43
|
+
type: D,
|
|
44
44
|
app: e,
|
|
45
45
|
data: l,
|
|
46
46
|
uniqueStorage: n,
|
|
47
47
|
dvzProxyDatasetId: o
|
|
48
48
|
}))).catch((l) => a({
|
|
49
|
-
type:
|
|
49
|
+
type: F,
|
|
50
50
|
app: e,
|
|
51
51
|
uniqueStorage: n,
|
|
52
52
|
error: l,
|
|
@@ -55,37 +55,39 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
55
55
|
}, oe = ({ app: r, group: a, csv: s, store: e, params: t }) => (o, n) => {
|
|
56
56
|
const l = n().get("data").getIn(["filters", r, a]);
|
|
57
57
|
l ? t = { ...t, ...l.toJS() } : t = t || {};
|
|
58
|
-
const i = H.parse(s, { header: !0, dynamicTyping: !0 }),
|
|
59
|
-
let
|
|
60
|
-
return Object.keys(t).forEach((
|
|
61
|
-
const f = t[
|
|
62
|
-
if (g
|
|
63
|
-
const
|
|
64
|
-
|
|
58
|
+
const i = H.parse(s, { header: !0, dynamicTyping: !0 }), E = i.data.filter((I) => {
|
|
59
|
+
let p = !1;
|
|
60
|
+
return Object.keys(t).forEach((g) => {
|
|
61
|
+
const f = t[g];
|
|
62
|
+
if (I[g]) {
|
|
63
|
+
const _ = I[g].toString().trim().toLowerCase();
|
|
64
|
+
p = f.filter((S) => S && S.toString().trim().toLowerCase() == _).length == 0;
|
|
65
65
|
}
|
|
66
|
-
}), !
|
|
67
|
-
}),
|
|
68
|
-
o({ type: d, app: r, group: a, store: e, data: { count:
|
|
66
|
+
}), !p;
|
|
67
|
+
}), u = { ...i, data: E, appliedFilters: t };
|
|
68
|
+
o({ type: d, app: r, group: a, store: e, data: { count: u.data.length, itemsSize: u.data.length, ...u } });
|
|
69
69
|
}, le = (r) => (a, s) => {
|
|
70
70
|
const { app: e, group: t, source: o, store: n, params: l, parent: i } = r;
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
let E = s().get("data").getIn(["filters", e, t]), u = { ...l };
|
|
72
|
+
if (E) {
|
|
73
|
+
const I = E.toJS();
|
|
74
|
+
u = { ...I, ...l }, l && Object.keys(l).forEach((p) => {
|
|
75
|
+
if (I[p] !== void 0) {
|
|
76
|
+
const g = Array.isArray(l[p]) ? l[p] : [l[p]], f = Array.isArray(I[p]) ? I[p] : [I[p]];
|
|
77
|
+
g.some((S) => f.includes(S)) || (u[p] = [Number.MIN_SAFE_INTEGER]);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
a({ type: y, app: e, group: t, params: u, store: n }), V({ app: e, source: o, params: u }).then((I) => (I.appliedFilters = u, a({ type: d, app: e, group: t, store: n, data: I, params: u }))).catch((I) => a({ type: R, app: e, group: t, store: n, error: I }));
|
|
80
82
|
}, ie = ({ data: r }) => (a, s) => {
|
|
81
|
-
a({ type:
|
|
83
|
+
a({ type: L, data: r });
|
|
82
84
|
}, pe = (r = $, a) => {
|
|
83
85
|
switch (a.type) {
|
|
84
86
|
case y: {
|
|
85
87
|
const { store: s, app: e, group: t, params: o } = a, n = Date.now();
|
|
86
88
|
return r.deleteIn([...s, "error"]).setIn([...s, "loading"], !0).setIn([...s, "time"], n).setIn([...s, "presetFilter"], o);
|
|
87
89
|
}
|
|
88
|
-
case
|
|
90
|
+
case R: {
|
|
89
91
|
const { error: s, store: e, app: t, group: o } = a;
|
|
90
92
|
return r.setIn([...e, "loading"], !1).setIn([...e, "error"], s).setIn(["filters-settings", t, o, "apply"], null);
|
|
91
93
|
}
|
|
@@ -93,19 +95,19 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
93
95
|
const { data: s, app: e, group: t, store: o } = a;
|
|
94
96
|
return r.setIn([...o, "loading"], !1).deleteIn([...o, "error"]).setIn([...o, "data"], s).setIn(["filters-settings", e, t, "apply"], null);
|
|
95
97
|
}
|
|
96
|
-
case
|
|
98
|
+
case L: {
|
|
97
99
|
const { data: s } = a;
|
|
98
100
|
return r.setIn(["pageModuleProps"], s);
|
|
99
101
|
}
|
|
100
|
-
case
|
|
102
|
+
case O: {
|
|
101
103
|
const { data: s, app: e, uniqueStorage: t, dvzProxyDatasetId: o } = a, n = ["categories", e];
|
|
102
104
|
return t && n.push(t), o && n.push(o), r.setIn([...n, "loading"], !0).deleteIn([...n, "error"]);
|
|
103
105
|
}
|
|
104
|
-
case
|
|
106
|
+
case D: {
|
|
105
107
|
const { data: s, app: e, uniqueStorage: t, dvzProxyDatasetId: o } = a, n = ["categories", e];
|
|
106
108
|
return o && n.push(o), t && n.push(t), r.setIn([...n, "loading"], !1).setIn([...n, "items"], A.fromJS(s));
|
|
107
109
|
}
|
|
108
|
-
case
|
|
110
|
+
case F: {
|
|
109
111
|
const { data: s, app: e, uniqueStorage: t, dvzProxyDatasetId: o } = a, n = ["categories", e];
|
|
110
112
|
return t && n.push(t), o && n.push(o), r.setIn([...n, "loading"], !1).setIn([...n, "error"], s);
|
|
111
113
|
}
|
|
@@ -122,10 +124,10 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
122
124
|
return r.setIn(["filters-settings", e, t, "autoApply"], n).setIn(["filters", e, t, param], value.length === 0 ? [Number.MIN_SAFE_INTEGER] : value).setIn(["filters-settings", e, t, "apply"], null).setIn(["filters-settings", e, t, "lastUserFilterChange"], s);
|
|
123
125
|
}
|
|
124
126
|
case h: {
|
|
125
|
-
const { data: s, app: e, group: t, param: o, uniqueStorage: n, dvzProxyDatasetId: l, filterType: i, parentType:
|
|
126
|
-
l &&
|
|
127
|
-
const
|
|
128
|
-
return r.setIn([...
|
|
127
|
+
const { data: s, app: e, group: t, param: o, uniqueStorage: n, dvzProxyDatasetId: l, filterType: i, parentType: E, autoApply: u } = a, I = Date.now(), p = ["categories", e];
|
|
128
|
+
l && p.push(l), n && p.push(n);
|
|
129
|
+
const g = s.filter((c) => c.type == i), _ = r.getIn([...p, "items"]).filter((c) => c.get("type") == i).get(0).get("items").map((c) => c.value), b = r.getIn([...p, "items"]).filter((c) => c.get("type") != i).push(A.Map(g[0])), x = r.getIn(["filters", e, t, o]), m = s[0].items.map((c) => c.value), z = x.filter((c) => m.indexOf(c) > -1), q = m.filter((c) => _.indexOf(c) == -1), T = Array.from(/* @__PURE__ */ new Set([...z, ...q]));
|
|
130
|
+
return r.setIn([...p, "items"], b).setIn(["filters", e, t, o], Array.from(T)).setIn(["filters-settings", e, t, "autoApply"], u).setIn(["filters", e, t, o], T.length === 0 ? [Number.MIN_SAFE_INTEGER] : T).setIn(["filters-settings", e, t, "apply"], null).setIn(["filters-settings", e, t, "lastUserFilterChange"], I);
|
|
129
131
|
}
|
|
130
132
|
case P: {
|
|
131
133
|
const s = Date.now(), { app: e, group: t, param: o, value: n } = a;
|
|
@@ -136,8 +138,8 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
136
138
|
return r.deleteIn(["filters", e, t, o]).setIn(["filters-settings", e, t, "lastUserFilterChange"], s).setIn(["filters-settings", e, t, "parent"], n || null);
|
|
137
139
|
}
|
|
138
140
|
case w: {
|
|
139
|
-
const { app:
|
|
140
|
-
return r.setIn(["filters",
|
|
141
|
+
const s = Date.now(), { app: e, group: t } = a, o = r.getIn(["filters", "initial", e, t]);
|
|
142
|
+
return r.setIn(["filters", e, t], o).setIn(["filters-settings", e, t, "lastUserFilterChange"], s);
|
|
141
143
|
}
|
|
142
144
|
case v: {
|
|
143
145
|
const { app: s, group: e, measure: t } = a;
|
|
@@ -155,7 +157,7 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
155
157
|
const { type: s, group: e, ...t } = a;
|
|
156
158
|
return r.setIn(["posts", e], t);
|
|
157
159
|
}
|
|
158
|
-
case
|
|
160
|
+
case G: {
|
|
159
161
|
const { type: s, group: e, ...t } = a;
|
|
160
162
|
if (t.reset) {
|
|
161
163
|
const { reset: l, ...i } = t;
|
|
@@ -172,7 +174,7 @@ const y = "LOAD_DATA", d = "LOAD_DATA_DONE", O = "LOAD_DATA_ERROR", R = "LOAD_CA
|
|
|
172
174
|
}
|
|
173
175
|
}, Ie = ({ group: r, dispatch: a, initialFilters: s }) => {
|
|
174
176
|
a({
|
|
175
|
-
type:
|
|
177
|
+
type: G,
|
|
176
178
|
group: r,
|
|
177
179
|
...s,
|
|
178
180
|
reset: !0,
|
package/dist/esm/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { components as i, customizer as l, getComponentByNameIgnoreCase as
|
|
1
|
+
import { components as i, customizer as l, getComponentByNameIgnoreCase as x, reducers as d } from "./embeddable/index.js";
|
|
2
2
|
import { Config as c } from "./conf/index.js";
|
|
3
3
|
import { default as C } from "./layout/ResponsiveContainer.js";
|
|
4
4
|
import { default as P } from "./layout/ScrollTop.js";
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
5
|
+
import { default as S } from "./layout/containers/PreviewPageContainer.js";
|
|
6
|
+
import { default as v } from "./layout/containers/PreviewTypeContainer.js";
|
|
7
7
|
import { default as A } from "./layout/containers/SlugContainer.js";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as H } from "./layout/containers/SlugPostContainer.js";
|
|
9
9
|
import { CustomizerWrapper as k } from "./layout/Customizer.js";
|
|
10
10
|
import { default as E } from "./layout/Layout.js";
|
|
11
11
|
import { default as L } from "./layout/PreviewComponent.js";
|
|
12
12
|
import { default as N } from "./layout/Favicon.js";
|
|
13
13
|
import { default as b } from "./layout/SSRFavicon.js";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
14
|
+
import { default as U } from "./layout/Loading.js";
|
|
15
|
+
import { default as z } from "./layout/CustomSemanticSearch.js";
|
|
16
16
|
import { default as J } from "./layout/Header.js";
|
|
17
17
|
import { default as Y } from "./layout/SearchControl.js";
|
|
18
18
|
import { default as j } from "./layout/LangSwitcher.js";
|
|
@@ -21,101 +21,105 @@ import { default as X } from "./layout/ClassicHeader.js";
|
|
|
21
21
|
import { default as $ } from "./layout/FlexWrapDetector.js";
|
|
22
22
|
import { default as re } from "./layout/FloatingMenuHeader.js";
|
|
23
23
|
import { withTracker as te } from "./tracker/withGoogleAnalytics.js";
|
|
24
|
-
import { clearInternalTrafficCookie as fe, isInternalTrafficEnabled as se, setInternalTrafficCookie as pe
|
|
25
|
-
import { default as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
24
|
+
import { clearInternalTrafficCookie as fe, isInternalTrafficEnabled as se, setInternalTrafficCookie as pe } from "./tracker/internalTrafficUtils.js";
|
|
25
|
+
import { default as ne } from "./tracker/InternalTrafficToggle.js";
|
|
26
|
+
import { default as le } from "./tracker/InternalTrafficWatermark.js";
|
|
27
|
+
import { useInternalTrafficBypass as de } from "./tracker/useInternalTrafficBypass.js";
|
|
28
|
+
import { store as ce } from "./redux/store.js";
|
|
29
|
+
import { useAppDispatch as Ce, useAppSelector as ge } from "./redux/hooks.js";
|
|
30
|
+
import { UPDATE as Ie, initialState as Se, intlReducer as he, updateIntl as ve } from "./lib/react-intl-redux/index.js";
|
|
31
|
+
import { combineReducers as Ae } from "./lib/redux-immutable/index.js";
|
|
30
32
|
import * as e from "./translations/en.json.js";
|
|
31
33
|
import * as r from "./translations/fr.json.js";
|
|
32
34
|
import * as o from "./translations/af.json.js";
|
|
33
35
|
import * as t from "./translations/am.json.js";
|
|
34
|
-
import { COUNTRY_OPTIONS as
|
|
35
|
-
import { decodeHtmlEntitiesToHtml as
|
|
36
|
-
import { Media as
|
|
37
|
-
import { getUnhandledProps as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { CategoriesContext as
|
|
36
|
+
import { COUNTRY_OPTIONS as He } from "./countries.js";
|
|
37
|
+
import { decodeHtmlEntitiesToHtml as ke, decodeHtmlEntitiesToText as we, stringToArray as Ee, toBoolean as Fe, toNumber as Le, uriStringToArray as Me } from "./utils/data.js";
|
|
38
|
+
import { Media as Oe, MediaContextProvider as be, mediaStyle as Be } from "./utils/AppMedia.js";
|
|
39
|
+
import { getUnhandledProps as We, htmlImageProps as ze, htmlInputAttrs as Ke, htmlInputEvents as Je, htmlInputProps as Ve, partitionHTMLProps as Ye, useKeyOnly as _e, useValueAndKey as je } from "./utils/semanticUtils.js";
|
|
40
|
+
import { default as Ge, useDataContext as Qe } from "./embeddable/data/DataConsumer.js";
|
|
41
|
+
import { default as Ze } from "./embeddable/data/DataProvider.js";
|
|
42
|
+
import { CategoriesContext as er, DataContext as rr, PostsContext as or } from "./embeddable/data/DataContext.js";
|
|
41
43
|
import "react/jsx-runtime";
|
|
42
44
|
import "react";
|
|
43
45
|
import "./embeddable/data/CategoriesProvider.js";
|
|
44
|
-
import { compareJsonProps as
|
|
46
|
+
import { compareJsonProps as ar, decode as fr, parse as sr } from "./embeddable/utils/parseUtils.js";
|
|
45
47
|
import * as p from "./embeddable/reducers/data.js";
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
+
import { default as mr } from "./lib/react-intl-redux/providers/Provider.js";
|
|
49
|
+
import { default as ir } from "./lib/react-intl-redux/providers/IntlProvider.js";
|
|
48
50
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
He as COUNTRY_OPTIONS,
|
|
52
|
+
er as CategoriesContext,
|
|
51
53
|
X as ClassicHeader,
|
|
52
54
|
c as Config,
|
|
53
|
-
|
|
55
|
+
z as CustomSemanticSearch,
|
|
54
56
|
k as CustomizerWrapper,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
Ge as DataConsumer,
|
|
58
|
+
rr as DataContext,
|
|
59
|
+
Ze as DataProvider,
|
|
58
60
|
N as Favicon,
|
|
59
61
|
$ as FlexWrapDetector,
|
|
60
62
|
re as FloatingMenuHeader,
|
|
61
63
|
G as Footer,
|
|
62
64
|
J as Header,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
ne as InternalTrafficToggle,
|
|
66
|
+
le as InternalTrafficWatermark,
|
|
67
|
+
ir as IntlProvider,
|
|
65
68
|
j as LangSwitcher,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
U as Loading,
|
|
70
|
+
Oe as Media,
|
|
71
|
+
be as MediaContextProvider,
|
|
72
|
+
or as PostsContext,
|
|
70
73
|
L as PreviewComponent,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
S as PreviewPageContainer,
|
|
75
|
+
v as PreviewTypeContainer,
|
|
76
|
+
mr as Provider,
|
|
74
77
|
C as ResponsiveContainer,
|
|
75
78
|
E as RootLayout,
|
|
76
79
|
b as SSRFavicon,
|
|
77
80
|
P as ScrollToTop,
|
|
78
81
|
Y as SearchControl,
|
|
79
82
|
A as SlugContainer,
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
H as SlugPostContainer,
|
|
84
|
+
Ie as UPDATE,
|
|
82
85
|
o as afrikaansTranslations,
|
|
83
86
|
t as amharicTranslations,
|
|
84
87
|
fe as clearInternalTrafficCookie,
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
Ae as combineReducers,
|
|
89
|
+
ar as compareJsonProps,
|
|
87
90
|
i as components,
|
|
88
91
|
l as customizer,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
fr as decode,
|
|
93
|
+
ke as decodeHtmlEntitiesToHtml,
|
|
94
|
+
we as decodeHtmlEntitiesToText,
|
|
92
95
|
e as englishTranslations,
|
|
93
96
|
r as frenchTranslations,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
x as getComponentByNameIgnoreCase,
|
|
98
|
+
We as getUnhandledProps,
|
|
99
|
+
ze as htmlImageProps,
|
|
100
|
+
Ke as htmlInputAttrs,
|
|
101
|
+
Je as htmlInputEvents,
|
|
102
|
+
Ve as htmlInputProps,
|
|
103
|
+
Se as initialState,
|
|
104
|
+
he as intlReducer,
|
|
102
105
|
se as isInternalTrafficEnabled,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
Be as mediaStyle,
|
|
107
|
+
sr as parse,
|
|
108
|
+
Ye as partitionHTMLProps,
|
|
106
109
|
p as reducer,
|
|
107
|
-
|
|
110
|
+
d as reducers,
|
|
108
111
|
pe as setInternalTrafficCookie,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
ce as store,
|
|
113
|
+
Ee as stringToArray,
|
|
114
|
+
Fe as toBoolean,
|
|
115
|
+
Le as toNumber,
|
|
116
|
+
ve as updateIntl,
|
|
117
|
+
Me as uriStringToArray,
|
|
118
|
+
Ce as useAppDispatch,
|
|
119
|
+
ge as useAppSelector,
|
|
120
|
+
Qe as useDataContext,
|
|
121
|
+
de as useInternalTrafficBypass,
|
|
122
|
+
_e as useKeyOnly,
|
|
123
|
+
je as useValueAndKey,
|
|
120
124
|
te as withTracker
|
|
121
125
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
const R = ({ children: f, onWrapChange: o, className: u }) => {
|
|
5
|
-
const e =
|
|
2
|
+
import { useRef as h, useState as v, useCallback as p, useEffect as l } from "react";
|
|
3
|
+
import c from "../utils/deviceType.js";
|
|
4
|
+
const R = ({ children: f, onWrapChange: o, className: u, isMobileOrTablet: d }) => {
|
|
5
|
+
const e = h(null), [t, m] = v(0), a = d ?? (c() === "mobile" || c() === "tablet" || c() === "midTablet"), i = p(() => {
|
|
6
6
|
e.current && (e.current.style.setProperty("display", "flex", "important"), t > 0 || a ? e.current.style.setProperty(
|
|
7
7
|
"flex-wrap",
|
|
8
8
|
"wrap",
|
|
@@ -16,16 +16,16 @@ const R = ({ children: f, onWrapChange: o, className: u }) => {
|
|
|
16
16
|
const n = e.current;
|
|
17
17
|
let s = 0;
|
|
18
18
|
if (n && n.children.length > 1) {
|
|
19
|
-
const
|
|
20
|
-
Array.from(n.children).forEach((
|
|
21
|
-
|
|
19
|
+
const w = n.children[0].getBoundingClientRect().top;
|
|
20
|
+
Array.from(n.children).forEach((y, b) => {
|
|
21
|
+
b > 0 && y.getBoundingClientRect().top > w && s++;
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
s !== t &&
|
|
24
|
+
s !== t && m(s);
|
|
25
25
|
}, [t]);
|
|
26
|
-
return
|
|
26
|
+
return l(() => (r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r)), [r]), l(() => {
|
|
27
27
|
o && o(t);
|
|
28
|
-
}, [t, o]),
|
|
28
|
+
}, [t, o]), l(() => {
|
|
29
29
|
i();
|
|
30
30
|
}, [i]), /* @__PURE__ */ x("div", { ref: e, className: u, children: [
|
|
31
31
|
i(),
|