@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.
Files changed (68) hide show
  1. package/dist/cjs/common.css +1 -1
  2. package/dist/cjs/conf/index.js +1 -1
  3. package/dist/cjs/embeddable/big-number-trend/Alternative.js +1 -1
  4. package/dist/cjs/embeddable/big-number-trend/BigNumberTrendContainer.js +1 -0
  5. package/dist/cjs/embeddable/big-number-trend/Classic.js +1 -1
  6. package/dist/cjs/embeddable/big-number-trend/useBigNumberTrendData.js +1 -0
  7. package/dist/cjs/embeddable/chart/Bar.js +1 -1
  8. package/dist/cjs/embeddable/chart/Messages.js +2 -2
  9. package/dist/cjs/embeddable/chart/data/Line.js +1 -1
  10. package/dist/cjs/embeddable/chart/data/Utils.js +1 -1
  11. package/dist/cjs/embeddable/chart/index.js +1 -1
  12. package/dist/cjs/embeddable/d3Map/index.js +1 -1
  13. package/dist/cjs/embeddable/data/CategoriesProvider.js +1 -1
  14. package/dist/cjs/embeddable/data/DataConsumer.js +1 -1
  15. package/dist/cjs/embeddable/data/DataProvider.js +1 -1
  16. package/dist/cjs/embeddable/featuredtabs/index.js +1 -1
  17. package/dist/cjs/embeddable/map/index.js +2 -2
  18. package/dist/cjs/embeddable/reducers/data.js +1 -1
  19. package/dist/cjs/index.js +1 -1
  20. package/dist/cjs/layout/FlexWrapDetector.js +1 -1
  21. package/dist/cjs/styles.css +1 -1
  22. package/dist/cjs/tracker/InternalTrafficToggle.js +1 -1
  23. package/dist/cjs/tracker/InternalTrafficWatermark.js +1 -0
  24. package/dist/cjs/tracker/index.js +1 -1
  25. package/dist/cjs/tracker/internalTrafficUtils.js +1 -1
  26. package/dist/cjs/tracker/useInternalTrafficBypass.js +1 -0
  27. package/dist/esm/common.css +1 -1
  28. package/dist/esm/conf/index.js +1 -2
  29. package/dist/esm/embeddable/big-number-trend/Alternative.js +62 -211
  30. package/dist/esm/embeddable/big-number-trend/BigNumberTrendContainer.js +125 -0
  31. package/dist/esm/embeddable/big-number-trend/Classic.js +51 -181
  32. package/dist/esm/embeddable/big-number-trend/index.js +8 -8
  33. package/dist/esm/embeddable/big-number-trend/useBigNumberTrendData.js +49 -0
  34. package/dist/esm/embeddable/chart/Bar.js +464 -471
  35. package/dist/esm/embeddable/chart/Messages.js +18 -15
  36. package/dist/esm/embeddable/chart/data/Line.js +1 -4
  37. package/dist/esm/embeddable/chart/data/Utils.js +0 -1
  38. package/dist/esm/embeddable/chart/index.js +363 -359
  39. package/dist/esm/embeddable/d3Map/index.js +129 -125
  40. package/dist/esm/embeddable/data/CategoriesProvider.js +31 -38
  41. package/dist/esm/embeddable/data/DataConsumer.js +12 -8
  42. package/dist/esm/embeddable/data/DataProvider.js +62 -124
  43. package/dist/esm/embeddable/featuredtabs/index.js +64 -61
  44. package/dist/esm/embeddable/map/index.js +42 -42
  45. package/dist/esm/embeddable/reducers/data.js +46 -44
  46. package/dist/esm/index.js +71 -67
  47. package/dist/esm/layout/FlexWrapDetector.js +10 -10
  48. package/dist/esm/styles.css +1 -1
  49. package/dist/esm/tracker/InternalTrafficToggle.js +21 -73
  50. package/dist/esm/tracker/InternalTrafficWatermark.js +67 -0
  51. package/dist/esm/tracker/index.js +11 -8
  52. package/dist/esm/tracker/internalTrafficUtils.js +9 -10
  53. package/dist/esm/tracker/useInternalTrafficBypass.js +34 -0
  54. package/dist/types/conf/index.d.ts +0 -1
  55. package/dist/types/embeddable/big-number-trend/Alternative.d.ts +2 -4
  56. package/dist/types/embeddable/big-number-trend/BigNumberTrendContainer.d.ts +5 -0
  57. package/dist/types/embeddable/big-number-trend/Classic.d.ts +2 -4
  58. package/dist/types/embeddable/big-number-trend/useBigNumberTrendData.d.ts +21 -0
  59. package/dist/types/embeddable/chart/Bar.d.ts +1 -2
  60. package/dist/types/embeddable/data/DataConsumer.d.ts +5 -2
  61. package/dist/types/embeddable/data/DataProvider.d.ts +18 -3
  62. package/dist/types/layout/FlexWrapDetector.d.ts +2 -1
  63. package/dist/types/tracker/InternalTrafficToggle.d.ts +0 -1
  64. package/dist/types/tracker/InternalTrafficWatermark.d.ts +13 -0
  65. package/dist/types/tracker/index.d.ts +2 -0
  66. package/dist/types/tracker/internalTrafficUtils.d.ts +0 -7
  67. package/dist/types/tracker/useInternalTrafficBypass.d.ts +13 -0
  68. 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 R;
