@declarion/react 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DraggableChildrenTable-C5cpmctN.js → DraggableChildrenTable-BFkRqNSe.js} +2 -2
- package/dist-lib/{DraggableChildrenTable-C5cpmctN.js.map → DraggableChildrenTable-BFkRqNSe.js.map} +1 -1
- package/dist-lib/{Grid-C69-4exi.js → Grid-pE2-dvug.js} +2 -2
- package/dist-lib/{Grid-C69-4exi.js.map → Grid-pE2-dvug.js.map} +1 -1
- package/dist-lib/api/client.d.ts +7 -0
- package/dist-lib/components/detail-layout/FieldRow.d.ts +2 -1
- package/dist-lib/{dataTableStyles-DiIApmjb.js → dataTableStyles-B40JEa-3.js} +1547 -1546
- package/dist-lib/dataTableStyles-B40JEa-3.js.map +1 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/index.js +344 -325
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/{value-DFpIiSZ-.js → value-qao1rdkR.js} +149 -120
- package/dist-lib/value-qao1rdkR.js.map +1 -0
- package/package.json +1 -1
- package/dist-lib/dataTableStyles-DiIApmjb.js.map +0 -1
- package/dist-lib/value-DFpIiSZ-.js.map +0 -1
- /package/dist-lib/components/fields/cells/factories/{markdownToPlainText.d.ts → markdownPreview.d.ts} +0 -0
package/dist-lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as v, It as y, J as b, Jt as x, K as S, Kt as C, L as w, Lt as T, M as E, Mt as D, N as O, Nt as k, O as A, Ot as j, P as M, Pt as N, Q as P, Qt as F, R as I, Rt as L, S as ee, St as te, T as ne, Tt as re, U as ie, Ut as ae, V as R, Vt as oe, W as se, Wt as ce, X as le, Xt as z, Y as ue, Yt as B, Z as de, Zt as V, _ as fe, _t as pe, a as H, at as me, b as he, bt as ge, c as _e, ct as ve, d as ye, dt as be, et as xe, f as Se, ft as Ce, g as U, gt as W, h as we, ht as Te, i as Ee, it as De, j as Oe, jt as ke, k as Ae, kt as je, l as Me, lt as Ne, m as Pe, mt as Fe, n as Ie, nt as Le, o as Re, ot as ze, p as Be, pt as Ve, q as He, qt as Ue, r as We, rt as Ge, s as Ke, st as qe, t as Je, tt as Ye, u as Xe, ut as Ze, v as Qe, vt as $e, w as et, wt as tt, x as nt, xt as rt, y as it, yt as at, z as ot, zt as st } from "./dataTableStyles-
|
|
2
|
-
import { A as ct, B as lt, C as ut, D as dt,
|
|
1
|
+
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as v, It as y, J as b, Jt as x, K as S, Kt as C, L as w, Lt as T, M as E, Mt as D, N as O, Nt as k, O as A, Ot as j, P as M, Pt as N, Q as P, Qt as F, R as I, Rt as L, S as ee, St as te, T as ne, Tt as re, U as ie, Ut as ae, V as R, Vt as oe, W as se, Wt as ce, X as le, Xt as z, Y as ue, Yt as B, Z as de, Zt as V, _ as fe, _t as pe, a as H, at as me, b as he, bt as ge, c as _e, ct as ve, d as ye, dt as be, et as xe, f as Se, ft as Ce, g as U, gt as W, h as we, ht as Te, i as Ee, it as De, j as Oe, jt as ke, k as Ae, kt as je, l as Me, lt as Ne, m as Pe, mt as Fe, n as Ie, nt as Le, o as Re, ot as ze, p as Be, pt as Ve, q as He, qt as Ue, r as We, rt as Ge, s as Ke, st as qe, t as Je, tt as Ye, u as Xe, ut as Ze, v as Qe, vt as $e, w as et, wt as tt, x as nt, xt as rt, y as it, yt as at, z as ot, zt as st } from "./dataTableStyles-B40JEa-3.js";
|
|
2
|
+
import { A as ct, B as lt, C as ut, D as dt, F as ft, H as pt, I as mt, L as ht, M as gt, N as _t, O as vt, P as yt, R as bt, S as xt, T as St, U as Ct, V as wt, W as Tt, _ as Et, a as Dt, b as Ot, j as kt, o as At, s as jt, v as Mt, x as Nt, y as Pt } from "./value-qao1rdkR.js";
|
|
3
3
|
import { Component as Ft, Fragment as It, Suspense as Lt, createContext as Rt, createElement as zt, lazy as Bt, useCallback as G, useContext as Vt, useEffect as K, useLayoutEffect as Ht, useMemo as q, useRef as J, useState as Y } from "react";
|
|
4
4
|
import { BrowserRouter as Ut, Link as Wt, Navigate as Gt, Outlet as Kt, Route as qt, Routes as Jt, useLocation as Yt, useLocation as Xt, useNavigate as Zt, useNavigate as Qt, useParams as $t, useParams as en, useSearchParams as tn, useSearchParams as nn } from "react-router-dom";
|
|
5
5
|
import { QueryClient as rn, QueryClientProvider as an, useInfiniteQuery as on, useMutation as sn, useQuery as cn, useQueryClient as ln } from "@tanstack/react-query";
|
|
@@ -417,13 +417,13 @@ function er(e, t) {
|
|
|
417
417
|
}
|
|
418
418
|
let { message: i } = r;
|
|
419
419
|
switch (i.type) {
|
|
420
|
-
case
|
|
420
|
+
case lt.setToken:
|
|
421
421
|
t.onAuth(i.payload);
|
|
422
422
|
break;
|
|
423
|
-
case
|
|
423
|
+
case lt.navigate:
|
|
424
424
|
t.onNavigate(i.payload);
|
|
425
425
|
break;
|
|
426
|
-
case
|
|
426
|
+
case lt.setTheme:
|
|
427
427
|
t.onTheme(i.payload);
|
|
428
428
|
break;
|
|
429
429
|
default: break;
|
|
@@ -437,9 +437,9 @@ function nr() {
|
|
|
437
437
|
let e = Qn(), t = Qt(), n = He((e) => e.setUser), [r, i] = Y("pending"), a = J(!1);
|
|
438
438
|
return K(() => {
|
|
439
439
|
if (!e.enabled) return;
|
|
440
|
-
|
|
441
|
-
let r =
|
|
442
|
-
|
|
440
|
+
mt(e.parentOrigin);
|
|
441
|
+
let r = ct(() => {
|
|
442
|
+
wt(e.parentOrigin, lt.reloadRequired, { reason: "embed session terminated" });
|
|
443
443
|
}), o = async () => {
|
|
444
444
|
if (!a.current) {
|
|
445
445
|
a.current = !0;
|
|
@@ -452,7 +452,7 @@ function nr() {
|
|
|
452
452
|
}
|
|
453
453
|
}, s = e.parentOrigin ? er(e.parentOrigin, {
|
|
454
454
|
onAuth: (e) => {
|
|
455
|
-
|
|
455
|
+
bt(e), a.current || o();
|
|
456
456
|
},
|
|
457
457
|
onNavigate: (n) => {
|
|
458
458
|
t(e.appendEmbedParams(n.route));
|
|
@@ -461,12 +461,12 @@ function nr() {
|
|
|
461
461
|
Kn(e.theme);
|
|
462
462
|
}
|
|
463
463
|
}) : null;
|
|
464
|
-
s && window.addEventListener("message", s),
|
|
464
|
+
s && window.addEventListener("message", s), wt(e.parentOrigin, lt.ready, {});
|
|
465
465
|
let c = window.setTimeout(() => {
|
|
466
466
|
a.current || i("error");
|
|
467
467
|
}, tr);
|
|
468
468
|
return () => {
|
|
469
|
-
s && window.removeEventListener("message", s), window.clearTimeout(c),
|
|
469
|
+
s && window.removeEventListener("message", s), window.clearTimeout(c), ct(r);
|
|
470
470
|
};
|
|
471
471
|
}, [
|
|
472
472
|
e,
|
|
@@ -490,7 +490,7 @@ function ir() {
|
|
|
490
490
|
let r = null, i = -1, a = () => {
|
|
491
491
|
r = null;
|
|
492
492
|
let t = n.scrollHeight;
|
|
493
|
-
t !== i && (i = t,
|
|
493
|
+
t !== i && (i = t, wt(e.parentOrigin, lt.resized, { height: t }));
|
|
494
494
|
}, o = new ResizeObserver(() => {
|
|
495
495
|
r === null && (r = window.requestAnimationFrame(a));
|
|
496
496
|
});
|
|
@@ -522,7 +522,7 @@ function or(e, t) {
|
|
|
522
522
|
function sr() {
|
|
523
523
|
let e = Qn(), t = ar((e) => e.isDirty), n = e.enabled && e.parentOrigin !== null;
|
|
524
524
|
return K(() => {
|
|
525
|
-
n &&
|
|
525
|
+
n && wt(e.parentOrigin, lt.dirtyChanged, { dirty: t });
|
|
526
526
|
}, [
|
|
527
527
|
n,
|
|
528
528
|
t,
|
|
@@ -578,7 +578,7 @@ function fr() {
|
|
|
578
578
|
if (n.navigationMode === "delegated") {
|
|
579
579
|
let e = () => {
|
|
580
580
|
let e = lr(i, r?.screens);
|
|
581
|
-
|
|
581
|
+
wt(n.parentOrigin, lt.navigationRequested, e);
|
|
582
582
|
};
|
|
583
583
|
return o ? (ur.getState().requestNavigation(e), !1) : (e(), !1);
|
|
584
584
|
}
|
|
@@ -609,7 +609,7 @@ function mr() {
|
|
|
609
609
|
if (r.current === a) return;
|
|
610
610
|
r.current = a;
|
|
611
611
|
let o = lr(t.pathname, n?.screens);
|
|
612
|
-
|
|
612
|
+
wt(e.parentOrigin, lt.navigated, o);
|
|
613
613
|
}, [
|
|
614
614
|
i,
|
|
615
615
|
t.pathname,
|
|
@@ -2229,26 +2229,39 @@ function qr({ breadcrumbs: e, onCrumbClick: t, onCmdK: n, onToggleAI: r, aiOpen:
|
|
|
2229
2229
|
//#endregion
|
|
2230
2230
|
//#region src/components/layout/TabStrip.tsx
|
|
2231
2231
|
function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
2232
|
-
let n = Qt(), r = J(null),
|
|
2233
|
-
|
|
2234
|
-
|
|
2232
|
+
let n = Qt(), r = J(null), i = J(null), a = J(null), o = J(!1), [s, c] = Y(!1), l = Fn((e) => e.tabs), u = Fn((e) => e.activeTabId), d = m((e) => e.tabsMaxOpen), f = Fn((e) => e.switchTab), p = Fn((e) => e.closeTab), h = l.findIndex((e) => e.id === u);
|
|
2233
|
+
K(() => {
|
|
2234
|
+
let e = h === l.length - 1 ? a.current : i.current;
|
|
2235
|
+
e && (e.scrollIntoView({
|
|
2236
|
+
block: "nearest",
|
|
2237
|
+
inline: "nearest",
|
|
2238
|
+
behavior: o.current ? "smooth" : "auto"
|
|
2239
|
+
}), o.current = !0);
|
|
2240
|
+
}, [
|
|
2241
|
+
u,
|
|
2242
|
+
h,
|
|
2243
|
+
l.length
|
|
2244
|
+
]);
|
|
2245
|
+
let g = G((e, t) => {
|
|
2246
|
+
let r = l[e];
|
|
2247
|
+
r && (f(r.id), n({
|
|
2235
2248
|
pathname: r.pathname,
|
|
2236
2249
|
search: r.search || void 0
|
|
2237
2250
|
}));
|
|
2238
2251
|
}, [
|
|
2239
|
-
o,
|
|
2240
2252
|
l,
|
|
2253
|
+
f,
|
|
2241
2254
|
n
|
|
2242
|
-
]),
|
|
2243
|
-
let r =
|
|
2255
|
+
]), _ = G((e) => {
|
|
2256
|
+
let r = l[e];
|
|
2244
2257
|
if (!r) return;
|
|
2245
2258
|
if (t) {
|
|
2246
2259
|
t("current", r.id);
|
|
2247
2260
|
return;
|
|
2248
2261
|
}
|
|
2249
|
-
let i = r.id ===
|
|
2250
|
-
if (
|
|
2251
|
-
let t =
|
|
2262
|
+
let i = r.id === u;
|
|
2263
|
+
if (p(r.id), i) {
|
|
2264
|
+
let t = l.filter((e) => e.id !== r.id);
|
|
2252
2265
|
if (t.length > 0) {
|
|
2253
2266
|
let r = t[e < t.length ? e : t.length - 1];
|
|
2254
2267
|
n({
|
|
@@ -2258,26 +2271,26 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2258
2271
|
}
|
|
2259
2272
|
}
|
|
2260
2273
|
}, [
|
|
2261
|
-
|
|
2262
|
-
s,
|
|
2274
|
+
l,
|
|
2263
2275
|
u,
|
|
2276
|
+
p,
|
|
2264
2277
|
n,
|
|
2265
2278
|
t
|
|
2266
|
-
]),
|
|
2267
|
-
if (
|
|
2279
|
+
]), v = G((e) => {
|
|
2280
|
+
if (c(!1), t) {
|
|
2268
2281
|
t(e);
|
|
2269
2282
|
return;
|
|
2270
2283
|
}
|
|
2271
|
-
e === "current" &&
|
|
2284
|
+
e === "current" && h >= 0 && _(h);
|
|
2272
2285
|
}, [
|
|
2273
|
-
|
|
2274
|
-
|
|
2286
|
+
h,
|
|
2287
|
+
_,
|
|
2275
2288
|
t
|
|
2276
|
-
]),
|
|
2289
|
+
]), y = G(() => {
|
|
2277
2290
|
e ? e() : n("/");
|
|
2278
2291
|
}, [e, n]);
|
|
2279
|
-
if (
|
|
2280
|
-
let
|
|
2292
|
+
if (l.length === 0) return null;
|
|
2293
|
+
let b = h >= 0 && l.length > 1 && l[h]?.closable !== !1, x = Dn(l, u, "others").length > 0, S = Dn(l, u, "right").length > 0, C = l.length >= d ? "danger" : l.length >= Math.ceil(d * .8) ? "warning" : "normal", w = C === "danger" ? "var(--danger)" : C === "warning" ? "var(--warn)" : "var(--text-3)";
|
|
2281
2294
|
return /* @__PURE__ */ Q("div", {
|
|
2282
2295
|
style: {
|
|
2283
2296
|
display: "flex",
|
|
@@ -2289,6 +2302,7 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2289
2302
|
flexShrink: 0
|
|
2290
2303
|
},
|
|
2291
2304
|
children: [/* @__PURE__ */ Q("div", {
|
|
2305
|
+
className: "scrollbar-none",
|
|
2292
2306
|
style: {
|
|
2293
2307
|
display: "flex",
|
|
2294
2308
|
alignItems: "stretch",
|
|
@@ -2296,12 +2310,13 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2296
2310
|
flex: 1,
|
|
2297
2311
|
gap: 0
|
|
2298
2312
|
},
|
|
2299
|
-
children: [
|
|
2300
|
-
let n = t ===
|
|
2313
|
+
children: [l.map((e, t) => {
|
|
2314
|
+
let n = t === h, r = l.length > 1 && e.closable !== !1;
|
|
2301
2315
|
return /* @__PURE__ */ Q("div", {
|
|
2302
|
-
|
|
2316
|
+
ref: n ? i : void 0,
|
|
2317
|
+
onClick: (e) => g(t, { newTab: e.metaKey || e.ctrlKey }),
|
|
2303
2318
|
onAuxClick: (e) => {
|
|
2304
|
-
e.button === 1 && (e.preventDefault(),
|
|
2319
|
+
e.button === 1 && (e.preventDefault(), _(t));
|
|
2305
2320
|
},
|
|
2306
2321
|
title: e.title,
|
|
2307
2322
|
style: {
|
|
@@ -2355,7 +2370,7 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2355
2370
|
}),
|
|
2356
2371
|
r && /* @__PURE__ */ Z("button", {
|
|
2357
2372
|
onClick: (e) => {
|
|
2358
|
-
e.stopPropagation(),
|
|
2373
|
+
e.stopPropagation(), _(t);
|
|
2359
2374
|
},
|
|
2360
2375
|
"aria-label": `Close ${e.title}`,
|
|
2361
2376
|
title: "Close tab",
|
|
@@ -2380,7 +2395,8 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2380
2395
|
]
|
|
2381
2396
|
}, e.id);
|
|
2382
2397
|
}), /* @__PURE__ */ Z("button", {
|
|
2383
|
-
|
|
2398
|
+
ref: a,
|
|
2399
|
+
onClick: y,
|
|
2384
2400
|
title: "New tab (⌘T)",
|
|
2385
2401
|
style: {
|
|
2386
2402
|
width: 32,
|
|
@@ -2414,15 +2430,15 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2414
2430
|
display: "flex",
|
|
2415
2431
|
alignItems: "center",
|
|
2416
2432
|
gap: 3,
|
|
2417
|
-
color:
|
|
2418
|
-
fontWeight:
|
|
2433
|
+
color: w,
|
|
2434
|
+
fontWeight: C === "normal" ? 400 : 600
|
|
2419
2435
|
},
|
|
2420
2436
|
children: [/* @__PURE__ */ Q("span", {
|
|
2421
2437
|
className: "mono num",
|
|
2422
2438
|
children: [
|
|
2423
|
-
|
|
2439
|
+
l.length,
|
|
2424
2440
|
"/",
|
|
2425
|
-
|
|
2441
|
+
d
|
|
2426
2442
|
]
|
|
2427
2443
|
}), /* @__PURE__ */ Z("span", {
|
|
2428
2444
|
className: "tabstrip-tabs-label",
|
|
@@ -2440,7 +2456,7 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2440
2456
|
}),
|
|
2441
2457
|
/* @__PURE__ */ Z("button", {
|
|
2442
2458
|
ref: r,
|
|
2443
|
-
onClick: () =>
|
|
2459
|
+
onClick: () => c(!0),
|
|
2444
2460
|
title: "Tab actions",
|
|
2445
2461
|
"aria-label": "Tab actions",
|
|
2446
2462
|
"data-testid": "tabstrip-actions-button",
|
|
@@ -2465,13 +2481,13 @@ function Jr({ onNew: e, onCloseRequest: t } = {}) {
|
|
|
2465
2481
|
children: /* @__PURE__ */ Z(F.more, { size: 13 })
|
|
2466
2482
|
}),
|
|
2467
2483
|
/* @__PURE__ */ Z(Yr, {
|
|
2468
|
-
open:
|
|
2484
|
+
open: s,
|
|
2469
2485
|
anchor: r.current,
|
|
2470
|
-
onClose: () =>
|
|
2471
|
-
canCloseCurrent:
|
|
2472
|
-
canCloseOthers:
|
|
2473
|
-
canCloseRight:
|
|
2474
|
-
onAction:
|
|
2486
|
+
onClose: () => c(!1),
|
|
2487
|
+
canCloseCurrent: b,
|
|
2488
|
+
canCloseOthers: x,
|
|
2489
|
+
canCloseRight: S,
|
|
2490
|
+
onAction: v
|
|
2475
2491
|
})
|
|
2476
2492
|
]
|
|
2477
2493
|
})]
|
|
@@ -3416,7 +3432,7 @@ function Ai(e, t) {
|
|
|
3416
3432
|
} catch {}
|
|
3417
3433
|
}
|
|
3418
3434
|
function ji(e) {
|
|
3419
|
-
return !(e instanceof
|
|
3435
|
+
return !(e instanceof Tt) || e.code !== "FOREIGN_KEY_VIOLATION" ? !1 : e.message.includes("agent_messages_tenant_conv_fk");
|
|
3420
3436
|
}
|
|
3421
3437
|
function Mi(e, t) {
|
|
3422
3438
|
return {
|
|
@@ -5708,7 +5724,7 @@ function Qa(e) {
|
|
|
5708
5724
|
detail: n ? `${t.length} failed · ${n}` : `${t.length} failed`
|
|
5709
5725
|
};
|
|
5710
5726
|
}
|
|
5711
|
-
return e instanceof
|
|
5727
|
+
return e instanceof Tt ? {
|
|
5712
5728
|
kind: "error",
|
|
5713
5729
|
detail: e.message
|
|
5714
5730
|
} : {
|
|
@@ -6059,7 +6075,7 @@ function yo() {
|
|
|
6059
6075
|
for (; c;) {
|
|
6060
6076
|
let e = new AbortController();
|
|
6061
6077
|
r.current = e, l = 0;
|
|
6062
|
-
let t =
|
|
6078
|
+
let t = ht(), a = t ? ft() : null;
|
|
6063
6079
|
try {
|
|
6064
6080
|
for await (let r of Ti({
|
|
6065
6081
|
signal: e.signal,
|
|
@@ -6070,7 +6086,7 @@ function yo() {
|
|
|
6070
6086
|
if (!c) break;
|
|
6071
6087
|
if (r.type === "session_refresh") {
|
|
6072
6088
|
try {
|
|
6073
|
-
t ? (
|
|
6089
|
+
t ? (yt(), await _t()) : await dt(), n.invalidateQueries({ queryKey: ["schema"] }), He.getState().refreshMe();
|
|
6074
6090
|
} catch {}
|
|
6075
6091
|
break;
|
|
6076
6092
|
}
|
|
@@ -6099,18 +6115,18 @@ function yo() {
|
|
|
6099
6115
|
if (!c || e instanceof DOMException && e.name === "AbortError") break;
|
|
6100
6116
|
if (e instanceof wi) {
|
|
6101
6117
|
if (t) try {
|
|
6102
|
-
|
|
6118
|
+
yt(), await _t(), l = 0;
|
|
6103
6119
|
continue;
|
|
6104
6120
|
} catch {
|
|
6105
|
-
|
|
6121
|
+
vt()();
|
|
6106
6122
|
return;
|
|
6107
6123
|
}
|
|
6108
6124
|
try {
|
|
6109
|
-
await
|
|
6125
|
+
await dt(), l = 0;
|
|
6110
6126
|
continue;
|
|
6111
6127
|
} catch (e) {
|
|
6112
6128
|
if (e instanceof xt) {
|
|
6113
|
-
|
|
6129
|
+
vt()();
|
|
6114
6130
|
return;
|
|
6115
6131
|
}
|
|
6116
6132
|
}
|
|
@@ -6164,7 +6180,7 @@ function xo() {
|
|
|
6164
6180
|
A && (j(null), L(A.ids));
|
|
6165
6181
|
}, [A, L]);
|
|
6166
6182
|
yo(), K(() => {
|
|
6167
|
-
i.enabled || !t && !e && a(
|
|
6183
|
+
i.enabled || !t && !e && a(pt(`${o.pathname}${o.search}${o.hash}`), { replace: !0 });
|
|
6168
6184
|
}, [
|
|
6169
6185
|
i.enabled,
|
|
6170
6186
|
t,
|
|
@@ -7081,7 +7097,7 @@ function Ko() {
|
|
|
7081
7097
|
}) });
|
|
7082
7098
|
}
|
|
7083
7099
|
function qo(e, t, n) {
|
|
7084
|
-
return e instanceof
|
|
7100
|
+
return e instanceof Tt && e.code === "INVALID_CREDENTIALS" ? Bo(t, "auth.invalid_credentials", n, Uo) : e.message;
|
|
7085
7101
|
}
|
|
7086
7102
|
function Jo(e, t) {
|
|
7087
7103
|
if (e === t) return !1;
|
|
@@ -7422,7 +7438,7 @@ function is() {
|
|
|
7422
7438
|
} catch {}
|
|
7423
7439
|
e("/login", { replace: !0 });
|
|
7424
7440
|
} catch (e) {
|
|
7425
|
-
e instanceof
|
|
7441
|
+
e instanceof Tt && e.code === "PASSWORD_REUSED" ? f("Your new password must differ from your current password.") : e instanceof Tt && e.code === "PASSWORD_TOO_SHORT" ? f(`Password must be at least ${Qo} characters.`) : f("Invalid or expired link. Please request a new one.");
|
|
7426
7442
|
} finally {
|
|
7427
7443
|
l(!1);
|
|
7428
7444
|
}
|
|
@@ -10210,14 +10226,14 @@ function kc() {
|
|
|
10210
10226
|
let n = e.target.files?.[0];
|
|
10211
10227
|
if (!n || !t) return;
|
|
10212
10228
|
e.target.value = "";
|
|
10213
|
-
let r =
|
|
10229
|
+
let r = Nt(n, Dc, Oc);
|
|
10214
10230
|
if (r) {
|
|
10215
10231
|
$.error(r.message);
|
|
10216
10232
|
return;
|
|
10217
10233
|
}
|
|
10218
10234
|
u(!0);
|
|
10219
10235
|
try {
|
|
10220
|
-
let e = await
|
|
10236
|
+
let e = await Ot({
|
|
10221
10237
|
file: n,
|
|
10222
10238
|
entityCode: "profile",
|
|
10223
10239
|
fieldCode: "avatar"
|
|
@@ -11500,7 +11516,7 @@ function $c(e) {
|
|
|
11500
11516
|
}));
|
|
11501
11517
|
tl(n, r || `${t}-${el()}.csv`), m(!1);
|
|
11502
11518
|
} catch (e) {
|
|
11503
|
-
y(e instanceof
|
|
11519
|
+
y(e instanceof Tt ? {
|
|
11504
11520
|
code: e.code,
|
|
11505
11521
|
message: e.message
|
|
11506
11522
|
} : {
|
|
@@ -13760,7 +13776,7 @@ function au(e, t) {
|
|
|
13760
13776
|
}, [e, t]), n;
|
|
13761
13777
|
}
|
|
13762
13778
|
function ou(e) {
|
|
13763
|
-
return e instanceof
|
|
13779
|
+
return e instanceof Tt ? `${e.code}: ${e.message}` : e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
|
|
13764
13780
|
}
|
|
13765
13781
|
function su(e) {
|
|
13766
13782
|
let t = new URLSearchParams(), n = e.get("search");
|
|
@@ -13783,10 +13799,10 @@ function uu(e, t, n, r) {
|
|
|
13783
13799
|
return qe(e, t, n, r);
|
|
13784
13800
|
}
|
|
13785
13801
|
function du({ screenCode: e }) {
|
|
13786
|
-
return /* @__PURE__ */ Z(
|
|
13802
|
+
return /* @__PURE__ */ Z(Dt, { children: /* @__PURE__ */ Z(fu, { screenCode: e }) });
|
|
13787
13803
|
}
|
|
13788
13804
|
function fu({ screenCode: e }) {
|
|
13789
|
-
let t = _r(), n = ln(), [r, i] = nn(), { data: a } = S(), s = Ee(), [c, l] = Y(null), [u, d] = Y({}), [f, p] = Y(!1), [h, g] = Y(!1), [_, v] = Y(null), { filters: b, activeCount: C, setFilters: w, clearFilters: T } = bl(), E = He((e) => e.user), D = He((e) => e.activeTenant), k = eu(e, E?.id), A =
|
|
13805
|
+
let t = _r(), n = ln(), [r, i] = nn(), { data: a } = S(), s = Ee(), [c, l] = Y(null), [u, d] = Y({}), [f, p] = Y(!1), [h, g] = Y(!1), [_, v] = Y(null), { filters: b, activeCount: C, setFilters: w, clearFilters: T } = bl(), E = He((e) => e.user), D = He((e) => e.activeTenant), k = eu(e, E?.id), A = jt(), j = a?.screens[e], M = j?.entity ? a?.entities[j.entity] : void 0, P = j?.entity, I = Ze(M, "create"), ee = Ze(M, "update"), te = Ze(M, "delete"), ne = a?.actions, re = q(() => Cs(M?.actions, j?.actions, "list_toolbar", ne), [
|
|
13790
13806
|
M?.actions,
|
|
13791
13807
|
j?.actions,
|
|
13792
13808
|
ne
|
|
@@ -14061,7 +14077,7 @@ function fu({ screenCode: e }) {
|
|
|
14061
14077
|
a?.entities,
|
|
14062
14078
|
a?.screens,
|
|
14063
14079
|
ee
|
|
14064
|
-
]), kt = q(() => M?.actions ? M.actions : {}, [M?.actions]),
|
|
14080
|
+
]), kt = q(() => M?.actions ? M.actions : {}, [M?.actions]), At = G(async (e, t, n) => {
|
|
14065
14081
|
let r = M?.fields.names().find((e) => M.fields.get(e)?.primary), i = r && it ? [String(it[r] ?? "")] : void 0;
|
|
14066
14082
|
return O(t.entity ? `${t.entity}.${e}` : e, Ae(n, i));
|
|
14067
14083
|
}, [M, it]), Mt = G(async () => {
|
|
@@ -14681,7 +14697,7 @@ function fu({ screenCode: e }) {
|
|
|
14681
14697
|
fields: Ot,
|
|
14682
14698
|
screen: j,
|
|
14683
14699
|
actions: kt,
|
|
14684
|
-
executeAction:
|
|
14700
|
+
executeAction: At,
|
|
14685
14701
|
onClose: () => {
|
|
14686
14702
|
if (M && it) {
|
|
14687
14703
|
let e = M.fields.names()?.find((e) => M.fields.get(e)?.primary);
|
|
@@ -14967,7 +14983,7 @@ function vu({ config: e, ctx: t }) {
|
|
|
14967
14983
|
style: s ? void 0 : yu(r.width ?? r.column?.width ?? r.row?.width ?? e.width, h[a], r.min_width, r.max_width),
|
|
14968
14984
|
children: [/* @__PURE__ */ Z("div", {
|
|
14969
14985
|
className: g("flex-1 min-w-0 flex flex-col", _ && "overflow-y-auto overflow-x-hidden"),
|
|
14970
|
-
children: /* @__PURE__ */ Z(
|
|
14986
|
+
children: /* @__PURE__ */ Z(Pd, {
|
|
14971
14987
|
node: r,
|
|
14972
14988
|
ctx: t
|
|
14973
14989
|
})
|
|
@@ -15005,7 +15021,7 @@ function xu({ config: e, ctx: t }) {
|
|
|
15005
15021
|
return /* @__PURE__ */ Z("div", {
|
|
15006
15022
|
className: "flex flex-col h-full",
|
|
15007
15023
|
style: { gap: r ? `${r}px` : void 0 },
|
|
15008
|
-
children: n.map((e, n) => /* @__PURE__ */ Z(
|
|
15024
|
+
children: n.map((e, n) => /* @__PURE__ */ Z(Pd, {
|
|
15009
15025
|
node: e,
|
|
15010
15026
|
ctx: t
|
|
15011
15027
|
}, n))
|
|
@@ -15111,7 +15127,7 @@ function Tu({ config: e, ctx: t }) {
|
|
|
15111
15127
|
}), /* @__PURE__ */ Z("div", {
|
|
15112
15128
|
role: "tabpanel",
|
|
15113
15129
|
style: { padding: 14 },
|
|
15114
|
-
children: /* @__PURE__ */ Z(
|
|
15130
|
+
children: /* @__PURE__ */ Z(Pd, {
|
|
15115
15131
|
node: n[r],
|
|
15116
15132
|
ctx: {
|
|
15117
15133
|
...t,
|
|
@@ -15140,7 +15156,7 @@ function Eu({ config: e, ctx: t }) {
|
|
|
15140
15156
|
badge: f,
|
|
15141
15157
|
emphasis: c,
|
|
15142
15158
|
headingLevel: t.withinCard ? 3 : 2,
|
|
15143
|
-
children: /* @__PURE__ */ Z(
|
|
15159
|
+
children: /* @__PURE__ */ Z(Nd, {
|
|
15144
15160
|
nodes: r,
|
|
15145
15161
|
ctx: l
|
|
15146
15162
|
})
|
|
@@ -16777,7 +16793,7 @@ function pd({ config: e, childEntity: t, schema: n, rows: r, onChange: i, valida
|
|
|
16777
16793
|
}
|
|
16778
16794
|
//#endregion
|
|
16779
16795
|
//#region src/components/detail-layout/ChildrenBlock.tsx
|
|
16780
|
-
var md = Bt(() => import("./DraggableChildrenTable-
|
|
16796
|
+
var md = Bt(() => import("./DraggableChildrenTable-BFkRqNSe.js").then((e) => ({ default: e.DraggableChildrenTable })));
|
|
16781
16797
|
function hd({ node: e, ctx: t }) {
|
|
16782
16798
|
let n = e.children;
|
|
16783
16799
|
if (!n || t.isNew && t.mode !== "edit") return null;
|
|
@@ -16830,14 +16846,14 @@ function hd({ node: e, ctx: t }) {
|
|
|
16830
16846
|
}
|
|
16831
16847
|
//#endregion
|
|
16832
16848
|
//#region src/components/detail-layout/FieldRow.tsx
|
|
16833
|
-
var gd = 150, _d = 560, vd = new Set([
|
|
16849
|
+
var gd = 150, _d = 560, vd = "20px", yd = 4, bd = new Set([
|
|
16834
16850
|
"text",
|
|
16835
16851
|
"rich_text",
|
|
16836
16852
|
"json",
|
|
16837
16853
|
"structure",
|
|
16838
16854
|
"multilang_text"
|
|
16839
|
-
]),
|
|
16840
|
-
function
|
|
16855
|
+
]), xd = Rt({ columns: 2 });
|
|
16856
|
+
function Sd({ columns: e = 2, children: t }) {
|
|
16841
16857
|
let n = J(null), [r, i] = Y(!1);
|
|
16842
16858
|
K(() => {
|
|
16843
16859
|
let t = n.current;
|
|
@@ -16848,7 +16864,7 @@ function bd({ columns: e = 2, children: t }) {
|
|
|
16848
16864
|
return r.observe(t), () => r.disconnect();
|
|
16849
16865
|
}, [e]);
|
|
16850
16866
|
let a = e === 1 || r ? 1 : e;
|
|
16851
|
-
return /* @__PURE__ */ Z(
|
|
16867
|
+
return /* @__PURE__ */ Z(xd.Provider, {
|
|
16852
16868
|
value: { columns: a },
|
|
16853
16869
|
children: /* @__PURE__ */ Z("div", {
|
|
16854
16870
|
ref: n,
|
|
@@ -16862,41 +16878,41 @@ function bd({ columns: e = 2, children: t }) {
|
|
|
16862
16878
|
})
|
|
16863
16879
|
});
|
|
16864
16880
|
}
|
|
16865
|
-
function
|
|
16866
|
-
let
|
|
16881
|
+
function Cd({ label: e, children: t, span: n = !1, required: r, error: i, hint: a, actions: o, copyValue: s, mode: l = "display", htmlFor: u, labelId: d, "data-testid": f }) {
|
|
16882
|
+
let p = Vt(xd), m = n || p.columns === 1, h = !!i;
|
|
16867
16883
|
return /* @__PURE__ */ Q("div", {
|
|
16868
16884
|
className: "detail-row",
|
|
16869
|
-
"data-error":
|
|
16870
|
-
"data-testid":
|
|
16885
|
+
"data-error": h || void 0,
|
|
16886
|
+
"data-testid": f,
|
|
16871
16887
|
style: {
|
|
16872
16888
|
display: "flex",
|
|
16873
|
-
flexDirection:
|
|
16874
|
-
gap:
|
|
16875
|
-
alignItems:
|
|
16889
|
+
flexDirection: m ? "column" : "row",
|
|
16890
|
+
gap: m ? 4 : 16,
|
|
16891
|
+
alignItems: m ? "stretch" : "flex-start",
|
|
16876
16892
|
padding: "6px 0",
|
|
16877
16893
|
...n ? { gridColumn: "1 / -1" } : null
|
|
16878
16894
|
},
|
|
16879
16895
|
children: [/* @__PURE__ */ Q("div", {
|
|
16880
16896
|
style: {
|
|
16881
|
-
width:
|
|
16897
|
+
width: m ? "auto" : gd,
|
|
16882
16898
|
flexShrink: 0,
|
|
16883
|
-
paddingTop:
|
|
16899
|
+
paddingTop: m ? 0 : yd,
|
|
16884
16900
|
fontSize: 12,
|
|
16885
|
-
lineHeight:
|
|
16901
|
+
lineHeight: vd,
|
|
16886
16902
|
fontWeight: 500,
|
|
16887
16903
|
color: "var(--text-3)",
|
|
16888
16904
|
display: "flex",
|
|
16889
16905
|
alignItems: "flex-start",
|
|
16890
16906
|
gap: 2
|
|
16891
16907
|
},
|
|
16892
|
-
children: [
|
|
16893
|
-
id:
|
|
16894
|
-
htmlFor:
|
|
16908
|
+
children: [u ? /* @__PURE__ */ Z("label", {
|
|
16909
|
+
id: d,
|
|
16910
|
+
htmlFor: u,
|
|
16895
16911
|
children: e
|
|
16896
16912
|
}) : /* @__PURE__ */ Z("span", {
|
|
16897
|
-
id:
|
|
16913
|
+
id: d,
|
|
16898
16914
|
children: e
|
|
16899
|
-
}), r &&
|
|
16915
|
+
}), r && l === "edit" && /* @__PURE__ */ Z("span", {
|
|
16900
16916
|
"aria-hidden": "true",
|
|
16901
16917
|
style: {
|
|
16902
16918
|
color: "var(--danger)",
|
|
@@ -16924,18 +16940,19 @@ function xd({ label: e, children: t, span: n = !1, required: r, error: i, hint:
|
|
|
16924
16940
|
flex: 1,
|
|
16925
16941
|
minWidth: 0,
|
|
16926
16942
|
fontSize: 13,
|
|
16943
|
+
lineHeight: vd,
|
|
16927
16944
|
color: "var(--text)",
|
|
16928
16945
|
overflowWrap: "anywhere",
|
|
16929
|
-
paddingTop:
|
|
16946
|
+
paddingTop: l === "display" && !m ? yd : 0
|
|
16930
16947
|
},
|
|
16931
|
-
children:
|
|
16948
|
+
children: h && l === "edit" ? /* @__PURE__ */ Z("div", {
|
|
16932
16949
|
style: {
|
|
16933
16950
|
borderRadius: 6,
|
|
16934
16951
|
boxShadow: "0 0 0 1.5px var(--danger)"
|
|
16935
16952
|
},
|
|
16936
16953
|
children: t
|
|
16937
16954
|
}) : t
|
|
16938
|
-
}), o && /* @__PURE__ */
|
|
16955
|
+
}), (s || o) && /* @__PURE__ */ Q("div", {
|
|
16939
16956
|
className: "detail-row-action",
|
|
16940
16957
|
style: {
|
|
16941
16958
|
display: "flex",
|
|
@@ -16943,27 +16960,31 @@ function xd({ label: e, children: t, span: n = !1, required: r, error: i, hint:
|
|
|
16943
16960
|
flexShrink: 0,
|
|
16944
16961
|
marginTop: -2
|
|
16945
16962
|
},
|
|
16946
|
-
children:
|
|
16963
|
+
children: [s && /* @__PURE__ */ Z(c, {
|
|
16964
|
+
value: s,
|
|
16965
|
+
size: "sm",
|
|
16966
|
+
title: "Copy value"
|
|
16967
|
+
}), o]
|
|
16947
16968
|
})]
|
|
16948
|
-
}), (
|
|
16969
|
+
}), (h || a != null) && /* @__PURE__ */ Q("div", {
|
|
16949
16970
|
style: {
|
|
16950
16971
|
fontSize: 11.5,
|
|
16951
16972
|
lineHeight: 1.4,
|
|
16952
|
-
color:
|
|
16973
|
+
color: h ? "var(--danger)" : "var(--text-3)",
|
|
16953
16974
|
display: "flex",
|
|
16954
16975
|
alignItems: "center",
|
|
16955
16976
|
gap: 4
|
|
16956
16977
|
},
|
|
16957
|
-
children: [
|
|
16978
|
+
children: [h && /* @__PURE__ */ Z(F.warning, { size: 11 }), /* @__PURE__ */ Z("span", { children: h ? i : a })]
|
|
16958
16979
|
})]
|
|
16959
16980
|
})]
|
|
16960
16981
|
});
|
|
16961
16982
|
}
|
|
16962
16983
|
//#endregion
|
|
16963
16984
|
//#region src/components/detail-layout/FieldsBlock.tsx
|
|
16964
|
-
function
|
|
16985
|
+
function wd({ fields: e, ctx: t }) {
|
|
16965
16986
|
let { entity: n, entityCode: r, record: i, mode: a, onFieldChange: o, schema: s } = t, c = Ee(), l = t.columns ?? 2, u = l === 1 && e.length === 1;
|
|
16966
|
-
return /* @__PURE__ */ Z(
|
|
16987
|
+
return /* @__PURE__ */ Z(Sd, {
|
|
16967
16988
|
columns: l,
|
|
16968
16989
|
children: e.map((e) => {
|
|
16969
16990
|
let l = e.name, d = `${r ?? "field"}-${l}`, f = `${d}-label`, p = n.fields.get(l), m = !!(p?.auto || p?.readonly), h = m ? "display" : a, g = ye({
|
|
@@ -16988,11 +17009,11 @@ function Sd({ fields: e, ctx: t }) {
|
|
|
16988
17009
|
row: i,
|
|
16989
17010
|
variant: "ghost",
|
|
16990
17011
|
size: "icon"
|
|
16991
|
-
}, t)) }) : void 0, v = !!p &&
|
|
17012
|
+
}, t)) }) : void 0, v = !!p && bd.has(p.type), y = i?.[l], b = h === "display" && (p?.copyable || p?.type === "uuid") && y != null && y !== "" ? String(y) : void 0;
|
|
16992
17013
|
return u ? /* @__PURE__ */ Z("div", {
|
|
16993
17014
|
style: { gridColumn: "1 / -1" },
|
|
16994
17015
|
children: g
|
|
16995
|
-
}, l) : /* @__PURE__ */ Z(
|
|
17016
|
+
}, l) : /* @__PURE__ */ Z(Cd, {
|
|
16996
17017
|
label: Se(n, l, s.entities),
|
|
16997
17018
|
htmlFor: h === "edit" ? d : void 0,
|
|
16998
17019
|
labelId: f,
|
|
@@ -17001,6 +17022,7 @@ function Sd({ fields: e, ctx: t }) {
|
|
|
17001
17022
|
span: v,
|
|
17002
17023
|
error: t.fieldErrors?.[l],
|
|
17003
17024
|
actions: _,
|
|
17025
|
+
copyValue: b,
|
|
17004
17026
|
children: g
|
|
17005
17027
|
}, l);
|
|
17006
17028
|
})
|
|
@@ -17008,7 +17030,7 @@ function Sd({ fields: e, ctx: t }) {
|
|
|
17008
17030
|
}
|
|
17009
17031
|
//#endregion
|
|
17010
17032
|
//#region src/components/detail-layout/PropertiesBlock.tsx
|
|
17011
|
-
var
|
|
17033
|
+
var Td = new Set([
|
|
17012
17034
|
"string",
|
|
17013
17035
|
"text",
|
|
17014
17036
|
"int",
|
|
@@ -17016,16 +17038,16 @@ var Cd = new Set([
|
|
|
17016
17038
|
"decimal",
|
|
17017
17039
|
"email",
|
|
17018
17040
|
"url"
|
|
17019
|
-
]),
|
|
17020
|
-
function
|
|
17041
|
+
]), Ed = 500;
|
|
17042
|
+
function Dd({ node: e, ctx: t }) {
|
|
17021
17043
|
let { entity: n, objectProperties: r, onSetProperty: i, isNew: a, mode: o, refs: s } = t, c = n.properties ?? {};
|
|
17022
17044
|
if (a) return null;
|
|
17023
17045
|
let l = e.properties === !0 ? !0 : e.properties, u = l === !0 ? Object.entries(c).sort(([e], [t]) => e.localeCompare(t)) : l.filter((e) => c[e] != null).map((e) => [e, c[e]]);
|
|
17024
|
-
return u.length === 0 ? null : /* @__PURE__ */ Z(
|
|
17046
|
+
return u.length === 0 ? null : /* @__PURE__ */ Z(Sd, {
|
|
17025
17047
|
columns: 2,
|
|
17026
17048
|
children: u.map(([e, t]) => {
|
|
17027
17049
|
let n = r?.find((t) => t.property_code === e), a = rt(t), c = t.readonly || !i ? "display" : o;
|
|
17028
|
-
return /* @__PURE__ */ Z(
|
|
17050
|
+
return /* @__PURE__ */ Z(Od, {
|
|
17029
17051
|
propCode: e,
|
|
17030
17052
|
prop: t,
|
|
17031
17053
|
field: a,
|
|
@@ -17037,22 +17059,22 @@ function Td({ node: e, ctx: t }) {
|
|
|
17037
17059
|
})
|
|
17038
17060
|
});
|
|
17039
17061
|
}
|
|
17040
|
-
function
|
|
17062
|
+
function Od({ propCode: e, prop: t, field: n, value: r, mode: i, onSetProperty: a, refs: o }) {
|
|
17041
17063
|
let s = Ee(), c = J(null);
|
|
17042
17064
|
K(() => () => {
|
|
17043
17065
|
c.current && clearTimeout(c.current);
|
|
17044
17066
|
}, []);
|
|
17045
17067
|
let l = G((n) => {
|
|
17046
|
-
a && (
|
|
17068
|
+
a && (Td.has(t.type) ? (c.current && clearTimeout(c.current), c.current = setTimeout(() => a(e, n), Ed)) : a(e, n));
|
|
17047
17069
|
}, [
|
|
17048
17070
|
e,
|
|
17049
17071
|
t.type,
|
|
17050
17072
|
a
|
|
17051
17073
|
]);
|
|
17052
|
-
return /* @__PURE__ */ Z(
|
|
17074
|
+
return /* @__PURE__ */ Z(Cd, {
|
|
17053
17075
|
label: W(t.display?.name ?? t.name),
|
|
17054
17076
|
mode: i,
|
|
17055
|
-
span:
|
|
17077
|
+
span: bd.has(t.type),
|
|
17056
17078
|
children: H({
|
|
17057
17079
|
field: n,
|
|
17058
17080
|
fieldName: e,
|
|
@@ -17066,7 +17088,7 @@ function Ed({ propCode: e, prop: t, field: n, value: r, mode: i, onSetProperty:
|
|
|
17066
17088
|
}
|
|
17067
17089
|
//#endregion
|
|
17068
17090
|
//#region src/components/shared/StatusStepper.tsx
|
|
17069
|
-
function
|
|
17091
|
+
function kd({ stages: e, current: t, selectable: n, onSelect: r, compact: i = !1 }) {
|
|
17070
17092
|
let a = e.findIndex((e) => e.code === t);
|
|
17071
17093
|
return /* @__PURE__ */ Z("div", {
|
|
17072
17094
|
role: "list",
|
|
@@ -17133,7 +17155,7 @@ function Dd({ stages: e, current: t, selectable: n, onSelect: r, compact: i = !1
|
|
|
17133
17155
|
}
|
|
17134
17156
|
//#endregion
|
|
17135
17157
|
//#region src/components/shared/StatusGroupsDisplay.tsx
|
|
17136
|
-
function
|
|
17158
|
+
function Ad({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r, mode: i = "edit" }) {
|
|
17137
17159
|
return /* @__PURE__ */ Z("div", {
|
|
17138
17160
|
style: {
|
|
17139
17161
|
display: "flex",
|
|
@@ -17165,7 +17187,7 @@ function Od({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
|
|
|
17165
17187
|
opacity: r ? .6 : 1,
|
|
17166
17188
|
pointerEvents: r ? "none" : "auto"
|
|
17167
17189
|
},
|
|
17168
|
-
children: /* @__PURE__ */ Z(
|
|
17190
|
+
children: /* @__PURE__ */ Z(kd, {
|
|
17169
17191
|
stages: a.statuses.map((e) => ({
|
|
17170
17192
|
code: e.code,
|
|
17171
17193
|
label: W(e.name)
|
|
@@ -17250,28 +17272,28 @@ function Od({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
|
|
|
17250
17272
|
}
|
|
17251
17273
|
//#endregion
|
|
17252
17274
|
//#region src/components/detail-layout/StatusesBlock.tsx
|
|
17253
|
-
var
|
|
17254
|
-
function
|
|
17275
|
+
var jd = () => {};
|
|
17276
|
+
function Md({ node: e, ctx: t }) {
|
|
17255
17277
|
let { entity: n, objectStatuses: r, onSetStatus: i, isStatusPending: a, isNew: o } = t, s = n.status_groups ?? {};
|
|
17256
17278
|
if (o) return null;
|
|
17257
17279
|
let c = e.statuses === !0 ? !0 : e.statuses, l = Object.fromEntries(Object.entries(s).filter(([e]) => c === !0 || c.includes(e)));
|
|
17258
|
-
return Object.keys(l).length === 0 ? null : /* @__PURE__ */ Z(
|
|
17280
|
+
return Object.keys(l).length === 0 ? null : /* @__PURE__ */ Z(Ad, {
|
|
17259
17281
|
statusGroups: l,
|
|
17260
17282
|
objectStatuses: r,
|
|
17261
|
-
onSetStatus: i ??
|
|
17283
|
+
onSetStatus: i ?? jd,
|
|
17262
17284
|
isPending: a ?? !1,
|
|
17263
17285
|
mode: t.mode
|
|
17264
17286
|
});
|
|
17265
17287
|
}
|
|
17266
17288
|
//#endregion
|
|
17267
17289
|
//#region src/components/detail-layout/LayoutRenderer.tsx
|
|
17268
|
-
function
|
|
17269
|
-
return /* @__PURE__ */ Z(X, { children: e.map((e, n) => /* @__PURE__ */ Z(
|
|
17290
|
+
function Nd({ nodes: e, ctx: t }) {
|
|
17291
|
+
return /* @__PURE__ */ Z(X, { children: e.map((e, n) => /* @__PURE__ */ Z(Pd, {
|
|
17270
17292
|
node: e,
|
|
17271
17293
|
ctx: t
|
|
17272
17294
|
}, n)) });
|
|
17273
17295
|
}
|
|
17274
|
-
function
|
|
17296
|
+
function Pd({ node: e, ctx: t }) {
|
|
17275
17297
|
return e.row ? /* @__PURE__ */ Z(vu, {
|
|
17276
17298
|
config: e.row,
|
|
17277
17299
|
ctx: t
|
|
@@ -17291,20 +17313,20 @@ function Md({ node: e, ctx: t }) {
|
|
|
17291
17313
|
}) : e.associated ? /* @__PURE__ */ Z(yc, {
|
|
17292
17314
|
node: e,
|
|
17293
17315
|
ctx: t
|
|
17294
|
-
}) : e.fields ? /* @__PURE__ */ Z(
|
|
17316
|
+
}) : e.fields ? /* @__PURE__ */ Z(wd, {
|
|
17295
17317
|
fields: e.fields,
|
|
17296
17318
|
ctx: t
|
|
17297
|
-
}) : e.properties == null ? e.statuses == null ? null : /* @__PURE__ */ Z(
|
|
17319
|
+
}) : e.properties == null ? e.statuses == null ? null : /* @__PURE__ */ Z(Md, {
|
|
17298
17320
|
node: e,
|
|
17299
17321
|
ctx: t
|
|
17300
|
-
}) : /* @__PURE__ */ Z(
|
|
17322
|
+
}) : /* @__PURE__ */ Z(Dd, {
|
|
17301
17323
|
node: e,
|
|
17302
17324
|
ctx: t
|
|
17303
17325
|
});
|
|
17304
17326
|
}
|
|
17305
17327
|
//#endregion
|
|
17306
17328
|
//#region src/components/detail-layout/ErrorSummary.tsx
|
|
17307
|
-
function
|
|
17329
|
+
function Fd({ errors: e, onJump: t }) {
|
|
17308
17330
|
if (e.length === 0) return null;
|
|
17309
17331
|
let n = e.length !== 1;
|
|
17310
17332
|
return /* @__PURE__ */ Q("div", {
|
|
@@ -17391,7 +17413,7 @@ function Nd({ errors: e, onJump: t }) {
|
|
|
17391
17413
|
}
|
|
17392
17414
|
//#endregion
|
|
17393
17415
|
//#region src/components/shared/HighlightsStrip.tsx
|
|
17394
|
-
function
|
|
17416
|
+
function Id({ items: e }) {
|
|
17395
17417
|
return e.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
17396
17418
|
style: {
|
|
17397
17419
|
display: "flex",
|
|
@@ -17427,7 +17449,7 @@ function Pd({ items: e }) {
|
|
|
17427
17449
|
}
|
|
17428
17450
|
//#endregion
|
|
17429
17451
|
//#region src/components/detail-layout/DetailHighlights.tsx
|
|
17430
|
-
function
|
|
17452
|
+
function Ld({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectStatuses: a, schema: o, locale: s }) {
|
|
17431
17453
|
let c = e.highlights;
|
|
17432
17454
|
if (!c || c.length === 0) return null;
|
|
17433
17455
|
let l = [];
|
|
@@ -17468,15 +17490,15 @@ function Fd({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectSta
|
|
|
17468
17490
|
continue;
|
|
17469
17491
|
}
|
|
17470
17492
|
}
|
|
17471
|
-
return l.length === 0 ? null : /* @__PURE__ */ Z(
|
|
17493
|
+
return l.length === 0 ? null : /* @__PURE__ */ Z(Id, { items: l });
|
|
17472
17494
|
}
|
|
17473
17495
|
//#endregion
|
|
17474
17496
|
//#region src/components/shared/AuditMetaStrip.tsx
|
|
17475
|
-
function
|
|
17497
|
+
function Rd(e) {
|
|
17476
17498
|
return e.by != null || e.at != null;
|
|
17477
17499
|
}
|
|
17478
|
-
function
|
|
17479
|
-
let t = e.filter(
|
|
17500
|
+
function zd({ lines: e }) {
|
|
17501
|
+
let t = e.filter(Rd);
|
|
17480
17502
|
return t.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
17481
17503
|
style: {
|
|
17482
17504
|
display: "flex",
|
|
@@ -17489,10 +17511,10 @@ function Ld({ lines: e }) {
|
|
|
17489
17511
|
fontSize: 11.5,
|
|
17490
17512
|
color: "var(--text-3)"
|
|
17491
17513
|
},
|
|
17492
|
-
children: t.map((e, t) => /* @__PURE__ */ Z(
|
|
17514
|
+
children: t.map((e, t) => /* @__PURE__ */ Z(Bd, { line: e }, t))
|
|
17493
17515
|
});
|
|
17494
17516
|
}
|
|
17495
|
-
function
|
|
17517
|
+
function Bd({ line: e }) {
|
|
17496
17518
|
return /* @__PURE__ */ Q("div", {
|
|
17497
17519
|
style: {
|
|
17498
17520
|
display: "flex",
|
|
@@ -17534,7 +17556,7 @@ function Rd({ line: e }) {
|
|
|
17534
17556
|
}
|
|
17535
17557
|
//#endregion
|
|
17536
17558
|
//#region src/components/detail-layout/DetailAuditStrip.tsx
|
|
17537
|
-
function
|
|
17559
|
+
function Vd({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a, locale: o }) {
|
|
17538
17560
|
let s = e.audit;
|
|
17539
17561
|
if (s?.enabled === !1) return null;
|
|
17540
17562
|
let c = (e) => {
|
|
@@ -17553,7 +17575,7 @@ function zd({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
17553
17575
|
locale: o
|
|
17554
17576
|
});
|
|
17555
17577
|
};
|
|
17556
|
-
return /* @__PURE__ */ Z(
|
|
17578
|
+
return /* @__PURE__ */ Z(zd, { lines: s?.lines && s.lines.length > 0 ? s.lines.map((e) => ({
|
|
17557
17579
|
label: W(e.label),
|
|
17558
17580
|
at: c(e.at),
|
|
17559
17581
|
by: c(e.by)
|
|
@@ -17569,7 +17591,7 @@ function zd({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
17569
17591
|
}
|
|
17570
17592
|
//#endregion
|
|
17571
17593
|
//#region src/components/shared/RecordHeader.tsx
|
|
17572
|
-
function
|
|
17594
|
+
function Hd({ icon: e, avatarName: t, title: n, recordId: r, highlights: i, mode: a, dirty: o = !1, showBack: s = !1, onBack: c, right: l }) {
|
|
17573
17595
|
return /* @__PURE__ */ Q("div", {
|
|
17574
17596
|
style: {
|
|
17575
17597
|
display: "flex",
|
|
@@ -17686,7 +17708,7 @@ function Bd({ icon: e, avatarName: t, title: n, recordId: r, highlights: i, mode
|
|
|
17686
17708
|
}
|
|
17687
17709
|
//#endregion
|
|
17688
17710
|
//#region src/lib/children-validation.ts
|
|
17689
|
-
function
|
|
17711
|
+
function Ud(e, t, n) {
|
|
17690
17712
|
let r = [];
|
|
17691
17713
|
for (let [i, a] of e.fields) {
|
|
17692
17714
|
if (!a.required || a.auto || n && a.primary || e.tenant_key && i === e.tenant_key || a.default !== void 0 && a.default !== null) continue;
|
|
@@ -17695,17 +17717,17 @@ function Vd(e, t, n) {
|
|
|
17695
17717
|
}
|
|
17696
17718
|
return r;
|
|
17697
17719
|
}
|
|
17698
|
-
var
|
|
17699
|
-
function
|
|
17720
|
+
var Wd = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
|
|
17721
|
+
function Gd(e, t) {
|
|
17700
17722
|
let n = [];
|
|
17701
17723
|
for (let [r, i] of e.fields) {
|
|
17702
17724
|
if (i.type !== "email") continue;
|
|
17703
17725
|
let e = t[r];
|
|
17704
|
-
typeof e == "string" && e !== "" && !
|
|
17726
|
+
typeof e == "string" && e !== "" && !Wd.test(e) && n.push(r);
|
|
17705
17727
|
}
|
|
17706
17728
|
return n;
|
|
17707
17729
|
}
|
|
17708
|
-
function
|
|
17730
|
+
function Kd(e, t) {
|
|
17709
17731
|
let n = /* @__PURE__ */ new Set();
|
|
17710
17732
|
for (let r of Object.values(t.entities)) if (r.children) {
|
|
17711
17733
|
for (let t of r.children) if (t.entity === e && t.foreign_key) {
|
|
@@ -17715,13 +17737,13 @@ function Wd(e, t) {
|
|
|
17715
17737
|
}
|
|
17716
17738
|
return n;
|
|
17717
17739
|
}
|
|
17718
|
-
function
|
|
17740
|
+
function qd(e, t) {
|
|
17719
17741
|
if (!e || !t) return {};
|
|
17720
17742
|
let n = {};
|
|
17721
17743
|
for (let [r, i] of Object.entries(e)) {
|
|
17722
17744
|
let e = t.entities[r];
|
|
17723
17745
|
if (!e) continue;
|
|
17724
|
-
let a =
|
|
17746
|
+
let a = Kd(r, t), o = [];
|
|
17725
17747
|
for (let [t, n] of e.fields) e.tenant_key && t === e.tenant_key || n.required && !n.auto && !n.primary && !a.has(t) && o.push(t);
|
|
17726
17748
|
if (o.length !== 0) for (let e of i) {
|
|
17727
17749
|
if (e._deleted) continue;
|
|
@@ -17737,22 +17759,22 @@ function Gd(e, t) {
|
|
|
17737
17759
|
}
|
|
17738
17760
|
//#endregion
|
|
17739
17761
|
//#region src/components/pages/SmartDetailPage.tsx
|
|
17740
|
-
var
|
|
17741
|
-
function
|
|
17762
|
+
var Jd = () => {};
|
|
17763
|
+
function Yd(e, t) {
|
|
17742
17764
|
return e.length === t.length ? JSON.stringify(e) === JSON.stringify(t) : !1;
|
|
17743
17765
|
}
|
|
17744
|
-
function
|
|
17766
|
+
function Xd(e, t) {
|
|
17745
17767
|
if (e) {
|
|
17746
17768
|
let n = ge(be(e, t));
|
|
17747
17769
|
if (n.replace(/^\|+|\|+$/g, "")) return n;
|
|
17748
17770
|
}
|
|
17749
17771
|
return t.id == null ? crypto.randomUUID() : String(t.id);
|
|
17750
17772
|
}
|
|
17751
|
-
function
|
|
17752
|
-
return /* @__PURE__ */ Z(
|
|
17773
|
+
function Zd({ screenCode: e }) {
|
|
17774
|
+
return /* @__PURE__ */ Z(Dt, { children: /* @__PURE__ */ Z(Qd, { screenCode: e }) });
|
|
17753
17775
|
}
|
|
17754
|
-
function
|
|
17755
|
-
let { id: t } = en(), n = pr(), [r, i] = nn(), { data: a } = S(), o = He((e) => e.user), s =
|
|
17776
|
+
function Qd({ screenCode: e }) {
|
|
17777
|
+
let { id: t } = en(), n = pr(), [r, i] = nn(), { data: a } = S(), o = He((e) => e.user), s = jt(), c = a?.screens[e], l = c?.entity ? a?.entities[c.entity] : void 0, d = c?.entity, f = Ze(l, "create"), p = Ze(l, "update"), m = Ze(l, "delete"), h = Ze(l, "restore"), g = (() => {
|
|
17756
17778
|
if (!l || !l.singleton || !l.prefilter) return;
|
|
17757
17779
|
let e = Fe(l);
|
|
17758
17780
|
if (e.length !== 1) return;
|
|
@@ -17857,7 +17879,7 @@ function Xd({ screenCode: e }) {
|
|
|
17857
17879
|
})).forEach((e) => {
|
|
17858
17880
|
s.registerDraft({
|
|
17859
17881
|
fileId: e,
|
|
17860
|
-
discard: () =>
|
|
17882
|
+
discard: () => Mt(e)
|
|
17861
17883
|
});
|
|
17862
17884
|
});
|
|
17863
17885
|
let t = {};
|
|
@@ -17879,7 +17901,7 @@ function Xd({ screenCode: e }) {
|
|
|
17879
17901
|
let e = a?.entities[n];
|
|
17880
17902
|
t[n] = r.map((t) => ({
|
|
17881
17903
|
...t,
|
|
17882
|
-
_key:
|
|
17904
|
+
_key: Xd(e, t)
|
|
17883
17905
|
}));
|
|
17884
17906
|
}
|
|
17885
17907
|
oe(t), ue(e);
|
|
@@ -17924,8 +17946,8 @@ function Xd({ screenCode: e }) {
|
|
|
17924
17946
|
}, [c]), Ue = q(() => !a?.screens || !ze || ze === "/" ? !1 : Object.values(a.screens).some((e) => e.route === ze), [a, ze]), We = Ee(), Ge = q(() => {
|
|
17925
17947
|
if (!l) return {};
|
|
17926
17948
|
let e = {};
|
|
17927
|
-
for (let t of
|
|
17928
|
-
for (let t of
|
|
17949
|
+
for (let t of Ud(l, L, y)) Ie.has(t) && (e[t] = "Required");
|
|
17950
|
+
for (let t of Gd(l, L)) Ie.has(t) && (e[t] = "Invalid email address");
|
|
17929
17951
|
return e;
|
|
17930
17952
|
}, [
|
|
17931
17953
|
l,
|
|
@@ -17966,7 +17988,7 @@ function Xd({ screenCode: e }) {
|
|
|
17966
17988
|
let { _key: t, _deleted: n, _dirty: r, ...i } = e;
|
|
17967
17989
|
return i;
|
|
17968
17990
|
}), i = le?.[e] ?? [];
|
|
17969
|
-
(y || !
|
|
17991
|
+
(y || !Yd(r, i)) && (t[e] = r);
|
|
17970
17992
|
}
|
|
17971
17993
|
Object.keys(t).length > 0 && (e.$children = t);
|
|
17972
17994
|
}
|
|
@@ -17989,7 +18011,7 @@ function Xd({ screenCode: e }) {
|
|
|
17989
18011
|
r.forEach((e) => s.markCommitted(e)), i();
|
|
17990
18012
|
},
|
|
17991
18013
|
onError: (e) => {
|
|
17992
|
-
e instanceof
|
|
18014
|
+
e instanceof Tt && e.code === "STALE_OBJECT" && ce(!0);
|
|
17993
18015
|
}
|
|
17994
18016
|
});
|
|
17995
18017
|
}, [
|
|
@@ -18033,7 +18055,7 @@ function Xd({ screenCode: e }) {
|
|
|
18033
18055
|
y,
|
|
18034
18056
|
h,
|
|
18035
18057
|
O
|
|
18036
|
-
]), tt = q(() =>
|
|
18058
|
+
]), tt = q(() => qd(R, a), [R, a]), nt = Object.keys(tt).length > 0;
|
|
18037
18059
|
if (!c || !l) return null;
|
|
18038
18060
|
if (!y && w) return /* @__PURE__ */ Z(ul, {});
|
|
18039
18061
|
if (!y && !U) return /* @__PURE__ */ Q("div", {
|
|
@@ -18120,7 +18142,7 @@ function Xd({ screenCode: e }) {
|
|
|
18120
18142
|
onChildrenChange: H ? Ye : void 0,
|
|
18121
18143
|
childValidationErrors: H ? tt : void 0,
|
|
18122
18144
|
fieldErrors: H && V ? Ge : void 0
|
|
18123
|
-
}, lt = c.sidebar && c.sidebar.length > 0, ut = !y && U ? /* @__PURE__ */ Z(
|
|
18145
|
+
}, lt = c.sidebar && c.sidebar.length > 0, ut = !y && U ? /* @__PURE__ */ Z(Ld, {
|
|
18124
18146
|
screen: c,
|
|
18125
18147
|
entity: l,
|
|
18126
18148
|
entityCode: d,
|
|
@@ -18129,7 +18151,7 @@ function Xd({ screenCode: e }) {
|
|
|
18129
18151
|
objectStatuses: j,
|
|
18130
18152
|
schema: a,
|
|
18131
18153
|
locale: We
|
|
18132
|
-
}) : void 0, dt = /* @__PURE__ */ Z(
|
|
18154
|
+
}) : void 0, dt = /* @__PURE__ */ Z($d, {
|
|
18133
18155
|
title: ot,
|
|
18134
18156
|
recordId: v,
|
|
18135
18157
|
editing: H,
|
|
@@ -18183,7 +18205,7 @@ function Xd({ screenCode: e }) {
|
|
|
18183
18205
|
fontSize: 12.5
|
|
18184
18206
|
},
|
|
18185
18207
|
children: [/* @__PURE__ */ Z(F.warning, { size: 14 }), /* @__PURE__ */ Z("span", { children: "This record changed on the server while you were viewing or editing it." })]
|
|
18186
|
-
}),
|
|
18208
|
+
}), mt = H && V && qe && /* @__PURE__ */ Z(Fd, {
|
|
18187
18209
|
errors: Object.entries(Ge).map(([e, t]) => {
|
|
18188
18210
|
let n = l.fields.get(e);
|
|
18189
18211
|
return {
|
|
@@ -18199,20 +18221,20 @@ function Xd({ screenCode: e }) {
|
|
|
18199
18221
|
behavior: "smooth"
|
|
18200
18222
|
}), t.focus?.());
|
|
18201
18223
|
}
|
|
18202
|
-
}),
|
|
18224
|
+
}), ht = k && !y && !(c.items && c.items.length > 0) && /* @__PURE__ */ Z("div", {
|
|
18203
18225
|
className: "mb-4",
|
|
18204
|
-
children: /* @__PURE__ */ Z(
|
|
18226
|
+
children: /* @__PURE__ */ Z(Ad, {
|
|
18205
18227
|
statusGroups: l.status_groups ?? {},
|
|
18206
18228
|
objectStatuses: ct.objectStatuses,
|
|
18207
18229
|
onSetStatus: p && H ? (e, t) => re((n) => ({
|
|
18208
18230
|
...n,
|
|
18209
18231
|
[e]: t
|
|
18210
|
-
})) :
|
|
18232
|
+
})) : Jd,
|
|
18211
18233
|
isPending: !1,
|
|
18212
18234
|
mode: H ? "edit" : "display"
|
|
18213
18235
|
})
|
|
18214
|
-
}),
|
|
18215
|
-
c.items && c.items.length > 0 && (U || y) && a && /* @__PURE__ */ Z(
|
|
18236
|
+
}), gt = /* @__PURE__ */ Q(X, { children: [
|
|
18237
|
+
c.items && c.items.length > 0 && (U || y) && a && /* @__PURE__ */ Z(Nd, {
|
|
18216
18238
|
nodes: c.items,
|
|
18217
18239
|
ctx: ct
|
|
18218
18240
|
}),
|
|
@@ -18222,7 +18244,7 @@ function Xd({ screenCode: e }) {
|
|
|
18222
18244
|
associations: l.associations,
|
|
18223
18245
|
schema: a
|
|
18224
18246
|
}),
|
|
18225
|
-
!y && U && a && /* @__PURE__ */ Z(
|
|
18247
|
+
!y && U && a && /* @__PURE__ */ Z(Vd, {
|
|
18226
18248
|
screen: c,
|
|
18227
18249
|
entity: l,
|
|
18228
18250
|
entityCode: d,
|
|
@@ -18231,7 +18253,7 @@ function Xd({ screenCode: e }) {
|
|
|
18231
18253
|
schema: a,
|
|
18232
18254
|
locale: We
|
|
18233
18255
|
})
|
|
18234
|
-
] }),
|
|
18256
|
+
] }), _t = /* @__PURE__ */ Z(hr, {
|
|
18235
18257
|
open: B.show,
|
|
18236
18258
|
onOpenChange: (e) => !e && de({ show: !1 }),
|
|
18237
18259
|
title: `Delete ${it}`,
|
|
@@ -18265,8 +18287,8 @@ function Xd({ screenCode: e }) {
|
|
|
18265
18287
|
dt,
|
|
18266
18288
|
pt,
|
|
18267
18289
|
ft,
|
|
18268
|
-
|
|
18269
|
-
|
|
18290
|
+
mt,
|
|
18291
|
+
ht
|
|
18270
18292
|
]
|
|
18271
18293
|
}), /* @__PURE__ */ Z("div", {
|
|
18272
18294
|
style: {
|
|
@@ -18278,7 +18300,7 @@ function Xd({ screenCode: e }) {
|
|
|
18278
18300
|
flexDirection: "column",
|
|
18279
18301
|
gap: 16
|
|
18280
18302
|
},
|
|
18281
|
-
children:
|
|
18303
|
+
children: gt
|
|
18282
18304
|
})]
|
|
18283
18305
|
}),
|
|
18284
18306
|
/* @__PURE__ */ Z("div", {
|
|
@@ -18302,12 +18324,12 @@ function Xd({ screenCode: e }) {
|
|
|
18302
18324
|
height: "100%",
|
|
18303
18325
|
width: `${he}px`
|
|
18304
18326
|
},
|
|
18305
|
-
children: (U || y) && a && /* @__PURE__ */ Z(
|
|
18327
|
+
children: (U || y) && a && /* @__PURE__ */ Z(Nd, {
|
|
18306
18328
|
nodes: c.sidebar,
|
|
18307
18329
|
ctx: ct
|
|
18308
18330
|
})
|
|
18309
18331
|
}),
|
|
18310
|
-
|
|
18332
|
+
_t
|
|
18311
18333
|
]
|
|
18312
18334
|
}) : /* @__PURE__ */ Q("div", {
|
|
18313
18335
|
style: {
|
|
@@ -18324,19 +18346,19 @@ function Xd({ screenCode: e }) {
|
|
|
18324
18346
|
dt,
|
|
18325
18347
|
pt,
|
|
18326
18348
|
ft,
|
|
18327
|
-
|
|
18328
|
-
|
|
18349
|
+
mt,
|
|
18350
|
+
ht
|
|
18329
18351
|
]
|
|
18330
18352
|
}),
|
|
18331
18353
|
/* @__PURE__ */ Z("div", {
|
|
18332
18354
|
className: "flex-1 min-h-0 overflow-y-auto px-6 pb-6 space-y-4",
|
|
18333
|
-
children:
|
|
18355
|
+
children: gt
|
|
18334
18356
|
}),
|
|
18335
|
-
|
|
18357
|
+
_t
|
|
18336
18358
|
]
|
|
18337
18359
|
});
|
|
18338
18360
|
}
|
|
18339
|
-
function
|
|
18361
|
+
function $d({ title: e, recordId: t, editing: n, isNew: r, isSingletonByCaller: i, isRecordDeleted: a, dirty: o, isSaving: s, hasChildErrors: c, hasFieldErrors: l, canRestore: u, entity: d, screen: f, globalActions: p, entityCode: m, record: h, id: g, listRoute: _, listRouteExists: v, highlights: b, onBack: x, onCancelEdit: S, onSave: C, onRestore: w, isRestoring: T }) {
|
|
18340
18362
|
let { run: E } = eo(), D = _r(), k = pr(), A = Ee(), j = f?.action_layout ?? null, M = d?.action_layout ?? null, N = j ?? M, P = Ds(N ? Fs(N, d?.actions, p, "detail") : Rs(d?.actions, "detail"), d?.actions, p, h ?? {}, []), I = q(() => {
|
|
18341
18363
|
if (!d) return;
|
|
18342
18364
|
let e = g ? [g] : [];
|
|
@@ -18401,7 +18423,7 @@ function Zd({ title: e, recordId: t, editing: n, isNew: r, isSingletonByCaller:
|
|
|
18401
18423
|
reservedRightWidth: 0,
|
|
18402
18424
|
widgetContext: I
|
|
18403
18425
|
}) : null;
|
|
18404
|
-
return /* @__PURE__ */ Z(
|
|
18426
|
+
return /* @__PURE__ */ Z(Hd, {
|
|
18405
18427
|
icon: d?.display.icon ? /* @__PURE__ */ Z(R, {
|
|
18406
18428
|
name: d.display.icon,
|
|
18407
18429
|
size: 16
|
|
@@ -18418,7 +18440,7 @@ function Zd({ title: e, recordId: t, editing: n, isNew: r, isSingletonByCaller:
|
|
|
18418
18440
|
}
|
|
18419
18441
|
//#endregion
|
|
18420
18442
|
//#region src/api/status.ts
|
|
18421
|
-
async function
|
|
18443
|
+
async function ef(e, t, n, r, i) {
|
|
18422
18444
|
let a = {
|
|
18423
18445
|
status_group_code: n,
|
|
18424
18446
|
status_code: r
|
|
@@ -18435,10 +18457,10 @@ async function Qd(e, t, n, r, i) {
|
|
|
18435
18457
|
}
|
|
18436
18458
|
//#endregion
|
|
18437
18459
|
//#region src/hooks/useObjectStatus.ts
|
|
18438
|
-
function
|
|
18460
|
+
function tf(e, t) {
|
|
18439
18461
|
let n = ln();
|
|
18440
18462
|
return sn({
|
|
18441
|
-
mutationFn: ({ groupCode: n, statusCode: r, note: i }) =>
|
|
18463
|
+
mutationFn: ({ groupCode: n, statusCode: r, note: i }) => ef(e, t, n, r, i),
|
|
18442
18464
|
onSuccess: () => {
|
|
18443
18465
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18444
18466
|
},
|
|
@@ -18449,7 +18471,7 @@ function $d(e, t) {
|
|
|
18449
18471
|
}
|
|
18450
18472
|
//#endregion
|
|
18451
18473
|
//#region src/api/properties.ts
|
|
18452
|
-
async function
|
|
18474
|
+
async function nf(e, t, n, r) {
|
|
18453
18475
|
let i = (await ut(`/api/data/${e}`, {
|
|
18454
18476
|
method: "PATCH",
|
|
18455
18477
|
body: JSON.stringify([{
|
|
@@ -18462,7 +18484,7 @@ async function ef(e, t, n, r) {
|
|
|
18462
18484
|
}))[0]?.$properties ?? [];
|
|
18463
18485
|
return i.find((e) => e.property_code === n) ?? i[0];
|
|
18464
18486
|
}
|
|
18465
|
-
async function
|
|
18487
|
+
async function rf(e, t, n) {
|
|
18466
18488
|
await ut(`/api/data/${e}`, {
|
|
18467
18489
|
method: "PATCH",
|
|
18468
18490
|
body: JSON.stringify([{
|
|
@@ -18476,10 +18498,10 @@ async function tf(e, t, n) {
|
|
|
18476
18498
|
}
|
|
18477
18499
|
//#endregion
|
|
18478
18500
|
//#region src/hooks/useProperties.ts
|
|
18479
|
-
function
|
|
18501
|
+
function af(e, t) {
|
|
18480
18502
|
let n = ln();
|
|
18481
18503
|
return sn({
|
|
18482
|
-
mutationFn: ({ propertyCode: n, value: r }) =>
|
|
18504
|
+
mutationFn: ({ propertyCode: n, value: r }) => nf(e, t, n, r),
|
|
18483
18505
|
onSuccess: () => {
|
|
18484
18506
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18485
18507
|
},
|
|
@@ -18488,10 +18510,10 @@ function nf(e, t) {
|
|
|
18488
18510
|
}
|
|
18489
18511
|
});
|
|
18490
18512
|
}
|
|
18491
|
-
function
|
|
18513
|
+
function of(e, t) {
|
|
18492
18514
|
let n = ln();
|
|
18493
18515
|
return sn({
|
|
18494
|
-
mutationFn: (n) =>
|
|
18516
|
+
mutationFn: (n) => rf(e, t, n),
|
|
18495
18517
|
onSuccess: () => {
|
|
18496
18518
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18497
18519
|
},
|
|
@@ -18502,7 +18524,7 @@ function rf(e, t) {
|
|
|
18502
18524
|
}
|
|
18503
18525
|
//#endregion
|
|
18504
18526
|
//#region src/components/pages/SmartRecordListPage.tsx
|
|
18505
|
-
function
|
|
18527
|
+
function sf({ screenCode: e }) {
|
|
18506
18528
|
let [t, n] = nn(), { data: r } = S(), i = r?.screens[e], a = i?.entity ? r?.entities[i.entity] : void 0, o = i?.entity, { openTab: s } = Fn();
|
|
18507
18529
|
K(() => {
|
|
18508
18530
|
if (i?.route && a) {
|
|
@@ -18690,7 +18712,7 @@ function af({ screenCode: e }) {
|
|
|
18690
18712
|
color: "var(--text-3)"
|
|
18691
18713
|
},
|
|
18692
18714
|
children: "No records found"
|
|
18693
|
-
}) : h.map((e) => /* @__PURE__ */ Z(
|
|
18715
|
+
}) : h.map((e) => /* @__PURE__ */ Z(cf, {
|
|
18694
18716
|
record: e,
|
|
18695
18717
|
entity: a,
|
|
18696
18718
|
columns: A,
|
|
@@ -18719,7 +18741,7 @@ function af({ screenCode: e }) {
|
|
|
18719
18741
|
minWidth: 0,
|
|
18720
18742
|
overflow: "hidden"
|
|
18721
18743
|
},
|
|
18722
|
-
children: c ? /* @__PURE__ */ Z(
|
|
18744
|
+
children: c ? /* @__PURE__ */ Z(lf, {
|
|
18723
18745
|
entityCode: o,
|
|
18724
18746
|
recordId: c,
|
|
18725
18747
|
items: i.items,
|
|
@@ -18746,7 +18768,7 @@ function af({ screenCode: e }) {
|
|
|
18746
18768
|
]
|
|
18747
18769
|
});
|
|
18748
18770
|
}
|
|
18749
|
-
function
|
|
18771
|
+
function cf({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick: a }) {
|
|
18750
18772
|
let o = Ee(), s = n[0], c = n[1], l = n.slice(2, 4);
|
|
18751
18773
|
return /* @__PURE__ */ Q("button", {
|
|
18752
18774
|
onClick: a,
|
|
@@ -18833,8 +18855,8 @@ function of({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick:
|
|
|
18833
18855
|
})]
|
|
18834
18856
|
});
|
|
18835
18857
|
}
|
|
18836
|
-
function
|
|
18837
|
-
return /* @__PURE__ */ Z(
|
|
18858
|
+
function lf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
18859
|
+
return /* @__PURE__ */ Z(Dt, { children: /* @__PURE__ */ Z(uf, {
|
|
18838
18860
|
entityCode: e,
|
|
18839
18861
|
recordId: t,
|
|
18840
18862
|
items: n,
|
|
@@ -18842,8 +18864,8 @@ function sf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
18842
18864
|
entity: i
|
|
18843
18865
|
}) });
|
|
18844
18866
|
}
|
|
18845
|
-
function
|
|
18846
|
-
let a = Ze(i, "update"), { data: o, isLoading: s } = pu(e, t), c = ms(e), l =
|
|
18867
|
+
function uf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
18868
|
+
let a = Ze(i, "update"), { data: o, isLoading: s } = pu(e, t), c = ms(e), l = jt(), [u, d] = Y(!1), [f, p] = Y({}), m = o?.data, h = m?.$statuses, g = m?.$properties, _ = tf(e, t), v = af(e, t), b = q(() => {
|
|
18847
18869
|
let e = /* @__PURE__ */ new Set();
|
|
18848
18870
|
for (let [t, n] of i.fields) !n.auto && !n.primary && e.add(t);
|
|
18849
18871
|
for (let [t] of i.files ?? []) e.add(t);
|
|
@@ -18988,7 +19010,7 @@ function cf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
18988
19010
|
flexDirection: "column",
|
|
18989
19011
|
gap: 12
|
|
18990
19012
|
},
|
|
18991
|
-
children: n && n.length > 0 ? /* @__PURE__ */ Z(
|
|
19013
|
+
children: n && n.length > 0 ? /* @__PURE__ */ Z(Nd, {
|
|
18992
19014
|
nodes: n,
|
|
18993
19015
|
ctx: A
|
|
18994
19016
|
}) : /* @__PURE__ */ Q("p", {
|
|
@@ -19007,7 +19029,7 @@ function cf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
19007
19029
|
}
|
|
19008
19030
|
//#endregion
|
|
19009
19031
|
//#region src/components/shared/ErrorBoundary.tsx
|
|
19010
|
-
var
|
|
19032
|
+
var df = class extends Ft {
|
|
19011
19033
|
constructor(e) {
|
|
19012
19034
|
super(e), this.state = {
|
|
19013
19035
|
hasError: !1,
|
|
@@ -19075,7 +19097,7 @@ var lf = class extends Ft {
|
|
|
19075
19097
|
};
|
|
19076
19098
|
//#endregion
|
|
19077
19099
|
//#region src/hooks/useVersionWatcher.ts
|
|
19078
|
-
function
|
|
19100
|
+
function ff() {
|
|
19079
19101
|
let e = ln();
|
|
19080
19102
|
K(() => {
|
|
19081
19103
|
let t = !1, n = null, r = 6e4, i = r, a = 0, o = 0;
|
|
@@ -19093,7 +19115,7 @@ function uf() {
|
|
|
19093
19115
|
async function c() {
|
|
19094
19116
|
if (!t) {
|
|
19095
19117
|
try {
|
|
19096
|
-
await
|
|
19118
|
+
await kt(), a = 0, i = r;
|
|
19097
19119
|
} catch (e) {
|
|
19098
19120
|
a === 0 && console.warn("[declarion] version probe failed; backing off", e), a += 1, i = Math.min(1e3 * 2 ** Math.min(a - 1, 9), 3e5);
|
|
19099
19121
|
}
|
|
@@ -19107,12 +19129,12 @@ function uf() {
|
|
|
19107
19129
|
function u() {
|
|
19108
19130
|
document.visibilityState === "visible" && l();
|
|
19109
19131
|
}
|
|
19110
|
-
let d =
|
|
19132
|
+
let d = gt((t) => {
|
|
19111
19133
|
if (t.kind === "schema-only") {
|
|
19112
19134
|
e.invalidateQueries({ queryKey: ["schema"] });
|
|
19113
19135
|
return;
|
|
19114
19136
|
}
|
|
19115
|
-
|
|
19137
|
+
ht() || $.info("A new version is available", "Reload to pick up the latest UI and schema.", {
|
|
19116
19138
|
id: "declarion-update-available",
|
|
19117
19139
|
sticky: !0,
|
|
19118
19140
|
action: {
|
|
@@ -19130,39 +19152,39 @@ function uf() {
|
|
|
19130
19152
|
}
|
|
19131
19153
|
//#endregion
|
|
19132
19154
|
//#region src/lib/capabilityPrefetch.ts
|
|
19133
|
-
var
|
|
19155
|
+
var pf = [
|
|
19134
19156
|
() => import("./MarkdownRenderer-Dl3GDuY9.js"),
|
|
19135
19157
|
() => import("./JsonEditor-CexL5HXN.js"),
|
|
19136
|
-
() => import("./Grid-
|
|
19137
|
-
() => import("./DraggableChildrenTable-
|
|
19158
|
+
() => import("./Grid-pE2-dvug.js"),
|
|
19159
|
+
() => import("./DraggableChildrenTable-BFkRqNSe.js")
|
|
19138
19160
|
];
|
|
19139
|
-
function ff() {
|
|
19140
|
-
for (let e of df) e().catch(() => {});
|
|
19141
|
-
}
|
|
19142
|
-
var pf = !1;
|
|
19143
19161
|
function mf() {
|
|
19144
|
-
|
|
19145
|
-
|
|
19162
|
+
for (let e of pf) e().catch(() => {});
|
|
19163
|
+
}
|
|
19164
|
+
var hf = !1;
|
|
19165
|
+
function gf() {
|
|
19166
|
+
if (hf) return;
|
|
19167
|
+
hf = !0;
|
|
19146
19168
|
let e = globalThis.requestIdleCallback;
|
|
19147
|
-
typeof e == "function" ? e(
|
|
19169
|
+
typeof e == "function" ? e(mf) : setTimeout(mf, 0);
|
|
19148
19170
|
}
|
|
19149
19171
|
//#endregion
|
|
19150
19172
|
//#region src/stores/screen-registry.ts
|
|
19151
|
-
var
|
|
19152
|
-
function
|
|
19153
|
-
|
|
19173
|
+
var _f = /* @__PURE__ */ new Map();
|
|
19174
|
+
function vf(e, t) {
|
|
19175
|
+
_f.set(e, t);
|
|
19154
19176
|
}
|
|
19155
|
-
function
|
|
19156
|
-
return
|
|
19177
|
+
function yf(e) {
|
|
19178
|
+
return _f.get(e);
|
|
19157
19179
|
}
|
|
19158
19180
|
//#endregion
|
|
19159
19181
|
//#region src/app.tsx
|
|
19160
|
-
|
|
19161
|
-
var
|
|
19182
|
+
vf("Profile", kc);
|
|
19183
|
+
var bf = "declarion-managed-favicon", xf = new rn({ defaultOptions: { queries: {
|
|
19162
19184
|
staleTime: 300 * 1e3,
|
|
19163
19185
|
retry: 1
|
|
19164
19186
|
} } });
|
|
19165
|
-
function
|
|
19187
|
+
function Sf(e) {
|
|
19166
19188
|
if (typeof window > "u") return null;
|
|
19167
19189
|
try {
|
|
19168
19190
|
let t = new URL(e, window.location.origin);
|
|
@@ -19171,7 +19193,7 @@ function bf(e) {
|
|
|
19171
19193
|
return null;
|
|
19172
19194
|
}
|
|
19173
19195
|
}
|
|
19174
|
-
function
|
|
19196
|
+
function Cf() {
|
|
19175
19197
|
let { data: e } = S();
|
|
19176
19198
|
return {
|
|
19177
19199
|
routes: q(() => {
|
|
@@ -19183,29 +19205,29 @@ function xf() {
|
|
|
19183
19205
|
if ((i ? e.entities?.[i] : void 0)?.singleton) continue;
|
|
19184
19206
|
t.push(/* @__PURE__ */ Z(qt, {
|
|
19185
19207
|
path: r.route,
|
|
19186
|
-
element: /* @__PURE__ */ Z(
|
|
19208
|
+
element: /* @__PURE__ */ Z(df, { children: /* @__PURE__ */ Z(du, { screenCode: n }) })
|
|
19187
19209
|
}, n));
|
|
19188
19210
|
continue;
|
|
19189
19211
|
}
|
|
19190
19212
|
if (r.type === "detail") {
|
|
19191
19213
|
t.push(/* @__PURE__ */ Z(qt, {
|
|
19192
19214
|
path: r.route,
|
|
19193
|
-
element: /* @__PURE__ */ Z(
|
|
19215
|
+
element: /* @__PURE__ */ Z(df, { children: /* @__PURE__ */ Z(Zd, { screenCode: n }) })
|
|
19194
19216
|
}, n));
|
|
19195
19217
|
continue;
|
|
19196
19218
|
}
|
|
19197
19219
|
if (r.type === "record_list") {
|
|
19198
19220
|
t.push(/* @__PURE__ */ Z(qt, {
|
|
19199
19221
|
path: r.route,
|
|
19200
|
-
element: /* @__PURE__ */ Z(
|
|
19222
|
+
element: /* @__PURE__ */ Z(df, { children: /* @__PURE__ */ Z(sf, { screenCode: n }) })
|
|
19201
19223
|
}, n));
|
|
19202
19224
|
continue;
|
|
19203
19225
|
}
|
|
19204
19226
|
if (r.type === "custom") {
|
|
19205
|
-
let e = r.component ?
|
|
19227
|
+
let e = r.component ? yf(r.component) : void 0;
|
|
19206
19228
|
e && t.push(/* @__PURE__ */ Z(qt, {
|
|
19207
19229
|
path: r.route,
|
|
19208
|
-
element: /* @__PURE__ */ Z(
|
|
19230
|
+
element: /* @__PURE__ */ Z(df, { children: /* @__PURE__ */ Z(e, {}) })
|
|
19209
19231
|
}, n));
|
|
19210
19232
|
}
|
|
19211
19233
|
}
|
|
@@ -19214,12 +19236,12 @@ function xf() {
|
|
|
19214
19236
|
defaultRoute: q(() => Mo(e), [e])
|
|
19215
19237
|
};
|
|
19216
19238
|
}
|
|
19217
|
-
function
|
|
19218
|
-
let e = He((e) => e.initialize), t = He((e) => e.isLoading), n = He((e) => e.isAuthenticated), { data: r, isLoading: i } = S(), { data: a, isLoading: o } = ti(), { routes: s, defaultRoute: c } =
|
|
19239
|
+
function wf() {
|
|
19240
|
+
let e = He((e) => e.initialize), t = He((e) => e.isLoading), n = He((e) => e.isAuthenticated), { data: r, isLoading: i } = S(), { data: a, isLoading: o } = ti(), { routes: s, defaultRoute: c } = Cf(), l = Qn();
|
|
19219
19241
|
K(() => {
|
|
19220
19242
|
l.enabled || e();
|
|
19221
19243
|
}, [l.enabled, e]), K(() => {
|
|
19222
|
-
|
|
19244
|
+
gf();
|
|
19223
19245
|
}, []);
|
|
19224
19246
|
let u = a?.branding;
|
|
19225
19247
|
K(() => {
|
|
@@ -19228,7 +19250,7 @@ function Sf() {
|
|
|
19228
19250
|
e && (document.title = e);
|
|
19229
19251
|
}, [u?.app_name]), K(() => {
|
|
19230
19252
|
if (typeof document > "u") return;
|
|
19231
|
-
let e = u?.app_logo, t = vn(e) ?
|
|
19253
|
+
let e = u?.app_logo, t = vn(e) ? Sf(e.trim()) : null, n = document.getElementById(bf);
|
|
19232
19254
|
if (!t) {
|
|
19233
19255
|
n && n.remove();
|
|
19234
19256
|
return;
|
|
@@ -19236,7 +19258,7 @@ function Sf() {
|
|
|
19236
19258
|
if (!n) {
|
|
19237
19259
|
document.querySelectorAll("link[rel=\"icon\"], link[rel=\"shortcut icon\"]").forEach((e) => e.remove());
|
|
19238
19260
|
let e = document.createElement("link");
|
|
19239
|
-
e.id =
|
|
19261
|
+
e.id = bf, e.rel = "icon", e.href = t, document.head.appendChild(e);
|
|
19240
19262
|
return;
|
|
19241
19263
|
}
|
|
19242
19264
|
n.href !== t && (n.href = t);
|
|
@@ -19249,7 +19271,7 @@ function Sf() {
|
|
|
19249
19271
|
t && t.remove();
|
|
19250
19272
|
return;
|
|
19251
19273
|
}
|
|
19252
|
-
let n =
|
|
19274
|
+
let n = Sf(d);
|
|
19253
19275
|
if (!n) {
|
|
19254
19276
|
t && t.remove(), console.error(`[declarion] branding.css_url rejected: ${d}. Only same-origin, relative URLs are allowed (e.g. /crm-brand.css).`);
|
|
19255
19277
|
return;
|
|
@@ -19322,12 +19344,12 @@ function Sf() {
|
|
|
19322
19344
|
})
|
|
19323
19345
|
] });
|
|
19324
19346
|
}
|
|
19325
|
-
function
|
|
19326
|
-
|
|
19347
|
+
function Tf() {
|
|
19348
|
+
ff();
|
|
19327
19349
|
let e = m((e) => e.toastPosition);
|
|
19328
19350
|
return /* @__PURE__ */ Q(Ut, { children: [
|
|
19329
19351
|
/* @__PURE__ */ Z(nr, {}),
|
|
19330
|
-
/* @__PURE__ */ Z(
|
|
19352
|
+
/* @__PURE__ */ Z(wf, {}),
|
|
19331
19353
|
/* @__PURE__ */ Z(un, {
|
|
19332
19354
|
position: e,
|
|
19333
19355
|
toastOptions: { unstyled: !0 },
|
|
@@ -19338,25 +19360,25 @@ function Cf() {
|
|
|
19338
19360
|
})
|
|
19339
19361
|
] });
|
|
19340
19362
|
}
|
|
19341
|
-
function
|
|
19342
|
-
return /* @__PURE__ */ Z(
|
|
19343
|
-
client:
|
|
19344
|
-
children: /* @__PURE__ */ Z(Zn, { children: /* @__PURE__ */ Z(
|
|
19363
|
+
function Ef() {
|
|
19364
|
+
return /* @__PURE__ */ Z(df, { children: /* @__PURE__ */ Z(an, {
|
|
19365
|
+
client: xf,
|
|
19366
|
+
children: /* @__PURE__ */ Z(Zn, { children: /* @__PURE__ */ Z(Tf, {}) })
|
|
19345
19367
|
}) });
|
|
19346
19368
|
}
|
|
19347
19369
|
//#endregion
|
|
19348
19370
|
//#region src/api/entities.ts
|
|
19349
|
-
function
|
|
19371
|
+
function Df(e, t) {
|
|
19350
19372
|
return e.$statuses?.find((e) => e.group_code === t);
|
|
19351
19373
|
}
|
|
19352
|
-
function
|
|
19374
|
+
function Of(e, t) {
|
|
19353
19375
|
return e.$properties?.find((e) => e.property_code === t);
|
|
19354
19376
|
}
|
|
19355
|
-
function
|
|
19377
|
+
function kf(e) {
|
|
19356
19378
|
let t = { ...e };
|
|
19357
|
-
return t.$status = (e) =>
|
|
19379
|
+
return t.$status = (e) => Df(t, e), t.$property = (e) => Of(t, e), t;
|
|
19358
19380
|
}
|
|
19359
|
-
var
|
|
19381
|
+
var Af = class {
|
|
19360
19382
|
cache = {};
|
|
19361
19383
|
merge(e) {
|
|
19362
19384
|
if (e) for (let t of Object.keys(e)) {
|
|
@@ -19378,24 +19400,24 @@ var Of = class {
|
|
|
19378
19400
|
this.cache = {};
|
|
19379
19401
|
}
|
|
19380
19402
|
};
|
|
19381
|
-
function
|
|
19403
|
+
function jf(e, t) {
|
|
19382
19404
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
19383
19405
|
return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.expand && t.expand.length > 0 && n.searchParams.set("expand", t.expand.join(",")), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.limit && n.searchParams.set("limit", String(t.limit)), t.after && n.searchParams.set("after", t.after), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), n.pathname + n.search;
|
|
19384
19406
|
}
|
|
19385
|
-
var
|
|
19407
|
+
var Mf = class {
|
|
19386
19408
|
entity;
|
|
19387
19409
|
refs;
|
|
19388
19410
|
constructor(e, t) {
|
|
19389
|
-
this.entity = e, this.refs = t ?? new
|
|
19411
|
+
this.entity = e, this.refs = t ?? new Af();
|
|
19390
19412
|
}
|
|
19391
19413
|
async get(e) {
|
|
19392
19414
|
let t = new URLSearchParams({ id: e });
|
|
19393
|
-
return
|
|
19415
|
+
return kf((await ut(`/api/data/${this.entity}?${t.toString()}`)).data);
|
|
19394
19416
|
}
|
|
19395
19417
|
async list(e = {}) {
|
|
19396
|
-
let t = await ut(
|
|
19418
|
+
let t = await ut(jf(this.entity, e));
|
|
19397
19419
|
return this.refs.merge(t.$refs), {
|
|
19398
|
-
data: t.data.map((e) =>
|
|
19420
|
+
data: t.data.map((e) => kf(e)),
|
|
19399
19421
|
meta: t.meta,
|
|
19400
19422
|
$refs: this.refs.all()
|
|
19401
19423
|
};
|
|
@@ -19407,7 +19429,7 @@ var Af = class {
|
|
|
19407
19429
|
return (await ut(`/api/data/${this.entity}`, {
|
|
19408
19430
|
method: "POST",
|
|
19409
19431
|
body: JSON.stringify(e)
|
|
19410
|
-
})).map((e) =>
|
|
19432
|
+
})).map((e) => kf(e));
|
|
19411
19433
|
}
|
|
19412
19434
|
async update(e, t) {
|
|
19413
19435
|
return (await this.updateMany([{
|
|
@@ -19416,10 +19438,7 @@ var Af = class {
|
|
|
19416
19438
|
}]))[0];
|
|
19417
19439
|
}
|
|
19418
19440
|
async updateMany(e) {
|
|
19419
|
-
return (await
|
|
19420
|
-
method: "PATCH",
|
|
19421
|
-
body: JSON.stringify(e)
|
|
19422
|
-
})).map((e) => Df(e));
|
|
19441
|
+
return ((await O(`${this.entity}.__update`, { items: e })).result ?? { rows: [] }).rows.map((e) => kf(e));
|
|
19423
19442
|
}
|
|
19424
19443
|
async delete(e) {
|
|
19425
19444
|
await this.deleteMany([e]);
|
|
@@ -19444,20 +19463,20 @@ var Af = class {
|
|
|
19444
19463
|
return (await ut(`/api/data/${this.entity}?unique_fields=${n}`, {
|
|
19445
19464
|
method: "POST",
|
|
19446
19465
|
body: JSON.stringify(e)
|
|
19447
|
-
})).map((e) =>
|
|
19466
|
+
})).map((e) => kf(e));
|
|
19448
19467
|
}
|
|
19449
19468
|
};
|
|
19450
|
-
function
|
|
19451
|
-
return new
|
|
19469
|
+
function Nf(e, t) {
|
|
19470
|
+
return new Mf(e, t);
|
|
19452
19471
|
}
|
|
19453
19472
|
//#endregion
|
|
19454
19473
|
//#region src/api/batch.ts
|
|
19455
|
-
var
|
|
19474
|
+
var Pf = class {
|
|
19456
19475
|
ops = [];
|
|
19457
19476
|
call(e, t) {
|
|
19458
19477
|
return this.ops.push({
|
|
19459
19478
|
action: e,
|
|
19460
|
-
params:
|
|
19479
|
+
params: Ff(t)
|
|
19461
19480
|
}), this;
|
|
19462
19481
|
}
|
|
19463
19482
|
upsert(e, t, n = "upsert", r = []) {
|
|
@@ -19479,13 +19498,13 @@ var Mf = class {
|
|
|
19479
19498
|
return this.ops;
|
|
19480
19499
|
}
|
|
19481
19500
|
};
|
|
19482
|
-
function
|
|
19501
|
+
function Ff(e) {
|
|
19483
19502
|
return e == null ? null : typeof e == "object" && !Array.isArray(e) ? e : { value: e };
|
|
19484
19503
|
}
|
|
19485
19504
|
//#endregion
|
|
19486
19505
|
//#region src/hooks/useAllEntityData.ts
|
|
19487
|
-
var
|
|
19488
|
-
function
|
|
19506
|
+
var If = 1e3, Lf = 20;
|
|
19507
|
+
function Rf(e, t = {}) {
|
|
19489
19508
|
return cn({
|
|
19490
19509
|
queryKey: [
|
|
19491
19510
|
"entity-data-all",
|
|
@@ -19496,18 +19515,18 @@ function If(e, t = {}) {
|
|
|
19496
19515
|
queryFn: async ({ signal: n }) => {
|
|
19497
19516
|
let r = {
|
|
19498
19517
|
...t,
|
|
19499
|
-
per_page:
|
|
19518
|
+
per_page: If,
|
|
19500
19519
|
count: "with"
|
|
19501
19520
|
}, i = await v(e, {
|
|
19502
19521
|
...r,
|
|
19503
19522
|
page: 1
|
|
19504
19523
|
}, { signal: n }), a = i.meta.total_pages ?? 1;
|
|
19505
19524
|
if (a <= 1) return i;
|
|
19506
|
-
if (a >
|
|
19525
|
+
if (a > Lf) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${Lf}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
|
|
19507
19526
|
let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) => v(e, {
|
|
19508
19527
|
...r,
|
|
19509
19528
|
page: i + 2
|
|
19510
|
-
}, { signal: n }))), s = new
|
|
19529
|
+
}, { signal: n }))), s = new Af();
|
|
19511
19530
|
s.merge(i.$refs);
|
|
19512
19531
|
let c = [...i.data];
|
|
19513
19532
|
for (let e of o) c.push(...e.data), s.merge(e.$refs);
|
|
@@ -19526,7 +19545,7 @@ function If(e, t = {}) {
|
|
|
19526
19545
|
}
|
|
19527
19546
|
//#endregion
|
|
19528
19547
|
//#region src/hooks/useColumns.ts
|
|
19529
|
-
function
|
|
19548
|
+
function zf(e, t) {
|
|
19530
19549
|
let [n, r] = nn(), i = q(() => {
|
|
19531
19550
|
let r = n.get("columns");
|
|
19532
19551
|
return r ? r.split(",").filter(Boolean).filter((t) => e.includes(t)) : t.length > 0 ? t : e;
|
|
@@ -19536,7 +19555,7 @@ function Lf(e, t) {
|
|
|
19536
19555
|
t
|
|
19537
19556
|
]), a = G((e) => {
|
|
19538
19557
|
let i = new URLSearchParams(n);
|
|
19539
|
-
e.length === 0 ||
|
|
19558
|
+
e.length === 0 || Bf(e, t) ? i.delete("columns") : i.set("columns", e.join(",")), r(i);
|
|
19540
19559
|
}, [
|
|
19541
19560
|
n,
|
|
19542
19561
|
r,
|
|
@@ -19562,12 +19581,12 @@ function Lf(e, t) {
|
|
|
19562
19581
|
}, [i, a])
|
|
19563
19582
|
};
|
|
19564
19583
|
}
|
|
19565
|
-
function
|
|
19584
|
+
function Bf(e, t) {
|
|
19566
19585
|
return e.length === t.length ? e.every((e, n) => e === t[n]) : !1;
|
|
19567
19586
|
}
|
|
19568
19587
|
//#endregion
|
|
19569
19588
|
//#region src/components/shared/PageHeader.tsx
|
|
19570
|
-
function
|
|
19589
|
+
function Vf({ title: e, backTo: t, actions: n }) {
|
|
19571
19590
|
let r = Qt(), { switchTab: i, findTabByPathname: a } = Fn();
|
|
19572
19591
|
function o() {
|
|
19573
19592
|
if (!t) return;
|
|
@@ -19618,7 +19637,7 @@ function zf({ title: e, backTo: t, actions: n }) {
|
|
|
19618
19637
|
}
|
|
19619
19638
|
//#endregion
|
|
19620
19639
|
//#region src/components/list/BulkBar.tsx
|
|
19621
|
-
function
|
|
19640
|
+
function Hf({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
|
|
19622
19641
|
let [a, o] = Y(!1), s = J(null), c = t.filter((e) => e.primary), l = t.filter((e) => !e.primary);
|
|
19623
19642
|
return /* @__PURE__ */ Q("div", {
|
|
19624
19643
|
style: {
|
|
@@ -19684,7 +19703,7 @@ function Bf({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
|
|
|
19684
19703
|
background: "var(--inverted-overlay)",
|
|
19685
19704
|
margin: "0 4px"
|
|
19686
19705
|
} }),
|
|
19687
|
-
c.map((e) => /* @__PURE__ */ Z(
|
|
19706
|
+
c.map((e) => /* @__PURE__ */ Z(Uf, {
|
|
19688
19707
|
icon: e.icon,
|
|
19689
19708
|
label: e.label,
|
|
19690
19709
|
onClick: e.onRun
|
|
@@ -19748,7 +19767,7 @@ function Bf({ count: e, actions: t, onClear: n, onDelete: r, onExport: i }) {
|
|
|
19748
19767
|
]
|
|
19749
19768
|
});
|
|
19750
19769
|
}
|
|
19751
|
-
function
|
|
19770
|
+
function Uf({ icon: e, label: t, onClick: n }) {
|
|
19752
19771
|
return /* @__PURE__ */ Q("button", {
|
|
19753
19772
|
onClick: n,
|
|
19754
19773
|
style: {
|
|
@@ -19772,7 +19791,7 @@ function Vf({ icon: e, label: t, onClick: n }) {
|
|
|
19772
19791
|
}
|
|
19773
19792
|
//#endregion
|
|
19774
19793
|
//#region src/components/list/RowMenu.tsx
|
|
19775
|
-
function
|
|
19794
|
+
function Wf({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onDuplicate: o, onCopyLink: s, onDelete: c, actions: l }) {
|
|
19776
19795
|
let u = (e) => () => {
|
|
19777
19796
|
n(), e && e();
|
|
19778
19797
|
}, d = r || i || a || o || s, f = l && l.length > 0;
|
|
@@ -19850,23 +19869,23 @@ function Hf({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onD
|
|
|
19850
19869
|
}
|
|
19851
19870
|
//#endregion
|
|
19852
19871
|
//#region src/components/list/resolveActions.ts
|
|
19853
|
-
var
|
|
19854
|
-
function
|
|
19872
|
+
var Gf = "list_toolbar", Kf = "list_floatbar";
|
|
19873
|
+
function qf(e) {
|
|
19855
19874
|
return !1;
|
|
19856
19875
|
}
|
|
19857
|
-
function
|
|
19876
|
+
function Jf(e) {
|
|
19858
19877
|
let { actions: t, screen: n, selectionCount: r } = e, i = e.hasPermission ?? (() => !0), a = e.maxPrimary ?? 2, o = [];
|
|
19859
19878
|
for (let [e, n] of Object.entries(t)) (n.visibility ?? []).includes("list_toolbar") && i(e) && o.push({
|
|
19860
19879
|
code: e,
|
|
19861
19880
|
action: n
|
|
19862
19881
|
});
|
|
19863
|
-
let s = new Map(o.map((e) => [e.code, e])), c = o.filter((e) => !
|
|
19882
|
+
let s = new Map(o.map((e) => [e.code, e])), c = o.filter((e) => !qf(e.action)), l, u = n?.primary_actions;
|
|
19864
19883
|
if (u && u.length > 0) {
|
|
19865
19884
|
let e = new Set(c.map((e) => e.code));
|
|
19866
19885
|
l = u.filter((t) => s.has(t) && e.has(t)).slice(0, a).map((e) => s.get(e));
|
|
19867
19886
|
} else l = c.filter((e) => (e.action.position ?? 0) <= 10).slice(0, a);
|
|
19868
19887
|
let d = [], f = [];
|
|
19869
|
-
for (let e of o)
|
|
19888
|
+
for (let e of o) qf(e.action) ? f.push(e) : d.push(e);
|
|
19870
19889
|
return {
|
|
19871
19890
|
primary: l,
|
|
19872
19891
|
global: d,
|
|
@@ -19874,7 +19893,7 @@ function Kf(e) {
|
|
|
19874
19893
|
selectionCount: r
|
|
19875
19894
|
};
|
|
19876
19895
|
}
|
|
19877
|
-
function
|
|
19896
|
+
function Yf(e) {
|
|
19878
19897
|
let { actions: t, screen: n } = e, r = e.hasPermission ?? (() => !0), i = e.maxPrimary ?? 2, a = [];
|
|
19879
19898
|
for (let [e, n] of Object.entries(t)) (n.visibility ?? []).includes("list_floatbar") && r(e) && a.push({
|
|
19880
19899
|
code: e,
|
|
@@ -19888,7 +19907,7 @@ function qf(e) {
|
|
|
19888
19907
|
}
|
|
19889
19908
|
//#endregion
|
|
19890
19909
|
//#region src/components/list/ListPage.tsx
|
|
19891
|
-
function
|
|
19910
|
+
function Xf(e, t = 12) {
|
|
19892
19911
|
let n = e.display?.icon;
|
|
19893
19912
|
if (!n) return null;
|
|
19894
19913
|
let r = F[n];
|
|
@@ -19897,8 +19916,8 @@ function Jf(e, t = 12) {
|
|
|
19897
19916
|
size: t
|
|
19898
19917
|
});
|
|
19899
19918
|
}
|
|
19900
|
-
function
|
|
19901
|
-
let _ = J(null), [v, y] = Y(!1), { run: b } = eo(), x = q(() =>
|
|
19919
|
+
function Zf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clearSelection: a, onNewRecord: o, screen: s, actions: c, hasPermission: l, executeAction: u, children: d, onBulkDelete: f, onBulkExport: p, onToolbarExport: m, onManageActions: g }) {
|
|
19920
|
+
let _ = J(null), [v, y] = Y(!1), { run: b } = eo(), x = q(() => Jf({
|
|
19902
19921
|
actions: c,
|
|
19903
19922
|
screen: s,
|
|
19904
19923
|
selectionCount: i,
|
|
@@ -19908,7 +19927,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
19908
19927
|
s,
|
|
19909
19928
|
i,
|
|
19910
19929
|
l
|
|
19911
|
-
]), S = q(() =>
|
|
19930
|
+
]), S = q(() => Yf({
|
|
19912
19931
|
actions: c,
|
|
19913
19932
|
screen: s,
|
|
19914
19933
|
selectionCount: i,
|
|
@@ -19929,7 +19948,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
19929
19948
|
}, w = q(() => S.entries.map(({ code: e, action: t }) => ({
|
|
19930
19949
|
id: e,
|
|
19931
19950
|
label: W(t.display?.name) || e,
|
|
19932
|
-
icon:
|
|
19951
|
+
icon: Xf(t),
|
|
19933
19952
|
primary: S.primaryCodes.has(e),
|
|
19934
19953
|
destructive: t.destructive,
|
|
19935
19954
|
onRun: () => C({
|
|
@@ -19986,7 +20005,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
19986
20005
|
}),
|
|
19987
20006
|
x.primary.map((e) => /* @__PURE__ */ Z(V, {
|
|
19988
20007
|
kind: "default",
|
|
19989
|
-
icon:
|
|
20008
|
+
icon: Xf(e.action, 13),
|
|
19990
20009
|
onClick: () => C(e, !1),
|
|
19991
20010
|
children: W(e.action.display?.name) || e.code
|
|
19992
20011
|
}, e.code)),
|
|
@@ -20009,9 +20028,9 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
20009
20028
|
width: 240,
|
|
20010
20029
|
align: "end",
|
|
20011
20030
|
children: [
|
|
20012
|
-
x.global.length > 0 && /* @__PURE__ */ Z(
|
|
20031
|
+
x.global.length > 0 && /* @__PURE__ */ Z(Qf, { children: "Global" }),
|
|
20013
20032
|
x.global.map((e) => /* @__PURE__ */ Z(L, {
|
|
20014
|
-
icon:
|
|
20033
|
+
icon: Xf(e.action),
|
|
20015
20034
|
danger: e.action.destructive,
|
|
20016
20035
|
onClick: () => {
|
|
20017
20036
|
y(!1), C(e, !1);
|
|
@@ -20051,7 +20070,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
20051
20070
|
pointerEvents: i === 0 ? "none" : "auto"
|
|
20052
20071
|
},
|
|
20053
20072
|
children: /* @__PURE__ */ Z(L, {
|
|
20054
|
-
icon:
|
|
20073
|
+
icon: Xf(e.action),
|
|
20055
20074
|
danger: e.action.destructive,
|
|
20056
20075
|
onClick: () => {
|
|
20057
20076
|
y(!1), C(e, !0);
|
|
@@ -20095,7 +20114,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
20095
20114
|
]
|
|
20096
20115
|
}),
|
|
20097
20116
|
d,
|
|
20098
|
-
i > 0 && /* @__PURE__ */ Z(
|
|
20117
|
+
i > 0 && /* @__PURE__ */ Z(Hf, {
|
|
20099
20118
|
count: i,
|
|
20100
20119
|
actions: w,
|
|
20101
20120
|
onClear: a,
|
|
@@ -20105,7 +20124,7 @@ function Yf({ title: e, singular: t, total: n, shown: r, selectionCount: i, clea
|
|
|
20105
20124
|
]
|
|
20106
20125
|
});
|
|
20107
20126
|
}
|
|
20108
|
-
function
|
|
20127
|
+
function Qf({ children: e }) {
|
|
20109
20128
|
return /* @__PURE__ */ Z("div", {
|
|
20110
20129
|
style: {
|
|
20111
20130
|
padding: "6px 8px 4px",
|
|
@@ -20120,7 +20139,7 @@ function Xf({ children: e }) {
|
|
|
20120
20139
|
}
|
|
20121
20140
|
//#endregion
|
|
20122
20141
|
//#region src/components/list/InlineEditCell.tsx
|
|
20123
|
-
var
|
|
20142
|
+
var $f = {
|
|
20124
20143
|
padding: "4px 6px",
|
|
20125
20144
|
margin: "-4px -6px",
|
|
20126
20145
|
borderRadius: 4,
|
|
@@ -20131,7 +20150,7 @@ var Zf = {
|
|
|
20131
20150
|
alignItems: "center",
|
|
20132
20151
|
gap: 4
|
|
20133
20152
|
};
|
|
20134
|
-
function
|
|
20153
|
+
function ep({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "always", label: a, placeholder: o }) {
|
|
20135
20154
|
let [s, c] = Y(e), [l, u] = Y(e), [d, f] = Y(!1), [p, m] = Y(e), h = J(null);
|
|
20136
20155
|
K(() => {
|
|
20137
20156
|
c(e), u(e), m(e);
|
|
@@ -20203,7 +20222,7 @@ function Qf({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "a
|
|
|
20203
20222
|
onMouseLeave: (e) => {
|
|
20204
20223
|
e.currentTarget.style.borderColor = "transparent";
|
|
20205
20224
|
},
|
|
20206
|
-
style:
|
|
20225
|
+
style: $f,
|
|
20207
20226
|
children: l ?? /* @__PURE__ */ Z("span", {
|
|
20208
20227
|
style: { color: "var(--text-4)" },
|
|
20209
20228
|
children: "Click to edit"
|
|
@@ -20212,7 +20231,7 @@ function Qf({ value: e, onSave: t, type: n = "text", options: r, trigger: i = "a
|
|
|
20212
20231
|
}
|
|
20213
20232
|
//#endregion
|
|
20214
20233
|
//#region src/components/pages/home/HomeStub.tsx
|
|
20215
|
-
var
|
|
20234
|
+
var tp = [
|
|
20216
20235
|
{
|
|
20217
20236
|
id: "a1",
|
|
20218
20237
|
title: "James Gallagher moved to Discovery",
|
|
@@ -20228,7 +20247,7 @@ var $f = [
|
|
|
20228
20247
|
title: "Refill enrichment job completed (32 leads)",
|
|
20229
20248
|
when: "10:00 AM"
|
|
20230
20249
|
}
|
|
20231
|
-
],
|
|
20250
|
+
], np = [
|
|
20232
20251
|
{
|
|
20233
20252
|
label: "Open leads",
|
|
20234
20253
|
val: "127",
|
|
@@ -20253,7 +20272,7 @@ var $f = [
|
|
|
20253
20272
|
delta: "2 failed",
|
|
20254
20273
|
tone: "amber"
|
|
20255
20274
|
}
|
|
20256
|
-
],
|
|
20275
|
+
], rp = [
|
|
20257
20276
|
[
|
|
20258
20277
|
"leads",
|
|
20259
20278
|
"Leads",
|
|
@@ -20285,7 +20304,7 @@ var $f = [
|
|
|
20285
20304
|
"entity"
|
|
20286
20305
|
]
|
|
20287
20306
|
];
|
|
20288
|
-
function
|
|
20307
|
+
function ip({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLabel: n = "Acme · production" }) {
|
|
20289
20308
|
return /* @__PURE__ */ Z("div", {
|
|
20290
20309
|
style: {
|
|
20291
20310
|
padding: "22px 24px",
|
|
@@ -20329,7 +20348,7 @@ function np({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20329
20348
|
gap: 10,
|
|
20330
20349
|
margin: "16px 0"
|
|
20331
20350
|
},
|
|
20332
|
-
children:
|
|
20351
|
+
children: np.map((e) => /* @__PURE__ */ Q("div", {
|
|
20333
20352
|
style: {
|
|
20334
20353
|
padding: 14,
|
|
20335
20354
|
background: "var(--surface)",
|
|
@@ -20377,7 +20396,7 @@ function np({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20377
20396
|
gridTemplateColumns: "repeat(3,1fr)",
|
|
20378
20397
|
gap: 8
|
|
20379
20398
|
},
|
|
20380
|
-
children:
|
|
20399
|
+
children: rp.map(([t, n, r]) => {
|
|
20381
20400
|
let i = F[r];
|
|
20382
20401
|
return /* @__PURE__ */ Q("button", {
|
|
20383
20402
|
onClick: () => e?.(t),
|
|
@@ -20422,7 +20441,7 @@ function np({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20422
20441
|
flexDirection: "column",
|
|
20423
20442
|
gap: 8
|
|
20424
20443
|
},
|
|
20425
|
-
children:
|
|
20444
|
+
children: tp.slice(0, 3).map((e) => /* @__PURE__ */ Q("div", {
|
|
20426
20445
|
style: {
|
|
20427
20446
|
fontSize: 12,
|
|
20428
20447
|
color: "var(--text-2)"
|
|
@@ -20451,19 +20470,19 @@ function np({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20451
20470
|
}
|
|
20452
20471
|
//#endregion
|
|
20453
20472
|
//#region src/components/pages/pipeline/Pipeline.tsx
|
|
20454
|
-
var
|
|
20473
|
+
var ap = {
|
|
20455
20474
|
"1-New": { color: "slate" },
|
|
20456
20475
|
"2-Contacted": { color: "sky" },
|
|
20457
20476
|
"3-Qualified": { color: "violet" },
|
|
20458
20477
|
"4-Proposal": { color: "amber" },
|
|
20459
20478
|
"5-Won": { color: "emerald" },
|
|
20460
20479
|
"6-Lost": { color: "rose" }
|
|
20461
|
-
},
|
|
20480
|
+
}, op = {
|
|
20462
20481
|
P0: "rose",
|
|
20463
20482
|
P1: "amber",
|
|
20464
20483
|
P2: "sky",
|
|
20465
20484
|
P3: "slate"
|
|
20466
|
-
},
|
|
20485
|
+
}, sp = [
|
|
20467
20486
|
{
|
|
20468
20487
|
id: "l1",
|
|
20469
20488
|
contact: "James Gallagher",
|
|
@@ -20529,11 +20548,11 @@ var rp = {
|
|
|
20529
20548
|
score: 58
|
|
20530
20549
|
}
|
|
20531
20550
|
];
|
|
20532
|
-
function
|
|
20533
|
-
let e = Object.entries(
|
|
20551
|
+
function cp() {
|
|
20552
|
+
let e = Object.entries(ap).map(([e, t]) => ({
|
|
20534
20553
|
key: e,
|
|
20535
20554
|
color: t.color,
|
|
20536
|
-
leads:
|
|
20555
|
+
leads: sp.filter((t) => t.pipeline === e)
|
|
20537
20556
|
}));
|
|
20538
20557
|
return /* @__PURE__ */ Q("div", {
|
|
20539
20558
|
style: {
|
|
@@ -20564,7 +20583,7 @@ function op() {
|
|
|
20564
20583
|
fontSize: 12,
|
|
20565
20584
|
color: "var(--text-3)"
|
|
20566
20585
|
},
|
|
20567
|
-
children: [
|
|
20586
|
+
children: [sp.length, " leads · $2.4M pipeline"]
|
|
20568
20587
|
})]
|
|
20569
20588
|
}), /* @__PURE__ */ Z("div", {
|
|
20570
20589
|
style: {
|
|
@@ -20650,7 +20669,7 @@ function op() {
|
|
|
20650
20669
|
flexWrap: "wrap"
|
|
20651
20670
|
},
|
|
20652
20671
|
children: [e.priority && e.priority !== "-" && /* @__PURE__ */ Z(B, {
|
|
20653
|
-
tone:
|
|
20672
|
+
tone: op[e.priority] ?? "slate",
|
|
20654
20673
|
size: "xs",
|
|
20655
20674
|
dot: !0,
|
|
20656
20675
|
children: e.priority
|
|
@@ -20669,7 +20688,7 @@ function op() {
|
|
|
20669
20688
|
}
|
|
20670
20689
|
//#endregion
|
|
20671
20690
|
//#region src/components/pages/jobs/Jobs.tsx
|
|
20672
|
-
var
|
|
20691
|
+
var lp = [
|
|
20673
20692
|
{
|
|
20674
20693
|
id: "job_91a4",
|
|
20675
20694
|
name: "reparse_leads_with_llm",
|
|
@@ -20713,12 +20732,12 @@ var sp = [
|
|
|
20713
20732
|
worker: "wk-us-01",
|
|
20714
20733
|
took: "2m 02s"
|
|
20715
20734
|
}
|
|
20716
|
-
],
|
|
20735
|
+
], up = {
|
|
20717
20736
|
running: "sky",
|
|
20718
20737
|
success: "emerald",
|
|
20719
20738
|
queued: "slate",
|
|
20720
20739
|
failed: "rose"
|
|
20721
|
-
},
|
|
20740
|
+
}, dp = [
|
|
20722
20741
|
"ID",
|
|
20723
20742
|
"Name",
|
|
20724
20743
|
"Status",
|
|
@@ -20728,7 +20747,7 @@ var sp = [
|
|
|
20728
20747
|
"Worker",
|
|
20729
20748
|
""
|
|
20730
20749
|
];
|
|
20731
|
-
function
|
|
20750
|
+
function fp() {
|
|
20732
20751
|
return /* @__PURE__ */ Q("div", {
|
|
20733
20752
|
style: {
|
|
20734
20753
|
padding: "14px 20px",
|
|
@@ -20777,7 +20796,7 @@ function up() {
|
|
|
20777
20796
|
background: "var(--surface-2)",
|
|
20778
20797
|
color: "var(--text-3)"
|
|
20779
20798
|
},
|
|
20780
|
-
children:
|
|
20799
|
+
children: dp.map((e, t) => /* @__PURE__ */ Z("th", {
|
|
20781
20800
|
style: {
|
|
20782
20801
|
padding: "0 10px",
|
|
20783
20802
|
textAlign: "left",
|
|
@@ -20789,7 +20808,7 @@ function up() {
|
|
|
20789
20808
|
},
|
|
20790
20809
|
children: e
|
|
20791
20810
|
}, e || `_h${t}`))
|
|
20792
|
-
}) }), /* @__PURE__ */ Z("tbody", { children:
|
|
20811
|
+
}) }), /* @__PURE__ */ Z("tbody", { children: lp.map((e) => /* @__PURE__ */ Q("tr", {
|
|
20793
20812
|
style: { height: 32 },
|
|
20794
20813
|
children: [
|
|
20795
20814
|
/* @__PURE__ */ Z("td", {
|
|
@@ -20821,7 +20840,7 @@ function up() {
|
|
|
20821
20840
|
borderBottom: "1px solid var(--divider)"
|
|
20822
20841
|
},
|
|
20823
20842
|
children: /* @__PURE__ */ Z(B, {
|
|
20824
|
-
tone:
|
|
20843
|
+
tone: up[e.status],
|
|
20825
20844
|
size: "xs",
|
|
20826
20845
|
dot: !0,
|
|
20827
20846
|
children: e.status
|
|
@@ -20851,7 +20870,7 @@ function up() {
|
|
|
20851
20870
|
display: "block",
|
|
20852
20871
|
height: "100%",
|
|
20853
20872
|
width: `${e.progress}%`,
|
|
20854
|
-
background: `var(--pill-${
|
|
20873
|
+
background: `var(--pill-${up[e.status]})`
|
|
20855
20874
|
} })
|
|
20856
20875
|
}), /* @__PURE__ */ Q("span", {
|
|
20857
20876
|
className: "mono num",
|
|
@@ -20906,7 +20925,7 @@ function up() {
|
|
|
20906
20925
|
}
|
|
20907
20926
|
//#endregion
|
|
20908
20927
|
//#region src/components/layout/ImpersonationStartModal.tsx
|
|
20909
|
-
function
|
|
20928
|
+
function pp({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarted: i }) {
|
|
20910
20929
|
let { start: a, isStarting: o } = Ir(), { value: s } = ri("impersonation.require_reason_min_length", 10), [c, l] = Y(""), [u, d] = Y("");
|
|
20911
20930
|
if (!e) return null;
|
|
20912
20931
|
let f = c.trim(), p = f.length >= s;
|
|
@@ -21066,7 +21085,7 @@ function dp({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarte
|
|
|
21066
21085
|
}
|
|
21067
21086
|
//#endregion
|
|
21068
21087
|
//#region src/components/agents/AgentVisualHints.tsx
|
|
21069
|
-
function
|
|
21088
|
+
function mp({ turn: e, navigate: t }) {
|
|
21070
21089
|
return K(() => {
|
|
21071
21090
|
for (let n of e.hints) switch (n.kind) {
|
|
21072
21091
|
case "navigate":
|
|
@@ -21105,7 +21124,7 @@ function fp({ turn: e, navigate: t }) {
|
|
|
21105
21124
|
}
|
|
21106
21125
|
//#endregion
|
|
21107
21126
|
//#region src/components/agents/AgentConversationDrawer.tsx
|
|
21108
|
-
function
|
|
21127
|
+
function hp({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, onNew: a, onRefresh: o }) {
|
|
21109
21128
|
return K(() => {
|
|
21110
21129
|
e && o();
|
|
21111
21130
|
}, [e, o]), e ? /* @__PURE__ */ Q("aside", {
|
|
@@ -21132,7 +21151,7 @@ function pp({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
|
|
|
21132
21151
|
className: `block w-full px-4 py-3 text-left border-b border-divider hover:bg-surface ${e.id === r ? "bg-surface" : ""}`,
|
|
21133
21152
|
children: [/* @__PURE__ */ Z("div", {
|
|
21134
21153
|
className: "text-sm font-medium truncate",
|
|
21135
|
-
children: e.title || e.context ?
|
|
21154
|
+
children: e.title || e.context ? gp(e.context) : "Untitled"
|
|
21136
21155
|
}), /* @__PURE__ */ Q("div", {
|
|
21137
21156
|
className: "text-xs text-muted-foreground",
|
|
21138
21157
|
children: [
|
|
@@ -21155,12 +21174,12 @@ function pp({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
|
|
|
21155
21174
|
]
|
|
21156
21175
|
}) : null;
|
|
21157
21176
|
}
|
|
21158
|
-
function
|
|
21177
|
+
function gp(e) {
|
|
21159
21178
|
if (!e) return "";
|
|
21160
21179
|
let t = e.entity ? String(e.entity) : "", n = e.pk ? `:${String(e.pk).slice(0, 6)}` : "";
|
|
21161
21180
|
return t ? `${t}${n}` : "";
|
|
21162
21181
|
}
|
|
21163
21182
|
//#endregion
|
|
21164
|
-
export { A as ActionBatchError, no as ActionRunnerProvider, Zi as AgentChatPanel,
|
|
21183
|
+
export { A as ActionBatchError, no as ActionRunnerProvider, Zi as AgentChatPanel, hp as AgentConversationDrawer, Wi as AgentElicitForm, mp as AgentVisualHints, Ef as App, Ef as Declarion, Oo as AuthShell, Ue as Avatar, Pf as Batch, st as BoolToggle, C as BrandGlyph, Gr as Breadcrumbs, V as Btn, Hf as BulkBar, cs as ChangePasswordDialog, T as Check, ae as Chip, we as CircleImage, Xl as ColumnPicker, li as CommandPalette, hr as ConfirmDialog, re as DateInput, h as Dropdown, R as DynamicIcon, rl as EmptyState, Mf as EntityClient, d as FieldLabel, Dt as FileDraftScope, Fl as FilterChips, Rl as FilterDrawer, Zo as Forgot, ip as HomeStub, ce as HoverCard, F as Icon, z as IconBtn, Zr as ImpersonationBanner, ii as ImpersonationFrame, pp as ImpersonationStartModal, ep as InlineEditCell, fp as JobsStub, l as JsonField, x as Kbd, ja as MULTIPLE_VALUES, L as MenuItem, dl as NO_VALUE_OPS, fl as OP_LABELS, Vf as PageHeader, j as PasswordInput, B as Pill, cp as PipelineStub, zc as Preferences, kc as Profile, Ma as PropertyGridEditor, El as QEField, je as QuickEditCell, Tl as QuickPeek, xn as Rail, oe as RecordIdBadge, Af as RefCache, r as RefField, is as Reset, a as RowField, Wf as RowMenu, _ as SectionCard, ke as Select, Zf as ShellListPage, vr as Sidebar, Ko as SignIn, Yo as SignUp, Zd as SmartDetailPage, du as SmartListPage, sf as SmartRecordListPage, y as Spinner, U as SquareImage, Jr as TabStrip, D as TagsInput, Hr as TenantChip, k as TextArea, N as TextInput, qr as TopBar, as as TwoFA, Et as UploadError, Kf as VISIBILITY_LIST_BULK_BAR, Gf as VISIBILITY_LIST_TOOLBAR, p as ViewField, Ql as ViewSwitcher, Pe as WideBanner, pi as approveInvocation, Ae as buildActionBody, qe as buildDetailHrefFromId, ve as buildEntityDetailHref, Da as buildMassEditTargets, Ne as buildRowDetailHref, yr as buildSections, hi as cancelConversation, _l as countActiveFilters, ui as createConversation, t as cx, Oe as deleteEntity, La as detectCommonValue, Mt as discardFile, Nf as entityClient, Vr as envTone, O as executeAction, be as extractPkValues, Ce as fieldDisplayName, Pt as formatBytes, Pl as formatCount, Ml as formatEstimatedCount, Nl as formatExactCount, it as getFileWidget, fe as getImageCropper, Fe as getPrimaryKeyFields, he as hasFileWidget, hl as hasOrGroups, gi as listConversations, vi as listPendingInvocations, yi as loadHistory, W as loc, pl as parseFiltersFromURL, Ea as parseTargetFilter, pe as pkValuePartsToId, $e as pkValuesFromId, at as pkValuesToDetailId, ge as pkValuesToId, nt as registerFileWidget, vf as registerScreen, mi as rejectInvocation, _i as rerunMessageTurn, Yf as resolveBulkBarActions, te as resolveDetailRoute, Jf as resolveToolbarActions, I as restoreEntity, fi as sendElicitResponse, di as sendMessage, ml as setFiltersInURL, Qe as setImageCropper, Ot as uploadFile, eo as useActionRunner, Ui as useAgentConversation, Rf as useAllEntityData, Fr as useAuth, zf as useColumns, ps as useCreateEntity, nl as useDebounce, hs as useDeleteEntity, of as useDeleteProperty, At as useDraftRegistration, ee as useEntity, o as useEntityCount, et as useEntityData, pu as useEntityItem, jt as useFileDraftScope, bl as useFilters, Ir as useImpersonation, Yt as useLocation, Zt as useNavigate, ri as useParam, $t as useParams, ti as usePublicParams, ni as useResolvedParam, S as useSchema, $l as useScreen, tn as useSearchParams, af as useSetProperty, tf as useSetStatus, _r as useTabNavigate, Fn as useTabStore, ms as useUpdateEntity, eu as useViews, Nt as validateClientSide };
|
|
21165
21184
|
|
|
21166
21185
|
//# sourceMappingURL=index.js.map
|