@devgateway/dvz-ui-react 1.9.1 → 1.9.3
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-trend/BigNumberTrendContainer.js +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/data-paragraph/index.js +1 -1
- package/dist/cjs/embeddable/filter/index.js +1 -1
- package/dist/cjs/embeddable/grouped-bars/GroupedBars.js +1 -1
- package/dist/cjs/embeddable/newsletter/index.js +1 -1
- package/dist/cjs/embeddable/sankeychart/index.js +1 -1
- package/dist/cjs/embeddable/showcase/index.js +1 -1
- package/dist/cjs/embeddable/tabbedposts/index.js +1 -1
- package/dist/cjs/embeddable/utils/parseUtils.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/tracker/InternalTrafficToggle.js +1 -1
- package/dist/cjs/tracker/InternalTrafficWatermark.js +1 -1
- package/dist/cjs/tracker/index.js +1 -1
- package/dist/cjs/tracker/internalTrafficUtils.js +1 -1
- package/dist/cjs/tracker/useInternalTrafficBypass.js +1 -1
- package/dist/esm/embeddable/big-number-trend/BigNumberTrendContainer.js +79 -79
- package/dist/esm/embeddable/chart/Line.js +209 -207
- package/dist/esm/embeddable/data-paragraph/index.js +119 -119
- package/dist/esm/embeddable/filter/index.js +113 -113
- package/dist/esm/embeddable/grouped-bars/GroupedBars.js +320 -316
- package/dist/esm/embeddable/newsletter/index.js +35 -38
- package/dist/esm/embeddable/sankeychart/index.js +145 -145
- package/dist/esm/embeddable/showcase/index.js +27 -27
- package/dist/esm/embeddable/tabbedposts/index.js +40 -39
- package/dist/esm/embeddable/utils/parseUtils.js +11 -3
- package/dist/esm/index.js +74 -73
- package/dist/esm/tracker/InternalTrafficToggle.js +30 -20
- package/dist/esm/tracker/InternalTrafficWatermark.js +42 -52
- package/dist/esm/tracker/index.js +9 -8
- package/dist/esm/tracker/internalTrafficUtils.js +18 -13
- package/dist/esm/tracker/useInternalTrafficBypass.js +13 -31
- package/dist/types/embeddable/chart/Line.d.ts +2 -0
- package/dist/types/tracker/InternalTrafficToggle.d.ts +1 -4
- package/dist/types/tracker/InternalTrafficWatermark.d.ts +0 -10
- package/dist/types/tracker/internalTrafficUtils.d.ts +1 -14
- package/dist/types/tracker/useInternalTrafficBypass.d.ts +4 -10
- package/package.json +1 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import y, { useState as v, useRef as G, useEffect as I } from "react";
|
|
3
|
-
import { Container as
|
|
3
|
+
import { Container as b, Accordion as p, Icon as V, Menu as T, Grid as w, Label as M, Button as W } from "semantic-ui-react";
|
|
4
4
|
import { PostProvider as q, PostConsumer as N, MediaProvider as P, MediaConsumer as k, PostIcon as L, PostLabel as S } from "@devgateway/wp-react-lib";
|
|
5
5
|
import { injectIntl as E } from "react-intl";
|
|
6
6
|
import { connect as z } from "react-redux";
|
|
7
7
|
import A from "../connected-templates/PostIntro.js";
|
|
8
8
|
import { useWindowDimensionsAndDevice as O } from "../../lib/hooks/window-dimensions.js";
|
|
9
|
-
|
|
9
|
+
import { parse as U } from "../utils/parseUtils.js";
|
|
10
|
+
const Y = ({ posts: t, activeItem: c, setActive: i, showLabels: n }) => t ? t.map((l) => /* @__PURE__ */ e(
|
|
10
11
|
T.Item,
|
|
11
12
|
{
|
|
12
13
|
onClick: () => i(l.slug),
|
|
13
|
-
className: l.slug ===
|
|
14
|
+
className: l.slug === c ? "active" : "",
|
|
14
15
|
children: n ? /* @__PURE__ */ e(S, { post: l }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: l.title.rendered } }) })
|
|
15
16
|
},
|
|
16
17
|
l.id
|
|
17
|
-
)) : null,
|
|
18
|
+
)) : null, J = ({
|
|
18
19
|
posts: t,
|
|
19
|
-
activeItem:
|
|
20
|
+
activeItem: c,
|
|
20
21
|
setActive: i,
|
|
21
22
|
showIcons: n,
|
|
22
23
|
showLabels: l
|
|
@@ -27,7 +28,7 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
27
28
|
return (d = r._embedded) != null && d["wp:featuredmedia"] && r._embedded["wp:featuredmedia"][0].source_url, /* @__PURE__ */ e(
|
|
28
29
|
w.Column,
|
|
29
30
|
{
|
|
30
|
-
className: (r.slug ===
|
|
31
|
+
className: (r.slug === c ? "active" : "") + (n ? " has-icon" : ""),
|
|
31
32
|
children: /* @__PURE__ */ g(
|
|
32
33
|
W,
|
|
33
34
|
{
|
|
@@ -54,12 +55,12 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
54
55
|
r.id
|
|
55
56
|
);
|
|
56
57
|
}) : null;
|
|
57
|
-
}, $ = ({ posts: t, activeItem:
|
|
58
|
+
}, $ = ({ posts: t, activeItem: c }) => (I(() => {
|
|
58
59
|
const i = document.querySelector(".ui.container.content-tab");
|
|
59
60
|
i && (i.scrollTop = 0);
|
|
60
|
-
}, [
|
|
61
|
+
}, [c]), t ? t.map((i) => {
|
|
61
62
|
let n = {};
|
|
62
|
-
return i.slug !==
|
|
63
|
+
return i.slug !== c ? n = {
|
|
63
64
|
position: "absolute",
|
|
64
65
|
left: "-3000px",
|
|
65
66
|
width: "auto",
|
|
@@ -70,10 +71,10 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
70
71
|
visibility: "visible",
|
|
71
72
|
position: "relative",
|
|
72
73
|
width: "auto"
|
|
73
|
-
}, /* @__PURE__ */ e(A, { as:
|
|
74
|
-
}) : null),
|
|
74
|
+
}, /* @__PURE__ */ e(A, { as: b, fluid: !0, post: i, style: n }, i.slug);
|
|
75
|
+
}) : null), K = ({ posts: t, activeItem: c, setActive: i }) => {
|
|
75
76
|
const [n, l] = v(
|
|
76
|
-
t.findIndex((s) => s.slug ===
|
|
77
|
+
t.findIndex((s) => s.slug === c)
|
|
77
78
|
), [o, r] = v(null), d = G(null);
|
|
78
79
|
I(() => {
|
|
79
80
|
if (o) {
|
|
@@ -85,12 +86,12 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
85
86
|
}
|
|
86
87
|
}, [o]);
|
|
87
88
|
const m = (s, u) => {
|
|
88
|
-
const { index:
|
|
89
|
-
l(h), i(t[
|
|
89
|
+
const { index: a } = u, h = n === a ? -1 : a;
|
|
90
|
+
l(h), i(t[a].slug), h !== -1 && r(s.currentTarget);
|
|
90
91
|
};
|
|
91
92
|
return /* @__PURE__ */ e(p, { fluid: !0, styled: !0, children: t.map((s, u) => {
|
|
92
93
|
var h;
|
|
93
|
-
const
|
|
94
|
+
const a = (h = s.meta_fields) != null && h.icon ? s.meta_fields.icon[0] : null;
|
|
94
95
|
return /* @__PURE__ */ g(y.Fragment, { children: [
|
|
95
96
|
/* @__PURE__ */ e(
|
|
96
97
|
p.Title,
|
|
@@ -109,12 +110,12 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
109
110
|
},
|
|
110
111
|
children: [
|
|
111
112
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
112
|
-
|
|
113
|
+
a && /* @__PURE__ */ e(P, { id: a, children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(L, { className: "icon" }) }) }),
|
|
113
114
|
/* @__PURE__ */ e(
|
|
114
115
|
"span",
|
|
115
116
|
{
|
|
116
117
|
dangerouslySetInnerHTML: { __html: s.title.rendered },
|
|
117
|
-
style: { marginLeft:
|
|
118
|
+
style: { marginLeft: a ? "10px" : "0" }
|
|
118
119
|
}
|
|
119
120
|
)
|
|
120
121
|
] }),
|
|
@@ -129,12 +130,12 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
129
130
|
{
|
|
130
131
|
className: "accordion-post-content",
|
|
131
132
|
active: n === u,
|
|
132
|
-
children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(A, { post: s, as:
|
|
133
|
+
children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(A, { post: s, as: b, fluid: !0 }) })
|
|
133
134
|
}
|
|
134
135
|
)
|
|
135
136
|
] }, s.id);
|
|
136
137
|
}) });
|
|
137
|
-
},
|
|
138
|
+
}, Q = ({ posts: t, showLabels: c, height: i }) => {
|
|
138
139
|
const [n, l] = v(t ? t[0].slug : null);
|
|
139
140
|
return I(() => {
|
|
140
141
|
setTimeout(() => {
|
|
@@ -145,19 +146,19 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
145
146
|
}, 0);
|
|
146
147
|
}, [t]), /* @__PURE__ */ g(y.Fragment, { children: [
|
|
147
148
|
t.map((o) => /* @__PURE__ */ e("anchor", { id: o.slug }, o.slug)),
|
|
148
|
-
/* @__PURE__ */ e(T, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(
|
|
149
|
-
/* @__PURE__ */ e(
|
|
149
|
+
/* @__PURE__ */ e(T, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(Y, { showLabels: c, posts: t, setActive: l, activeItem: n }) }),
|
|
150
|
+
/* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e($, { posts: t, activeItem: n }) })
|
|
150
151
|
] });
|
|
151
|
-
},
|
|
152
|
+
}, X = ({ posts: t, showLabels: c, showIcons: i, height: n }) => {
|
|
152
153
|
const [l, o] = v(t ? t[0].slug : null);
|
|
153
154
|
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(
|
|
155
|
-
/* @__PURE__ */ e(w.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(w.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(
|
|
155
|
+
/* @__PURE__ */ e(J, { showIcons: i, showLabels: c, posts: t, activeItem: l, setActive: o }),
|
|
156
|
+
/* @__PURE__ */ e(w.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(w.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${n}px` }, children: /* @__PURE__ */ e($, { className: "content-tab", posts: t, activeItem: l }) }) }) })
|
|
156
157
|
] }) });
|
|
157
|
-
},
|
|
158
|
+
}, Z = (t) => {
|
|
158
159
|
var _;
|
|
159
160
|
let {
|
|
160
|
-
"data-type":
|
|
161
|
+
"data-type": c,
|
|
161
162
|
"data-taxonomy": i,
|
|
162
163
|
"data-categories": n,
|
|
163
164
|
"data-items": l,
|
|
@@ -167,26 +168,26 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
167
168
|
"data-show-labels": m,
|
|
168
169
|
"data-height": s,
|
|
169
170
|
"data-preview-mode": u = "Desktop",
|
|
170
|
-
pageModuleProps:
|
|
171
|
+
pageModuleProps: a,
|
|
171
172
|
parent: h,
|
|
172
|
-
editing:
|
|
173
|
+
editing: f,
|
|
173
174
|
unique: D
|
|
174
175
|
} = t;
|
|
175
|
-
|
|
176
|
-
const R = t.intl.locale, x = d === "true", C = x ? s : void 0, { width: j } = O(), H = j <= 1024, B = u !== "Desktop" &&
|
|
177
|
-
return /* @__PURE__ */ e(
|
|
176
|
+
a != null && a.previewMode && (a != null && a.editing) && (u = a.previewMode, f = a.editing);
|
|
177
|
+
const R = t.intl.locale, x = d === "true", C = x ? s : void 0, { width: j } = O(), H = j <= 1024, B = u !== "Desktop" && f, F = H && !f;
|
|
178
|
+
return /* @__PURE__ */ e(b, { className: `viz tabbed posts ${f ? "editing" : ""} ${x ? "scrollable" : ""}`, fluid: !0, children: /* @__PURE__ */ e(
|
|
178
179
|
q,
|
|
179
180
|
{
|
|
180
181
|
locale: R,
|
|
181
|
-
type:
|
|
182
|
+
type: c,
|
|
182
183
|
taxonomy: i,
|
|
183
|
-
categories: n,
|
|
184
|
+
categories: U(n, f),
|
|
184
185
|
store: `tabbedposts_${h}_${D}`,
|
|
185
186
|
page: 1,
|
|
186
187
|
perPage: l,
|
|
187
|
-
children: /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(N, { children: F || B ? /* @__PURE__ */ e(
|
|
188
|
-
} }) : o === "light" ? /* @__PURE__ */ e(
|
|
189
|
-
|
|
188
|
+
children: /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(N, { children: F || B ? /* @__PURE__ */ e(K, { posts: l, activeItem: (_ = l[0]) == null ? void 0 : _.slug, setActive: () => {
|
|
189
|
+
} }) : o === "light" ? /* @__PURE__ */ e(Q, { height: C, showLabels: m === "true" }) : /* @__PURE__ */ e(
|
|
190
|
+
X,
|
|
190
191
|
{
|
|
191
192
|
height: C,
|
|
192
193
|
showLabels: m === "true",
|
|
@@ -195,13 +196,13 @@ const U = ({ posts: t, activeItem: a, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
195
196
|
) }) })
|
|
196
197
|
}
|
|
197
198
|
) });
|
|
198
|
-
},
|
|
199
|
+
}, ee = (t, c) => {
|
|
199
200
|
const i = t.getIn([
|
|
200
201
|
"data",
|
|
201
202
|
"pageModuleProps"
|
|
202
203
|
]), n = {};
|
|
203
204
|
return i && (n.pageModuleProps = i), n;
|
|
204
|
-
},
|
|
205
|
+
}, te = {}, ue = z(ee, te)(E(Z));
|
|
205
206
|
export {
|
|
206
|
-
|
|
207
|
+
ue as default
|
|
207
208
|
};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
const n = (r, e) =>
|
|
1
|
+
const n = (r, e) => {
|
|
2
|
+
if (e)
|
|
3
|
+
return r;
|
|
4
|
+
try {
|
|
5
|
+
return decodeURIComponent(r.replace(/%(?![0-9a-fA-F][0-9a-fA-F]+)/g, "%25"));
|
|
6
|
+
} catch {
|
|
7
|
+
console.error("error decoding value:" + r);
|
|
8
|
+
}
|
|
9
|
+
}, t = (r, e) => {
|
|
2
10
|
try {
|
|
3
11
|
return JSON.parse(n(r, e));
|
|
4
12
|
} catch {
|
|
5
13
|
console.error("error parsing value:" + r);
|
|
6
14
|
}
|
|
7
15
|
return null;
|
|
8
|
-
},
|
|
16
|
+
}, c = (r, e) => JSON.stringify(r) === JSON.stringify(e);
|
|
9
17
|
export {
|
|
10
|
-
|
|
18
|
+
c as compareJsonProps,
|
|
11
19
|
n as decode,
|
|
12
20
|
t as parse
|
|
13
21
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { default as S } from "./layout/containers/PreviewPageContainer.js";
|
|
|
6
6
|
import { default as v } from "./layout/containers/PreviewTypeContainer.js";
|
|
7
7
|
import { default as A } from "./layout/containers/SlugContainer.js";
|
|
8
8
|
import { default as H } from "./layout/containers/SlugPostContainer.js";
|
|
9
|
-
import { CustomizerWrapper as
|
|
10
|
-
import { default as
|
|
9
|
+
import { CustomizerWrapper as R } from "./layout/Customizer.js";
|
|
10
|
+
import { default as w } 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";
|
|
@@ -19,107 +19,108 @@ import { default as j } from "./layout/LangSwitcher.js";
|
|
|
19
19
|
import { default as G } from "./layout/Footer.js";
|
|
20
20
|
import { default as X } from "./layout/ClassicHeader.js";
|
|
21
21
|
import { default as $ } from "./layout/FlexWrapDetector.js";
|
|
22
|
-
import { default as
|
|
23
|
-
import { withTracker as
|
|
24
|
-
import { clearInternalTrafficCookie as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { useInternalTrafficBypass as
|
|
28
|
-
import { store as
|
|
29
|
-
import { useAppDispatch as
|
|
30
|
-
import { UPDATE as
|
|
31
|
-
import { combineReducers as
|
|
32
|
-
import * as
|
|
33
|
-
import * as
|
|
22
|
+
import { default as er } from "./layout/FloatingMenuHeader.js";
|
|
23
|
+
import { withTracker as tr } from "./tracker/withGoogleAnalytics.js";
|
|
24
|
+
import { clearInternalTrafficCookie as fr, getInternalTrafficExpiry as sr, isInternalTrafficEnabled as pr, setInternalTrafficCookie as nr } from "./tracker/internalTrafficUtils.js";
|
|
25
|
+
import { default as ir } from "./tracker/InternalTrafficToggle.js";
|
|
26
|
+
import { default as xr } from "./tracker/InternalTrafficWatermark.js";
|
|
27
|
+
import { useInternalTrafficBypass as ur } from "./tracker/useInternalTrafficBypass.js";
|
|
28
|
+
import { store as Tr } from "./redux/store.js";
|
|
29
|
+
import { useAppDispatch as gr, useAppSelector as Pr } from "./redux/hooks.js";
|
|
30
|
+
import { UPDATE as Sr, initialState as hr, intlReducer as vr, updateIntl as yr } from "./lib/react-intl-redux/index.js";
|
|
31
|
+
import { combineReducers as Dr } from "./lib/redux-immutable/index.js";
|
|
32
|
+
import * as r from "./translations/en.json.js";
|
|
33
|
+
import * as e from "./translations/fr.json.js";
|
|
34
34
|
import * as o from "./translations/af.json.js";
|
|
35
35
|
import * as t from "./translations/am.json.js";
|
|
36
|
-
import { COUNTRY_OPTIONS as
|
|
37
|
-
import { decodeHtmlEntitiesToHtml as
|
|
38
|
-
import { Media as
|
|
39
|
-
import { getUnhandledProps as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { CategoriesContext as
|
|
36
|
+
import { COUNTRY_OPTIONS as Er } from "./countries.js";
|
|
37
|
+
import { decodeHtmlEntitiesToHtml as kr, decodeHtmlEntitiesToText as wr, stringToArray as Fr, toBoolean as Lr, toNumber as Mr, uriStringToArray as Nr } from "./utils/data.js";
|
|
38
|
+
import { Media as br, MediaContextProvider as Br, mediaStyle as Ur } from "./utils/AppMedia.js";
|
|
39
|
+
import { getUnhandledProps as zr, htmlImageProps as Kr, htmlInputAttrs as Jr, htmlInputEvents as Vr, htmlInputProps as Yr, partitionHTMLProps as _r, useKeyOnly as jr, useValueAndKey as qr } from "./utils/semanticUtils.js";
|
|
40
|
+
import { default as Qr, useDataContext as Xr } from "./embeddable/data/DataConsumer.js";
|
|
41
|
+
import { default as $r } from "./embeddable/data/DataProvider.js";
|
|
42
|
+
import { CategoriesContext as ee, DataContext as oe, PostsContext as te } from "./embeddable/data/DataContext.js";
|
|
43
43
|
import "react/jsx-runtime";
|
|
44
44
|
import "react";
|
|
45
45
|
import "./embeddable/data/CategoriesProvider.js";
|
|
46
|
-
import { compareJsonProps as
|
|
46
|
+
import { compareJsonProps as fe, decode as se, parse as pe } from "./embeddable/utils/parseUtils.js";
|
|
47
47
|
import * as p from "./embeddable/reducers/data.js";
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
48
|
+
import { default as me } from "./lib/react-intl-redux/providers/Provider.js";
|
|
49
|
+
import { default as le } from "./lib/react-intl-redux/providers/IntlProvider.js";
|
|
50
50
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
Er as COUNTRY_OPTIONS,
|
|
52
|
+
ee as CategoriesContext,
|
|
53
53
|
X as ClassicHeader,
|
|
54
54
|
c as Config,
|
|
55
55
|
z as CustomSemanticSearch,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
R as CustomizerWrapper,
|
|
57
|
+
Qr as DataConsumer,
|
|
58
|
+
oe as DataContext,
|
|
59
|
+
$r as DataProvider,
|
|
60
60
|
N as Favicon,
|
|
61
61
|
$ as FlexWrapDetector,
|
|
62
|
-
|
|
62
|
+
er as FloatingMenuHeader,
|
|
63
63
|
G as Footer,
|
|
64
64
|
J as Header,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
ir as InternalTrafficToggle,
|
|
66
|
+
xr as InternalTrafficWatermark,
|
|
67
|
+
le as IntlProvider,
|
|
68
68
|
j as LangSwitcher,
|
|
69
69
|
U as Loading,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
br as Media,
|
|
71
|
+
Br as MediaContextProvider,
|
|
72
|
+
te as PostsContext,
|
|
73
73
|
L as PreviewComponent,
|
|
74
74
|
S as PreviewPageContainer,
|
|
75
75
|
v as PreviewTypeContainer,
|
|
76
|
-
|
|
76
|
+
me as Provider,
|
|
77
77
|
C as ResponsiveContainer,
|
|
78
|
-
|
|
78
|
+
w as RootLayout,
|
|
79
79
|
b as SSRFavicon,
|
|
80
80
|
P as ScrollToTop,
|
|
81
81
|
Y as SearchControl,
|
|
82
82
|
A as SlugContainer,
|
|
83
83
|
H as SlugPostContainer,
|
|
84
|
-
|
|
84
|
+
Sr as UPDATE,
|
|
85
85
|
o as afrikaansTranslations,
|
|
86
86
|
t as amharicTranslations,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
fr as clearInternalTrafficCookie,
|
|
88
|
+
Dr as combineReducers,
|
|
89
|
+
fe as compareJsonProps,
|
|
90
90
|
i as components,
|
|
91
91
|
l as customizer,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
se as decode,
|
|
93
|
+
kr as decodeHtmlEntitiesToHtml,
|
|
94
|
+
wr as decodeHtmlEntitiesToText,
|
|
95
|
+
r as englishTranslations,
|
|
96
|
+
e as frenchTranslations,
|
|
97
97
|
x as getComponentByNameIgnoreCase,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
98
|
+
sr as getInternalTrafficExpiry,
|
|
99
|
+
zr as getUnhandledProps,
|
|
100
|
+
Kr as htmlImageProps,
|
|
101
|
+
Jr as htmlInputAttrs,
|
|
102
|
+
Vr as htmlInputEvents,
|
|
103
|
+
Yr as htmlInputProps,
|
|
104
|
+
hr as initialState,
|
|
105
|
+
vr as intlReducer,
|
|
106
|
+
pr as isInternalTrafficEnabled,
|
|
107
|
+
Ur as mediaStyle,
|
|
108
|
+
pe as parse,
|
|
109
|
+
_r as partitionHTMLProps,
|
|
109
110
|
p as reducer,
|
|
110
111
|
d as reducers,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
112
|
+
nr as setInternalTrafficCookie,
|
|
113
|
+
Tr as store,
|
|
114
|
+
Fr as stringToArray,
|
|
115
|
+
Lr as toBoolean,
|
|
116
|
+
Mr as toNumber,
|
|
117
|
+
yr as updateIntl,
|
|
118
|
+
Nr as uriStringToArray,
|
|
119
|
+
gr as useAppDispatch,
|
|
120
|
+
Pr as useAppSelector,
|
|
121
|
+
Xr as useDataContext,
|
|
122
|
+
ur as useInternalTrafficBypass,
|
|
123
|
+
jr as useKeyOnly,
|
|
124
|
+
qr as useValueAndKey,
|
|
125
|
+
tr as withTracker
|
|
125
126
|
};
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Container as
|
|
3
|
-
import { useInternalTrafficBypass as
|
|
4
|
-
const
|
|
5
|
-
const {
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */ r(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Container as s, Segment as i, Header as l, Message as a, Button as c } from "semantic-ui-react";
|
|
3
|
+
import { useInternalTrafficBypass as d } from "./useInternalTrafficBypass.js";
|
|
4
|
+
const g = () => {
|
|
5
|
+
const { isEnabled: e, expiresAt: t, toggle: o } = d();
|
|
6
|
+
return /* @__PURE__ */ n(s, { as: "div", children: [
|
|
7
|
+
/* @__PURE__ */ r(i, { textAlign: "center", basic: !0, vertical: !0, children: /* @__PURE__ */ r(l, { as: "h1", content: "Google Analytics Bypass" }) }),
|
|
8
|
+
/* @__PURE__ */ n(i, { vertical: !0, children: [
|
|
9
|
+
/* @__PURE__ */ n(a, { color: e ? "green" : "blue", children: [
|
|
10
|
+
/* @__PURE__ */ r(a.Header, { children: e ? "Internal traffic bypass is ON" : "Internal traffic bypass is OFF" }),
|
|
11
|
+
/* @__PURE__ */ r("p", { children: e ? "Your visits are excluded from GA4. Disable to resume normal tracking." : "Your visits are being tracked in GA4. Enable to exclude internal traffic." }),
|
|
12
|
+
e && t && /* @__PURE__ */ n("p", { style: { marginTop: "0.5em", fontSize: "0.9em", opacity: 0.8 }, children: [
|
|
13
|
+
"Cookie expires: ",
|
|
14
|
+
t.toLocaleDateString(void 0, {
|
|
15
|
+
year: "numeric",
|
|
16
|
+
month: "long",
|
|
17
|
+
day: "numeric"
|
|
18
|
+
})
|
|
19
|
+
] })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
c,
|
|
23
|
+
{
|
|
24
|
+
color: e ? "red" : "green",
|
|
25
|
+
onClick: o,
|
|
26
|
+
content: e ? "Disable bypass" : "Enable bypass"
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] })
|
|
20
30
|
] });
|
|
21
31
|
};
|
|
22
32
|
export {
|
|
23
|
-
|
|
33
|
+
g as default
|
|
24
34
|
};
|
|
@@ -1,60 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Popup as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
b(()
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
y: window.innerHeight - 40
|
|
12
|
-
});
|
|
13
|
-
const e = () => {
|
|
14
|
-
r(f());
|
|
15
|
-
};
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as t, useRef as f, useEffect as g } from "react";
|
|
3
|
+
import { Popup as E, Label as I, Icon as L } from "semantic-ui-react";
|
|
4
|
+
import { useNavigate as M } from "react-router";
|
|
5
|
+
import { isInternalTrafficEnabled as m } from "./internalTrafficUtils.js";
|
|
6
|
+
const A = () => {
|
|
7
|
+
const p = M(), [w, a] = t(!1), [v, b] = t(!1), [n, l] = t({ x: 0, y: 0 }), [o, c] = t(!1), r = f({ x: 0, y: 0 }), s = f(!1);
|
|
8
|
+
g(() => {
|
|
9
|
+
b(!0), a(m()), l({ x: window.innerWidth - 200, y: window.innerHeight - 40 });
|
|
10
|
+
const e = () => a(m());
|
|
16
11
|
return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
|
|
17
|
-
}, [])
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
x:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
if (!u || !c)
|
|
32
|
-
return null;
|
|
33
|
-
const y = {
|
|
34
|
-
position: "fixed",
|
|
35
|
-
left: `${t.x}px`,
|
|
36
|
-
top: `${t.y}px`,
|
|
37
|
-
zIndex: 999999,
|
|
38
|
-
willChange: o ? "transform" : "auto",
|
|
39
|
-
cursor: o ? "grabbing" : "grab"
|
|
12
|
+
}, []), g(() => {
|
|
13
|
+
if (!o) return;
|
|
14
|
+
const e = (d) => {
|
|
15
|
+
s.current = !0, l({ x: d.clientX - r.current.x, y: d.clientY - r.current.y });
|
|
16
|
+
}, u = () => c(!1);
|
|
17
|
+
return window.addEventListener("mousemove", e), window.addEventListener("mouseup", u), () => {
|
|
18
|
+
window.removeEventListener("mousemove", e), window.removeEventListener("mouseup", u);
|
|
19
|
+
};
|
|
20
|
+
}, [o]);
|
|
21
|
+
const x = (e) => {
|
|
22
|
+
s.current = !1, r.current = { x: e.clientX - n.x, y: e.clientY - n.y }, c(!0);
|
|
23
|
+
}, y = () => {
|
|
24
|
+
s.current || p("/__ga/internal");
|
|
40
25
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
26
|
+
return !v || !w ? null : /* @__PURE__ */ i(
|
|
42
27
|
"div",
|
|
43
28
|
{
|
|
44
|
-
style:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
style: {
|
|
30
|
+
position: "fixed",
|
|
31
|
+
left: n.x,
|
|
32
|
+
top: n.y,
|
|
33
|
+
zIndex: 999999,
|
|
34
|
+
cursor: o ? "grabbing" : "grab",
|
|
35
|
+
userSelect: "none"
|
|
36
|
+
},
|
|
37
|
+
onMouseDown: x,
|
|
38
|
+
onClick: y,
|
|
39
|
+
role: "button",
|
|
40
|
+
"aria-label": "GA bypass enabled — click to manage",
|
|
41
|
+
children: /* @__PURE__ */ i(
|
|
42
|
+
E,
|
|
53
43
|
{
|
|
54
|
-
content: "
|
|
44
|
+
content: "Click to manage bypass settings",
|
|
55
45
|
position: "left center",
|
|
56
|
-
trigger: /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
46
|
+
trigger: /* @__PURE__ */ h(I, { color: "yellow", image: !0, children: [
|
|
47
|
+
/* @__PURE__ */ i(L, { name: "spinner", loading: !0, color: "red" }),
|
|
58
48
|
"GA Bypass Enabled"
|
|
59
49
|
] })
|
|
60
50
|
}
|
|
@@ -63,5 +53,5 @@ const S = () => {
|
|
|
63
53
|
);
|
|
64
54
|
};
|
|
65
55
|
export {
|
|
66
|
-
|
|
56
|
+
A as default
|
|
67
57
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { withTracker as e } from "./withGoogleAnalytics.js";
|
|
2
|
-
import { clearInternalTrafficCookie as t, isInternalTrafficEnabled as o, setInternalTrafficCookie as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { useInternalTrafficBypass as
|
|
2
|
+
import { clearInternalTrafficCookie as t, getInternalTrafficExpiry as n, isInternalTrafficEnabled as o, setInternalTrafficCookie as i } from "./internalTrafficUtils.js";
|
|
3
|
+
import { default as c } from "./InternalTrafficToggle.js";
|
|
4
|
+
import { default as p } from "./InternalTrafficWatermark.js";
|
|
5
|
+
import { useInternalTrafficBypass as I } from "./useInternalTrafficBypass.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
c as InternalTrafficToggle,
|
|
8
|
+
p as InternalTrafficWatermark,
|
|
9
9
|
t as clearInternalTrafficCookie,
|
|
10
|
+
n as getInternalTrafficExpiry,
|
|
10
11
|
o as isInternalTrafficEnabled,
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
i as setInternalTrafficCookie,
|
|
13
|
+
I as useInternalTrafficBypass,
|
|
13
14
|
e as withTracker
|
|
14
15
|
};
|