20
+ var B;
21
21
  const {
22
22
  unique: c,
23
23
  editing: s,
24
- "data-filters": P = "{}",
24
+ "data-filters": k = "{}",
25
25
  "data-app": i = "csv",
26
- "data-csv": k = "",
27
- "data-dimension1": E = "",
28
- "data-dimension2": M = "",
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 = "NIDS",
32
+ "data-data-source-text": W = "",
33
33
  "data-data-source-label": G = "Source",
34
- "data-national-average-label": j = "National Prevalence Avg",
35
- "data-legend-title": Z = "Tobacco Prevalence Rate",
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": g = !1,
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": v = "false",
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": y = "false",
47
- "data-show-tooltip": C = "true",
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": ba = "",
73
- "data-tooltip-format": ga = `{locationName} %({value},2)
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": va = "{}",
78
- "data-main-layer-id": ya = "",
79
- "data-enabled-layers": Ca,
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, Ra = (a) => s ? a : decodeURIComponent(a), o = (a) => {
99
+ } = n, Ba = (a) => s ? a : decodeURIComponent(a), o = (a) => {
100
100
  try {
101
101
  if (a)
102
- return JSON.parse(Ra(a));
102
+ return JSON.parse(Ba(a));
103
103
  } catch {
104
104
  console.error("error parsing value:" + a);
105
105
  }
106
106
  return null;
107
- }, Ba = (a) => {
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
- }, Pa = (a) => {
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((B) => B != null && B.toString().trim() != "").length > 0 && (e[m.param] = m.value);
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
- }, ka = {
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 b = o(Ca) || [];
124
- b = b.map((a) => (a.bgColor = decodeURIComponent(a.bgColor), a.fontColor = decodeURIComponent(a.fontColor), a));
125
- const x = Ja.find((a) => a.value === $), A = v == !0 || v == "true";
126
- let l = [E, M].filter((a) => a != "none" && a != null).join("/");
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: Ba(H),
142
+ legendBreaks: Ra(H),
143
143
  mapLabelField: q,
144
- zoomEnabled: g == !0 || g == "true",
144
+ zoomEnabled: b == !0 || b == "true",
145
145
  showLegendLabels: h == !0 || h == "true",
146
146
  multipleMeasures: A,
147
147
  app: i,
148
- mapLabelShowValue: y == !0 || y == "true",
149
- showTooltip: C == !0 || C == "true",
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: ka,
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: ba,
173
- tooltipFormat: ga,
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(va),
178
- mainLayerId: ya,
179
- enabledLayers: b,
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 = (R = a.apiField) == null ? void 0 : R.toLowerCase());
197
+ a && (a != null && a.apiField) && (l = (B = a.apiField) == null ? void 0 : B.toLowerCase());
198
198
  }
199
- const Ea = o(xa) || {}, Ma = i === "csv" ? Ha : Za, Oa = s ? (o(u) || []).join(",") : u, U = Pa(P);
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(k),
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
- Ma,
211
+ Pa,
212
212
  {
213
213
  measures: Oa,
214
214
  multipleMeasures: A,
215
215
  mapType: z,
216
216
  aggregationFormula: Da,
217
- customMeasureLabels: Ea,
217
+ customMeasureLabels: Ma,
218
218
  source: l,
219
219
  children: /* @__PURE__ */ r(ja, { ...d })
220
220
  }
@@ -1,18 +1,18 @@
1
- import { getData as j, getCategory as J, getCategories as V } from "./data-api.js";
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", O = "LOAD_DATA_ERROR", R = "LOAD_CATEGORIES", L = "LOAD_CATEGORIES_DONE", D = "LOAD_CATEGORIES_ERROR", F = "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", b = "SET_INITIAL_POSTS_FILTER", X = ({ app: r, group: a }) => (s, e) => {
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: c, dvzProxyDatasetId: p }) => (g, I) => {
12
- const E = { ...o };
13
- E[n] = i, J({ app: r, params: E, type: a }).then(
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
- g({
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: c,
24
- dvzProxyDatasetId: p,
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: R, params: t, app: e, uniqueStorage: n, dvzProxyDatasetId: o }), V({ app: e, params: t }).then((l) => (l.appliedFilters = t, a({
43
- type: L,
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: D,
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 }), c = i.data.filter((g) => {
59
- let I = !1;
60
- return Object.keys(t).forEach((E) => {
61
- const f = t[E];
62
- if (g[E]) {
63
- const S = g[E].toString().trim().toLowerCase();
64
- I = f.filter((_) => _ && _.toString().trim().toLowerCase() == S).length == 0;
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
- }), !I;
67
- }), p = { ...i, data: c, appliedFilters: t };
68
- o({ type: d, app: r, group: a, store: e, data: { count: p.data.length, itemsSize: p.data.length, ...p } });
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 c = s().get("data").getIn(["filters", e, t]);
72
- i && l && Object.keys(l).forEach((I) => {
73
- if (c && c.has(I)) {
74
- let E = l[I], S = c.get(I).filter((_) => E.indexOf(_) > -1);
75
- c = c.set(I, S);
76
- }
77
- });
78
- let p = { ...l };
79
- c && (p = { ...p, ...c.toJS() }), a({ type: y, app: e, group: t, params: p, store: n }), j({ app: e, source: o, params: p }).then((g) => (g.appliedFilters = p, a({ type: d, app: e, group: t, store: n, data: g, params: p }))).catch((g) => a({ type: O, app: e, group: t, store: n, error: g }));
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: F, data: r });
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 O: {
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 F: {
98
+ case L: {
97
99
  const { data: s } = a;
98
100
  return r.setIn(["pageModuleProps"], s);
99
101
  }
100
- case R: {
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 L: {
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 D: {
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: c, autoApply: p } = a, g = Date.now(), I = ["categories", e];
126
- l && I.push(l), n && I.push(n);
127
- const E = s.filter((u) => u.type == i), S = r.getIn([...I, "items"]).filter((u) => u.get("type") == i).get(0).get("items").map((u) => u.value), x = r.getIn([...I, "items"]).filter((u) => u.get("type") != i).push(A.Map(E[0])), G = r.getIn(["filters", e, t, o]), m = s[0].items.map((u) => u.value), z = G.filter((u) => m.indexOf(u) > -1), q = m.filter((u) => S.indexOf(u) == -1), T = Array.from(/* @__PURE__ */ new Set([...z, ...q]));
128
- return r.setIn([...I, "items"], x).setIn(["filters", e, t, o], Array.from(T)).setIn(["filters-settings", e, t, "autoApply"], p).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"], g);
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: s, group: e } = a, t = r.getIn(["filters", "initial", s, e]);
140
- return r.setIn(["filters", s, e], t);
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 b: {
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: b,
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 d, reducers as x } from "./embeddable/index.js";
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 h } from "./layout/containers/PreviewPageContainer.js";
6
- import { default as I } from "./layout/containers/PreviewTypeContainer.js";
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 D } from "./layout/containers/SlugPostContainer.js";
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 z } from "./layout/Loading.js";
15
- import { default as K } from "./layout/CustomSemanticSearch.js";
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, validateToken as me } from "./tracker/internalTrafficUtils.js";
25
- import { default as ie } from "./tracker/InternalTrafficToggle.js";
26
- import { store as de } from "./redux/store.js";
27
- import { useAppDispatch as ue, useAppSelector as ce } from "./redux/hooks.js";
28
- import { UPDATE as Ce, initialState as ge, intlReducer as Pe, updateIntl as Se } from "./lib/react-intl-redux/index.js";
29
- import { combineReducers as ve } from "./lib/redux-immutable/index.js";
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 ye } from "./countries.js";
35
- import { decodeHtmlEntitiesToHtml as He, decodeHtmlEntitiesToText as De, stringToArray as Re, toBoolean as ke, toNumber as we, uriStringToArray as Ee } from "./utils/data.js";
36
- import { Media as Le, MediaContextProvider as Me, mediaStyle as Ne } from "./utils/AppMedia.js";
37
- import { getUnhandledProps as be, htmlImageProps as Ue, htmlInputAttrs as ze, htmlInputEvents as Be, htmlInputProps as Ke, partitionHTMLProps as We, useKeyOnly as Je, useValueAndKey as Ve } from "./utils/semanticUtils.js";
38
- import { default as _e } from "./embeddable/data/DataConsumer.js";
39
- import { default as qe } from "./embeddable/data/DataProvider.js";
40
- import { CategoriesContext as Qe, DataContext as Xe, PostsContext as Ze } from "./embeddable/data/DataContext.js";
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 er, decode as rr, parse as or } from "./embeddable/utils/parseUtils.js";
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 ar } from "./lib/react-intl-redux/providers/Provider.js";
47
- import { default as sr } from "./lib/react-intl-redux/providers/IntlProvider.js";
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
- ye as COUNTRY_OPTIONS,
50
- Qe as CategoriesContext,
51
+ He as COUNTRY_OPTIONS,
52
+ er as CategoriesContext,
51
53
  X as ClassicHeader,
52
54
  c as Config,
53
- K as CustomSemanticSearch,
55
+ z as CustomSemanticSearch,
54
56
  k as CustomizerWrapper,
55
- _e as DataConsumer,
56
- Xe as DataContext,
57
- qe as DataProvider,
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
- ie as InternalTrafficToggle,
64
- sr as IntlProvider,
65
+ ne as InternalTrafficToggle,
66
+ le as InternalTrafficWatermark,
67
+ ir as IntlProvider,
65
68
  j as LangSwitcher,
66
- z as Loading,
67
- Le as Media,
68
- Me as MediaContextProvider,
69
- Ze as PostsContext,
69
+ U as Loading,
70
+ Oe as Media,
71
+ be as MediaContextProvider,
72
+ or as PostsContext,
70
73
  L as PreviewComponent,
71
- h as PreviewPageContainer,
72
- I as PreviewTypeContainer,
73
- ar as Provider,
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
- D as SlugPostContainer,
81
- Ce as UPDATE,
83
+ H as SlugPostContainer,
84
+ Ie as UPDATE,
82
85
  o as afrikaansTranslations,
83
86
  t as amharicTranslations,
84
87
  fe as clearInternalTrafficCookie,
85
- ve as combineReducers,
86
- er as compareJsonProps,
88
+ Ae as combineReducers,
89
+ ar as compareJsonProps,
87
90
  i as components,
88
91
  l as customizer,
89
- rr as decode,
90
- He as decodeHtmlEntitiesToHtml,
91
- De as decodeHtmlEntitiesToText,
92
+ fr as decode,
93
+ ke as decodeHtmlEntitiesToHtml,
94
+ we as decodeHtmlEntitiesToText,
92
95
  e as englishTranslations,
93
96
  r as frenchTranslations,
94
- d as getComponentByNameIgnoreCase,
95
- be as getUnhandledProps,
96
- Ue as htmlImageProps,
97
- ze as htmlInputAttrs,
98
- Be as htmlInputEvents,
99
- Ke as htmlInputProps,
100
- ge as initialState,
101
- Pe as intlReducer,
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
- Ne as mediaStyle,
104
- or as parse,
105
- We as partitionHTMLProps,
106
+ Be as mediaStyle,
107
+ sr as parse,
108
+ Ye as partitionHTMLProps,
106
109
  p as reducer,
107
- x as reducers,
110
+ d as reducers,
108
111
  pe as setInternalTrafficCookie,
109
- de as store,
110
- Re as stringToArray,
111
- ke as toBoolean,
112
- we as toNumber,
113
- Se as updateIntl,
114
- Ee as uriStringToArray,
115
- ue as useAppDispatch,
116
- ce as useAppSelector,
117
- Je as useKeyOnly,
118
- Ve as useValueAndKey,
119
- me as validateToken,
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 b, useState as h, useCallback as p, useEffect as c } from "react";
3
- import l from "../utils/deviceType.js";
4
- const R = ({ children: f, onWrapChange: o, className: u }) => {
5
- const e = b(null), [t, d] = h(0), a = l() === "mobile" || l() === "tablet" || l() === "midTablet", i = p(() => {
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 m = n.children[0].getBoundingClientRect().top;
20
- Array.from(n.children).forEach((w, y) => {
21
- y > 0 && w.getBoundingClientRect().top > m && s++;
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 && d(s);
24
+ s !== t && m(s);
25
25
  }, [t]);
26
- return c(() => (r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r)), [r]), c(() => {
26
+ return l(() => (r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r)), [r]), l(() => {
27
27
  o && o(t);
28
- }, [t, o]), c(() => {
28
+ }, [t, o]), l(() => {
29
29
  i();
30
30
  }, [i]), /* @__PURE__ */ x("div", { ref: e, className: u, children: [
31
31
  i(),