@devgateway/dvz-ui-react 1.1.1 → 1.2.1
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/embeddable/big-number/index.js +1 -1
- package/dist/cjs/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/index.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/d3Map/FlowLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/ZoomControl.js +1 -1
- package/dist/cjs/embeddable/d3Map/index.js +1 -1
- package/dist/cjs/embeddable/posts-with-filters/DropDownFilter.js +1 -0
- package/dist/cjs/embeddable/posts-with-filters/Post.js +1 -1
- package/dist/cjs/embeddable/posts-with-filters/index.js +1 -1
- package/dist/cjs/embeddable/reducers/data-api.js +1 -1
- package/dist/cjs/layout/containers/SlugPostContainer.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/esm/embeddable/big-number/index.js +92 -85
- package/dist/esm/embeddable/chart/Bar.js +128 -123
- package/dist/esm/embeddable/chart/index.js +229 -225
- package/dist/esm/embeddable/d3Map/BaseLayer.js +40 -27
- package/dist/esm/embeddable/d3Map/DataLayer.js +196 -204
- package/dist/esm/embeddable/d3Map/FlowLayer.js +104 -101
- package/dist/esm/embeddable/d3Map/ZoomControl.js +64 -54
- package/dist/esm/embeddable/d3Map/index.js +110 -99
- package/dist/esm/embeddable/posts-with-filters/DropDownFilter.js +25 -0
- package/dist/esm/embeddable/posts-with-filters/Post.js +49 -24
- package/dist/esm/embeddable/posts-with-filters/index.js +120 -119
- package/dist/esm/embeddable/reducers/data-api.js +13 -11
- package/dist/esm/layout/containers/SlugPostContainer.js +3 -3
- package/dist/esm/styles.css +1 -1
- package/dist/types/embeddable/chart/Bar.d.ts +2 -0
- package/dist/types/embeddable/d3Map/BaseLayer.d.ts +1 -0
- package/dist/types/embeddable/d3Map/ZoomControl.d.ts +2 -1
- package/dist/types/embeddable/posts-with-filters/DropDownFilter.d.ts +4 -0
- package/dist/types/embeddable/posts-with-filters/Post.d.ts +4 -2
- package/package.json +4 -2
|
@@ -1,156 +1,167 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { connect as
|
|
4
|
-
import { parse as i, compareJsonProps as E, decode as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
1
|
+
import { jsx as n, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useRef as h, useEffect as R } from "react";
|
|
3
|
+
import { connect as K } from "react-redux";
|
|
4
|
+
import { parse as i, compareJsonProps as E, decode as O } from "../utils/parseUtils.js";
|
|
5
|
+
import Q from "./Map.js";
|
|
6
|
+
import U from "./BaseLayer.js";
|
|
7
|
+
import X from "./DataLayer.js";
|
|
8
|
+
import Y from "./LatLongLayer.js";
|
|
9
|
+
import _ from "./ZoomControl.js";
|
|
10
|
+
import $ from "./ProjectedContainer.js";
|
|
11
|
+
import oo from "./Legends.js";
|
|
12
|
+
import eo from "./FlowLayer.js";
|
|
13
|
+
const to = (L) => {
|
|
14
14
|
const {
|
|
15
|
-
unique:
|
|
16
|
-
editing:
|
|
15
|
+
unique: d,
|
|
16
|
+
editing: a,
|
|
17
17
|
"data-identifier": M,
|
|
18
|
-
"data-group":
|
|
18
|
+
"data-group": m,
|
|
19
19
|
"data-layers": g = "[]",
|
|
20
|
-
"data-height":
|
|
21
|
-
"data-width":
|
|
22
|
-
"data-back-ground-color":
|
|
23
|
-
"data-map-position":
|
|
24
|
-
"data-projection":
|
|
25
|
-
"data-zoom-enabled":
|
|
20
|
+
"data-height": V = 400,
|
|
21
|
+
"data-width": C = 1e3,
|
|
22
|
+
"data-back-ground-color": T = "#88e8dc",
|
|
23
|
+
"data-map-position": P = "{}",
|
|
24
|
+
"data-projection": j = "geoMercator",
|
|
25
|
+
"data-zoom-enabled": k = !0,
|
|
26
26
|
"data-rotation-enabled": z = !1,
|
|
27
|
-
"data-wait-for-filters":
|
|
27
|
+
"data-wait-for-filters": s = "false",
|
|
28
28
|
intl: p
|
|
29
|
-
} = L, [
|
|
30
|
-
|
|
31
|
-
const o = i(
|
|
32
|
-
E(
|
|
33
|
-
}, [
|
|
29
|
+
} = L, [w, x] = l(i(P, a), []), [r, u] = l(i(g), []), S = h(null), c = h(null), [b, v] = l(null), [F, I] = l(null), [D, N] = l(null);
|
|
30
|
+
R(() => {
|
|
31
|
+
const o = i(P, a);
|
|
32
|
+
E(w, o) || x(o);
|
|
33
|
+
}, [P]), R(() => {
|
|
34
34
|
const o = i(g);
|
|
35
|
-
E(
|
|
35
|
+
E(r, o) || u(o);
|
|
36
36
|
}, [g]);
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}, R = (o) => {
|
|
41
|
-
const e = s.slice(), t = e.find((m) => m.id == o);
|
|
42
|
-
t && (t.patternsVisible = t.patternsVisible == null ? !1 : !t.patternsVisible), u(e);
|
|
43
|
-
}, q = (o) => {
|
|
44
|
-
D(o);
|
|
37
|
+
const q = (o) => {
|
|
38
|
+
const t = r.slice(), e = t.find((f) => f.id == o);
|
|
39
|
+
e && (e.visible = !e.visible), u(t);
|
|
45
40
|
}, A = (o) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
41
|
+
const t = r.slice(), e = t.find((f) => f.id == o);
|
|
42
|
+
e && (e.patternsVisible = e.patternsVisible == null ? !1 : !e.patternsVisible), u(t);
|
|
43
|
+
}, B = (o) => {
|
|
44
|
+
N(o);
|
|
45
|
+
}, J = (o) => {
|
|
46
|
+
const t = r.slice(), e = t.find((f) => f.id == o);
|
|
47
|
+
e && (e.colorLayerVisible = e.colorLayerVisible == null ? !1 : !e.colorLayerVisible), u(t);
|
|
48
|
+
}, [W, G] = l(!1), Z = h(0);
|
|
49
|
+
r.length;
|
|
50
|
+
const y = () => {
|
|
51
|
+
Z.current += 1, Z.current === r.length && G(!0);
|
|
48
52
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
53
|
+
return /* @__PURE__ */ n("div", { ref: S, className: "d3map-container", children: /* @__PURE__ */ H(
|
|
54
|
+
$,
|
|
51
55
|
{
|
|
52
|
-
backgroundColor:
|
|
53
|
-
height:
|
|
54
|
-
width:
|
|
55
|
-
projectionName:
|
|
56
|
-
editing:
|
|
57
|
-
initialPosition:
|
|
56
|
+
backgroundColor: O(T),
|
|
57
|
+
height: V,
|
|
58
|
+
width: C,
|
|
59
|
+
projectionName: j,
|
|
60
|
+
editing: a,
|
|
61
|
+
initialPosition: w,
|
|
58
62
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ n(Q, { rotationEnabled: i(z, a), children: r.map((o, t) => {
|
|
60
64
|
if (o.type === "base")
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
65
|
+
return /* @__PURE__ */ n(
|
|
66
|
+
U,
|
|
63
67
|
{
|
|
68
|
+
minLabelZoomVisible: o.minLabelZoomVisible,
|
|
69
|
+
onReady: y,
|
|
64
70
|
transform: b,
|
|
65
71
|
intl: p,
|
|
66
|
-
zoom:
|
|
67
|
-
unique:
|
|
72
|
+
zoom: c,
|
|
73
|
+
unique: d,
|
|
68
74
|
...o
|
|
69
75
|
},
|
|
70
|
-
|
|
76
|
+
t
|
|
71
77
|
);
|
|
72
78
|
if (o.type === "data")
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
79
|
+
return /* @__PURE__ */ n(
|
|
80
|
+
X,
|
|
75
81
|
{
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
minLabelZoomVisible: o.minLabelZoomVisible,
|
|
83
|
+
editing: a,
|
|
84
|
+
onLayerCreated: (e) => {
|
|
78
85
|
},
|
|
86
|
+
onReady: y,
|
|
79
87
|
transform: b,
|
|
80
88
|
intl: p,
|
|
81
|
-
group:
|
|
82
|
-
zoom:
|
|
83
|
-
unique:
|
|
89
|
+
group: m,
|
|
90
|
+
zoom: c,
|
|
91
|
+
unique: d,
|
|
84
92
|
...o,
|
|
85
93
|
settings: L.wordress,
|
|
86
|
-
togglePatterns:
|
|
87
|
-
initialPosition:
|
|
88
|
-
waitForFilters:
|
|
94
|
+
togglePatterns: A,
|
|
95
|
+
initialPosition: w,
|
|
96
|
+
waitForFilters: s == "true" || s == !0
|
|
89
97
|
},
|
|
90
|
-
|
|
98
|
+
t
|
|
91
99
|
);
|
|
92
100
|
if (o.type === "flow")
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
101
|
+
return /* @__PURE__ */ n(
|
|
102
|
+
eo,
|
|
95
103
|
{
|
|
104
|
+
onReady: y,
|
|
96
105
|
transform: b,
|
|
97
106
|
intl: p,
|
|
98
|
-
group:
|
|
99
|
-
zoom:
|
|
100
|
-
unique:
|
|
107
|
+
group: m,
|
|
108
|
+
zoom: c,
|
|
109
|
+
unique: d,
|
|
101
110
|
...o,
|
|
102
|
-
waitForFilters:
|
|
111
|
+
waitForFilters: s == "true" || s == !0
|
|
103
112
|
},
|
|
104
|
-
|
|
113
|
+
t
|
|
105
114
|
);
|
|
106
115
|
if (o.type === "dataPoints")
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
|
|
116
|
+
return /* @__PURE__ */ n(
|
|
117
|
+
Y,
|
|
109
118
|
{
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
onReady: y,
|
|
120
|
+
onZoomToPoint: B,
|
|
121
|
+
selectedItem: F,
|
|
112
122
|
transform: b,
|
|
113
123
|
intl: p,
|
|
114
|
-
group:
|
|
115
|
-
zoom:
|
|
116
|
-
unique:
|
|
124
|
+
group: m,
|
|
125
|
+
zoom: c,
|
|
126
|
+
unique: d,
|
|
117
127
|
...o,
|
|
118
|
-
waitForFilters:
|
|
128
|
+
waitForFilters: s == "true" || s == !0
|
|
119
129
|
},
|
|
120
|
-
|
|
130
|
+
t
|
|
121
131
|
);
|
|
122
132
|
}) }),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
133
|
+
/* @__PURE__ */ n(
|
|
134
|
+
oo,
|
|
125
135
|
{
|
|
126
|
-
selectedItem:
|
|
136
|
+
selectedItem: F,
|
|
127
137
|
d2Click: (o) => I(o),
|
|
128
138
|
patternsData: null,
|
|
129
|
-
layers:
|
|
130
|
-
group:
|
|
131
|
-
onItemClick:
|
|
132
|
-
toggleColorLayer:
|
|
139
|
+
layers: r,
|
|
140
|
+
group: m,
|
|
141
|
+
onItemClick: q,
|
|
142
|
+
toggleColorLayer: J
|
|
133
143
|
}
|
|
134
144
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
145
|
+
/* @__PURE__ */ n(
|
|
146
|
+
_,
|
|
137
147
|
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
readyToZoom: W,
|
|
149
|
+
selectedPoint: D,
|
|
150
|
+
rootationEmabled: i(z, a),
|
|
151
|
+
zoomEnabled: i(k, a),
|
|
141
152
|
onZoomed: v,
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
144
|
-
ref:
|
|
145
|
-
group:
|
|
153
|
+
width: C,
|
|
154
|
+
height: V,
|
|
155
|
+
ref: c,
|
|
156
|
+
group: m,
|
|
146
157
|
identifier: M,
|
|
147
|
-
editing:
|
|
158
|
+
editing: a
|
|
148
159
|
}
|
|
149
160
|
)
|
|
150
161
|
]
|
|
151
162
|
}
|
|
152
163
|
) });
|
|
153
|
-
},
|
|
164
|
+
}, ao = (L, d) => ({}), ro = {}, go = K(ao, ro)(to);
|
|
154
165
|
export {
|
|
155
|
-
|
|
166
|
+
go as default
|
|
156
167
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Dropdown as s } from "semantic-ui-react";
|
|
3
|
+
const f = (n) => {
|
|
4
|
+
const {
|
|
5
|
+
options: t,
|
|
6
|
+
onChange: o
|
|
7
|
+
} = n, a = [{
|
|
8
|
+
key: "all",
|
|
9
|
+
value: "all",
|
|
10
|
+
text: "All"
|
|
11
|
+
}, ...t || []];
|
|
12
|
+
return /* @__PURE__ */ i(
|
|
13
|
+
s,
|
|
14
|
+
{
|
|
15
|
+
...n,
|
|
16
|
+
options: a,
|
|
17
|
+
onChange: (e, l) => {
|
|
18
|
+
o && (l.value === "all" ? o(e, { ...l, value: void 0 }) : o(e, l));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
f as default
|
|
25
|
+
};
|
|
@@ -1,26 +1,51 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { Button as c } from "semantic-ui-react";
|
|
4
|
+
import { format as u } from "date-fns";
|
|
5
|
+
import { decodeHtmlEntitiesToText as h, decodeHtmlEntitiesToHtml as g } from "../../utils/data.js";
|
|
6
|
+
import { MediaProvider as f, MediaConsumer as p } from "@devgateway/wp-react-lib";
|
|
7
|
+
import { injectIntl as v } from "react-intl";
|
|
8
|
+
const M = (i) => {
|
|
9
|
+
const { isPostHovered: e } = i;
|
|
10
|
+
return /* @__PURE__ */ t("div", { className: "post-image", children: /* @__PURE__ */ t(
|
|
11
|
+
"img",
|
|
12
|
+
{
|
|
13
|
+
loading: "lazy",
|
|
14
|
+
className: `${e ? "highlighted" : ""}`,
|
|
15
|
+
src: i.media && i.media.guid ? i.media.guid.rendered : null,
|
|
16
|
+
alt: i.media && i.media.alt_text || ""
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
19
|
+
}, _ = (i) => {
|
|
20
|
+
var d, n, r, s;
|
|
21
|
+
const { post: e } = i, [a, o] = m(!1);
|
|
22
|
+
return /* @__PURE__ */ l(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: "post-card",
|
|
26
|
+
onMouseEnter: () => o(!0),
|
|
27
|
+
onMouseLeave: () => o(!1),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ t("a", { href: e.link, target: "_blank", children: /* @__PURE__ */ t(f, { id: e.featured_media, children: /* @__PURE__ */ t(p, { children: /* @__PURE__ */ t(M, { isPostHovered: a }) }) }) }),
|
|
30
|
+
/* @__PURE__ */ l(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: "post-content",
|
|
34
|
+
onMouseEnter: () => o(!0),
|
|
35
|
+
onMouseLeave: () => o(!1),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ t("div", { className: "publication-date", children: u(new Date(e.date), "MMM dd, yyyy") }),
|
|
38
|
+
/* @__PURE__ */ t("a", { href: e.link, target: "_blank", children: /* @__PURE__ */ t("h2", { className: `publication-title ${a ? "highlighted" : ""}`, children: h(((d = e.title) == null ? void 0 : d.rendered) || ((n = e.yoast_head_json) == null ? void 0 : n.title) || "Publication Title") }) }),
|
|
39
|
+
/* @__PURE__ */ t("p", { className: "publication-description", dangerouslySetInnerHTML: { __html: g(((r = e.yoast_head_json) == null ? void 0 : r.og_description) || ((s = e.excerpt) == null ? void 0 : s.rendered) || "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.") } }),
|
|
40
|
+
/* @__PURE__ */ t("a", { href: e.link, children: /* @__PURE__ */ t(c, { className: `read-more-button ${a ? "highlighted" : ""}`, children: "Read more" }) })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
e.id
|
|
47
|
+
);
|
|
48
|
+
}, k = v(_);
|
|
24
49
|
export {
|
|
25
|
-
|
|
50
|
+
k as default
|
|
26
51
|
};
|