@burdenoff/fe-libs 2026.531.1 → 2026.531.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/shared/components/PWAInstallBanner.d.ts.map +1 -1
- package/dist/shared/components/PWAInstallBanner.js +1 -1
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +116 -132
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileI18nBridge.js +17 -18
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PWAInstallBanner.d.ts","sourceRoot":"","sources":["../../../src/shared/components/PWAInstallBanner.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAmB,EACnB,YAAkB,GACnB,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"PWAInstallBanner.d.ts","sourceRoot":"","sources":["../../../src/shared/components/PWAInstallBanner.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAmB,EACnB,YAAkB,GACnB,EAAE,qBAAqB,kDA4HvB"}
|
|
@@ -13,7 +13,7 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
13
13
|
let e = localStorage.getItem("pwa-install-dismissed");
|
|
14
14
|
if (e) {
|
|
15
15
|
let t = parseInt(e, 10);
|
|
16
|
-
if (Date.now() - t <
|
|
16
|
+
if (Date.now() - t < 336 * 60 * 60 * 1e3) return;
|
|
17
17
|
}
|
|
18
18
|
let t = setTimeout(() => _(!0), 3e3);
|
|
19
19
|
return () => clearTimeout(t);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellProvider.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/AppShellProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAYlE,OAAO,
|
|
1
|
+
{"version":3,"file":"AppShellProvider.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/AppShellProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAYlE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAuBnB,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IAEpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IAEtB,4BAA4B;IAC5B,WAAW,EAAE;QACX,gBAAgB,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,gCAAgC;IAChC,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,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ROR_EVENT as n, dispatchBackendErrorEvent as r, isBackendErro
|
|
|
4
4
|
import { graphqlFetch as o } from "../graphql/fetch.js";
|
|
5
5
|
import { attemptTokenRefresh as s, clearAuthSessionStorage as c, isAuthNetworkError as l } from "../utils/authErrorHandling.js";
|
|
6
6
|
import { AuthProvider as u } from "./shell/AuthProvider.js";
|
|
7
|
-
import { ActiveContextProvider as
|
|
8
|
-
import { LogManager as
|
|
9
|
-
import { ConsoleTransport as
|
|
7
|
+
import { ActiveContextProvider as ee } from "./shell/ActiveContextProvider.js";
|
|
8
|
+
import { LogManager as te } from "../logger/LogManager.js";
|
|
9
|
+
import { ConsoleTransport as d } from "../logger/ConsoleTransport.js";
|
|
10
10
|
import { ThemeProvider as f } from "./shell/ThemeProvider.js";
|
|
11
|
-
import { ErrorFallback as
|
|
12
|
-
import { m
|
|
13
|
-
import { PWAInstallBanner as
|
|
14
|
-
import { I18nProvider as h } from "./shell/I18nProvider.js";
|
|
11
|
+
import { ErrorFallback as p } from "../components/ErrorFallback.js";
|
|
12
|
+
import { m } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
|
|
13
|
+
import { PWAInstallBanner as h } from "../components/PWAInstallBanner.js";
|
|
15
14
|
import { FeatureFlagsProvider as g } from "./shell/FeatureFlagsProvider.js";
|
|
16
15
|
import { FeatureFlagProvider as _ } from "../feature-flags/FeatureFlagProvider.js";
|
|
17
16
|
import { GlobalUiProvider as v } from "./shell/GlobalUiProvider.js";
|
|
18
17
|
import { ShellUiProvider as y } from "./shell/ShellUiProvider.js";
|
|
19
|
-
import { ContextManagerProvider as
|
|
20
|
-
import { AuthTokenProvider as
|
|
21
|
-
import { MultiGatewayProvider as
|
|
22
|
-
import { G as
|
|
23
|
-
import { ProfileI18nBridge as
|
|
24
|
-
import { ProfileGeographyBridge as
|
|
25
|
-
import { AppShellContextProvider as
|
|
26
|
-
import { DevtoolsSink as
|
|
27
|
-
import { BroadcastChannelSink as
|
|
28
|
-
import { BackendAuditSink as
|
|
29
|
-
import { RybbitSink as
|
|
30
|
-
import { OtelBrowserSink as
|
|
31
|
-
import { EventBusProvider as
|
|
18
|
+
import { ContextManagerProvider as ne } from "./shell/ContextManagerProvider.js";
|
|
19
|
+
import { AuthTokenProvider as re } from "./shell/AuthTokenProvider.js";
|
|
20
|
+
import { MultiGatewayProvider as ie } from "./shell/MultiGatewayProvider.js";
|
|
21
|
+
import { G as b, j as x, w as S } from "../../node_modules/web-vitals/dist/web-vitals.js";
|
|
22
|
+
import { ProfileI18nBridge as C } from "./shell/ProfileI18nBridge.js";
|
|
23
|
+
import { ProfileGeographyBridge as w } from "./shell/ProfileGeographyBridge.js";
|
|
24
|
+
import { AppShellContextProvider as T } from "./shell/AppShellContext.js";
|
|
25
|
+
import { DevtoolsSink as E } from "../events/sinks/DevtoolsSink.js";
|
|
26
|
+
import { BroadcastChannelSink as D } from "../events/sinks/BroadcastChannelSink.js";
|
|
27
|
+
import { BackendAuditSink as O } from "../events/sinks/BackendAuditSink.js";
|
|
28
|
+
import { RybbitSink as k } from "../events/sinks/RybbitSink.js";
|
|
29
|
+
import { OtelBrowserSink as A } from "../events/sinks/OtelBrowserSink.js";
|
|
30
|
+
import { EventBusProvider as j, useEventBus as M } from "../../shared-events.js";
|
|
32
31
|
import { useReferralAttribution as N } from "../hooks/useReferralAttribution.js";
|
|
33
32
|
import { TourPlayerProvider as P } from "../tours/TourPlayerProvider.js";
|
|
34
33
|
import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.js";
|
|
@@ -37,7 +36,7 @@ import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef a
|
|
|
37
36
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
38
37
|
import { BrowserRouter as K, useLocation as q } from "react-router-dom";
|
|
39
38
|
import { Toaster as J, toast as Y } from "sonner";
|
|
40
|
-
import { MutationCache as
|
|
39
|
+
import { MutationCache as ae, QueryCache as oe, QueryClient as se, QueryClientProvider as ce } from "@tanstack/react-query";
|
|
41
40
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
42
41
|
var X = {
|
|
43
42
|
bigconsole: {
|
|
@@ -73,8 +72,8 @@ var X = {
|
|
|
73
72
|
"notification.admin.sent",
|
|
74
73
|
"notification.template.saved",
|
|
75
74
|
"notification.schedule.updated"
|
|
76
|
-
],
|
|
77
|
-
function
|
|
75
|
+
], Q = 4e3;
|
|
76
|
+
function le(e) {
|
|
78
77
|
let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
|
|
79
78
|
code: e.code,
|
|
80
79
|
operationName: e.operationName,
|
|
@@ -86,13 +85,13 @@ function de(e) {
|
|
|
86
85
|
};
|
|
87
86
|
console.error("[Burdenoff backend error]", e.message, n);
|
|
88
87
|
}
|
|
89
|
-
function
|
|
88
|
+
function ue(e) {
|
|
90
89
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
91
90
|
}
|
|
92
|
-
function
|
|
91
|
+
function de(e, t) {
|
|
93
92
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
94
93
|
}
|
|
95
|
-
function
|
|
94
|
+
function fe() {
|
|
96
95
|
return {
|
|
97
96
|
BASE_URL: "/",
|
|
98
97
|
DEV: !1,
|
|
@@ -102,7 +101,7 @@ function pe() {
|
|
|
102
101
|
};
|
|
103
102
|
}
|
|
104
103
|
function $(e, t) {
|
|
105
|
-
let n =
|
|
104
|
+
let n = ue(t.VITE_DEPLOY_ENV ?? t.MODE), r = de(t, n), i = X[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
|
|
106
105
|
return {
|
|
107
106
|
enabled: r,
|
|
108
107
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -128,7 +127,7 @@ function $(e, t) {
|
|
|
128
127
|
}
|
|
129
128
|
};
|
|
130
129
|
}
|
|
131
|
-
function
|
|
130
|
+
function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
132
131
|
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = I(), c = z((e, t) => e.steps?.[t], []);
|
|
133
132
|
return /* @__PURE__ */ G(P, {
|
|
134
133
|
onTourStart: z((e) => {
|
|
@@ -169,7 +168,7 @@ function me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
169
168
|
children: [
|
|
170
169
|
/* @__PURE__ */ W(L, {}),
|
|
171
170
|
e,
|
|
172
|
-
/* @__PURE__ */ W(
|
|
171
|
+
/* @__PURE__ */ W(me, {}),
|
|
173
172
|
/* @__PURE__ */ W(J, {
|
|
174
173
|
position: n,
|
|
175
174
|
richColors: !0,
|
|
@@ -177,7 +176,7 @@ function me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
177
176
|
}),
|
|
178
177
|
t && /* @__PURE__ */ W(R, {
|
|
179
178
|
fallback: null,
|
|
180
|
-
children: /* @__PURE__ */ W(
|
|
179
|
+
children: /* @__PURE__ */ W(h, {
|
|
181
180
|
productName: r,
|
|
182
181
|
brandInitial: i
|
|
183
182
|
})
|
|
@@ -185,15 +184,15 @@ function me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
185
184
|
]
|
|
186
185
|
});
|
|
187
186
|
}
|
|
188
|
-
function
|
|
187
|
+
function me() {
|
|
189
188
|
let e = H(null);
|
|
190
189
|
return B(() => {
|
|
191
190
|
let t = (t) => {
|
|
192
191
|
let n = t instanceof CustomEvent && i(t.detail) ? t.detail : null;
|
|
193
192
|
if (!a(n)) return;
|
|
194
|
-
|
|
193
|
+
le(n);
|
|
195
194
|
let r = `${n.code ?? ""}|${n.message}`, o = Date.now(), s = e.current;
|
|
196
|
-
s?.key === r && o - s.shownAt <
|
|
195
|
+
s?.key === r && o - s.shownAt < Q || (e.current = {
|
|
197
196
|
key: r,
|
|
198
197
|
shownAt: o
|
|
199
198
|
}, Y.error(n.message, { duration: 7e3 }));
|
|
@@ -201,18 +200,18 @@ function he() {
|
|
|
201
200
|
return window.addEventListener(n, t), () => window.removeEventListener(n, t);
|
|
202
201
|
}, []), null;
|
|
203
202
|
}
|
|
204
|
-
function
|
|
203
|
+
function he({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
|
|
205
204
|
let c = q();
|
|
206
205
|
N();
|
|
207
|
-
let l =
|
|
206
|
+
let l = /* @__PURE__ */ W(w, { children: /* @__PURE__ */ W(g, { children: /* @__PURE__ */ W(_, {
|
|
208
207
|
workspaceId: null,
|
|
209
208
|
gateway: "global",
|
|
210
209
|
defaultEnabled: !0,
|
|
211
|
-
children: /* @__PURE__ */ W(v, { children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(
|
|
210
|
+
children: /* @__PURE__ */ W(v, { children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(m, {
|
|
212
211
|
fallback: null,
|
|
213
212
|
children: /* @__PURE__ */ W(F, {
|
|
214
|
-
disabled:
|
|
215
|
-
children: /* @__PURE__ */ W(
|
|
213
|
+
disabled: c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"),
|
|
214
|
+
children: /* @__PURE__ */ W(pe, {
|
|
216
215
|
enablePWA: o,
|
|
217
216
|
toasterPosition: s,
|
|
218
217
|
productName: i,
|
|
@@ -224,29 +223,14 @@ function ge({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
224
223
|
}) }) });
|
|
225
224
|
return /* @__PURE__ */ G(f, {
|
|
226
225
|
defaultBrand: r,
|
|
227
|
-
children: [/* @__PURE__ */ W(
|
|
228
|
-
defaultLocale: "en",
|
|
229
|
-
translations: n ?? {
|
|
230
|
-
en: {},
|
|
231
|
-
es: {},
|
|
232
|
-
fr: {},
|
|
233
|
-
de: {},
|
|
234
|
-
ja: {},
|
|
235
|
-
zh: {},
|
|
236
|
-
ta: {},
|
|
237
|
-
hi: {},
|
|
238
|
-
ar: {}
|
|
239
|
-
},
|
|
240
|
-
showChildrenWhileLoading: !0,
|
|
241
|
-
children: u
|
|
242
|
-
}) : /* @__PURE__ */ W(T, {
|
|
226
|
+
children: [/* @__PURE__ */ W(ge, {}), /* @__PURE__ */ W(C, {
|
|
243
227
|
i18nProductId: t,
|
|
244
228
|
fallbackTranslations: n,
|
|
245
|
-
children:
|
|
229
|
+
children: l
|
|
246
230
|
})]
|
|
247
231
|
});
|
|
248
232
|
}
|
|
249
|
-
function
|
|
233
|
+
function ge() {
|
|
250
234
|
let e = q();
|
|
251
235
|
return B(() => {
|
|
252
236
|
e.hash || requestAnimationFrame(() => {
|
|
@@ -266,7 +250,7 @@ function _e() {
|
|
|
266
250
|
e.hash
|
|
267
251
|
]), null;
|
|
268
252
|
}
|
|
269
|
-
function
|
|
253
|
+
function _e(e) {
|
|
270
254
|
if (e instanceof Error) return e.message;
|
|
271
255
|
if (typeof e == "string") return e;
|
|
272
256
|
try {
|
|
@@ -275,7 +259,7 @@ function ve(e) {
|
|
|
275
259
|
return String(e);
|
|
276
260
|
}
|
|
277
261
|
}
|
|
278
|
-
function
|
|
262
|
+
function ve() {
|
|
279
263
|
let e = M(), t = q(), n = H(void 0), r = H(void 0);
|
|
280
264
|
return B(() => {
|
|
281
265
|
let i = `${t.pathname}${t.search}${t.hash}`;
|
|
@@ -301,27 +285,27 @@ function ye() {
|
|
|
301
285
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
302
286
|
});
|
|
303
287
|
}, n = (t) => {
|
|
304
|
-
e.emit("error.unhandledrejection", { reason:
|
|
288
|
+
e.emit("error.unhandledrejection", { reason: _e(t.reason) });
|
|
305
289
|
};
|
|
306
290
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
307
291
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
308
292
|
};
|
|
309
293
|
}, [e]), B(() => {
|
|
310
|
-
|
|
294
|
+
b((t) => {
|
|
311
295
|
e.emit("perf.lcp.measured", {
|
|
312
296
|
metric: "LCP",
|
|
313
297
|
value: t.value,
|
|
314
298
|
id: t.id,
|
|
315
299
|
rating: t.rating
|
|
316
300
|
});
|
|
317
|
-
}),
|
|
301
|
+
}), S((t) => {
|
|
318
302
|
e.emit("perf.cls.measured", {
|
|
319
303
|
metric: "CLS",
|
|
320
304
|
value: t.value,
|
|
321
305
|
id: t.id,
|
|
322
306
|
rating: t.rating
|
|
323
307
|
});
|
|
324
|
-
}),
|
|
308
|
+
}), x((t) => {
|
|
325
309
|
e.emit("perf.inp.measured", {
|
|
326
310
|
metric: "INP",
|
|
327
311
|
value: t.value,
|
|
@@ -331,39 +315,39 @@ function ye() {
|
|
|
331
315
|
});
|
|
332
316
|
}, [e]), null;
|
|
333
317
|
}
|
|
334
|
-
function
|
|
335
|
-
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
336
|
-
e.devtools ? /* @__PURE__ */ W(
|
|
337
|
-
e.broadcast === !1 ? null : /* @__PURE__ */ W(
|
|
338
|
-
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(
|
|
339
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(
|
|
318
|
+
function ye({ config: e, productSlug: t }) {
|
|
319
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(ve, {}), e.enabled === !1 ? null : /* @__PURE__ */ G(U, { children: [
|
|
320
|
+
e.devtools ? /* @__PURE__ */ W(E, { enabled: !0 }) : null,
|
|
321
|
+
e.broadcast === !1 ? null : /* @__PURE__ */ W(D, {}),
|
|
322
|
+
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(O, { endpoint: e.backendAudit.endpoint }) : null,
|
|
323
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(k, {
|
|
340
324
|
siteId: e.rybbit.siteId,
|
|
341
325
|
scriptUrl: e.rybbit.scriptUrl,
|
|
342
326
|
allowlist: e.rybbit.allowlist,
|
|
343
327
|
identifyOn: e.rybbit.identifyOn,
|
|
344
328
|
rename: e.rybbit.rename
|
|
345
329
|
}) : null,
|
|
346
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(
|
|
330
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(A, {
|
|
347
331
|
endpoint: e.otel.endpoint,
|
|
348
332
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
349
333
|
flushInterval: e.otel.flushInterval
|
|
350
334
|
}) : null
|
|
351
335
|
] })] });
|
|
352
336
|
}
|
|
353
|
-
function
|
|
354
|
-
let { productName: f, productSlug:
|
|
337
|
+
function be({ config: n, children: i, clearAuthStore: a }) {
|
|
338
|
+
let { productName: f, productSlug: h = f.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", enablePWA: S = !0, brandInitial: C = f.charAt(0), defaultGateway: w = "workspace", enableSubscriptions: E = !0, fallbackTranslations: D, queryClientOptions: O, toasterPosition: k = "bottom-right", observability: A } = n, M = A ?? $(h, fe()), N = V(() => ({
|
|
355
339
|
productName: f,
|
|
356
|
-
productSlug:
|
|
357
|
-
brandInitial:
|
|
358
|
-
tagline:
|
|
359
|
-
domain:
|
|
340
|
+
productSlug: h,
|
|
341
|
+
brandInitial: C,
|
|
342
|
+
tagline: g,
|
|
343
|
+
domain: _
|
|
360
344
|
}), [
|
|
361
345
|
f,
|
|
362
|
-
m,
|
|
363
|
-
w,
|
|
364
346
|
h,
|
|
365
|
-
|
|
366
|
-
|
|
347
|
+
C,
|
|
348
|
+
g,
|
|
349
|
+
_
|
|
350
|
+
]), P = H(!1), F = H(!1), I = H(null), L = H(!!b?.url), R = z(() => {
|
|
367
351
|
if ((() => {
|
|
368
352
|
try {
|
|
369
353
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
@@ -373,26 +357,26 @@ function xe({ config: n, children: i, clearAuthStore: a }) {
|
|
|
373
357
|
} catch {
|
|
374
358
|
return !1;
|
|
375
359
|
}
|
|
376
|
-
})() ||
|
|
377
|
-
|
|
360
|
+
})() || L.current || P.current) return;
|
|
361
|
+
P.current = !0, c(a);
|
|
378
362
|
let t = `${window.location.pathname}${window.location.search}`, n = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, r = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
|
|
379
363
|
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
|
|
380
|
-
|
|
364
|
+
P.current = !1;
|
|
381
365
|
return;
|
|
382
366
|
}
|
|
383
367
|
window.location.replace(n);
|
|
384
|
-
}, [a]),
|
|
385
|
-
globalBaseUrl:
|
|
386
|
-
isRefreshing:
|
|
387
|
-
refreshPromise:
|
|
388
|
-
}), [
|
|
389
|
-
window.location.pathname.startsWith("/auth/") || await
|
|
390
|
-
}, [
|
|
391
|
-
l(e) ? await
|
|
392
|
-
}, [
|
|
368
|
+
}, [a]), U = V(() => ({
|
|
369
|
+
globalBaseUrl: y.globalBaseUrl,
|
|
370
|
+
isRefreshing: F,
|
|
371
|
+
refreshPromise: I
|
|
372
|
+
}), [y.globalBaseUrl]), q = z(async () => s(U), [U]), J = z(async () => {
|
|
373
|
+
window.location.pathname.startsWith("/auth/") || await q() || R();
|
|
374
|
+
}, [q, R]), Y = z(async (e) => {
|
|
375
|
+
l(e) ? await q() || R() : console.error("[Network] Backend unreachable:", e.message);
|
|
376
|
+
}, [q, R]), X = z(async (e) => {
|
|
393
377
|
let t = await o({
|
|
394
378
|
gateway: "global",
|
|
395
|
-
baseUrl:
|
|
379
|
+
baseUrl: y.globalBaseUrl,
|
|
396
380
|
authToken: "",
|
|
397
381
|
query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
|
|
398
382
|
variables: { token: e }
|
|
@@ -404,11 +388,11 @@ function xe({ config: n, children: i, clearAuthStore: a }) {
|
|
|
404
388
|
refreshToken: n.refreshToken,
|
|
405
389
|
expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
|
|
406
390
|
};
|
|
407
|
-
}, [
|
|
408
|
-
queryCache: new
|
|
391
|
+
}, [y.globalBaseUrl]), Z = z(() => t("organization"), []), Q = V(() => new se({
|
|
392
|
+
queryCache: new oe({ onError: (e) => {
|
|
409
393
|
r(e);
|
|
410
394
|
} }),
|
|
411
|
-
mutationCache: new
|
|
395
|
+
mutationCache: new ae({ onError: (e) => {
|
|
412
396
|
r(e);
|
|
413
397
|
} }),
|
|
414
398
|
defaultOptions: { queries: {
|
|
@@ -418,54 +402,54 @@ function xe({ config: n, children: i, clearAuthStore: a }) {
|
|
|
418
402
|
} }
|
|
419
403
|
}), [O]);
|
|
420
404
|
return B(() => {
|
|
421
|
-
let e =
|
|
422
|
-
e.getLogger("shell") || e.getLogger("shell").addTransport(new
|
|
423
|
-
}, []), /* @__PURE__ */ W(
|
|
424
|
-
value:
|
|
425
|
-
children: /* @__PURE__ */ W(
|
|
426
|
-
appName:
|
|
427
|
-
appVersion:
|
|
428
|
-
appEnv:
|
|
429
|
-
sourceMfe:
|
|
430
|
-
children: /* @__PURE__ */ W(
|
|
431
|
-
FallbackComponent:
|
|
432
|
-
children: /* @__PURE__ */ G(K, { children: [/* @__PURE__ */ W(
|
|
433
|
-
config:
|
|
434
|
-
productSlug:
|
|
435
|
-
}), /* @__PURE__ */ W(
|
|
436
|
-
client:
|
|
437
|
-
children: /* @__PURE__ */ W(
|
|
438
|
-
workspaceBaseUrl:
|
|
439
|
-
globalBaseUrl:
|
|
440
|
-
organizationId:
|
|
441
|
-
defaultGateway:
|
|
405
|
+
let e = te.getInstance();
|
|
406
|
+
e.getLogger("shell") || e.getLogger("shell").addTransport(new d());
|
|
407
|
+
}, []), /* @__PURE__ */ W(T, {
|
|
408
|
+
value: N,
|
|
409
|
+
children: /* @__PURE__ */ W(j, {
|
|
410
|
+
appName: h,
|
|
411
|
+
appVersion: M.appVersion,
|
|
412
|
+
appEnv: M.appEnv,
|
|
413
|
+
sourceMfe: h,
|
|
414
|
+
children: /* @__PURE__ */ W(m, {
|
|
415
|
+
FallbackComponent: p,
|
|
416
|
+
children: /* @__PURE__ */ G(K, { children: [/* @__PURE__ */ W(ye, {
|
|
417
|
+
config: M,
|
|
418
|
+
productSlug: h
|
|
419
|
+
}), /* @__PURE__ */ W(ce, {
|
|
420
|
+
client: Q,
|
|
421
|
+
children: /* @__PURE__ */ W(re, { children: /* @__PURE__ */ W(ie, {
|
|
422
|
+
workspaceBaseUrl: y.workspaceBaseUrl,
|
|
423
|
+
globalBaseUrl: y.globalBaseUrl,
|
|
424
|
+
organizationId: Z,
|
|
425
|
+
defaultGateway: w,
|
|
442
426
|
enableSubscriptions: E,
|
|
443
|
-
onAuthError:
|
|
444
|
-
onNetworkError:
|
|
445
|
-
onRefreshToken:
|
|
427
|
+
onAuthError: J,
|
|
428
|
+
onNetworkError: Y,
|
|
429
|
+
onRefreshToken: q,
|
|
446
430
|
children: /* @__PURE__ */ W(u, {
|
|
447
|
-
bridgeUrl:
|
|
448
|
-
bridgeAllowedOrigins:
|
|
449
|
-
bridgeDebug:
|
|
450
|
-
onRefreshToken:
|
|
431
|
+
bridgeUrl: b?.url,
|
|
432
|
+
bridgeAllowedOrigins: b?.allowedOrigins,
|
|
433
|
+
bridgeDebug: b?.debug,
|
|
434
|
+
onRefreshToken: X,
|
|
451
435
|
onBridgeReady: () => {
|
|
452
|
-
|
|
436
|
+
L.current = !1;
|
|
453
437
|
},
|
|
454
438
|
onSessionExpiringSoon: () => {
|
|
455
439
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
456
440
|
},
|
|
457
441
|
onTokenExpired: () => {
|
|
458
|
-
|
|
442
|
+
R();
|
|
459
443
|
},
|
|
460
|
-
children: /* @__PURE__ */ W(
|
|
444
|
+
children: /* @__PURE__ */ W(ee, {
|
|
461
445
|
syncToUrl: !0,
|
|
462
|
-
children: /* @__PURE__ */ W(
|
|
463
|
-
i18nProductId:
|
|
446
|
+
children: /* @__PURE__ */ W(ne, { children: /* @__PURE__ */ W(he, {
|
|
447
|
+
i18nProductId: v,
|
|
464
448
|
fallbackTranslations: D,
|
|
465
|
-
defaultBrand:
|
|
449
|
+
defaultBrand: x,
|
|
466
450
|
productName: f,
|
|
467
|
-
brandInitial:
|
|
468
|
-
enablePWA:
|
|
451
|
+
brandInitial: C,
|
|
452
|
+
enablePWA: S,
|
|
469
453
|
toasterPosition: k,
|
|
470
454
|
children: i
|
|
471
455
|
}) })
|
|
@@ -478,4 +462,4 @@ function xe({ config: n, children: i, clearAuthStore: a }) {
|
|
|
478
462
|
});
|
|
479
463
|
}
|
|
480
464
|
//#endregion
|
|
481
|
-
export {
|
|
465
|
+
export { be as AppShellProvider, $ as resolveAppShellObservabilityConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileI18nBridge.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileI18nBridge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfileI18nBridge.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileI18nBridge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAYxB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB,kFAAkF;IAClF,aAAa,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC7D,yEAAyE;IACzE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,aAAa,EACb,aAAoB,EACpB,oBAAoB,EACpB,mBAA2B,GAC5B,EAAE,sBAAsB,2CAiGxB"}
|
|
@@ -4,20 +4,19 @@ import { useAuth as t } from "./AuthProvider.js";
|
|
|
4
4
|
import { I18nProvider as n, mergeTranslationDictionaries as r } from "./I18nProvider.js";
|
|
5
5
|
import { useCallback as i, useMemo as a } from "react";
|
|
6
6
|
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
-
import { useLocation as s } from "react-router-dom";
|
|
8
7
|
//#region src/shared/providers/shell/ProfileI18nBridge.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
let n =
|
|
13
|
-
if (!
|
|
8
|
+
var s = "\n query ExportTranslations($productId: String!, $languageCode: String!, $format: ImportJobFormat!) {\n exportTranslations(productId: $productId, languageCode: $languageCode, format: $format) {\n format\n url\n }\n }\n";
|
|
9
|
+
function c({ children: c, i18nProductId: l, defaultLocale: u = "en", fallbackTranslations: d, disableDynamicFetch: f = !1 }) {
|
|
10
|
+
let { user: p } = t(), m = p?.id ?? null, h = !f, g = i(async (t) => {
|
|
11
|
+
let n = d?.[t] ?? {};
|
|
12
|
+
if (!h) return n;
|
|
14
13
|
try {
|
|
15
14
|
let i = await e({
|
|
16
15
|
gateway: "global",
|
|
17
|
-
query:
|
|
16
|
+
query: s,
|
|
18
17
|
operationName: "ExportTranslations",
|
|
19
18
|
variables: {
|
|
20
|
-
productId:
|
|
19
|
+
productId: l,
|
|
21
20
|
languageCode: t,
|
|
22
21
|
format: "JSON"
|
|
23
22
|
},
|
|
@@ -33,13 +32,13 @@ function l({ children: l, i18nProductId: u, defaultLocale: d = "en", fallbackTra
|
|
|
33
32
|
return {};
|
|
34
33
|
}
|
|
35
34
|
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
d,
|
|
36
|
+
l,
|
|
37
|
+
h
|
|
39
38
|
]);
|
|
40
39
|
return /* @__PURE__ */ o(n, {
|
|
41
|
-
defaultLocale:
|
|
42
|
-
translations: a(() =>
|
|
40
|
+
defaultLocale: u,
|
|
41
|
+
translations: a(() => d ?? {
|
|
43
42
|
en: {},
|
|
44
43
|
es: {},
|
|
45
44
|
fr: {},
|
|
@@ -49,12 +48,12 @@ function l({ children: l, i18nProductId: u, defaultLocale: d = "en", fallbackTra
|
|
|
49
48
|
ta: {},
|
|
50
49
|
hi: {},
|
|
51
50
|
ar: {}
|
|
52
|
-
}, [
|
|
53
|
-
fetchTranslations:
|
|
54
|
-
profileId:
|
|
51
|
+
}, [d]),
|
|
52
|
+
fetchTranslations: h ? g : void 0,
|
|
53
|
+
profileId: m,
|
|
55
54
|
showChildrenWhileLoading: !0,
|
|
56
|
-
children:
|
|
55
|
+
children: c
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
//#endregion
|
|
60
|
-
export {
|
|
59
|
+
export { c as ProfileI18nBridge };
|