@burdenoff/fe-libs 2026.904.9 → 2026.904.11
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicFooter.d.ts","sourceRoot":"","sources":["../../src/chrome/DynamicFooter.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DynamicFooter.d.ts","sourceRoot":"","sources":["../../src/chrome/DynamicFooter.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA6FzD,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,kDAAkD;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,WAAW,EACX,OAAO,EACP,OAAkB,EAClB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,iBAAiB,EAC9B,cAAiC,EACjC,eAAuB,EACvB,kBAAyB,GAC1B,EAAE,kBAAkB,2CAqLpB"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { useGatewayClient as e } from "../shared/graphql/GatewayContext.js";
|
|
2
2
|
import "../shared-graphql.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { Link as y } from "react-router";
|
|
3
|
+
import { useActiveContext as t } from "../shared/providers/shell/ActiveContextProvider.js";
|
|
4
|
+
import { useI18n as n } from "../shared/providers/shell/I18nProvider.js";
|
|
5
|
+
import { DEFAULT_FOOTER_COLUMNS as r, DEFAULT_SOCIAL_LINKS as i, Footer as a } from "./Footer.js";
|
|
6
|
+
import { BrandMark as o } from "./BrandMark.js";
|
|
7
|
+
import { useEffect as s, useMemo as c, useState as l } from "react";
|
|
8
|
+
import { Github as u, Globe as d, Linkedin as f, MessageCircle as p, Twitter as m, Youtube as h } from "lucide-react";
|
|
9
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
10
|
+
import { gql as _ } from "@apollo/client/core";
|
|
11
|
+
import { Link as v } from "react-router";
|
|
13
12
|
//#region src/chrome/DynamicFooter.tsx
|
|
14
|
-
var
|
|
15
|
-
query
|
|
16
|
-
|
|
13
|
+
var y = _`
|
|
14
|
+
query GetFooterPublicProduct($slug: String!) {
|
|
15
|
+
publicProduct(slug: $slug) {
|
|
16
|
+
id
|
|
17
|
+
socialLinks
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`, b = _`
|
|
21
|
+
query GetFooterPublicContentPages($productId: String!, $limit: Int) {
|
|
22
|
+
publicContentPages(productId: $productId, limit: $limit) {
|
|
17
23
|
items {
|
|
18
24
|
id
|
|
19
25
|
slug
|
|
@@ -23,14 +29,7 @@ var b = v`
|
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
|
-
`, x =
|
|
27
|
-
query GetFooterProduct($slug: String!) {
|
|
28
|
-
platformProductBySlug(slug: $slug) {
|
|
29
|
-
id
|
|
30
|
-
socialLinks
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`, S = {
|
|
32
|
+
`, x = {
|
|
34
33
|
"privacy-policy": "privacy",
|
|
35
34
|
"terms-of-service": "terms",
|
|
36
35
|
"cookie-policy": "cookies",
|
|
@@ -41,14 +40,14 @@ var b = v`
|
|
|
41
40
|
compliance: "compliance",
|
|
42
41
|
about: "about",
|
|
43
42
|
contact: "contact"
|
|
44
|
-
},
|
|
45
|
-
twitter: /* @__PURE__ */
|
|
46
|
-
x: /* @__PURE__ */
|
|
47
|
-
github: /* @__PURE__ */
|
|
48
|
-
discord: /* @__PURE__ */
|
|
49
|
-
linkedin: /* @__PURE__ */
|
|
50
|
-
youtube: /* @__PURE__ */
|
|
51
|
-
},
|
|
43
|
+
}, S = {
|
|
44
|
+
twitter: /* @__PURE__ */ g(m, { className: "size-5" }),
|
|
45
|
+
x: /* @__PURE__ */ g(m, { className: "size-5" }),
|
|
46
|
+
github: /* @__PURE__ */ g(u, { className: "size-5" }),
|
|
47
|
+
discord: /* @__PURE__ */ g(p, { className: "size-5" }),
|
|
48
|
+
linkedin: /* @__PURE__ */ g(f, { className: "size-5" }),
|
|
49
|
+
youtube: /* @__PURE__ */ g(h, { className: "size-5" })
|
|
50
|
+
}, C = [
|
|
52
51
|
"terms-of-service",
|
|
53
52
|
"privacy-policy",
|
|
54
53
|
"security",
|
|
@@ -58,106 +57,103 @@ var b = v`
|
|
|
58
57
|
"sla",
|
|
59
58
|
"refund-policy"
|
|
60
59
|
];
|
|
61
|
-
function
|
|
60
|
+
function w(e) {
|
|
62
61
|
return e.trim().replace(/[^A-Za-z0-9 ]/g, "").split(/\s+/).map((e, t) => t === 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("");
|
|
63
62
|
}
|
|
64
|
-
function
|
|
65
|
-
let { workspaceId:
|
|
66
|
-
|
|
67
|
-
if (!
|
|
63
|
+
function T({ productSlug: u, productName: f, tagline: p, version: m = "v1.0.0", columns: h, socialLinks: _, legalPageOrder: T = C, deferRemoteData: E = !1, hideOnInstalledApp: D = !0 }) {
|
|
64
|
+
let { workspaceId: O, projectId: k } = t(), A = e("global"), { t: j } = n(), [M, N] = l(null), [P, F] = l(null);
|
|
65
|
+
s(() => {
|
|
66
|
+
if (!A || E) return;
|
|
68
67
|
let e = !1;
|
|
69
|
-
return
|
|
70
|
-
query:
|
|
71
|
-
variables: {
|
|
72
|
-
filter: { isPublished: !0 },
|
|
73
|
-
limit: 50
|
|
74
|
-
},
|
|
68
|
+
return A.query({
|
|
69
|
+
query: y,
|
|
70
|
+
variables: { slug: u },
|
|
75
71
|
fetchPolicy: "cache-first"
|
|
76
72
|
}).then((t) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
if (e) return;
|
|
74
|
+
let n = t.data?.publicProduct;
|
|
75
|
+
if (n) {
|
|
76
|
+
if (!_) {
|
|
77
|
+
let e = n.socialLinks;
|
|
78
|
+
if (e && Object.keys(e).length > 0) {
|
|
79
|
+
let t = Object.entries(e).map(([e, t]) => ({
|
|
80
|
+
id: e,
|
|
81
|
+
label: e.charAt(0).toUpperCase() + e.slice(1),
|
|
82
|
+
href: t,
|
|
83
|
+
icon: S[e.toLowerCase()] || /* @__PURE__ */ g(d, { className: "size-5" })
|
|
84
|
+
}));
|
|
85
|
+
t.length > 0 && F(t);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return A.query({
|
|
89
|
+
query: b,
|
|
90
|
+
variables: {
|
|
91
|
+
productId: n.id,
|
|
92
|
+
limit: 50
|
|
93
|
+
},
|
|
94
|
+
fetchPolicy: "cache-first"
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}).then((t) => {
|
|
98
|
+
if (e || !t) return;
|
|
99
|
+
let n = t.data?.publicContentPages?.items;
|
|
100
|
+
if (!n) return;
|
|
101
|
+
let r = T.map((e) => n.find((t) => t.slug === e)).filter((e) => e != null).map((e) => ({
|
|
80
102
|
id: e.slug,
|
|
81
103
|
label: e.title,
|
|
82
|
-
href: `/legal/${
|
|
83
|
-
}));
|
|
84
|
-
i.length > 0 && F(i);
|
|
85
|
-
}).catch(() => {}), () => {
|
|
86
|
-
e = !0;
|
|
87
|
-
};
|
|
88
|
-
}, [
|
|
89
|
-
D,
|
|
90
|
-
M,
|
|
91
|
-
j,
|
|
92
|
-
E
|
|
93
|
-
]), c(() => {
|
|
94
|
-
if (!j || !M || v || D) return;
|
|
95
|
-
let e = !1;
|
|
96
|
-
return M.query({
|
|
97
|
-
query: x,
|
|
98
|
-
variables: { slug: d },
|
|
99
|
-
fetchPolicy: "cache-first"
|
|
100
|
-
}).then((t) => {
|
|
101
|
-
if (e) return;
|
|
102
|
-
let n = t.data?.platformProductBySlug?.socialLinks;
|
|
103
|
-
if (!n || Object.keys(n).length === 0) return;
|
|
104
|
-
let r = Object.entries(n).map(([e, t]) => ({
|
|
105
|
-
id: e,
|
|
106
|
-
label: e.charAt(0).toUpperCase() + e.slice(1),
|
|
107
|
-
href: t,
|
|
108
|
-
icon: C[e.toLowerCase()] || /* @__PURE__ */ _(f, { className: "size-5" })
|
|
104
|
+
href: `/legal/${x[e.slug] || e.slug}`
|
|
109
105
|
}));
|
|
110
|
-
r.length > 0 &&
|
|
106
|
+
r.length > 0 && N(r);
|
|
111
107
|
}).catch(() => {}), () => {
|
|
112
108
|
e = !0;
|
|
113
109
|
};
|
|
114
110
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
_,
|
|
112
|
+
E,
|
|
113
|
+
A,
|
|
114
|
+
T,
|
|
115
|
+
u
|
|
120
116
|
]);
|
|
121
|
-
let
|
|
122
|
-
let e =
|
|
117
|
+
let I = c(() => {
|
|
118
|
+
let e = h ?? r, t = M ? e.map((e) => e.title === "Legal" ? {
|
|
123
119
|
...e,
|
|
124
|
-
links:
|
|
120
|
+
links: M
|
|
125
121
|
} : e) : e, n = (e, t) => {
|
|
126
|
-
let n =
|
|
122
|
+
let n = j(e);
|
|
127
123
|
return n === e ? t : n;
|
|
128
124
|
};
|
|
129
125
|
return t.map((e) => ({
|
|
130
126
|
...e,
|
|
131
|
-
title: n(`footer.columns.${
|
|
127
|
+
title: n(`footer.columns.${w(e.title)}`, e.title),
|
|
132
128
|
links: e.links.map((e) => e.brand ? e : {
|
|
133
129
|
...e,
|
|
134
130
|
label: n(`footer.links.${e.id}`, e.label)
|
|
135
131
|
})
|
|
136
132
|
}));
|
|
137
133
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
M,
|
|
135
|
+
h,
|
|
136
|
+
j
|
|
141
137
|
]);
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
logo: /* @__PURE__ */
|
|
144
|
-
productName:
|
|
145
|
-
tagline:
|
|
146
|
-
columns:
|
|
147
|
-
socialLinks:
|
|
148
|
-
version:
|
|
149
|
-
hideOnInstalledApp:
|
|
138
|
+
return /* @__PURE__ */ g(a, {
|
|
139
|
+
logo: /* @__PURE__ */ g(o, { size: "sidenav" }),
|
|
140
|
+
productName: f,
|
|
141
|
+
tagline: p,
|
|
142
|
+
columns: I,
|
|
143
|
+
socialLinks: _ ?? P ?? i,
|
|
144
|
+
version: m,
|
|
145
|
+
hideOnInstalledApp: D,
|
|
150
146
|
context: {
|
|
151
|
-
workspace:
|
|
152
|
-
project:
|
|
147
|
+
workspace: O ?? void 0,
|
|
148
|
+
project: k ?? void 0
|
|
153
149
|
},
|
|
154
|
-
renderLink: ({ href: e, external: t, children: n, className: r }) => t ? /* @__PURE__ */
|
|
150
|
+
renderLink: ({ href: e, external: t, children: n, className: r }) => t ? /* @__PURE__ */ g("a", {
|
|
155
151
|
href: e,
|
|
156
152
|
target: "_blank",
|
|
157
153
|
rel: "noopener noreferrer",
|
|
158
154
|
className: r,
|
|
159
155
|
children: n
|
|
160
|
-
}) : /* @__PURE__ */
|
|
156
|
+
}) : /* @__PURE__ */ g(v, {
|
|
161
157
|
to: e,
|
|
162
158
|
className: r,
|
|
163
159
|
children: n
|
|
@@ -165,4 +161,4 @@ function E({ productSlug: d, productName: p, tagline: m, version: h = "v1.0.0",
|
|
|
165
161
|
});
|
|
166
162
|
}
|
|
167
163
|
//#endregion
|
|
168
|
-
export {
|
|
164
|
+
export { T as DynamicFooter };
|