@devgateway/dvz-ui-react 1.5.4 → 1.6.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/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/chart/Pie.js +1 -1
- package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/chart/data/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/index.js +1 -1
- package/dist/cjs/embeddable/common/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
- package/dist/cjs/embeddable/filtered-posts/NoData.js +2 -2
- package/dist/cjs/embeddable/filtered-posts/index.js +1 -1
- package/dist/cjs/embeddable/filtered-posts/utils.js +1 -1
- package/dist/cjs/embeddable/posts-filter/CategoricalFilter.js +1 -0
- package/dist/cjs/embeddable/posts-filter/PostsFilterDropdown.js +1 -1
- package/dist/cjs/embeddable/posts-filter/YearFilter.js +1 -0
- package/dist/cjs/embeddable/posts-filter/index.js +1 -1
- package/dist/cjs/embeddable/posts-filters-reset-button/index.js +1 -1
- package/dist/cjs/embeddable/posts-pagination/index.js +1 -1
- package/dist/cjs/embeddable/reducers/data-api.js +1 -1
- package/dist/cjs/embeddable/reducers/data.js +1 -1
- package/dist/cjs/embeddable/reducers/embeddable-api.js +1 -1
- package/dist/cjs/embeddable/time-line/mobile.js +1 -1
- package/dist/cjs/embeddable/vertical-featuredtabs/index.js +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/layout/Layout.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/esm/common.css +1 -1
- package/dist/esm/embeddable/chart/Bar.js +253 -235
- package/dist/esm/embeddable/chart/Line.js +122 -121
- package/dist/esm/embeddable/chart/Pie.js +82 -81
- package/dist/esm/embeddable/chart/colors/ManualColors.js +33 -33
- package/dist/esm/embeddable/chart/data/Bar.js +18 -16
- package/dist/esm/embeddable/chart/index.js +298 -286
- package/dist/esm/embeddable/common/colors/ManualColors.js +22 -22
- package/dist/esm/embeddable/d3Map/BaseLayer.js +4 -1
- package/dist/esm/embeddable/d3Map/DataLayer.js +5 -1
- package/dist/esm/embeddable/filtered-posts/NoData.js +25 -18
- package/dist/esm/embeddable/filtered-posts/index.js +131 -89
- package/dist/esm/embeddable/filtered-posts/utils.js +3 -2
- package/dist/esm/embeddable/posts-filter/CategoricalFilter.js +72 -0
- package/dist/esm/embeddable/posts-filter/PostsFilterDropdown.js +106 -92
- package/dist/esm/embeddable/posts-filter/YearFilter.js +60 -0
- package/dist/esm/embeddable/posts-filter/index.js +160 -191
- package/dist/esm/embeddable/posts-filters-reset-button/index.js +21 -15
- package/dist/esm/embeddable/posts-pagination/index.js +36 -33
- package/dist/esm/embeddable/reducers/data-api.js +35 -35
- package/dist/esm/embeddable/reducers/data.js +116 -107
- package/dist/esm/embeddable/reducers/embeddable-api.js +8 -8
- package/dist/esm/embeddable/time-line/mobile.js +119 -118
- package/dist/esm/embeddable/vertical-featuredtabs/index.js +202 -131
- package/dist/esm/index.js +66 -64
- package/dist/esm/layout/Layout.js +8 -6
- package/dist/esm/styles.css +1 -1
- package/dist/types/dvz-ui/src/embeddable/chart/colors/ManualColors.d.ts +1 -1
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/NoData.d.ts +1 -0
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/index.d.ts +2 -1
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/utils.d.ts +3 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/CategoricalFilter.d.ts +9 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/PostsFilterDropdown.d.ts +1 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/YearFilter.d.ts +12 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/index.d.ts +2 -0
- package/dist/types/dvz-ui/src/embeddable/reducers/data-api.d.ts +3 -1
- package/dist/types/dvz-ui/src/embeddable/reducers/data.d.ts +5 -0
- package/dist/types/dvz-ui/src/embeddable/time-line/mobile.d.ts +2 -1
- package/dist/types/dvz-ui/src/translations/af.json.d.ts +1 -2
- package/dist/types/dvz-ui/src/translations/am.json.d.ts +35 -35
- package/dist/types/dvz-ui/src/translations/index.d.ts +2 -1
- package/dist/types/dvz-ui/src/utils/data.d.ts +2 -0
- package/package.json +4 -3
|
@@ -1,125 +1,197 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Container as
|
|
4
|
-
import { PostProvider as
|
|
5
|
-
import { connect as
|
|
1
|
+
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import K, { useState as M, useEffect as L, useRef as q, useLayoutEffect as U } from "react";
|
|
3
|
+
import { Container as F, Accordion as j, Icon as X } from "semantic-ui-react";
|
|
4
|
+
import { PostProvider as J, PostConsumer as Y, MediaProvider as G, MediaConsumer as Q, PostIcon as Z, PostContent as O } from "@devgateway/wp-react-lib";
|
|
5
|
+
import { connect as ee } from "react-redux";
|
|
6
6
|
import H from "../connected-templates/PostIntro.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const te = ({
|
|
8
|
+
posts: i,
|
|
9
|
+
activeItem: d,
|
|
10
|
+
setActive: p,
|
|
11
|
+
colors: g
|
|
12
|
+
}) => {
|
|
13
|
+
const [m, f] = M(
|
|
14
|
+
i.findIndex((n) => n.slug === d)
|
|
15
|
+
), [c, w] = M(null), l = (n, o, s) => {
|
|
16
|
+
document.querySelectorAll(n).forEach((t) => {
|
|
17
|
+
t.querySelector(o) && t.classList.add(s);
|
|
11
18
|
});
|
|
12
19
|
};
|
|
13
20
|
L(() => {
|
|
14
21
|
if (c) {
|
|
15
|
-
const
|
|
22
|
+
const n = c.getBoundingClientRect().top + window.scrollY;
|
|
16
23
|
window.scrollTo({
|
|
17
|
-
top:
|
|
24
|
+
top: n,
|
|
18
25
|
behavior: "smooth"
|
|
19
26
|
});
|
|
20
27
|
}
|
|
21
|
-
l(
|
|
28
|
+
l(
|
|
29
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
30
|
+
".accordion",
|
|
31
|
+
"has-accordion"
|
|
32
|
+
), l(
|
|
33
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
34
|
+
"blockquote",
|
|
35
|
+
"has-blockquote"
|
|
36
|
+
), l(
|
|
37
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
38
|
+
".accordion .accordion-post-ft-title",
|
|
39
|
+
"has-accordion-title"
|
|
40
|
+
), l(
|
|
41
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
42
|
+
".accordion .accordion-post-vft-content",
|
|
43
|
+
"has-accordion-content"
|
|
44
|
+
), l(
|
|
45
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
46
|
+
".vt-accordion-post-intro figure",
|
|
47
|
+
"has-vt-accordion-figure"
|
|
48
|
+
), l(
|
|
49
|
+
".ui.fluid.container.viz.featured.tabs",
|
|
50
|
+
".content.active.accordion-post-content .wp-block-columns",
|
|
51
|
+
"has-wp-block-columns"
|
|
52
|
+
);
|
|
22
53
|
}, [c]), L(() => {
|
|
23
|
-
let
|
|
24
|
-
const
|
|
54
|
+
let n;
|
|
55
|
+
const o = [], s = (e) => {
|
|
25
56
|
setTimeout(() => {
|
|
26
57
|
var h;
|
|
27
58
|
const t = e.querySelectorAll(
|
|
28
|
-
".accordion .legends.container.has-standard-12-font-size.bottom, .legends.container.items-section"
|
|
59
|
+
".accordion .legends.container.has-standard-12-font-size.bottom, .legends.container.items-section:not(.legends.container.top .items-section)"
|
|
29
60
|
);
|
|
30
61
|
if (t.length !== 0)
|
|
31
|
-
for (const
|
|
32
|
-
|
|
33
|
-
|
|
62
|
+
for (const u of t) {
|
|
63
|
+
if (u.closest(".legends.container.top"))
|
|
64
|
+
continue;
|
|
65
|
+
const P = u.closest(
|
|
66
|
+
".ui.fluid.container.content"
|
|
67
|
+
), v = P ? P.querySelector(".data-source") : null;
|
|
68
|
+
if (!v || u.offsetParent === null || v.offsetParent === null || u.offsetHeight === 0 || v.offsetHeight === 0)
|
|
69
|
+
continue;
|
|
70
|
+
const A = v.getBoundingClientRect(), y = u.getBoundingClientRect();
|
|
71
|
+
if (y.top === 0 || y.bottom === 0 || A.top === 0 || Math.abs(y.top) > 1e4 || Math.abs(A.top) > 1e4)
|
|
34
72
|
continue;
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const a =
|
|
73
|
+
const B = window.getComputedStyle(v), T = window.getComputedStyle(u), _ = parseFloat(B.marginTop) || 0, $ = parseFloat(T.marginBottom) || 0, E = y.bottom + $, R = A.top - _;
|
|
74
|
+
if (E > R) {
|
|
75
|
+
const a = E - R;
|
|
38
76
|
v.style.marginTop = `${a + 20}px`;
|
|
39
77
|
}
|
|
40
|
-
const
|
|
78
|
+
const x = (h = u.closest(
|
|
41
79
|
".wp-block-column.is-layout-flow.wp-block-column-is-layout-flow"
|
|
42
80
|
)) == null ? void 0 : h.nextElementSibling;
|
|
43
|
-
if (
|
|
44
|
-
const a =
|
|
45
|
-
if (
|
|
46
|
-
const z =
|
|
47
|
-
|
|
81
|
+
if (x) {
|
|
82
|
+
const a = x.getBoundingClientRect(), b = window.getComputedStyle(x), N = Number.parseFloat(b.marginTop) || 0, k = a.top - N;
|
|
83
|
+
if (E > k) {
|
|
84
|
+
const z = E - k;
|
|
85
|
+
x.style.marginTop = `${z + 20}px`;
|
|
48
86
|
}
|
|
49
87
|
}
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
const a =
|
|
53
|
-
if (D <
|
|
54
|
-
const W =
|
|
55
|
-
|
|
88
|
+
const I = u.closest(".chart.container");
|
|
89
|
+
if (I) {
|
|
90
|
+
const a = I.getBoundingClientRect(), b = window.getComputedStyle(I), N = Number.parseFloat(b.marginBottom) || 0, k = a.bottom + N, z = Number.parseFloat(T.marginTop) || 0, D = y.top - z;
|
|
91
|
+
if (D < k) {
|
|
92
|
+
const W = k - D, V = Math.min(W + 20, 200);
|
|
93
|
+
u.style.marginTop = `${V}px`;
|
|
56
94
|
}
|
|
57
95
|
}
|
|
58
96
|
}
|
|
59
|
-
},
|
|
97
|
+
}, 150);
|
|
60
98
|
};
|
|
61
|
-
return
|
|
99
|
+
return m !== -1 && (n = setTimeout(() => {
|
|
62
100
|
document.querySelectorAll(".accordion").forEach((t) => s(t));
|
|
63
101
|
}, 0)), () => {
|
|
64
|
-
clearTimeout(
|
|
102
|
+
clearTimeout(n), o.forEach((e) => e.disconnect());
|
|
65
103
|
};
|
|
66
|
-
}, [
|
|
67
|
-
const C = (
|
|
68
|
-
const { index: s } =
|
|
69
|
-
f(e),
|
|
104
|
+
}, [m]);
|
|
105
|
+
const C = (n, o) => {
|
|
106
|
+
const { index: s } = o, e = m === s ? -1 : s;
|
|
107
|
+
f(e), p(i[s].slug), e !== -1 && w(n.currentTarget);
|
|
70
108
|
};
|
|
71
|
-
return /* @__PURE__ */ r(j, { fluid: !0, styled: !0, children: i.map((
|
|
109
|
+
return /* @__PURE__ */ r(j, { fluid: !0, styled: !0, children: i.map((n, o) => {
|
|
72
110
|
var e;
|
|
73
|
-
const s = (e =
|
|
74
|
-
return /* @__PURE__ */
|
|
111
|
+
const s = (e = n.meta_fields) != null && e.icon ? n.meta_fields.icon[0] : null;
|
|
112
|
+
return /* @__PURE__ */ S(K.Fragment, { children: [
|
|
75
113
|
/* @__PURE__ */ r(
|
|
76
114
|
j.Title,
|
|
77
115
|
{
|
|
78
|
-
active:
|
|
79
|
-
index:
|
|
80
|
-
onClick: (t) => C(t, { index:
|
|
81
|
-
style: { backgroundColor:
|
|
82
|
-
children: /* @__PURE__ */
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
116
|
+
active: m === o,
|
|
117
|
+
index: o,
|
|
118
|
+
onClick: (t) => C(t, { index: o }),
|
|
119
|
+
style: { backgroundColor: g[`color_${o}`] },
|
|
120
|
+
children: /* @__PURE__ */ S(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
style: {
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
justifyContent: "space-between",
|
|
127
|
+
width: "100%"
|
|
128
|
+
},
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ S("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
131
|
+
s && /* @__PURE__ */ r(G, { id: s, children: /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ r(Z, { className: "icon" }) }) }),
|
|
132
|
+
/* @__PURE__ */ r(H, { post: n, className: "vt-accordion-post-intro" })
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ r(X, { name: "chevron down" })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
)
|
|
89
138
|
}
|
|
90
139
|
),
|
|
91
|
-
/* @__PURE__ */ r(
|
|
92
|
-
|
|
140
|
+
/* @__PURE__ */ r(
|
|
141
|
+
j.Content,
|
|
142
|
+
{
|
|
143
|
+
className: "accordion-post-content accordion-post-vft-content",
|
|
144
|
+
active: m === o,
|
|
145
|
+
children: /* @__PURE__ */ r(O, { post: n })
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
] }, n.id);
|
|
93
149
|
}) });
|
|
94
|
-
},
|
|
150
|
+
}, ne = ({
|
|
95
151
|
post: i,
|
|
96
152
|
count: d,
|
|
97
|
-
backgroundColor:
|
|
98
|
-
active:
|
|
99
|
-
dimensions:
|
|
153
|
+
backgroundColor: p,
|
|
154
|
+
active: g,
|
|
155
|
+
dimensions: m,
|
|
100
156
|
height: f,
|
|
101
157
|
coverWidth: c,
|
|
102
158
|
index: w,
|
|
103
159
|
editing: l,
|
|
104
160
|
clickToExpandLabel: C
|
|
105
161
|
}) => {
|
|
106
|
-
const
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
162
|
+
const n = i._embedded ? i._embedded["wp:featuredmedia"] : null, [o, s] = M(!1), e = l ? d - w : 1;
|
|
163
|
+
return /* @__PURE__ */ S("div", { className: "content-area", children: [
|
|
164
|
+
/* @__PURE__ */ S(
|
|
109
165
|
"div",
|
|
110
166
|
{
|
|
111
167
|
className: "cover",
|
|
112
168
|
style: {
|
|
113
169
|
width: `${c}px`,
|
|
114
|
-
backgroundColor:
|
|
115
|
-
backgroundImage: `url(${
|
|
170
|
+
backgroundColor: p,
|
|
171
|
+
backgroundImage: `url(${n ? n[0].source_url : ""})`
|
|
116
172
|
},
|
|
117
173
|
onMouseEnter: () => s(!0),
|
|
118
174
|
onMouseLeave: () => s(!1),
|
|
119
175
|
children: [
|
|
120
|
-
/* @__PURE__ */ r(
|
|
121
|
-
|
|
122
|
-
|
|
176
|
+
/* @__PURE__ */ r(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: "rotator",
|
|
180
|
+
style: {
|
|
181
|
+
width: `${f}px`,
|
|
182
|
+
transform: `translate(${c / 2}px, 0px) rotate(90deg)`
|
|
183
|
+
},
|
|
184
|
+
children: /* @__PURE__ */ r(H, { post: i })
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ S("div", { className: "overlay-label-container", children: [
|
|
188
|
+
/* @__PURE__ */ r(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
className: `overlay-label ${o && !g ? "visible" : ""}`,
|
|
192
|
+
children: C || "CLICK TO EXPAND"
|
|
193
|
+
}
|
|
194
|
+
),
|
|
123
195
|
/* @__PURE__ */ r("div", { className: "arrow-svg" })
|
|
124
196
|
] })
|
|
125
197
|
]
|
|
@@ -128,62 +200,62 @@ const ee = ({ posts: i, activeItem: d, setActive: g, colors: p }) => {
|
|
|
128
200
|
/* @__PURE__ */ r(
|
|
129
201
|
"div",
|
|
130
202
|
{
|
|
131
|
-
className: `collapsable-content ${
|
|
203
|
+
className: `collapsable-content ${g ? "expanded" : "collapsed"}`,
|
|
132
204
|
style: {
|
|
133
205
|
backgroundColor: "#f9f9f9",
|
|
134
|
-
width: `${
|
|
206
|
+
width: `${m.width - c * d}px`,
|
|
135
207
|
marginLeft: `${c * e}px`
|
|
136
208
|
},
|
|
137
|
-
children: /* @__PURE__ */ r(
|
|
209
|
+
children: /* @__PURE__ */ r(O, { post: i })
|
|
138
210
|
}
|
|
139
211
|
)
|
|
140
212
|
] });
|
|
141
213
|
}, oe = ({
|
|
142
214
|
editing: i,
|
|
143
215
|
posts: d,
|
|
144
|
-
height:
|
|
145
|
-
colors:
|
|
146
|
-
coverWidth:
|
|
216
|
+
height: p,
|
|
217
|
+
colors: g,
|
|
218
|
+
coverWidth: m,
|
|
147
219
|
clickToExpandLabel: f
|
|
148
220
|
}) => {
|
|
149
|
-
const [c, w] =
|
|
221
|
+
const [c, w] = M(null), l = q(null), [C, n] = M({ width: 0, height: 0 }), o = q(null), s = (e) => {
|
|
150
222
|
c !== e && w(e);
|
|
151
223
|
};
|
|
152
224
|
return L(() => {
|
|
153
225
|
d.length > 0 && c === null && i && w(d[0].slug);
|
|
154
|
-
}, [d, c, i]),
|
|
155
|
-
var e, t, h,
|
|
156
|
-
(e = l.current) != null && e.parentElement &&
|
|
157
|
-
width: i ? ((h = (t = l.current.parentElement) == null ? void 0 : t.parentElement) == null ? void 0 : h.offsetWidth) ?? 0 : ((
|
|
226
|
+
}, [d, c, i]), U(() => {
|
|
227
|
+
var e, t, h, u;
|
|
228
|
+
(e = l.current) != null && e.parentElement && n({
|
|
229
|
+
width: i ? ((h = (t = l.current.parentElement) == null ? void 0 : t.parentElement) == null ? void 0 : h.offsetWidth) ?? 0 : ((u = l.current.parentElement) == null ? void 0 : u.offsetWidth) ?? 0,
|
|
158
230
|
height: l.current.offsetHeight
|
|
159
|
-
}),
|
|
231
|
+
}), o.current && (o.current.style.overflow = i ? "visible" : "hidden");
|
|
160
232
|
}, [i]), /* @__PURE__ */ r(
|
|
161
|
-
|
|
233
|
+
F,
|
|
162
234
|
{
|
|
163
235
|
fluid: !0,
|
|
164
236
|
className: "vertical featured tabs",
|
|
165
|
-
ref:
|
|
237
|
+
ref: o,
|
|
166
238
|
children: d == null ? void 0 : d.map((e, t) => {
|
|
167
239
|
const h = c ? e.slug === c : t === 0;
|
|
168
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ S(
|
|
169
241
|
"div",
|
|
170
242
|
{
|
|
171
243
|
ref: l,
|
|
172
244
|
onClick: () => s(e.slug),
|
|
173
245
|
className: h ? "item expanded" : "item collapsed",
|
|
174
246
|
style: {
|
|
175
|
-
minHeight: `${
|
|
176
|
-
minWidth: `${
|
|
247
|
+
minHeight: `${p}px`,
|
|
248
|
+
minWidth: `${m}px`
|
|
177
249
|
},
|
|
178
250
|
children: [
|
|
179
251
|
/* @__PURE__ */ r("a", { id: e.slug }),
|
|
180
252
|
/* @__PURE__ */ r(
|
|
181
|
-
|
|
253
|
+
ne,
|
|
182
254
|
{
|
|
183
255
|
editing: i,
|
|
184
|
-
coverWidth:
|
|
185
|
-
height:
|
|
186
|
-
backgroundColor:
|
|
256
|
+
coverWidth: m,
|
|
257
|
+
height: p,
|
|
258
|
+
backgroundColor: g[`color_${t}`],
|
|
187
259
|
count: d.length,
|
|
188
260
|
dimensions: C,
|
|
189
261
|
active: h,
|
|
@@ -199,46 +271,48 @@ const ee = ({ posts: i, activeItem: d, setActive: g, colors: p }) => {
|
|
|
199
271
|
})
|
|
200
272
|
}
|
|
201
273
|
);
|
|
202
|
-
},
|
|
203
|
-
var
|
|
274
|
+
}, re = (i) => {
|
|
275
|
+
var x, I;
|
|
204
276
|
let {
|
|
205
277
|
"data-height": d,
|
|
206
|
-
"data-type":
|
|
207
|
-
"data-taxonomy":
|
|
208
|
-
"data-categories":
|
|
278
|
+
"data-type": p,
|
|
279
|
+
"data-taxonomy": g,
|
|
280
|
+
"data-categories": m,
|
|
209
281
|
"data-count": f,
|
|
210
282
|
"data-colors": c,
|
|
211
283
|
"data-cover-width": w = 50,
|
|
212
284
|
"data-read-more-label": l = "READ More",
|
|
213
285
|
"data-click-to-expand-label": C = "CLICK TO EXPAND",
|
|
214
|
-
"data-preview-mode":
|
|
215
|
-
editing:
|
|
286
|
+
"data-preview-mode": n = "Desktop",
|
|
287
|
+
editing: o,
|
|
216
288
|
parent: s,
|
|
217
289
|
unique: e,
|
|
218
290
|
pageModuleProps: t
|
|
219
291
|
} = i;
|
|
220
|
-
t != null && t.previewMode && (t != null && t.editing) && (
|
|
221
|
-
const h = i.intl.locale,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
var a, b,
|
|
225
|
-
return ((a = window.screen.orientation) == null ? void 0 : a.type) || ((((b = window == null ? void 0 : window.visualViewport) == null ? void 0 : b.width) || window.innerWidth) > (((
|
|
226
|
-
}, [
|
|
292
|
+
t != null && t.previewMode && (t != null && t.editing) && (n = t.previewMode, o = t.editing);
|
|
293
|
+
const h = i.intl.locale, u = m || "[]", [P, v] = M(
|
|
294
|
+
(((x = window == null ? void 0 : window.visualViewport) == null ? void 0 : x.width) || window.innerWidth) <= 1365
|
|
295
|
+
), A = () => {
|
|
296
|
+
var a, b, N;
|
|
297
|
+
return ((a = window.screen.orientation) == null ? void 0 : a.type) || ((((b = window == null ? void 0 : window.visualViewport) == null ? void 0 : b.width) || window.innerWidth) > (((N = window == null ? void 0 : window.visualViewport) == null ? void 0 : N.height) || window.innerHeight) ? "landscape-primary" : "portrait-primary");
|
|
298
|
+
}, [y, B] = M(A()), T = () => {
|
|
227
299
|
setTimeout(() => {
|
|
228
300
|
var a;
|
|
229
|
-
B(
|
|
301
|
+
B(A()), v(
|
|
302
|
+
(((a = window == null ? void 0 : window.visualViewport) == null ? void 0 : a.width) || window.innerWidth) <= 1365
|
|
303
|
+
);
|
|
230
304
|
}, 100);
|
|
231
305
|
};
|
|
232
306
|
L(() => (window.screen.orientation && window.screen.orientation.addEventListener(
|
|
233
307
|
"change",
|
|
234
|
-
|
|
235
|
-
), window.addEventListener("resize",
|
|
236
|
-
window.removeEventListener("resize",
|
|
308
|
+
T
|
|
309
|
+
), window.addEventListener("resize", T), () => {
|
|
310
|
+
window.removeEventListener("resize", T), window.screen.orientation && window.screen.orientation.removeEventListener(
|
|
237
311
|
"change",
|
|
238
|
-
|
|
312
|
+
T
|
|
239
313
|
);
|
|
240
314
|
}), []);
|
|
241
|
-
const _ = (a) =>
|
|
315
|
+
const _ = (a) => o ? a : decodeURIComponent(a), $ = (a) => {
|
|
242
316
|
if (!a) return null;
|
|
243
317
|
try {
|
|
244
318
|
return JSON.parse(_(a));
|
|
@@ -247,40 +321,40 @@ const ee = ({ posts: i, activeItem: d, setActive: g, colors: p }) => {
|
|
|
247
321
|
error:${b}`);
|
|
248
322
|
}
|
|
249
323
|
return null;
|
|
250
|
-
},
|
|
324
|
+
}, E = n !== "Desktop" && o, R = P && !o;
|
|
251
325
|
return /* @__PURE__ */ r(
|
|
252
|
-
|
|
326
|
+
F,
|
|
253
327
|
{
|
|
254
328
|
style: { maxWidth: "100%" },
|
|
255
|
-
className: `viz featured tabs ${
|
|
329
|
+
className: `viz featured tabs ${o ? "editing" : ""}`,
|
|
256
330
|
fluid: !0,
|
|
257
331
|
children: /* @__PURE__ */ r(
|
|
258
|
-
|
|
332
|
+
J,
|
|
259
333
|
{
|
|
260
|
-
type:
|
|
334
|
+
type: p,
|
|
261
335
|
locale: h,
|
|
262
|
-
taxonomy:
|
|
263
|
-
categories:
|
|
336
|
+
taxonomy: g,
|
|
337
|
+
categories: $(u),
|
|
264
338
|
store: `vertical_tabs${s}_${e}`,
|
|
265
339
|
page: 1,
|
|
266
340
|
perPage: f,
|
|
267
|
-
children: /* @__PURE__ */ r(
|
|
268
|
-
|
|
341
|
+
children: /* @__PURE__ */ r(Y, { children: R || E ? /* @__PURE__ */ r(
|
|
342
|
+
te,
|
|
269
343
|
{
|
|
270
344
|
posts: f,
|
|
271
|
-
activeItem: (
|
|
272
|
-
colors:
|
|
345
|
+
activeItem: (I = f == null ? void 0 : f[0]) == null ? void 0 : I.slug,
|
|
346
|
+
colors: $(c),
|
|
273
347
|
setActive: () => {
|
|
274
348
|
}
|
|
275
349
|
}
|
|
276
350
|
) : /* @__PURE__ */ r(
|
|
277
351
|
oe,
|
|
278
352
|
{
|
|
279
|
-
editing:
|
|
353
|
+
editing: o,
|
|
280
354
|
coverWidth: w,
|
|
281
355
|
moreLabel: l,
|
|
282
356
|
clickToExpandLabel: C,
|
|
283
|
-
colors:
|
|
357
|
+
colors: $(c),
|
|
284
358
|
height: d,
|
|
285
359
|
posts: f
|
|
286
360
|
}
|
|
@@ -288,15 +362,12 @@ const ee = ({ posts: i, activeItem: d, setActive: g, colors: p }) => {
|
|
|
288
362
|
}
|
|
289
363
|
)
|
|
290
364
|
},
|
|
291
|
-
|
|
365
|
+
y + Math.random()
|
|
292
366
|
);
|
|
293
|
-
},
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
]), p = {};
|
|
298
|
-
return g && (p.pageModuleProps = g), p;
|
|
299
|
-
}, ie = {}, me = Z(re, ie)(ne);
|
|
367
|
+
}, ie = (i, d) => {
|
|
368
|
+
const p = i.getIn(["data", "pageModuleProps"]), g = {};
|
|
369
|
+
return p && (g.pageModuleProps = p), g;
|
|
370
|
+
}, ae = {}, pe = ee(ie, ae)(re);
|
|
300
371
|
export {
|
|
301
|
-
|
|
372
|
+
pe as default
|
|
302
373
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
import { components as
|
|
1
|
+
import { components as s, customizer as p, getComponentByNameIgnoreCase as m, reducers as n } from "./embeddable/index.js";
|
|
2
2
|
import { Config as l } from "./conf/index.js";
|
|
3
3
|
import { default as u } from "./layout/ResponsiveContainer.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
4
|
+
import { default as c } from "./layout/ScrollTop.js";
|
|
5
|
+
import { default as S } from "./layout/containers/PreviewPageContainer.js";
|
|
6
6
|
import { default as g } from "./layout/containers/PreviewTypeContainer.js";
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { CustomizerWrapper as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { withTracker as
|
|
24
|
-
import { store as
|
|
25
|
-
import { useAppDispatch as
|
|
26
|
-
import { UPDATE as
|
|
27
|
-
import { combineReducers as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
7
|
+
import { default as h } from "./layout/containers/SlugContainer.js";
|
|
8
|
+
import { default as R } from "./layout/containers/SlugPostContainer.js";
|
|
9
|
+
import { CustomizerWrapper as F } from "./layout/Customizer.js";
|
|
10
|
+
import { default as y } from "./layout/Layout.js";
|
|
11
|
+
import { default as D } from "./layout/PreviewComponent.js";
|
|
12
|
+
import { default as L } from "./layout/Favicon.js";
|
|
13
|
+
import { default as O } from "./layout/SSRFavicon.js";
|
|
14
|
+
import { default as z } from "./layout/Loading.js";
|
|
15
|
+
import { default as W } from "./layout/CustomSemanticSearch.js";
|
|
16
|
+
import { default as B } from "./layout/Header.js";
|
|
17
|
+
import { default as M } from "./layout/SearchControl.js";
|
|
18
|
+
import { default as _ } from "./layout/LangSwitcher.js";
|
|
19
|
+
import { default as q } from "./layout/Footer.js";
|
|
20
|
+
import { default as J } from "./layout/ClassicHeader.js";
|
|
21
|
+
import { default as Q } from "./layout/FlexWrapDetector.js";
|
|
22
|
+
import { default as X } from "./layout/FloatingMenuHeader.js";
|
|
23
|
+
import { withTracker as $ } from "./tracker/withGoogleAnalytics.js";
|
|
24
|
+
import { store as er } from "./redux/store.js";
|
|
25
|
+
import { useAppDispatch as tr, useAppSelector as ar } from "./redux/hooks.js";
|
|
26
|
+
import { UPDATE as sr, initialState as pr, intlReducer as mr, updateIntl as nr } from "./lib/react-intl-redux/index.js";
|
|
27
|
+
import { combineReducers as lr } from "./lib/redux-immutable/index.js";
|
|
28
|
+
import * as r from "./translations/en.json.js";
|
|
29
|
+
import * as e from "./translations/fr.json.js";
|
|
30
30
|
import * as o from "./translations/af.json.js";
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import { default as
|
|
31
|
+
import * as t from "./translations/am.json.js";
|
|
32
|
+
import { COUNTRY_OPTIONS as ur } from "./countries.js";
|
|
33
|
+
import { default as cr } from "./lib/react-intl-redux/providers/Provider.js";
|
|
34
|
+
import { default as Sr } from "./lib/react-intl-redux/providers/IntlProvider.js";
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
ur as COUNTRY_OPTIONS,
|
|
37
|
+
J as ClassicHeader,
|
|
37
38
|
l as Config,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
W as CustomSemanticSearch,
|
|
40
|
+
F as CustomizerWrapper,
|
|
41
|
+
L as Favicon,
|
|
42
|
+
Q as FlexWrapDetector,
|
|
43
|
+
X as FloatingMenuHeader,
|
|
44
|
+
q as Footer,
|
|
45
|
+
B as Header,
|
|
46
|
+
Sr as IntlProvider,
|
|
47
|
+
_ as LangSwitcher,
|
|
48
|
+
z as Loading,
|
|
49
|
+
D as PreviewComponent,
|
|
50
|
+
S as PreviewPageContainer,
|
|
50
51
|
g as PreviewTypeContainer,
|
|
51
|
-
|
|
52
|
+
cr as Provider,
|
|
52
53
|
u as ResponsiveContainer,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
y as RootLayout,
|
|
55
|
+
O as SSRFavicon,
|
|
56
|
+
c as ScrollToTop,
|
|
57
|
+
M as SearchControl,
|
|
58
|
+
h as SlugContainer,
|
|
59
|
+
R as SlugPostContainer,
|
|
60
|
+
sr as UPDATE,
|
|
60
61
|
o as afrikaansTranslations,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
t as amharicTranslations,
|
|
63
|
+
lr as combineReducers,
|
|
64
|
+
s as components,
|
|
63
65
|
p as customizer,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
r as englishTranslations,
|
|
67
|
+
e as frenchTranslations,
|
|
68
|
+
m as getComponentByNameIgnoreCase,
|
|
69
|
+
pr as initialState,
|
|
70
|
+
mr as intlReducer,
|
|
71
|
+
n as reducers,
|
|
72
|
+
er as store,
|
|
73
|
+
nr as updateIntl,
|
|
74
|
+
tr as useAppDispatch,
|
|
75
|
+
ar as useAppSelector,
|
|
76
|
+
$ as withTracker
|
|
75
77
|
};
|