@burdenoff/fe-libs 2026.716.2 → 2026.717.2
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/assistantWidget/AssistantWidget.d.ts +30 -2
- package/dist/shared/components/assistantWidget/AssistantWidget.d.ts.map +1 -1
- package/dist/shared/components/assistantWidget/AssistantWidget.js +214 -168
- package/dist/shared/components/index.d.ts +1 -1
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.d.ts +20 -0
- package/dist/shared/graphql/fetch.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.js +136 -106
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +152 -146
- package/dist/shared/utils/authErrorHandling.d.ts +6 -0
- package/dist/shared/utils/authErrorHandling.d.ts.map +1 -1
- package/dist/shared/utils/authErrorHandling.js +17 -7
- package/package.json +1 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { isShellLessRoute as e } from "../config/shellRoutes.js";
|
|
2
2
|
import { readActiveContextValueWithUrlPrecedence as t } from "./shell/ActiveContextStorage.js";
|
|
3
3
|
import { BACKEND_ERROR_EVENT as n, CONNECTION_STATUS_EVENT as r, dispatchBackendErrorEvent as i, isBackendErrorDisplay as a, shouldToastBackendError as o } from "../utils/backendErrors.js";
|
|
4
|
-
import {
|
|
5
|
-
import { attemptTokenRefresh as
|
|
6
|
-
import { AppShellContextProvider as
|
|
7
|
-
import { AuthProvider as
|
|
8
|
-
import { ActiveContextProvider as
|
|
9
|
-
import { LogManager as
|
|
10
|
-
import { ConsoleTransport as
|
|
4
|
+
import { SESSION_EXPIRED_EVENT as s, graphqlFetch as c } from "../graphql/fetch.js";
|
|
5
|
+
import { attemptTokenRefresh as l, clearAuthSessionStorage as u, getSharedTokenRefreshRefs as d, isAuthNetworkError as f } from "../utils/authErrorHandling.js";
|
|
6
|
+
import { AppShellContextProvider as p } from "./shell/AppShellContext.js";
|
|
7
|
+
import { AuthProvider as ee } from "./shell/AuthProvider.js";
|
|
8
|
+
import { ActiveContextProvider as te } from "./shell/ActiveContextProvider.js";
|
|
9
|
+
import { LogManager as ne } from "../logger/LogManager.js";
|
|
10
|
+
import { ConsoleTransport as re } from "../logger/ConsoleTransport.js";
|
|
11
11
|
import { ThemeProvider as m } from "./shell/ThemeProvider.js";
|
|
12
|
-
import { ErrorFallback as
|
|
12
|
+
import { ErrorFallback as ie } from "../components/ErrorFallback.js";
|
|
13
13
|
import { m as h } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
|
|
14
14
|
import { PWAInstallBanner as g } from "../components/PWAInstallBanner.js";
|
|
15
15
|
import { FeatureFlagsProvider as _ } from "./shell/FeatureFlagsProvider.js";
|
|
16
16
|
import { FeatureFlagProvider as v } from "../feature-flags/FeatureFlagProvider.js";
|
|
17
17
|
import { GlobalUiProvider as y } from "./shell/GlobalUiProvider.js";
|
|
18
18
|
import { ShellUiProvider as b } from "./shell/ShellUiProvider.js";
|
|
19
|
-
import { ContextManagerProvider as
|
|
20
|
-
import { AuthTokenProvider as
|
|
21
|
-
import { MultiGatewayProvider as
|
|
22
|
-
import { G as x, Q as S, j as C, w
|
|
23
|
-
import { ProfileI18nBridge as
|
|
24
|
-
import { ProfileGeographyBridge as
|
|
25
|
-
import { DevtoolsSink as
|
|
26
|
-
import { BroadcastChannelSink as
|
|
27
|
-
import { BackendAuditSink as
|
|
28
|
-
import { RybbitSink as
|
|
29
|
-
import { OtelBrowserSink as
|
|
30
|
-
import { EventBusProvider as ce, useEventBus as
|
|
31
|
-
import { useReferralAttribution as
|
|
32
|
-
import { TourPlayerProvider as
|
|
33
|
-
import { ToursProvider as
|
|
34
|
-
import { TourInitializer as
|
|
35
|
-
import { Suspense as
|
|
36
|
-
import { Fragment as
|
|
37
|
-
import { BrowserRouter as le, useLocation as
|
|
38
|
-
import { Toaster as
|
|
19
|
+
import { ContextManagerProvider as ae } from "./shell/ContextManagerProvider.js";
|
|
20
|
+
import { AuthTokenProvider as oe } from "./shell/AuthTokenProvider.js";
|
|
21
|
+
import { MultiGatewayProvider as se } from "./shell/MultiGatewayProvider.js";
|
|
22
|
+
import { G as x, Q as S, j as C, w } from "../../node_modules/web-vitals/dist/web-vitals.js";
|
|
23
|
+
import { ProfileI18nBridge as T } from "./shell/ProfileI18nBridge.js";
|
|
24
|
+
import { ProfileGeographyBridge as E } from "./shell/ProfileGeographyBridge.js";
|
|
25
|
+
import { DevtoolsSink as D } from "../events/sinks/DevtoolsSink.js";
|
|
26
|
+
import { BroadcastChannelSink as O } from "../events/sinks/BroadcastChannelSink.js";
|
|
27
|
+
import { BackendAuditSink as k } from "../events/sinks/BackendAuditSink.js";
|
|
28
|
+
import { RybbitSink as A } from "../events/sinks/RybbitSink.js";
|
|
29
|
+
import { OtelBrowserSink as j } from "../events/sinks/OtelBrowserSink.js";
|
|
30
|
+
import { EventBusProvider as ce, useEventBus as M } from "../../shared-events.js";
|
|
31
|
+
import { useReferralAttribution as N } from "../hooks/useReferralAttribution.js";
|
|
32
|
+
import { TourPlayerProvider as P } from "../tours/TourPlayerProvider.js";
|
|
33
|
+
import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.js";
|
|
34
|
+
import { TourInitializer as L } from "../tours/TourInitializer.js";
|
|
35
|
+
import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef as H } from "react";
|
|
36
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
37
|
+
import { BrowserRouter as le, useLocation as K } from "react-router-dom";
|
|
38
|
+
import { Toaster as q, toast as J } from "sonner";
|
|
39
39
|
import { MutationCache as ue, QueryCache as de, QueryClient as fe, QueryClientProvider as pe } from "@tanstack/react-query";
|
|
40
40
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
41
|
-
var
|
|
41
|
+
var Y = {
|
|
42
42
|
artistrybase: { prod: "cfbecacb6002" },
|
|
43
43
|
atheletebridge: { prod: "c34c6ead7aa8" },
|
|
44
44
|
adaptercloud: {},
|
|
@@ -67,8 +67,8 @@ var q = {
|
|
|
67
67
|
subscriberbot: {},
|
|
68
68
|
intelwatchtower: {},
|
|
69
69
|
kadaikodi: {}
|
|
70
|
-
},
|
|
71
|
-
function
|
|
70
|
+
}, X = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,conversations.conversation.created,conversations.conversation.archived,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,collabkin.tree.created,collabkin.person.created,collabkin.memory.created,collabkin.story.created,collabkin.member.invited,crewfoundry.page.viewed,crewfoundry.dashboard.viewed,crewfoundry.job_posting.created,crewfoundry.candidate.created,crewfoundry.employee.created,crewfoundry.team.created,crewfoundry.project.created,crewfoundry.course.enrolled,crewfoundry.learning_path.created,crewfoundry.service.listed,crewfoundry.leave.approved,crewfoundry.payroll.processed,crewfoundry.invoice.created,coolandlovely.page.viewed,coolandlovely.brand.created,coolandlovely.collection.created,coolandlovely.style_item.created,coolandlovely.look.created,coolandlovely.collaboration.created,coolandlovely.lookbook.created,coolandlovely.wardrobe.item_added,coolandlovely.search.performed,vibecontrols.agent.registered,atheletebridge.page.viewed,atheletebridge.team.created,atheletebridge.fixture.created,atheletebridge.program.created,atheletebridge.session.completed,atheletebridge.metric.logged,atheletebridge.tournament.created,vibecontrols.agent.gateway_auth_setup,vibecontrols.session.created,vibecontrols.session.started,vibecontrols.session.terminal_opened_in_browser,vibecontrols.session.share_link_created,vibecontrols.session.joined_shared,vibecontrols.tunnel.created,vibecontrols.tunnel.started,vibecontrols.vibedeck.button_executed,vibecontrols.quota.agent_limit_hit,vibecontrols.quota.session_limit_hit,vibecontrols.quota.tunnel_limit_hit,vibecontrols.billing.upgrade_clicked,bigconsole.dashboard.imported,bigconsole.dashboard.shared,bigconsole.data_sink.imported,bigconsole.widget.created,bigconsole.widget.duplicated,bigconsole.ai.dashboard_generated,bigconsole.ai.dashboard_created,assethandler.page.viewed,assethandler.asset.viewed,assethandler.asset.created,assethandler.work_order.viewed,assethandler.work_order.created,assethandler.incident.viewed,assethandler.incident.created,assethandler.change.viewed,assethandler.change.created,assethandler.problem.viewed,assethandler.problem.created,assethandler.maintenance.viewed,assethandler.maintenance.created,assethandler.report.viewed,assethandler.analytics.viewed,movethewheels.page.viewed,movethewheels.shipment.created,movethewheels.shipment.delivered,movethewheels.order.created,movethewheels.route.planned,movethewheels.vehicle.assigned,movethewheels.warehouse.inbound_received,theglobalfuel.dashboard.viewed,theglobalfuel.asset.created,theglobalfuel.production.recorded,theglobalfuel.reserve.created,theglobalfuel.contract.created,theglobalfuel.shipment.scheduled,theglobalfuel.shipment.delivered,theglobalfuel.inventory_lot.created,theglobalfuel.emission.recorded,theglobalfuel.emission.verified,theglobalfuel.compliance_cert.created,housingvista.dashboard.viewed,housingvista.property.created,housingvista.property.updated,housingvista.property.deleted,housingvista.property.viewed,housingvista.shortlist.property_added,housingvista.transaction.created,housingvista.transaction.updated,housingvista.investment.created,housingvista.offer.created,housingvista.viewing.scheduled,housingvista.chat.conversation_opened,housingvista.chat.message_sent,housingvista.analytics.viewed,housingvista.asset.created,housingvista.asset.updated,housingvista.amc.purchased,housingvista.verification.submitted,housingvista.home_loan.apply_clicked,housingvista.market_analytics.viewed,housingvista.search.performed,housingvista.export.requested,manufacturedops.production_order.created,manufacturedops.production_order.updated,manufacturedops.production_order.transitioned,manufacturedops.operation.added,manufacturedops.operation.recorded,manufacturedops.work_center.created,manufacturedops.work_center.updated,manufacturedops.work_center.archived,manufacturedops.material_lot.created,manufacturedops.material_lot.updated,manufacturedops.material_lot.status_updated,manufacturedops.inspection_plan.created,manufacturedops.quality_inspection.recorded,manufacturedops.non_conformance.raised,manufacturedops.non_conformance.updated,manufacturedops.non_conformance.transitioned,manufacturedops.asset.created,manufacturedops.maintenance_work_order.created,manufacturedops.maintenance_work_order.transitioned,manufacturedops.downtime_event.recorded,manufacturedops.page.viewed,subscriberbot.page.viewed,adaptercloud.page.viewed,comradecircle.page.viewed,comradecircle.circle.created,comradecircle.post.created,comradecircle.event.created,comradecircle.member.invited,psw.client.created,psw.client.updated,psw.client.archived,psw.engagement.created,psw.engagement.transitioned,psw.matter.created,psw.matter.closed,psw.timeentry.created,psw.invoice.created,psw.compliance.resolved,psw.conflictcheck.recorded,psw.document.created,psw.practicearea.created,psw.search.performed,psw.export.requested,mybodyshield.page.viewed,mybodyshield.program.created,mybodyshield.program.updated,mybodyshield.program.status_changed,mybodyshield.program.archived,mybodyshield.workout.created,mybodyshield.exercise.created,mybodyshield.session.started,intelwatchtower.page.viewed,intelwatchtower.source.created,intelwatchtower.mission.created,intelwatchtower.mission.assigned,intelwatchtower.mission.completed,intelwatchtower.entity.created,intelwatchtower.entity.linked,intelwatchtower.indicator.created,intelwatchtower.observation.created,intelwatchtower.alert.created,intelwatchtower.alert.escalated,intelwatchtower.case.created,intelwatchtower.case.closed,intelwatchtower.report.created,intelwatchtower.report.exported,intelwatchtower.task.created,intelwatchtower.task.completed,intelwatchtower.cop.opened,govcitizenhub.page.viewed,govcitizenhub.dashboard.viewed,govcitizenhub.service.published,govcitizenhub.application.submitted,govcitizenhub.application.decided,govcitizenhub.permit.issued,govcitizenhub.payment.settled,govcitizenhub.grievance.reported,govcitizenhub.grievance.resolved,govcitizenhub.search.performed,cosmicintersection.page.viewed,labsofscience.page.viewed,labsofscience.project.created,labsofscience.experiment.created,labsofscience.protocol.created,labsofscience.dataset.created,labsofscience.inventory_item.created,labsofscience.notebook_entry.signed,labsofscience.pipeline.run_started,hookmovies.page.viewed,headshotmarketing.page.viewed,timecampus.page.viewed,timecampus.dashboard.viewed,timecampus.timer.started,timecampus.timer.stopped,timecampus.time_entry.created,timecampus.timesheet.submitted,timecampus.report.viewed,timecampus.project.viewed,timecampus.meeting.created,timecampus.pomodoro.session.completed,timecampus.focus_score.viewed,kadaikodi.page.viewed,healthybowl.farm.created,healthybowl.crop.created,healthybowl.crop.updated,healthybowl.harvest.recorded".split(","), Z = 4e3;
|
|
71
|
+
function me(e) {
|
|
72
72
|
let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
|
|
73
73
|
code: e.code,
|
|
74
74
|
operationName: e.operationName,
|
|
@@ -80,13 +80,13 @@ function X(e) {
|
|
|
80
80
|
};
|
|
81
81
|
console.error("[Burdenoff backend error]", e.message, n);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function he(e) {
|
|
84
84
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ge(e, t) {
|
|
87
87
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function _e() {
|
|
90
90
|
return {
|
|
91
91
|
BASE_URL: "/",
|
|
92
92
|
DEV: !1,
|
|
@@ -96,7 +96,7 @@ function he() {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
function Q(e, t) {
|
|
99
|
-
let n =
|
|
99
|
+
let n = he(t.VITE_DEPLOY_ENV ?? t.MODE), r = ge(t, n), i = Y[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);
|
|
100
100
|
return {
|
|
101
101
|
enabled: r,
|
|
102
102
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -107,7 +107,7 @@ function Q(e, t) {
|
|
|
107
107
|
enabled: r && !!o,
|
|
108
108
|
siteId: o,
|
|
109
109
|
scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
|
|
110
|
-
allowlist:
|
|
110
|
+
allowlist: X,
|
|
111
111
|
identifyOn: "auth.signed_in",
|
|
112
112
|
rename: { "nav.route.changed": "pageview" }
|
|
113
113
|
},
|
|
@@ -122,16 +122,16 @@ function Q(e, t) {
|
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } =
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
onTourStart:
|
|
125
|
+
function ve({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
126
|
+
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = I(), c = z((e, t) => e.steps?.[t], []);
|
|
127
|
+
return /* @__PURE__ */ G(P, {
|
|
128
|
+
onTourStart: z((e) => {
|
|
129
129
|
a(e.id, "started"), s("TOUR_STARTED", e.id);
|
|
130
130
|
}, [s, a]),
|
|
131
|
-
onTourComplete:
|
|
131
|
+
onTourComplete: z((e) => {
|
|
132
132
|
a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
|
|
133
133
|
}, [s, a]),
|
|
134
|
-
onTourSkip:
|
|
134
|
+
onTourSkip: z((e, t) => {
|
|
135
135
|
let n = c(e, t);
|
|
136
136
|
a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
|
|
137
137
|
stepId: n?.id,
|
|
@@ -142,14 +142,14 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
142
142
|
s,
|
|
143
143
|
a
|
|
144
144
|
]),
|
|
145
|
-
onStepChange:
|
|
145
|
+
onStepChange: z((e, t) => {
|
|
146
146
|
let n = c(e, t);
|
|
147
147
|
n && s("STEP_VIEWED", e.id, {
|
|
148
148
|
stepId: n.id,
|
|
149
149
|
stepOrder: n.stepOrder
|
|
150
150
|
});
|
|
151
151
|
}, [c, s]),
|
|
152
|
-
onStepComplete:
|
|
152
|
+
onStepComplete: z((e, t) => {
|
|
153
153
|
let n = c(e, t);
|
|
154
154
|
n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
|
|
155
155
|
stepId: n.id,
|
|
@@ -161,18 +161,18 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
161
161
|
s
|
|
162
162
|
]),
|
|
163
163
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ W(L, {}),
|
|
165
165
|
e,
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ W(ye, {}),
|
|
167
|
+
/* @__PURE__ */ W(xe, {}),
|
|
168
|
+
/* @__PURE__ */ W(q, {
|
|
169
169
|
position: n,
|
|
170
170
|
richColors: !0,
|
|
171
171
|
closeButton: !0
|
|
172
172
|
}),
|
|
173
|
-
t && /* @__PURE__ */
|
|
173
|
+
t && /* @__PURE__ */ W(R, {
|
|
174
174
|
fallback: null,
|
|
175
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ W(g, {
|
|
176
176
|
productName: r,
|
|
177
177
|
brandInitial: i
|
|
178
178
|
})
|
|
@@ -180,44 +180,44 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
180
180
|
]
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
let e =
|
|
185
|
-
return
|
|
183
|
+
function ye() {
|
|
184
|
+
let e = H(null);
|
|
185
|
+
return B(() => {
|
|
186
186
|
let t = (t) => {
|
|
187
187
|
let n = t instanceof CustomEvent && a(t.detail) ? t.detail : null;
|
|
188
188
|
if (!o(n)) return;
|
|
189
|
-
|
|
189
|
+
me(n);
|
|
190
190
|
let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), s = e.current;
|
|
191
|
-
s?.key === r && i - s.shownAt <
|
|
191
|
+
s?.key === r && i - s.shownAt < Z || (e.current = {
|
|
192
192
|
key: r,
|
|
193
193
|
shownAt: i
|
|
194
|
-
},
|
|
194
|
+
}, J.error(n.message, { duration: 7e3 }));
|
|
195
195
|
};
|
|
196
196
|
return window.addEventListener(n, t), () => window.removeEventListener(n, t);
|
|
197
197
|
}, []), null;
|
|
198
198
|
}
|
|
199
|
-
var $ = "burdenoff-connection-status",
|
|
200
|
-
function
|
|
201
|
-
let e =
|
|
202
|
-
return
|
|
199
|
+
var $ = "burdenoff-connection-status", be = 1500;
|
|
200
|
+
function xe() {
|
|
201
|
+
let e = H(null), t = H(!1);
|
|
202
|
+
return B(() => {
|
|
203
203
|
let n = () => {
|
|
204
|
-
t.current || (t.current = !0,
|
|
204
|
+
t.current || (t.current = !0, J.error("Connection lost. Trying to reconnect…", {
|
|
205
205
|
id: $,
|
|
206
206
|
duration: Infinity
|
|
207
207
|
}));
|
|
208
208
|
}, i = () => {
|
|
209
209
|
t.current || e.current || (e.current = setTimeout(() => {
|
|
210
210
|
e.current = null, n();
|
|
211
|
-
},
|
|
211
|
+
}, be));
|
|
212
212
|
}, a = (n) => {
|
|
213
213
|
if (e.current &&= (clearTimeout(e.current), null), !t.current) {
|
|
214
|
-
|
|
214
|
+
J.dismiss($);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
|
-
t.current = !1, n ?
|
|
217
|
+
t.current = !1, n ? J.success("Back online", {
|
|
218
218
|
id: $,
|
|
219
219
|
duration: 2500
|
|
220
|
-
}) :
|
|
220
|
+
}) : J.dismiss($);
|
|
221
221
|
}, o = (e) => {
|
|
222
222
|
if (!(e instanceof CustomEvent)) return;
|
|
223
223
|
let t = e.detail;
|
|
@@ -230,18 +230,18 @@ function ye() {
|
|
|
230
230
|
};
|
|
231
231
|
}, []), null;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
let f =
|
|
235
|
-
|
|
236
|
-
let p = /* @__PURE__ */
|
|
233
|
+
function Se({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, defaultMode: i, defaultDensity: a, defaultTypography: o, defaultGlass: s, productName: c, brandInitial: l, enablePWA: u, toasterPosition: d }) {
|
|
234
|
+
let f = K();
|
|
235
|
+
N();
|
|
236
|
+
let p = /* @__PURE__ */ W(E, { children: /* @__PURE__ */ W(_, { children: /* @__PURE__ */ W(v, {
|
|
237
237
|
workspaceId: null,
|
|
238
238
|
gateway: "global",
|
|
239
239
|
defaultEnabled: !0,
|
|
240
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(b, { children: /* @__PURE__ */ W(h, {
|
|
241
241
|
fallback: null,
|
|
242
|
-
children: /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ W(F, {
|
|
243
243
|
disabled: f.pathname.startsWith("/devportal") || f.pathname.startsWith("/organizations") || f.pathname.startsWith("/workspaces"),
|
|
244
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ W(ve, {
|
|
245
245
|
enablePWA: u,
|
|
246
246
|
toasterPosition: d,
|
|
247
247
|
productName: c,
|
|
@@ -251,22 +251,22 @@ function be({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
251
251
|
})
|
|
252
252
|
}) }) })
|
|
253
253
|
}) }) });
|
|
254
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ G(m, {
|
|
255
255
|
defaultBrand: r,
|
|
256
256
|
defaultMode: i,
|
|
257
257
|
defaultDensity: a,
|
|
258
258
|
defaultTypography: o,
|
|
259
259
|
defaultGlass: s,
|
|
260
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ W(Ce, {}), /* @__PURE__ */ W(T, {
|
|
261
261
|
i18nProductId: t,
|
|
262
262
|
fallbackTranslations: n,
|
|
263
263
|
children: p
|
|
264
264
|
})]
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
let e =
|
|
269
|
-
return
|
|
267
|
+
function Ce() {
|
|
268
|
+
let e = K();
|
|
269
|
+
return B(() => {
|
|
270
270
|
e.hash || requestAnimationFrame(() => {
|
|
271
271
|
window.scrollTo({
|
|
272
272
|
top: 0,
|
|
@@ -284,7 +284,7 @@ function xe() {
|
|
|
284
284
|
e.hash
|
|
285
285
|
]), null;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function we(e) {
|
|
288
288
|
if (e instanceof Error) return e.message;
|
|
289
289
|
if (typeof e == "string") return e;
|
|
290
290
|
try {
|
|
@@ -293,9 +293,9 @@ function Se(e) {
|
|
|
293
293
|
return String(e);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
let e =
|
|
298
|
-
return
|
|
296
|
+
function Te() {
|
|
297
|
+
let e = M(), t = K(), n = H(void 0), r = H(void 0), i = H(null);
|
|
298
|
+
return B(() => {
|
|
299
299
|
let a = `${t.pathname}${t.search}${t.hash}`;
|
|
300
300
|
if (r.current !== a) return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
301
301
|
i.current = null;
|
|
@@ -315,7 +315,7 @@ function Ce() {
|
|
|
315
315
|
t.hash,
|
|
316
316
|
t.pathname,
|
|
317
317
|
t.search
|
|
318
|
-
]),
|
|
318
|
+
]), B(() => {
|
|
319
319
|
let t = (t) => {
|
|
320
320
|
e.emit("error.runtime.caught", {
|
|
321
321
|
message: t.message || "Runtime error",
|
|
@@ -325,12 +325,12 @@ function Ce() {
|
|
|
325
325
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
326
326
|
});
|
|
327
327
|
}, n = (t) => {
|
|
328
|
-
e.emit("error.unhandledrejection", { reason:
|
|
328
|
+
e.emit("error.unhandledrejection", { reason: we(t.reason) });
|
|
329
329
|
};
|
|
330
330
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
331
331
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
332
332
|
};
|
|
333
|
-
}, [e]),
|
|
333
|
+
}, [e]), B(() => {
|
|
334
334
|
x((t) => {
|
|
335
335
|
e.emit("perf.lcp.measured", {
|
|
336
336
|
metric: "LCP",
|
|
@@ -338,7 +338,7 @@ function Ce() {
|
|
|
338
338
|
id: t.id,
|
|
339
339
|
rating: t.rating
|
|
340
340
|
});
|
|
341
|
-
}),
|
|
341
|
+
}), w((t) => {
|
|
342
342
|
e.emit("perf.cls.measured", {
|
|
343
343
|
metric: "CLS",
|
|
344
344
|
value: t.value,
|
|
@@ -362,40 +362,40 @@ function Ce() {
|
|
|
362
362
|
});
|
|
363
363
|
}, [e]), null;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
return /* @__PURE__ */ U
|
|
367
|
-
e.devtools ? /* @__PURE__ */
|
|
368
|
-
e.broadcast === !1 ? null : /* @__PURE__ */
|
|
369
|
-
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */
|
|
370
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */
|
|
365
|
+
function Ee({ config: e, productSlug: t }) {
|
|
366
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Te, {}), e.enabled === !1 ? null : /* @__PURE__ */ G(U, { children: [
|
|
367
|
+
e.devtools ? /* @__PURE__ */ W(D, { enabled: !0 }) : null,
|
|
368
|
+
e.broadcast === !1 ? null : /* @__PURE__ */ W(O, {}),
|
|
369
|
+
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(k, { endpoint: e.backendAudit.endpoint }) : null,
|
|
370
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(A, {
|
|
371
371
|
siteId: e.rybbit.siteId,
|
|
372
372
|
scriptUrl: e.rybbit.scriptUrl,
|
|
373
373
|
allowlist: e.rybbit.allowlist,
|
|
374
374
|
identifyOn: e.rybbit.identifyOn,
|
|
375
375
|
rename: e.rybbit.rename
|
|
376
376
|
}) : null,
|
|
377
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */
|
|
377
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(j, {
|
|
378
378
|
endpoint: e.otel.endpoint,
|
|
379
379
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
380
380
|
flushInterval: e.otel.flushInterval
|
|
381
381
|
}) : null
|
|
382
382
|
] })] });
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
let { productName: o, productSlug: m = o.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", defaultMode: S, defaultDensity: C, defaultTypography:
|
|
384
|
+
function De({ config: n, children: r, clearAuthStore: a }) {
|
|
385
|
+
let { productName: o, productSlug: m = o.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", defaultMode: S, defaultDensity: C, defaultTypography: w, defaultGlass: T, enablePWA: E = !0, brandInitial: D = o.charAt(0), defaultGateway: O = "workspace", enableSubscriptions: k = !0, fallbackTranslations: A, queryClientOptions: j, toasterPosition: M = "bottom-right", observability: N } = n, P = N ?? Q(m, _e()), F = V(() => ({
|
|
386
386
|
productName: o,
|
|
387
387
|
productSlug: m,
|
|
388
|
-
brandInitial:
|
|
388
|
+
brandInitial: D,
|
|
389
389
|
tagline: g,
|
|
390
390
|
domain: _
|
|
391
391
|
}), [
|
|
392
392
|
o,
|
|
393
393
|
m,
|
|
394
|
-
|
|
394
|
+
D,
|
|
395
395
|
g,
|
|
396
396
|
_
|
|
397
|
-
]),
|
|
398
|
-
if ((() => {
|
|
397
|
+
]), I = H(!1), L = H(!!b?.url), R = z((t) => {
|
|
398
|
+
if (!t?.force && (() => {
|
|
399
399
|
try {
|
|
400
400
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
401
401
|
if (!e) return !1;
|
|
@@ -404,24 +404,23 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
|
|
|
404
404
|
} catch {
|
|
405
405
|
return !1;
|
|
406
406
|
}
|
|
407
|
-
})() ||
|
|
408
|
-
|
|
409
|
-
let
|
|
410
|
-
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) ||
|
|
411
|
-
|
|
407
|
+
})() || L.current || I.current) return;
|
|
408
|
+
I.current = !0, u(a);
|
|
409
|
+
let n = `${window.location.pathname}${window.location.search}`, r = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(n)}`, i = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
|
|
410
|
+
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || i) {
|
|
411
|
+
I.current = !1;
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
|
-
window.location.replace(
|
|
415
|
-
}, [a]),
|
|
414
|
+
window.location.replace(r);
|
|
415
|
+
}, [a]), U = V(() => ({
|
|
416
416
|
globalBaseUrl: y.globalBaseUrl,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
let t = await s({
|
|
417
|
+
...d()
|
|
418
|
+
}), [y.globalBaseUrl]), K = z(async () => l(U), [U]), q = z(async () => {
|
|
419
|
+
window.location.pathname.startsWith("/auth/") || await K() || R({ force: !0 });
|
|
420
|
+
}, [K, R]), J = z(async (e) => {
|
|
421
|
+
f(e) ? await K() || R({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
|
|
422
|
+
}, [K, R]), Y = z(async (e) => {
|
|
423
|
+
let t = await c({
|
|
425
424
|
gateway: "global",
|
|
426
425
|
baseUrl: y.globalBaseUrl,
|
|
427
426
|
authToken: "",
|
|
@@ -435,7 +434,7 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
|
|
|
435
434
|
refreshToken: n.refreshToken,
|
|
436
435
|
expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
|
|
437
436
|
};
|
|
438
|
-
}, [y.globalBaseUrl]), X =
|
|
437
|
+
}, [y.globalBaseUrl]), X = z(() => t("organization"), []), Z = V(() => {
|
|
439
438
|
let e = new fe({
|
|
440
439
|
queryCache: new de({ onError: (e) => {
|
|
441
440
|
i(e);
|
|
@@ -449,68 +448,75 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
|
|
|
449
448
|
}
|
|
450
449
|
}),
|
|
451
450
|
defaultOptions: { queries: {
|
|
452
|
-
staleTime:
|
|
453
|
-
retry:
|
|
454
|
-
refetchOnWindowFocus:
|
|
451
|
+
staleTime: j?.staleTime ?? 300 * 1e3,
|
|
452
|
+
retry: j?.retry ?? 2,
|
|
453
|
+
refetchOnWindowFocus: j?.refetchOnWindowFocus ?? !1
|
|
455
454
|
} }
|
|
456
455
|
});
|
|
457
456
|
return e;
|
|
458
|
-
}, [
|
|
459
|
-
return
|
|
460
|
-
let e =
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
457
|
+
}, [j]);
|
|
458
|
+
return B(() => {
|
|
459
|
+
let e = () => {
|
|
460
|
+
R({ force: !0 });
|
|
461
|
+
};
|
|
462
|
+
return window.addEventListener(s, e), () => {
|
|
463
|
+
window.removeEventListener(s, e);
|
|
464
|
+
};
|
|
465
|
+
}, [R]), B(() => {
|
|
466
|
+
let e = ne.getInstance();
|
|
467
|
+
e.getLogger("shell") || e.getLogger("shell").addTransport(new re());
|
|
468
|
+
}, []), /* @__PURE__ */ W(p, {
|
|
469
|
+
value: F,
|
|
470
|
+
children: /* @__PURE__ */ W(ce, {
|
|
465
471
|
appName: m,
|
|
466
|
-
appVersion:
|
|
467
|
-
appEnv:
|
|
472
|
+
appVersion: P.appVersion,
|
|
473
|
+
appEnv: P.appEnv,
|
|
468
474
|
sourceMfe: m,
|
|
469
|
-
children: /* @__PURE__ */
|
|
470
|
-
FallbackComponent:
|
|
471
|
-
children: /* @__PURE__ */
|
|
472
|
-
config:
|
|
475
|
+
children: /* @__PURE__ */ W(h, {
|
|
476
|
+
FallbackComponent: ie,
|
|
477
|
+
children: /* @__PURE__ */ G(le, { children: [/* @__PURE__ */ W(Ee, {
|
|
478
|
+
config: P,
|
|
473
479
|
productSlug: m
|
|
474
|
-
}), /* @__PURE__ */
|
|
480
|
+
}), /* @__PURE__ */ W(pe, {
|
|
475
481
|
client: Z,
|
|
476
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ W(oe, { children: /* @__PURE__ */ W(se, {
|
|
477
483
|
workspaceBaseUrl: y.workspaceBaseUrl,
|
|
478
484
|
globalBaseUrl: y.globalBaseUrl,
|
|
479
485
|
organizationId: X,
|
|
480
486
|
productSlug: m,
|
|
481
|
-
defaultGateway:
|
|
482
|
-
enableSubscriptions:
|
|
487
|
+
defaultGateway: O,
|
|
488
|
+
enableSubscriptions: k,
|
|
483
489
|
onAuthError: q,
|
|
484
490
|
onNetworkError: J,
|
|
485
491
|
onRefreshToken: K,
|
|
486
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ W(ee, {
|
|
487
493
|
bridgeUrl: b?.url,
|
|
488
494
|
bridgeAllowedOrigins: b?.allowedOrigins,
|
|
489
495
|
bridgeDebug: b?.debug,
|
|
490
496
|
onRefreshToken: Y,
|
|
491
497
|
onBridgeReady: () => {
|
|
492
|
-
|
|
498
|
+
L.current = !1;
|
|
493
499
|
},
|
|
494
500
|
onSessionExpiringSoon: () => {
|
|
495
501
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
496
502
|
},
|
|
497
503
|
onTokenExpired: () => {
|
|
498
|
-
|
|
504
|
+
R();
|
|
499
505
|
},
|
|
500
|
-
children: /* @__PURE__ */
|
|
506
|
+
children: /* @__PURE__ */ W(te, {
|
|
501
507
|
syncToUrl: !0,
|
|
502
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ W(ae, { children: /* @__PURE__ */ W(Se, {
|
|
503
509
|
i18nProductId: v,
|
|
504
|
-
fallbackTranslations:
|
|
510
|
+
fallbackTranslations: A,
|
|
505
511
|
defaultBrand: x,
|
|
506
512
|
defaultMode: S,
|
|
507
513
|
defaultDensity: C,
|
|
508
|
-
defaultTypography:
|
|
509
|
-
defaultGlass:
|
|
514
|
+
defaultTypography: w,
|
|
515
|
+
defaultGlass: T,
|
|
510
516
|
productName: o,
|
|
511
|
-
brandInitial:
|
|
512
|
-
enablePWA:
|
|
513
|
-
toasterPosition:
|
|
517
|
+
brandInitial: D,
|
|
518
|
+
enablePWA: E,
|
|
519
|
+
toasterPosition: M,
|
|
514
520
|
children: r
|
|
515
521
|
}) })
|
|
516
522
|
})
|
|
@@ -522,4 +528,4 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
|
|
|
522
528
|
});
|
|
523
529
|
}
|
|
524
530
|
//#endregion
|
|
525
|
-
export {
|
|
531
|
+
export { De as AppShellProvider, Q as resolveAppShellObservabilityConfig };
|
|
@@ -48,6 +48,12 @@ export interface TokenRefreshConfig {
|
|
|
48
48
|
current: Promise<void> | null;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* The shared single-flight dedup refs for {@link attemptTokenRefresh}. Use
|
|
53
|
+
* these (rather than per-caller refs) so concurrent 401s from different code
|
|
54
|
+
* paths coalesce into one refresh mutation.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getSharedTokenRefreshRefs(): Pick<TokenRefreshConfig, 'isRefreshing' | 'refreshPromise'>;
|
|
51
57
|
/**
|
|
52
58
|
* Attempt to refresh the access token using the stored refresh token.
|
|
53
59
|
* Returns true if refresh succeeded, false if it failed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authErrorHandling.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/authErrorHandling.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAoBzE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAOxD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAqBnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GACrD,OAAO,CAET;AAED,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,YAAY,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,2DAA2D;IAC3D,cAAc,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;CACnD;
|
|
1
|
+
{"version":3,"file":"authErrorHandling.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/authErrorHandling.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAoBzE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAOxD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAqBnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GACrD,OAAO,CAET;AAED,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,YAAY,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,2DAA2D;IAC3D,cAAc,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;CACnD;AAWD;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,gBAAgB,CAAC,CAEvG;AAQD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAwItF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,EAAE,SAAS,SAAgB,GAAG,IAAI,CAW5F"}
|