@declarion/react 0.54.0 → 0.54.1
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-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-Djc7QDzR.js} +32 -32
- package/dist-lib/{Grid--QAEby8k.js → Grid-Bd2r0_4J.js} +45 -45
- package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-V6nf9aa_.js} +716 -714
- package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-Cdsvu0Vs.js} +29 -29
- package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CZo5ZgM7.js} +1 -1
- package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CJm3vz9p.js} +40 -40
- package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-DoIjCzjQ.js} +492 -492
- package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-DnM8e14t.js} +743 -742
- package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-BmHGYbD9.js} +128 -128
- package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-CA53NerB.js} +1 -1
- package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-JcUrLFaW.js} +177 -177
- package/dist-lib/api/events.d.ts +13 -4
- package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-Q2kwqv8V.js} +19 -19
- package/dist-lib/components/pages/list/ListToolbar.d.ts +5 -3
- package/dist-lib/components/pages/list/useListQuery.d.ts +1 -5
- package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-ssZvtr8J.js} +268 -397
- package/dist-lib/{format-count-B5SLlNOb.js → format-count-DHuivNT7.js} +236 -236
- package/dist-lib/hooks/useEntityData.d.ts +7 -0
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
- package/dist-lib/hooks/useSSE.d.ts +0 -1
- package/dist-lib/index.js +806 -806
- package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
- package/dist-lib/lib/realtime-reconcile.d.ts +0 -9
- package/dist-lib/lib/realtime-resync.d.ts +23 -0
- package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-lm9ViVLA.js} +17 -17
- package/dist-lib/{registry-D0RhCnEL.js → registry-DsQFhEAD.js} +511 -511
- package/dist-lib/stores/realtime.d.ts +86 -19
- package/dist-lib/testing.js +40 -40
- package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-aHx9HH1m.js} +2472 -1963
- package/dist-lib/useListQuery-DZn2BAxY.js +96 -0
- package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CAqKmUKg.js} +25 -25
- package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-DYW9WoK7.js} +10 -10
- package/dist-lib/{value-CQzGOI0F.js → value-CzKQPJOp.js} +4 -4
- package/package.json +4 -4
- package/dist-lib/useListQuery-C2nq58YV.js +0 -90
package/dist-lib/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as e, r as t, s as n, t as r } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
-
import { $ as i, $n as a,
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { A as
|
|
8
|
-
import { C as Xn, S as Zn, _ as Qn, a as $n, b as er, c as tr, g as nr, i as rr, n as ir, o as ar, r as or, s as sr, t as cr, v as lr, x as ur, y as dr } from "./action-dispatch-
|
|
9
|
-
import { a as fr, c as pr, d as mr, f as hr, i as gr, l as _r, m as vr, n as yr, o as br, p as xr, r as Sr, s as Cr, t as wr, u as Tr } from "./format-count-
|
|
10
|
-
import { n as Er, r as Dr, t as Or } from "./useProperties-
|
|
11
|
-
import { a as kr, d as Ar, f as jr, h as Mr, o as Nr, p as Pr, r as Fr, s as Ir, t as Lr } from "./useTabSearchMirror-
|
|
2
|
+
import { $ as i, $n as a, A as o, Ar as s, At as c, Bn as l, Br as u, Bt as d, C as f, Cn as p, Cr as m, Dn as h, Dr as g, Dt as _, E as v, En as y, Er as b, Fr as x, Gt as S, Hn as C, In as w, Ir as T, It as E, Jn as D, Jt as O, Kn as ee, Kt as te, Ln as k, Lr as A, Lt as ne, M as j, Mn as re, Mr as M, Mt as ie, N as ae, Nn as oe, Nr as se, Nt as ce, On as le, Or as N, Ot as ue, Pn as de, Pr as fe, Q as pe, Qn as me, Qt as he, Rn as ge, Rr as _e, Rt as ve, S as ye, Sn as be, Sr as xe, T as Se, Tn as Ce, Tr as we, Un as Te, Ut as Ee, V as De, Vn as Oe, Vr as P, Vt as ke, Wt as Ae, Xt as je, Yt as Me, Z as Ne, _n as Pe, _r as F, _t as Fe, an as Ie, ar as Le, at as Re, b as ze, bn as Be, br as Ve, bt as He, c as Ue, cr as We, ct as Ge, d as Ke, dn as I, en as qe, et as Je, f as Ye, fn as Xe, gn as Ze, gr as Qe, gt as $e, hn as et, hr as tt, ht as nt, i as rt, ir as it, it as at, j as ot, jr as st, jt as L, k as ct, kn as lt, kr as R, kt as ut, l as dt, ln as ft, lt as pt, mn as mt, mr as ht, n as gt, nn as _t, nr as z, o as vt, or as yt, ot as bt, pn as xt, q as St, qn as Ct, qt as wt, r as Tt, rn as Et, rr as Dt, rt as Ot, s as kt, st as At, t as jt, tr as Mt, tt as Nt, u as Pt, un as B, ut as Ft, vn as It, vr as Lt, w as Rt, wr as zt, x as Bt, xn as Vt, xr as Ht, xt as Ut, yn as Wt, yr as Gt, yt as Kt, zn as qt, zr as V } from "./useCurrentScreen-aHx9HH1m.js";
|
|
3
|
+
import { _ as Jt, a as Yt, c as Xt, d as Zt, f as Qt, g as $t, h as en, i as tn, l as nn, m as rn, n as an, o as on, p as sn, r as cn, s as ln, t as un, u as dn } from "./RefreshControl-CJm3vz9p.js";
|
|
4
|
+
import { a as fn, d as pn, f as mn, i as hn, n as gn, o as _n, r as vn, s as yn, t as bn, u as xn } from "./registry-DsQFhEAD.js";
|
|
5
|
+
import { t as Sn } from "./RecordIdBadge-CGxPR-8q.js";
|
|
6
|
+
import { t as Cn } from "./Check-DAfMbQIw.js";
|
|
7
|
+
import { A as wn, D as Tn, E as En, M as H, N as Dn, O as On, P as U, S as kn, T as W, _ as An, a as jn, b as Mn, d as Nn, g as Pn, h as Fn, i as In, j as Ln, k as Rn, l as zn, m as Bn, n as Vn, o as Hn, p as Un, r as Wn, s as Gn, t as Kn, u as qn, v as Jn, w as Yn } from "./field-classification-ssZvtr8J.js";
|
|
8
|
+
import { C as Xn, S as Zn, _ as Qn, a as $n, b as er, c as tr, g as nr, i as rr, n as ir, o as ar, r as or, s as sr, t as cr, v as lr, x as ur, y as dr } from "./action-dispatch-JcUrLFaW.js";
|
|
9
|
+
import { a as fr, c as pr, d as mr, f as hr, i as gr, l as _r, m as vr, n as yr, o as br, p as xr, r as Sr, s as Cr, t as wr, u as Tr } from "./format-count-DHuivNT7.js";
|
|
10
|
+
import { n as Er, r as Dr, t as Or } from "./useProperties-CAqKmUKg.js";
|
|
11
|
+
import { a as kr, d as Ar, f as jr, h as Mr, o as Nr, p as Pr, r as Fr, s as Ir, t as Lr } from "./useTabSearchMirror-DYW9WoK7.js";
|
|
12
12
|
import { Fragment as Rr, Suspense as zr, createElement as Br, lazy as Vr, useCallback as G, useEffect as K, useMemo as q, useRef as J, useState as Y } from "react";
|
|
13
13
|
import { BrowserRouter as Hr, Link as Ur, Navigate as Wr, Outlet as Gr, Route as X, Routes as Kr, useLocation as qr, useLocation as Jr, useNavigate as Yr, useNavigate as Xr, useNavigationType as Zr, useParams as Qr, useSearchParams as $r, useSearchParams as ei } from "react-router";
|
|
14
14
|
import { QueryClient as ti, QueryClientProvider as ni, useMutation as ri, useQuery as ii, useQueryClient as ai } from "@tanstack/react-query";
|
|
@@ -54,7 +54,7 @@ function ci({ size: e = 24, className: t, title: n }) {
|
|
|
54
54
|
//#region src/components/primitives/RowField.tsx
|
|
55
55
|
var li = 380;
|
|
56
56
|
function ui({ label: e, children: t, wide: n, editing: r, required: i }) {
|
|
57
|
-
let a =
|
|
57
|
+
let a = M(), o = n || a.width < li, s = o ? "auto" : a.isPhone ? 104 : 140;
|
|
58
58
|
return /* @__PURE__ */ $("div", {
|
|
59
59
|
style: {
|
|
60
60
|
display: "flex",
|
|
@@ -101,11 +101,11 @@ function fi(e) {
|
|
|
101
101
|
return !e || e.length === 0 ? [] : e.map((e) => ({
|
|
102
102
|
id: e.code,
|
|
103
103
|
icon: e.icon || void 0,
|
|
104
|
-
label:
|
|
104
|
+
label: z(e.name) || e.code
|
|
105
105
|
}));
|
|
106
106
|
}
|
|
107
107
|
function pi({ activeArea: e, onPick: t, onToggleAI: r, aiOpen: i, onCmdK: a, areas: o, branding: s }) {
|
|
108
|
-
let c = fi(o), l = s?.app_name ?? "", u =
|
|
108
|
+
let c = fi(o), l = s?.app_name ?? "", u = sn(s?.app_logo) ? s?.app_logo : void 0;
|
|
109
109
|
return /* @__PURE__ */ $("div", {
|
|
110
110
|
style: {
|
|
111
111
|
gridArea: "rail",
|
|
@@ -176,7 +176,7 @@ function pi({ activeArea: e, onPick: t, onToggleAI: r, aiOpen: i, onCmdK: a, are
|
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
function mi({ item: e, active: t, onPick: n }) {
|
|
179
|
-
let [i, a] = Y(!1), o = J(null), s =
|
|
179
|
+
let [i, a] = Y(!1), o = J(null), s = $t(o, e.label), c = t ? "var(--rail-active)" : i ? "var(--rail-hover)" : "transparent", l = t || i ? "var(--rail-fg)" : "var(--rail-muted)";
|
|
180
180
|
return /* @__PURE__ */ $("button", {
|
|
181
181
|
ref: o,
|
|
182
182
|
onClick: () => n(e.id),
|
|
@@ -238,7 +238,7 @@ function hi(e) {
|
|
|
238
238
|
//#endregion
|
|
239
239
|
//#region src/components/primitives/BrandLogo.tsx
|
|
240
240
|
function gi({ appLogo: e, size: t, radius: n, fallback: r }) {
|
|
241
|
-
if (!
|
|
241
|
+
if (!sn(e)) return r ? /* @__PURE__ */ Q(Z, { children: r }) : null;
|
|
242
242
|
let i = n ?? (t >= 30 ? 8 : 6);
|
|
243
243
|
return /* @__PURE__ */ Q("img", {
|
|
244
244
|
src: e.trim(),
|
|
@@ -259,7 +259,7 @@ function _i(e) {
|
|
|
259
259
|
...U.getState(),
|
|
260
260
|
colorScheme: e
|
|
261
261
|
};
|
|
262
|
-
|
|
262
|
+
Dn(t), U.setState({ colorScheme: e });
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/embed/handshake.ts
|
|
@@ -286,13 +286,13 @@ function yi(e, t) {
|
|
|
286
286
|
}
|
|
287
287
|
let { message: i } = r;
|
|
288
288
|
switch (i.type) {
|
|
289
|
-
case
|
|
289
|
+
case w.setToken:
|
|
290
290
|
t.onAuth(i.payload);
|
|
291
291
|
break;
|
|
292
|
-
case
|
|
292
|
+
case w.navigate:
|
|
293
293
|
t.onNavigate(i.payload);
|
|
294
294
|
break;
|
|
295
|
-
case
|
|
295
|
+
case w.setTheme: t.onTheme(i.payload);
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
}
|
|
@@ -300,17 +300,17 @@ function yi(e, t) {
|
|
|
300
300
|
//#region src/embed/EmbedAuthBootstrap.tsx
|
|
301
301
|
var bi = 2e4;
|
|
302
302
|
function xi() {
|
|
303
|
-
let e =
|
|
303
|
+
let e = ke(), t = Xr(), n = Jr(), r = I((e) => e.setUser), [i, a] = Y("pending"), o = J(!1), s = J(n.pathname);
|
|
304
304
|
return s.current = n.pathname, K(() => {
|
|
305
305
|
if (!e.enabled) return;
|
|
306
|
-
|
|
307
|
-
let n =
|
|
308
|
-
|
|
306
|
+
re(e.parentOrigin), Rn.getState().reset();
|
|
307
|
+
let n = y(() => {
|
|
308
|
+
k(e.parentOrigin, w.reloadRequired, { reason: "embed session terminated" });
|
|
309
309
|
}), i = async () => {
|
|
310
310
|
if (!o.current) {
|
|
311
311
|
o.current = !0;
|
|
312
312
|
try {
|
|
313
|
-
let e = await
|
|
313
|
+
let e = await mt();
|
|
314
314
|
r(e, e.tenant ?? void 0), a("authenticated");
|
|
315
315
|
} catch {
|
|
316
316
|
a("error");
|
|
@@ -318,14 +318,14 @@ function xi() {
|
|
|
318
318
|
}
|
|
319
319
|
}, c = e.parentOrigin ? yi(e.parentOrigin, {
|
|
320
320
|
onAuth: (e) => {
|
|
321
|
-
|
|
321
|
+
de(e), o.current || i();
|
|
322
322
|
},
|
|
323
323
|
onNavigate: (n) => {
|
|
324
324
|
let r = () => {
|
|
325
|
-
|
|
325
|
+
Rn.getState().markRoot(), t(e.appendEmbedParams(n.route));
|
|
326
326
|
}, i = n.route.split(/[?#]/)[0];
|
|
327
|
-
if (
|
|
328
|
-
|
|
327
|
+
if (ve.getState().isDirty && i !== s.current) {
|
|
328
|
+
ne.getState().requestNavigation(r);
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
r();
|
|
@@ -334,12 +334,12 @@ function xi() {
|
|
|
334
334
|
_i(e.theme);
|
|
335
335
|
}
|
|
336
336
|
}) : null;
|
|
337
|
-
c && window.addEventListener("message", c),
|
|
337
|
+
c && window.addEventListener("message", c), k(e.parentOrigin, w.ready, {});
|
|
338
338
|
let l = window.setTimeout(() => {
|
|
339
339
|
o.current || a("error");
|
|
340
340
|
}, bi);
|
|
341
341
|
return () => {
|
|
342
|
-
c && window.removeEventListener("message", c), window.clearTimeout(l),
|
|
342
|
+
c && window.removeEventListener("message", c), window.clearTimeout(l), y(n);
|
|
343
343
|
};
|
|
344
344
|
}, [
|
|
345
345
|
e,
|
|
@@ -355,7 +355,7 @@ function xi() {
|
|
|
355
355
|
//#region src/embed/EmbedResizeReporter.tsx
|
|
356
356
|
var Si = "app-embed";
|
|
357
357
|
function Ci() {
|
|
358
|
-
let e =
|
|
358
|
+
let e = ke(), t = e.enabled && e.parentOrigin !== null;
|
|
359
359
|
return K(() => {
|
|
360
360
|
if (!t || typeof window > "u" || typeof ResizeObserver > "u") return;
|
|
361
361
|
let n = document.getElementById(Si);
|
|
@@ -363,7 +363,7 @@ function Ci() {
|
|
|
363
363
|
let r = null, i = -1, a = () => {
|
|
364
364
|
r = null;
|
|
365
365
|
let t = n.scrollHeight;
|
|
366
|
-
t !== i && (i = t,
|
|
366
|
+
t !== i && (i = t, k(e.parentOrigin, w.resized, { height: t }));
|
|
367
367
|
}, o = new ResizeObserver(() => {
|
|
368
368
|
r === null && (r = window.requestAnimationFrame(a));
|
|
369
369
|
});
|
|
@@ -375,9 +375,9 @@ function Ci() {
|
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region src/embed/EmbedDirtyReporter.tsx
|
|
377
377
|
function wi() {
|
|
378
|
-
let e =
|
|
378
|
+
let e = ke(), t = ve((e) => e.isDirty), n = e.enabled && e.parentOrigin !== null;
|
|
379
379
|
return K(() => {
|
|
380
|
-
n &&
|
|
380
|
+
n && k(e.parentOrigin, w.dirtyChanged, { dirty: t });
|
|
381
381
|
}, [
|
|
382
382
|
n,
|
|
383
383
|
t,
|
|
@@ -387,9 +387,9 @@ function wi() {
|
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/embed/EmbedHistoryTracker.tsx
|
|
389
389
|
function Ti() {
|
|
390
|
-
let e =
|
|
390
|
+
let e = ke(), t = Zr(), n = Jr(), r = e.enabled && e.navigationMode === "self", i = J(null);
|
|
391
391
|
return K(() => {
|
|
392
|
-
r && i.current !== n.key && (i.current = n.key,
|
|
392
|
+
r && i.current !== n.key && (i.current = n.key, Rn.getState().applyNavigation(t));
|
|
393
393
|
}, [
|
|
394
394
|
r,
|
|
395
395
|
n.key,
|
|
@@ -407,7 +407,7 @@ function Oi(e) {
|
|
|
407
407
|
return e instanceof HTMLAnchorElement ? e.getAttribute("href") : e.href?.baseVal ?? e.getAttribute("href") ?? e.getAttribute("xlink:href");
|
|
408
408
|
}
|
|
409
409
|
function ki(e, t = window.location) {
|
|
410
|
-
if (e.defaultPrevented ||
|
|
410
|
+
if (e.defaultPrevented || xn(e)) return null;
|
|
411
411
|
let n = Di(e);
|
|
412
412
|
if (!n || n.hasAttribute("data-declarion-native-link")) return null;
|
|
413
413
|
let r = Oi(n);
|
|
@@ -435,7 +435,7 @@ function Ai(e, t = window.location) {
|
|
|
435
435
|
return n.protocol !== "http:" && n.protocol !== "https:" || n.origin !== t.origin ? null : n.pathname + n.search + n.hash;
|
|
436
436
|
}
|
|
437
437
|
function ji() {
|
|
438
|
-
let e =
|
|
438
|
+
let e = On(), t = ke().enabled, n = J(e);
|
|
439
439
|
n.current = e, K(() => {
|
|
440
440
|
let e = (e) => {
|
|
441
441
|
let t = ki(e);
|
|
@@ -454,14 +454,14 @@ function ji() {
|
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/embed/EmbedLocationReporter.tsx
|
|
456
456
|
function Mi() {
|
|
457
|
-
let e =
|
|
457
|
+
let e = ke(), t = Jr(), { data: n } = B(), r = J(null), i = e.enabled && e.navigationMode === "self";
|
|
458
458
|
return K(() => {
|
|
459
459
|
if (!i) return;
|
|
460
460
|
let a = `${t.pathname}${t.search}`;
|
|
461
461
|
if (r.current === a) return;
|
|
462
462
|
r.current = a;
|
|
463
463
|
let o = E(t.pathname, n?.screens);
|
|
464
|
-
|
|
464
|
+
k(e.parentOrigin, w.navigated, o);
|
|
465
465
|
}, [
|
|
466
466
|
i,
|
|
467
467
|
t.pathname,
|
|
@@ -557,7 +557,7 @@ function Ni({ open: e, onOpenChange: t, title: r, description: i, confirmLabel:
|
|
|
557
557
|
children: i
|
|
558
558
|
})]
|
|
559
559
|
}),
|
|
560
|
-
/* @__PURE__ */ Q(
|
|
560
|
+
/* @__PURE__ */ Q(u, {
|
|
561
561
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
562
562
|
onClick: () => t(!1)
|
|
563
563
|
})
|
|
@@ -576,11 +576,11 @@ function Ni({ open: e, onOpenChange: t, title: r, description: i, confirmLabel:
|
|
|
576
576
|
},
|
|
577
577
|
children: [
|
|
578
578
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
579
|
-
/* @__PURE__ */ Q(
|
|
579
|
+
/* @__PURE__ */ Q(P, {
|
|
580
580
|
onClick: () => t(!1),
|
|
581
581
|
children: "Cancel"
|
|
582
582
|
}),
|
|
583
|
-
/* @__PURE__ */ Q(
|
|
583
|
+
/* @__PURE__ */ Q(P, {
|
|
584
584
|
kind: "primary",
|
|
585
585
|
danger: s,
|
|
586
586
|
onClick: () => {
|
|
@@ -595,7 +595,7 @@ function Ni({ open: e, onOpenChange: t, title: r, description: i, confirmLabel:
|
|
|
595
595
|
//#endregion
|
|
596
596
|
//#region src/embed/EmbedUnsavedGuard.tsx
|
|
597
597
|
function Pi() {
|
|
598
|
-
let e =
|
|
598
|
+
let e = ne((e) => e.pendingNavigation), t = ne((e) => e.confirmNavigation), n = ne((e) => e.cancelNavigation);
|
|
599
599
|
return e === null ? null : /* @__PURE__ */ Q(Ni, {
|
|
600
600
|
open: !0,
|
|
601
601
|
onOpenChange: (e) => {
|
|
@@ -613,11 +613,11 @@ function Pi() {
|
|
|
613
613
|
//#endregion
|
|
614
614
|
//#region src/components/layout/Sidebar.tsx
|
|
615
615
|
function Fi({ activeArea: e }) {
|
|
616
|
-
let { data: t } =
|
|
616
|
+
let { data: t } = B(), r = Jr(), i = On(), a = U((e) => e.sidebar), o = U((e) => e.set), s = a === "collapsed", [c, l] = Y({}), u = Zt(), d = u?.app_name ?? "", f = u?.app_logo, p = u?.version_label ?? "", m = q(() => Ii(t?.navigation ?? [], e), [t?.navigation, e]), h = (e) => e ? r.pathname === e || r.pathname.startsWith(e + "/") : !1, g = (e, n) => {
|
|
617
617
|
if (!e.screen) return;
|
|
618
618
|
let r = t?.screens[e.screen];
|
|
619
619
|
r && i(r.route, {
|
|
620
|
-
title:
|
|
620
|
+
title: z(e.name),
|
|
621
621
|
icon: e.icon,
|
|
622
622
|
topLevel: !0
|
|
623
623
|
});
|
|
@@ -700,7 +700,7 @@ function Fi({ activeArea: e }) {
|
|
|
700
700
|
},
|
|
701
701
|
children: e.title
|
|
702
702
|
}), e.items.map((e, r) => {
|
|
703
|
-
let a = `${n}-${r}-${e.screen ||
|
|
703
|
+
let a = `${n}-${r}-${e.screen || z(e.name)}`, o = e.screen ? t?.screens[e.screen] : void 0, u = h(o?.route), d = !!(e.children && e.children.length > 0), f = !!c[a];
|
|
704
704
|
return /* @__PURE__ */ Q(Ri, {
|
|
705
705
|
item: e,
|
|
706
706
|
href: o?.route,
|
|
@@ -717,7 +717,7 @@ function Fi({ activeArea: e }) {
|
|
|
717
717
|
onPickChild: (e) => {
|
|
718
718
|
let n = e.screen ? t?.screens[e.screen] : void 0;
|
|
719
719
|
n && i(n.route, {
|
|
720
|
-
title:
|
|
720
|
+
title: z(e.name),
|
|
721
721
|
icon: e.icon,
|
|
722
722
|
topLevel: !0
|
|
723
723
|
});
|
|
@@ -758,7 +758,7 @@ function Fi({ activeArea: e }) {
|
|
|
758
758
|
color: "var(--text-3)"
|
|
759
759
|
},
|
|
760
760
|
children: "Docs · API · Help"
|
|
761
|
-
}), /* @__PURE__ */ Q(
|
|
761
|
+
}), /* @__PURE__ */ Q(_e, { children: "?" })] })]
|
|
762
762
|
})
|
|
763
763
|
]
|
|
764
764
|
});
|
|
@@ -768,7 +768,7 @@ function Ii(e, t) {
|
|
|
768
768
|
for (let r of e) if (Li(r, t)) {
|
|
769
769
|
if (r.items && r.items.length > 0) {
|
|
770
770
|
n.push({
|
|
771
|
-
title:
|
|
771
|
+
title: z(r.name) || "",
|
|
772
772
|
items: r.items
|
|
773
773
|
});
|
|
774
774
|
continue;
|
|
@@ -787,7 +787,7 @@ function Li(e, t) {
|
|
|
787
787
|
return (e.area || "default") === t;
|
|
788
788
|
}
|
|
789
789
|
function Ri({ item: e, href: t, collapsed: i, active: a, hasKids: o, expanded: s, onToggleExpand: c, onPick: l, onPickChild: u, resolveChild: d }) {
|
|
790
|
-
let [f, p] = Y(!1), m = !!e.icon, h =
|
|
790
|
+
let [f, p] = Y(!1), m = !!e.icon, h = z(e.name) || e.screen || "";
|
|
791
791
|
if (i) {
|
|
792
792
|
let n = {
|
|
793
793
|
width: 40,
|
|
@@ -807,7 +807,7 @@ function Ri({ item: e, href: t, collapsed: i, active: a, hasKids: o, expanded: s
|
|
|
807
807
|
href: t,
|
|
808
808
|
"data-declarion-native-link": "",
|
|
809
809
|
onClick: (e) => {
|
|
810
|
-
|
|
810
|
+
xn(e) || (e.preventDefault(), l());
|
|
811
811
|
},
|
|
812
812
|
title: h,
|
|
813
813
|
onMouseEnter: () => p(!0),
|
|
@@ -890,7 +890,7 @@ function Ri({ item: e, href: t, collapsed: i, active: a, hasKids: o, expanded: s
|
|
|
890
890
|
href: t,
|
|
891
891
|
"data-declarion-native-link": "",
|
|
892
892
|
onClick: (e) => {
|
|
893
|
-
|
|
893
|
+
xn(e) || (e.preventDefault(), l());
|
|
894
894
|
},
|
|
895
895
|
onMouseEnter: () => p(!0),
|
|
896
896
|
onMouseLeave: () => p(!1),
|
|
@@ -913,7 +913,7 @@ function Ri({ item: e, href: t, collapsed: i, active: a, hasKids: o, expanded: s
|
|
|
913
913
|
children: (e.children || []).map((e, t) => {
|
|
914
914
|
let n = d(e), r = e.screen || `${t}`;
|
|
915
915
|
return /* @__PURE__ */ Q(zi, {
|
|
916
|
-
label:
|
|
916
|
+
label: z(e.name) || e.screen || "",
|
|
917
917
|
href: n?.route,
|
|
918
918
|
enabled: !!n,
|
|
919
919
|
onPick: () => u(e)
|
|
@@ -939,7 +939,7 @@ function zi({ label: e, href: t, enabled: n, onPick: r }) {
|
|
|
939
939
|
href: t,
|
|
940
940
|
"data-declarion-native-link": "",
|
|
941
941
|
onClick: (e) => {
|
|
942
|
-
|
|
942
|
+
xn(e) || (e.preventDefault(), r());
|
|
943
943
|
},
|
|
944
944
|
onMouseEnter: () => a(!0),
|
|
945
945
|
onMouseLeave: () => a(!1),
|
|
@@ -956,27 +956,27 @@ function zi({ label: e, href: t, enabled: n, onPick: r }) {
|
|
|
956
956
|
//#endregion
|
|
957
957
|
//#region src/hooks/useAuth.ts
|
|
958
958
|
function Bi() {
|
|
959
|
-
let { user: e, isAuthenticated: t, isLoading: n, activeTenant: r, tenants: i, setUser: a, setTenants: o, logout: s } =
|
|
960
|
-
mutationFn: ({ email: e, password: t, remember: n }) =>
|
|
959
|
+
let { user: e, isAuthenticated: t, isLoading: n, activeTenant: r, tenants: i, setUser: a, setTenants: o, logout: s } = I(), c = Xr(), l = ai(), u = ri({
|
|
960
|
+
mutationFn: ({ email: e, password: t, remember: n }) => Be(e, t, n ?? !0),
|
|
961
961
|
onSuccess: (e) => {
|
|
962
|
-
a(e.user, e.tenant), l.invalidateQueries({ queryKey: ["schema"] }),
|
|
962
|
+
a(e.user, e.tenant), l.invalidateQueries({ queryKey: ["schema"] }), Wt().then(o).catch(() => {});
|
|
963
963
|
}
|
|
964
964
|
}), d = ri({
|
|
965
|
-
mutationFn: ({ email: e, password: t, displayName: n }) =>
|
|
965
|
+
mutationFn: ({ email: e, password: t, displayName: n }) => Vt(e, t, n),
|
|
966
966
|
onSuccess: (e) => {
|
|
967
|
-
a(e.user, e.tenant), l.invalidateQueries({ queryKey: ["schema"] }),
|
|
967
|
+
a(e.user, e.tenant), l.invalidateQueries({ queryKey: ["schema"] }), Wt().then(o).catch(() => {});
|
|
968
968
|
},
|
|
969
969
|
onError: (e) => {
|
|
970
|
-
|
|
970
|
+
L.error(e.message);
|
|
971
971
|
}
|
|
972
972
|
}), f = ri({
|
|
973
|
-
mutationFn: (e) =>
|
|
973
|
+
mutationFn: (e) => p(e),
|
|
974
974
|
onSuccess: (e) => {
|
|
975
|
-
let t = e.tenant?.id, n = e.user?.id, r = t && n &&
|
|
975
|
+
let t = e.tenant?.id, n = e.user?.id, r = t && n && wn(t, n) || "/";
|
|
976
976
|
window.location.assign(r);
|
|
977
977
|
},
|
|
978
978
|
onError: (e) => {
|
|
979
|
-
|
|
979
|
+
L.error(e.message);
|
|
980
980
|
}
|
|
981
981
|
});
|
|
982
982
|
return {
|
|
@@ -989,7 +989,7 @@ function Bi() {
|
|
|
989
989
|
signup: d.mutate,
|
|
990
990
|
switchTenant: f.mutate,
|
|
991
991
|
logout: async () => {
|
|
992
|
-
await s(), l.clear(),
|
|
992
|
+
await s(), l.clear(), Tn.getState().clear(), c("/login");
|
|
993
993
|
},
|
|
994
994
|
isLoginPending: u.isPending,
|
|
995
995
|
isSignupPending: d.isPending,
|
|
@@ -999,24 +999,24 @@ function Bi() {
|
|
|
999
999
|
//#endregion
|
|
1000
1000
|
//#region src/hooks/useImpersonation.ts
|
|
1001
1001
|
function Vi() {
|
|
1002
|
-
let e =
|
|
1003
|
-
mutationFn: ({ targetUserId: e, reason: t, durationMinutes: n }) =>
|
|
1002
|
+
let e = I((e) => e.user), t = I((e) => e.initialize), n = ai(), r = e?.impersonation ?? null, i = !!r, a = ri({
|
|
1003
|
+
mutationFn: ({ targetUserId: e, reason: t, durationMinutes: n }) => Ze(e, t, n),
|
|
1004
1004
|
onSuccess: async () => {
|
|
1005
|
-
await t(), n.invalidateQueries(),
|
|
1005
|
+
await t(), n.invalidateQueries(), L.success("Impersonation session started.");
|
|
1006
1006
|
},
|
|
1007
|
-
onError: (e) =>
|
|
1007
|
+
onError: (e) => L.error(e.message)
|
|
1008
1008
|
}), o = ri({
|
|
1009
|
-
mutationFn: () =>
|
|
1009
|
+
mutationFn: () => Pe(),
|
|
1010
1010
|
onSuccess: async () => {
|
|
1011
|
-
await t(), n.invalidateQueries(),
|
|
1011
|
+
await t(), n.invalidateQueries(), L.success("Returned to your own session.");
|
|
1012
1012
|
},
|
|
1013
|
-
onError: (e) =>
|
|
1013
|
+
onError: (e) => L.error(e.message)
|
|
1014
1014
|
}), s = ri({
|
|
1015
|
-
mutationFn: (e) =>
|
|
1015
|
+
mutationFn: (e) => et(e),
|
|
1016
1016
|
onSuccess: () => {
|
|
1017
|
-
|
|
1017
|
+
L.success("Session revoked."), n.invalidateQueries({ queryKey: ["impersonation_session"] });
|
|
1018
1018
|
},
|
|
1019
|
-
onError: (e) =>
|
|
1019
|
+
onError: (e) => L.error(e.message)
|
|
1020
1020
|
});
|
|
1021
1021
|
return {
|
|
1022
1022
|
info: r,
|
|
@@ -1138,7 +1138,7 @@ function qi({ tenant: e, tenants: t, onSwitch: r, busy: i, compact: a, locked: o
|
|
|
1138
1138
|
}
|
|
1139
1139
|
})
|
|
1140
1140
|
]
|
|
1141
|
-
}), /* @__PURE__ */ $(
|
|
1141
|
+
}), /* @__PURE__ */ $(A, {
|
|
1142
1142
|
open: c,
|
|
1143
1143
|
anchor: f.current,
|
|
1144
1144
|
onClose: () => l(!1),
|
|
@@ -1455,11 +1455,11 @@ function Zi({ crumb: e, last: t, clickable: r, onClick: i }) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
//#endregion
|
|
1457
1457
|
//#region src/components/layout/TopBar.tsx
|
|
1458
|
-
function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, showNavButton: a, onOpenTabs: o, tabsButtonRef: s, showTabsButton: c, mobileTabCount: l = 0, onCmdK:
|
|
1459
|
-
let
|
|
1460
|
-
ee("colorScheme",
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1458
|
+
function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, showNavButton: a, onOpenTabs: o, tabsButtonRef: s, showTabsButton: c, mobileTabCount: l = 0, onCmdK: d, onToggleAI: f, aiOpen: p, onOpenProfile: m, onOpenPrefs: h, showTenantSwitcher: g = !0, showBreadcrumbs: _ = !0, showThemeToggle: v = !0 } = {}) {
|
|
1459
|
+
let y = I((e) => e.user), b = M(), { activeTenant: x, tenants: S, switchTenant: C, isSwitchingTenant: w, logout: T } = Bi(), { isImpersonating: E, stop: D } = Vi(), O = U((e) => e.colorScheme), ee = U((e) => e.set), [te, k] = Y(!1), ne = J(null), j = x?.env, re = Ki(j), ie = y?.email ?? "", ae = y?.display_name || ie || "User", oe = a && b.category === "phone", se = a && b.category !== "desktop", ce = () => {
|
|
1460
|
+
ee("colorScheme", O === "dark" ? "light" : "dark");
|
|
1461
|
+
}, le = (e) => {
|
|
1462
|
+
x?.id !== e.id && (H.getState().tabs.some((e) => e.dirty) && !window.confirm("You have unsaved changes in one or more tabs. Switching tenant will discard them. Continue?") || C(e.id));
|
|
1463
1463
|
};
|
|
1464
1464
|
return /* @__PURE__ */ $("header", {
|
|
1465
1465
|
style: {
|
|
@@ -1476,7 +1476,7 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1476
1476
|
overflow: "hidden"
|
|
1477
1477
|
},
|
|
1478
1478
|
children: [
|
|
1479
|
-
|
|
1479
|
+
j === "production" && /* @__PURE__ */ Q("span", { style: {
|
|
1480
1480
|
position: "absolute",
|
|
1481
1481
|
left: 0,
|
|
1482
1482
|
right: 0,
|
|
@@ -1486,7 +1486,7 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1486
1486
|
opacity: .35,
|
|
1487
1487
|
pointerEvents: "none"
|
|
1488
1488
|
} }),
|
|
1489
|
-
a && /* @__PURE__ */ Q(
|
|
1489
|
+
a && /* @__PURE__ */ Q(u, {
|
|
1490
1490
|
ref: i,
|
|
1491
1491
|
icon: /* @__PURE__ */ Q(n.menu, { size: 16 }),
|
|
1492
1492
|
title: "Open navigation",
|
|
@@ -1499,16 +1499,16 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1499
1499
|
flex: oe ? "1 1 auto" : "0 0 auto"
|
|
1500
1500
|
},
|
|
1501
1501
|
children: /* @__PURE__ */ Q(qi, {
|
|
1502
|
-
tenant:
|
|
1503
|
-
tenants:
|
|
1504
|
-
onSwitch:
|
|
1505
|
-
busy:
|
|
1502
|
+
tenant: x,
|
|
1503
|
+
tenants: S,
|
|
1504
|
+
onSwitch: le,
|
|
1505
|
+
busy: w,
|
|
1506
1506
|
compact: se,
|
|
1507
|
-
locked:
|
|
1508
|
-
lockedReason:
|
|
1507
|
+
locked: E,
|
|
1508
|
+
lockedReason: E ? "Exit impersonation to switch tenants" : void 0
|
|
1509
1509
|
})
|
|
1510
1510
|
}),
|
|
1511
|
-
|
|
1511
|
+
E && /* @__PURE__ */ $("span", {
|
|
1512
1512
|
"data-testid": "impersonation-chip",
|
|
1513
1513
|
style: {
|
|
1514
1514
|
display: "inline-flex",
|
|
@@ -1537,19 +1537,19 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1537
1537
|
onCrumbClick: t
|
|
1538
1538
|
})] }),
|
|
1539
1539
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
1540
|
-
c && /* @__PURE__ */ Q(
|
|
1540
|
+
c && /* @__PURE__ */ Q(u, {
|
|
1541
1541
|
ref: s,
|
|
1542
1542
|
icon: /* @__PURE__ */ Q(n.layers, { size: 15 }),
|
|
1543
1543
|
title: `Open tabs (${l})`,
|
|
1544
1544
|
onClick: o
|
|
1545
1545
|
}),
|
|
1546
|
-
oe ? /* @__PURE__ */ Q(
|
|
1546
|
+
oe ? /* @__PURE__ */ Q(u, {
|
|
1547
1547
|
icon: /* @__PURE__ */ Q(n.search, { size: 15 }),
|
|
1548
1548
|
title: "Search or run command",
|
|
1549
|
-
onClick:
|
|
1549
|
+
onClick: d
|
|
1550
1550
|
}) : /* @__PURE__ */ $(Z, { children: [
|
|
1551
1551
|
/* @__PURE__ */ $("button", {
|
|
1552
|
-
onClick:
|
|
1552
|
+
onClick: d,
|
|
1553
1553
|
style: {
|
|
1554
1554
|
display: "flex",
|
|
1555
1555
|
alignItems: "center",
|
|
@@ -1573,23 +1573,23 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1573
1573
|
},
|
|
1574
1574
|
children: "Search or run command…"
|
|
1575
1575
|
}),
|
|
1576
|
-
/* @__PURE__ */ Q(
|
|
1576
|
+
/* @__PURE__ */ Q(_e, { children: "⌘K" })
|
|
1577
1577
|
]
|
|
1578
1578
|
}),
|
|
1579
|
-
/* @__PURE__ */ Q(
|
|
1579
|
+
/* @__PURE__ */ Q(u, {
|
|
1580
1580
|
icon: /* @__PURE__ */ Q(n.bell, { size: 15 }),
|
|
1581
1581
|
title: "Notifications"
|
|
1582
1582
|
}),
|
|
1583
|
-
|
|
1584
|
-
icon: Q(
|
|
1583
|
+
v && /* @__PURE__ */ Q(u, {
|
|
1584
|
+
icon: Q(O === "dark" ? n.sun : n.moon, { size: 15 }),
|
|
1585
1585
|
title: "Theme",
|
|
1586
1586
|
onClick: ce
|
|
1587
1587
|
}),
|
|
1588
|
-
/* @__PURE__ */ Q(
|
|
1588
|
+
/* @__PURE__ */ Q(u, {
|
|
1589
1589
|
icon: /* @__PURE__ */ Q(n.sparkle, { size: 15 }),
|
|
1590
1590
|
title: "AI Assistant",
|
|
1591
|
-
onClick:
|
|
1592
|
-
active:
|
|
1591
|
+
onClick: f,
|
|
1592
|
+
active: p
|
|
1593
1593
|
}),
|
|
1594
1594
|
/* @__PURE__ */ Q("div", { style: {
|
|
1595
1595
|
width: 1,
|
|
@@ -1601,8 +1601,8 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1601
1601
|
/* @__PURE__ */ $("div", {
|
|
1602
1602
|
style: { position: "relative" },
|
|
1603
1603
|
children: [/* @__PURE__ */ $("button", {
|
|
1604
|
-
ref:
|
|
1605
|
-
onClick: () =>
|
|
1604
|
+
ref: ne,
|
|
1605
|
+
onClick: () => k((e) => !e),
|
|
1606
1606
|
style: {
|
|
1607
1607
|
display: "flex",
|
|
1608
1608
|
alignItems: "center",
|
|
@@ -1613,7 +1613,7 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1613
1613
|
border: 0,
|
|
1614
1614
|
cursor: "pointer"
|
|
1615
1615
|
},
|
|
1616
|
-
children: [/* @__PURE__ */ Q(
|
|
1616
|
+
children: [/* @__PURE__ */ Q(Jt, {
|
|
1617
1617
|
name: ae,
|
|
1618
1618
|
size: 22
|
|
1619
1619
|
}), !se && /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q("span", {
|
|
@@ -1626,10 +1626,10 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1626
1626
|
size: 11,
|
|
1627
1627
|
style: { color: "var(--text-3)" }
|
|
1628
1628
|
})] })]
|
|
1629
|
-
}), /* @__PURE__ */ $(
|
|
1629
|
+
}), /* @__PURE__ */ $(A, {
|
|
1630
1630
|
open: te,
|
|
1631
|
-
anchor:
|
|
1632
|
-
onClose: () =>
|
|
1631
|
+
anchor: ne.current,
|
|
1632
|
+
onClose: () => k(!1),
|
|
1633
1633
|
width: 220,
|
|
1634
1634
|
align: "end",
|
|
1635
1635
|
children: [
|
|
@@ -1644,7 +1644,7 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1644
1644
|
gap: 8,
|
|
1645
1645
|
alignItems: "center"
|
|
1646
1646
|
},
|
|
1647
|
-
children: [/* @__PURE__ */ Q(
|
|
1647
|
+
children: [/* @__PURE__ */ Q(Jt, {
|
|
1648
1648
|
name: ae,
|
|
1649
1649
|
size: 28
|
|
1650
1650
|
}), /* @__PURE__ */ $("div", {
|
|
@@ -1667,58 +1667,58 @@ function Qi({ breadcrumbs: e, onCrumbClick: t, onOpenNav: r, navButtonRef: i, sh
|
|
|
1667
1667
|
children: ie
|
|
1668
1668
|
})]
|
|
1669
1669
|
})]
|
|
1670
|
-
}),
|
|
1670
|
+
}), x && /* @__PURE__ */ $("div", {
|
|
1671
1671
|
style: {
|
|
1672
1672
|
marginTop: 8,
|
|
1673
1673
|
display: "flex",
|
|
1674
1674
|
gap: 4,
|
|
1675
1675
|
flexWrap: "wrap"
|
|
1676
1676
|
},
|
|
1677
|
-
children: [/* @__PURE__ */ Q(
|
|
1677
|
+
children: [/* @__PURE__ */ Q(V, {
|
|
1678
1678
|
tone: "violet",
|
|
1679
1679
|
size: "xs",
|
|
1680
1680
|
dot: !0,
|
|
1681
|
-
children:
|
|
1682
|
-
}), /* @__PURE__ */ $(
|
|
1681
|
+
children: x.role
|
|
1682
|
+
}), /* @__PURE__ */ $(V, {
|
|
1683
1683
|
tone: "slate",
|
|
1684
1684
|
size: "xs",
|
|
1685
|
-
children: [
|
|
1685
|
+
children: [x.name, j ? ` · ${j}` : ""]
|
|
1686
1686
|
})]
|
|
1687
1687
|
})]
|
|
1688
1688
|
}),
|
|
1689
|
-
|
|
1689
|
+
E && /* @__PURE__ */ Q(R, {
|
|
1690
1690
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
1691
1691
|
onClick: () => {
|
|
1692
|
-
|
|
1692
|
+
k(!1), D();
|
|
1693
1693
|
},
|
|
1694
1694
|
"data-testid": "exit-impersonation-menu-item",
|
|
1695
1695
|
children: "Exit impersonation"
|
|
1696
1696
|
}),
|
|
1697
|
-
/* @__PURE__ */ Q(
|
|
1697
|
+
/* @__PURE__ */ Q(R, {
|
|
1698
1698
|
icon: /* @__PURE__ */ Q(n.users, { size: 13 }),
|
|
1699
1699
|
onClick: () => {
|
|
1700
|
-
|
|
1700
|
+
k(!1), m?.();
|
|
1701
1701
|
},
|
|
1702
1702
|
children: "My profile"
|
|
1703
1703
|
}),
|
|
1704
|
-
/* @__PURE__ */ Q(
|
|
1704
|
+
/* @__PURE__ */ Q(R, {
|
|
1705
1705
|
icon: /* @__PURE__ */ Q(n.settings, { size: 13 }),
|
|
1706
1706
|
onClick: () => {
|
|
1707
|
-
|
|
1707
|
+
k(!1), h?.();
|
|
1708
1708
|
},
|
|
1709
1709
|
children: "Preferences"
|
|
1710
1710
|
}),
|
|
1711
|
-
|
|
1711
|
+
v && /* @__PURE__ */ Q(R, {
|
|
1712
1712
|
icon: /* @__PURE__ */ Q(n.moon, { size: 13 }),
|
|
1713
1713
|
onClick: ce,
|
|
1714
1714
|
children: "Toggle theme"
|
|
1715
1715
|
}),
|
|
1716
|
-
/* @__PURE__ */ Q(
|
|
1717
|
-
/* @__PURE__ */ Q(
|
|
1716
|
+
/* @__PURE__ */ Q(R, { divider: !0 }),
|
|
1717
|
+
/* @__PURE__ */ Q(R, {
|
|
1718
1718
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
1719
1719
|
danger: !0,
|
|
1720
1720
|
onClick: () => {
|
|
1721
|
-
|
|
1721
|
+
k(!1), T();
|
|
1722
1722
|
},
|
|
1723
1723
|
children: "Sign out"
|
|
1724
1724
|
})
|
|
@@ -1792,7 +1792,7 @@ function $i({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
1792
1792
|
e ? e() : i("/");
|
|
1793
1793
|
}, [e, i]);
|
|
1794
1794
|
if (d.length === 0) return null;
|
|
1795
|
-
let x = g >= 0 && d.length > 1 && d[g]?.closable !== !1, S =
|
|
1795
|
+
let x = g >= 0 && d.length > 1 && d[g]?.closable !== !1, S = Ln(d, f, "others").length > 0, C = Ln(d, f, "right").length > 0, w = d.length >= p ? "danger" : d.length >= Math.ceil(p * .8) ? "warning" : "normal", T = w === "danger" ? "var(--danger)" : w === "warning" ? "var(--warn)" : "var(--text-3)";
|
|
1796
1796
|
return /* @__PURE__ */ $("div", {
|
|
1797
1797
|
style: {
|
|
1798
1798
|
display: "flex",
|
|
@@ -1997,36 +1997,36 @@ function $i({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
1997
1997
|
});
|
|
1998
1998
|
}
|
|
1999
1999
|
function ea({ open: e, anchor: t, onClose: r, canCloseCurrent: i, canCloseOthers: a, canCloseRight: o, onAction: s }) {
|
|
2000
|
-
return /* @__PURE__ */ $(
|
|
2000
|
+
return /* @__PURE__ */ $(A, {
|
|
2001
2001
|
open: e,
|
|
2002
2002
|
onClose: r,
|
|
2003
2003
|
anchor: t,
|
|
2004
2004
|
align: "end",
|
|
2005
2005
|
width: 230,
|
|
2006
2006
|
children: [
|
|
2007
|
-
/* @__PURE__ */ Q(
|
|
2007
|
+
/* @__PURE__ */ Q(R, {
|
|
2008
2008
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
2009
2009
|
disabled: !i,
|
|
2010
2010
|
title: i ? void 0 : "No current tab can be closed",
|
|
2011
2011
|
onClick: () => s("current"),
|
|
2012
2012
|
children: "Close current tab"
|
|
2013
2013
|
}),
|
|
2014
|
-
/* @__PURE__ */ Q(
|
|
2014
|
+
/* @__PURE__ */ Q(R, {
|
|
2015
2015
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
2016
2016
|
disabled: !a,
|
|
2017
2017
|
title: a ? void 0 : "No other tabs",
|
|
2018
2018
|
onClick: () => s("others"),
|
|
2019
2019
|
children: "Close others"
|
|
2020
2020
|
}),
|
|
2021
|
-
/* @__PURE__ */ Q(
|
|
2021
|
+
/* @__PURE__ */ Q(R, {
|
|
2022
2022
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
2023
2023
|
disabled: !o,
|
|
2024
2024
|
title: o ? void 0 : "No tabs to the right",
|
|
2025
2025
|
onClick: () => s("right"),
|
|
2026
2026
|
children: "Close tabs to the right"
|
|
2027
2027
|
}),
|
|
2028
|
-
/* @__PURE__ */ Q(
|
|
2029
|
-
/* @__PURE__ */ Q(
|
|
2028
|
+
/* @__PURE__ */ Q(R, { divider: !0 }),
|
|
2029
|
+
/* @__PURE__ */ Q(R, {
|
|
2030
2030
|
icon: /* @__PURE__ */ Q(n.trash, { size: 13 }),
|
|
2031
2031
|
danger: !0,
|
|
2032
2032
|
onClick: () => s("all"),
|
|
@@ -2122,7 +2122,7 @@ function ta({ pending: e, onCancel: t, onCloseClean: i, onDiscardAll: a }) {
|
|
|
2122
2122
|
]
|
|
2123
2123
|
})]
|
|
2124
2124
|
}),
|
|
2125
|
-
/* @__PURE__ */ Q(
|
|
2125
|
+
/* @__PURE__ */ Q(u, {
|
|
2126
2126
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
2127
2127
|
onClick: t,
|
|
2128
2128
|
title: "Cancel"
|
|
@@ -2199,16 +2199,16 @@ function ta({ pending: e, onCancel: t, onCloseClean: i, onDiscardAll: a }) {
|
|
|
2199
2199
|
},
|
|
2200
2200
|
children: [
|
|
2201
2201
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
2202
|
-
/* @__PURE__ */ Q(
|
|
2202
|
+
/* @__PURE__ */ Q(P, {
|
|
2203
2203
|
onClick: t,
|
|
2204
2204
|
children: "Cancel"
|
|
2205
2205
|
}),
|
|
2206
|
-
c > 0 && /* @__PURE__ */ Q(
|
|
2206
|
+
c > 0 && /* @__PURE__ */ Q(P, {
|
|
2207
2207
|
autoFocus: !0,
|
|
2208
2208
|
onClick: i,
|
|
2209
2209
|
children: "Close clean only"
|
|
2210
2210
|
}),
|
|
2211
|
-
/* @__PURE__ */ Q(
|
|
2211
|
+
/* @__PURE__ */ Q(P, {
|
|
2212
2212
|
kind: "primary",
|
|
2213
2213
|
danger: !0,
|
|
2214
2214
|
onClick: a,
|
|
@@ -2295,7 +2295,7 @@ function na() {
|
|
|
2295
2295
|
//#endregion
|
|
2296
2296
|
//#region src/components/layout/ImpersonationFrame.tsx
|
|
2297
2297
|
function ra() {
|
|
2298
|
-
let { info: e } = Vi(), { value: t } =
|
|
2298
|
+
let { info: e } = Vi(), { value: t } = te(e ? "impersonation.allow_destructive" : "", !1);
|
|
2299
2299
|
return K(() => {
|
|
2300
2300
|
if (!e) {
|
|
2301
2301
|
document.body.removeAttribute("data-impersonation-destructive");
|
|
@@ -2323,7 +2323,7 @@ function ra() {
|
|
|
2323
2323
|
//#region src/components/layout/tab-close.ts
|
|
2324
2324
|
function ia(e, t, n, r) {
|
|
2325
2325
|
if (n === "current" && e.length <= 1) return null;
|
|
2326
|
-
let i =
|
|
2326
|
+
let i = Ln(e, t, n, r);
|
|
2327
2327
|
if (i.length === 0) return null;
|
|
2328
2328
|
let a = new Set(i), o = e.filter((e) => a.has(e.id) && e.dirty), s = new Set(o.map((e) => e.id));
|
|
2329
2329
|
return {
|
|
@@ -2357,7 +2357,7 @@ function sa(e, t, r) {
|
|
|
2357
2357
|
if (e.screen) {
|
|
2358
2358
|
let a = t[e.screen];
|
|
2359
2359
|
if (a) {
|
|
2360
|
-
let t =
|
|
2360
|
+
let t = z(e.name) || e.screen;
|
|
2361
2361
|
i.push({
|
|
2362
2362
|
group: "Navigate",
|
|
2363
2363
|
icon: oa(e.icon || a.display?.icon || "folder"),
|
|
@@ -2388,9 +2388,9 @@ function sa(e, t, r) {
|
|
|
2388
2388
|
return i;
|
|
2389
2389
|
}
|
|
2390
2390
|
function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation: a, screens: o, includeAI: s = !0, aiName: c = "" }) {
|
|
2391
|
-
let [l,
|
|
2391
|
+
let [l, d] = Y(""), [f, p] = Y(0), m = J(null), h = M().category === "phone";
|
|
2392
2392
|
K(() => {
|
|
2393
|
-
e && (setTimeout(() => m.current?.focus(), 50),
|
|
2393
|
+
e && (setTimeout(() => m.current?.focus(), 50), d(i === "new" ? "New " : ""), p(0));
|
|
2394
2394
|
}, [e, i]);
|
|
2395
2395
|
let g = q(() => {
|
|
2396
2396
|
let e = [];
|
|
@@ -2468,9 +2468,9 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2468
2468
|
s,
|
|
2469
2469
|
r,
|
|
2470
2470
|
i
|
|
2471
|
-
]), _ = l ? g.filter((e) => e.label.toLowerCase().includes(l.toLowerCase()) || e.group.toLowerCase().includes(l.toLowerCase())) : g,
|
|
2471
|
+
]), _ = l ? g.filter((e) => e.label.toLowerCase().includes(l.toLowerCase()) || e.group.toLowerCase().includes(l.toLowerCase())) : g, v = {};
|
|
2472
2472
|
return _.forEach((e, t) => {
|
|
2473
|
-
|
|
2473
|
+
v[e.group] = v[e.group] || [], v[e.group].push({
|
|
2474
2474
|
...e,
|
|
2475
2475
|
_i: t
|
|
2476
2476
|
});
|
|
@@ -2506,7 +2506,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2506
2506
|
minWidth: 0
|
|
2507
2507
|
},
|
|
2508
2508
|
onKeyDown: (e) => {
|
|
2509
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
2509
|
+
e.key === "ArrowDown" ? (e.preventDefault(), p(Math.min(f + 1, _.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), p(Math.max(f - 1, 0))) : e.key === "Enter" && _[f] ? (_[f].act(), t()) : e.key === "Enter" && s && l.trim() ? (e.preventDefault(), r({
|
|
2510
2510
|
type: "ai",
|
|
2511
2511
|
q: l.trim()
|
|
2512
2512
|
}), t()) : e.key === "Escape" && t();
|
|
@@ -2530,7 +2530,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2530
2530
|
ref: m,
|
|
2531
2531
|
value: l,
|
|
2532
2532
|
onChange: (e) => {
|
|
2533
|
-
|
|
2533
|
+
d(e.target.value), p(0);
|
|
2534
2534
|
},
|
|
2535
2535
|
placeholder: s ? "Search or run command — type / for AI" : "Search or run command",
|
|
2536
2536
|
style: {
|
|
@@ -2543,12 +2543,12 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2543
2543
|
minWidth: 0
|
|
2544
2544
|
}
|
|
2545
2545
|
}),
|
|
2546
|
-
h && /* @__PURE__ */ Q(
|
|
2546
|
+
h && /* @__PURE__ */ Q(u, {
|
|
2547
2547
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
2548
2548
|
title: "Close command palette",
|
|
2549
2549
|
onClick: t
|
|
2550
2550
|
}),
|
|
2551
|
-
!h && /* @__PURE__ */ Q(
|
|
2551
|
+
!h && /* @__PURE__ */ Q(_e, { children: "Esc" })
|
|
2552
2552
|
]
|
|
2553
2553
|
}),
|
|
2554
2554
|
/* @__PURE__ */ $("div", {
|
|
@@ -2557,7 +2557,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2557
2557
|
overflowY: "auto",
|
|
2558
2558
|
padding: 6
|
|
2559
2559
|
},
|
|
2560
|
-
children: [Object.entries(
|
|
2560
|
+
children: [Object.entries(v).map(([e, n]) => /* @__PURE__ */ $("div", {
|
|
2561
2561
|
style: { marginBottom: 6 },
|
|
2562
2562
|
children: [/* @__PURE__ */ Q("div", {
|
|
2563
2563
|
style: {
|
|
@@ -2573,7 +2573,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2573
2573
|
onClick: () => {
|
|
2574
2574
|
e.act(), t();
|
|
2575
2575
|
},
|
|
2576
|
-
onMouseEnter: () =>
|
|
2576
|
+
onMouseEnter: () => p(e._i),
|
|
2577
2577
|
style: {
|
|
2578
2578
|
display: "flex",
|
|
2579
2579
|
alignItems: "center",
|
|
@@ -2581,14 +2581,14 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2581
2581
|
padding: "7px 10px",
|
|
2582
2582
|
borderRadius: 6,
|
|
2583
2583
|
cursor: "pointer",
|
|
2584
|
-
background: e._i ===
|
|
2585
|
-
color: e._i ===
|
|
2584
|
+
background: e._i === f ? "var(--accent-soft)" : "transparent",
|
|
2585
|
+
color: e._i === f ? "var(--accent)" : "var(--text-2)",
|
|
2586
2586
|
minWidth: 0
|
|
2587
2587
|
},
|
|
2588
2588
|
children: [
|
|
2589
2589
|
/* @__PURE__ */ Q("span", {
|
|
2590
2590
|
style: {
|
|
2591
|
-
color: e._i ===
|
|
2591
|
+
color: e._i === f ? "var(--accent)" : "var(--text-3)",
|
|
2592
2592
|
display: "flex"
|
|
2593
2593
|
},
|
|
2594
2594
|
children: e.icon
|
|
@@ -2666,7 +2666,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2666
2666
|
gap: 4,
|
|
2667
2667
|
minWidth: 0
|
|
2668
2668
|
},
|
|
2669
|
-
children: [/* @__PURE__ */ Q(
|
|
2669
|
+
children: [/* @__PURE__ */ Q(_e, { children: "↑↓" }), " navigate"]
|
|
2670
2670
|
}),
|
|
2671
2671
|
/* @__PURE__ */ $("span", {
|
|
2672
2672
|
style: {
|
|
@@ -2675,7 +2675,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2675
2675
|
gap: 4,
|
|
2676
2676
|
minWidth: 0
|
|
2677
2677
|
},
|
|
2678
|
-
children: [/* @__PURE__ */ Q(
|
|
2678
|
+
children: [/* @__PURE__ */ Q(_e, { children: "↵" }), " select"]
|
|
2679
2679
|
}),
|
|
2680
2680
|
s && /* @__PURE__ */ $("span", {
|
|
2681
2681
|
style: {
|
|
@@ -2684,7 +2684,7 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2684
2684
|
gap: 4,
|
|
2685
2685
|
minWidth: 0
|
|
2686
2686
|
},
|
|
2687
|
-
children: [/* @__PURE__ */ Q(
|
|
2687
|
+
children: [/* @__PURE__ */ Q(_e, { children: "/" }), " ask AI"]
|
|
2688
2688
|
}),
|
|
2689
2689
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
2690
2690
|
/* @__PURE__ */ Q("span", {
|
|
@@ -2699,17 +2699,17 @@ function ca({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2699
2699
|
//#endregion
|
|
2700
2700
|
//#region src/api/agents.ts
|
|
2701
2701
|
async function la() {
|
|
2702
|
-
return (await
|
|
2702
|
+
return (await Ce("agents.list_available", {})).agents ?? [];
|
|
2703
2703
|
}
|
|
2704
2704
|
async function ua(e) {
|
|
2705
2705
|
return {
|
|
2706
|
-
id: (await
|
|
2706
|
+
id: (await Ce("agent.start_conversation", { ...e.agent_id ? { agent_id: e.agent_id } : {} })).conversation_id,
|
|
2707
2707
|
status: "active"
|
|
2708
2708
|
};
|
|
2709
2709
|
}
|
|
2710
2710
|
async function da(e, t) {
|
|
2711
2711
|
return {
|
|
2712
|
-
id: (await
|
|
2712
|
+
id: (await Ce("agent.send_message", {
|
|
2713
2713
|
conversation_id: t,
|
|
2714
2714
|
text: e
|
|
2715
2715
|
})).message_id,
|
|
@@ -2718,7 +2718,7 @@ async function da(e, t) {
|
|
|
2718
2718
|
};
|
|
2719
2719
|
}
|
|
2720
2720
|
async function fa(e, t) {
|
|
2721
|
-
await
|
|
2721
|
+
await Ce("agent.answer_question", {
|
|
2722
2722
|
invocation_id: e,
|
|
2723
2723
|
answer: t
|
|
2724
2724
|
});
|
|
@@ -2739,13 +2739,13 @@ async function ha(e, t) {
|
|
|
2739
2739
|
});
|
|
2740
2740
|
}
|
|
2741
2741
|
async function ga(e) {
|
|
2742
|
-
await
|
|
2742
|
+
await Ce("agent.cancel_question", { invocation_id: e });
|
|
2743
2743
|
}
|
|
2744
2744
|
async function _a(e) {
|
|
2745
|
-
await
|
|
2745
|
+
await Ce("agent.cancel_conversation", { conversation_id: e });
|
|
2746
2746
|
}
|
|
2747
2747
|
async function va() {
|
|
2748
|
-
let e = await
|
|
2748
|
+
let e = await Et("agent_conversation", {
|
|
2749
2749
|
sort: "updated_at:desc",
|
|
2750
2750
|
page: 1,
|
|
2751
2751
|
per_page: 50
|
|
@@ -2788,7 +2788,7 @@ async function xa(e) {
|
|
|
2788
2788
|
async function Sa(e, t) {
|
|
2789
2789
|
let n = [];
|
|
2790
2790
|
for (let r = 1;; r += 1) {
|
|
2791
|
-
let i = await
|
|
2791
|
+
let i = await Et(e, {
|
|
2792
2792
|
...t,
|
|
2793
2793
|
page: r,
|
|
2794
2794
|
per_page: 1e3
|
|
@@ -2820,7 +2820,7 @@ function Da(e, t) {
|
|
|
2820
2820
|
} catch {}
|
|
2821
2821
|
}
|
|
2822
2822
|
function Oa(e) {
|
|
2823
|
-
return !(e instanceof
|
|
2823
|
+
return !(e instanceof l) || e.code !== "entity.foreign_key_violation" ? !1 : e.ext("constraint") === "agent_messages_tenant_conv_fk";
|
|
2824
2824
|
}
|
|
2825
2825
|
function ka(e, t) {
|
|
2826
2826
|
return {
|
|
@@ -2929,12 +2929,12 @@ function La(e) {
|
|
|
2929
2929
|
return typeof t == "string" && t ? t : void 0;
|
|
2930
2930
|
}
|
|
2931
2931
|
function Ra(e) {
|
|
2932
|
-
let t =
|
|
2932
|
+
let t = I.getState().activeTenant?.id, [n, r] = Y(e ?? Ea(t)), i = G((e) => {
|
|
2933
2933
|
Da(t, e), r(e);
|
|
2934
|
-
}, [t]), [a, o] = Y([]), [
|
|
2934
|
+
}, [t]), [a, o] = Y([]), [s, c] = Y(Ca), [l, u] = Y([]), [d, f] = Y([]), [p, m] = Y([]), [h, g] = Y([]), [v, y] = Y(), b = J(/* @__PURE__ */ new Set()), x = J(0);
|
|
2935
2935
|
K(() => {
|
|
2936
2936
|
if (!n) {
|
|
2937
|
-
o([]),
|
|
2937
|
+
o([]), c(Ca), u([]), f([]);
|
|
2938
2938
|
return;
|
|
2939
2939
|
}
|
|
2940
2940
|
if (b.current.has(n)) {
|
|
@@ -2952,7 +2952,7 @@ function Ra(e) {
|
|
|
2952
2952
|
...e,
|
|
2953
2953
|
streaming: !1
|
|
2954
2954
|
} : e);
|
|
2955
|
-
o(i),
|
|
2955
|
+
o(i), u(n), f(r);
|
|
2956
2956
|
}, (t) => {
|
|
2957
2957
|
e || t?.status === 404 && (i(void 0), o([]));
|
|
2958
2958
|
}), () => {
|
|
@@ -2970,7 +2970,7 @@ function Ra(e) {
|
|
|
2970
2970
|
ya(e),
|
|
2971
2971
|
ba(e)
|
|
2972
2972
|
]).then(([n, r, i]) => {
|
|
2973
|
-
e === S.current && t === x.current && (o((e) => Ia(n, e)),
|
|
2973
|
+
e === S.current && t === x.current && (o((e) => Ia(n, e)), u(r), f(i));
|
|
2974
2974
|
}, () => {});
|
|
2975
2975
|
}, []);
|
|
2976
2976
|
K(() => {
|
|
@@ -2982,11 +2982,11 @@ function Ra(e) {
|
|
|
2982
2982
|
payload: a
|
|
2983
2983
|
});
|
|
2984
2984
|
};
|
|
2985
|
-
|
|
2985
|
+
ut.addEventListener(_, e);
|
|
2986
2986
|
let t = (e, t) => {
|
|
2987
2987
|
switch (t.kind) {
|
|
2988
2988
|
case "turn.started":
|
|
2989
|
-
|
|
2989
|
+
c((e) => ({
|
|
2990
2990
|
...e,
|
|
2991
2991
|
streaming: !0
|
|
2992
2992
|
})), o((e) => Aa(e));
|
|
@@ -3001,7 +3001,7 @@ function Ra(e) {
|
|
|
3001
3001
|
break;
|
|
3002
3002
|
}
|
|
3003
3003
|
case "text.delta": {
|
|
3004
|
-
let n =
|
|
3004
|
+
let n = ht(t.payload?.text), r = La(t);
|
|
3005
3005
|
if (!r || !n) break;
|
|
3006
3006
|
o((t) => Pa(t, e, r, n));
|
|
3007
3007
|
break;
|
|
@@ -3024,12 +3024,12 @@ function Ra(e) {
|
|
|
3024
3024
|
C(e);
|
|
3025
3025
|
break;
|
|
3026
3026
|
case "turn.finished": {
|
|
3027
|
-
|
|
3027
|
+
c(Ca);
|
|
3028
3028
|
let e = La(t);
|
|
3029
3029
|
e && o((t) => ja(t, e));
|
|
3030
3030
|
break;
|
|
3031
3031
|
}
|
|
3032
|
-
case "error": o((e) => Ma(e)),
|
|
3032
|
+
case "error": o((e) => Ma(e)), c((e) => ({
|
|
3033
3033
|
...e,
|
|
3034
3034
|
streaming: !1
|
|
3035
3035
|
}));
|
|
@@ -3038,8 +3038,8 @@ function Ra(e) {
|
|
|
3038
3038
|
let e = S.current;
|
|
3039
3039
|
e && C(e);
|
|
3040
3040
|
};
|
|
3041
|
-
return
|
|
3042
|
-
|
|
3041
|
+
return ut.addEventListener(ue, n), () => {
|
|
3042
|
+
ut.removeEventListener(_, e), ut.removeEventListener(ue, n);
|
|
3043
3043
|
};
|
|
3044
3044
|
}, [C]);
|
|
3045
3045
|
let w = G(async (e) => {
|
|
@@ -3071,17 +3071,17 @@ function Ra(e) {
|
|
|
3071
3071
|
n && (await pa(n, e, t), C(n));
|
|
3072
3072
|
}, [n, C]), O = G(async (e) => {
|
|
3073
3073
|
n && (await ga(e), C(n));
|
|
3074
|
-
}, [n, C]),
|
|
3074
|
+
}, [n, C]), ee = G(async () => {
|
|
3075
3075
|
n && await _a(n);
|
|
3076
|
-
}, [n]),
|
|
3077
|
-
|
|
3078
|
-
}, []),
|
|
3079
|
-
i(void 0), o([]),
|
|
3076
|
+
}, [n]), te = G(async () => {
|
|
3077
|
+
m(await va());
|
|
3078
|
+
}, []), k = G(() => {
|
|
3079
|
+
i(void 0), o([]), c(Ca);
|
|
3080
3080
|
}, [i]);
|
|
3081
3081
|
return K(() => {
|
|
3082
3082
|
let e = !0;
|
|
3083
3083
|
return la().then((t) => {
|
|
3084
|
-
e && (
|
|
3084
|
+
e && (g(t), y((e) => e ?? t.find((e) => e.is_default)?.id));
|
|
3085
3085
|
}).catch((e) => {
|
|
3086
3086
|
console.warn("agents.list_available failed; the agent picker is unavailable", e);
|
|
3087
3087
|
}), () => {
|
|
@@ -3090,19 +3090,19 @@ function Ra(e) {
|
|
|
3090
3090
|
}, []), {
|
|
3091
3091
|
conversationId: n,
|
|
3092
3092
|
messages: a,
|
|
3093
|
-
turn:
|
|
3094
|
-
turns:
|
|
3095
|
-
invocations:
|
|
3096
|
-
conversations:
|
|
3093
|
+
turn: s,
|
|
3094
|
+
turns: l,
|
|
3095
|
+
invocations: d,
|
|
3096
|
+
conversations: p,
|
|
3097
3097
|
send: w,
|
|
3098
3098
|
approve: T,
|
|
3099
3099
|
reject: E,
|
|
3100
3100
|
submitInput: D,
|
|
3101
3101
|
cancelInput: O,
|
|
3102
|
-
cancel:
|
|
3103
|
-
refreshConversations:
|
|
3104
|
-
startNew:
|
|
3105
|
-
agents:
|
|
3102
|
+
cancel: ee,
|
|
3103
|
+
refreshConversations: te,
|
|
3104
|
+
startNew: k,
|
|
3105
|
+
agents: h,
|
|
3106
3106
|
selectedAgentId: v,
|
|
3107
3107
|
selectAgent: y,
|
|
3108
3108
|
setConversationId: i
|
|
@@ -3145,11 +3145,11 @@ function za({ message: e, schema: t, onSubmit: n, onCancel: r }) {
|
|
|
3145
3145
|
}),
|
|
3146
3146
|
/* @__PURE__ */ $("div", {
|
|
3147
3147
|
className: "mt-3 flex justify-end gap-2",
|
|
3148
|
-
children: [r && /* @__PURE__ */ Q(
|
|
3148
|
+
children: [r && /* @__PURE__ */ Q(P, {
|
|
3149
3149
|
kind: "ghost",
|
|
3150
3150
|
onClick: r,
|
|
3151
3151
|
children: "Cancel"
|
|
3152
|
-
}), /* @__PURE__ */ Q(
|
|
3152
|
+
}), /* @__PURE__ */ Q(P, {
|
|
3153
3153
|
onClick: c,
|
|
3154
3154
|
children: "Submit"
|
|
3155
3155
|
})]
|
|
@@ -3163,7 +3163,7 @@ function Ba({ name: e, prop: t, required: n, value: r, onChange: i }) {
|
|
|
3163
3163
|
label: a,
|
|
3164
3164
|
help: o,
|
|
3165
3165
|
children: /* @__PURE__ */ $("select", {
|
|
3166
|
-
value:
|
|
3166
|
+
value: ht(r),
|
|
3167
3167
|
onChange: (e) => i(e.target.value),
|
|
3168
3168
|
className: "w-full rounded-md border border-border bg-card p-2 text-sm",
|
|
3169
3169
|
children: [/* @__PURE__ */ Q("option", {
|
|
@@ -3205,7 +3205,7 @@ function Ba({ name: e, prop: t, required: n, value: r, onChange: i }) {
|
|
|
3205
3205
|
step: t.type === "integer" ? 1 : "any",
|
|
3206
3206
|
min: t.minimum,
|
|
3207
3207
|
max: t.maximum,
|
|
3208
|
-
value: r == null ? "" :
|
|
3208
|
+
value: r == null ? "" : ht(r),
|
|
3209
3209
|
onChange: (e) => {
|
|
3210
3210
|
i(e.target.value === "" ? void 0 : Number(e.target.value));
|
|
3211
3211
|
},
|
|
@@ -3216,7 +3216,7 @@ function Ba({ name: e, prop: t, required: n, value: r, onChange: i }) {
|
|
|
3216
3216
|
help: o,
|
|
3217
3217
|
children: /* @__PURE__ */ Q("textarea", {
|
|
3218
3218
|
rows: 3,
|
|
3219
|
-
value:
|
|
3219
|
+
value: ht(r),
|
|
3220
3220
|
onChange: (e) => i(e.target.value),
|
|
3221
3221
|
className: "w-full rounded-md border border-border bg-card p-2 text-sm"
|
|
3222
3222
|
})
|
|
@@ -3225,7 +3225,7 @@ function Ba({ name: e, prop: t, required: n, value: r, onChange: i }) {
|
|
|
3225
3225
|
help: o,
|
|
3226
3226
|
children: /* @__PURE__ */ Q("input", {
|
|
3227
3227
|
type: t.format === "email" ? "email" : t.format === "url" ? "url" : t.format === "date-time" ? "datetime-local" : "text",
|
|
3228
|
-
value:
|
|
3228
|
+
value: ht(r),
|
|
3229
3229
|
onChange: (e) => i(e.target.value),
|
|
3230
3230
|
className: "w-full rounded-md border border-border bg-card p-2 text-sm"
|
|
3231
3231
|
})
|
|
@@ -3304,13 +3304,13 @@ function Ga({ agents: e, selectedId: t, onSelect: n, locale: r, label: i }) {
|
|
|
3304
3304
|
fontSize: 10.5,
|
|
3305
3305
|
color: "var(--text-3)"
|
|
3306
3306
|
},
|
|
3307
|
-
children:
|
|
3307
|
+
children: z(a.description, r)
|
|
3308
3308
|
})
|
|
3309
3309
|
]
|
|
3310
3310
|
});
|
|
3311
3311
|
}
|
|
3312
3312
|
function Ka(e, t) {
|
|
3313
|
-
return
|
|
3313
|
+
return z(e.name, t) || e.code;
|
|
3314
3314
|
}
|
|
3315
3315
|
//#endregion
|
|
3316
3316
|
//#region src/components/agents/transcript-runs.ts
|
|
@@ -3364,7 +3364,7 @@ function Qa(e) {
|
|
|
3364
3364
|
return (e.content ?? []).some((e) => e.type !== "tool_use" && e.type !== "tool_result");
|
|
3365
3365
|
}
|
|
3366
3366
|
function $a(e, t, n, r = "") {
|
|
3367
|
-
return
|
|
3367
|
+
return z(e?.[t], n) || r;
|
|
3368
3368
|
}
|
|
3369
3369
|
function eo(e) {
|
|
3370
3370
|
let t = e?.find((e) => e.code === "ui_language")?.value;
|
|
@@ -3379,27 +3379,27 @@ function to() {
|
|
|
3379
3379
|
//#region src/components/agents/AgentChatPanel.tsx
|
|
3380
3380
|
var no = 80;
|
|
3381
3381
|
function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
3382
|
-
let o = Ra(), s = vo(), { value: c } =
|
|
3383
|
-
let e =
|
|
3382
|
+
let o = Ra(), s = vo(), { value: c } = te("ui_language", "en"), [l, d] = Y(""), [f, p] = Y(null), m = J(null), [h, g] = Y(!1), _ = J(null), v = J(null), y = J(!0), [b, x] = Y(!1), S = () => {
|
|
3383
|
+
let e = v.current;
|
|
3384
3384
|
if (!e) return;
|
|
3385
3385
|
let t = e.scrollHeight - e.scrollTop - e.clientHeight <= no;
|
|
3386
|
-
|
|
3387
|
-
},
|
|
3388
|
-
let t =
|
|
3386
|
+
y.current = t, t && b && x(!1);
|
|
3387
|
+
}, C = (e = "smooth") => {
|
|
3388
|
+
let t = v.current;
|
|
3389
3389
|
t && (t.scrollTo({
|
|
3390
3390
|
top: t.scrollHeight,
|
|
3391
3391
|
behavior: e
|
|
3392
|
-
}),
|
|
3392
|
+
}), y.current = !0, x(!1));
|
|
3393
3393
|
};
|
|
3394
3394
|
if (K(() => {
|
|
3395
|
-
|
|
3395
|
+
y.current ? C("smooth") : x(!0);
|
|
3396
3396
|
}, [o.messages]), K(() => {
|
|
3397
|
-
e &&
|
|
3397
|
+
e && C("instant");
|
|
3398
3398
|
}, [e]), K(() => {
|
|
3399
3399
|
let t = a?.trim();
|
|
3400
3400
|
!e || !t || m.current === t || (m.current = t, _.current?.(t));
|
|
3401
3401
|
}, [e, a]), !e) return null;
|
|
3402
|
-
let
|
|
3402
|
+
let w = async (e) => {
|
|
3403
3403
|
if (e.trim()) {
|
|
3404
3404
|
p(null), d("");
|
|
3405
3405
|
try {
|
|
@@ -3409,10 +3409,10 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
3411
|
};
|
|
3412
|
-
_.current =
|
|
3413
|
-
let
|
|
3414
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
3415
|
-
},
|
|
3412
|
+
_.current = w;
|
|
3413
|
+
let T = (e) => {
|
|
3414
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), w(l));
|
|
3415
|
+
}, E = o.invocations.filter((e) => e.status === "pending_approval"), D = o.invocations.filter((e) => e.kind === "input_request" && e.status === "pending_input"), O = o.turns.filter((e) => e.status === "queued" || e.status === "running" || e.status === "waiting" || e.status === "failed"), ee = o.invocations.filter((e) => e.status === "outcome_unknown"), k = o.messages.length === 0 && !o.turn.streaming, A = E.length > 0 || D.length > 0, ne = o.turn.streaming && !A || o.turns.some((e) => e.status === "running"), j = o.messages.some((e) => e.role === "assistant" && e.streaming && e.content.length > 0), re = l.trim().length > 0;
|
|
3416
3416
|
return /* @__PURE__ */ $("aside", {
|
|
3417
3417
|
style: {
|
|
3418
3418
|
position: "fixed",
|
|
@@ -3484,13 +3484,13 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3484
3484
|
]
|
|
3485
3485
|
})]
|
|
3486
3486
|
}),
|
|
3487
|
-
o.messages.length > 0 && /* @__PURE__ */ Q(
|
|
3487
|
+
o.messages.length > 0 && /* @__PURE__ */ Q(u, {
|
|
3488
3488
|
size: 24,
|
|
3489
3489
|
icon: /* @__PURE__ */ Q(n.copy, { size: 12 }),
|
|
3490
3490
|
onClick: () => void Do(o.messages),
|
|
3491
3491
|
title: s("agent.panel.copy_all", "Copy entire conversation")
|
|
3492
3492
|
}),
|
|
3493
|
-
/* @__PURE__ */ Q(
|
|
3493
|
+
/* @__PURE__ */ Q(u, {
|
|
3494
3494
|
size: 24,
|
|
3495
3495
|
icon: /* @__PURE__ */ Q(n.clock, { size: 12 }),
|
|
3496
3496
|
onClick: () => {
|
|
@@ -3498,18 +3498,18 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3498
3498
|
},
|
|
3499
3499
|
title: s("agent.panel.earlier", "Earlier conversations")
|
|
3500
3500
|
}),
|
|
3501
|
-
o.conversationId && /* @__PURE__ */ Q(
|
|
3501
|
+
o.conversationId && /* @__PURE__ */ Q(u, {
|
|
3502
3502
|
size: 24,
|
|
3503
3503
|
icon: /* @__PURE__ */ Q(n.plus, { size: 12 }),
|
|
3504
3504
|
onClick: o.startNew,
|
|
3505
3505
|
title: s("agent.panel.new_conversation", "New conversation")
|
|
3506
3506
|
}),
|
|
3507
|
-
/* @__PURE__ */ Q(
|
|
3507
|
+
/* @__PURE__ */ Q(u, {
|
|
3508
3508
|
size: 24,
|
|
3509
3509
|
icon: /* @__PURE__ */ Q(n.settings, { size: 12 }),
|
|
3510
3510
|
title: s("agent.panel.preferences", "Preferences")
|
|
3511
3511
|
}),
|
|
3512
|
-
/* @__PURE__ */ Q(
|
|
3512
|
+
/* @__PURE__ */ Q(u, {
|
|
3513
3513
|
size: 24,
|
|
3514
3514
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
3515
3515
|
onClick: t,
|
|
@@ -3532,8 +3532,8 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3532
3532
|
}
|
|
3533
3533
|
}),
|
|
3534
3534
|
/* @__PURE__ */ $("div", {
|
|
3535
|
-
ref:
|
|
3536
|
-
onScroll:
|
|
3535
|
+
ref: v,
|
|
3536
|
+
onScroll: S,
|
|
3537
3537
|
style: {
|
|
3538
3538
|
flex: 1,
|
|
3539
3539
|
overflowY: "auto",
|
|
@@ -3544,21 +3544,21 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3544
3544
|
position: "relative"
|
|
3545
3545
|
},
|
|
3546
3546
|
children: [
|
|
3547
|
-
|
|
3547
|
+
k && /* @__PURE__ */ Q(ao, { children: "Hi — I can answer questions about your data, suggest actions, draft YAML definitions, and run allowed tools within your permissions. What would you like to do?" }),
|
|
3548
3548
|
Ja(o.messages, o.invocations).map((e) => e.kind === "message" ? /* @__PURE__ */ Q(yo, { message: e.message }, e.message.id) : /* @__PURE__ */ Q(uo, { run: e }, e.id)),
|
|
3549
|
-
|
|
3550
|
-
|
|
3549
|
+
O.map((e) => /* @__PURE__ */ Q(oo, { agentTurn: e }, e.id)),
|
|
3550
|
+
E.map((e) => /* @__PURE__ */ Q(Ao, {
|
|
3551
3551
|
tool: e,
|
|
3552
3552
|
onApprove: async (t) => o.approve(e.id, t),
|
|
3553
3553
|
onReject: async (t) => o.reject(e.id, t)
|
|
3554
3554
|
}, e.id)),
|
|
3555
|
-
|
|
3555
|
+
D.map((e) => /* @__PURE__ */ Q(za, {
|
|
3556
3556
|
...so(e),
|
|
3557
3557
|
onSubmit: (t) => void o.submitInput(e.id, t),
|
|
3558
3558
|
onCancel: () => void o.cancelInput(e.id)
|
|
3559
3559
|
}, e.id)),
|
|
3560
|
-
|
|
3561
|
-
|
|
3560
|
+
ee.map((e) => /* @__PURE__ */ Q(co, { invocation: e }, e.id)),
|
|
3561
|
+
ne && !j && /* @__PURE__ */ $("div", {
|
|
3562
3562
|
style: {
|
|
3563
3563
|
display: "flex",
|
|
3564
3564
|
gap: 6,
|
|
@@ -3566,7 +3566,7 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3566
3566
|
color: "var(--text-3)",
|
|
3567
3567
|
fontSize: 11.5
|
|
3568
3568
|
},
|
|
3569
|
-
children: [/* @__PURE__ */ Q(
|
|
3569
|
+
children: [/* @__PURE__ */ Q(N, { size: 12 }), s("agent.panel.thinking", "Thinking…")]
|
|
3570
3570
|
}),
|
|
3571
3571
|
f && /* @__PURE__ */ $("div", {
|
|
3572
3572
|
style: {
|
|
@@ -3585,8 +3585,8 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3585
3585
|
})
|
|
3586
3586
|
]
|
|
3587
3587
|
}),
|
|
3588
|
-
|
|
3589
|
-
onClick: () =>
|
|
3588
|
+
b && /* @__PURE__ */ $("button", {
|
|
3589
|
+
onClick: () => C("smooth"),
|
|
3590
3590
|
style: {
|
|
3591
3591
|
position: "absolute",
|
|
3592
3592
|
right: 16,
|
|
@@ -3627,7 +3627,7 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3627
3627
|
/* @__PURE__ */ Q(si, {
|
|
3628
3628
|
value: l,
|
|
3629
3629
|
onChange: (e) => d(e.target.value),
|
|
3630
|
-
onKeyDown:
|
|
3630
|
+
onKeyDown: T,
|
|
3631
3631
|
placeholder: s("agent.panel.ask_placeholder", "Ask or describe what you want…"),
|
|
3632
3632
|
minRows: 1,
|
|
3633
3633
|
maxRows: 8,
|
|
@@ -3644,12 +3644,12 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3644
3644
|
fontFamily: "inherit"
|
|
3645
3645
|
}
|
|
3646
3646
|
}),
|
|
3647
|
-
/* @__PURE__ */ Q(
|
|
3647
|
+
/* @__PURE__ */ Q(u, {
|
|
3648
3648
|
size: 26,
|
|
3649
3649
|
icon: /* @__PURE__ */ Q(n.paperclip, { size: 12 }),
|
|
3650
3650
|
title: s("agent.panel.attach_context", "Attach context")
|
|
3651
3651
|
}),
|
|
3652
|
-
|
|
3652
|
+
ne ? /* @__PURE__ */ Q("button", {
|
|
3653
3653
|
onClick: () => void o.cancel(),
|
|
3654
3654
|
"aria-label": s("agent.panel.stop", "Stop generating"),
|
|
3655
3655
|
title: s("agent.panel.stop", "Stop generating"),
|
|
@@ -3667,17 +3667,17 @@ function ro({ open: e, onClose: t, context: r, title: i = "", askOnOpen: a }) {
|
|
|
3667
3667
|
},
|
|
3668
3668
|
children: /* @__PURE__ */ Q(n.x, { size: 13 })
|
|
3669
3669
|
}) : /* @__PURE__ */ Q("button", {
|
|
3670
|
-
onClick: () => void
|
|
3671
|
-
disabled: !
|
|
3670
|
+
onClick: () => void w(l),
|
|
3671
|
+
disabled: !re,
|
|
3672
3672
|
"aria-label": s("agent.panel.send", "Send"),
|
|
3673
3673
|
style: {
|
|
3674
3674
|
width: 26,
|
|
3675
3675
|
height: 26,
|
|
3676
3676
|
borderRadius: 6,
|
|
3677
3677
|
border: 0,
|
|
3678
|
-
cursor:
|
|
3679
|
-
background:
|
|
3680
|
-
color:
|
|
3678
|
+
cursor: re ? "pointer" : "default",
|
|
3679
|
+
background: re ? "var(--accent)" : "var(--surface-3)",
|
|
3680
|
+
color: re ? "var(--accent-foreground)" : "var(--text-4)",
|
|
3681
3681
|
display: "inline-flex",
|
|
3682
3682
|
alignItems: "center",
|
|
3683
3683
|
justifyContent: "center"
|
|
@@ -3750,7 +3750,7 @@ function ao({ children: e, dataMessageId: t, dataStreaming: r }) {
|
|
|
3750
3750
|
});
|
|
3751
3751
|
}
|
|
3752
3752
|
function oo({ agentTurn: e }) {
|
|
3753
|
-
let t = vo(), n = e.status === "failed" ? t(e.error_code ?? "",
|
|
3753
|
+
let t = vo(), n = e.status === "failed" ? t(e.error_code ?? "", ht(e.error_details) || "The agent turn failed.", void 0, "errors") : void 0;
|
|
3754
3754
|
return /* @__PURE__ */ $("div", {
|
|
3755
3755
|
"data-agent-turn": e.id,
|
|
3756
3756
|
"data-turn-status": e.status,
|
|
@@ -3954,17 +3954,17 @@ function ho({ conversations: e, currentId: t, onPick: n }) {
|
|
|
3954
3954
|
});
|
|
3955
3955
|
}
|
|
3956
3956
|
function go(e) {
|
|
3957
|
-
let { value: t } =
|
|
3957
|
+
let { value: t } = te("agents.transcript_names", "code"), { data: n } = B();
|
|
3958
3958
|
if (t !== "display") return e;
|
|
3959
3959
|
let r = n?.actions?.[e]?.display?.name ?? _o(n, e);
|
|
3960
|
-
return
|
|
3960
|
+
return z(r, "en") || e;
|
|
3961
3961
|
}
|
|
3962
3962
|
function _o(e, t) {
|
|
3963
3963
|
let n = t.indexOf(".");
|
|
3964
3964
|
if (!(n < 0)) return e?.entities?.[t.slice(0, n)]?.actions?.[t.slice(n + 1)]?.display?.name;
|
|
3965
3965
|
}
|
|
3966
3966
|
function vo() {
|
|
3967
|
-
let { data: e } =
|
|
3967
|
+
let { data: e } = B(), { value: t } = te("ui_language", "en");
|
|
3968
3968
|
return (n, r, i, a = "messages") => {
|
|
3969
3969
|
let o = $a(a === "errors" ? e?.errors : e?.messages, n, t, r);
|
|
3970
3970
|
if (i) for (let [e, t] of Object.entries(i)) o = o.replace(`{${e}}`, String(t));
|
|
@@ -4087,7 +4087,7 @@ function So({ block: e }) {
|
|
|
4087
4087
|
switch (e.type) {
|
|
4088
4088
|
case "text": return /* @__PURE__ */ Q("div", {
|
|
4089
4089
|
className: "agent-md",
|
|
4090
|
-
children: /* @__PURE__ */ Q(
|
|
4090
|
+
children: /* @__PURE__ */ Q(c, {
|
|
4091
4091
|
content: e.text,
|
|
4092
4092
|
plugins: "gfm",
|
|
4093
4093
|
prose: !1,
|
|
@@ -4494,27 +4494,27 @@ function Ao({ tool: e, onApprove: t, onReject: r }) {
|
|
|
4494
4494
|
justifyContent: "flex-end"
|
|
4495
4495
|
},
|
|
4496
4496
|
children: [
|
|
4497
|
-
c ? /* @__PURE__ */ Q(
|
|
4497
|
+
c ? /* @__PURE__ */ Q(P, {
|
|
4498
4498
|
size: "xs",
|
|
4499
4499
|
kind: "ghost",
|
|
4500
4500
|
onClick: _,
|
|
4501
4501
|
disabled: m,
|
|
4502
4502
|
children: i("agent.panel.reject_send", "Send rejection")
|
|
4503
|
-
}) : /* @__PURE__ */ Q(
|
|
4503
|
+
}) : /* @__PURE__ */ Q(P, {
|
|
4504
4504
|
size: "xs",
|
|
4505
4505
|
kind: "ghost",
|
|
4506
4506
|
onClick: () => l(!0),
|
|
4507
4507
|
disabled: m,
|
|
4508
4508
|
children: i("agent.panel.reject", "Reject…")
|
|
4509
4509
|
}),
|
|
4510
|
-
e.confirmation_mode !== "always" && /* @__PURE__ */ Q(
|
|
4510
|
+
e.confirmation_mode !== "always" && /* @__PURE__ */ Q(P, {
|
|
4511
4511
|
size: "xs",
|
|
4512
4512
|
kind: "ghost",
|
|
4513
4513
|
onClick: () => g("conversation"),
|
|
4514
4514
|
disabled: m,
|
|
4515
4515
|
children: i("agent.panel.approve_chat", "Approve for this chat")
|
|
4516
4516
|
}),
|
|
4517
|
-
/* @__PURE__ */ Q(
|
|
4517
|
+
/* @__PURE__ */ Q(P, {
|
|
4518
4518
|
size: "xs",
|
|
4519
4519
|
kind: "primary",
|
|
4520
4520
|
icon: /* @__PURE__ */ Q(n.check, { size: 11 }),
|
|
@@ -4531,36 +4531,36 @@ function Ao({ tool: e, onApprove: t, onReject: r }) {
|
|
|
4531
4531
|
//#region src/components/layout/Layout.tsx
|
|
4532
4532
|
var jo = "default";
|
|
4533
4533
|
function Mo() {
|
|
4534
|
-
ji(),
|
|
4535
|
-
let { isAuthenticated: e, isLoading: t, user: n, activeTenant: r } =
|
|
4536
|
-
ue && (
|
|
4537
|
-
}, [ue]),
|
|
4534
|
+
ji(), Fn();
|
|
4535
|
+
let { isAuthenticated: e, isLoading: t, user: n, activeTenant: r } = I(), i = ke(), a = Xr(), o = On(), s = G((e) => o(e, { topLevel: !0 }), [o]), c = Jr(), { data: l } = B(), u = M(), d = U((e) => e.sidebar), f = U((e) => e.tabsPosition), p = U((e) => e.aiSurface), m = U((e) => e.colorScheme), h = U((e) => e.set), g = U((e) => e.hydrateFromBranding), { branding: _ } = dn(), v = Xt(), y = H((e) => e.tabs), b = H((e) => e.activeTabId), x = H((e) => e.closeTabs), S = H((e) => e.switchTab), C = H((e) => e.setScope), w = H((e) => e.hydrate), [T, E] = Y(jo), [D, O] = Y(!1), [ee, te] = Y("default"), [k, A] = Y(!1), [ne, j] = Y(), [re, ie] = Y(!1), [ae, oe] = Y(!1), se = J(null), ce = J(null), [le, N] = Y(null), ue = p !== "off" && v.isVisible("show_command_palette"), de = p === "panel" || p === "both", fe = p === "command" || p === "both", pe = Zt(), me = pe?.ai_name?.trim() ?? "", he = u.category === "phone" || u.category === "tablet", _e = v.isVisible("show_topbar"), ve = !he && v.isVisible("show_rail"), ye = !he && v.isVisible("show_sidebar"), be = !he && v.isVisible("show_tabs"), xe = he && v.isVisible("show_sidebar"), Se = he && v.isVisible("show_tabs"), Ce = v.isVisible("show_tenant_switcher"), we = v.isVisible("show_breadcrumbs"), Te = v.isVisible("show_theme_toggle"), Ee = G((e = "default") => {
|
|
4536
|
+
ue && (te(e), O(!0));
|
|
4537
|
+
}, [ue]), De = G((e) => {
|
|
4538
4538
|
if (e.length === 0) return;
|
|
4539
|
-
let t = H.getState(), n = !t.activeTabId || e.includes(t.activeTabId), r =
|
|
4539
|
+
let t = H.getState(), n = !t.activeTabId || e.includes(t.activeTabId), r = x(e);
|
|
4540
4540
|
if (!n) return;
|
|
4541
4541
|
let i = aa(r);
|
|
4542
4542
|
a({
|
|
4543
4543
|
pathname: i.pathname,
|
|
4544
4544
|
search: i.search
|
|
4545
4545
|
}, { replace: i.replace });
|
|
4546
|
-
}, [
|
|
4546
|
+
}, [x, a]), Oe = G((e, t) => {
|
|
4547
4547
|
let n = H.getState(), r = ia(n.tabs, n.activeTabId, e, t);
|
|
4548
4548
|
if (r) {
|
|
4549
4549
|
if (r.dirtyTabs.length > 0) {
|
|
4550
|
-
|
|
4550
|
+
N(r);
|
|
4551
4551
|
return;
|
|
4552
4552
|
}
|
|
4553
|
-
|
|
4553
|
+
De(r.ids);
|
|
4554
4554
|
}
|
|
4555
|
-
}, [
|
|
4556
|
-
|
|
4557
|
-
}, []),
|
|
4558
|
-
|
|
4559
|
-
}, [
|
|
4560
|
-
|
|
4561
|
-
}, [
|
|
4562
|
-
|
|
4563
|
-
i.enabled || !t && !e && a(
|
|
4555
|
+
}, [De]), P = G(() => {
|
|
4556
|
+
N(null);
|
|
4557
|
+
}, []), Ae = G(() => {
|
|
4558
|
+
le && (N(null), De(le.cleanIds));
|
|
4559
|
+
}, [le, De]), je = G(() => {
|
|
4560
|
+
le && (N(null), De(le.ids));
|
|
4561
|
+
}, [le, De]);
|
|
4562
|
+
vt(), K(() => {
|
|
4563
|
+
i.enabled || !t && !e && a(ge(`${c.pathname}${c.search}${c.hash}`), { replace: !0 });
|
|
4564
4564
|
}, [
|
|
4565
4565
|
i.enabled,
|
|
4566
4566
|
t,
|
|
@@ -4571,49 +4571,49 @@ function Mo() {
|
|
|
4571
4571
|
c.search
|
|
4572
4572
|
]), K(() => {
|
|
4573
4573
|
let e = n?.id || null, t = r?.id || null;
|
|
4574
|
-
|
|
4574
|
+
C(t, e), Yn.getState().setScope(t, e), e && t && (w(), Yn.getState().hydrate(), kn());
|
|
4575
4575
|
}, [
|
|
4576
4576
|
n?.id,
|
|
4577
4577
|
r?.id,
|
|
4578
|
-
|
|
4579
|
-
|
|
4578
|
+
C,
|
|
4579
|
+
w
|
|
4580
4580
|
]), K(() => {
|
|
4581
|
-
_
|
|
4582
|
-
}, [
|
|
4581
|
+
g(_?.preferences);
|
|
4582
|
+
}, [_, g]), K(() => {
|
|
4583
4583
|
if (!l) return;
|
|
4584
4584
|
let e = Vo(l.navigation, l.screens, c.pathname);
|
|
4585
4585
|
if (e) {
|
|
4586
|
-
|
|
4586
|
+
E(e);
|
|
4587
4587
|
return;
|
|
4588
4588
|
}
|
|
4589
|
-
let t =
|
|
4589
|
+
let t = T;
|
|
4590
4590
|
if ((l.navigation ?? []).some((e) => (e.area || jo) === t)) return;
|
|
4591
4591
|
let n = (l.navigation ?? [])[0]?.area || jo;
|
|
4592
|
-
n !== t &&
|
|
4592
|
+
n !== t && E(n);
|
|
4593
4593
|
}, [
|
|
4594
4594
|
l,
|
|
4595
4595
|
c.pathname,
|
|
4596
|
-
|
|
4596
|
+
T
|
|
4597
4597
|
]), K(() => {
|
|
4598
|
-
|
|
4598
|
+
ie(!1), oe(!1);
|
|
4599
4599
|
}, [c.pathname, c.search]), K(() => {
|
|
4600
4600
|
let e = (e) => {
|
|
4601
4601
|
let t = document.activeElement, n = !!t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable), r = e.metaKey || e.ctrlKey;
|
|
4602
|
-
r && e.key.toLowerCase() === "k" ? (e.preventDefault(),
|
|
4602
|
+
r && e.key.toLowerCase() === "k" ? (e.preventDefault(), Ee("default")) : r && e.key.toLowerCase() === "t" ? (e.preventDefault(), Ee("new")) : r && e.key.toLowerCase() === "b" ? (e.preventDefault(), h("sidebar", d === "collapsed" ? "wide" : "collapsed")) : r && e.key.toLowerCase() === "w" ? (e.preventDefault(), Oe("current")) : r && e.key === "/" ? (e.preventDefault(), de && A((e) => !e)) : e.key === "/" && !n ? (e.preventDefault(), Ee("default")) : e.key === "Escape" && O(!1);
|
|
4603
4603
|
};
|
|
4604
4604
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4605
4605
|
}, [
|
|
4606
|
-
I,
|
|
4607
4606
|
Ee,
|
|
4608
|
-
|
|
4607
|
+
Oe,
|
|
4608
|
+
h,
|
|
4609
4609
|
d,
|
|
4610
4610
|
de
|
|
4611
4611
|
]);
|
|
4612
|
-
let
|
|
4612
|
+
let Me = q(() => l ? Ho(l.navigation, l.screens, c.pathname, y, b, s) : [], [
|
|
4613
4613
|
l,
|
|
4614
4614
|
c.pathname,
|
|
4615
|
+
y,
|
|
4615
4616
|
b,
|
|
4616
|
-
S,
|
|
4617
4617
|
s
|
|
4618
4618
|
]);
|
|
4619
4619
|
if (t) return /* @__PURE__ */ Q("div", {
|
|
@@ -4628,11 +4628,11 @@ function Mo() {
|
|
|
4628
4628
|
children: "Loading…"
|
|
4629
4629
|
});
|
|
4630
4630
|
if (!e) return null;
|
|
4631
|
-
let
|
|
4632
|
-
|
|
4631
|
+
let Ne = (e) => {
|
|
4632
|
+
E(e);
|
|
4633
4633
|
let t = Bo(e, l);
|
|
4634
4634
|
t && s(t);
|
|
4635
|
-
},
|
|
4635
|
+
}, Pe = (e) => {
|
|
4636
4636
|
switch (e.type) {
|
|
4637
4637
|
case "nav":
|
|
4638
4638
|
e.route && s(e.route);
|
|
@@ -4644,18 +4644,18 @@ function Mo() {
|
|
|
4644
4644
|
e.route && s(e.route);
|
|
4645
4645
|
break;
|
|
4646
4646
|
case "ai":
|
|
4647
|
-
de && (
|
|
4647
|
+
de && (j(e.q), A(!0));
|
|
4648
4648
|
break;
|
|
4649
4649
|
case "ai-panel":
|
|
4650
|
-
de && (
|
|
4650
|
+
de && (j(void 0), A(!0));
|
|
4651
4651
|
break;
|
|
4652
4652
|
case "theme":
|
|
4653
|
-
|
|
4653
|
+
h("colorScheme", m === "dark" ? "light" : "dark");
|
|
4654
4654
|
break;
|
|
4655
|
-
case "tab-close": e.tabCloseScope &&
|
|
4655
|
+
case "tab-close": e.tabCloseScope && Oe(e.tabCloseScope);
|
|
4656
4656
|
}
|
|
4657
4657
|
};
|
|
4658
|
-
return i.enabled ? /* @__PURE__ */ $(
|
|
4658
|
+
return i.enabled ? /* @__PURE__ */ $(Tt, { children: [
|
|
4659
4659
|
/* @__PURE__ */ Q(Mi, {}),
|
|
4660
4660
|
/* @__PURE__ */ Q(Ti, {}),
|
|
4661
4661
|
/* @__PURE__ */ Q(Pi, {}),
|
|
@@ -4667,49 +4667,49 @@ function Mo() {
|
|
|
4667
4667
|
style: { height: "var(--app-height)" },
|
|
4668
4668
|
children: /* @__PURE__ */ Q(Gr, {})
|
|
4669
4669
|
})
|
|
4670
|
-
] }) : /* @__PURE__ */ Q(
|
|
4670
|
+
] }) : /* @__PURE__ */ Q(Tt, { children: /* @__PURE__ */ $("div", {
|
|
4671
4671
|
id: "app",
|
|
4672
4672
|
"data-sidebar": d,
|
|
4673
4673
|
"data-mobile-shell": he ? "true" : void 0,
|
|
4674
4674
|
style: No({
|
|
4675
4675
|
mobileShell: he,
|
|
4676
|
-
showTopbar:
|
|
4677
|
-
showRail:
|
|
4678
|
-
showSidebar:
|
|
4676
|
+
showTopbar: _e,
|
|
4677
|
+
showRail: ve,
|
|
4678
|
+
showSidebar: ye,
|
|
4679
4679
|
sidebarMode: d
|
|
4680
4680
|
}),
|
|
4681
4681
|
children: [
|
|
4682
4682
|
/* @__PURE__ */ Q(na, {}),
|
|
4683
4683
|
/* @__PURE__ */ Q(ra, {}),
|
|
4684
|
-
|
|
4685
|
-
breadcrumbs:
|
|
4684
|
+
_e && /* @__PURE__ */ Q(Qi, {
|
|
4685
|
+
breadcrumbs: Me,
|
|
4686
4686
|
onCrumbClick: (e) => e.onClick && e.onClick(),
|
|
4687
|
-
showNavButton:
|
|
4687
|
+
showNavButton: xe,
|
|
4688
4688
|
navButtonRef: se,
|
|
4689
|
-
onOpenNav: () =>
|
|
4690
|
-
showTabsButton:
|
|
4689
|
+
onOpenNav: () => ie(!0),
|
|
4690
|
+
showTabsButton: Se,
|
|
4691
4691
|
tabsButtonRef: ce,
|
|
4692
|
-
onOpenTabs: () =>
|
|
4693
|
-
mobileTabCount:
|
|
4694
|
-
onCmdK: () =>
|
|
4695
|
-
onToggleAI: () => de &&
|
|
4696
|
-
aiOpen:
|
|
4692
|
+
onOpenTabs: () => oe(!0),
|
|
4693
|
+
mobileTabCount: y.length,
|
|
4694
|
+
onCmdK: () => Ee("default"),
|
|
4695
|
+
onToggleAI: () => de && A((e) => !e),
|
|
4696
|
+
aiOpen: k,
|
|
4697
4697
|
onOpenProfile: () => s("/profile"),
|
|
4698
4698
|
onOpenPrefs: () => s("/preferences"),
|
|
4699
|
-
showTenantSwitcher:
|
|
4700
|
-
showBreadcrumbs:
|
|
4701
|
-
showThemeToggle:
|
|
4699
|
+
showTenantSwitcher: Ce,
|
|
4700
|
+
showBreadcrumbs: we,
|
|
4701
|
+
showThemeToggle: Te
|
|
4702
4702
|
}),
|
|
4703
|
-
|
|
4704
|
-
activeArea:
|
|
4705
|
-
onPick:
|
|
4706
|
-
onToggleAI: () => de &&
|
|
4707
|
-
aiOpen:
|
|
4708
|
-
onCmdK: () =>
|
|
4703
|
+
ve && /* @__PURE__ */ Q(pi, {
|
|
4704
|
+
activeArea: T,
|
|
4705
|
+
onPick: Ne,
|
|
4706
|
+
onToggleAI: () => de && A((e) => !e),
|
|
4707
|
+
aiOpen: k,
|
|
4708
|
+
onCmdK: () => Ee("default"),
|
|
4709
4709
|
areas: l?.areas,
|
|
4710
4710
|
branding: pe
|
|
4711
4711
|
}),
|
|
4712
|
-
|
|
4712
|
+
ye && /* @__PURE__ */ Q(Fi, { activeArea: T }),
|
|
4713
4713
|
/* @__PURE__ */ $("main", {
|
|
4714
4714
|
style: {
|
|
4715
4715
|
gridArea: "main",
|
|
@@ -4719,9 +4719,9 @@ function Mo() {
|
|
|
4719
4719
|
minWidth: 0
|
|
4720
4720
|
},
|
|
4721
4721
|
children: [
|
|
4722
|
-
|
|
4723
|
-
onNew: () =>
|
|
4724
|
-
onCloseRequest:
|
|
4722
|
+
be && f === "top" && /* @__PURE__ */ Q($i, {
|
|
4723
|
+
onNew: () => Ee("new"),
|
|
4724
|
+
onCloseRequest: Oe
|
|
4725
4725
|
}),
|
|
4726
4726
|
/* @__PURE__ */ Q("div", {
|
|
4727
4727
|
style: {
|
|
@@ -4733,57 +4733,57 @@ function Mo() {
|
|
|
4733
4733
|
},
|
|
4734
4734
|
children: /* @__PURE__ */ Q(Gr, {})
|
|
4735
4735
|
}),
|
|
4736
|
-
|
|
4737
|
-
onNew: () =>
|
|
4738
|
-
onCloseRequest:
|
|
4736
|
+
be && f === "bottom" && /* @__PURE__ */ Q($i, {
|
|
4737
|
+
onNew: () => Ee("new"),
|
|
4738
|
+
onCloseRequest: Oe
|
|
4739
4739
|
})
|
|
4740
4740
|
]
|
|
4741
4741
|
}),
|
|
4742
4742
|
ue && /* @__PURE__ */ Q(ca, {
|
|
4743
|
-
open:
|
|
4743
|
+
open: D,
|
|
4744
4744
|
mode: ee,
|
|
4745
|
-
onClose: () =>
|
|
4746
|
-
onAction: (e) =>
|
|
4745
|
+
onClose: () => O(!1),
|
|
4746
|
+
onAction: (e) => Pe(e),
|
|
4747
4747
|
navigation: l?.navigation,
|
|
4748
4748
|
screens: l?.screens,
|
|
4749
4749
|
includeAI: fe,
|
|
4750
4750
|
aiName: me
|
|
4751
4751
|
}),
|
|
4752
|
-
de &&
|
|
4753
|
-
open:
|
|
4752
|
+
de && k && /* @__PURE__ */ Q(ro, {
|
|
4753
|
+
open: k,
|
|
4754
4754
|
onClose: () => {
|
|
4755
|
-
|
|
4755
|
+
A(!1), j(void 0);
|
|
4756
4756
|
},
|
|
4757
4757
|
title: me,
|
|
4758
4758
|
askOnOpen: ne
|
|
4759
4759
|
}),
|
|
4760
|
-
|
|
4761
|
-
open:
|
|
4762
|
-
activeArea:
|
|
4760
|
+
xe && /* @__PURE__ */ Q(Ro, {
|
|
4761
|
+
open: re,
|
|
4762
|
+
activeArea: T,
|
|
4763
4763
|
schema: l,
|
|
4764
4764
|
returnFocusRef: se,
|
|
4765
|
-
onClose: () =>
|
|
4765
|
+
onClose: () => ie(!1),
|
|
4766
4766
|
onNavigate: s
|
|
4767
4767
|
}),
|
|
4768
|
-
|
|
4769
|
-
open:
|
|
4770
|
-
tabs:
|
|
4771
|
-
activeTabId:
|
|
4768
|
+
Se && /* @__PURE__ */ Q(zo, {
|
|
4769
|
+
open: ae,
|
|
4770
|
+
tabs: y,
|
|
4771
|
+
activeTabId: b,
|
|
4772
4772
|
returnFocusRef: ce,
|
|
4773
|
-
onClose: () =>
|
|
4773
|
+
onClose: () => oe(!1),
|
|
4774
4774
|
onSwitch: (e) => {
|
|
4775
|
-
|
|
4775
|
+
S(e.id), a({
|
|
4776
4776
|
pathname: e.pathname,
|
|
4777
4777
|
search: e.search
|
|
4778
|
-
}, { replace: !1 }),
|
|
4778
|
+
}, { replace: !1 }), oe(!1);
|
|
4779
4779
|
},
|
|
4780
|
-
onCloseTab: (e) =>
|
|
4780
|
+
onCloseTab: (e) => Oe("current", e)
|
|
4781
4781
|
}),
|
|
4782
4782
|
/* @__PURE__ */ Q(ta, {
|
|
4783
|
-
pending:
|
|
4784
|
-
onCancel:
|
|
4785
|
-
onCloseClean:
|
|
4786
|
-
onDiscardAll:
|
|
4783
|
+
pending: le,
|
|
4784
|
+
onCancel: P,
|
|
4785
|
+
onCloseClean: Ae,
|
|
4786
|
+
onDiscardAll: je
|
|
4787
4787
|
})
|
|
4788
4788
|
]
|
|
4789
4789
|
}) });
|
|
@@ -4860,13 +4860,13 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
4860
4860
|
a,
|
|
4861
4861
|
i
|
|
4862
4862
|
]), !e || !r) return null;
|
|
4863
|
-
let
|
|
4864
|
-
|
|
4865
|
-
let
|
|
4863
|
+
let d = Array.from(new Set((r.navigation ?? []).map((e) => e.area || jo)));
|
|
4864
|
+
d.length === 0 && d.push(jo);
|
|
4865
|
+
let f = (e) => {
|
|
4866
4866
|
let t = r.areas?.find((t) => t.code === e);
|
|
4867
|
-
return
|
|
4868
|
-
},
|
|
4869
|
-
let n = e.screen ? r.screens[e.screen] : void 0, i = [...e.items ?? [], ...e.children ?? []], s =
|
|
4867
|
+
return z(t?.name) || (e === jo ? "Navigation" : e);
|
|
4868
|
+
}, p = (e, t) => {
|
|
4869
|
+
let n = e.screen ? r.screens[e.screen] : void 0, i = [...e.items ?? [], ...e.children ?? []], s = z(e.name) || (n ? z(n.display?.name) : "");
|
|
4870
4870
|
return /* @__PURE__ */ $("div", {
|
|
4871
4871
|
style: {
|
|
4872
4872
|
display: "flex",
|
|
@@ -4911,7 +4911,7 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
4911
4911
|
textTransform: "uppercase"
|
|
4912
4912
|
},
|
|
4913
4913
|
children: s
|
|
4914
|
-
}) : null, i.map((e) =>
|
|
4914
|
+
}) : null, i.map((e) => p(e, t + 1))]
|
|
4915
4915
|
}, `${t}-${e.screen ?? s}`);
|
|
4916
4916
|
};
|
|
4917
4917
|
return /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q("div", {
|
|
@@ -4961,7 +4961,7 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
4961
4961
|
flex: 1
|
|
4962
4962
|
},
|
|
4963
4963
|
children: "Navigation"
|
|
4964
|
-
}), /* @__PURE__ */ Q(
|
|
4964
|
+
}), /* @__PURE__ */ Q(u, {
|
|
4965
4965
|
icon: /* @__PURE__ */ Q(n.x, { size: 15 }),
|
|
4966
4966
|
title: "Close navigation",
|
|
4967
4967
|
onClick: a
|
|
@@ -4974,7 +4974,7 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
4974
4974
|
flexDirection: "column",
|
|
4975
4975
|
gap: 6
|
|
4976
4976
|
},
|
|
4977
|
-
children:
|
|
4977
|
+
children: d.map((e) => {
|
|
4978
4978
|
let i = s === e, a = Ii(r.navigation ?? [], e);
|
|
4979
4979
|
return /* @__PURE__ */ $("section", { children: [/* @__PURE__ */ $("button", {
|
|
4980
4980
|
type: "button",
|
|
@@ -5000,7 +5000,7 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
5000
5000
|
flex: 1,
|
|
5001
5001
|
textAlign: "left"
|
|
5002
5002
|
},
|
|
5003
|
-
children:
|
|
5003
|
+
children: f(e)
|
|
5004
5004
|
}), Q(i ? n.down : n.right, { size: 13 })]
|
|
5005
5005
|
}), i && /* @__PURE__ */ Q("div", {
|
|
5006
5006
|
style: { padding: "6px 0 4px" },
|
|
@@ -5014,7 +5014,7 @@ function Ro({ open: e, activeArea: t, schema: r, returnFocusRef: i, onClose: a,
|
|
|
5014
5014
|
textTransform: "uppercase"
|
|
5015
5015
|
},
|
|
5016
5016
|
children: t.title
|
|
5017
|
-
}, `${e}-${t.title}`) : null, ...t.items.map((e) =>
|
|
5017
|
+
}, `${e}-${t.title}`) : null, ...t.items.map((e) => p(e, 0))])
|
|
5018
5018
|
})] }, e);
|
|
5019
5019
|
})
|
|
5020
5020
|
})]
|
|
@@ -5085,7 +5085,7 @@ function zo({ open: e, tabs: t, activeTabId: r, returnFocusRef: i, onClose: a, o
|
|
|
5085
5085
|
fontSize: 13
|
|
5086
5086
|
},
|
|
5087
5087
|
children: "Open tabs"
|
|
5088
|
-
}), /* @__PURE__ */ Q(
|
|
5088
|
+
}), /* @__PURE__ */ Q(u, {
|
|
5089
5089
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
5090
5090
|
title: "Close tabs menu",
|
|
5091
5091
|
onClick: a
|
|
@@ -5130,7 +5130,7 @@ function zo({ open: e, tabs: t, activeTabId: r, returnFocusRef: i, onClose: a, o
|
|
|
5130
5130
|
},
|
|
5131
5131
|
children: e.title
|
|
5132
5132
|
})]
|
|
5133
|
-
}), e.closable && /* @__PURE__ */ Q(
|
|
5133
|
+
}), e.closable && /* @__PURE__ */ Q(u, {
|
|
5134
5134
|
icon: /* @__PURE__ */ Q(n.x, { size: 12 }),
|
|
5135
5135
|
title: `Close ${e.title}`,
|
|
5136
5136
|
onClick: () => s(e.id)
|
|
@@ -5208,7 +5208,7 @@ function Ho(e, t, n, r, i, a) {
|
|
|
5208
5208
|
for (let e = 0; e < s.length; e++) {
|
|
5209
5209
|
let r = s[e], i = e === s.length - 1, o = r.screen ? t[r.screen] : void 0;
|
|
5210
5210
|
c.push({
|
|
5211
|
-
label:
|
|
5211
|
+
label: z(r.name) || r.screen || "",
|
|
5212
5212
|
icon: r.icon,
|
|
5213
5213
|
onClick: o ? () => {
|
|
5214
5214
|
a(o.route);
|
|
@@ -5230,7 +5230,7 @@ function Ho(e, t, n, r, i, a) {
|
|
|
5230
5230
|
//#endregion
|
|
5231
5231
|
//#region src/hooks/useText.ts
|
|
5232
5232
|
function Uo() {
|
|
5233
|
-
let { data: e } =
|
|
5233
|
+
let { data: e } = B(), { data: t } = wt(), n = I((e) => e.isAuthenticated), { value: r } = te("ui_language", "en"), i = n ? r : eo(t?.parameters), a = e?.messages;
|
|
5234
5234
|
return G((e, t, n) => {
|
|
5235
5235
|
let r = $a(a, e, i, t);
|
|
5236
5236
|
if (n) for (let [e, t] of Object.entries(n)) r = r.replace(`{${e}}`, String(t));
|
|
@@ -5264,25 +5264,25 @@ function qo(e, t) {
|
|
|
5264
5264
|
return e.slice(0, r) === t.slice(0, r) ? e : `${e}+${n}`;
|
|
5265
5265
|
}
|
|
5266
5266
|
function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a, badges: o, brandName: s }) {
|
|
5267
|
-
let c = Uo(), l = U((e) => e.colorScheme),
|
|
5267
|
+
let c = Uo(), l = U((e) => e.colorScheme), d = M(), f = U((e) => e.set), p = U((e) => e.hydrateFromBranding), m = () => f("colorScheme", l === "dark" ? "light" : "dark"), { branding: h } = dn();
|
|
5268
5268
|
K(() => {
|
|
5269
|
-
|
|
5270
|
-
}, [h,
|
|
5271
|
-
let g = h?.identity, _ = s ?? g?.wordmark ?? g?.app_name ?? "",
|
|
5269
|
+
p(h?.preferences);
|
|
5270
|
+
}, [h, p]);
|
|
5271
|
+
let g = h?.identity, _ = s ?? g?.wordmark ?? g?.app_name ?? "", v = r ?? Go(g?.auth_tagline) ?? "", y = i ?? Go(g?.auth_subtagline) ?? "", b = a ?? g?.version_label ?? "", x = q(() => {
|
|
5272
5272
|
if (o && o.length) return o;
|
|
5273
5273
|
let e = (g?.auth_badges ?? []).map((e) => Go(e)).filter((e) => !!e);
|
|
5274
5274
|
return e.length ? e.slice(0, 8).map((e) => [e, "shield"]) : [];
|
|
5275
|
-
}, [o, g?.auth_badges]),
|
|
5276
|
-
["Security",
|
|
5277
|
-
["Privacy",
|
|
5278
|
-
["Terms",
|
|
5279
|
-
["Docs",
|
|
5275
|
+
}, [o, g?.auth_badges]), S = g?.workspace_domain ?? "", C = !!(t && S), w = g?.status_url ?? "", T = !!w, E = g?.legal_links, D = q(() => [
|
|
5276
|
+
["Security", E?.security_url ?? ""],
|
|
5277
|
+
["Privacy", E?.privacy_url ?? ""],
|
|
5278
|
+
["Terms", E?.terms_url ?? ""],
|
|
5279
|
+
["Docs", E?.docs_url ?? ""]
|
|
5280
5280
|
].filter(([, e]) => !!e), [
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
]),
|
|
5281
|
+
E?.security_url,
|
|
5282
|
+
E?.privacy_url,
|
|
5283
|
+
E?.terms_url,
|
|
5284
|
+
E?.docs_url
|
|
5285
|
+
]), O = g?.legal_entity ?? "", ee = `© ${(/* @__PURE__ */ new Date()).getFullYear()}${O ? ` ${O}` : ""}`, { data: te } = wt(), k = te?.meta, A = qo(k?.version, k?.revision), ne = [k?.region ? `Region: ${k.region}` : "", A ? `Build ${A}` : ""].filter(Boolean).join(" · "), j = d.isPhone || d.height < Wo;
|
|
5286
5286
|
return /* @__PURE__ */ $("div", {
|
|
5287
5287
|
style: {
|
|
5288
5288
|
minHeight: "var(--app-height)",
|
|
@@ -5295,9 +5295,9 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5295
5295
|
children: [
|
|
5296
5296
|
/* @__PURE__ */ $("div", {
|
|
5297
5297
|
style: {
|
|
5298
|
-
paddingTop:
|
|
5299
|
-
paddingBottom:
|
|
5300
|
-
...
|
|
5298
|
+
paddingTop: j ? 12 : 16,
|
|
5299
|
+
paddingBottom: j ? 12 : 16,
|
|
5300
|
+
...j ? W(14) : {
|
|
5301
5301
|
paddingLeft: 20,
|
|
5302
5302
|
paddingRight: 20
|
|
5303
5303
|
},
|
|
@@ -5322,7 +5322,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5322
5322
|
},
|
|
5323
5323
|
children: _
|
|
5324
5324
|
}),
|
|
5325
|
-
|
|
5325
|
+
C && /* @__PURE__ */ $("span", {
|
|
5326
5326
|
className: "mono",
|
|
5327
5327
|
style: {
|
|
5328
5328
|
marginLeft: 6,
|
|
@@ -5336,11 +5336,11 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5336
5336
|
children: [
|
|
5337
5337
|
t,
|
|
5338
5338
|
".",
|
|
5339
|
-
|
|
5339
|
+
S
|
|
5340
5340
|
]
|
|
5341
5341
|
}),
|
|
5342
5342
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
5343
|
-
/* @__PURE__ */ Q(
|
|
5343
|
+
/* @__PURE__ */ Q(u, {
|
|
5344
5344
|
icon: Q(l === "dark" ? n.sun : n.moon, { size: 14 }),
|
|
5345
5345
|
onClick: m,
|
|
5346
5346
|
title: c("auth.toggle_theme", "Toggle theme")
|
|
@@ -5351,11 +5351,11 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5351
5351
|
style: {
|
|
5352
5352
|
flex: 1,
|
|
5353
5353
|
display: "flex",
|
|
5354
|
-
alignItems:
|
|
5354
|
+
alignItems: j ? "flex-start" : "center",
|
|
5355
5355
|
justifyContent: "center",
|
|
5356
|
-
paddingTop:
|
|
5357
|
-
paddingBottom:
|
|
5358
|
-
...
|
|
5356
|
+
paddingTop: j ? 16 : 20,
|
|
5357
|
+
paddingBottom: j ? 12 : 20,
|
|
5358
|
+
...j ? W(12) : {
|
|
5359
5359
|
paddingLeft: 20,
|
|
5360
5360
|
paddingRight: 20
|
|
5361
5361
|
},
|
|
@@ -5364,18 +5364,18 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5364
5364
|
children: /* @__PURE__ */ $("div", {
|
|
5365
5365
|
style: {
|
|
5366
5366
|
display: "grid",
|
|
5367
|
-
gridTemplateColumns:
|
|
5367
|
+
gridTemplateColumns: j ? "minmax(0, 1fr)" : "1fr 1fr",
|
|
5368
5368
|
gap: 0,
|
|
5369
|
-
width:
|
|
5369
|
+
width: j ? "100%" : 980,
|
|
5370
5370
|
maxWidth: "100%",
|
|
5371
|
-
minHeight:
|
|
5371
|
+
minHeight: j ? "auto" : Wo,
|
|
5372
5372
|
background: "var(--surface)",
|
|
5373
5373
|
border: "1px solid var(--border)",
|
|
5374
|
-
borderRadius:
|
|
5374
|
+
borderRadius: j ? 12 : 14,
|
|
5375
5375
|
overflow: "hidden",
|
|
5376
|
-
boxShadow:
|
|
5376
|
+
boxShadow: j ? "var(--shadow-sm)" : "var(--shadow-lg)"
|
|
5377
5377
|
},
|
|
5378
|
-
children: [!
|
|
5378
|
+
children: [!j && /* @__PURE__ */ $("div", {
|
|
5379
5379
|
"data-testid": "auth-brand-panel",
|
|
5380
5380
|
style: {
|
|
5381
5381
|
padding: "36px 36px 28px",
|
|
@@ -5425,7 +5425,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5425
5425
|
},
|
|
5426
5426
|
children: _
|
|
5427
5427
|
}),
|
|
5428
|
-
|
|
5428
|
+
b && /* @__PURE__ */ Q("span", {
|
|
5429
5429
|
className: "mono",
|
|
5430
5430
|
style: {
|
|
5431
5431
|
fontSize: 10,
|
|
@@ -5434,7 +5434,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5434
5434
|
borderRadius: 4,
|
|
5435
5435
|
color: "var(--auth-panel-fg-muted)"
|
|
5436
5436
|
},
|
|
5437
|
-
children:
|
|
5437
|
+
children: b
|
|
5438
5438
|
})
|
|
5439
5439
|
]
|
|
5440
5440
|
}),
|
|
@@ -5467,7 +5467,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5467
5467
|
position: "relative"
|
|
5468
5468
|
},
|
|
5469
5469
|
children: [
|
|
5470
|
-
|
|
5470
|
+
v && /* @__PURE__ */ Q("h1", {
|
|
5471
5471
|
style: {
|
|
5472
5472
|
margin: 0,
|
|
5473
5473
|
fontSize: 26,
|
|
@@ -5475,18 +5475,18 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5475
5475
|
letterSpacing: "-0.022em",
|
|
5476
5476
|
lineHeight: 1.2
|
|
5477
5477
|
},
|
|
5478
|
-
children:
|
|
5478
|
+
children: v
|
|
5479
5479
|
}),
|
|
5480
|
-
|
|
5480
|
+
y && /* @__PURE__ */ Q("p", {
|
|
5481
5481
|
style: {
|
|
5482
5482
|
margin: "10px 0 0",
|
|
5483
5483
|
fontSize: 13,
|
|
5484
5484
|
color: "var(--auth-panel-fg-muted)",
|
|
5485
5485
|
lineHeight: 1.65
|
|
5486
5486
|
},
|
|
5487
|
-
children:
|
|
5487
|
+
children: y
|
|
5488
5488
|
}),
|
|
5489
|
-
|
|
5489
|
+
x.length > 0 && /* @__PURE__ */ Q("div", {
|
|
5490
5490
|
style: {
|
|
5491
5491
|
marginTop: 22,
|
|
5492
5492
|
display: "grid",
|
|
@@ -5495,7 +5495,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5495
5495
|
fontSize: 11.5,
|
|
5496
5496
|
color: "var(--auth-panel-fg-dim)"
|
|
5497
5497
|
},
|
|
5498
|
-
children:
|
|
5498
|
+
children: x.map(([e, t]) => {
|
|
5499
5499
|
let r = n[t];
|
|
5500
5500
|
return /* @__PURE__ */ $("div", {
|
|
5501
5501
|
style: {
|
|
@@ -5510,8 +5510,8 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5510
5510
|
}, e);
|
|
5511
5511
|
})
|
|
5512
5512
|
}),
|
|
5513
|
-
|
|
5514
|
-
href:
|
|
5513
|
+
T && /* @__PURE__ */ Q("a", {
|
|
5514
|
+
href: w,
|
|
5515
5515
|
target: "_blank",
|
|
5516
5516
|
rel: "noopener noreferrer",
|
|
5517
5517
|
className: "mono",
|
|
@@ -5528,7 +5528,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5528
5528
|
color: "var(--auth-panel-fg-muted)",
|
|
5529
5529
|
textDecoration: "none"
|
|
5530
5530
|
},
|
|
5531
|
-
children: Ko(
|
|
5531
|
+
children: Ko(w)
|
|
5532
5532
|
})
|
|
5533
5533
|
]
|
|
5534
5534
|
})
|
|
@@ -5536,7 +5536,7 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5536
5536
|
}), /* @__PURE__ */ Q("div", {
|
|
5537
5537
|
"data-testid": "auth-form-panel",
|
|
5538
5538
|
style: {
|
|
5539
|
-
padding:
|
|
5539
|
+
padding: j ? "28px 20px 24px" : "36px 40px",
|
|
5540
5540
|
display: "flex",
|
|
5541
5541
|
flexDirection: "column",
|
|
5542
5542
|
justifyContent: "center",
|
|
@@ -5548,31 +5548,31 @@ function Jo({ children: e, tenantSlug: t, tagline: r, subTagline: i, version: a,
|
|
|
5548
5548
|
}),
|
|
5549
5549
|
/* @__PURE__ */ $("div", {
|
|
5550
5550
|
style: {
|
|
5551
|
-
padding:
|
|
5551
|
+
padding: j ? "12px 14px calc(12px + var(--safe-area-bottom))" : "14px 20px",
|
|
5552
5552
|
display: "flex",
|
|
5553
|
-
alignItems:
|
|
5554
|
-
flexDirection:
|
|
5555
|
-
gap:
|
|
5553
|
+
alignItems: j ? "flex-start" : "center",
|
|
5554
|
+
flexDirection: j ? "column" : "row",
|
|
5555
|
+
gap: j ? 6 : 16,
|
|
5556
5556
|
fontSize: 11,
|
|
5557
5557
|
color: "var(--text-4)",
|
|
5558
5558
|
minWidth: 0
|
|
5559
5559
|
},
|
|
5560
5560
|
children: [
|
|
5561
|
-
/* @__PURE__ */ Q("span", { children:
|
|
5562
|
-
|
|
5561
|
+
/* @__PURE__ */ Q("span", { children: ee }),
|
|
5562
|
+
D.map(([e, t]) => /* @__PURE__ */ Q("a", {
|
|
5563
5563
|
href: t,
|
|
5564
5564
|
target: "_blank",
|
|
5565
5565
|
rel: "noopener noreferrer",
|
|
5566
5566
|
style: { color: "inherit" },
|
|
5567
5567
|
children: e
|
|
5568
5568
|
}, e)),
|
|
5569
|
-
|
|
5569
|
+
ne && /* @__PURE__ */ $(Z, { children: [!j && /* @__PURE__ */ Q("div", { style: { flex: 1 } }), /* @__PURE__ */ Q("span", {
|
|
5570
5570
|
className: "mono",
|
|
5571
5571
|
style: {
|
|
5572
5572
|
maxWidth: "100%",
|
|
5573
5573
|
overflowWrap: "anywhere"
|
|
5574
5574
|
},
|
|
5575
|
-
children:
|
|
5575
|
+
children: ne
|
|
5576
5576
|
})] })
|
|
5577
5577
|
]
|
|
5578
5578
|
})
|
|
@@ -5700,12 +5700,12 @@ var as = {
|
|
|
5700
5700
|
}
|
|
5701
5701
|
};
|
|
5702
5702
|
function os() {
|
|
5703
|
-
let e = Xr(), [t] = ei(), { login: r, isLoginPending: i, isAuthenticated: a } = Bi(), { data: o } =
|
|
5703
|
+
let e = Xr(), [t] = ei(), { login: r, isLoginPending: i, isAuthenticated: a } = Bi(), { data: o } = wt(), { data: s } = B(), c = Uo(), [l, u] = Y(""), [d, f] = Y(""), [p, m] = Y(!0), h = qt(t.get("next") || t.get("redirect")), g = t.get("sso_error"), _ = eo(o?.parameters), { data: v } = ii({
|
|
5704
5704
|
queryKey: ["check-setup"],
|
|
5705
|
-
queryFn:
|
|
5705
|
+
queryFn: xt
|
|
5706
5706
|
}), { data: y } = ii({
|
|
5707
5707
|
queryKey: ["sso-providers"],
|
|
5708
|
-
queryFn: () =>
|
|
5708
|
+
queryFn: () => It(),
|
|
5709
5709
|
staleTime: 6e4
|
|
5710
5710
|
});
|
|
5711
5711
|
K(() => {
|
|
@@ -5715,7 +5715,7 @@ function os() {
|
|
|
5715
5715
|
let t = $o(h, s);
|
|
5716
5716
|
if (ss(h, t)) {
|
|
5717
5717
|
let e = $a(s.messages, "auth.inaccessible_redirect", _);
|
|
5718
|
-
e &&
|
|
5718
|
+
e && L.warning(e);
|
|
5719
5719
|
}
|
|
5720
5720
|
e(t, { replace: !0 });
|
|
5721
5721
|
}, [
|
|
@@ -5725,23 +5725,23 @@ function os() {
|
|
|
5725
5725
|
h,
|
|
5726
5726
|
s
|
|
5727
5727
|
]), K(() => {
|
|
5728
|
-
g &&
|
|
5728
|
+
g && L.error($a(s?.errors, g, _, "Sign-in failed."));
|
|
5729
5729
|
}, [
|
|
5730
5730
|
_,
|
|
5731
5731
|
s,
|
|
5732
5732
|
g
|
|
5733
5733
|
]);
|
|
5734
|
-
function
|
|
5734
|
+
function x(e) {
|
|
5735
5735
|
e.preventDefault(), r({
|
|
5736
5736
|
email: l,
|
|
5737
5737
|
password: d,
|
|
5738
5738
|
remember: p
|
|
5739
5739
|
}, { onError: (e) => {
|
|
5740
|
-
|
|
5740
|
+
L.error(e.message);
|
|
5741
5741
|
} });
|
|
5742
5742
|
}
|
|
5743
5743
|
return /* @__PURE__ */ Q(Jo, { children: /* @__PURE__ */ $("form", {
|
|
5744
|
-
onSubmit:
|
|
5744
|
+
onSubmit: x,
|
|
5745
5745
|
children: [
|
|
5746
5746
|
/* @__PURE__ */ Q("div", {
|
|
5747
5747
|
style: {
|
|
@@ -5782,7 +5782,7 @@ function os() {
|
|
|
5782
5782
|
name: e.name,
|
|
5783
5783
|
icon: /* @__PURE__ */ Q(n.shield, { size: 13 })
|
|
5784
5784
|
};
|
|
5785
|
-
return /* @__PURE__ */ Q(
|
|
5785
|
+
return /* @__PURE__ */ Q(P, {
|
|
5786
5786
|
size: "md",
|
|
5787
5787
|
style: {
|
|
5788
5788
|
justifyContent: "center",
|
|
@@ -5790,7 +5790,7 @@ function os() {
|
|
|
5790
5790
|
},
|
|
5791
5791
|
icon: t.icon,
|
|
5792
5792
|
onClick: (t) => {
|
|
5793
|
-
t.preventDefault(), window.location.href =
|
|
5793
|
+
t.preventDefault(), window.location.href = be(e.slug, void 0, h);
|
|
5794
5794
|
},
|
|
5795
5795
|
children: c("auth.signin.sso_continue", "Continue with {provider}", { provider: t.name })
|
|
5796
5796
|
}, e.slug);
|
|
@@ -5831,7 +5831,7 @@ function os() {
|
|
|
5831
5831
|
gap: 12
|
|
5832
5832
|
},
|
|
5833
5833
|
children: [
|
|
5834
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
5834
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: c("auth.field.email", "Email") }), /* @__PURE__ */ Q(b, {
|
|
5835
5835
|
value: l,
|
|
5836
5836
|
onChange: u,
|
|
5837
5837
|
prefix: /* @__PURE__ */ Q(n.email, { size: 13 }),
|
|
@@ -5845,7 +5845,7 @@ function os() {
|
|
|
5845
5845
|
alignItems: "center"
|
|
5846
5846
|
},
|
|
5847
5847
|
children: [
|
|
5848
|
-
/* @__PURE__ */ Q(
|
|
5848
|
+
/* @__PURE__ */ Q(F, { children: c("auth.field.password", "Password") }),
|
|
5849
5849
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
5850
5850
|
/* @__PURE__ */ Q(Ur, {
|
|
5851
5851
|
to: "/forgot",
|
|
@@ -5858,7 +5858,7 @@ function os() {
|
|
|
5858
5858
|
children: c("auth.signin.forgot_link", "Forgot?")
|
|
5859
5859
|
})
|
|
5860
5860
|
]
|
|
5861
|
-
}), /* @__PURE__ */ Q(
|
|
5861
|
+
}), /* @__PURE__ */ Q(Ve, {
|
|
5862
5862
|
value: d,
|
|
5863
5863
|
onChange: f,
|
|
5864
5864
|
placeholder: c("auth.signin.password_placeholder", "Your password")
|
|
@@ -5882,7 +5882,7 @@ function os() {
|
|
|
5882
5882
|
c("auth.signin.remember", "Keep me signed in on this device")
|
|
5883
5883
|
]
|
|
5884
5884
|
}),
|
|
5885
|
-
/* @__PURE__ */ Q(
|
|
5885
|
+
/* @__PURE__ */ Q(P, {
|
|
5886
5886
|
type: "submit",
|
|
5887
5887
|
size: "md",
|
|
5888
5888
|
kind: "primary",
|
|
@@ -5927,26 +5927,26 @@ function ss(e, t) {
|
|
|
5927
5927
|
//#endregion
|
|
5928
5928
|
//#region src/components/pages/auth/SignUp.tsx
|
|
5929
5929
|
function cs() {
|
|
5930
|
-
let e = Xr(), { signup: t, isSignupPending: r, isAuthenticated: i } = Bi(), a =
|
|
5930
|
+
let e = Xr(), { signup: t, isSignupPending: r, isAuthenticated: i } = Bi(), a = M(), o = Uo(), [s, c] = Y(""), [l, u] = Y(""), [d, f] = Y(""), [p, m] = Y(""), [h, g] = Y(""), [_, v] = Y(""), [y, x] = Y(!1), { data: S } = wt(), C = Qt(S), w = C?.workspace_domain ?? "", T = C?.legal_links?.terms_url ?? "", E = C?.legal_links?.privacy_url ?? "", D = a.isPhone, { data: O } = ii({
|
|
5931
5931
|
queryKey: ["check-setup"],
|
|
5932
|
-
queryFn:
|
|
5932
|
+
queryFn: xt
|
|
5933
5933
|
});
|
|
5934
5934
|
K(() => {
|
|
5935
|
-
|
|
5936
|
-
}, [
|
|
5935
|
+
O && !O.needs_setup && e("/login", { replace: !0 });
|
|
5936
|
+
}, [O, e]), K(() => {
|
|
5937
5937
|
i && e("/", { replace: !0 });
|
|
5938
5938
|
}, [i, e]);
|
|
5939
|
-
function
|
|
5940
|
-
if (e.preventDefault(), !
|
|
5939
|
+
function ee(e) {
|
|
5940
|
+
if (e.preventDefault(), !y) return;
|
|
5941
5941
|
let n = [s, l].filter(Boolean).join(" ") || d;
|
|
5942
5942
|
t({
|
|
5943
5943
|
email: d,
|
|
5944
|
-
password:
|
|
5944
|
+
password: _,
|
|
5945
5945
|
displayName: n
|
|
5946
5946
|
});
|
|
5947
5947
|
}
|
|
5948
5948
|
return /* @__PURE__ */ Q(Jo, { children: /* @__PURE__ */ $("form", {
|
|
5949
|
-
onSubmit:
|
|
5949
|
+
onSubmit: ee,
|
|
5950
5950
|
children: [
|
|
5951
5951
|
/* @__PURE__ */ Q("div", {
|
|
5952
5952
|
style: {
|
|
@@ -5986,65 +5986,65 @@ function cs() {
|
|
|
5986
5986
|
"data-testid": "signup-name-grid",
|
|
5987
5987
|
style: {
|
|
5988
5988
|
display: "grid",
|
|
5989
|
-
gridTemplateColumns:
|
|
5989
|
+
gridTemplateColumns: D ? "minmax(0, 1fr)" : "1fr 1fr",
|
|
5990
5990
|
gap: 10
|
|
5991
5991
|
},
|
|
5992
|
-
children: [/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
5992
|
+
children: [/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.signup.first_name", "First name") }), /* @__PURE__ */ Q(b, {
|
|
5993
5993
|
value: s,
|
|
5994
5994
|
onChange: c
|
|
5995
|
-
})] }), /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
5995
|
+
})] }), /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.signup.last_name", "Last name") }), /* @__PURE__ */ Q(b, {
|
|
5996
5996
|
value: l,
|
|
5997
5997
|
onChange: u
|
|
5998
5998
|
})] })]
|
|
5999
5999
|
}),
|
|
6000
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6000
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.signup.work_email", "Work email") }), /* @__PURE__ */ Q(b, {
|
|
6001
6001
|
value: d,
|
|
6002
6002
|
onChange: f,
|
|
6003
6003
|
prefix: /* @__PURE__ */ Q(n.email, { size: 13 }),
|
|
6004
6004
|
placeholder: o("auth.signup.work_email_placeholder", "name@company.com"),
|
|
6005
6005
|
required: !0
|
|
6006
6006
|
})] }),
|
|
6007
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6008
|
-
value:
|
|
6009
|
-
onChange:
|
|
6007
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.signup.company", "Company") }), /* @__PURE__ */ Q(b, {
|
|
6008
|
+
value: p,
|
|
6009
|
+
onChange: m,
|
|
6010
6010
|
prefix: /* @__PURE__ */ Q(n.building, { size: 13 })
|
|
6011
6011
|
})] }),
|
|
6012
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6012
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.signup.workspace_url", "Workspace URL") }), /* @__PURE__ */ $("div", {
|
|
6013
6013
|
style: {
|
|
6014
6014
|
display: "flex",
|
|
6015
|
-
flexDirection:
|
|
6015
|
+
flexDirection: D ? "column" : "row",
|
|
6016
6016
|
alignItems: "stretch",
|
|
6017
6017
|
border: "1px solid var(--border)",
|
|
6018
6018
|
borderRadius: 6,
|
|
6019
6019
|
overflow: "hidden",
|
|
6020
6020
|
minWidth: 0
|
|
6021
6021
|
},
|
|
6022
|
-
children: [/* @__PURE__ */ Q(
|
|
6023
|
-
value:
|
|
6024
|
-
onChange:
|
|
6022
|
+
children: [/* @__PURE__ */ Q(b, {
|
|
6023
|
+
value: h,
|
|
6024
|
+
onChange: g,
|
|
6025
6025
|
style: {
|
|
6026
6026
|
border: 0,
|
|
6027
6027
|
borderRadius: 0
|
|
6028
6028
|
}
|
|
6029
|
-
}),
|
|
6029
|
+
}), w && /* @__PURE__ */ $("span", {
|
|
6030
6030
|
className: "mono",
|
|
6031
6031
|
style: {
|
|
6032
6032
|
display: "flex",
|
|
6033
6033
|
alignItems: "center",
|
|
6034
|
-
padding:
|
|
6034
|
+
padding: D ? "8px 10px" : "0 10px",
|
|
6035
6035
|
background: "var(--surface-2)",
|
|
6036
|
-
borderLeft:
|
|
6037
|
-
borderTop:
|
|
6036
|
+
borderLeft: D ? 0 : "1px solid var(--border)",
|
|
6037
|
+
borderTop: D ? "1px solid var(--border)" : 0,
|
|
6038
6038
|
fontSize: 12,
|
|
6039
6039
|
color: "var(--text-3)",
|
|
6040
6040
|
overflowWrap: "anywhere"
|
|
6041
6041
|
},
|
|
6042
|
-
children: [".",
|
|
6042
|
+
children: [".", w]
|
|
6043
6043
|
})]
|
|
6044
6044
|
})] }),
|
|
6045
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6046
|
-
value:
|
|
6047
|
-
onChange:
|
|
6045
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: o("auth.field.password", "Password") }), /* @__PURE__ */ Q(Ve, {
|
|
6046
|
+
value: _,
|
|
6047
|
+
onChange: v,
|
|
6048
6048
|
placeholder: o("auth.signup.password_placeholder", "At least 12 characters"),
|
|
6049
6049
|
showStrength: !0
|
|
6050
6050
|
})] }),
|
|
@@ -6060,15 +6060,15 @@ function cs() {
|
|
|
6060
6060
|
children: [/* @__PURE__ */ Q("input", {
|
|
6061
6061
|
type: "checkbox",
|
|
6062
6062
|
style: { marginTop: 2 },
|
|
6063
|
-
checked:
|
|
6063
|
+
checked: y,
|
|
6064
6064
|
onChange: (e) => x(e.target.checked)
|
|
6065
6065
|
}), /* @__PURE__ */ Q(ls, {
|
|
6066
|
-
termsUrl:
|
|
6067
|
-
privacyUrl:
|
|
6066
|
+
termsUrl: T,
|
|
6067
|
+
privacyUrl: E,
|
|
6068
6068
|
t: o
|
|
6069
6069
|
})]
|
|
6070
6070
|
}),
|
|
6071
|
-
/* @__PURE__ */ Q(
|
|
6071
|
+
/* @__PURE__ */ Q(P, {
|
|
6072
6072
|
type: "submit",
|
|
6073
6073
|
size: "md",
|
|
6074
6074
|
kind: "primary",
|
|
@@ -6076,7 +6076,7 @@ function cs() {
|
|
|
6076
6076
|
justifyContent: "center",
|
|
6077
6077
|
width: "100%"
|
|
6078
6078
|
},
|
|
6079
|
-
disabled: r || !
|
|
6079
|
+
disabled: r || !y,
|
|
6080
6080
|
children: r ? o("auth.signup.submitting", "Creating…") : o("auth.signup.submit", "Create workspace")
|
|
6081
6081
|
}),
|
|
6082
6082
|
/* @__PURE__ */ $("div", {
|
|
@@ -6134,7 +6134,7 @@ function us() {
|
|
|
6134
6134
|
if (e.preventDefault(), !o) {
|
|
6135
6135
|
s(!0);
|
|
6136
6136
|
try {
|
|
6137
|
-
await
|
|
6137
|
+
await Ce("auth.request_password_reset", { email: t });
|
|
6138
6138
|
} catch {} finally {
|
|
6139
6139
|
a(!0), s(!1);
|
|
6140
6140
|
}
|
|
@@ -6190,7 +6190,7 @@ function us() {
|
|
|
6190
6190
|
gap: 12
|
|
6191
6191
|
},
|
|
6192
6192
|
children: [
|
|
6193
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6193
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: e("auth.field.email", "Email") }), /* @__PURE__ */ Q(b, {
|
|
6194
6194
|
value: t,
|
|
6195
6195
|
onChange: r,
|
|
6196
6196
|
prefix: /* @__PURE__ */ Q(n.email, { size: 13 }),
|
|
@@ -6200,7 +6200,7 @@ function us() {
|
|
|
6200
6200
|
type: "email",
|
|
6201
6201
|
"aria-label": e("auth.field.email", "Email")
|
|
6202
6202
|
})] }),
|
|
6203
|
-
/* @__PURE__ */ Q(
|
|
6203
|
+
/* @__PURE__ */ Q(P, {
|
|
6204
6204
|
type: "submit",
|
|
6205
6205
|
size: "md",
|
|
6206
6206
|
kind: "primary",
|
|
@@ -6241,24 +6241,24 @@ function gs() {
|
|
|
6241
6241
|
e && e.remove();
|
|
6242
6242
|
}
|
|
6243
6243
|
function _s() {
|
|
6244
|
-
let e = Uo(), t = Xr(), [r] = Y(() => ms()), [i, a] = Y(""), [o, s] = Y(""), [c,
|
|
6244
|
+
let e = Uo(), t = Xr(), [r] = Y(() => ms()), [i, a] = Y(""), [o, s] = Y(""), [c, u] = Y(""), [d, f] = Y(!1), [p, m] = Y(null);
|
|
6245
6245
|
K(() => {
|
|
6246
6246
|
if (r) return typeof window < "u" && typeof window.history?.replaceState == "function" && window.history.replaceState(null, "", "/reset"), hs(), gs;
|
|
6247
6247
|
}, [r]);
|
|
6248
|
-
let
|
|
6249
|
-
async function
|
|
6250
|
-
if (e.preventDefault(), !
|
|
6248
|
+
let h = q(() => !r, [r]);
|
|
6249
|
+
async function g(e) {
|
|
6250
|
+
if (e.preventDefault(), !d) {
|
|
6251
6251
|
if (o !== c) {
|
|
6252
|
-
|
|
6252
|
+
m("Passwords do not match.");
|
|
6253
6253
|
return;
|
|
6254
6254
|
}
|
|
6255
6255
|
if (o.length < ds) {
|
|
6256
|
-
|
|
6256
|
+
m(`Password must be at least ${ds} characters.`);
|
|
6257
6257
|
return;
|
|
6258
6258
|
}
|
|
6259
|
-
|
|
6259
|
+
f(!0), m(null);
|
|
6260
6260
|
try {
|
|
6261
|
-
await
|
|
6261
|
+
await Ce("auth.reset_password", {
|
|
6262
6262
|
email: i,
|
|
6263
6263
|
token: r,
|
|
6264
6264
|
password: o
|
|
@@ -6271,9 +6271,9 @@ function _s() {
|
|
|
6271
6271
|
} catch {}
|
|
6272
6272
|
t("/login", { replace: !0 });
|
|
6273
6273
|
} catch (e) {
|
|
6274
|
-
e instanceof
|
|
6274
|
+
e instanceof l && e.code === "auth.password_reused" ? m("Your new password must differ from your current password.") : e instanceof l && e.code === "auth.password_too_short" ? m(`Password must be at least ${ds} characters.`) : m("Invalid or expired link. Please request a new one.");
|
|
6275
6275
|
} finally {
|
|
6276
|
-
|
|
6276
|
+
f(!1);
|
|
6277
6277
|
}
|
|
6278
6278
|
}
|
|
6279
6279
|
}
|
|
@@ -6298,7 +6298,7 @@ function _s() {
|
|
|
6298
6298
|
},
|
|
6299
6299
|
children: e("auth.reset.title", "Choose a new password")
|
|
6300
6300
|
}),
|
|
6301
|
-
|
|
6301
|
+
h ? /* @__PURE__ */ $("div", {
|
|
6302
6302
|
"data-testid": "reset-invalid-link",
|
|
6303
6303
|
children: [/* @__PURE__ */ Q("p", {
|
|
6304
6304
|
className: "text-muted-foreground",
|
|
@@ -6314,7 +6314,7 @@ function _s() {
|
|
|
6314
6314
|
children: "Request a new reset link"
|
|
6315
6315
|
})]
|
|
6316
6316
|
}) : /* @__PURE__ */ $("form", {
|
|
6317
|
-
onSubmit:
|
|
6317
|
+
onSubmit: g,
|
|
6318
6318
|
"data-testid": "reset-form",
|
|
6319
6319
|
children: [/* @__PURE__ */ Q("p", {
|
|
6320
6320
|
className: "text-muted-foreground",
|
|
@@ -6330,7 +6330,7 @@ function _s() {
|
|
|
6330
6330
|
gap: 12
|
|
6331
6331
|
},
|
|
6332
6332
|
children: [
|
|
6333
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6333
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: e("auth.field.email", "Email") }), /* @__PURE__ */ Q(b, {
|
|
6334
6334
|
value: i,
|
|
6335
6335
|
onChange: a,
|
|
6336
6336
|
prefix: /* @__PURE__ */ Q(n.email, { size: 13 }),
|
|
@@ -6340,18 +6340,18 @@ function _s() {
|
|
|
6340
6340
|
type: "email",
|
|
6341
6341
|
"aria-label": e("auth.field.email", "Email")
|
|
6342
6342
|
})] }),
|
|
6343
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6343
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: e("auth.reset.new_password", "New password") }), /* @__PURE__ */ Q(Ve, {
|
|
6344
6344
|
value: o,
|
|
6345
6345
|
onChange: s,
|
|
6346
6346
|
placeholder: e("auth.reset.new_password_placeholder", "At least 8 characters"),
|
|
6347
6347
|
showStrength: !0
|
|
6348
6348
|
})] }),
|
|
6349
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6349
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, { children: e("auth.reset.confirm_password", "Confirm new password") }), /* @__PURE__ */ Q(Ve, {
|
|
6350
6350
|
value: c,
|
|
6351
|
-
onChange:
|
|
6351
|
+
onChange: u,
|
|
6352
6352
|
placeholder: e("auth.reset.confirm_password_placeholder", "Re-enter new password")
|
|
6353
6353
|
})] }),
|
|
6354
|
-
|
|
6354
|
+
p && /* @__PURE__ */ Q("div", {
|
|
6355
6355
|
"data-testid": "reset-error",
|
|
6356
6356
|
role: "alert",
|
|
6357
6357
|
className: "bg-destructive-soft text-destructive",
|
|
@@ -6360,9 +6360,9 @@ function _s() {
|
|
|
6360
6360
|
borderRadius: 8,
|
|
6361
6361
|
fontSize: 12.5
|
|
6362
6362
|
},
|
|
6363
|
-
children:
|
|
6363
|
+
children: p
|
|
6364
6364
|
}),
|
|
6365
|
-
/* @__PURE__ */ Q(
|
|
6365
|
+
/* @__PURE__ */ Q(P, {
|
|
6366
6366
|
type: "submit",
|
|
6367
6367
|
size: "md",
|
|
6368
6368
|
kind: "primary",
|
|
@@ -6370,8 +6370,8 @@ function _s() {
|
|
|
6370
6370
|
justifyContent: "center",
|
|
6371
6371
|
width: "100%"
|
|
6372
6372
|
},
|
|
6373
|
-
disabled:
|
|
6374
|
-
children:
|
|
6373
|
+
disabled: d,
|
|
6374
|
+
children: d ? e("auth.reset.submitting", "Updating…") : e("auth.reset.submit", "Update password")
|
|
6375
6375
|
}),
|
|
6376
6376
|
/* @__PURE__ */ Q(Ur, {
|
|
6377
6377
|
to: "/login",
|
|
@@ -6388,7 +6388,7 @@ function _s() {
|
|
|
6388
6388
|
//#endregion
|
|
6389
6389
|
//#region src/components/pages/auth/TwoFA.tsx
|
|
6390
6390
|
function vs() {
|
|
6391
|
-
let e = Uo(), t = Xr(), n = J([]), r =
|
|
6391
|
+
let e = Uo(), t = Xr(), n = J([]), r = M().isPhone;
|
|
6392
6392
|
function i(e) {
|
|
6393
6393
|
n.current[e]?.focus(), n.current[e]?.select();
|
|
6394
6394
|
}
|
|
@@ -6468,7 +6468,7 @@ function vs() {
|
|
|
6468
6468
|
}
|
|
6469
6469
|
}, e))
|
|
6470
6470
|
}),
|
|
6471
|
-
/* @__PURE__ */ Q(
|
|
6471
|
+
/* @__PURE__ */ Q(P, {
|
|
6472
6472
|
size: "md",
|
|
6473
6473
|
kind: "primary",
|
|
6474
6474
|
style: {
|
|
@@ -6506,11 +6506,11 @@ function vs() {
|
|
|
6506
6506
|
//#endregion
|
|
6507
6507
|
//#region src/components/pages/SSOCallbackPage.tsx
|
|
6508
6508
|
function ys() {
|
|
6509
|
-
let e = Xr(), [t] = ei(), { setUser: n, setTenants: r } =
|
|
6509
|
+
let e = Xr(), [t] = ei(), { setUser: n, setTenants: r } = I(), i = ai();
|
|
6510
6510
|
return K(() => {
|
|
6511
|
-
let a =
|
|
6512
|
-
|
|
6513
|
-
n(t, t.tenant), i.invalidateQueries({ queryKey: ["schema"] }),
|
|
6511
|
+
let a = qt(t.get("redirect"));
|
|
6512
|
+
mt().then((t) => {
|
|
6513
|
+
n(t, t.tenant), i.invalidateQueries({ queryKey: ["schema"] }), Wt().then(r).catch(() => {}), e(a, { replace: !0 });
|
|
6514
6514
|
}).catch(() => {
|
|
6515
6515
|
e("/login?sso_error=auth.unauthorized", { replace: !0 });
|
|
6516
6516
|
});
|
|
@@ -6531,7 +6531,7 @@ function ys() {
|
|
|
6531
6531
|
//#endregion
|
|
6532
6532
|
//#region src/components/pages/NotFoundPage.tsx
|
|
6533
6533
|
function bs() {
|
|
6534
|
-
let e =
|
|
6534
|
+
let e = ke(), t = ie(), n = Jr(), r = ce();
|
|
6535
6535
|
return K(() => {
|
|
6536
6536
|
e.enabled && r(n.pathname, "not_found");
|
|
6537
6537
|
}, [
|
|
@@ -6581,7 +6581,7 @@ function bs() {
|
|
|
6581
6581
|
}),
|
|
6582
6582
|
/* @__PURE__ */ Q("div", {
|
|
6583
6583
|
style: { marginTop: 24 },
|
|
6584
|
-
children: /* @__PURE__ */ Q(
|
|
6584
|
+
children: /* @__PURE__ */ Q(P, {
|
|
6585
6585
|
onClick: () => t("/"),
|
|
6586
6586
|
children: "Go home"
|
|
6587
6587
|
})
|
|
@@ -6593,15 +6593,15 @@ function bs() {
|
|
|
6593
6593
|
//#endregion
|
|
6594
6594
|
//#region src/components/shared/ChangePasswordDialog.tsx
|
|
6595
6595
|
function xs({ open: e, onClose: t, onSubmit: r }) {
|
|
6596
|
-
let i =
|
|
6596
|
+
let i = M().isPhone, [a, o] = Y(""), [s, c] = Y(""), [l, d] = Y(""), [f, p] = Y(!1), [m, h] = Y(null);
|
|
6597
6597
|
if (!e) return null;
|
|
6598
|
-
let
|
|
6599
|
-
o(""), c(""), d(""),
|
|
6600
|
-
},
|
|
6601
|
-
|
|
6602
|
-
},
|
|
6598
|
+
let g = () => {
|
|
6599
|
+
o(""), c(""), d(""), h(null), p(!1);
|
|
6600
|
+
}, _ = () => {
|
|
6601
|
+
g(), t();
|
|
6602
|
+
}, v = a.length > 0 && s.length >= 8 && l === s;
|
|
6603
6603
|
return /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q("div", {
|
|
6604
|
-
onClick:
|
|
6604
|
+
onClick: _,
|
|
6605
6605
|
style: {
|
|
6606
6606
|
position: "fixed",
|
|
6607
6607
|
inset: 0,
|
|
@@ -6664,10 +6664,10 @@ function xs({ open: e, onClose: t, onSubmit: r }) {
|
|
|
6664
6664
|
children: "Pick something strong. You'll stay signed in on this device."
|
|
6665
6665
|
})]
|
|
6666
6666
|
}),
|
|
6667
|
-
/* @__PURE__ */ Q(
|
|
6667
|
+
/* @__PURE__ */ Q(u, {
|
|
6668
6668
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
6669
6669
|
title: "Close",
|
|
6670
|
-
onClick:
|
|
6670
|
+
onClick: _
|
|
6671
6671
|
})
|
|
6672
6672
|
]
|
|
6673
6673
|
}),
|
|
@@ -6679,32 +6679,32 @@ function xs({ open: e, onClose: t, onSubmit: r }) {
|
|
|
6679
6679
|
gap: 12
|
|
6680
6680
|
},
|
|
6681
6681
|
children: [
|
|
6682
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6682
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, {
|
|
6683
6683
|
required: !0,
|
|
6684
6684
|
children: "Current password"
|
|
6685
|
-
}), /* @__PURE__ */ Q(
|
|
6685
|
+
}), /* @__PURE__ */ Q(Ve, {
|
|
6686
6686
|
value: a,
|
|
6687
6687
|
onChange: o,
|
|
6688
6688
|
placeholder: "Enter your current password"
|
|
6689
6689
|
})] }),
|
|
6690
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6690
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, {
|
|
6691
6691
|
required: !0,
|
|
6692
6692
|
children: "New password"
|
|
6693
|
-
}), /* @__PURE__ */ Q(
|
|
6693
|
+
}), /* @__PURE__ */ Q(Ve, {
|
|
6694
6694
|
value: s,
|
|
6695
6695
|
onChange: c,
|
|
6696
6696
|
placeholder: "At least 8 characters",
|
|
6697
6697
|
showStrength: !0
|
|
6698
6698
|
})] }),
|
|
6699
|
-
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
6699
|
+
/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, {
|
|
6700
6700
|
required: !0,
|
|
6701
6701
|
children: "Confirm new password"
|
|
6702
|
-
}), /* @__PURE__ */ Q(
|
|
6702
|
+
}), /* @__PURE__ */ Q(Ve, {
|
|
6703
6703
|
value: l,
|
|
6704
6704
|
onChange: d,
|
|
6705
6705
|
placeholder: "Re-enter new password"
|
|
6706
6706
|
})] }),
|
|
6707
|
-
|
|
6707
|
+
m && /* @__PURE__ */ $("div", {
|
|
6708
6708
|
style: {
|
|
6709
6709
|
padding: "8px 10px",
|
|
6710
6710
|
background: "var(--danger-soft)",
|
|
@@ -6714,7 +6714,7 @@ function xs({ open: e, onClose: t, onSubmit: r }) {
|
|
|
6714
6714
|
display: "flex",
|
|
6715
6715
|
gap: 6
|
|
6716
6716
|
},
|
|
6717
|
-
children: [/* @__PURE__ */ Q(n.info, { size: 13 }), /* @__PURE__ */ Q("span", { children:
|
|
6717
|
+
children: [/* @__PURE__ */ Q(n.info, { size: 13 }), /* @__PURE__ */ Q("span", { children: m })]
|
|
6718
6718
|
})
|
|
6719
6719
|
]
|
|
6720
6720
|
}),
|
|
@@ -6739,31 +6739,31 @@ function xs({ open: e, onClose: t, onSubmit: r }) {
|
|
|
6739
6739
|
children: "auth.change_password@v1"
|
|
6740
6740
|
}),
|
|
6741
6741
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
6742
|
-
/* @__PURE__ */ Q(
|
|
6743
|
-
onClick:
|
|
6742
|
+
/* @__PURE__ */ Q(P, {
|
|
6743
|
+
onClick: _,
|
|
6744
6744
|
children: "Cancel"
|
|
6745
6745
|
}),
|
|
6746
|
-
/* @__PURE__ */ Q(
|
|
6746
|
+
/* @__PURE__ */ Q(P, {
|
|
6747
6747
|
kind: "primary",
|
|
6748
|
-
icon: Q(f ?
|
|
6748
|
+
icon: Q(f ? N : n.key, { size: 13 }),
|
|
6749
6749
|
onClick: async () => {
|
|
6750
|
-
if (!
|
|
6751
|
-
s.length < 8 ?
|
|
6750
|
+
if (!v) {
|
|
6751
|
+
s.length < 8 ? h("New password must be at least 8 characters.") : h(l === s ? "Fill in all fields." : "Passwords do not match.");
|
|
6752
6752
|
return;
|
|
6753
6753
|
}
|
|
6754
|
-
|
|
6754
|
+
h(null), p(!0);
|
|
6755
6755
|
try {
|
|
6756
6756
|
await r({
|
|
6757
6757
|
current: a,
|
|
6758
6758
|
next: s
|
|
6759
|
-
}),
|
|
6759
|
+
}), g(), t();
|
|
6760
6760
|
} catch (e) {
|
|
6761
|
-
|
|
6761
|
+
h(e instanceof Error ? e.message : "Failed to change password.");
|
|
6762
6762
|
} finally {
|
|
6763
|
-
|
|
6763
|
+
p(!1);
|
|
6764
6764
|
}
|
|
6765
6765
|
},
|
|
6766
|
-
disabled: !
|
|
6766
|
+
disabled: !v || f,
|
|
6767
6767
|
children: f ? "Updating…" : "Update password"
|
|
6768
6768
|
})
|
|
6769
6769
|
]
|
|
@@ -6795,8 +6795,8 @@ function Cs({ type: e, value: t, structure: n }) {
|
|
|
6795
6795
|
if (t && typeof t == "object") {
|
|
6796
6796
|
let e = Array.isArray(t) ? t.length : Object.keys(t).length;
|
|
6797
6797
|
r = n || `{${e} ${e === 1 ? "key" : "keys"}}`;
|
|
6798
|
-
} else r =
|
|
6799
|
-
} else r =
|
|
6798
|
+
} else r = ht(t);
|
|
6799
|
+
} else r = ht(t);
|
|
6800
6800
|
return /* @__PURE__ */ Q("span", {
|
|
6801
6801
|
className: "mono",
|
|
6802
6802
|
style: {
|
|
@@ -6811,14 +6811,14 @@ function Cs({ type: e, value: t, structure: n }) {
|
|
|
6811
6811
|
});
|
|
6812
6812
|
}
|
|
6813
6813
|
function ws({ param: e, current: t, error: r, onCancel: i, onSave: a }) {
|
|
6814
|
-
let [o, s] = Y(() => Ds(e, t)), [c, l] = Y(!1), [
|
|
6815
|
-
async function
|
|
6816
|
-
|
|
6814
|
+
let [o, s] = Y(() => Ds(e, t)), [c, l] = Y(!1), [u, d] = Y(null);
|
|
6815
|
+
async function f() {
|
|
6816
|
+
d(null);
|
|
6817
6817
|
let t;
|
|
6818
6818
|
try {
|
|
6819
6819
|
t = Os(e, o);
|
|
6820
6820
|
} catch (e) {
|
|
6821
|
-
|
|
6821
|
+
d(e instanceof Error ? e.message : "Invalid value.");
|
|
6822
6822
|
return;
|
|
6823
6823
|
}
|
|
6824
6824
|
l(!0);
|
|
@@ -6860,14 +6860,14 @@ function ws({ param: e, current: t, error: r, onCancel: i, onSave: a }) {
|
|
|
6860
6860
|
fontSize: 14,
|
|
6861
6861
|
fontWeight: 600
|
|
6862
6862
|
},
|
|
6863
|
-
children:
|
|
6863
|
+
children: z(e.name) || e.code
|
|
6864
6864
|
}), e.description && /* @__PURE__ */ Q("div", {
|
|
6865
6865
|
style: {
|
|
6866
6866
|
fontSize: 11.5,
|
|
6867
6867
|
color: "var(--text-3)",
|
|
6868
6868
|
marginTop: 2
|
|
6869
6869
|
},
|
|
6870
|
-
children:
|
|
6870
|
+
children: z(e.description)
|
|
6871
6871
|
})]
|
|
6872
6872
|
}),
|
|
6873
6873
|
/* @__PURE__ */ $("div", {
|
|
@@ -6878,13 +6878,13 @@ function ws({ param: e, current: t, error: r, onCancel: i, onSave: a }) {
|
|
|
6878
6878
|
gap: 10
|
|
6879
6879
|
},
|
|
6880
6880
|
children: [
|
|
6881
|
-
/* @__PURE__ */ Q(
|
|
6881
|
+
/* @__PURE__ */ Q(F, { children: "Value" }),
|
|
6882
6882
|
/* @__PURE__ */ Q(Ts, {
|
|
6883
6883
|
param: e,
|
|
6884
6884
|
value: o,
|
|
6885
6885
|
onChange: s
|
|
6886
6886
|
}),
|
|
6887
|
-
(
|
|
6887
|
+
(u || r) && /* @__PURE__ */ Q(Ss, { text: u || r })
|
|
6888
6888
|
]
|
|
6889
6889
|
}),
|
|
6890
6890
|
/* @__PURE__ */ $("div", {
|
|
@@ -6897,14 +6897,14 @@ function ws({ param: e, current: t, error: r, onCancel: i, onSave: a }) {
|
|
|
6897
6897
|
},
|
|
6898
6898
|
children: [
|
|
6899
6899
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
6900
|
-
/* @__PURE__ */ Q(
|
|
6900
|
+
/* @__PURE__ */ Q(P, {
|
|
6901
6901
|
onClick: i,
|
|
6902
6902
|
children: "Cancel"
|
|
6903
6903
|
}),
|
|
6904
|
-
/* @__PURE__ */ Q(
|
|
6904
|
+
/* @__PURE__ */ Q(P, {
|
|
6905
6905
|
kind: "primary",
|
|
6906
|
-
icon: Q(c ?
|
|
6907
|
-
onClick:
|
|
6906
|
+
icon: Q(c ? N : n.check, { size: 13 }),
|
|
6907
|
+
onClick: f,
|
|
6908
6908
|
disabled: c,
|
|
6909
6909
|
children: c ? "Saving…" : "Save"
|
|
6910
6910
|
})
|
|
@@ -6914,8 +6914,8 @@ function ws({ param: e, current: t, error: r, onCancel: i, onSave: a }) {
|
|
|
6914
6914
|
})] });
|
|
6915
6915
|
}
|
|
6916
6916
|
function Ts({ param: e, value: t, onChange: n }) {
|
|
6917
|
-
let r =
|
|
6918
|
-
if (e.type === "bool") return /* @__PURE__ */ Q(
|
|
6917
|
+
let r = Je();
|
|
6918
|
+
if (e.type === "bool") return /* @__PURE__ */ Q(s, {
|
|
6919
6919
|
value: t === !0,
|
|
6920
6920
|
onChange: n
|
|
6921
6921
|
});
|
|
@@ -6925,7 +6925,7 @@ function Ts({ param: e, value: t, onChange: n }) {
|
|
|
6925
6925
|
structure: e.structure,
|
|
6926
6926
|
values: e.values
|
|
6927
6927
|
};
|
|
6928
|
-
return /* @__PURE__ */ Q(Z, { children:
|
|
6928
|
+
return /* @__PURE__ */ Q(Z, { children: Nt({
|
|
6929
6929
|
field: i,
|
|
6930
6930
|
fieldName: e.code,
|
|
6931
6931
|
value: t,
|
|
@@ -6950,7 +6950,7 @@ function Ts({ param: e, value: t, onChange: n }) {
|
|
|
6950
6950
|
color: "var(--text)",
|
|
6951
6951
|
resize: "vertical"
|
|
6952
6952
|
}
|
|
6953
|
-
}) : /* @__PURE__ */ Q(
|
|
6953
|
+
}) : /* @__PURE__ */ Q(b, {
|
|
6954
6954
|
value: typeof t == "string" ? t : "",
|
|
6955
6955
|
onChange: n
|
|
6956
6956
|
});
|
|
@@ -6961,7 +6961,7 @@ var Es = /* @__PURE__ */ new Set([
|
|
|
6961
6961
|
"string_array"
|
|
6962
6962
|
]);
|
|
6963
6963
|
function Ds(e, t) {
|
|
6964
|
-
return e.type === "bool" ? t === !0 : e.type === "structure" ? t ?? {} : e.type === "string_array" ? t ?? [] : e.type === "enum" || e.type === "decimal" ? t ?? "" : e.type === "json" ? t == null ? "" : typeof t == "string" ? t : JSON.stringify(t, null, 2) :
|
|
6964
|
+
return e.type === "bool" ? t === !0 : e.type === "structure" ? t ?? {} : e.type === "string_array" ? t ?? [] : e.type === "enum" || e.type === "decimal" ? t ?? "" : e.type === "json" ? t == null ? "" : typeof t == "string" ? t : JSON.stringify(t, null, 2) : ht(t);
|
|
6965
6965
|
}
|
|
6966
6966
|
function Os(e, t) {
|
|
6967
6967
|
switch (e.type) {
|
|
@@ -7010,18 +7010,18 @@ function Ms(e, t) {
|
|
|
7010
7010
|
return e ? e.filter((e) => e.scopes?.includes(t)) : [];
|
|
7011
7011
|
}
|
|
7012
7012
|
function Ns({ carrierEntityCode: e, carrierScope: t, rowId: r, title: i = "Parameters", icon: a }) {
|
|
7013
|
-
let o =
|
|
7013
|
+
let o = Ee(), s = q(() => Ms(o.data, t), [o.data, t]), [c, l] = Y(null), { overrideByCode: d, missingParams: f, isLoading: p, error: m, clearError: h, save: g, reset: _ } = Ae({
|
|
7014
7014
|
carrierEntityCode: e,
|
|
7015
7015
|
rowId: r,
|
|
7016
7016
|
enabled: s.length > 0,
|
|
7017
7017
|
onWritten: () => l(null)
|
|
7018
7018
|
});
|
|
7019
|
-
return s.length === 0 ? null : /* @__PURE__ */ $(
|
|
7019
|
+
return s.length === 0 ? null : /* @__PURE__ */ $(mn, {
|
|
7020
7020
|
title: i,
|
|
7021
7021
|
icon: a ?? /* @__PURE__ */ Q(n.settings, { size: 14 }),
|
|
7022
7022
|
children: [f ? /* @__PURE__ */ Q(Ss, { text: "Could not load the current parameter overrides for this record." }) : p ? /* @__PURE__ */ Q("div", {
|
|
7023
7023
|
style: { padding: "8px 0" },
|
|
7024
|
-
children: /* @__PURE__ */ Q(
|
|
7024
|
+
children: /* @__PURE__ */ Q(N, { size: 16 })
|
|
7025
7025
|
}) : /* @__PURE__ */ $("div", {
|
|
7026
7026
|
style: {
|
|
7027
7027
|
display: "flex",
|
|
@@ -7048,7 +7048,7 @@ function Ns({ carrierEntityCode: e, carrierScope: t, rowId: r, title: i = "Param
|
|
|
7048
7048
|
fontSize: 12.5,
|
|
7049
7049
|
fontWeight: 500
|
|
7050
7050
|
},
|
|
7051
|
-
children:
|
|
7051
|
+
children: z(e.name) || e.code
|
|
7052
7052
|
}), /* @__PURE__ */ Q("div", {
|
|
7053
7053
|
className: "mono",
|
|
7054
7054
|
style: {
|
|
@@ -7063,7 +7063,7 @@ function Ns({ carrierEntityCode: e, carrierScope: t, rowId: r, title: i = "Param
|
|
|
7063
7063
|
value: e.value,
|
|
7064
7064
|
structure: e.structure
|
|
7065
7065
|
}),
|
|
7066
|
-
a && /* @__PURE__ */ Q(
|
|
7066
|
+
a && /* @__PURE__ */ Q(V, {
|
|
7067
7067
|
tone: "violet",
|
|
7068
7068
|
size: "xs",
|
|
7069
7069
|
children: "overridden"
|
|
@@ -7071,13 +7071,13 @@ function Ns({ carrierEntityCode: e, carrierScope: t, rowId: r, title: i = "Param
|
|
|
7071
7071
|
i && !a && /* @__PURE__ */ Q("span", {
|
|
7072
7072
|
"data-testid": `param-not-applied-${e.code}`,
|
|
7073
7073
|
title: `You set ${JSON.stringify(r.value)}, and it no longer satisfies this parameter's declaration. The value in effect comes from ${e.source}. Reset to remove what you set, or edit it to a value the declaration accepts.`,
|
|
7074
|
-
children: /* @__PURE__ */ Q(
|
|
7074
|
+
children: /* @__PURE__ */ Q(V, {
|
|
7075
7075
|
tone: "amber",
|
|
7076
7076
|
size: "xs",
|
|
7077
7077
|
children: "not applied"
|
|
7078
7078
|
})
|
|
7079
7079
|
}),
|
|
7080
|
-
/* @__PURE__ */ Q(
|
|
7080
|
+
/* @__PURE__ */ Q(P, {
|
|
7081
7081
|
size: "xs",
|
|
7082
7082
|
icon: /* @__PURE__ */ Q(n.edit, { size: 12 }),
|
|
7083
7083
|
onClick: () => {
|
|
@@ -7085,7 +7085,7 @@ function Ns({ carrierEntityCode: e, carrierScope: t, rowId: r, title: i = "Param
|
|
|
7085
7085
|
},
|
|
7086
7086
|
children: "Edit"
|
|
7087
7087
|
}),
|
|
7088
|
-
i && /* @__PURE__ */ Q(
|
|
7088
|
+
i && /* @__PURE__ */ Q(u, {
|
|
7089
7089
|
icon: /* @__PURE__ */ Q(n.refresh, { size: 13 }),
|
|
7090
7090
|
title: "Reset to default",
|
|
7091
7091
|
onClick: () => _(e)
|
|
@@ -7112,43 +7112,43 @@ var Ps = [
|
|
|
7112
7112
|
"image/webp"
|
|
7113
7113
|
], Fs = 5242880;
|
|
7114
7114
|
function Is() {
|
|
7115
|
-
let e =
|
|
7115
|
+
let e = On(), t = I((e) => e.user), r = I((e) => e.activeTenant), i = I((e) => e.refreshMe), a = M().isPhone, [o, c] = Y(!1), [l, u] = Y(!1), [d, f] = Y(!1), [p, m] = Y({
|
|
7116
7116
|
email: !0,
|
|
7117
7117
|
inapp: !0,
|
|
7118
7118
|
slack: !1,
|
|
7119
7119
|
desktop: !1
|
|
7120
|
-
}),
|
|
7121
|
-
queryKey:
|
|
7122
|
-
queryFn: () =>
|
|
7120
|
+
}), h = J(null), g = t?.display_name || t?.email || "User", _ = t?.email ?? "", v = t?.roles && t.roles[0] || "Member", y = r?.env ? `${r.name} · ${r.env}` : r?.name ?? "—", b = t?.created_at ? new Date(t.created_at).toLocaleDateString() : "—", S = ["profile-files", t?.id], { data: C, refetch: w } = ii({
|
|
7121
|
+
queryKey: S,
|
|
7122
|
+
queryFn: () => _t("profile", { id: t.id }),
|
|
7123
7123
|
enabled: !!t?.id,
|
|
7124
7124
|
staleTime: 3e5
|
|
7125
|
-
}),
|
|
7126
|
-
|
|
7127
|
-
},
|
|
7125
|
+
}), T = C?.data?.avatar, E = T?.derivations?.thumb_200 ?? T?.url ?? null, D = () => {
|
|
7126
|
+
d || h.current?.click();
|
|
7127
|
+
}, O = async (e) => {
|
|
7128
7128
|
let n = e.target.files?.[0];
|
|
7129
7129
|
if (!n || !t) return;
|
|
7130
7130
|
e.target.value = "";
|
|
7131
|
-
let r =
|
|
7131
|
+
let r = Ft(n, Ps, Fs);
|
|
7132
7132
|
if (r) {
|
|
7133
|
-
|
|
7133
|
+
L.error(r.message);
|
|
7134
7134
|
return;
|
|
7135
7135
|
}
|
|
7136
|
-
|
|
7136
|
+
f(!0);
|
|
7137
7137
|
try {
|
|
7138
|
-
let e = await
|
|
7138
|
+
let e = await pt({
|
|
7139
7139
|
file: n,
|
|
7140
7140
|
entityCode: "profile",
|
|
7141
7141
|
fieldCode: "avatar"
|
|
7142
7142
|
});
|
|
7143
|
-
await
|
|
7143
|
+
await ft("profile", { id: t.id }, { $files: { avatar: { set: [{
|
|
7144
7144
|
file_id: e.id,
|
|
7145
7145
|
filename: e.filename
|
|
7146
|
-
}] } } }), await
|
|
7146
|
+
}] } } }), await w(), L.success("Avatar updated.");
|
|
7147
7147
|
} catch (e) {
|
|
7148
7148
|
let t = e instanceof Error ? e.message : "Upload failed.";
|
|
7149
|
-
|
|
7149
|
+
L.error(t);
|
|
7150
7150
|
} finally {
|
|
7151
|
-
|
|
7151
|
+
f(!1);
|
|
7152
7152
|
}
|
|
7153
7153
|
};
|
|
7154
7154
|
return /* @__PURE__ */ $("div", {
|
|
@@ -7186,16 +7186,16 @@ function Is() {
|
|
|
7186
7186
|
},
|
|
7187
7187
|
children: [
|
|
7188
7188
|
/* @__PURE__ */ $("div", {
|
|
7189
|
-
onClick:
|
|
7189
|
+
onClick: D,
|
|
7190
7190
|
title: "Click to change avatar",
|
|
7191
7191
|
style: {
|
|
7192
7192
|
position: "relative",
|
|
7193
|
-
cursor:
|
|
7193
|
+
cursor: d ? "default" : "pointer",
|
|
7194
7194
|
flexShrink: 0
|
|
7195
7195
|
},
|
|
7196
7196
|
children: [
|
|
7197
|
-
|
|
7198
|
-
src:
|
|
7197
|
+
E ? /* @__PURE__ */ Q("img", {
|
|
7198
|
+
src: E,
|
|
7199
7199
|
alt: "Avatar",
|
|
7200
7200
|
style: {
|
|
7201
7201
|
width: 56,
|
|
@@ -7204,8 +7204,8 @@ function Is() {
|
|
|
7204
7204
|
objectFit: "cover",
|
|
7205
7205
|
display: "block"
|
|
7206
7206
|
}
|
|
7207
|
-
}) : /* @__PURE__ */ Q(
|
|
7208
|
-
name:
|
|
7207
|
+
}) : /* @__PURE__ */ Q(Jt, {
|
|
7208
|
+
name: g,
|
|
7209
7209
|
size: 56
|
|
7210
7210
|
}),
|
|
7211
7211
|
/* @__PURE__ */ Q("div", {
|
|
@@ -7217,11 +7217,11 @@ function Is() {
|
|
|
7217
7217
|
display: "flex",
|
|
7218
7218
|
alignItems: "center",
|
|
7219
7219
|
justifyContent: "center",
|
|
7220
|
-
opacity: +!!
|
|
7220
|
+
opacity: +!!d,
|
|
7221
7221
|
transition: "opacity 0.15s"
|
|
7222
7222
|
},
|
|
7223
7223
|
className: "avatar-upload-overlay",
|
|
7224
|
-
children:
|
|
7224
|
+
children: d ? /* @__PURE__ */ Q(N, { size: 18 }) : /* @__PURE__ */ Q(n.upload, {
|
|
7225
7225
|
size: 16,
|
|
7226
7226
|
style: { color: "var(--profile-avatar-upload-fg)" }
|
|
7227
7227
|
})
|
|
@@ -7230,11 +7230,11 @@ function Is() {
|
|
|
7230
7230
|
]
|
|
7231
7231
|
}),
|
|
7232
7232
|
/* @__PURE__ */ Q("input", {
|
|
7233
|
-
ref:
|
|
7233
|
+
ref: h,
|
|
7234
7234
|
type: "file",
|
|
7235
7235
|
accept: Ps.join(","),
|
|
7236
7236
|
style: { display: "none" },
|
|
7237
|
-
onChange:
|
|
7237
|
+
onChange: O
|
|
7238
7238
|
}),
|
|
7239
7239
|
/* @__PURE__ */ $("div", {
|
|
7240
7240
|
style: {
|
|
@@ -7250,7 +7250,7 @@ function Is() {
|
|
|
7250
7250
|
letterSpacing: 0,
|
|
7251
7251
|
overflowWrap: "anywhere"
|
|
7252
7252
|
},
|
|
7253
|
-
children:
|
|
7253
|
+
children: g
|
|
7254
7254
|
}),
|
|
7255
7255
|
/* @__PURE__ */ Q("div", {
|
|
7256
7256
|
style: {
|
|
@@ -7260,7 +7260,7 @@ function Is() {
|
|
|
7260
7260
|
overflowWrap: "anywhere"
|
|
7261
7261
|
},
|
|
7262
7262
|
className: "mono",
|
|
7263
|
-
children:
|
|
7263
|
+
children: _
|
|
7264
7264
|
}),
|
|
7265
7265
|
/* @__PURE__ */ $("div", {
|
|
7266
7266
|
style: {
|
|
@@ -7270,18 +7270,18 @@ function Is() {
|
|
|
7270
7270
|
flexWrap: "wrap"
|
|
7271
7271
|
},
|
|
7272
7272
|
children: [
|
|
7273
|
-
/* @__PURE__ */ Q(
|
|
7273
|
+
/* @__PURE__ */ Q(V, {
|
|
7274
7274
|
tone: "violet",
|
|
7275
7275
|
size: "xs",
|
|
7276
7276
|
dot: !0,
|
|
7277
|
-
children:
|
|
7277
|
+
children: v
|
|
7278
7278
|
}),
|
|
7279
|
-
/* @__PURE__ */ Q(
|
|
7279
|
+
/* @__PURE__ */ Q(V, {
|
|
7280
7280
|
tone: "slate",
|
|
7281
7281
|
size: "xs",
|
|
7282
|
-
children:
|
|
7282
|
+
children: y
|
|
7283
7283
|
}),
|
|
7284
|
-
t?.is_active && /* @__PURE__ */ Q(
|
|
7284
|
+
t?.is_active && /* @__PURE__ */ Q(V, {
|
|
7285
7285
|
tone: "emerald",
|
|
7286
7286
|
size: "xs",
|
|
7287
7287
|
dot: !0,
|
|
@@ -7300,11 +7300,11 @@ function Is() {
|
|
|
7300
7300
|
justifyContent: a ? "stretch" : "flex-end",
|
|
7301
7301
|
gridColumn: a ? "1 / -1" : void 0
|
|
7302
7302
|
},
|
|
7303
|
-
children: [/* @__PURE__ */ Q(
|
|
7303
|
+
children: [/* @__PURE__ */ Q(P, {
|
|
7304
7304
|
icon: /* @__PURE__ */ Q(n.edit, { size: 13 }),
|
|
7305
|
-
onClick: () =>
|
|
7305
|
+
onClick: () => u(!0),
|
|
7306
7306
|
children: "Edit profile"
|
|
7307
|
-
}), /* @__PURE__ */ Q(
|
|
7307
|
+
}), /* @__PURE__ */ Q(P, {
|
|
7308
7308
|
icon: /* @__PURE__ */ Q(n.settings, { size: 13 }),
|
|
7309
7309
|
onClick: () => e("/preferences", { topLevel: !0 }),
|
|
7310
7310
|
children: "Preferences"
|
|
@@ -7320,7 +7320,7 @@ function Is() {
|
|
|
7320
7320
|
gap: 14
|
|
7321
7321
|
},
|
|
7322
7322
|
children: [
|
|
7323
|
-
/* @__PURE__ */ Q(
|
|
7323
|
+
/* @__PURE__ */ Q(mn, {
|
|
7324
7324
|
title: "Personal info",
|
|
7325
7325
|
icon: /* @__PURE__ */ Q(n.users, { size: 14 }),
|
|
7326
7326
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -7334,13 +7334,13 @@ function Is() {
|
|
|
7334
7334
|
children: [
|
|
7335
7335
|
/* @__PURE__ */ Q(ui, {
|
|
7336
7336
|
label: "Display name",
|
|
7337
|
-
children:
|
|
7337
|
+
children: g
|
|
7338
7338
|
}),
|
|
7339
7339
|
/* @__PURE__ */ Q(ui, {
|
|
7340
7340
|
label: "Email",
|
|
7341
7341
|
children: /* @__PURE__ */ Q("span", {
|
|
7342
7342
|
className: "mono",
|
|
7343
|
-
children:
|
|
7343
|
+
children: _
|
|
7344
7344
|
})
|
|
7345
7345
|
}),
|
|
7346
7346
|
/* @__PURE__ */ Q(ui, {
|
|
@@ -7362,13 +7362,13 @@ function Is() {
|
|
|
7362
7362
|
label: "Joined",
|
|
7363
7363
|
children: /* @__PURE__ */ Q("span", {
|
|
7364
7364
|
className: "mono",
|
|
7365
|
-
children:
|
|
7365
|
+
children: b
|
|
7366
7366
|
})
|
|
7367
7367
|
})
|
|
7368
7368
|
]
|
|
7369
7369
|
})
|
|
7370
7370
|
}),
|
|
7371
|
-
/* @__PURE__ */ Q(
|
|
7371
|
+
/* @__PURE__ */ Q(mn, {
|
|
7372
7372
|
title: "Security",
|
|
7373
7373
|
icon: /* @__PURE__ */ Q(n.shield, { size: 14 }),
|
|
7374
7374
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -7382,7 +7382,7 @@ function Is() {
|
|
|
7382
7382
|
icon: /* @__PURE__ */ Q(n.key, { size: 13 }),
|
|
7383
7383
|
label: "Password",
|
|
7384
7384
|
hint: "Update at any time",
|
|
7385
|
-
action: /* @__PURE__ */ Q(
|
|
7385
|
+
action: /* @__PURE__ */ Q(P, {
|
|
7386
7386
|
size: "xs",
|
|
7387
7387
|
onClick: () => c(!0),
|
|
7388
7388
|
children: "Change"
|
|
@@ -7392,7 +7392,7 @@ function Is() {
|
|
|
7392
7392
|
icon: /* @__PURE__ */ Q(n.shield, { size: 13 }),
|
|
7393
7393
|
label: "Two-factor authentication",
|
|
7394
7394
|
hint: "Authenticator app recommended",
|
|
7395
|
-
action: /* @__PURE__ */ Q(
|
|
7395
|
+
action: /* @__PURE__ */ Q(V, {
|
|
7396
7396
|
tone: "slate",
|
|
7397
7397
|
size: "xs",
|
|
7398
7398
|
children: "Not set up"
|
|
@@ -7402,7 +7402,7 @@ function Is() {
|
|
|
7402
7402
|
icon: /* @__PURE__ */ Q(n.device, { size: 13 }),
|
|
7403
7403
|
label: "Trusted devices",
|
|
7404
7404
|
hint: "Sign-in sessions by device",
|
|
7405
|
-
action: /* @__PURE__ */ Q(
|
|
7405
|
+
action: /* @__PURE__ */ Q(P, {
|
|
7406
7406
|
size: "xs",
|
|
7407
7407
|
kind: "ghost",
|
|
7408
7408
|
children: "Manage"
|
|
@@ -7412,7 +7412,7 @@ function Is() {
|
|
|
7412
7412
|
icon: /* @__PURE__ */ Q(n.activity, { size: 13 }),
|
|
7413
7413
|
label: "Sign-in history",
|
|
7414
7414
|
hint: "Audit trail of recent logins",
|
|
7415
|
-
action: /* @__PURE__ */ Q(
|
|
7415
|
+
action: /* @__PURE__ */ Q(P, {
|
|
7416
7416
|
size: "xs",
|
|
7417
7417
|
kind: "ghost",
|
|
7418
7418
|
children: "View"
|
|
@@ -7421,7 +7421,7 @@ function Is() {
|
|
|
7421
7421
|
]
|
|
7422
7422
|
})
|
|
7423
7423
|
}),
|
|
7424
|
-
/* @__PURE__ */ Q(
|
|
7424
|
+
/* @__PURE__ */ Q(mn, {
|
|
7425
7425
|
title: "Access",
|
|
7426
7426
|
icon: /* @__PURE__ */ Q(n.key, { size: 14 }),
|
|
7427
7427
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -7433,11 +7433,11 @@ function Is() {
|
|
|
7433
7433
|
children: [
|
|
7434
7434
|
/* @__PURE__ */ Q(ui, {
|
|
7435
7435
|
label: "Role",
|
|
7436
|
-
children: /* @__PURE__ */ Q(
|
|
7436
|
+
children: /* @__PURE__ */ Q(V, {
|
|
7437
7437
|
tone: "violet",
|
|
7438
7438
|
size: "xs",
|
|
7439
7439
|
dot: !0,
|
|
7440
|
-
children:
|
|
7440
|
+
children: v
|
|
7441
7441
|
})
|
|
7442
7442
|
}),
|
|
7443
7443
|
/* @__PURE__ */ Q(ui, {
|
|
@@ -7448,7 +7448,7 @@ function Is() {
|
|
|
7448
7448
|
gap: 4,
|
|
7449
7449
|
flexWrap: "wrap"
|
|
7450
7450
|
},
|
|
7451
|
-
children: t.roles.map((e) => /* @__PURE__ */ Q(
|
|
7451
|
+
children: t.roles.map((e) => /* @__PURE__ */ Q(x, { children: e }, e))
|
|
7452
7452
|
}) : /* @__PURE__ */ Q("span", {
|
|
7453
7453
|
style: { color: "var(--text-4)" },
|
|
7454
7454
|
children: "—"
|
|
@@ -7475,7 +7475,7 @@ function Is() {
|
|
|
7475
7475
|
]
|
|
7476
7476
|
})
|
|
7477
7477
|
}),
|
|
7478
|
-
/* @__PURE__ */ Q(
|
|
7478
|
+
/* @__PURE__ */ Q(mn, {
|
|
7479
7479
|
title: "Notifications",
|
|
7480
7480
|
icon: /* @__PURE__ */ Q(n.bell, { size: 14 }),
|
|
7481
7481
|
children: /* @__PURE__ */ Q("div", {
|
|
@@ -7526,10 +7526,10 @@ function Is() {
|
|
|
7526
7526
|
},
|
|
7527
7527
|
children: n
|
|
7528
7528
|
})]
|
|
7529
|
-
}), /* @__PURE__ */ Q(
|
|
7530
|
-
value: !!
|
|
7531
|
-
onChange: (t) =>
|
|
7532
|
-
...
|
|
7529
|
+
}), /* @__PURE__ */ Q(s, {
|
|
7530
|
+
value: !!p[e],
|
|
7531
|
+
onChange: (t) => m({
|
|
7532
|
+
...p,
|
|
7533
7533
|
[e]: t
|
|
7534
7534
|
})
|
|
7535
7535
|
})]
|
|
@@ -7557,7 +7557,7 @@ function Is() {
|
|
|
7557
7557
|
!a && /* @__PURE__ */ Q("span", { children: "·" }),
|
|
7558
7558
|
/* @__PURE__ */ $("span", { children: ["Created ", /* @__PURE__ */ Q("span", {
|
|
7559
7559
|
className: "mono",
|
|
7560
|
-
children:
|
|
7560
|
+
children: b
|
|
7561
7561
|
})] })
|
|
7562
7562
|
]
|
|
7563
7563
|
})
|
|
@@ -7567,29 +7567,29 @@ function Is() {
|
|
|
7567
7567
|
open: l,
|
|
7568
7568
|
initialName: t?.display_name ?? "",
|
|
7569
7569
|
userId: t?.id ?? "",
|
|
7570
|
-
onClose: () =>
|
|
7570
|
+
onClose: () => u(!1),
|
|
7571
7571
|
onSaved: async () => {
|
|
7572
|
-
await i(),
|
|
7572
|
+
await i(), u(!1);
|
|
7573
7573
|
}
|
|
7574
7574
|
}),
|
|
7575
7575
|
/* @__PURE__ */ Q(xs, {
|
|
7576
|
-
open:
|
|
7576
|
+
open: o,
|
|
7577
7577
|
onClose: () => c(!1),
|
|
7578
7578
|
onSubmit: async ({ current: e, next: t }) => {
|
|
7579
|
-
await
|
|
7579
|
+
await Xe(e, t), L.success("Password changed. Sign in again to continue.");
|
|
7580
7580
|
}
|
|
7581
7581
|
})
|
|
7582
7582
|
]
|
|
7583
7583
|
});
|
|
7584
7584
|
}
|
|
7585
7585
|
function Ls({ open: e, initialName: t, userId: r, onClose: i, onSaved: a }) {
|
|
7586
|
-
let o =
|
|
7586
|
+
let o = M().isPhone, [s, c] = Y(t), [l, d] = Y(!1), [f, p] = Y(null);
|
|
7587
7587
|
if (!e) return null;
|
|
7588
|
-
let
|
|
7589
|
-
c(t),
|
|
7588
|
+
let m = () => {
|
|
7589
|
+
c(t), p(null), i();
|
|
7590
7590
|
};
|
|
7591
7591
|
return /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q("div", {
|
|
7592
|
-
onClick:
|
|
7592
|
+
onClick: m,
|
|
7593
7593
|
style: {
|
|
7594
7594
|
position: "fixed",
|
|
7595
7595
|
inset: 0,
|
|
@@ -7652,10 +7652,10 @@ function Ls({ open: e, initialName: t, userId: r, onClose: i, onSaved: a }) {
|
|
|
7652
7652
|
children: "Update your display name."
|
|
7653
7653
|
})]
|
|
7654
7654
|
}),
|
|
7655
|
-
/* @__PURE__ */ Q(
|
|
7655
|
+
/* @__PURE__ */ Q(u, {
|
|
7656
7656
|
icon: /* @__PURE__ */ Q(n.x, { size: 14 }),
|
|
7657
7657
|
title: "Close",
|
|
7658
|
-
onClick:
|
|
7658
|
+
onClick: m
|
|
7659
7659
|
})
|
|
7660
7660
|
]
|
|
7661
7661
|
}),
|
|
@@ -7666,10 +7666,10 @@ function Ls({ open: e, initialName: t, userId: r, onClose: i, onSaved: a }) {
|
|
|
7666
7666
|
flexDirection: "column",
|
|
7667
7667
|
gap: 12
|
|
7668
7668
|
},
|
|
7669
|
-
children: [/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(
|
|
7669
|
+
children: [/* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q(F, {
|
|
7670
7670
|
required: !0,
|
|
7671
7671
|
children: "Display name"
|
|
7672
|
-
}), /* @__PURE__ */ Q(
|
|
7672
|
+
}), /* @__PURE__ */ Q(b, {
|
|
7673
7673
|
value: s,
|
|
7674
7674
|
onChange: c,
|
|
7675
7675
|
placeholder: "Your name",
|
|
@@ -7699,23 +7699,23 @@ function Ls({ open: e, initialName: t, userId: r, onClose: i, onSaved: a }) {
|
|
|
7699
7699
|
},
|
|
7700
7700
|
children: [
|
|
7701
7701
|
/* @__PURE__ */ Q("div", { style: { flex: 1 } }),
|
|
7702
|
-
/* @__PURE__ */ Q(
|
|
7703
|
-
onClick:
|
|
7702
|
+
/* @__PURE__ */ Q(P, {
|
|
7703
|
+
onClick: m,
|
|
7704
7704
|
children: "Cancel"
|
|
7705
7705
|
}),
|
|
7706
|
-
/* @__PURE__ */ Q(
|
|
7706
|
+
/* @__PURE__ */ Q(P, {
|
|
7707
7707
|
kind: "primary",
|
|
7708
|
-
icon: Q(l ?
|
|
7708
|
+
icon: Q(l ? N : n.check, { size: 13 }),
|
|
7709
7709
|
onClick: async () => {
|
|
7710
7710
|
if (!s.trim()) {
|
|
7711
|
-
|
|
7711
|
+
p("Display name is required.");
|
|
7712
7712
|
return;
|
|
7713
7713
|
}
|
|
7714
|
-
|
|
7714
|
+
p(null), d(!0);
|
|
7715
7715
|
try {
|
|
7716
|
-
await
|
|
7716
|
+
await ft("profile", { id: r }, { display_name: s.trim() }), await a();
|
|
7717
7717
|
} catch (e) {
|
|
7718
|
-
|
|
7718
|
+
p(e instanceof Error ? e.message : "Failed to save.");
|
|
7719
7719
|
} finally {
|
|
7720
7720
|
d(!1);
|
|
7721
7721
|
}
|
|
@@ -7782,7 +7782,7 @@ function zs() {
|
|
|
7782
7782
|
}
|
|
7783
7783
|
}
|
|
7784
7784
|
function Bs({ userId: e }) {
|
|
7785
|
-
let { data: t } =
|
|
7785
|
+
let { data: t } = B(), n = t?.entities.profile?.params_scope ?? "profile";
|
|
7786
7786
|
return /* @__PURE__ */ Q(Ns, {
|
|
7787
7787
|
carrierEntityCode: "profile",
|
|
7788
7788
|
carrierScope: n,
|
|
@@ -7790,10 +7790,10 @@ function Bs({ userId: e }) {
|
|
|
7790
7790
|
});
|
|
7791
7791
|
}
|
|
7792
7792
|
function Vs({ userId: e }) {
|
|
7793
|
-
let { data: t } =
|
|
7793
|
+
let { data: t } = B();
|
|
7794
7794
|
if (!e || !t) return null;
|
|
7795
7795
|
let n = t.entities.profile;
|
|
7796
|
-
return n ? /* @__PURE__ */ Q(
|
|
7796
|
+
return n ? /* @__PURE__ */ Q(yn, {
|
|
7797
7797
|
node: { associated: "api_key" },
|
|
7798
7798
|
ctx: {
|
|
7799
7799
|
schema: t,
|
|
@@ -7813,21 +7813,21 @@ function Us(e) {
|
|
|
7813
7813
|
return e === "tenant" ? "violet" : e === "env" ? "amber" : "slate";
|
|
7814
7814
|
}
|
|
7815
7815
|
function Ws(e) {
|
|
7816
|
-
let t =
|
|
7816
|
+
let t = I((e) => e.activeTenant?.id) ?? "", r = Ee("tenant"), [i, a] = Y(""), [o, c] = Y(""), [l, d] = Y(""), [f, p] = Y(!1), [h, g] = Y(null), { overrideByCode: _, missingParams: v, isLoading: y, error: x, clearError: S, save: C, reset: w } = Ae({
|
|
7817
7817
|
carrierEntityCode: Hs,
|
|
7818
7818
|
rowId: t,
|
|
7819
|
-
onWritten: () =>
|
|
7820
|
-
}),
|
|
7819
|
+
onWritten: () => g(null)
|
|
7820
|
+
}), T = q(() => r.data ?? [], [r.data]), E = q(() => Array.from(new Set(T.map((e) => e.category).filter(Boolean))).sort(), [T]), D = q(() => {
|
|
7821
7821
|
let e = i.trim().toLowerCase();
|
|
7822
|
-
return
|
|
7822
|
+
return T.filter((t) => !(o && t.category !== o || l && t.source !== l || f && !_.has(t.code) || e && !`${t.code} ${z(t.name)}`.toLowerCase().includes(e)));
|
|
7823
7823
|
}, [
|
|
7824
|
-
|
|
7824
|
+
T,
|
|
7825
7825
|
i,
|
|
7826
7826
|
o,
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
]),
|
|
7827
|
+
l,
|
|
7828
|
+
f,
|
|
7829
|
+
_
|
|
7830
|
+
]), O = r.isLoading || y;
|
|
7831
7831
|
return /* @__PURE__ */ $("div", {
|
|
7832
7832
|
style: {
|
|
7833
7833
|
flex: 1,
|
|
@@ -7861,11 +7861,11 @@ function Ws(e) {
|
|
|
7861
7861
|
children: "Tenant configuration. Editing a value stores a tenant override; Reset restores the platform default."
|
|
7862
7862
|
})]
|
|
7863
7863
|
}),
|
|
7864
|
-
|
|
7864
|
+
x && /* @__PURE__ */ Q("div", {
|
|
7865
7865
|
style: { marginBottom: 12 },
|
|
7866
|
-
children: /* @__PURE__ */ Q(Ss, { text:
|
|
7866
|
+
children: /* @__PURE__ */ Q(Ss, { text: x })
|
|
7867
7867
|
}),
|
|
7868
|
-
|
|
7868
|
+
v && /* @__PURE__ */ Q("div", {
|
|
7869
7869
|
style: { marginBottom: 12 },
|
|
7870
7870
|
children: /* @__PURE__ */ Q(Ss, { text: "Could not load the current tenant parameter overrides." })
|
|
7871
7871
|
}),
|
|
@@ -7884,7 +7884,7 @@ function Ws(e) {
|
|
|
7884
7884
|
minWidth: 200,
|
|
7885
7885
|
flex: 1
|
|
7886
7886
|
},
|
|
7887
|
-
children: /* @__PURE__ */ Q(
|
|
7887
|
+
children: /* @__PURE__ */ Q(b, {
|
|
7888
7888
|
value: i,
|
|
7889
7889
|
onChange: a,
|
|
7890
7890
|
placeholder: "Search name or code…"
|
|
@@ -7892,22 +7892,22 @@ function Ws(e) {
|
|
|
7892
7892
|
}),
|
|
7893
7893
|
/* @__PURE__ */ Q("div", {
|
|
7894
7894
|
style: { minWidth: 160 },
|
|
7895
|
-
children: /* @__PURE__ */ Q(
|
|
7895
|
+
children: /* @__PURE__ */ Q(m, {
|
|
7896
7896
|
value: o,
|
|
7897
7897
|
options: [{
|
|
7898
7898
|
value: "",
|
|
7899
7899
|
label: "All categories"
|
|
7900
|
-
}, ...
|
|
7900
|
+
}, ...E.map((e) => ({
|
|
7901
7901
|
value: e,
|
|
7902
7902
|
label: e
|
|
7903
7903
|
}))],
|
|
7904
|
-
onChange:
|
|
7904
|
+
onChange: c
|
|
7905
7905
|
})
|
|
7906
7906
|
}),
|
|
7907
7907
|
/* @__PURE__ */ Q("div", {
|
|
7908
7908
|
style: { minWidth: 140 },
|
|
7909
|
-
children: /* @__PURE__ */ Q(
|
|
7910
|
-
value:
|
|
7909
|
+
children: /* @__PURE__ */ Q(m, {
|
|
7910
|
+
value: l,
|
|
7911
7911
|
options: [
|
|
7912
7912
|
{
|
|
7913
7913
|
value: "",
|
|
@@ -7926,7 +7926,7 @@ function Ws(e) {
|
|
|
7926
7926
|
label: "tenant"
|
|
7927
7927
|
}
|
|
7928
7928
|
],
|
|
7929
|
-
onChange:
|
|
7929
|
+
onChange: d
|
|
7930
7930
|
})
|
|
7931
7931
|
}),
|
|
7932
7932
|
/* @__PURE__ */ $("label", {
|
|
@@ -7936,19 +7936,19 @@ function Ws(e) {
|
|
|
7936
7936
|
gap: 6,
|
|
7937
7937
|
fontSize: 12
|
|
7938
7938
|
},
|
|
7939
|
-
children: [/* @__PURE__ */ Q(
|
|
7940
|
-
value:
|
|
7941
|
-
onChange:
|
|
7939
|
+
children: [/* @__PURE__ */ Q(s, {
|
|
7940
|
+
value: f,
|
|
7941
|
+
onChange: p
|
|
7942
7942
|
}), "Overridden only"]
|
|
7943
7943
|
})
|
|
7944
7944
|
]
|
|
7945
7945
|
}),
|
|
7946
|
-
|
|
7946
|
+
O ? /* @__PURE__ */ Q("div", {
|
|
7947
7947
|
style: {
|
|
7948
7948
|
padding: "24px 0",
|
|
7949
7949
|
textAlign: "center"
|
|
7950
7950
|
},
|
|
7951
|
-
children: /* @__PURE__ */ Q(
|
|
7951
|
+
children: /* @__PURE__ */ Q(N, { size: 18 })
|
|
7952
7952
|
}) : /* @__PURE__ */ Q("div", {
|
|
7953
7953
|
style: {
|
|
7954
7954
|
border: "1px solid var(--border)",
|
|
@@ -7976,7 +7976,7 @@ function Ws(e) {
|
|
|
7976
7976
|
/* @__PURE__ */ Q(Gs, { children: "Source" }),
|
|
7977
7977
|
/* @__PURE__ */ Q(Gs, { children: "" })
|
|
7978
7978
|
]
|
|
7979
|
-
}) }), /* @__PURE__ */ Q("tbody", { children:
|
|
7979
|
+
}) }), /* @__PURE__ */ Q("tbody", { children: D.length === 0 ? /* @__PURE__ */ Q("tr", { children: /* @__PURE__ */ Q("td", {
|
|
7980
7980
|
colSpan: 7,
|
|
7981
7981
|
style: {
|
|
7982
7982
|
padding: "16px",
|
|
@@ -7984,13 +7984,13 @@ function Ws(e) {
|
|
|
7984
7984
|
textAlign: "center"
|
|
7985
7985
|
},
|
|
7986
7986
|
children: "No parameters match."
|
|
7987
|
-
}) }) :
|
|
7988
|
-
let t =
|
|
7987
|
+
}) }) : D.map((e) => {
|
|
7988
|
+
let t = _.get(e.code), r = t !== void 0, i = As(e), a = r && e.source === "tenant";
|
|
7989
7989
|
return /* @__PURE__ */ $("tr", {
|
|
7990
7990
|
"data-testid": `tenant-param-row-${e.code}`,
|
|
7991
7991
|
style: { borderTop: "1px solid var(--divider)" },
|
|
7992
7992
|
children: [
|
|
7993
|
-
/* @__PURE__ */ Q(Ks, { children:
|
|
7993
|
+
/* @__PURE__ */ Q(Ks, { children: z(e.name) || e.code }),
|
|
7994
7994
|
/* @__PURE__ */ Q(Ks, { children: /* @__PURE__ */ Q("span", {
|
|
7995
7995
|
className: "mono",
|
|
7996
7996
|
style: { color: "var(--text-3)" },
|
|
@@ -8010,12 +8010,12 @@ function Ws(e) {
|
|
|
8010
8010
|
alignItems: "center"
|
|
8011
8011
|
},
|
|
8012
8012
|
children: [
|
|
8013
|
-
/* @__PURE__ */ Q(
|
|
8013
|
+
/* @__PURE__ */ Q(V, {
|
|
8014
8014
|
tone: Us(e.source),
|
|
8015
8015
|
size: "xs",
|
|
8016
8016
|
children: e.source
|
|
8017
8017
|
}),
|
|
8018
|
-
a && /* @__PURE__ */ Q(
|
|
8018
|
+
a && /* @__PURE__ */ Q(V, {
|
|
8019
8019
|
tone: "violet",
|
|
8020
8020
|
size: "xs",
|
|
8021
8021
|
dot: !0,
|
|
@@ -8024,7 +8024,7 @@ function Ws(e) {
|
|
|
8024
8024
|
r && !a && /* @__PURE__ */ Q("span", {
|
|
8025
8025
|
"data-testid": `tenant-param-not-applied-${e.code}`,
|
|
8026
8026
|
title: `This tenant is set to ${JSON.stringify(t.value)}, and it no longer satisfies the parameter's declaration. The value in effect comes from ${e.source}. Reset to remove it, or edit it to a value the declaration accepts.`,
|
|
8027
|
-
children: /* @__PURE__ */ Q(
|
|
8027
|
+
children: /* @__PURE__ */ Q(V, {
|
|
8028
8028
|
tone: "amber",
|
|
8029
8029
|
size: "xs",
|
|
8030
8030
|
dot: !0,
|
|
@@ -8040,17 +8040,17 @@ function Ws(e) {
|
|
|
8040
8040
|
justifyContent: "flex-end",
|
|
8041
8041
|
width: "100%"
|
|
8042
8042
|
},
|
|
8043
|
-
children: i ? /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(
|
|
8043
|
+
children: i ? /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(P, {
|
|
8044
8044
|
size: "xs",
|
|
8045
8045
|
icon: /* @__PURE__ */ Q(n.edit, { size: 12 }),
|
|
8046
8046
|
onClick: () => {
|
|
8047
|
-
|
|
8047
|
+
S(), g(e);
|
|
8048
8048
|
},
|
|
8049
8049
|
children: "Edit"
|
|
8050
|
-
}), r && /* @__PURE__ */ Q(
|
|
8050
|
+
}), r && /* @__PURE__ */ Q(u, {
|
|
8051
8051
|
icon: /* @__PURE__ */ Q(n.refresh, { size: 13 }),
|
|
8052
8052
|
title: "Reset to default",
|
|
8053
|
-
onClick: () =>
|
|
8053
|
+
onClick: () => w(e)
|
|
8054
8054
|
})] }) : /* @__PURE__ */ $("span", {
|
|
8055
8055
|
title: "Not editable at tenant scope (its declared scopes do not admit tenant).",
|
|
8056
8056
|
style: {
|
|
@@ -8069,14 +8069,14 @@ function Ws(e) {
|
|
|
8069
8069
|
})
|
|
8070
8070
|
})
|
|
8071
8071
|
]
|
|
8072
|
-
}),
|
|
8073
|
-
param:
|
|
8074
|
-
current:
|
|
8075
|
-
error:
|
|
8072
|
+
}), h && /* @__PURE__ */ Q(ws, {
|
|
8073
|
+
param: h,
|
|
8074
|
+
current: _.get(h.code)?.value ?? h.value,
|
|
8075
|
+
error: x,
|
|
8076
8076
|
onCancel: () => {
|
|
8077
|
-
|
|
8077
|
+
g(null), S();
|
|
8078
8078
|
},
|
|
8079
|
-
onSave: (e) =>
|
|
8079
|
+
onSave: (e) => C(h, e)
|
|
8080
8080
|
})]
|
|
8081
8081
|
});
|
|
8082
8082
|
}
|
|
@@ -8136,14 +8136,14 @@ var qs = [
|
|
|
8136
8136
|
["Escape / close", "Esc"]
|
|
8137
8137
|
];
|
|
8138
8138
|
function Xs() {
|
|
8139
|
-
let e = U((e) => e.colorScheme), t = U((e) => e.accent), r = U((e) => e.density), i = U((e) => e.radius), a = U((e) => e.zebra), o = U((e) => e.set),
|
|
8139
|
+
let e = U((e) => e.colorScheme), t = U((e) => e.accent), r = U((e) => e.density), i = U((e) => e.radius), a = U((e) => e.zebra), o = U((e) => e.set), c = U((e) => e.resetToDefaults), { branding: l } = dn(), u = M().isPhone;
|
|
8140
8140
|
return /* @__PURE__ */ Q("div", {
|
|
8141
8141
|
style: {
|
|
8142
8142
|
flex: 1,
|
|
8143
8143
|
overflowY: "auto",
|
|
8144
|
-
paddingTop:
|
|
8145
|
-
paddingBottom:
|
|
8146
|
-
...
|
|
8144
|
+
paddingTop: u ? 12 : 14,
|
|
8145
|
+
paddingBottom: u ? 24 : 28,
|
|
8146
|
+
...u ? W(14) : {
|
|
8147
8147
|
paddingLeft: 20,
|
|
8148
8148
|
paddingRight: 20
|
|
8149
8149
|
},
|
|
@@ -8186,14 +8186,14 @@ function Xs() {
|
|
|
8186
8186
|
}),
|
|
8187
8187
|
" parameter."
|
|
8188
8188
|
]
|
|
8189
|
-
})] }), /* @__PURE__ */ Q(
|
|
8189
|
+
})] }), /* @__PURE__ */ Q(P, {
|
|
8190
8190
|
size: "sm",
|
|
8191
8191
|
icon: /* @__PURE__ */ Q(n.refresh, { size: 13 }),
|
|
8192
|
-
onClick: () =>
|
|
8192
|
+
onClick: () => c(l?.preferences),
|
|
8193
8193
|
children: "Reset to defaults"
|
|
8194
8194
|
})]
|
|
8195
8195
|
}),
|
|
8196
|
-
/* @__PURE__ */ Q(
|
|
8196
|
+
/* @__PURE__ */ Q(mn, {
|
|
8197
8197
|
title: "Appearance",
|
|
8198
8198
|
icon: /* @__PURE__ */ Q(n.moon, { size: 14 }),
|
|
8199
8199
|
children: /* @__PURE__ */ $("div", {
|
|
@@ -8278,7 +8278,7 @@ function Xs() {
|
|
|
8278
8278
|
/* @__PURE__ */ Q(Zs, {
|
|
8279
8279
|
label: "Zebra rows",
|
|
8280
8280
|
hint: "Alternating row backgrounds on tables",
|
|
8281
|
-
children: /* @__PURE__ */ Q(
|
|
8281
|
+
children: /* @__PURE__ */ Q(s, {
|
|
8282
8282
|
value: a,
|
|
8283
8283
|
onChange: (e) => o("zebra", e)
|
|
8284
8284
|
})
|
|
@@ -8287,13 +8287,13 @@ function Xs() {
|
|
|
8287
8287
|
})
|
|
8288
8288
|
}),
|
|
8289
8289
|
/* @__PURE__ */ Q("div", { style: { height: 12 } }),
|
|
8290
|
-
/* @__PURE__ */ Q(
|
|
8290
|
+
/* @__PURE__ */ Q(mn, {
|
|
8291
8291
|
title: "Keyboard",
|
|
8292
8292
|
icon: /* @__PURE__ */ Q(n.command, { size: 14 }),
|
|
8293
8293
|
children: /* @__PURE__ */ Q("div", {
|
|
8294
8294
|
style: {
|
|
8295
8295
|
display: "grid",
|
|
8296
|
-
gridTemplateColumns:
|
|
8296
|
+
gridTemplateColumns: u ? "minmax(0, 1fr)" : "repeat(2, minmax(0, 1fr))",
|
|
8297
8297
|
gap: 8
|
|
8298
8298
|
},
|
|
8299
8299
|
children: Ys.map(([e, t]) => /* @__PURE__ */ $("div", {
|
|
@@ -8309,7 +8309,7 @@ function Xs() {
|
|
|
8309
8309
|
color: "var(--text-2)"
|
|
8310
8310
|
},
|
|
8311
8311
|
children: e
|
|
8312
|
-
}), /* @__PURE__ */ Q(
|
|
8312
|
+
}), /* @__PURE__ */ Q(_e, { children: t })]
|
|
8313
8313
|
}, e))
|
|
8314
8314
|
})
|
|
8315
8315
|
})
|
|
@@ -8318,7 +8318,7 @@ function Xs() {
|
|
|
8318
8318
|
});
|
|
8319
8319
|
}
|
|
8320
8320
|
function Zs({ label: e, hint: t, children: n }) {
|
|
8321
|
-
let r =
|
|
8321
|
+
let r = M().isPhone;
|
|
8322
8322
|
return /* @__PURE__ */ $("div", {
|
|
8323
8323
|
style: {
|
|
8324
8324
|
display: "flex",
|
|
@@ -8379,7 +8379,7 @@ function Qs({ active: e, onClick: t, children: n, capitalize: r }) {
|
|
|
8379
8379
|
//#endregion
|
|
8380
8380
|
//#region src/components/pages/AdminCatalogPage.tsx
|
|
8381
8381
|
function $s() {
|
|
8382
|
-
let { data: e } =
|
|
8382
|
+
let { data: e } = B(), [t, n] = Y("handlers"), r = M().isPhone;
|
|
8383
8383
|
return e ? /* @__PURE__ */ $("div", {
|
|
8384
8384
|
style: {
|
|
8385
8385
|
display: "flex",
|
|
@@ -8419,12 +8419,12 @@ function $s() {
|
|
|
8419
8419
|
gap: 6,
|
|
8420
8420
|
marginBottom: 14
|
|
8421
8421
|
},
|
|
8422
|
-
children: [/* @__PURE__ */ Q(
|
|
8422
|
+
children: [/* @__PURE__ */ Q(P, {
|
|
8423
8423
|
kind: t === "handlers" ? "primary" : "default",
|
|
8424
8424
|
active: t === "handlers",
|
|
8425
8425
|
onClick: () => n("handlers"),
|
|
8426
8426
|
children: "Handlers"
|
|
8427
|
-
}), /* @__PURE__ */ Q(
|
|
8427
|
+
}), /* @__PURE__ */ Q(P, {
|
|
8428
8428
|
kind: t === "actions" ? "primary" : "default",
|
|
8429
8429
|
active: t === "actions",
|
|
8430
8430
|
onClick: () => n("actions"),
|
|
@@ -8488,7 +8488,7 @@ function ec({ schema: e }) {
|
|
|
8488
8488
|
});
|
|
8489
8489
|
}
|
|
8490
8490
|
function tc({ code: e, handler: t, entity: n }) {
|
|
8491
|
-
let [i, a] = Y(!1), o =
|
|
8491
|
+
let [i, a] = Y(!1), o = M().isPhone, s = t.display?.name ? z(t.display.name) : e;
|
|
8492
8492
|
return /* @__PURE__ */ $("div", {
|
|
8493
8493
|
style: {
|
|
8494
8494
|
border: "1px solid var(--border)",
|
|
@@ -8551,11 +8551,11 @@ function tc({ code: e, handler: t, entity: n }) {
|
|
|
8551
8551
|
flexWrap: "wrap",
|
|
8552
8552
|
justifyContent: o ? "flex-start" : "flex-end"
|
|
8553
8553
|
},
|
|
8554
|
-
children: [/* @__PURE__ */ Q(
|
|
8554
|
+
children: [/* @__PURE__ */ Q(V, {
|
|
8555
8555
|
tone: "slate",
|
|
8556
8556
|
size: "xs",
|
|
8557
8557
|
children: t.type
|
|
8558
|
-
}), n && /* @__PURE__ */ Q(
|
|
8558
|
+
}), n && /* @__PURE__ */ Q(V, {
|
|
8559
8559
|
tone: "violet",
|
|
8560
8560
|
size: "xs",
|
|
8561
8561
|
children: n
|
|
@@ -8596,7 +8596,7 @@ function tc({ code: e, handler: t, entity: n }) {
|
|
|
8596
8596
|
});
|
|
8597
8597
|
}
|
|
8598
8598
|
function nc({ code: e, param: t }) {
|
|
8599
|
-
let n = t.display?.name ?
|
|
8599
|
+
let n = t.display?.name ? z(t.display.name) : void 0, r = M().isPhone;
|
|
8600
8600
|
return /* @__PURE__ */ $("div", {
|
|
8601
8601
|
style: {
|
|
8602
8602
|
display: "flex",
|
|
@@ -8618,17 +8618,17 @@ function nc({ code: e, param: t }) {
|
|
|
8618
8618
|
},
|
|
8619
8619
|
children: e
|
|
8620
8620
|
}),
|
|
8621
|
-
/* @__PURE__ */ Q(
|
|
8621
|
+
/* @__PURE__ */ Q(V, {
|
|
8622
8622
|
tone: "slate",
|
|
8623
8623
|
size: "xs",
|
|
8624
8624
|
children: t.type || "string"
|
|
8625
8625
|
}),
|
|
8626
|
-
t.required && /* @__PURE__ */ Q(
|
|
8626
|
+
t.required && /* @__PURE__ */ Q(V, {
|
|
8627
8627
|
tone: "rose",
|
|
8628
8628
|
size: "xs",
|
|
8629
8629
|
children: "required"
|
|
8630
8630
|
}),
|
|
8631
|
-
t.hidden && /* @__PURE__ */ Q(
|
|
8631
|
+
t.hidden && /* @__PURE__ */ Q(V, {
|
|
8632
8632
|
tone: "slate",
|
|
8633
8633
|
size: "xs",
|
|
8634
8634
|
children: "hidden"
|
|
@@ -8639,7 +8639,7 @@ function nc({ code: e, param: t }) {
|
|
|
8639
8639
|
color: "var(--text-3)",
|
|
8640
8640
|
overflowWrap: "anywhere"
|
|
8641
8641
|
},
|
|
8642
|
-
children: ["default: ",
|
|
8642
|
+
children: ["default: ", ht(t.default)]
|
|
8643
8643
|
}),
|
|
8644
8644
|
n && /* @__PURE__ */ Q("span", {
|
|
8645
8645
|
style: {
|
|
@@ -8708,7 +8708,7 @@ function rc({ schema: e }) {
|
|
|
8708
8708
|
});
|
|
8709
8709
|
}
|
|
8710
8710
|
function ic({ code: e, action: t }) {
|
|
8711
|
-
let n =
|
|
8711
|
+
let n = z(t.display?.name), i = M().isPhone;
|
|
8712
8712
|
return /* @__PURE__ */ $("div", {
|
|
8713
8713
|
style: {
|
|
8714
8714
|
border: "1px solid var(--border)",
|
|
@@ -8768,7 +8768,7 @@ function ic({ code: e, action: t }) {
|
|
|
8768
8768
|
children: [
|
|
8769
8769
|
(() => {
|
|
8770
8770
|
let e = t.handler ? "handler" : t.association ? "association" : t.widget ? "widget" : t.href ? "href" : null;
|
|
8771
|
-
return e ? /* @__PURE__ */ Q(
|
|
8771
|
+
return e ? /* @__PURE__ */ Q(V, {
|
|
8772
8772
|
tone: "slate",
|
|
8773
8773
|
size: "xs",
|
|
8774
8774
|
children: e
|
|
@@ -8788,7 +8788,7 @@ function ic({ code: e, action: t }) {
|
|
|
8788
8788
|
display: "flex",
|
|
8789
8789
|
gap: 4
|
|
8790
8790
|
},
|
|
8791
|
-
children: t.visibility.map((e) => /* @__PURE__ */ Q(
|
|
8791
|
+
children: t.visibility.map((e) => /* @__PURE__ */ Q(V, {
|
|
8792
8792
|
tone: "slate",
|
|
8793
8793
|
size: "xs",
|
|
8794
8794
|
children: e
|
|
@@ -8800,7 +8800,7 @@ function ic({ code: e, action: t }) {
|
|
|
8800
8800
|
}
|
|
8801
8801
|
//#endregion
|
|
8802
8802
|
//#region src/components/pages/SmartListPage.tsx
|
|
8803
|
-
var ac = Vr(() => import("./SmartListPage.impl-
|
|
8803
|
+
var ac = Vr(() => import("./SmartListPage.impl-DnM8e14t.js").then((e) => ({ default: e.SmartListPage })));
|
|
8804
8804
|
function oc(e) {
|
|
8805
8805
|
return /* @__PURE__ */ Q(zr, {
|
|
8806
8806
|
fallback: null,
|
|
@@ -8809,7 +8809,7 @@ function oc(e) {
|
|
|
8809
8809
|
}
|
|
8810
8810
|
//#endregion
|
|
8811
8811
|
//#region src/components/pages/SmartDetailPage.tsx
|
|
8812
|
-
var sc = Vr(() => import("./SmartDetailPage.impl-
|
|
8812
|
+
var sc = Vr(() => import("./SmartDetailPage.impl-DoIjCzjQ.js").then((e) => ({ default: e.SmartDetailPage })));
|
|
8813
8813
|
function cc(e) {
|
|
8814
8814
|
return /* @__PURE__ */ Q(zr, {
|
|
8815
8815
|
fallback: null,
|
|
@@ -8818,7 +8818,7 @@ function cc(e) {
|
|
|
8818
8818
|
}
|
|
8819
8819
|
//#endregion
|
|
8820
8820
|
//#region src/components/pages/SmartRecordListPage.tsx
|
|
8821
|
-
var lc = Vr(() => import("./SmartRecordListPage.impl-
|
|
8821
|
+
var lc = Vr(() => import("./SmartRecordListPage.impl-BmHGYbD9.js").then((e) => ({ default: e.SmartRecordListPage })));
|
|
8822
8822
|
function uc(e) {
|
|
8823
8823
|
return /* @__PURE__ */ Q(zr, {
|
|
8824
8824
|
fallback: null,
|
|
@@ -8845,28 +8845,28 @@ function dc() {
|
|
|
8845
8845
|
async function c() {
|
|
8846
8846
|
if (!t) {
|
|
8847
8847
|
try {
|
|
8848
|
-
await
|
|
8848
|
+
await h(), a = 0, i = r;
|
|
8849
8849
|
} catch (e) {
|
|
8850
8850
|
a === 0 && console.warn("[declarion] version probe failed; backing off", e), a += 1, i = Math.min(1e3 * 2 ** Math.min(a - 1, 9), 3e5);
|
|
8851
8851
|
}
|
|
8852
8852
|
s(i);
|
|
8853
8853
|
}
|
|
8854
8854
|
}
|
|
8855
|
-
function
|
|
8856
|
-
let e =
|
|
8857
|
-
e &&
|
|
8855
|
+
function l() {
|
|
8856
|
+
let e = le();
|
|
8857
|
+
e && d(e);
|
|
8858
8858
|
let t = Date.now();
|
|
8859
8859
|
t - o < 5e3 || (o = t, c());
|
|
8860
8860
|
}
|
|
8861
|
-
function
|
|
8862
|
-
document.visibilityState === "visible" &&
|
|
8861
|
+
function u() {
|
|
8862
|
+
document.visibilityState === "visible" && l();
|
|
8863
8863
|
}
|
|
8864
|
-
let
|
|
8864
|
+
let d = (t) => {
|
|
8865
8865
|
if (t.kind === "schema-only") {
|
|
8866
8866
|
e.invalidateQueries({ queryKey: ["schema"] });
|
|
8867
8867
|
return;
|
|
8868
8868
|
}
|
|
8869
|
-
|
|
8869
|
+
oe() || L.info("A new version is available", "Reload to pick up the latest UI and schema.", {
|
|
8870
8870
|
id: "declarion-update-available",
|
|
8871
8871
|
sticky: !0,
|
|
8872
8872
|
action: {
|
|
@@ -8876,19 +8876,19 @@ function dc() {
|
|
|
8876
8876
|
}
|
|
8877
8877
|
}
|
|
8878
8878
|
});
|
|
8879
|
-
},
|
|
8880
|
-
return window.addEventListener("focus",
|
|
8881
|
-
t = !0,
|
|
8879
|
+
}, f = lt(d);
|
|
8880
|
+
return window.addEventListener("focus", l), window.addEventListener("online", l), document.addEventListener("visibilitychange", u), c(), () => {
|
|
8881
|
+
t = !0, f(), window.removeEventListener("focus", l), window.removeEventListener("online", l), document.removeEventListener("visibilitychange", u), n !== null && clearTimeout(n);
|
|
8882
8882
|
};
|
|
8883
8883
|
}, [e]);
|
|
8884
8884
|
}
|
|
8885
8885
|
//#endregion
|
|
8886
8886
|
//#region src/lib/capabilityPrefetch.ts
|
|
8887
8887
|
var fc = [
|
|
8888
|
-
() => import("./MarkdownRenderer-
|
|
8888
|
+
() => import("./MarkdownRenderer-CZo5ZgM7.js"),
|
|
8889
8889
|
() => import("./JsonEditor-DoNmyrYd.js"),
|
|
8890
|
-
() => import("./Grid
|
|
8891
|
-
() => import("./DraggableChildrenTable-
|
|
8890
|
+
() => import("./Grid-Bd2r0_4J.js"),
|
|
8891
|
+
() => import("./DraggableChildrenTable-Djc7QDzR.js")
|
|
8892
8892
|
];
|
|
8893
8893
|
function pc() {
|
|
8894
8894
|
for (let e of fc) e().catch(() => {});
|
|
@@ -9003,7 +9003,7 @@ var Mc = "declarion-managed-favicon", Nc = new ti({ defaultOptions: { queries: {
|
|
|
9003
9003
|
staleTime: 3e5,
|
|
9004
9004
|
retry: 1
|
|
9005
9005
|
} } });
|
|
9006
|
-
|
|
9006
|
+
Bn(Nc, En);
|
|
9007
9007
|
function Pc(e) {
|
|
9008
9008
|
if (typeof window > "u") return null;
|
|
9009
9009
|
try {
|
|
@@ -9014,7 +9014,7 @@ function Pc(e) {
|
|
|
9014
9014
|
}
|
|
9015
9015
|
}
|
|
9016
9016
|
function Fc() {
|
|
9017
|
-
let { data: e } =
|
|
9017
|
+
let { data: e } = B();
|
|
9018
9018
|
return {
|
|
9019
9019
|
routes: q(() => {
|
|
9020
9020
|
if (!e) return [];
|
|
@@ -9025,7 +9025,7 @@ function Fc() {
|
|
|
9025
9025
|
if ((i ? e.entities?.[i] : void 0)?.singleton) continue;
|
|
9026
9026
|
t.push(/* @__PURE__ */ Q(X, {
|
|
9027
9027
|
path: r.route,
|
|
9028
|
-
element: /* @__PURE__ */ Q(
|
|
9028
|
+
element: /* @__PURE__ */ Q(_n, { children: /* @__PURE__ */ Q(jt, {
|
|
9029
9029
|
code: n,
|
|
9030
9030
|
children: /* @__PURE__ */ Q(oc, { screenCode: n })
|
|
9031
9031
|
}) })
|
|
@@ -9035,7 +9035,7 @@ function Fc() {
|
|
|
9035
9035
|
if (r.type === "detail") {
|
|
9036
9036
|
t.push(/* @__PURE__ */ Q(X, {
|
|
9037
9037
|
path: r.route,
|
|
9038
|
-
element: /* @__PURE__ */ Q(
|
|
9038
|
+
element: /* @__PURE__ */ Q(_n, { children: /* @__PURE__ */ Q(jt, {
|
|
9039
9039
|
code: n,
|
|
9040
9040
|
children: /* @__PURE__ */ Q(cc, { screenCode: n })
|
|
9041
9041
|
}) })
|
|
@@ -9045,7 +9045,7 @@ function Fc() {
|
|
|
9045
9045
|
if (r.type === "record_list") {
|
|
9046
9046
|
t.push(/* @__PURE__ */ Q(X, {
|
|
9047
9047
|
path: r.route,
|
|
9048
|
-
element: /* @__PURE__ */ Q(
|
|
9048
|
+
element: /* @__PURE__ */ Q(_n, { children: /* @__PURE__ */ Q(jt, {
|
|
9049
9049
|
code: n,
|
|
9050
9050
|
children: /* @__PURE__ */ Q(uc, { screenCode: n })
|
|
9051
9051
|
}) })
|
|
@@ -9056,7 +9056,7 @@ function Fc() {
|
|
|
9056
9056
|
let e = r.component ? vc(r.component) : void 0;
|
|
9057
9057
|
e && t.push(/* @__PURE__ */ Q(X, {
|
|
9058
9058
|
path: r.route,
|
|
9059
|
-
element: /* @__PURE__ */ Q(
|
|
9059
|
+
element: /* @__PURE__ */ Q(_n, { children: /* @__PURE__ */ Q(jt, {
|
|
9060
9060
|
code: n,
|
|
9061
9061
|
children: /* @__PURE__ */ Q(e, { screenCode: n })
|
|
9062
9062
|
}) })
|
|
@@ -9069,7 +9069,7 @@ function Fc() {
|
|
|
9069
9069
|
};
|
|
9070
9070
|
}
|
|
9071
9071
|
function Ic() {
|
|
9072
|
-
let t =
|
|
9072
|
+
let t = I((e) => e.initialize), n = I((e) => e.isLoading), r = I((e) => e.isAuthenticated), { data: i } = B(), { data: a, isLoading: o } = wt(), { branding: s, isLoading: c } = dn(), { routes: l, defaultRoute: u } = Fc(), d = ke(), f = typeof window < "u" && window.self !== window.top && !d.enabled;
|
|
9073
9073
|
K(() => {
|
|
9074
9074
|
d.enabled || f || t();
|
|
9075
9075
|
}, [
|
|
@@ -9090,7 +9090,7 @@ function Ic() {
|
|
|
9090
9090
|
e && (document.title = e);
|
|
9091
9091
|
}, [m?.app_name]), K(() => {
|
|
9092
9092
|
if (typeof document > "u") return;
|
|
9093
|
-
let e = m?.app_logo, t =
|
|
9093
|
+
let e = m?.app_logo, t = sn(e) ? Pc(e.trim()) : null, n = document.getElementById(Mc);
|
|
9094
9094
|
if (!t) {
|
|
9095
9095
|
n && n.remove();
|
|
9096
9096
|
return;
|
|
@@ -9205,17 +9205,17 @@ function Lc() {
|
|
|
9205
9205
|
] });
|
|
9206
9206
|
}
|
|
9207
9207
|
function Rc({ children: e }) {
|
|
9208
|
-
let t =
|
|
9209
|
-
return /* @__PURE__ */ Q(
|
|
9208
|
+
let t = nn(), n = on();
|
|
9209
|
+
return /* @__PURE__ */ Q(st, {
|
|
9210
9210
|
viewport: t,
|
|
9211
9211
|
breakpoints: n,
|
|
9212
9212
|
children: e
|
|
9213
9213
|
});
|
|
9214
9214
|
}
|
|
9215
9215
|
function zc() {
|
|
9216
|
-
return /* @__PURE__ */ Q(
|
|
9216
|
+
return /* @__PURE__ */ Q(_n, { children: /* @__PURE__ */ Q(ni, {
|
|
9217
9217
|
client: Nc,
|
|
9218
|
-
children: /* @__PURE__ */ Q(
|
|
9218
|
+
children: /* @__PURE__ */ Q(d, { children: /* @__PURE__ */ Q(Rc, { children: /* @__PURE__ */ Q(Lc, {}) }) })
|
|
9219
9219
|
}) });
|
|
9220
9220
|
}
|
|
9221
9221
|
//#endregion
|
|
@@ -9238,7 +9238,7 @@ var Bc = class {
|
|
|
9238
9238
|
}
|
|
9239
9239
|
async execute() {
|
|
9240
9240
|
if (this.ops.length === 0) throw Error("declarion: batch.execute() called with no ops; add ops via .call() or .upsert()");
|
|
9241
|
-
return await
|
|
9241
|
+
return await Ce("system.batch", {
|
|
9242
9242
|
actions: this.ops,
|
|
9243
9243
|
atomic: !0
|
|
9244
9244
|
});
|
|
@@ -9268,20 +9268,20 @@ function Wc(e, t = {}) {
|
|
|
9268
9268
|
count: "with"
|
|
9269
9269
|
}, i;
|
|
9270
9270
|
try {
|
|
9271
|
-
i = await
|
|
9271
|
+
i = await Et(e, {
|
|
9272
9272
|
...r,
|
|
9273
9273
|
page: 1
|
|
9274
9274
|
}, { signal: n });
|
|
9275
9275
|
} catch (t) {
|
|
9276
|
-
throw t instanceof
|
|
9276
|
+
throw t instanceof l && t.code === "cursor.cross_tier_offset_unsupported" ? Error(`useAllEntityData: entity "${e}" is cursor-paginated (cross-store archive); it cannot be eagerly fetched into memory. Use a paginated cursor list (useCursorEntityData) instead.`) : t;
|
|
9277
9277
|
}
|
|
9278
9278
|
let a = i.meta.total_pages ?? 1;
|
|
9279
9279
|
if (a <= 1) return i;
|
|
9280
9280
|
if (a > Uc) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${Uc}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
|
|
9281
|
-
let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) =>
|
|
9281
|
+
let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) => Et(e, {
|
|
9282
9282
|
...r,
|
|
9283
9283
|
page: i + 2
|
|
9284
|
-
}, { signal: n }))), s = new
|
|
9284
|
+
}, { signal: n }))), s = new Ke();
|
|
9285
9285
|
s.merge(i.$refs);
|
|
9286
9286
|
let c = [...i.data];
|
|
9287
9287
|
for (let e of o) c.push(...e.data), s.merge(e.$refs);
|
|
@@ -9301,12 +9301,12 @@ function Wc(e, t = {}) {
|
|
|
9301
9301
|
//#endregion
|
|
9302
9302
|
//#region src/hooks/useLiveObject.ts
|
|
9303
9303
|
function Gc(e, t) {
|
|
9304
|
-
let n =
|
|
9304
|
+
let n = fn(e, t), { data: r } = B(), a = n.data?.data ? i(n.data.data) : void 0, o = ze(e ? r?.entities?.[e]?.realtime : void 0, e ?? ""), s = e ? o : !1;
|
|
9305
9305
|
return {
|
|
9306
9306
|
...n,
|
|
9307
|
-
object:
|
|
9308
|
-
isLive:
|
|
9309
|
-
isNotFound: n.error instanceof
|
|
9307
|
+
object: a,
|
|
9308
|
+
isLive: s,
|
|
9309
|
+
isNotFound: n.error instanceof l && n.error.status === 404
|
|
9310
9310
|
};
|
|
9311
9311
|
}
|
|
9312
9312
|
//#endregion
|
|
@@ -9359,20 +9359,20 @@ function Jc(e) {
|
|
|
9359
9359
|
//#endregion
|
|
9360
9360
|
//#region src/components/chrome/PageHeader.tsx
|
|
9361
9361
|
function Yc({ title: e, description: t, backTo: r, actions: i }) {
|
|
9362
|
-
let a =
|
|
9362
|
+
let a = gt(), o = e ?? z(a?.screen?.display?.name) ?? "", s = t ?? z(a?.screen?.display?.description), c = ln("custom"), l = c.isVisible("show_title"), d = c.isVisible("show_actions"), f = ke(), p = ie(), m = G(() => {
|
|
9363
9363
|
if (r) {
|
|
9364
|
-
if (!
|
|
9364
|
+
if (!f.enabled) {
|
|
9365
9365
|
let e = H.getState().findTabByPathname(r);
|
|
9366
9366
|
e && H.getState().switchTab(e.id);
|
|
9367
9367
|
}
|
|
9368
|
-
|
|
9368
|
+
p(r);
|
|
9369
9369
|
}
|
|
9370
9370
|
}, [
|
|
9371
9371
|
r,
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
]), { hasOriginBack:
|
|
9375
|
-
return !l && (!
|
|
9372
|
+
f.enabled,
|
|
9373
|
+
p
|
|
9374
|
+
]), { hasOriginBack: h, goBack: g } = zn({ fallback: m });
|
|
9375
|
+
return !l && (!d || !i) ? null : /* @__PURE__ */ $("div", {
|
|
9376
9376
|
style: {
|
|
9377
9377
|
display: "flex",
|
|
9378
9378
|
alignItems: "center",
|
|
@@ -9388,9 +9388,9 @@ function Yc({ title: e, description: t, backTo: r, actions: i }) {
|
|
|
9388
9388
|
minWidth: 0
|
|
9389
9389
|
},
|
|
9390
9390
|
children: [
|
|
9391
|
-
(
|
|
9391
|
+
(h || !!r) && /* @__PURE__ */ Q(u, {
|
|
9392
9392
|
icon: /* @__PURE__ */ Q(n.back, { size: 14 }),
|
|
9393
|
-
onClick:
|
|
9393
|
+
onClick: g,
|
|
9394
9394
|
title: "Back"
|
|
9395
9395
|
}),
|
|
9396
9396
|
/* @__PURE__ */ Q("h1", {
|
|
@@ -9407,12 +9407,12 @@ function Yc({ title: e, description: t, backTo: r, actions: i }) {
|
|
|
9407
9407
|
},
|
|
9408
9408
|
children: o
|
|
9409
9409
|
}),
|
|
9410
|
-
s && /* @__PURE__ */ Q(
|
|
9410
|
+
s && /* @__PURE__ */ Q(rn, {
|
|
9411
9411
|
label: s,
|
|
9412
9412
|
"data-testid": "page-description-info"
|
|
9413
9413
|
})
|
|
9414
9414
|
]
|
|
9415
|
-
}),
|
|
9415
|
+
}), d && i && /* @__PURE__ */ Q("div", {
|
|
9416
9416
|
style: {
|
|
9417
9417
|
display: "flex",
|
|
9418
9418
|
alignItems: "center",
|
|
@@ -9427,72 +9427,72 @@ function Yc({ title: e, description: t, backTo: r, actions: i }) {
|
|
|
9427
9427
|
}
|
|
9428
9428
|
//#endregion
|
|
9429
9429
|
//#region src/components/actions/ObjectActionBar.tsx
|
|
9430
|
-
function Xc({ entity: e, object: t, slot: n, screen: r, select:
|
|
9431
|
-
let { data:
|
|
9432
|
-
|
|
9430
|
+
function Xc({ entity: e, object: t, slot: n, screen: r, select: i, onAfterRun: a }) {
|
|
9431
|
+
let { data: o } = B(), { run: s, isRunning: c } = rt(), l = ie(), u = On(), d = Je(), f = Jr(), p = o?.entities?.[e], m = q(() => Qc(o, e, r, f.pathname), [
|
|
9432
|
+
o,
|
|
9433
9433
|
e,
|
|
9434
9434
|
r,
|
|
9435
|
-
|
|
9436
|
-
]),
|
|
9435
|
+
f.pathname
|
|
9436
|
+
]), h = o?.actions, g = St(o, e);
|
|
9437
9437
|
return {
|
|
9438
9438
|
nodes: q(() => {
|
|
9439
|
-
if (!
|
|
9440
|
-
let e = el(
|
|
9441
|
-
return
|
|
9439
|
+
if (!p || !t) return [];
|
|
9440
|
+
let e = el(Ne(m?.action_layout, p.action_layout, p.actions, h, n), i);
|
|
9441
|
+
return De(e, p.actions, h, t, [], ar(p, t));
|
|
9442
9442
|
}, [
|
|
9443
|
-
|
|
9444
|
-
|
|
9443
|
+
m?.action_layout,
|
|
9444
|
+
p,
|
|
9445
9445
|
t,
|
|
9446
|
-
|
|
9446
|
+
h,
|
|
9447
9447
|
n,
|
|
9448
|
-
|
|
9448
|
+
i
|
|
9449
9449
|
]),
|
|
9450
9450
|
run: (n, r) => {
|
|
9451
|
-
if (!
|
|
9451
|
+
if (!p || !t) return;
|
|
9452
9452
|
let i = cr(n, r, { row: t }, e);
|
|
9453
9453
|
if (i === null) return;
|
|
9454
|
-
let
|
|
9455
|
-
return
|
|
9454
|
+
let o = pe(t, p), c = o ? [o] : [], u = n === "__delete" && g ? g.route : null;
|
|
9455
|
+
return s({
|
|
9456
9456
|
action: r,
|
|
9457
|
-
title:
|
|
9457
|
+
title: z(r.display?.name) || n,
|
|
9458
9458
|
row: t,
|
|
9459
|
-
execute: (e) =>
|
|
9459
|
+
execute: (e) => qe(i, je(e, c)),
|
|
9460
9460
|
onSuccess: (e) => {
|
|
9461
|
-
|
|
9461
|
+
u && l(u, { replace: !0 }), a?.(n, e);
|
|
9462
9462
|
}
|
|
9463
9463
|
});
|
|
9464
9464
|
},
|
|
9465
|
-
isBusy:
|
|
9465
|
+
isBusy: c,
|
|
9466
9466
|
widgetContext: q(() => {
|
|
9467
|
-
if (!
|
|
9468
|
-
let n =
|
|
9467
|
+
if (!p || !t) return;
|
|
9468
|
+
let n = pe(t, p);
|
|
9469
9469
|
return {
|
|
9470
|
-
entity:
|
|
9470
|
+
entity: p,
|
|
9471
9471
|
entityCode: e,
|
|
9472
|
-
screen:
|
|
9473
|
-
screenRoute:
|
|
9472
|
+
screen: m,
|
|
9473
|
+
screenRoute: m?.route ?? "",
|
|
9474
9474
|
selectedRows: [t],
|
|
9475
9475
|
selectedIds: n ? [n] : [],
|
|
9476
|
-
locale:
|
|
9477
|
-
tabNavigate: (e, t) =>
|
|
9476
|
+
locale: d,
|
|
9477
|
+
tabNavigate: (e, t) => u(e, {
|
|
9478
9478
|
title: t?.title,
|
|
9479
9479
|
icon: t?.icon,
|
|
9480
9480
|
search: t?.search
|
|
9481
9481
|
}),
|
|
9482
|
-
runActionApi: (e, t) =>
|
|
9482
|
+
runActionApi: (e, t) => qe(e, t)
|
|
9483
9483
|
};
|
|
9484
9484
|
}, [
|
|
9485
|
-
|
|
9485
|
+
p,
|
|
9486
9486
|
e,
|
|
9487
|
-
|
|
9487
|
+
m,
|
|
9488
9488
|
t,
|
|
9489
|
-
|
|
9490
|
-
|
|
9489
|
+
d,
|
|
9490
|
+
u
|
|
9491
9491
|
])
|
|
9492
9492
|
};
|
|
9493
9493
|
}
|
|
9494
9494
|
function Zc({ entity: e, object: t, slot: n, screen: r, select: i, extraActions: a, onAfterRun: o }) {
|
|
9495
|
-
let { data: s } =
|
|
9495
|
+
let { data: s } = B(), { nodes: c, run: l, widgetContext: u } = Xc({
|
|
9496
9496
|
entity: e,
|
|
9497
9497
|
object: t,
|
|
9498
9498
|
slot: n,
|
|
@@ -9550,71 +9550,71 @@ var nl = {
|
|
|
9550
9550
|
alignItems: "center",
|
|
9551
9551
|
gap: 4
|
|
9552
9552
|
};
|
|
9553
|
-
function rl({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "always", label: o, placeholder:
|
|
9554
|
-
let [
|
|
9553
|
+
function rl({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "always", label: o, placeholder: c }) {
|
|
9554
|
+
let [l, d] = Y(e), [f, p] = Y(e), [h, g] = Y(!1), [_, v] = Y(e), y = J(null);
|
|
9555
9555
|
K(() => {
|
|
9556
|
-
|
|
9556
|
+
d(e), p(e), v(e);
|
|
9557
9557
|
}, [e]);
|
|
9558
|
-
let
|
|
9559
|
-
|
|
9560
|
-
},
|
|
9561
|
-
let n =
|
|
9562
|
-
|
|
9558
|
+
let x = () => {
|
|
9559
|
+
v(f), g(!0);
|
|
9560
|
+
}, S = async (e) => {
|
|
9561
|
+
let n = l;
|
|
9562
|
+
p(e), d(e), g(!1);
|
|
9563
9563
|
try {
|
|
9564
9564
|
await t(e);
|
|
9565
9565
|
} catch (e) {
|
|
9566
|
-
|
|
9566
|
+
p(n), d(n), L.error(`${o ? o + " " : ""}save failed`, e instanceof Error ? e.message : String(e));
|
|
9567
9567
|
}
|
|
9568
|
-
},
|
|
9569
|
-
|
|
9570
|
-
},
|
|
9571
|
-
if (
|
|
9572
|
-
|
|
9568
|
+
}, C = () => {
|
|
9569
|
+
v(f), g(!1);
|
|
9570
|
+
}, w = () => {
|
|
9571
|
+
if (_ === void 0) return C();
|
|
9572
|
+
S(_);
|
|
9573
9573
|
};
|
|
9574
|
-
return
|
|
9574
|
+
return h ? /* @__PURE__ */ $("div", {
|
|
9575
9575
|
style: {
|
|
9576
9576
|
display: "flex",
|
|
9577
9577
|
alignItems: "center",
|
|
9578
9578
|
gap: 4
|
|
9579
9579
|
},
|
|
9580
9580
|
onKeyDown: (e) => {
|
|
9581
|
-
e.key === "Enter" &&
|
|
9581
|
+
e.key === "Enter" && w(), e.key === "Escape" && C();
|
|
9582
9582
|
},
|
|
9583
|
-
children: [r === "select" ? /* @__PURE__ */ Q(
|
|
9584
|
-
value:
|
|
9583
|
+
children: [r === "select" ? /* @__PURE__ */ Q(m, {
|
|
9584
|
+
value: _,
|
|
9585
9585
|
options: i || [],
|
|
9586
9586
|
onChange: (e) => {
|
|
9587
|
-
|
|
9587
|
+
v(e), S(e);
|
|
9588
9588
|
}
|
|
9589
|
-
}) : r === "bool" ? /* @__PURE__ */ Q(
|
|
9590
|
-
value:
|
|
9589
|
+
}) : r === "bool" ? /* @__PURE__ */ Q(s, {
|
|
9590
|
+
value: _ === "true",
|
|
9591
9591
|
onChange: (e) => {
|
|
9592
9592
|
let t = String(e);
|
|
9593
|
-
|
|
9593
|
+
v(t), S(t);
|
|
9594
9594
|
}
|
|
9595
|
-
}) : /* @__PURE__ */ Q(
|
|
9596
|
-
value:
|
|
9597
|
-
onChange:
|
|
9595
|
+
}) : /* @__PURE__ */ Q(b, {
|
|
9596
|
+
value: _ ?? "",
|
|
9597
|
+
onChange: v,
|
|
9598
9598
|
autoFocus: !0,
|
|
9599
|
-
placeholder:
|
|
9600
|
-
}), r !== "select" && r !== "bool" && /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(
|
|
9599
|
+
placeholder: c
|
|
9600
|
+
}), r !== "select" && r !== "bool" && /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(u, {
|
|
9601
9601
|
size: 24,
|
|
9602
9602
|
icon: /* @__PURE__ */ Q(n.check, { size: 13 }),
|
|
9603
|
-
onClick:
|
|
9603
|
+
onClick: w,
|
|
9604
9604
|
title: "Save"
|
|
9605
|
-
}), /* @__PURE__ */ Q(
|
|
9605
|
+
}), /* @__PURE__ */ Q(u, {
|
|
9606
9606
|
size: 24,
|
|
9607
9607
|
icon: /* @__PURE__ */ Q(n.x, { size: 13 }),
|
|
9608
|
-
onClick:
|
|
9608
|
+
onClick: C,
|
|
9609
9609
|
title: "Cancel"
|
|
9610
9610
|
})] })]
|
|
9611
9611
|
}) : /* @__PURE__ */ Q("div", {
|
|
9612
|
-
ref:
|
|
9612
|
+
ref: y,
|
|
9613
9613
|
tabIndex: a === "enter" ? 0 : void 0,
|
|
9614
|
-
onClick: a === "always" ?
|
|
9615
|
-
onDoubleClick: a === "dblclick" ?
|
|
9614
|
+
onClick: a === "always" ? x : void 0,
|
|
9615
|
+
onDoubleClick: a === "dblclick" ? x : void 0,
|
|
9616
9616
|
onKeyDown: a === "enter" ? (e) => {
|
|
9617
|
-
e.key === "Enter" &&
|
|
9617
|
+
e.key === "Enter" && x();
|
|
9618
9618
|
} : void 0,
|
|
9619
9619
|
onMouseEnter: (e) => {
|
|
9620
9620
|
e.currentTarget.style.borderColor = "var(--border)";
|
|
@@ -9623,7 +9623,7 @@ function rl({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "a
|
|
|
9623
9623
|
e.currentTarget.style.borderColor = "transparent";
|
|
9624
9624
|
},
|
|
9625
9625
|
style: nl,
|
|
9626
|
-
children:
|
|
9626
|
+
children: f ?? /* @__PURE__ */ Q("span", {
|
|
9627
9627
|
style: { color: "var(--text-4)" },
|
|
9628
9628
|
children: "Click to edit"
|
|
9629
9629
|
})
|
|
@@ -9775,7 +9775,7 @@ function sl({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
9775
9775
|
},
|
|
9776
9776
|
children: e.val
|
|
9777
9777
|
}),
|
|
9778
|
-
/* @__PURE__ */ Q(
|
|
9778
|
+
/* @__PURE__ */ Q(V, {
|
|
9779
9779
|
tone: e.tone,
|
|
9780
9780
|
size: "xs",
|
|
9781
9781
|
children: e.delta
|
|
@@ -9789,7 +9789,7 @@ function sl({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
9789
9789
|
gridTemplateColumns: "2fr 1fr",
|
|
9790
9790
|
gap: 14
|
|
9791
9791
|
},
|
|
9792
|
-
children: [/* @__PURE__ */ Q(
|
|
9792
|
+
children: [/* @__PURE__ */ Q(mn, {
|
|
9793
9793
|
title: "Quick access",
|
|
9794
9794
|
icon: /* @__PURE__ */ Q(n.bolt, { size: 14 }),
|
|
9795
9795
|
children: /* @__PURE__ */ Q("div", {
|
|
@@ -9834,7 +9834,7 @@ function sl({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
9834
9834
|
}, t);
|
|
9835
9835
|
})
|
|
9836
9836
|
})
|
|
9837
|
-
}), /* @__PURE__ */ Q(
|
|
9837
|
+
}), /* @__PURE__ */ Q(mn, {
|
|
9838
9838
|
title: "Recent activity",
|
|
9839
9839
|
icon: /* @__PURE__ */ Q(n.activity, { size: 14 }),
|
|
9840
9840
|
children: /* @__PURE__ */ Q("div", {
|
|
@@ -10016,7 +10016,7 @@ function dl() {
|
|
|
10016
10016
|
gap: 6
|
|
10017
10017
|
},
|
|
10018
10018
|
children: [
|
|
10019
|
-
/* @__PURE__ */ Q(
|
|
10019
|
+
/* @__PURE__ */ Q(V, {
|
|
10020
10020
|
tone: e.color,
|
|
10021
10021
|
size: "xs",
|
|
10022
10022
|
children: e.key
|
|
@@ -10072,12 +10072,12 @@ function dl() {
|
|
|
10072
10072
|
marginTop: 6,
|
|
10073
10073
|
flexWrap: "wrap"
|
|
10074
10074
|
},
|
|
10075
|
-
children: [e.priority && e.priority !== "-" && /* @__PURE__ */ Q(
|
|
10075
|
+
children: [e.priority && e.priority !== "-" && /* @__PURE__ */ Q(V, {
|
|
10076
10076
|
tone: ll[e.priority] ?? "slate",
|
|
10077
10077
|
size: "xs",
|
|
10078
10078
|
dot: !0,
|
|
10079
10079
|
children: e.priority
|
|
10080
|
-
}), e.score !== void 0 && /* @__PURE__ */ $(
|
|
10080
|
+
}), e.score !== void 0 && /* @__PURE__ */ $(V, {
|
|
10081
10081
|
tone: "slate",
|
|
10082
10082
|
size: "xs",
|
|
10083
10083
|
children: ["Score ", e.score]
|
|
@@ -10245,7 +10245,7 @@ function hl() {
|
|
|
10245
10245
|
padding: "0 10px",
|
|
10246
10246
|
borderBottom: "1px solid var(--divider)"
|
|
10247
10247
|
},
|
|
10248
|
-
children: /* @__PURE__ */ Q(
|
|
10248
|
+
children: /* @__PURE__ */ Q(V, {
|
|
10249
10249
|
tone: pl[e.status],
|
|
10250
10250
|
size: "xs",
|
|
10251
10251
|
dot: !0,
|
|
@@ -10318,7 +10318,7 @@ function hl() {
|
|
|
10318
10318
|
borderBottom: "1px solid var(--divider)",
|
|
10319
10319
|
textAlign: "right"
|
|
10320
10320
|
},
|
|
10321
|
-
children: /* @__PURE__ */ Q(
|
|
10321
|
+
children: /* @__PURE__ */ Q(u, {
|
|
10322
10322
|
size: 22,
|
|
10323
10323
|
icon: /* @__PURE__ */ Q(n.more, { size: 12 })
|
|
10324
10324
|
})
|
|
@@ -10332,7 +10332,7 @@ function hl() {
|
|
|
10332
10332
|
//#endregion
|
|
10333
10333
|
//#region src/components/layout/ImpersonationStartModal.tsx
|
|
10334
10334
|
function gl({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarted: i }) {
|
|
10335
|
-
let { start: a, isStarting: o } = Vi(), { value: s } =
|
|
10335
|
+
let { start: a, isStarting: o } = Vi(), { value: s } = te("impersonation.require_reason_min_length", 10), [c, l] = Y(""), [u, d] = Y("");
|
|
10336
10336
|
if (!e) return null;
|
|
10337
10337
|
let f = c.trim(), p = f.length >= s;
|
|
10338
10338
|
return /* @__PURE__ */ Q("div", {
|
|
@@ -10502,7 +10502,7 @@ function _l({ open: e, onClose: t, conversations: r, activeId: i, onSelect: a, o
|
|
|
10502
10502
|
children: [/* @__PURE__ */ Q("span", {
|
|
10503
10503
|
className: "font-semibold",
|
|
10504
10504
|
children: "Conversations"
|
|
10505
|
-
}), /* @__PURE__ */ $(
|
|
10505
|
+
}), /* @__PURE__ */ $(P, {
|
|
10506
10506
|
kind: "ghost",
|
|
10507
10507
|
onClick: o,
|
|
10508
10508
|
children: [/* @__PURE__ */ Q(n.plus, {}), " New"]
|
|
@@ -10527,7 +10527,7 @@ function _l({ open: e, onClose: t, conversations: r, activeId: i, onSelect: a, o
|
|
|
10527
10527
|
}),
|
|
10528
10528
|
/* @__PURE__ */ Q("footer", {
|
|
10529
10529
|
className: "border-t border-border p-2",
|
|
10530
|
-
children: /* @__PURE__ */ Q(
|
|
10530
|
+
children: /* @__PURE__ */ Q(P, {
|
|
10531
10531
|
kind: "ghost",
|
|
10532
10532
|
onClick: t,
|
|
10533
10533
|
children: "Close"
|
|
@@ -10537,4 +10537,4 @@ function _l({ open: e, onClose: t, conversations: r, activeId: i, onSelect: a, o
|
|
|
10537
10537
|
}) : null;
|
|
10538
10538
|
}
|
|
10539
10539
|
//#endregion
|
|
10540
|
-
export {
|
|
10540
|
+
export { Bt as ACTION_DATA_CURSOR_KEY, ye as ACTION_DATA_KEY, Me as ActionBatchError, Tt as ActionRunnerProvider, ro as AgentChatPanel, _l as AgentConversationDrawer, za as AgentElicitForm, Ga as AgentPicker, zc as App, zc as Declarion, Jo as AuthShell, Jt as Avatar, Bc as Batch, s as BoolToggle, ci as BrandGlyph, Xi as Breadcrumbs, P as Btn, Oe as CURSOR_LOCALE_CHANGED, C as CURSOR_SEMANTICS_MISMATCH, xs as ChangePasswordDialog, Cn as Check, x as Chip, Qn as CircleImage, pn as ClassifiedFieldLocked, Cr as ColumnPicker, ca as CommandPalette, Ni as ConfirmDialog, jt as CurrentScreenProvider, se as DEFAULT_RESPONSIVE_BREAKPOINTS, Qe as DateInput, A as Dropdown, r as DynamicIcon, Tr as EmptyState, Pt as EntityClient, F as FieldLabel, Ot as FileDraftScope, pr as FilterChips, _r as FilterDrawer, us as Forgot, sl as HomeStub, T as HoverCard, n as Icon, u as IconBtn, na as ImpersonationBanner, ra as ImpersonationFrame, gl as ImpersonationStartModal, rn as InfoTooltip, rl as InlineEditCell, hl as JobsStub, Lt as JsonField, _e as Kbd, ct as MULTIPLE_VALUES, R as MenuItem, Gt as MultiSelect, kr as NO_VALUE_OPS, Nr as OP_LABELS, Zc as ObjectActionBar, tt as OrderedMap, An as PAGE_STATE_TTL_PARAM, Yc as PageHeader, Ve as PasswordInput, V as Pill, dl as PipelineStub, Xs as Preferences, Is as Profile, o as PropertyGridEditor, gr as QEField, Ht as QuickEditCell, fr as QuickPeek, pi as Rail, Sn as RecordIdBadge, Ke as RefCache, nt as RefCombobox, xe as RefField, un as RefreshControl, _s as Reset, st as ResponsiveModeProvider, ui as RowField, an as SCROLL_STATE_KEY, mn as SectionCard, m as Select, Fi as Sidebar, os as SignIn, cs as SignUp, cc as SmartDetailPage, oc as SmartListPage, uc as SmartRecordListPage, N as Spinner, lr as SquareImage, $i as TabStrip, zt as TagsInput, qi as TenantChip, we as TextArea, b as TextInput, en as Tooltip, Qi as TopBar, vs as TwoFA, bt as UploadError, g as ViewField, br as ViewSwitcher, nr as WideBanner, f as actionDataQueryKey, fa as answerQuestion, ma as approveInvocation, je as buildActionBody, ee as buildDetailHrefFromId, Ct as buildEntityDetailHref, j as buildMassEditTargets, D as buildRowDetailHref, Ii as buildSections, _a as cancelConversation, ga as cancelInvocation, Mn as canonicalUrl, Kn as classificationTier, ht as coerceDisplayString, ir as commonVariantActionCodes, Ir as countActiveFilters, ua as createConversation, Rt as cursorActionDataQueryKey, kt as cursorEntityDataQueryKey, Ue as cursorEntityStableKey, he as deleteObject, ot as detectCommonValue, At as discardFile, or as effectiveScreenForRecord, Ye as entityClient, Kt as entityDataQueryKey, Ki as envTone, sr as evaluateFilterTree, qe as executeAction, me as extractPkValues, Vn as fieldAccessInfo, Wn as fieldClassification, a as fieldDisplayName, In as fieldRequiredPermission, Ge as formatBytes, wr as formatCount, yr as formatEstimatedCount, Sr as formatExactCount, ur as getFileWidget, t as getIcon, dr as getImageCropper, bn as getLayoutWidget, Mt as getPrimaryKeyFields, Zn as hasFileWidget, gn as hasLayoutWidget, Ar as hasOrGroups, Te as isCursorStaleError, jn as isFieldReadable, Hn as isFieldSoDProtected, Gn as isFieldWritable, la as listAvailableAgents, va as listConversations, ba as loadConversationInvocations, ya as loadConversationTurns, xa as loadHistory, z as loc, hn as objectQueryKey, jr as parseFilterURLState, Pr as parseFiltersFromURL, ae as parseTargetFilter, Dt as pkValuePartsToId, it as pkValuesFromId, Le as pkValuesToDetailId, yt as pkValuesToId, Xn as registerFileWidget, vn as registerLayoutWidget, _c as registerScreen, ha as rejectInvocation, We as resolveDetailRoute, rr as resolveEntityVariantCode, $n as resolveScreenVariantCode, fe as resolveViewportCategory, Ie as restoreObject, pa as sendElicitResponse, da as sendMessage, Mr as setFiltersInURL, e as setIconRegistry, er as setImageCropper, pt as uploadFile, Se as useActionData, rt as useActionRunner, Ra as useAgentConversation, Wc as useAllEntityData, Bi as useAuth, Kc as useColumns, qn as useCreateObject, gt as useCurrentScreen, v as useCursorActionData, dt as useCursorEntityData, Fe as useDebounce, Nn as useDeleteObject, Or as useDeleteProperty, at as useDraftRegistration, S as useEffectiveParam, $e as useEntity, He as useEntityCount, Ut as useEntityData, Re as useFileDraftScope, xr as useFilters, Vi as useImpersonation, Gc as useLiveObject, qr as useLocation, Yr as useNavigate, fn as useObject, Xc as useObjectActions, mr as usePageState, Jn as usePageStateTtl, te as useParam, Qr as useParams, cn as usePlainScrollRestoration, wt as usePublicParams, Pn as useRegisterRetainedQuery, O as useResolvedParam, M as useResponsiveMode, tn as useSavedScrollOffset, B as useSchema, vr as useScreen, zn as useScreenBack, Jc as useScreenTab, $r as useSearchParams, Er as useSetProperty, Dr as useSetStatus, On as useTabNavigate, Lr as useTabSearchMirror, H as useTabStore, Un as useUpdateObject, Je as useUserLocale, hr as useViews, Yt as useVirtualScrollRestoration, Ft as validateClientSide, ar as variantActionCodesForRecord };
|