@devgateway/dvz-ui-react 1.9.10 → 1.9.12

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,28 +1,14 @@
1
1
  import * as L from "topojson-client";
2
2
  import x from "geostats";
3
3
  import y from "../../utils/deviceType.js";
4
- const w = "_Color_", M = "location", k = "showAll", A = "ifUnitHasData", j = 10, B = {
5
- mobile: 4,
6
- tablet: 4,
7
- midTablet: 2,
8
- laptop: 2,
9
- desktop: 2,
10
- wide: 2
11
- }, I = {
4
+ const A = "_Color_", I = "location", j = "showAll", w = "ifUnitHasData", C = 10, _ = {
12
5
  mobile: 330,
13
6
  tablet: 250,
14
7
  midTablet: 250,
15
8
  laptop: 200,
16
9
  desktop: 100,
17
10
  wide: 100
18
- }, _ = {
19
- mobile: 250,
20
- tablet: 250,
21
- midTablet: 250,
22
- laptop: 0,
23
- desktop: 0,
24
- wide: 0
25
- }, C = {
11
+ }, O = {
26
12
  greens: [
27
13
  "#ccffdd",
28
14
  "#b3ffcc",
@@ -96,148 +82,146 @@ const w = "_Color_", M = "location", k = "showAll", A = "ifUnitHasData", j = 10,
96
82
  "#0055ff"
97
83
  ]
98
84
  };
99
- function v(e, r, l) {
100
- var t;
101
- if (!(e != null && e.length)) return r;
102
- const o = ((t = e[0]) == null ? void 0 : t.items) ?? [], n = (i) => (i == null ? void 0 : i.trim().toLowerCase()) ?? "", s = n(r), c = n(l).toUpperCase(), f = o.find((i) => n(i.value) === s || n(i.code) === s) ?? null;
103
- if (!f) return r;
104
- const a = c && f.labels && f.labels[c] ? f.labels[c] : f.value;
105
- return (a == null ? void 0 : a.trim()) || f.value.trim();
85
+ function v(e, t, l) {
86
+ var r;
87
+ if (!(e != null && e.length)) return t;
88
+ const f = ((r = e[0]) == null ? void 0 : r.items) ?? [], n = (i) => (i == null ? void 0 : i.trim().toLowerCase()) ?? "", s = n(t), c = n(l).toUpperCase(), o = f.find((i) => n(i.value) === s || n(i.code) === s) ?? null;
89
+ if (!o) return t;
90
+ const a = c && o.labels && o.labels[c] ? o.labels[c] : o.value;
91
+ return (a == null ? void 0 : a.trim()) || o.value.trim();
106
92
  }
107
93
  function D(e) {
108
- let r = e;
109
- return r || (r = ["mobile", "tablet", "midTablet"].includes(y())), r ? "active zoom-enabled" : "active";
94
+ let t = e;
95
+ return t || (t = ["mobile", "tablet", "midTablet"].includes(y())), t ? "active zoom-enabled" : "active";
110
96
  }
111
- function E(e, r) {
112
- const { autoGenerateBreaks: l, numberOfBreaks: o, colorScheme: n } = r, s = [];
97
+ function M(e, t) {
98
+ const { autoGenerateBreaks: l, numberOfBreaks: f, colorScheme: n } = t, s = [];
113
99
  if (l && e && e.length > 0) {
114
- const c = e.filter((t) => t.properties && t.properties.value != null).map((t) => t.properties.value.toFixed(2)), f = [];
115
- c.forEach((t) => {
116
- if (t > 0) {
117
- const i = t * 0.99, p = t * 1.01;
118
- f.indexOf(i) === -1 && f.push(i), f.indexOf(p) === -1 && f.push(p);
100
+ const c = e.filter((r) => r.properties && r.properties.value != null).map((r) => r.properties.value.toFixed(2)), o = [];
101
+ c.forEach((r) => {
102
+ if (r > 0) {
103
+ const i = r * 0.99, u = r * 1.01;
104
+ o.indexOf(i) === -1 && o.push(i), o.indexOf(u) === -1 && o.push(u);
119
105
  }
120
106
  });
121
- const a = C[n];
122
- if (f.length > 0) {
123
- const t = new x(f);
124
- t.setPrecision(2);
125
- const i = f.length > 1 ? f.length - 1 : f.length;
126
- return t.getJenks(Math.min(o, i)), t.ranges.forEach((p, u) => {
107
+ const a = O[n];
108
+ if (o.length > 0) {
109
+ const r = new x(o);
110
+ r.setPrecision(2);
111
+ const i = o.length > 1 ? o.length - 1 : o.length;
112
+ return r.getJenks(Math.min(f, i)), r.ranges.forEach((u, p) => {
127
113
  const b = {};
128
- b.min = parseFloat(p.substr(0, p.indexOf("-") - 1)) + (u > 0 ? 0.01 : 0), b.max = parseFloat(p.substr(p.indexOf("-") + 2, p.length)), b.color = a[u], s.push(b);
114
+ b.min = parseFloat(u.substr(0, u.indexOf("-") - 1)) + (p > 0 ? 0.01 : 0), b.max = parseFloat(u.substr(u.indexOf("-") + 2, u.length)), b.color = a[p], s.push(b);
129
115
  }), s;
130
116
  }
131
117
  }
132
118
  return s;
133
119
  }
134
- function H(e, r, l) {
135
- const { mapNoDataColor: o, mainLayerId: n, enabledLayers: s, selectedMeasure: c } = l;
120
+ function T(e, t, l) {
121
+ const { mapNoDataColor: f, mainLayerId: n, enabledLayers: s, selectedMeasure: c } = l;
136
122
  if (e.properties && e.properties.variables && c && e.properties.value != null) {
137
- const a = w + c, t = e.properties.variables[a.trim()];
138
- if (t) return t;
123
+ const a = A + c, r = e.properties.variables[a.trim()];
124
+ if (r) return r;
139
125
  }
140
126
  if (e.properties.value != null && (n && e.properties.layerId === n || !n)) {
141
- const a = r.find((t) => t.min != null && t.max != null ? e.properties.value >= t.min && e.properties.value <= t.max : t.min != null ? e.properties.value >= t.min : t.max != null ? e.properties.value <= t.max : !1);
142
- return a && a.color ? a.color : o;
127
+ const a = t.find((r) => r.min != null && r.max != null ? e.properties.value >= r.min && e.properties.value <= r.max : r.min != null ? e.properties.value >= r.min : r.max != null ? e.properties.value <= r.max : !1);
128
+ return a && a.color ? a.color : f;
143
129
  }
144
- const f = s.filter((a) => a.id === e.properties.layerId)[0];
145
- return f && f.bgColor && f.bgColor != "undefined" ? f.bgColor : o;
130
+ const o = s.filter((a) => a.id === e.properties.layerId)[0];
131
+ return o && o.bgColor && o.bgColor != "undefined" ? o.bgColor : f;
146
132
  }
147
- function S(e, r) {
148
- if (e.properties[r]) {
149
- const o = e.properties[r].length;
150
- return o < 10 ? 80 : o * 8;
133
+ function E(e, t) {
134
+ if (e.properties[t]) {
135
+ const f = e.properties[t].length;
136
+ return f < 10 ? 80 : f * 8;
151
137
  }
152
138
  return 0;
153
139
  }
154
- function R(e) {
140
+ function H(e) {
155
141
  return e ? 30 : 25;
156
142
  }
157
- function O(e, r) {
143
+ function k(e, t) {
158
144
  if (e && e.objects) {
159
145
  const l = Object.keys(e.objects);
160
- for (const o in l) {
161
- const n = l[o];
146
+ for (const f in l) {
147
+ const n = l[f];
162
148
  if (e.objects[n].type == "GeometryCollection")
163
149
  return n;
164
150
  }
165
151
  }
166
- return r;
152
+ return t;
167
153
  }
168
- function W(e, r) {
169
- const l = O(e, r);
154
+ function S(e, t) {
155
+ const l = k(e, t);
170
156
  return e && e.objects && e.objects[l] ? L.feature(e, e.objects[l]).features : e && e.features ? e.features : [];
171
157
  }
172
- function U(e, r, l) {
158
+ function R(e, t, l) {
173
159
  if (e.properties.displayLayerLabels && e.properties.layerLocale) {
174
- const o = e.properties.layerMappingField || r, n = e.properties[o];
160
+ const f = e.properties.layerMappingField || t, n = e.properties[f];
175
161
  return v(l, n, e.properties.layerLocale);
176
162
  }
177
- return e.properties[r];
163
+ return e.properties[t];
178
164
  }
179
- function z(e, r, l, o) {
165
+ function U(e, t, l, f) {
180
166
  const {
181
167
  mapLabelField: n,
182
168
  mapLabelShowValue: s,
183
169
  intl: c,
184
- valueFormat: f,
170
+ valueFormat: o,
185
171
  showNoDataLabel: a,
186
- showAdminUnitLabel: t,
172
+ showAdminUnitLabel: r,
187
173
  noDataText: i,
188
- selectedMeasure: p
189
- } = r;
190
- let u = "";
191
- if (t == k || t == A && e.properties.hasDataRow || e.properties.displayLayerLabels) {
192
- const b = e.properties.displayLayerLabels && e.properties.layerMappingField ? e.properties.layerMappingField : n, d = e.properties[b], h = e.properties.layerLocale || (c == null ? void 0 : c.locale);
193
- u = v(l, d, h);
194
- const g = e.properties.abbrev;
195
- if (u && u.length > j && g && (u = g), s)
174
+ selectedMeasure: u
175
+ } = t;
176
+ let p = "";
177
+ if (r == j || r == w && e.properties.hasDataRow || e.properties.displayLayerLabels) {
178
+ const b = e.properties.displayLayerLabels && e.properties.layerMappingField ? e.properties.layerMappingField : n, g = e.properties[b], d = e.properties.layerLocale || (c == null ? void 0 : c.locale);
179
+ p = v(l, g, d);
180
+ const h = e.properties.abbrev;
181
+ if (p && p.length > C && h && (p = h), s)
196
182
  if (e.properties.value != null) {
197
183
  const m = e.properties.variables || {};
198
- u += "<br><span class='map-label-value'>" + o(
199
- f,
200
- { value: e.properties.value, measure: p, ...m },
184
+ p += "<br><span class='map-label-value'>" + f(
185
+ o,
186
+ { value: e.properties.value, measure: u, ...m },
201
187
  c
202
188
  ) + "</span>";
203
- } else a == !0 && e.properties.value == null && e.properties.hasDataRow && (u += "<br><span class='map-label-value'>" + i + "</span>");
189
+ } else a == !0 && e.properties.value == null && e.properties.hasDataRow && (p += "<br><span class='map-label-value'>" + i + "</span>");
204
190
  }
205
- return u;
191
+ return p;
206
192
  }
207
- function G(e) {
208
- const r = {};
193
+ function W(e) {
194
+ const t = {};
209
195
  return e && Object.keys(e).forEach((l) => {
210
- const o = e[l];
211
- o && (r[l] = Array.isArray(o) ? o.join(" ,") : o);
212
- }), r;
196
+ const f = e[l];
197
+ f && (t[l] = Array.isArray(f) ? f.join(" ,") : f);
198
+ }), t;
213
199
  }
214
- function N(e, r, l) {
215
- const o = e ? e.value : null;
216
- if (o != null) {
217
- const n = r.find((s) => s.min != null && s.max != null ? o >= s.min && o <= s.max : s.min != null ? o >= s.min : s.max != null ? o <= s.max : !1);
200
+ function z(e, t, l) {
201
+ const f = e ? e.value : null;
202
+ if (f != null) {
203
+ const n = t.find((s) => s.min != null && s.max != null ? f >= s.min && f <= s.max : s.min != null ? f >= s.min : s.max != null ? f <= s.max : !1);
218
204
  return n && n.color ? n.color : l;
219
205
  }
220
206
  return l;
221
207
  }
222
208
  export {
223
- w as COLOR_VARIABLE,
224
- M as LOCATION,
225
- j as MAX_LABEL_LEN,
226
- k as SHOW_ALL,
227
- A as SHOW_IF_HAS_DATA,
209
+ A as COLOR_VARIABLE,
210
+ I as LOCATION,
211
+ C as MAX_LABEL_LEN,
212
+ j as SHOW_ALL,
213
+ w as SHOW_IF_HAS_DATA,
228
214
  D as classColor,
229
- z as createLabel,
230
- I as deviceMapHeight,
231
- _ as deviceMapWidth,
232
- B as deviceTranslateMap,
233
- W as extractFeatures,
234
- H as fillColor,
235
- E as generateBreaks,
236
- O as getCollectionField,
237
- G as getFilters,
238
- N as getHighlightedLocationColor,
239
- R as getLabelBoxHeight,
240
- S as getLabelBoxWidth,
215
+ U as createLabel,
216
+ _ as deviceMapHeight,
217
+ S as extractFeatures,
218
+ T as fillColor,
219
+ M as generateBreaks,
220
+ k as getCollectionField,
221
+ W as getFilters,
222
+ z as getHighlightedLocationColor,
223
+ H as getLabelBoxHeight,
224
+ E as getLabelBoxWidth,
241
225
  v as getTranslatedItemLabel,
242
- U as getTranslatedLocationName
226
+ R as getTranslatedLocationName
243
227
  };
@@ -1,65 +1,65 @@
1
- import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
- import y, { useState as v, useRef as V, useEffect as I } from "react";
3
- import { Container as f, Accordion as p, Icon as W, Menu as T, Grid as w, Label as M, Button as q } from "semantic-ui-react";
4
- import { PostProvider as z, PostConsumer as N, MediaProvider as P, MediaConsumer as A, PostIcon as k, PostLabel as L } from "@devgateway/wp-react-lib";
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
+ import I, { useState as w, useRef as G, useEffect as x } from "react";
3
+ import { Container as b, Accordion as y, Icon as V, Menu as T, Grid as v, Label as M, Button as W } from "semantic-ui-react";
4
+ import { PostProvider as q, PostConsumer as _, MediaProvider as P, MediaConsumer as A, PostIcon as $, PostLabel as k } from "@devgateway/wp-react-lib";
5
5
  import { injectIntl as E } from "react-intl";
6
6
  import { connect as O } from "react-redux";
7
- import S from "../connected-templates/PostIntro.js";
7
+ import L from "../connected-templates/PostIntro.js";
8
8
  import { useWindowDimensionsAndDevice as U } from "../../lib/hooks/window-dimensions.js";
9
- const Y = ({ posts: t, activeItem: c, setActive: i, showLabels: n }) => t ? t.map((l) => /* @__PURE__ */ e(
9
+ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.map((l) => /* @__PURE__ */ e(
10
10
  T.Item,
11
11
  {
12
12
  onClick: () => i(l.slug),
13
- className: l.slug === c ? "active" : "",
14
- children: n ? /* @__PURE__ */ e(L, { post: l }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: l.title.rendered } }) })
13
+ className: l.slug === o ? "active" : "",
14
+ children: n ? /* @__PURE__ */ e(k, { post: l }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: l.title.rendered } }) })
15
15
  },
16
16
  l.id
17
17
  )) : null, J = ({
18
18
  posts: t,
19
- activeItem: c,
19
+ activeItem: o,
20
20
  setActive: i,
21
21
  showIcons: n,
22
22
  showLabels: l
23
23
  }) => {
24
- const o = t.length;
25
- return t ? t.map((r) => {
24
+ const r = t.length;
25
+ return t ? t.map((a) => {
26
26
  var d, m;
27
- return (d = r._embedded) != null && d["wp:featuredmedia"] && r._embedded["wp:featuredmedia"][0].source_url, /* @__PURE__ */ e(
28
- w.Column,
27
+ return (d = a._embedded) != null && d["wp:featuredmedia"] && a._embedded["wp:featuredmedia"][0].source_url, /* @__PURE__ */ e(
28
+ v.Column,
29
29
  {
30
- className: (r.slug === c ? "active" : "") + (n ? " has-icon" : ""),
31
- children: /* @__PURE__ */ g(
32
- q,
30
+ className: (a.slug === o ? "active" : "") + (n ? " has-icon" : ""),
31
+ children: /* @__PURE__ */ f(
32
+ W,
33
33
  {
34
- onClick: () => i(r.slug),
35
- className: `nav ${o === 1 ? "one" : ""}`,
34
+ onClick: () => i(a.slug),
35
+ className: `nav ${r === 1 ? "one" : ""}`,
36
36
  children: [
37
37
  n && /* @__PURE__ */ e(
38
38
  P,
39
39
  {
40
- id: (m = r.meta_fields) != null && m.icon ? r.meta_fields.icon[0] : null,
41
- children: /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(k, { className: "icon" }) })
40
+ id: (m = a.meta_fields) != null && m.icon ? a.meta_fields.icon[0] : null,
41
+ children: /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e($, { className: "icon" }) })
42
42
  }
43
43
  ),
44
- l ? /* @__PURE__ */ e(L, { post: r }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
44
+ l ? /* @__PURE__ */ e(k, { post: a }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
45
45
  "span",
46
46
  {
47
- dangerouslySetInnerHTML: { __html: r.title.rendered }
47
+ dangerouslySetInnerHTML: { __html: a.title.rendered }
48
48
  }
49
49
  ) })
50
50
  ]
51
51
  }
52
52
  )
53
53
  },
54
- r.id
54
+ a.id
55
55
  );
56
56
  }) : null;
57
- }, $ = ({ posts: t, activeItem: c }) => (I(() => {
57
+ }, S = ({ posts: t, activeItem: o }) => (x(() => {
58
58
  const i = document.querySelector(".ui.container.content-tab");
59
59
  i && (i.scrollTop = 0);
60
- }, [c]), t ? t.map((i) => {
60
+ }, [o]), t ? t.map((i) => {
61
61
  let n = {};
62
- return i.slug !== c ? n = {
62
+ return i.slug !== o ? n = {
63
63
  position: "absolute",
64
64
  left: "-3000px",
65
65
  width: "auto",
@@ -70,35 +70,35 @@ const Y = ({ posts: t, activeItem: c, setActive: i, showLabels: n }) => t ? t.ma
70
70
  visibility: "visible",
71
71
  position: "relative",
72
72
  width: "auto"
73
- }, /* @__PURE__ */ e(S, { as: f, fluid: !0, post: i, style: n }, i.slug);
74
- }) : null), K = ({ posts: t, activeItem: c, setActive: i }) => {
75
- const [n, l] = v(
76
- t.findIndex((s) => s.slug === c)
77
- ), [o, r] = v(null), d = V(null);
78
- I(() => {
79
- if (o) {
80
- const s = o.getBoundingClientRect().top + window.scrollY;
73
+ }, /* @__PURE__ */ e(L, { as: b, fluid: !0, post: i, style: n }, i.slug);
74
+ }) : null), K = ({ posts: t, activeItem: o, setActive: i }) => {
75
+ const [n, l] = w(
76
+ t.findIndex((s) => s.slug === o)
77
+ ), [r, a] = w(null), d = G(null);
78
+ x(() => {
79
+ if (r) {
80
+ const s = r.getBoundingClientRect().top + window.scrollY;
81
81
  window.scrollTo({
82
82
  top: s,
83
83
  behavior: "smooth"
84
84
  });
85
85
  }
86
- }, [o]);
86
+ }, [r]);
87
87
  const m = (s, u) => {
88
- const { index: a } = u, h = n === a ? -1 : a;
89
- l(h), i(t[a].slug), h !== -1 && r(s.currentTarget);
88
+ const { index: c } = u, h = n === c ? -1 : c;
89
+ l(h), i(t[c].slug), h !== -1 && a(s.currentTarget);
90
90
  };
91
- return /* @__PURE__ */ e(p, { fluid: !0, styled: !0, children: t.map((s, u) => {
91
+ return /* @__PURE__ */ e(y, { fluid: !0, styled: !0, children: t.map((s, u) => {
92
92
  var h;
93
- const a = (h = s.meta_fields) != null && h.icon ? s.meta_fields.icon[0] : null;
94
- return /* @__PURE__ */ g(y.Fragment, { children: [
93
+ const c = (h = s.meta_fields) != null && h.icon ? s.meta_fields.icon[0] : null;
94
+ return /* @__PURE__ */ f(I.Fragment, { children: [
95
95
  /* @__PURE__ */ e(
96
- p.Title,
96
+ y.Title,
97
97
  {
98
98
  active: n === u,
99
99
  index: u,
100
100
  onClick: m,
101
- children: /* @__PURE__ */ g(
101
+ children: /* @__PURE__ */ f(
102
102
  "div",
103
103
  {
104
104
  style: {
@@ -108,94 +108,94 @@ const Y = ({ posts: t, activeItem: c, setActive: i, showLabels: n }) => t ? t.ma
108
108
  width: "100%"
109
109
  },
110
110
  children: [
111
- /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center" }, children: [
112
- a && /* @__PURE__ */ e(P, { id: a, children: /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(k, { className: "icon" }) }) }),
111
+ /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center" }, children: [
112
+ c && /* @__PURE__ */ e(P, { id: c, children: /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e($, { className: "icon" }) }) }),
113
113
  /* @__PURE__ */ e(
114
114
  "span",
115
115
  {
116
116
  dangerouslySetInnerHTML: { __html: s.title.rendered },
117
- style: { marginLeft: a ? "10px" : "0" }
117
+ style: { marginLeft: c ? "10px" : "0" }
118
118
  }
119
119
  )
120
120
  ] }),
121
- /* @__PURE__ */ e(W, { name: "chevron down" })
121
+ /* @__PURE__ */ e(V, { name: "chevron down" })
122
122
  ]
123
123
  }
124
124
  )
125
125
  }
126
126
  ),
127
127
  /* @__PURE__ */ e(
128
- p.Content,
128
+ y.Content,
129
129
  {
130
130
  className: "accordion-post-content",
131
131
  active: n === u,
132
- children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(S, { post: s, as: f, fluid: !0 }) })
132
+ children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(L, { post: s, as: b, fluid: !0 }) })
133
133
  }
134
134
  )
135
135
  ] }, s.id);
136
136
  }) });
137
- }, Q = ({ posts: t, showLabels: c, height: i }) => {
138
- const [n, l] = v(t ? t[0].slug : null);
139
- return I(() => {
137
+ }, Q = ({ posts: t, showLabels: o, height: i }) => {
138
+ const [n, l] = w(t ? t[0].slug : null);
139
+ return x(() => {
140
140
  setTimeout(() => {
141
141
  if (window.location.hash) {
142
- const o = window.location.hash.substr(1), r = document.getElementById(o);
143
- r && t.map((d) => d.slug).indexOf(o) > -1 && (l(o), r.scrollIntoView({ behavior: "auto", block: "start" }));
142
+ const r = window.location.hash.substr(1), a = document.getElementById(r);
143
+ a && t.map((d) => d.slug).indexOf(r) > -1 && (l(r), a.scrollIntoView({ behavior: "auto", block: "start" }));
144
144
  }
145
145
  }, 0);
146
- }, [t]), /* @__PURE__ */ g(y.Fragment, { children: [
147
- t.map((o) => /* @__PURE__ */ e("anchor", { id: o.slug }, o.slug)),
148
- /* @__PURE__ */ e(T, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(Y, { showLabels: c, posts: t, setActive: l, activeItem: n }) }),
149
- /* @__PURE__ */ e(f, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e($, { posts: t, activeItem: n }) })
146
+ }, [t]), /* @__PURE__ */ f(I.Fragment, { children: [
147
+ t.map((r) => /* @__PURE__ */ e("anchor", { id: r.slug }, r.slug)),
148
+ /* @__PURE__ */ e(T, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(Y, { showLabels: o, posts: t, setActive: l, activeItem: n }) }),
149
+ /* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e(S, { posts: t, activeItem: n }) })
150
150
  ] });
151
- }, X = ({ posts: t, showLabels: c, showIcons: i, height: n }) => {
152
- const [l, o] = v(t ? t[0].slug : null);
153
- return /* @__PURE__ */ e(y.Fragment, { children: /* @__PURE__ */ g(w, { stackable: !0, className: "tabbed posts", columns: t.length, style: { height: n + "px" }, children: [
154
- /* @__PURE__ */ e(J, { showIcons: i, showLabels: c, posts: t, activeItem: l, setActive: o }),
155
- /* @__PURE__ */ e(w.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(w.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(f, { className: "content-tab", style: { height: `${n}px` }, children: /* @__PURE__ */ e($, { className: "content-tab", posts: t, activeItem: l }) }) }) })
151
+ }, X = ({ posts: t, showLabels: o, showIcons: i, height: n }) => {
152
+ const [l, r] = w(t ? t[0].slug : null);
153
+ return /* @__PURE__ */ e(I.Fragment, { children: /* @__PURE__ */ f(v, { stackable: !0, className: "tabbed posts", columns: t.length, style: { height: n + "px" }, children: [
154
+ /* @__PURE__ */ e(J, { showIcons: i, showLabels: o, posts: t, activeItem: l, setActive: r }),
155
+ /* @__PURE__ */ e(v.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(v.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${n}px` }, children: /* @__PURE__ */ e(S, { className: "content-tab", posts: t, activeItem: l }) }) }) })
156
156
  ] }) });
157
157
  }, Z = (t) => {
158
- var _;
158
+ var N;
159
159
  let {
160
- "data-type": c,
160
+ "data-type": o,
161
161
  "data-taxonomy": i,
162
162
  "data-categories": n,
163
163
  "data-items": l,
164
- "data-theme": o = "light",
165
- "data-show-icons": r,
164
+ "data-theme": r = "light",
165
+ "data-show-icons": a,
166
166
  "data-use-scrolls": d,
167
167
  "data-show-labels": m,
168
168
  "data-height": s,
169
169
  "data-preview-mode": u = "Desktop",
170
- pageModuleProps: a,
170
+ pageModuleProps: c,
171
171
  parent: h,
172
- editing: b,
172
+ editing: g,
173
173
  unique: j
174
174
  } = t;
175
- a != null && a.previewMode && (a != null && a.editing) && (u = a.previewMode, b = a.editing);
176
- const D = t.intl.locale, R = Array.isArray(n) ? n.join(",") : n, x = d === "true", C = x ? s : void 0, { width: H } = U(), B = H <= 1024, F = u !== "Desktop" && b, G = B && !b;
177
- return /* @__PURE__ */ e(f, { className: `viz tabbed posts ${b ? "editing" : ""} ${x ? "scrollable" : ""}`, fluid: !0, children: /* @__PURE__ */ e(
178
- z,
175
+ c != null && c.previewMode && (c != null && c.editing) && (u = c.previewMode, g = c.editing);
176
+ const D = t.intl.locale, R = Array.isArray(n) ? n.join(",") : n, p = d === "true", C = p ? s : void 0, { width: H } = U(), z = H <= 1024, B = u !== "Desktop" && g, F = z && !g;
177
+ return g && !o ? /* @__PURE__ */ e(b, { className: `viz tabbed posts ${g ? "editing" : ""} ${p ? "scrollable" : ""}`, fluid: !0 }) : /* @__PURE__ */ e(b, { className: `viz tabbed posts ${g ? "editing" : ""} ${p ? "scrollable" : ""}`, fluid: !0, children: /* @__PURE__ */ e(
178
+ q,
179
179
  {
180
180
  locale: D,
181
- type: c,
181
+ type: o,
182
182
  taxonomy: i,
183
183
  categories: R,
184
184
  store: `tabbedposts_${h}_${j}`,
185
185
  page: 1,
186
186
  perPage: l,
187
- children: /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(N, { children: G || F ? /* @__PURE__ */ e(K, { posts: l, activeItem: (_ = l[0]) == null ? void 0 : _.slug, setActive: () => {
188
- } }) : o === "light" ? /* @__PURE__ */ e(Q, { height: C, showLabels: m === "true" }) : /* @__PURE__ */ e(
187
+ children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(_, { children: F || B ? /* @__PURE__ */ e(K, { posts: l, activeItem: (N = l[0]) == null ? void 0 : N.slug, setActive: () => {
188
+ } }) : r === "light" ? /* @__PURE__ */ e(Q, { height: C, showLabels: m === "true" }) : /* @__PURE__ */ e(
189
189
  X,
190
190
  {
191
191
  height: C,
192
192
  showLabels: m === "true",
193
- showIcons: r === "true"
193
+ showIcons: a === "true"
194
194
  }
195
195
  ) }) })
196
196
  }
197
197
  ) });
198
- }, ee = (t, c) => {
198
+ }, ee = (t, o) => {
199
199
  const i = t.getIn([
200
200
  "data",
201
201
  "pageModuleProps"