@burdenoff/fe-libs 2026.521.4 → 2026.521.6
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/ContextConversationWidget.d.ts.map +1 -1
- package/dist/shared/components/ContextConversationWidget.js +4 -0
- package/dist/shared/events/index.d.ts +27 -1
- package/dist/shared/events/index.d.ts.map +1 -1
- package/dist/shared/events/sinks/RybbitSink.d.ts +1 -0
- package/dist/shared/events/sinks/RybbitSink.d.ts.map +1 -1
- package/dist/shared/events/sinks/RybbitSink.js +49 -28
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +122 -106
- package/dist/storage/SaveToFilesButton.d.ts +55 -0
- package/dist/storage/SaveToFilesButton.d.ts.map +1 -0
- package/dist/storage/SaveToFilesButton.js +56 -0
- package/dist/storage/SaveToFilesDialog.d.ts +13 -0
- package/dist/storage/SaveToFilesDialog.d.ts.map +1 -0
- package/dist/storage/SaveToFilesDialog.js +88 -0
- package/dist/storage/StorageFolderPicker.js +134 -0
- package/dist/storage/index.d.ts +7 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +6 -0
- package/dist/storage/uploadBlob.d.ts +21 -0
- package/dist/storage/uploadBlob.d.ts.map +1 -0
- package/dist/storage/uploadBlob.js +65 -0
- package/dist/storage/useSaveToFiles.d.ts +17 -0
- package/dist/storage/useSaveToFiles.d.ts.map +1 -0
- package/dist/storage/useSaveToFiles.js +73 -0
- package/package.json +1 -1
|
@@ -17,30 +17,30 @@ import { FeatureFlagProvider as g } from "../feature-flags/FeatureFlagProvider.j
|
|
|
17
17
|
import "../../shared-feature-flags.js";
|
|
18
18
|
import { GlobalUiProvider as _ } from "./shell/GlobalUiProvider.js";
|
|
19
19
|
import { ShellUiProvider as v } from "./shell/ShellUiProvider.js";
|
|
20
|
-
import { ContextManagerProvider as
|
|
21
|
-
import { AuthTokenProvider as
|
|
22
|
-
import { MultiGatewayProvider as
|
|
23
|
-
import { G as
|
|
24
|
-
import { ProfileI18nBridge as
|
|
25
|
-
import { ProfileGeographyBridge as
|
|
26
|
-
import { AppShellContextProvider as
|
|
20
|
+
import { ContextManagerProvider as ee } from "./shell/ContextManagerProvider.js";
|
|
21
|
+
import { AuthTokenProvider as y } from "./shell/AuthTokenProvider.js";
|
|
22
|
+
import { MultiGatewayProvider as b } from "./shell/MultiGatewayProvider.js";
|
|
23
|
+
import { G as x, j as S, w as C } from "../../node_modules/web-vitals/dist/web-vitals.js";
|
|
24
|
+
import { ProfileI18nBridge as w } from "./shell/ProfileI18nBridge.js";
|
|
25
|
+
import { ProfileGeographyBridge as T } from "./shell/ProfileGeographyBridge.js";
|
|
26
|
+
import { AppShellContextProvider as te } from "./shell/AppShellContext.js";
|
|
27
27
|
import { DevtoolsSink as E } from "../events/sinks/DevtoolsSink.js";
|
|
28
28
|
import { BroadcastChannelSink as D } from "../events/sinks/BroadcastChannelSink.js";
|
|
29
29
|
import { BackendAuditSink as O } from "../events/sinks/BackendAuditSink.js";
|
|
30
30
|
import { RybbitSink as k } from "../events/sinks/RybbitSink.js";
|
|
31
31
|
import { OtelBrowserSink as A } from "../events/sinks/OtelBrowserSink.js";
|
|
32
|
-
import { EventBusProvider as
|
|
32
|
+
import { EventBusProvider as ne, useEventBus as j } from "../../shared-events.js";
|
|
33
33
|
import "../../shared-logger.js";
|
|
34
|
-
import { useReferralAttribution as
|
|
35
|
-
import { TourPlayerProvider as
|
|
36
|
-
import { ToursProvider as
|
|
37
|
-
import { TourInitializer as
|
|
34
|
+
import { useReferralAttribution as M } from "../hooks/useReferralAttribution.js";
|
|
35
|
+
import { TourPlayerProvider as N } from "../tours/TourPlayerProvider.js";
|
|
36
|
+
import { ToursProvider as P, useToursContext as F } from "../tours/ToursContext.js";
|
|
37
|
+
import { TourInitializer as I } from "../tours/TourInitializer.js";
|
|
38
38
|
import "../../shared-tours.js";
|
|
39
|
-
import { Suspense as
|
|
40
|
-
import { Fragment as
|
|
41
|
-
import { BrowserRouter as
|
|
42
|
-
import { Toaster as
|
|
43
|
-
import { QueryClient as
|
|
39
|
+
import { Suspense as L, useCallback as R, useEffect as z, useMemo as B, useRef as V } from "react";
|
|
40
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
41
|
+
import { BrowserRouter as re, useLocation as G } from "react-router-dom";
|
|
42
|
+
import { Toaster as K } from "sonner";
|
|
43
|
+
import { QueryClient as ie, QueryClientProvider as q } from "@tanstack/react-query";
|
|
44
44
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
45
45
|
var J = {
|
|
46
46
|
bigconsole: {
|
|
@@ -61,11 +61,26 @@ var J = {
|
|
|
61
61
|
},
|
|
62
62
|
vibecontrols: { prod: "8a46449d9c07" },
|
|
63
63
|
workspaces: { prod: "da0c142f4b2e" }
|
|
64
|
-
}
|
|
65
|
-
|
|
64
|
+
}, Y = [
|
|
65
|
+
"nav.route.changed",
|
|
66
|
+
"auth.signed_in",
|
|
67
|
+
"auth.signed_out",
|
|
68
|
+
"support.ticket.created",
|
|
69
|
+
"support.ticket.closed",
|
|
70
|
+
"support.ticket.reopened",
|
|
71
|
+
"support.kb.article_rated",
|
|
72
|
+
"conversations.conversation.created",
|
|
73
|
+
"conversations.conversation.archived",
|
|
74
|
+
"notification.item.opened",
|
|
75
|
+
"notification.preference.updated",
|
|
76
|
+
"notification.admin.sent",
|
|
77
|
+
"notification.template.saved",
|
|
78
|
+
"notification.schedule.updated"
|
|
79
|
+
];
|
|
80
|
+
function X(e) {
|
|
66
81
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
67
82
|
}
|
|
68
|
-
function
|
|
83
|
+
function Z(e, t) {
|
|
69
84
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
70
85
|
}
|
|
71
86
|
function ae() {
|
|
@@ -77,8 +92,8 @@ function ae() {
|
|
|
77
92
|
SSR: !1
|
|
78
93
|
};
|
|
79
94
|
}
|
|
80
|
-
function
|
|
81
|
-
let n =
|
|
95
|
+
function Q(e, t) {
|
|
96
|
+
let n = X(t.VITE_DEPLOY_ENV ?? t.MODE), r = Z(t, n), i = J[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);
|
|
82
97
|
return {
|
|
83
98
|
enabled: r,
|
|
84
99
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -89,6 +104,7 @@ function Z(e, t) {
|
|
|
89
104
|
enabled: r && !!o,
|
|
90
105
|
siteId: o,
|
|
91
106
|
scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
|
|
107
|
+
allowlist: Y,
|
|
92
108
|
identifyOn: "auth.signed_in",
|
|
93
109
|
rename: { "nav.route.changed": "pageview" }
|
|
94
110
|
},
|
|
@@ -103,16 +119,16 @@ function Z(e, t) {
|
|
|
103
119
|
}
|
|
104
120
|
};
|
|
105
121
|
}
|
|
106
|
-
function
|
|
107
|
-
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } =
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
-
onTourStart:
|
|
122
|
+
function $({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
123
|
+
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = F(), c = R((e, t) => e.steps?.[t], []);
|
|
124
|
+
return /* @__PURE__ */ W(N, {
|
|
125
|
+
onTourStart: R((e) => {
|
|
110
126
|
a(e.id, "started"), s("TOUR_STARTED", e.id);
|
|
111
127
|
}, [s, a]),
|
|
112
|
-
onTourComplete:
|
|
128
|
+
onTourComplete: R((e) => {
|
|
113
129
|
a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
|
|
114
130
|
}, [s, a]),
|
|
115
|
-
onTourSkip:
|
|
131
|
+
onTourSkip: R((e, t) => {
|
|
116
132
|
let n = c(e, t);
|
|
117
133
|
a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
|
|
118
134
|
stepId: n?.id,
|
|
@@ -123,14 +139,14 @@ function Q({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
123
139
|
s,
|
|
124
140
|
a
|
|
125
141
|
]),
|
|
126
|
-
onStepChange:
|
|
142
|
+
onStepChange: R((e, t) => {
|
|
127
143
|
let n = c(e, t);
|
|
128
144
|
n && s("STEP_VIEWED", e.id, {
|
|
129
145
|
stepId: n.id,
|
|
130
146
|
stepOrder: n.stepOrder
|
|
131
147
|
});
|
|
132
148
|
}, [c, s]),
|
|
133
|
-
onStepComplete:
|
|
149
|
+
onStepComplete: R((e, t) => {
|
|
134
150
|
let n = c(e, t);
|
|
135
151
|
n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
|
|
136
152
|
stepId: n.id,
|
|
@@ -142,16 +158,16 @@ function Q({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
142
158
|
s
|
|
143
159
|
]),
|
|
144
160
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ U(I, {}),
|
|
146
162
|
e,
|
|
147
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ U(K, {
|
|
148
164
|
position: n,
|
|
149
165
|
richColors: !0,
|
|
150
166
|
closeButton: !0
|
|
151
167
|
}),
|
|
152
|
-
t && /* @__PURE__ */
|
|
168
|
+
t && /* @__PURE__ */ U(L, {
|
|
153
169
|
fallback: null,
|
|
154
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ U(p, {
|
|
155
171
|
productName: r,
|
|
156
172
|
brandInitial: i
|
|
157
173
|
})
|
|
@@ -160,17 +176,17 @@ function Q({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
160
176
|
});
|
|
161
177
|
}
|
|
162
178
|
function oe({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
|
|
163
|
-
let c =
|
|
164
|
-
|
|
165
|
-
let l = c.pathname.startsWith("/auth/") || c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"), d = /* @__PURE__ */
|
|
179
|
+
let c = G();
|
|
180
|
+
M();
|
|
181
|
+
let l = c.pathname.startsWith("/auth/") || c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"), d = /* @__PURE__ */ U(T, { children: /* @__PURE__ */ U(h, { children: /* @__PURE__ */ U(g, {
|
|
166
182
|
workspaceId: null,
|
|
167
183
|
gateway: "global",
|
|
168
184
|
defaultEnabled: !0,
|
|
169
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ U(_, { children: /* @__PURE__ */ U(v, { children: /* @__PURE__ */ U(f, {
|
|
170
186
|
fallback: null,
|
|
171
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ U(P, {
|
|
172
188
|
disabled: l,
|
|
173
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ U($, {
|
|
174
190
|
enablePWA: o,
|
|
175
191
|
toasterPosition: s,
|
|
176
192
|
productName: i,
|
|
@@ -180,9 +196,9 @@ function oe({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
180
196
|
})
|
|
181
197
|
}) }) })
|
|
182
198
|
}) }) });
|
|
183
|
-
return /* @__PURE__ */
|
|
199
|
+
return /* @__PURE__ */ W(u, {
|
|
184
200
|
defaultBrand: r,
|
|
185
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ U(se, {}), l ? /* @__PURE__ */ U(m, {
|
|
186
202
|
defaultLocale: "en",
|
|
187
203
|
translations: n ?? {
|
|
188
204
|
en: {},
|
|
@@ -196,16 +212,16 @@ function oe({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
196
212
|
},
|
|
197
213
|
showChildrenWhileLoading: !0,
|
|
198
214
|
children: d
|
|
199
|
-
}) : /* @__PURE__ */
|
|
215
|
+
}) : /* @__PURE__ */ U(w, {
|
|
200
216
|
i18nProductId: t,
|
|
201
217
|
fallbackTranslations: n,
|
|
202
218
|
children: d
|
|
203
219
|
})]
|
|
204
220
|
});
|
|
205
221
|
}
|
|
206
|
-
function
|
|
207
|
-
let e =
|
|
208
|
-
return
|
|
222
|
+
function se() {
|
|
223
|
+
let e = G();
|
|
224
|
+
return z(() => {
|
|
209
225
|
e.hash || requestAnimationFrame(() => {
|
|
210
226
|
window.scrollTo({
|
|
211
227
|
top: 0,
|
|
@@ -223,7 +239,7 @@ function $() {
|
|
|
223
239
|
e.hash
|
|
224
240
|
]), null;
|
|
225
241
|
}
|
|
226
|
-
function
|
|
242
|
+
function ce(e) {
|
|
227
243
|
if (e instanceof Error) return e.message;
|
|
228
244
|
if (typeof e == "string") return e;
|
|
229
245
|
try {
|
|
@@ -232,9 +248,9 @@ function se(e) {
|
|
|
232
248
|
return String(e);
|
|
233
249
|
}
|
|
234
250
|
}
|
|
235
|
-
function
|
|
236
|
-
let e =
|
|
237
|
-
return
|
|
251
|
+
function le() {
|
|
252
|
+
let e = j(), t = G(), n = V(void 0), r = V(void 0);
|
|
253
|
+
return z(() => {
|
|
238
254
|
let i = `${t.pathname}${t.search}${t.hash}`;
|
|
239
255
|
r.current !== i && (e.emit("nav.route.changed", {
|
|
240
256
|
pathname: t.pathname,
|
|
@@ -248,7 +264,7 @@ function ce() {
|
|
|
248
264
|
t.hash,
|
|
249
265
|
t.pathname,
|
|
250
266
|
t.search
|
|
251
|
-
]),
|
|
267
|
+
]), z(() => {
|
|
252
268
|
let t = (t) => {
|
|
253
269
|
e.emit("error.runtime.caught", {
|
|
254
270
|
message: t.message || "Runtime error",
|
|
@@ -258,27 +274,27 @@ function ce() {
|
|
|
258
274
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
259
275
|
});
|
|
260
276
|
}, n = (t) => {
|
|
261
|
-
e.emit("error.unhandledrejection", { reason:
|
|
277
|
+
e.emit("error.unhandledrejection", { reason: ce(t.reason) });
|
|
262
278
|
};
|
|
263
279
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
264
280
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
265
281
|
};
|
|
266
|
-
}, [e]),
|
|
267
|
-
|
|
282
|
+
}, [e]), z(() => {
|
|
283
|
+
x((t) => {
|
|
268
284
|
e.emit("perf.lcp.measured", {
|
|
269
285
|
metric: "LCP",
|
|
270
286
|
value: t.value,
|
|
271
287
|
id: t.id,
|
|
272
288
|
rating: t.rating
|
|
273
289
|
});
|
|
274
|
-
}),
|
|
290
|
+
}), C((t) => {
|
|
275
291
|
e.emit("perf.cls.measured", {
|
|
276
292
|
metric: "CLS",
|
|
277
293
|
value: t.value,
|
|
278
294
|
id: t.id,
|
|
279
295
|
rating: t.rating
|
|
280
296
|
});
|
|
281
|
-
}),
|
|
297
|
+
}), S((t) => {
|
|
282
298
|
e.emit("perf.inp.measured", {
|
|
283
299
|
metric: "INP",
|
|
284
300
|
value: t.value,
|
|
@@ -288,27 +304,27 @@ function ce() {
|
|
|
288
304
|
});
|
|
289
305
|
}, [e]), null;
|
|
290
306
|
}
|
|
291
|
-
function
|
|
292
|
-
return /* @__PURE__ */
|
|
293
|
-
e.devtools ? /* @__PURE__ */
|
|
294
|
-
e.broadcast === !1 ? null : /* @__PURE__ */
|
|
295
|
-
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */
|
|
296
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */
|
|
307
|
+
function ue({ config: e, productSlug: t }) {
|
|
308
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(le, {}), e.enabled === !1 ? null : /* @__PURE__ */ W(H, { children: [
|
|
309
|
+
e.devtools ? /* @__PURE__ */ U(E, { enabled: !0 }) : null,
|
|
310
|
+
e.broadcast === !1 ? null : /* @__PURE__ */ U(D, {}),
|
|
311
|
+
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ U(O, { endpoint: e.backendAudit.endpoint }) : null,
|
|
312
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ U(k, {
|
|
297
313
|
siteId: e.rybbit.siteId,
|
|
298
314
|
scriptUrl: e.rybbit.scriptUrl,
|
|
299
315
|
allowlist: e.rybbit.allowlist,
|
|
300
316
|
identifyOn: e.rybbit.identifyOn,
|
|
301
317
|
rename: e.rybbit.rename
|
|
302
318
|
}) : null,
|
|
303
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */
|
|
319
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ U(A, {
|
|
304
320
|
endpoint: e.otel.endpoint,
|
|
305
321
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
306
322
|
flushInterval: e.otel.flushInterval
|
|
307
323
|
}) : null
|
|
308
324
|
] })] });
|
|
309
325
|
}
|
|
310
|
-
function
|
|
311
|
-
let { productName: h, productSlug: g = h.toLowerCase().replace(/\s+/g, ""), tagline: _ = "", domain: v, i18nProductId:
|
|
326
|
+
function de({ config: u, children: p, clearAuthStore: m }) {
|
|
327
|
+
let { productName: h, productSlug: g = h.toLowerCase().replace(/\s+/g, ""), tagline: _ = "", domain: v, i18nProductId: x, gatewayUrls: S, authBridge: C, defaultBrand: w = "default", enablePWA: T = !0, brandInitial: E = h.charAt(0), defaultGateway: D = "workspace", enableSubscriptions: O = !0, fallbackTranslations: k, queryClientOptions: A, toasterPosition: j = "bottom-right", observability: M } = u, N = M ?? Q(g, ae()), P = B(() => ({
|
|
312
328
|
productName: h,
|
|
313
329
|
productSlug: g,
|
|
314
330
|
brandInitial: E,
|
|
@@ -320,7 +336,7 @@ function ue({ config: u, children: p, clearAuthStore: m }) {
|
|
|
320
336
|
E,
|
|
321
337
|
_,
|
|
322
338
|
v
|
|
323
|
-
]),
|
|
339
|
+
]), F = V(!1), I = V(!1), L = V(null), H = V(!!C?.url), G = R(() => {
|
|
324
340
|
if ((() => {
|
|
325
341
|
try {
|
|
326
342
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
@@ -330,61 +346,61 @@ function ue({ config: u, children: p, clearAuthStore: m }) {
|
|
|
330
346
|
} catch {
|
|
331
347
|
return !1;
|
|
332
348
|
}
|
|
333
|
-
})() ||
|
|
334
|
-
|
|
349
|
+
})() || H.current || F.current) return;
|
|
350
|
+
F.current = !0, i(m);
|
|
335
351
|
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);
|
|
336
352
|
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
|
|
337
|
-
|
|
353
|
+
F.current = !1;
|
|
338
354
|
return;
|
|
339
355
|
}
|
|
340
356
|
window.location.replace(n);
|
|
341
|
-
}, [m]),
|
|
342
|
-
globalBaseUrl:
|
|
343
|
-
isRefreshing:
|
|
344
|
-
refreshPromise:
|
|
345
|
-
}), [
|
|
346
|
-
window.location.pathname.startsWith("/auth/") || await J() ||
|
|
347
|
-
}, [J,
|
|
348
|
-
a(e) ? await J() ||
|
|
349
|
-
}, [J,
|
|
357
|
+
}, [m]), K = B(() => ({
|
|
358
|
+
globalBaseUrl: S.globalBaseUrl,
|
|
359
|
+
isRefreshing: I,
|
|
360
|
+
refreshPromise: L
|
|
361
|
+
}), [S.globalBaseUrl]), J = R(async () => r(K), [K]), Y = R(async () => {
|
|
362
|
+
window.location.pathname.startsWith("/auth/") || await J() || G();
|
|
363
|
+
}, [J, G]), X = R(async (e) => {
|
|
364
|
+
a(e) ? await J() || G() : console.error("[Network] Backend unreachable:", e.message);
|
|
365
|
+
}, [J, G]), Z = R(() => t("organization"), []), $ = B(() => new ie({ defaultOptions: { queries: {
|
|
350
366
|
staleTime: A?.staleTime ?? 300 * 1e3,
|
|
351
367
|
retry: A?.retry ?? 1,
|
|
352
368
|
refetchOnWindowFocus: A?.refetchOnWindowFocus ?? !1
|
|
353
369
|
} } }), [A]);
|
|
354
|
-
return
|
|
370
|
+
return z(() => {
|
|
355
371
|
let e = c.getInstance();
|
|
356
372
|
e.getLogger("shell") || e.getLogger("shell").addTransport(new l());
|
|
357
|
-
}, []), /* @__PURE__ */
|
|
358
|
-
value:
|
|
359
|
-
children: /* @__PURE__ */
|
|
373
|
+
}, []), /* @__PURE__ */ U(te, {
|
|
374
|
+
value: P,
|
|
375
|
+
children: /* @__PURE__ */ U(ne, {
|
|
360
376
|
appName: g,
|
|
361
|
-
appVersion:
|
|
362
|
-
appEnv:
|
|
377
|
+
appVersion: N.appVersion,
|
|
378
|
+
appEnv: N.appEnv,
|
|
363
379
|
sourceMfe: g,
|
|
364
|
-
children: /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ U(f, {
|
|
365
381
|
FallbackComponent: d,
|
|
366
|
-
children: /* @__PURE__ */
|
|
367
|
-
config:
|
|
382
|
+
children: /* @__PURE__ */ W(re, { children: [/* @__PURE__ */ U(ue, {
|
|
383
|
+
config: N,
|
|
368
384
|
productSlug: g
|
|
369
|
-
}), /* @__PURE__ */
|
|
385
|
+
}), /* @__PURE__ */ U(q, {
|
|
370
386
|
client: $,
|
|
371
|
-
children: /* @__PURE__ */
|
|
372
|
-
workspaceBaseUrl:
|
|
373
|
-
globalBaseUrl:
|
|
374
|
-
organizationId:
|
|
387
|
+
children: /* @__PURE__ */ U(y, { children: /* @__PURE__ */ U(b, {
|
|
388
|
+
workspaceBaseUrl: S.workspaceBaseUrl,
|
|
389
|
+
globalBaseUrl: S.globalBaseUrl,
|
|
390
|
+
organizationId: Z,
|
|
375
391
|
defaultGateway: D,
|
|
376
392
|
enableSubscriptions: O,
|
|
377
393
|
onAuthError: Y,
|
|
378
394
|
onNetworkError: X,
|
|
379
395
|
onRefreshToken: J,
|
|
380
|
-
children: /* @__PURE__ */
|
|
381
|
-
bridgeUrl:
|
|
382
|
-
bridgeAllowedOrigins:
|
|
383
|
-
bridgeDebug:
|
|
396
|
+
children: /* @__PURE__ */ U(o, {
|
|
397
|
+
bridgeUrl: C?.url,
|
|
398
|
+
bridgeAllowedOrigins: C?.allowedOrigins,
|
|
399
|
+
bridgeDebug: C?.debug,
|
|
384
400
|
onRefreshToken: async (e) => {
|
|
385
401
|
let t = await n({
|
|
386
402
|
gateway: "global",
|
|
387
|
-
baseUrl:
|
|
403
|
+
baseUrl: S.globalBaseUrl,
|
|
388
404
|
authToken: "",
|
|
389
405
|
query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
|
|
390
406
|
variables: { token: e }
|
|
@@ -398,24 +414,24 @@ function ue({ config: u, children: p, clearAuthStore: m }) {
|
|
|
398
414
|
};
|
|
399
415
|
},
|
|
400
416
|
onBridgeReady: () => {
|
|
401
|
-
|
|
417
|
+
H.current = !1;
|
|
402
418
|
},
|
|
403
419
|
onSessionExpiringSoon: () => {
|
|
404
420
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
405
421
|
},
|
|
406
422
|
onTokenExpired: () => {
|
|
407
|
-
|
|
423
|
+
G();
|
|
408
424
|
},
|
|
409
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ U(s, {
|
|
410
426
|
syncToUrl: !0,
|
|
411
|
-
children: /* @__PURE__ */
|
|
412
|
-
i18nProductId:
|
|
427
|
+
children: /* @__PURE__ */ U(ee, { children: /* @__PURE__ */ U(oe, {
|
|
428
|
+
i18nProductId: x,
|
|
413
429
|
fallbackTranslations: k,
|
|
414
|
-
defaultBrand:
|
|
430
|
+
defaultBrand: w,
|
|
415
431
|
productName: h,
|
|
416
432
|
brandInitial: E,
|
|
417
|
-
enablePWA:
|
|
418
|
-
toasterPosition:
|
|
433
|
+
enablePWA: T,
|
|
434
|
+
toasterPosition: j,
|
|
419
435
|
children: p
|
|
420
436
|
}) })
|
|
421
437
|
})
|
|
@@ -427,4 +443,4 @@ function ue({ config: u, children: p, clearAuthStore: m }) {
|
|
|
427
443
|
});
|
|
428
444
|
}
|
|
429
445
|
//#endregion
|
|
430
|
-
export {
|
|
446
|
+
export { de as AppShellProvider, Q as resolveAppShellObservabilityConfig };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { SavedFile } from './useSaveToFiles';
|
|
2
|
+
/** Two shapes — pick one based on where the bytes come from. */
|
|
3
|
+
export type SaveToFilesSource = {
|
|
4
|
+
kind: 'blob';
|
|
5
|
+
/**
|
|
6
|
+
* Producer thunk. Returning `null` cleanly aborts the save (e.g. user
|
|
7
|
+
* cancelled a downstream confirm). Producers MAY override the filename
|
|
8
|
+
* and mime type at runtime (useful when the bytes carry metadata only
|
|
9
|
+
* known after a slow GraphQL call resolves).
|
|
10
|
+
*/
|
|
11
|
+
getBlob: () => Promise<{
|
|
12
|
+
blob: Blob;
|
|
13
|
+
filename?: string;
|
|
14
|
+
mimeType?: string;
|
|
15
|
+
} | null>;
|
|
16
|
+
/** Default filename — used by the browser-download path. */
|
|
17
|
+
filename: string;
|
|
18
|
+
/** Default MIME type — used by the browser-download path. */
|
|
19
|
+
mimeType: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'sandbox-artifact';
|
|
22
|
+
sandboxId: string;
|
|
23
|
+
sessionId: string;
|
|
24
|
+
/** Artifact path inside the sandbox session. */
|
|
25
|
+
path: string;
|
|
26
|
+
/** Optional override; otherwise the sandbox's reported filename wins. */
|
|
27
|
+
filename?: string;
|
|
28
|
+
};
|
|
29
|
+
interface Props {
|
|
30
|
+
source: SaveToFilesSource;
|
|
31
|
+
/**
|
|
32
|
+
* Pre-selected destination folder path. The dialog will lazily create
|
|
33
|
+
* missing ancestors via `ensureFolderByPath` on submit. The user can edit
|
|
34
|
+
* the path in the dialog.
|
|
35
|
+
*/
|
|
36
|
+
defaultFolderPath?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Browser-download action. Called when the user clicks the primary button.
|
|
39
|
+
* SaveToFilesButton does not implement the download itself — callers may
|
|
40
|
+
* have specialised tracking, anti-flood, or transformation logic.
|
|
41
|
+
*/
|
|
42
|
+
onDownload: () => void | Promise<void>;
|
|
43
|
+
/** Called after a successful Save to Files. */
|
|
44
|
+
onSaved?: (file: SavedFile) => void;
|
|
45
|
+
/** Primary button label. Default "Download". */
|
|
46
|
+
label?: string;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
/** ARIA-style test ID prefix; defaults to `save-to-files`. */
|
|
49
|
+
testId?: string;
|
|
50
|
+
/** Pass-through className for the outer wrapper. */
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function SaveToFilesButton({ source, defaultFolderPath, onDownload, onSaved, label, disabled, testId, className, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=SaveToFilesButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveToFilesButton.d.ts","sourceRoot":"","sources":["../../src/storage/SaveToFilesButton.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GACzB;IACE,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACpF,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,UAAU,KAAK;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,OAAO,EACP,KAAkB,EAClB,QAAQ,EACR,MAAwB,EACxB,SAAS,GACV,EAAE,KAAK,2CAsDP"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Button as e } from "../ui/button.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "../ui/dropdown-menu.js";
|
|
3
|
+
import { SaveToFilesDialog as a } from "./SaveToFilesDialog.js";
|
|
4
|
+
import { useState as o } from "react";
|
|
5
|
+
import { Download as s, FolderInput as c } from "lucide-react";
|
|
6
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
//#region src/storage/SaveToFilesButton.tsx
|
|
8
|
+
function f(e) {
|
|
9
|
+
return e.kind === "blob" ? e.filename : e.filename ?? e.path.split("/").filter(Boolean).pop() ?? "artifact";
|
|
10
|
+
}
|
|
11
|
+
function p({ source: p, defaultFolderPath: m, onDownload: h, onSaved: g, label: _ = "Download", disabled: v, testId: y = "save-to-files", className: b }) {
|
|
12
|
+
let [x, S] = o(!1), C = f(p);
|
|
13
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
|
|
14
|
+
className: `inline-flex items-center ${b ?? ""}`,
|
|
15
|
+
children: [/* @__PURE__ */ d(e, {
|
|
16
|
+
variant: "outline",
|
|
17
|
+
size: "sm",
|
|
18
|
+
disabled: v,
|
|
19
|
+
onClick: () => void h(),
|
|
20
|
+
"data-testid": `${y}-download`,
|
|
21
|
+
className: "rounded-r-none",
|
|
22
|
+
children: [/* @__PURE__ */ u(s, { className: "mr-1.5 h-3.5 w-3.5" }), _]
|
|
23
|
+
}), /* @__PURE__ */ d(t, { children: [/* @__PURE__ */ u(i, {
|
|
24
|
+
asChild: !0,
|
|
25
|
+
children: /* @__PURE__ */ u(e, {
|
|
26
|
+
variant: "outline",
|
|
27
|
+
size: "sm",
|
|
28
|
+
disabled: v,
|
|
29
|
+
"aria-label": "More save actions",
|
|
30
|
+
"data-testid": `${y}-menu`,
|
|
31
|
+
className: "rounded-l-none border-l-0 px-2",
|
|
32
|
+
children: "▾"
|
|
33
|
+
})
|
|
34
|
+
}), /* @__PURE__ */ d(n, {
|
|
35
|
+
align: "end",
|
|
36
|
+
children: [/* @__PURE__ */ d(r, {
|
|
37
|
+
onSelect: () => void h(),
|
|
38
|
+
"data-testid": `${y}-menu-download`,
|
|
39
|
+
children: [/* @__PURE__ */ u(s, { className: "mr-2 h-3.5 w-3.5" }), "Download"]
|
|
40
|
+
}), /* @__PURE__ */ d(r, {
|
|
41
|
+
onSelect: () => S(!0),
|
|
42
|
+
"data-testid": `${y}-menu-save`,
|
|
43
|
+
children: [/* @__PURE__ */ u(c, { className: "mr-2 h-3.5 w-3.5" }), "Save to Files…"]
|
|
44
|
+
})]
|
|
45
|
+
})] })]
|
|
46
|
+
}), /* @__PURE__ */ u(a, {
|
|
47
|
+
open: x,
|
|
48
|
+
onOpenChange: S,
|
|
49
|
+
source: p,
|
|
50
|
+
defaultFolderPath: m,
|
|
51
|
+
filename: C,
|
|
52
|
+
onSaved: g
|
|
53
|
+
})] });
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { p as SaveToFilesButton };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SaveToFilesSource } from './SaveToFilesButton';
|
|
2
|
+
import { SavedFile } from './useSaveToFiles';
|
|
3
|
+
interface Props {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
source: SaveToFilesSource;
|
|
7
|
+
defaultFolderPath?: string;
|
|
8
|
+
filename: string;
|
|
9
|
+
onSaved?: (file: SavedFile) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function SaveToFilesDialog({ open, onOpenChange, source, defaultFolderPath, filename, onSaved }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=SaveToFilesDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveToFilesDialog.d.ts","sourceRoot":"","sources":["../../src/storage/SaveToFilesDialog.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElE,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,2CAqF5G"}
|