@burdenoff/fe-libs 2026.825.4 → 2026.825.5
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;AAsFzD,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,2CAoLpB"}
|
|
@@ -1,16 +1,17 @@
|
|
|
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 {
|
|
3
|
+
import { useAuth as t } from "../shared/providers/shell/AuthProvider.js";
|
|
4
|
+
import { useActiveContext as n } from "../shared/providers/shell/ActiveContextProvider.js";
|
|
5
|
+
import { useI18n as r } from "../shared/providers/shell/I18nProvider.js";
|
|
6
|
+
import { DEFAULT_FOOTER_COLUMNS as i, DEFAULT_SOCIAL_LINKS as a, Footer as o } from "./Footer.js";
|
|
7
|
+
import { BrandMark as s } from "./BrandMark.js";
|
|
8
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
9
|
+
import { Github as d, Globe as f, Linkedin as p, MessageCircle as m, Twitter as h, Youtube as g } from "lucide-react";
|
|
10
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
11
|
+
import { gql as v } from "@apollo/client/core";
|
|
12
|
+
import { Link as y } from "react-router";
|
|
12
13
|
//#region src/chrome/DynamicFooter.tsx
|
|
13
|
-
var
|
|
14
|
+
var b = v`
|
|
14
15
|
query GetFooterContentPages($filter: ContentPageFilterInput, $limit: Int) {
|
|
15
16
|
contentPages(filter: $filter, limit: $limit) {
|
|
16
17
|
items {
|
|
@@ -22,14 +23,14 @@ var y = _`
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
`,
|
|
26
|
+
`, x = v`
|
|
26
27
|
query GetFooterProduct($slug: String!) {
|
|
27
28
|
platformProductBySlug(slug: $slug) {
|
|
28
29
|
id
|
|
29
30
|
socialLinks
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
`,
|
|
33
|
+
`, S = {
|
|
33
34
|
"privacy-policy": "privacy",
|
|
34
35
|
"terms-of-service": "terms",
|
|
35
36
|
"cookie-policy": "cookies",
|
|
@@ -40,14 +41,14 @@ var y = _`
|
|
|
40
41
|
compliance: "compliance",
|
|
41
42
|
about: "about",
|
|
42
43
|
contact: "contact"
|
|
43
|
-
},
|
|
44
|
-
twitter: /* @__PURE__ */
|
|
45
|
-
x: /* @__PURE__ */
|
|
46
|
-
github: /* @__PURE__ */
|
|
47
|
-
discord: /* @__PURE__ */
|
|
48
|
-
linkedin: /* @__PURE__ */
|
|
49
|
-
youtube: /* @__PURE__ */ g
|
|
50
|
-
},
|
|
44
|
+
}, C = {
|
|
45
|
+
twitter: /* @__PURE__ */ _(h, { className: "size-5" }),
|
|
46
|
+
x: /* @__PURE__ */ _(h, { className: "size-5" }),
|
|
47
|
+
github: /* @__PURE__ */ _(d, { className: "size-5" }),
|
|
48
|
+
discord: /* @__PURE__ */ _(m, { className: "size-5" }),
|
|
49
|
+
linkedin: /* @__PURE__ */ _(p, { className: "size-5" }),
|
|
50
|
+
youtube: /* @__PURE__ */ _(g, { className: "size-5" })
|
|
51
|
+
}, w = [
|
|
51
52
|
"terms-of-service",
|
|
52
53
|
"privacy-policy",
|
|
53
54
|
"security",
|
|
@@ -57,16 +58,16 @@ var y = _`
|
|
|
57
58
|
"sla",
|
|
58
59
|
"refund-policy"
|
|
59
60
|
];
|
|
60
|
-
function
|
|
61
|
+
function T(e) {
|
|
61
62
|
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("");
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
let { workspaceId:
|
|
65
|
-
|
|
66
|
-
if (!
|
|
64
|
+
function E({ productSlug: d, productName: p, tagline: m, version: h = "v1.0.0", columns: g, socialLinks: v, legalPageOrder: E = w, deferRemoteData: D = !1, hideOnInstalledApp: O = !0 }) {
|
|
65
|
+
let { workspaceId: k, projectId: A } = n(), { isAuthenticated: j } = t(), M = e("global"), { t: N } = r(), [P, F] = u(null), [I, L] = u(null);
|
|
66
|
+
c(() => {
|
|
67
|
+
if (!j || !M || D) return;
|
|
67
68
|
let e = !1;
|
|
68
|
-
return
|
|
69
|
-
query:
|
|
69
|
+
return M.query({
|
|
70
|
+
query: b,
|
|
70
71
|
variables: {
|
|
71
72
|
filter: { isPublished: !0 },
|
|
72
73
|
limit: 50
|
|
@@ -75,25 +76,26 @@ function T({ productSlug: u, productName: f, tagline: p, version: m = "v1.0.0",
|
|
|
75
76
|
}).then((t) => {
|
|
76
77
|
let n = t.data;
|
|
77
78
|
if (e || !n?.contentPages?.items) return;
|
|
78
|
-
let r = n.contentPages.items, i =
|
|
79
|
+
let r = n.contentPages.items, i = E.map((e) => r.find((t) => t.slug === e)).filter((e) => e != null).map((e) => ({
|
|
79
80
|
id: e.slug,
|
|
80
81
|
label: e.title,
|
|
81
|
-
href: `/legal/${
|
|
82
|
+
href: `/legal/${S[e.slug] || e.slug}`
|
|
82
83
|
}));
|
|
83
|
-
i.length > 0 &&
|
|
84
|
+
i.length > 0 && F(i);
|
|
84
85
|
}).catch(() => {}), () => {
|
|
85
86
|
e = !0;
|
|
86
87
|
};
|
|
87
88
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
D,
|
|
90
|
+
M,
|
|
91
|
+
j,
|
|
92
|
+
E
|
|
93
|
+
]), c(() => {
|
|
94
|
+
if (!j || !M || v || D) return;
|
|
93
95
|
let e = !1;
|
|
94
|
-
return
|
|
95
|
-
query:
|
|
96
|
-
variables: { slug:
|
|
96
|
+
return M.query({
|
|
97
|
+
query: x,
|
|
98
|
+
variables: { slug: d },
|
|
97
99
|
fetchPolicy: "cache-first"
|
|
98
100
|
}).then((t) => {
|
|
99
101
|
if (e) return;
|
|
@@ -103,58 +105,59 @@ function T({ productSlug: u, productName: f, tagline: p, version: m = "v1.0.0",
|
|
|
103
105
|
id: e,
|
|
104
106
|
label: e.charAt(0).toUpperCase() + e.slice(1),
|
|
105
107
|
href: t,
|
|
106
|
-
icon:
|
|
108
|
+
icon: C[e.toLowerCase()] || /* @__PURE__ */ _(f, { className: "size-5" })
|
|
107
109
|
}));
|
|
108
|
-
r.length > 0 &&
|
|
110
|
+
r.length > 0 && L(r);
|
|
109
111
|
}).catch(() => {}), () => {
|
|
110
112
|
e = !0;
|
|
111
113
|
};
|
|
112
114
|
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
v,
|
|
116
|
+
D,
|
|
117
|
+
M,
|
|
118
|
+
j,
|
|
119
|
+
d
|
|
117
120
|
]);
|
|
118
|
-
let
|
|
119
|
-
let e =
|
|
121
|
+
let R = l(() => {
|
|
122
|
+
let e = g ?? i, t = P ? e.map((e) => e.title === "Legal" ? {
|
|
120
123
|
...e,
|
|
121
|
-
links:
|
|
124
|
+
links: P
|
|
122
125
|
} : e) : e, n = (e, t) => {
|
|
123
|
-
let n =
|
|
126
|
+
let n = N(e);
|
|
124
127
|
return n === e ? t : n;
|
|
125
128
|
};
|
|
126
129
|
return t.map((e) => ({
|
|
127
130
|
...e,
|
|
128
|
-
title: n(`footer.columns.${
|
|
131
|
+
title: n(`footer.columns.${T(e.title)}`, e.title),
|
|
129
132
|
links: e.links.map((e) => e.brand ? e : {
|
|
130
133
|
...e,
|
|
131
134
|
label: n(`footer.links.${e.id}`, e.label)
|
|
132
135
|
})
|
|
133
136
|
}));
|
|
134
137
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
P,
|
|
139
|
+
g,
|
|
140
|
+
N
|
|
138
141
|
]);
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
-
logo: /* @__PURE__ */
|
|
141
|
-
productName:
|
|
142
|
-
tagline:
|
|
143
|
-
columns:
|
|
144
|
-
socialLinks:
|
|
145
|
-
version:
|
|
146
|
-
hideOnInstalledApp:
|
|
142
|
+
return /* @__PURE__ */ _(o, {
|
|
143
|
+
logo: /* @__PURE__ */ _(s, { size: "sidenav" }),
|
|
144
|
+
productName: p,
|
|
145
|
+
tagline: m,
|
|
146
|
+
columns: R,
|
|
147
|
+
socialLinks: v ?? I ?? a,
|
|
148
|
+
version: h,
|
|
149
|
+
hideOnInstalledApp: O,
|
|
147
150
|
context: {
|
|
148
|
-
workspace:
|
|
149
|
-
project:
|
|
151
|
+
workspace: k ?? void 0,
|
|
152
|
+
project: A ?? void 0
|
|
150
153
|
},
|
|
151
|
-
renderLink: ({ href: e, external: t, children: n, className: r }) => t ? /* @__PURE__ */
|
|
154
|
+
renderLink: ({ href: e, external: t, children: n, className: r }) => t ? /* @__PURE__ */ _("a", {
|
|
152
155
|
href: e,
|
|
153
156
|
target: "_blank",
|
|
154
157
|
rel: "noopener noreferrer",
|
|
155
158
|
className: r,
|
|
156
159
|
children: n
|
|
157
|
-
}) : /* @__PURE__ */
|
|
160
|
+
}) : /* @__PURE__ */ _(y, {
|
|
158
161
|
to: e,
|
|
159
162
|
className: r,
|
|
160
163
|
children: n
|
|
@@ -162,4 +165,4 @@ function T({ productSlug: u, productName: f, tagline: p, version: m = "v1.0.0",
|
|
|
162
165
|
});
|
|
163
166
|
}
|
|
164
167
|
//#endregion
|
|
165
|
-
export {
|
|
168
|
+
export { E as DynamicFooter };
|