@declarion/react 0.6.8 → 0.6.10
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/MonacoJson-DVjwsaBK.js +60 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.d.ts +2 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.d.ts +9 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +9 -0
- package/dist-lib/components/detail-layout/widgets/builtins.d.ts +1 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.d.ts +1 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.d.ts +1 -0
- package/dist-lib/components/detail-layout/widgets/registry.d.ts +14 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +397 -234
- package/dist-lib/types/schema.d.ts +6 -0
- package/package.json +3 -1
package/dist-lib/index.js
CHANGED
|
@@ -15409,7 +15409,7 @@ function Xu({ config: e, ctx: t }) {
|
|
|
15409
15409
|
style: s ? void 0 : Zu(r.width ?? r.column?.width ?? r.row?.width ?? e.width, h[a], r.min_width, r.max_width),
|
|
15410
15410
|
children: [/* @__PURE__ */ Z("div", {
|
|
15411
15411
|
className: xr("flex-1 min-w-0 flex flex-col", g && "overflow-y-auto overflow-x-hidden"),
|
|
15412
|
-
children: /* @__PURE__ */ Z(
|
|
15412
|
+
children: /* @__PURE__ */ Z(Mf, {
|
|
15413
15413
|
node: r,
|
|
15414
15414
|
ctx: t
|
|
15415
15415
|
})
|
|
@@ -15447,7 +15447,7 @@ function $u({ config: e, ctx: t }) {
|
|
|
15447
15447
|
return /* @__PURE__ */ Z("div", {
|
|
15448
15448
|
className: "flex flex-col h-full",
|
|
15449
15449
|
style: { gap: r ? `${r}px` : void 0 },
|
|
15450
|
-
children: n.map((e, n) => /* @__PURE__ */ Z(
|
|
15450
|
+
children: n.map((e, n) => /* @__PURE__ */ Z(Mf, {
|
|
15451
15451
|
node: e,
|
|
15452
15452
|
ctx: t
|
|
15453
15453
|
}, n))
|
|
@@ -15553,7 +15553,7 @@ function rd({ config: e, ctx: t }) {
|
|
|
15553
15553
|
}), /* @__PURE__ */ Z("div", {
|
|
15554
15554
|
role: "tabpanel",
|
|
15555
15555
|
style: { padding: 14 },
|
|
15556
|
-
children: /* @__PURE__ */ Z(
|
|
15556
|
+
children: /* @__PURE__ */ Z(Mf, {
|
|
15557
15557
|
node: n[r],
|
|
15558
15558
|
ctx: {
|
|
15559
15559
|
...t,
|
|
@@ -15582,7 +15582,7 @@ function id({ config: e, ctx: t }) {
|
|
|
15582
15582
|
badge: f,
|
|
15583
15583
|
emphasis: c,
|
|
15584
15584
|
headingLevel: t.withinCard ? 3 : 2,
|
|
15585
|
-
children: /* @__PURE__ */ Z(
|
|
15585
|
+
children: /* @__PURE__ */ Z(jf, {
|
|
15586
15586
|
nodes: r,
|
|
15587
15587
|
ctx: l
|
|
15588
15588
|
})
|
|
@@ -17720,14 +17720,242 @@ function df({ node: e, ctx: t }) {
|
|
|
17720
17720
|
});
|
|
17721
17721
|
}
|
|
17722
17722
|
//#endregion
|
|
17723
|
+
//#region src/components/detail-layout/widgets/registry.ts
|
|
17724
|
+
var ff = /* @__PURE__ */ new Map();
|
|
17725
|
+
function pf(e, t) {
|
|
17726
|
+
ff.set(e, t);
|
|
17727
|
+
}
|
|
17728
|
+
function mf(e) {
|
|
17729
|
+
return ff.get(e);
|
|
17730
|
+
}
|
|
17731
|
+
function hf(e) {
|
|
17732
|
+
return ff.has(e);
|
|
17733
|
+
}
|
|
17734
|
+
//#endregion
|
|
17735
|
+
//#region src/components/detail-layout/widgets/canonicalizeJson.ts
|
|
17736
|
+
function gf(e) {
|
|
17737
|
+
if (Array.isArray(e)) return e.map(gf);
|
|
17738
|
+
if (typeof e == "object" && e) {
|
|
17739
|
+
let t = e, n = {};
|
|
17740
|
+
for (let e of Object.keys(t).sort()) n[e] = gf(t[e]);
|
|
17741
|
+
return n;
|
|
17742
|
+
}
|
|
17743
|
+
return e;
|
|
17744
|
+
}
|
|
17745
|
+
function _f(e) {
|
|
17746
|
+
switch (typeof e) {
|
|
17747
|
+
case "string": return e;
|
|
17748
|
+
case "number":
|
|
17749
|
+
case "boolean":
|
|
17750
|
+
case "bigint":
|
|
17751
|
+
case "symbol": return String(e);
|
|
17752
|
+
case "function": return "[function]";
|
|
17753
|
+
case "object": return "[unserializable]";
|
|
17754
|
+
default: return "";
|
|
17755
|
+
}
|
|
17756
|
+
}
|
|
17757
|
+
function vf(e) {
|
|
17758
|
+
if (e == null) return "";
|
|
17759
|
+
try {
|
|
17760
|
+
return JSON.stringify(gf(e), null, 2) ?? _f(e);
|
|
17761
|
+
} catch {
|
|
17762
|
+
return _f(e);
|
|
17763
|
+
}
|
|
17764
|
+
}
|
|
17765
|
+
//#endregion
|
|
17766
|
+
//#region src/components/shared/ErrorBoundary.tsx
|
|
17767
|
+
var yf = class extends Lt {
|
|
17768
|
+
constructor(e) {
|
|
17769
|
+
super(e), this.state = {
|
|
17770
|
+
hasError: !1,
|
|
17771
|
+
error: null
|
|
17772
|
+
};
|
|
17773
|
+
}
|
|
17774
|
+
static getDerivedStateFromError(e) {
|
|
17775
|
+
return {
|
|
17776
|
+
hasError: !0,
|
|
17777
|
+
error: e
|
|
17778
|
+
};
|
|
17779
|
+
}
|
|
17780
|
+
componentDidCatch(e, t) {
|
|
17781
|
+
console.error("[ErrorBoundary]", e, t.componentStack);
|
|
17782
|
+
}
|
|
17783
|
+
handleRetry = () => {
|
|
17784
|
+
this.setState({
|
|
17785
|
+
hasError: !1,
|
|
17786
|
+
error: null
|
|
17787
|
+
});
|
|
17788
|
+
};
|
|
17789
|
+
render() {
|
|
17790
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ Z("div", {
|
|
17791
|
+
style: {
|
|
17792
|
+
display: "flex",
|
|
17793
|
+
alignItems: "center",
|
|
17794
|
+
justifyContent: "center",
|
|
17795
|
+
minHeight: 200,
|
|
17796
|
+
padding: 32
|
|
17797
|
+
},
|
|
17798
|
+
children: /* @__PURE__ */ Q("div", {
|
|
17799
|
+
style: {
|
|
17800
|
+
textAlign: "center",
|
|
17801
|
+
maxWidth: 420,
|
|
17802
|
+
display: "flex",
|
|
17803
|
+
flexDirection: "column",
|
|
17804
|
+
gap: 10
|
|
17805
|
+
},
|
|
17806
|
+
children: [
|
|
17807
|
+
/* @__PURE__ */ Z("h2", {
|
|
17808
|
+
style: {
|
|
17809
|
+
fontSize: 16,
|
|
17810
|
+
fontWeight: 600,
|
|
17811
|
+
margin: 0,
|
|
17812
|
+
color: "var(--text)"
|
|
17813
|
+
},
|
|
17814
|
+
children: "Something went wrong"
|
|
17815
|
+
}),
|
|
17816
|
+
/* @__PURE__ */ Z("p", {
|
|
17817
|
+
style: {
|
|
17818
|
+
fontSize: 12.5,
|
|
17819
|
+
color: "var(--text-3)",
|
|
17820
|
+
margin: 0
|
|
17821
|
+
},
|
|
17822
|
+
children: this.state.error?.message || "An unexpected error occurred."
|
|
17823
|
+
}),
|
|
17824
|
+
/* @__PURE__ */ Z("div", { children: /* @__PURE__ */ Z(V, {
|
|
17825
|
+
onClick: this.handleRetry,
|
|
17826
|
+
children: "Try again"
|
|
17827
|
+
}) })
|
|
17828
|
+
]
|
|
17829
|
+
})
|
|
17830
|
+
}) : this.props.children;
|
|
17831
|
+
}
|
|
17832
|
+
}, bf = "Audit change diff", xf = Ht(() => import("./MonacoJson-DVjwsaBK.js").then((e) => ({ default: e.MonacoJsonDiff }))), Sf = Ht(() => import("./MonacoJson-DVjwsaBK.js").then((e) => ({ default: e.MonacoJsonSource }))), Cf = Ht(() => import("./JsonEditor-KelPV-OQ.js").then((e) => ({ default: e.JsonEditor })));
|
|
17833
|
+
function wf() {
|
|
17834
|
+
return /* @__PURE__ */ Z("div", {
|
|
17835
|
+
className: "flex h-full w-full items-center justify-center text-sm text-muted-foreground",
|
|
17836
|
+
children: "Loading editor…"
|
|
17837
|
+
});
|
|
17838
|
+
}
|
|
17839
|
+
function Tf({ before: e, after: t }) {
|
|
17840
|
+
return /* @__PURE__ */ Z(zt, {
|
|
17841
|
+
fallback: /* @__PURE__ */ Z(wf, {}),
|
|
17842
|
+
children: /* @__PURE__ */ Q("div", {
|
|
17843
|
+
className: "flex h-full w-full gap-2",
|
|
17844
|
+
role: "group",
|
|
17845
|
+
"aria-label": bf,
|
|
17846
|
+
children: [/* @__PURE__ */ Z("div", {
|
|
17847
|
+
className: "min-w-0 flex-1",
|
|
17848
|
+
children: /* @__PURE__ */ Z(Cf, {
|
|
17849
|
+
value: e,
|
|
17850
|
+
readOnly: !0
|
|
17851
|
+
})
|
|
17852
|
+
}), /* @__PURE__ */ Z("div", {
|
|
17853
|
+
className: "min-w-0 flex-1",
|
|
17854
|
+
children: /* @__PURE__ */ Z(Cf, {
|
|
17855
|
+
value: t,
|
|
17856
|
+
readOnly: !0
|
|
17857
|
+
})
|
|
17858
|
+
})]
|
|
17859
|
+
})
|
|
17860
|
+
});
|
|
17861
|
+
}
|
|
17862
|
+
function Ef({ mode: e, onChange: t }) {
|
|
17863
|
+
return /* @__PURE__ */ Q("div", {
|
|
17864
|
+
className: "inline-flex gap-1",
|
|
17865
|
+
role: "group",
|
|
17866
|
+
"aria-label": "Diff view mode",
|
|
17867
|
+
children: [/* @__PURE__ */ Z("button", {
|
|
17868
|
+
type: "button",
|
|
17869
|
+
"aria-pressed": e === "diff",
|
|
17870
|
+
onClick: () => t("diff"),
|
|
17871
|
+
className: `rounded px-2 py-0.5 text-xs ${e === "diff" ? "bg-accent text-accent-foreground" : "text-muted-foreground"}`,
|
|
17872
|
+
children: "Diff"
|
|
17873
|
+
}), /* @__PURE__ */ Z("button", {
|
|
17874
|
+
type: "button",
|
|
17875
|
+
"aria-pressed": e === "source",
|
|
17876
|
+
onClick: () => t("source"),
|
|
17877
|
+
className: `rounded px-2 py-0.5 text-xs ${e === "source" ? "bg-accent text-accent-foreground" : "text-muted-foreground"}`,
|
|
17878
|
+
children: "Source"
|
|
17879
|
+
})]
|
|
17880
|
+
});
|
|
17881
|
+
}
|
|
17882
|
+
function Df({ values: e, options: t }) {
|
|
17883
|
+
let n = e.before, r = e.after, [i, a] = Y(t?.default_mode === "source" ? "source" : "diff"), o = vf(n), s = vf(r);
|
|
17884
|
+
return /* @__PURE__ */ Q("div", {
|
|
17885
|
+
className: "flex flex-col gap-2",
|
|
17886
|
+
children: [/* @__PURE__ */ Q("div", {
|
|
17887
|
+
className: "flex items-center justify-between",
|
|
17888
|
+
children: [/* @__PURE__ */ Z(Ef, {
|
|
17889
|
+
mode: i,
|
|
17890
|
+
onChange: a
|
|
17891
|
+
}), o === s && /* @__PURE__ */ Z("span", {
|
|
17892
|
+
className: "text-xs text-muted-foreground",
|
|
17893
|
+
role: "status",
|
|
17894
|
+
children: "No field changes"
|
|
17895
|
+
})]
|
|
17896
|
+
}), /* @__PURE__ */ Z("div", {
|
|
17897
|
+
className: "h-[480px] w-full overflow-hidden rounded border",
|
|
17898
|
+
role: "group",
|
|
17899
|
+
"aria-label": bf,
|
|
17900
|
+
children: /* @__PURE__ */ Z(yf, {
|
|
17901
|
+
fallback: /* @__PURE__ */ Z(Tf, {
|
|
17902
|
+
before: n,
|
|
17903
|
+
after: r
|
|
17904
|
+
}),
|
|
17905
|
+
children: /* @__PURE__ */ Z(zt, {
|
|
17906
|
+
fallback: /* @__PURE__ */ Z(wf, {}),
|
|
17907
|
+
children: i === "diff" ? /* @__PURE__ */ Z(xf, {
|
|
17908
|
+
before: o,
|
|
17909
|
+
after: s
|
|
17910
|
+
}) : /* @__PURE__ */ Q("div", {
|
|
17911
|
+
className: "flex h-full w-full gap-2",
|
|
17912
|
+
children: [/* @__PURE__ */ Z("div", {
|
|
17913
|
+
className: "min-w-0 flex-1",
|
|
17914
|
+
children: /* @__PURE__ */ Z(Sf, { value: o })
|
|
17915
|
+
}), /* @__PURE__ */ Z("div", {
|
|
17916
|
+
className: "min-w-0 flex-1",
|
|
17917
|
+
children: /* @__PURE__ */ Z(Sf, { value: s })
|
|
17918
|
+
})]
|
|
17919
|
+
})
|
|
17920
|
+
})
|
|
17921
|
+
})
|
|
17922
|
+
})]
|
|
17923
|
+
});
|
|
17924
|
+
}
|
|
17925
|
+
//#endregion
|
|
17926
|
+
//#region src/components/detail-layout/widgets/builtins.ts
|
|
17927
|
+
var Of = !1;
|
|
17928
|
+
function kf() {
|
|
17929
|
+
Of ||= (pf("json_diff", Df), !0);
|
|
17930
|
+
}
|
|
17931
|
+
//#endregion
|
|
17932
|
+
//#region src/components/detail-layout/widgets/WidgetHost.tsx
|
|
17933
|
+
kf();
|
|
17934
|
+
function Af({ config: e, ctx: t }) {
|
|
17935
|
+
let n = mf(e.type);
|
|
17936
|
+
if (!n) return /* @__PURE__ */ Z("span", {
|
|
17937
|
+
className: "text-sm text-muted-foreground",
|
|
17938
|
+
children: `unknown widget: ${e.type}`
|
|
17939
|
+
});
|
|
17940
|
+
let r = e.inputs ?? {}, i = t.record, a = {};
|
|
17941
|
+
for (let [e, t] of Object.entries(r)) a[e] = i[t];
|
|
17942
|
+
return /* @__PURE__ */ Z(n, {
|
|
17943
|
+
inputs: r,
|
|
17944
|
+
values: a,
|
|
17945
|
+
record: i,
|
|
17946
|
+
options: e.options,
|
|
17947
|
+
ctx: t
|
|
17948
|
+
});
|
|
17949
|
+
}
|
|
17950
|
+
//#endregion
|
|
17723
17951
|
//#region src/components/detail-layout/LayoutRenderer.tsx
|
|
17724
|
-
function
|
|
17725
|
-
return /* @__PURE__ */ Z(X, { children: e.map((e, n) => /* @__PURE__ */ Z(
|
|
17952
|
+
function jf({ nodes: e, ctx: t }) {
|
|
17953
|
+
return /* @__PURE__ */ Z(X, { children: e.map((e, n) => /* @__PURE__ */ Z(Mf, {
|
|
17726
17954
|
node: e,
|
|
17727
17955
|
ctx: t
|
|
17728
17956
|
}, n)) });
|
|
17729
17957
|
}
|
|
17730
|
-
function
|
|
17958
|
+
function Mf({ node: e, ctx: t }) {
|
|
17731
17959
|
return e.row ? /* @__PURE__ */ Z(Xu, {
|
|
17732
17960
|
config: e.row,
|
|
17733
17961
|
ctx: t
|
|
@@ -17750,7 +17978,10 @@ function pf({ node: e, ctx: t }) {
|
|
|
17750
17978
|
}) : e.fields ? /* @__PURE__ */ Z(nf, {
|
|
17751
17979
|
fields: e.fields,
|
|
17752
17980
|
ctx: t
|
|
17753
|
-
}) : e.properties == null ? e.statuses == null ?
|
|
17981
|
+
}) : e.properties == null ? e.statuses == null ? e.widget ? /* @__PURE__ */ Z(Af, {
|
|
17982
|
+
config: e.widget,
|
|
17983
|
+
ctx: t
|
|
17984
|
+
}) : null : /* @__PURE__ */ Z(df, {
|
|
17754
17985
|
node: e,
|
|
17755
17986
|
ctx: t
|
|
17756
17987
|
}) : /* @__PURE__ */ Z(of, {
|
|
@@ -17760,7 +17991,7 @@ function pf({ node: e, ctx: t }) {
|
|
|
17760
17991
|
}
|
|
17761
17992
|
//#endregion
|
|
17762
17993
|
//#region src/components/detail-layout/ErrorSummary.tsx
|
|
17763
|
-
function
|
|
17994
|
+
function Nf({ errors: e, onJump: t }) {
|
|
17764
17995
|
if (e.length === 0) return null;
|
|
17765
17996
|
let n = e.length !== 1;
|
|
17766
17997
|
return /* @__PURE__ */ Q("div", {
|
|
@@ -17847,7 +18078,7 @@ function mf({ errors: e, onJump: t }) {
|
|
|
17847
18078
|
}
|
|
17848
18079
|
//#endregion
|
|
17849
18080
|
//#region src/components/shared/HighlightsStrip.tsx
|
|
17850
|
-
function
|
|
18081
|
+
function Pf({ items: e }) {
|
|
17851
18082
|
return e.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
17852
18083
|
style: {
|
|
17853
18084
|
display: "flex",
|
|
@@ -17883,7 +18114,7 @@ function hf({ items: e }) {
|
|
|
17883
18114
|
}
|
|
17884
18115
|
//#endregion
|
|
17885
18116
|
//#region src/components/detail-layout/DetailHighlights.tsx
|
|
17886
|
-
function
|
|
18117
|
+
function Ff({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectStatuses: a, schema: o, locale: s }) {
|
|
17887
18118
|
let c = e.highlights;
|
|
17888
18119
|
if (!c || c.length === 0) return null;
|
|
17889
18120
|
let l = [];
|
|
@@ -17924,15 +18155,15 @@ function gf({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectSta
|
|
|
17924
18155
|
continue;
|
|
17925
18156
|
}
|
|
17926
18157
|
}
|
|
17927
|
-
return l.length === 0 ? null : /* @__PURE__ */ Z(
|
|
18158
|
+
return l.length === 0 ? null : /* @__PURE__ */ Z(Pf, { items: l });
|
|
17928
18159
|
}
|
|
17929
18160
|
//#endregion
|
|
17930
18161
|
//#region src/components/shared/AuditMetaStrip.tsx
|
|
17931
|
-
function
|
|
18162
|
+
function If(e) {
|
|
17932
18163
|
return e.by != null || e.at != null;
|
|
17933
18164
|
}
|
|
17934
|
-
function
|
|
17935
|
-
let t = e.filter(
|
|
18165
|
+
function Lf({ lines: e }) {
|
|
18166
|
+
let t = e.filter(If);
|
|
17936
18167
|
return t.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
17937
18168
|
style: {
|
|
17938
18169
|
display: "flex",
|
|
@@ -17945,10 +18176,10 @@ function vf({ lines: e }) {
|
|
|
17945
18176
|
fontSize: 11.5,
|
|
17946
18177
|
color: "var(--text-3)"
|
|
17947
18178
|
},
|
|
17948
|
-
children: t.map((e, t) => /* @__PURE__ */ Z(
|
|
18179
|
+
children: t.map((e, t) => /* @__PURE__ */ Z(Rf, { line: e }, t))
|
|
17949
18180
|
});
|
|
17950
18181
|
}
|
|
17951
|
-
function
|
|
18182
|
+
function Rf({ line: e }) {
|
|
17952
18183
|
return /* @__PURE__ */ Q("div", {
|
|
17953
18184
|
style: {
|
|
17954
18185
|
display: "flex",
|
|
@@ -17990,7 +18221,7 @@ function yf({ line: e }) {
|
|
|
17990
18221
|
}
|
|
17991
18222
|
//#endregion
|
|
17992
18223
|
//#region src/components/detail-layout/DetailAuditStrip.tsx
|
|
17993
|
-
function
|
|
18224
|
+
function zf({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a, locale: o }) {
|
|
17994
18225
|
let s = e.audit;
|
|
17995
18226
|
if (s?.enabled === !1) return null;
|
|
17996
18227
|
let c = (e) => {
|
|
@@ -18009,7 +18240,7 @@ function bf({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
18009
18240
|
locale: o
|
|
18010
18241
|
});
|
|
18011
18242
|
};
|
|
18012
|
-
return /* @__PURE__ */ Z(
|
|
18243
|
+
return /* @__PURE__ */ Z(Lf, { lines: s?.lines && s.lines.length > 0 ? s.lines.map((e) => ({
|
|
18013
18244
|
label: W(e.label),
|
|
18014
18245
|
at: c(e.at),
|
|
18015
18246
|
by: c(e.by)
|
|
@@ -18025,7 +18256,7 @@ function bf({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
18025
18256
|
}
|
|
18026
18257
|
//#endregion
|
|
18027
18258
|
//#region src/components/shared/RecordHeader.tsx
|
|
18028
|
-
function
|
|
18259
|
+
function Bf({ icon: e, avatarName: t, title: n, recordId: r, highlights: i, mode: a, dirty: o = !1, showBack: s = !1, onBack: c, right: l }) {
|
|
18029
18260
|
return /* @__PURE__ */ Q("div", {
|
|
18030
18261
|
style: {
|
|
18031
18262
|
display: "flex",
|
|
@@ -18142,7 +18373,7 @@ function xf({ icon: e, avatarName: t, title: n, recordId: r, highlights: i, mode
|
|
|
18142
18373
|
}
|
|
18143
18374
|
//#endregion
|
|
18144
18375
|
//#region src/lib/children-validation.ts
|
|
18145
|
-
function
|
|
18376
|
+
function Vf(e, t, n) {
|
|
18146
18377
|
let r = [];
|
|
18147
18378
|
for (let [i, a] of e.fields) {
|
|
18148
18379
|
if (!a.required || a.auto || n && a.primary || e.tenant_key && i === e.tenant_key || a.default !== void 0 && a.default !== null) continue;
|
|
@@ -18151,17 +18382,17 @@ function Sf(e, t, n) {
|
|
|
18151
18382
|
}
|
|
18152
18383
|
return r;
|
|
18153
18384
|
}
|
|
18154
|
-
var
|
|
18155
|
-
function
|
|
18385
|
+
var Hf = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
|
|
18386
|
+
function Uf(e, t) {
|
|
18156
18387
|
let n = [];
|
|
18157
18388
|
for (let [r, i] of e.fields) {
|
|
18158
18389
|
if (i.type !== "email") continue;
|
|
18159
18390
|
let e = t[r];
|
|
18160
|
-
typeof e == "string" && e !== "" && !
|
|
18391
|
+
typeof e == "string" && e !== "" && !Hf.test(e) && n.push(r);
|
|
18161
18392
|
}
|
|
18162
18393
|
return n;
|
|
18163
18394
|
}
|
|
18164
|
-
function
|
|
18395
|
+
function Wf(e, t) {
|
|
18165
18396
|
let n = /* @__PURE__ */ new Set();
|
|
18166
18397
|
for (let r of Object.values(t.entities)) if (r.children) {
|
|
18167
18398
|
for (let t of r.children) if (t.entity === e && t.foreign_key) {
|
|
@@ -18171,13 +18402,13 @@ function Tf(e, t) {
|
|
|
18171
18402
|
}
|
|
18172
18403
|
return n;
|
|
18173
18404
|
}
|
|
18174
|
-
function
|
|
18405
|
+
function Gf(e, t) {
|
|
18175
18406
|
if (!e || !t) return {};
|
|
18176
18407
|
let n = {};
|
|
18177
18408
|
for (let [r, i] of Object.entries(e)) {
|
|
18178
18409
|
let e = t.entities[r];
|
|
18179
18410
|
if (!e) continue;
|
|
18180
|
-
let a =
|
|
18411
|
+
let a = Wf(r, t), o = [];
|
|
18181
18412
|
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);
|
|
18182
18413
|
if (o.length !== 0) for (let e of i) {
|
|
18183
18414
|
if (e._deleted) continue;
|
|
@@ -18193,21 +18424,21 @@ function Ef(e, t) {
|
|
|
18193
18424
|
}
|
|
18194
18425
|
//#endregion
|
|
18195
18426
|
//#region src/components/pages/SmartDetailPage.tsx
|
|
18196
|
-
var
|
|
18197
|
-
function
|
|
18427
|
+
var Kf = () => {};
|
|
18428
|
+
function qf(e, t) {
|
|
18198
18429
|
return e.length === t.length ? JSON.stringify(e) === JSON.stringify(t) : !1;
|
|
18199
18430
|
}
|
|
18200
|
-
function
|
|
18431
|
+
function Jf(e, t) {
|
|
18201
18432
|
if (e) {
|
|
18202
18433
|
let n = Qe(Ne(e, t));
|
|
18203
18434
|
if (n.replace(/^\|+|\|+$/g, "")) return n;
|
|
18204
18435
|
}
|
|
18205
18436
|
return t.id == null ? crypto.randomUUID() : I(t.id);
|
|
18206
18437
|
}
|
|
18207
|
-
function
|
|
18208
|
-
return /* @__PURE__ */ Z(Ot, { children: /* @__PURE__ */ Z(
|
|
18438
|
+
function Yf({ screenCode: e }) {
|
|
18439
|
+
return /* @__PURE__ */ Z(Ot, { children: /* @__PURE__ */ Z(Xf, { screenCode: e }) });
|
|
18209
18440
|
}
|
|
18210
|
-
function
|
|
18441
|
+
function Xf({ screenCode: e }) {
|
|
18211
18442
|
let { id: t } = nn(), n = yr(), [r, i] = an(), { data: a } = oe(), o = p((e) => e.user), s = Nt(), c = a?.screens[e], u = c?.entity ? a?.entities[c.entity] : void 0, d = c?.entity, f = _e(u, "create"), m = _e(u, "update"), h = _e(u, "delete"), g = _e(u, "restore"), _ = (() => {
|
|
18212
18443
|
if (!u || !u.singleton || !u.prefilter) return;
|
|
18213
18444
|
let e = Se(u);
|
|
@@ -18335,7 +18566,7 @@ function jf({ screenCode: e }) {
|
|
|
18335
18566
|
let e = a?.entities[n];
|
|
18336
18567
|
t[n] = r.map((t) => ({
|
|
18337
18568
|
...t,
|
|
18338
|
-
_key:
|
|
18569
|
+
_key: Jf(e, t)
|
|
18339
18570
|
}));
|
|
18340
18571
|
}
|
|
18341
18572
|
se(t), ue(e);
|
|
@@ -18392,8 +18623,8 @@ function jf({ screenCode: e }) {
|
|
|
18392
18623
|
]), Ke = Ee(), qe = q(() => {
|
|
18393
18624
|
if (!u) return {};
|
|
18394
18625
|
let e = {};
|
|
18395
|
-
for (let t of
|
|
18396
|
-
for (let t of
|
|
18626
|
+
for (let t of Vf(u, F, b)) Re.has(t) && (e[t] = "Required");
|
|
18627
|
+
for (let t of Uf(u, F)) Re.has(t) && (e[t] = "Invalid email address");
|
|
18397
18628
|
return e;
|
|
18398
18629
|
}, [
|
|
18399
18630
|
u,
|
|
@@ -18434,7 +18665,7 @@ function jf({ screenCode: e }) {
|
|
|
18434
18665
|
let { _key: t, _deleted: n, _dirty: r, ...i } = e;
|
|
18435
18666
|
return i;
|
|
18436
18667
|
}), i = B?.[e] ?? [];
|
|
18437
|
-
(b || !
|
|
18668
|
+
(b || !qf(r, i)) && (t[e] = r);
|
|
18438
18669
|
}
|
|
18439
18670
|
Object.keys(t).length > 0 && (e.$children = t);
|
|
18440
18671
|
}
|
|
@@ -18501,7 +18732,7 @@ function jf({ screenCode: e }) {
|
|
|
18501
18732
|
b,
|
|
18502
18733
|
g,
|
|
18503
18734
|
O
|
|
18504
|
-
]), nt = q(() =>
|
|
18735
|
+
]), nt = q(() => Gf(ae, a), [ae, a]), rt = Object.keys(nt).length > 0;
|
|
18505
18736
|
if (!c || !u) return null;
|
|
18506
18737
|
if (!b && w) return /* @__PURE__ */ Z(Tl, {});
|
|
18507
18738
|
if (!b && !U) return /* @__PURE__ */ Q("div", {
|
|
@@ -18588,7 +18819,7 @@ function jf({ screenCode: e }) {
|
|
|
18588
18819
|
onChildrenChange: me ? $e : void 0,
|
|
18589
18820
|
childValidationErrors: me ? nt : void 0,
|
|
18590
18821
|
fieldErrors: me && fe ? qe : void 0
|
|
18591
|
-
}, ut = c.sidebar && c.sidebar.length > 0, dt = !b && U ? /* @__PURE__ */ Z(
|
|
18822
|
+
}, ut = c.sidebar && c.sidebar.length > 0, dt = !b && U ? /* @__PURE__ */ Z(Ff, {
|
|
18592
18823
|
screen: c,
|
|
18593
18824
|
entity: u,
|
|
18594
18825
|
entityCode: d,
|
|
@@ -18597,7 +18828,7 @@ function jf({ screenCode: e }) {
|
|
|
18597
18828
|
objectStatuses: j,
|
|
18598
18829
|
schema: a,
|
|
18599
18830
|
locale: Ke
|
|
18600
|
-
}) : void 0, ft = /* @__PURE__ */ Z(
|
|
18831
|
+
}) : void 0, ft = /* @__PURE__ */ Z(Zf, {
|
|
18601
18832
|
title: st,
|
|
18602
18833
|
recordId: y,
|
|
18603
18834
|
editing: me,
|
|
@@ -18651,7 +18882,7 @@ function jf({ screenCode: e }) {
|
|
|
18651
18882
|
fontSize: 12.5
|
|
18652
18883
|
},
|
|
18653
18884
|
children: [/* @__PURE__ */ Z(M.warning, { size: 14 }), /* @__PURE__ */ Z("span", { children: "This record changed on the server while you were viewing or editing it." })]
|
|
18654
|
-
}), ht = me && fe && Je && /* @__PURE__ */ Z(
|
|
18885
|
+
}), ht = me && fe && Je && /* @__PURE__ */ Z(Nf, {
|
|
18655
18886
|
errors: Object.entries(qe).map(([e, t]) => {
|
|
18656
18887
|
let n = u.fields.get(e);
|
|
18657
18888
|
return {
|
|
@@ -18675,12 +18906,12 @@ function jf({ screenCode: e }) {
|
|
|
18675
18906
|
onSetStatus: m && me ? (e, t) => R((n) => ({
|
|
18676
18907
|
...n,
|
|
18677
18908
|
[e]: t
|
|
18678
|
-
})) :
|
|
18909
|
+
})) : Kf,
|
|
18679
18910
|
isPending: !1,
|
|
18680
18911
|
mode: me ? "edit" : "display"
|
|
18681
18912
|
})
|
|
18682
18913
|
}), _t = /* @__PURE__ */ Q(X, { children: [
|
|
18683
|
-
c.items && c.items.length > 0 && (U || b) && a && /* @__PURE__ */ Z(
|
|
18914
|
+
c.items && c.items.length > 0 && (U || b) && a && /* @__PURE__ */ Z(jf, {
|
|
18684
18915
|
nodes: c.items,
|
|
18685
18916
|
ctx: lt
|
|
18686
18917
|
}),
|
|
@@ -18690,7 +18921,7 @@ function jf({ screenCode: e }) {
|
|
|
18690
18921
|
associations: u.associations,
|
|
18691
18922
|
schema: a
|
|
18692
18923
|
}),
|
|
18693
|
-
!b && U && a && /* @__PURE__ */ Z(
|
|
18924
|
+
!b && U && a && /* @__PURE__ */ Z(zf, {
|
|
18694
18925
|
screen: c,
|
|
18695
18926
|
entity: u,
|
|
18696
18927
|
entityCode: d,
|
|
@@ -18770,7 +19001,7 @@ function jf({ screenCode: e }) {
|
|
|
18770
19001
|
height: "100%",
|
|
18771
19002
|
width: `${ve}px`
|
|
18772
19003
|
},
|
|
18773
|
-
children: (U || b) && a && /* @__PURE__ */ Z(
|
|
19004
|
+
children: (U || b) && a && /* @__PURE__ */ Z(jf, {
|
|
18774
19005
|
nodes: c.sidebar,
|
|
18775
19006
|
ctx: lt
|
|
18776
19007
|
})
|
|
@@ -18804,7 +19035,7 @@ function jf({ screenCode: e }) {
|
|
|
18804
19035
|
]
|
|
18805
19036
|
});
|
|
18806
19037
|
}
|
|
18807
|
-
function
|
|
19038
|
+
function Zf({ title: e, recordId: n, editing: r, isNew: i, isSingletonByCaller: a, isRecordDeleted: o, dirty: s, isSaving: c, hasChildErrors: l, hasFieldErrors: u, canRestore: d, entity: f, screen: p, globalActions: m, entityCode: h, record: g, id: _, listRoute: y, listRouteExists: b, highlights: x, onBack: S, onCancelEdit: C, onSave: w, onRestore: T, isRestoring: E }) {
|
|
18808
19039
|
let { run: D } = go(), O = Mr(), k = yr(), A = Ee(), ee = p?.action_layout ?? null, te = f?.action_layout ?? null, N = ee ?? te, P = Hs(N ? Xs(N, f?.actions, m, "detail") : $s(f?.actions, "detail"), f?.actions, m, g ?? {}, []), F = q(() => {
|
|
18809
19040
|
if (!f) return;
|
|
18810
19041
|
let e = _ ? [_] : [];
|
|
@@ -18869,7 +19100,7 @@ function Mf({ title: e, recordId: n, editing: r, isNew: i, isSingletonByCaller:
|
|
|
18869
19100
|
reservedRightWidth: 0,
|
|
18870
19101
|
widgetContext: F
|
|
18871
19102
|
}) : null;
|
|
18872
|
-
return /* @__PURE__ */ Z(
|
|
19103
|
+
return /* @__PURE__ */ Z(Bf, {
|
|
18873
19104
|
icon: f?.display.icon ? /* @__PURE__ */ Z(ie, {
|
|
18874
19105
|
name: f.display.icon,
|
|
18875
19106
|
size: 16
|
|
@@ -18886,7 +19117,7 @@ function Mf({ title: e, recordId: n, editing: r, isNew: i, isSingletonByCaller:
|
|
|
18886
19117
|
}
|
|
18887
19118
|
//#endregion
|
|
18888
19119
|
//#region src/api/status.ts
|
|
18889
|
-
async function
|
|
19120
|
+
async function Qf(e, t, n, r, i) {
|
|
18890
19121
|
let a = {
|
|
18891
19122
|
status_group_code: n,
|
|
18892
19123
|
status_code: r
|
|
@@ -18901,10 +19132,10 @@ async function Nf(e, t, n, r, i) {
|
|
|
18901
19132
|
}
|
|
18902
19133
|
//#endregion
|
|
18903
19134
|
//#region src/hooks/useObjectStatus.ts
|
|
18904
|
-
function
|
|
19135
|
+
function $f(e, t) {
|
|
18905
19136
|
let n = dn();
|
|
18906
19137
|
return ln({
|
|
18907
|
-
mutationFn: ({ groupCode: n, statusCode: r, note: i }) =>
|
|
19138
|
+
mutationFn: ({ groupCode: n, statusCode: r, note: i }) => Qf(e, t, n, r, i),
|
|
18908
19139
|
onSuccess: () => {
|
|
18909
19140
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18910
19141
|
},
|
|
@@ -18915,7 +19146,7 @@ function Pf(e, t) {
|
|
|
18915
19146
|
}
|
|
18916
19147
|
//#endregion
|
|
18917
19148
|
//#region src/api/properties.ts
|
|
18918
|
-
async function
|
|
19149
|
+
async function ep(e, t, n, r) {
|
|
18919
19150
|
let i = (await j(`${e}.__update`, {
|
|
18920
19151
|
object_ids: [t],
|
|
18921
19152
|
entity: e,
|
|
@@ -18926,7 +19157,7 @@ async function Ff(e, t, n, r) {
|
|
|
18926
19157
|
})).result?.rows?.[0]?.$properties ?? [];
|
|
18927
19158
|
return i.find((e) => e.property_code === n) ?? i[0];
|
|
18928
19159
|
}
|
|
18929
|
-
async function
|
|
19160
|
+
async function tp(e, t, n) {
|
|
18930
19161
|
await j(`${e}.__update`, {
|
|
18931
19162
|
object_ids: [t],
|
|
18932
19163
|
entity: e,
|
|
@@ -18938,10 +19169,10 @@ async function If(e, t, n) {
|
|
|
18938
19169
|
}
|
|
18939
19170
|
//#endregion
|
|
18940
19171
|
//#region src/hooks/useProperties.ts
|
|
18941
|
-
function
|
|
19172
|
+
function np(e, t) {
|
|
18942
19173
|
let n = dn();
|
|
18943
19174
|
return ln({
|
|
18944
|
-
mutationFn: ({ propertyCode: n, value: r }) =>
|
|
19175
|
+
mutationFn: ({ propertyCode: n, value: r }) => ep(e, t, n, r),
|
|
18945
19176
|
onSuccess: () => {
|
|
18946
19177
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18947
19178
|
},
|
|
@@ -18950,10 +19181,10 @@ function Lf(e, t) {
|
|
|
18950
19181
|
}
|
|
18951
19182
|
});
|
|
18952
19183
|
}
|
|
18953
|
-
function
|
|
19184
|
+
function rp(e, t) {
|
|
18954
19185
|
let n = dn();
|
|
18955
19186
|
return ln({
|
|
18956
|
-
mutationFn: (n) =>
|
|
19187
|
+
mutationFn: (n) => tp(e, t, n),
|
|
18957
19188
|
onSuccess: () => {
|
|
18958
19189
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
18959
19190
|
},
|
|
@@ -18964,7 +19195,7 @@ function Rf(e, t) {
|
|
|
18964
19195
|
}
|
|
18965
19196
|
//#endregion
|
|
18966
19197
|
//#region src/components/pages/SmartRecordListPage.tsx
|
|
18967
|
-
function
|
|
19198
|
+
function ip({ screenCode: e }) {
|
|
18968
19199
|
let [t, r] = an(), { data: i } = oe(), a = i?.screens[e], o = a?.entity ? i?.entities[a.entity] : void 0, s = a?.entity, { openTab: c } = Bn();
|
|
18969
19200
|
K(() => {
|
|
18970
19201
|
if (a?.route && o) {
|
|
@@ -19147,7 +19378,7 @@ function zf({ screenCode: e }) {
|
|
|
19147
19378
|
color: "var(--text-3)"
|
|
19148
19379
|
},
|
|
19149
19380
|
children: "No records found"
|
|
19150
|
-
}) : g.map((e) => /* @__PURE__ */ Z(
|
|
19381
|
+
}) : g.map((e) => /* @__PURE__ */ Z(ap, {
|
|
19151
19382
|
record: e,
|
|
19152
19383
|
entity: o,
|
|
19153
19384
|
columns: j,
|
|
@@ -19176,7 +19407,7 @@ function zf({ screenCode: e }) {
|
|
|
19176
19407
|
minWidth: 0,
|
|
19177
19408
|
overflow: "hidden"
|
|
19178
19409
|
},
|
|
19179
|
-
children: l ? /* @__PURE__ */ Z(
|
|
19410
|
+
children: l ? /* @__PURE__ */ Z(op, {
|
|
19180
19411
|
entityCode: s,
|
|
19181
19412
|
recordId: l,
|
|
19182
19413
|
items: a.items,
|
|
@@ -19203,7 +19434,7 @@ function zf({ screenCode: e }) {
|
|
|
19203
19434
|
]
|
|
19204
19435
|
});
|
|
19205
19436
|
}
|
|
19206
|
-
function
|
|
19437
|
+
function ap({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick: a }) {
|
|
19207
19438
|
let o = Ee(), s = n[0], c = n[1], l = n.slice(2, 4);
|
|
19208
19439
|
return /* @__PURE__ */ Q("button", {
|
|
19209
19440
|
onClick: a,
|
|
@@ -19290,8 +19521,8 @@ function Bf({ record: e, entity: t, columns: n, refs: r, isSelected: i, onClick:
|
|
|
19290
19521
|
})]
|
|
19291
19522
|
});
|
|
19292
19523
|
}
|
|
19293
|
-
function
|
|
19294
|
-
return /* @__PURE__ */ Z(Ot, { children: /* @__PURE__ */ Z(
|
|
19524
|
+
function op({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
19525
|
+
return /* @__PURE__ */ Z(Ot, { children: /* @__PURE__ */ Z(sp, {
|
|
19295
19526
|
entityCode: e,
|
|
19296
19527
|
recordId: t,
|
|
19297
19528
|
items: n,
|
|
@@ -19299,8 +19530,8 @@ function Vf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
19299
19530
|
entity: i
|
|
19300
19531
|
}) });
|
|
19301
19532
|
}
|
|
19302
|
-
function
|
|
19303
|
-
let a = _e(i, "update"), { data: o, isLoading: s } = Gu(e, t), c = ks(e), l = Nt(), [u, d] = Y(!1), [f, p] = Y({}), m = o?.data, h = m?.$statuses, g = m?.$properties, _ =
|
|
19533
|
+
function sp({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
19534
|
+
let a = _e(i, "update"), { data: o, isLoading: s } = Gu(e, t), c = ks(e), l = Nt(), [u, d] = Y(!1), [f, p] = Y({}), m = o?.data, h = m?.$statuses, g = m?.$properties, _ = $f(e, t), y = np(e, t), b = q(() => {
|
|
19304
19535
|
let e = /* @__PURE__ */ new Set();
|
|
19305
19536
|
for (let [t, n] of i.fields) !n.auto && !n.primary && e.add(t);
|
|
19306
19537
|
for (let [t] of i.files ?? []) e.add(t);
|
|
@@ -19445,7 +19676,7 @@ function Hf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
19445
19676
|
flexDirection: "column",
|
|
19446
19677
|
gap: 12
|
|
19447
19678
|
},
|
|
19448
|
-
children: n && n.length > 0 ? /* @__PURE__ */ Z(
|
|
19679
|
+
children: n && n.length > 0 ? /* @__PURE__ */ Z(jf, {
|
|
19449
19680
|
nodes: n,
|
|
19450
19681
|
ctx: A
|
|
19451
19682
|
}) : /* @__PURE__ */ Q("p", {
|
|
@@ -19463,76 +19694,8 @@ function Hf({ entityCode: e, recordId: t, items: n, schema: r, entity: i }) {
|
|
|
19463
19694
|
});
|
|
19464
19695
|
}
|
|
19465
19696
|
//#endregion
|
|
19466
|
-
//#region src/components/shared/ErrorBoundary.tsx
|
|
19467
|
-
var Uf = class extends Lt {
|
|
19468
|
-
constructor(e) {
|
|
19469
|
-
super(e), this.state = {
|
|
19470
|
-
hasError: !1,
|
|
19471
|
-
error: null
|
|
19472
|
-
};
|
|
19473
|
-
}
|
|
19474
|
-
static getDerivedStateFromError(e) {
|
|
19475
|
-
return {
|
|
19476
|
-
hasError: !0,
|
|
19477
|
-
error: e
|
|
19478
|
-
};
|
|
19479
|
-
}
|
|
19480
|
-
componentDidCatch(e, t) {
|
|
19481
|
-
console.error("[ErrorBoundary]", e, t.componentStack);
|
|
19482
|
-
}
|
|
19483
|
-
handleRetry = () => {
|
|
19484
|
-
this.setState({
|
|
19485
|
-
hasError: !1,
|
|
19486
|
-
error: null
|
|
19487
|
-
});
|
|
19488
|
-
};
|
|
19489
|
-
render() {
|
|
19490
|
-
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ Z("div", {
|
|
19491
|
-
style: {
|
|
19492
|
-
display: "flex",
|
|
19493
|
-
alignItems: "center",
|
|
19494
|
-
justifyContent: "center",
|
|
19495
|
-
minHeight: 200,
|
|
19496
|
-
padding: 32
|
|
19497
|
-
},
|
|
19498
|
-
children: /* @__PURE__ */ Q("div", {
|
|
19499
|
-
style: {
|
|
19500
|
-
textAlign: "center",
|
|
19501
|
-
maxWidth: 420,
|
|
19502
|
-
display: "flex",
|
|
19503
|
-
flexDirection: "column",
|
|
19504
|
-
gap: 10
|
|
19505
|
-
},
|
|
19506
|
-
children: [
|
|
19507
|
-
/* @__PURE__ */ Z("h2", {
|
|
19508
|
-
style: {
|
|
19509
|
-
fontSize: 16,
|
|
19510
|
-
fontWeight: 600,
|
|
19511
|
-
margin: 0,
|
|
19512
|
-
color: "var(--text)"
|
|
19513
|
-
},
|
|
19514
|
-
children: "Something went wrong"
|
|
19515
|
-
}),
|
|
19516
|
-
/* @__PURE__ */ Z("p", {
|
|
19517
|
-
style: {
|
|
19518
|
-
fontSize: 12.5,
|
|
19519
|
-
color: "var(--text-3)",
|
|
19520
|
-
margin: 0
|
|
19521
|
-
},
|
|
19522
|
-
children: this.state.error?.message || "An unexpected error occurred."
|
|
19523
|
-
}),
|
|
19524
|
-
/* @__PURE__ */ Z("div", { children: /* @__PURE__ */ Z(V, {
|
|
19525
|
-
onClick: this.handleRetry,
|
|
19526
|
-
children: "Try again"
|
|
19527
|
-
}) })
|
|
19528
|
-
]
|
|
19529
|
-
})
|
|
19530
|
-
}) : this.props.children;
|
|
19531
|
-
}
|
|
19532
|
-
};
|
|
19533
|
-
//#endregion
|
|
19534
19697
|
//#region src/hooks/useVersionWatcher.ts
|
|
19535
|
-
function
|
|
19698
|
+
function cp() {
|
|
19536
19699
|
let e = dn();
|
|
19537
19700
|
K(() => {
|
|
19538
19701
|
let t = !1, n = null, r = 6e4, i = r, a = 0, o = 0;
|
|
@@ -19587,39 +19750,39 @@ function Wf() {
|
|
|
19587
19750
|
}
|
|
19588
19751
|
//#endregion
|
|
19589
19752
|
//#region src/lib/capabilityPrefetch.ts
|
|
19590
|
-
var
|
|
19753
|
+
var lp = [
|
|
19591
19754
|
() => import("./MarkdownRenderer-Dbl3AFDQ.js"),
|
|
19592
19755
|
() => import("./JsonEditor-KelPV-OQ.js"),
|
|
19593
19756
|
() => import("./Grid-Cwxca9aO.js"),
|
|
19594
19757
|
() => import("./DraggableChildrenTable-CdzxxoTe.js")
|
|
19595
19758
|
];
|
|
19596
|
-
function
|
|
19597
|
-
for (let e of
|
|
19759
|
+
function up() {
|
|
19760
|
+
for (let e of lp) e().catch(() => {});
|
|
19598
19761
|
}
|
|
19599
|
-
var
|
|
19600
|
-
function
|
|
19601
|
-
if (
|
|
19602
|
-
|
|
19762
|
+
var dp = !1;
|
|
19763
|
+
function fp() {
|
|
19764
|
+
if (dp) return;
|
|
19765
|
+
dp = !0;
|
|
19603
19766
|
let e = globalThis.requestIdleCallback;
|
|
19604
|
-
typeof e == "function" ? e(
|
|
19767
|
+
typeof e == "function" ? e(up) : setTimeout(up, 0);
|
|
19605
19768
|
}
|
|
19606
19769
|
//#endregion
|
|
19607
19770
|
//#region src/stores/screen-registry.ts
|
|
19608
|
-
var
|
|
19609
|
-
function
|
|
19610
|
-
|
|
19771
|
+
var pp = /* @__PURE__ */ new Map();
|
|
19772
|
+
function mp(e, t) {
|
|
19773
|
+
pp.set(e, t);
|
|
19611
19774
|
}
|
|
19612
|
-
function
|
|
19613
|
-
return
|
|
19775
|
+
function hp(e) {
|
|
19776
|
+
return pp.get(e);
|
|
19614
19777
|
}
|
|
19615
19778
|
//#endregion
|
|
19616
19779
|
//#region src/app.tsx
|
|
19617
|
-
|
|
19618
|
-
var
|
|
19780
|
+
mp("Profile", Wc);
|
|
19781
|
+
var gp = "declarion-managed-favicon", _p = new on({ defaultOptions: { queries: {
|
|
19619
19782
|
staleTime: 300 * 1e3,
|
|
19620
19783
|
retry: 1
|
|
19621
19784
|
} } });
|
|
19622
|
-
function
|
|
19785
|
+
function vp(e) {
|
|
19623
19786
|
if (typeof window > "u") return null;
|
|
19624
19787
|
try {
|
|
19625
19788
|
let t = new URL(e, window.location.origin);
|
|
@@ -19628,7 +19791,7 @@ function ep(e) {
|
|
|
19628
19791
|
return null;
|
|
19629
19792
|
}
|
|
19630
19793
|
}
|
|
19631
|
-
function
|
|
19794
|
+
function yp() {
|
|
19632
19795
|
let { data: e } = oe();
|
|
19633
19796
|
return {
|
|
19634
19797
|
routes: q(() => {
|
|
@@ -19640,29 +19803,29 @@ function tp() {
|
|
|
19640
19803
|
if ((i ? e.entities?.[i] : void 0)?.singleton) continue;
|
|
19641
19804
|
t.push(/* @__PURE__ */ Z(Yt, {
|
|
19642
19805
|
path: r.route,
|
|
19643
|
-
element: /* @__PURE__ */ Z(
|
|
19806
|
+
element: /* @__PURE__ */ Z(yf, { children: /* @__PURE__ */ Z(Uu, { screenCode: n }) })
|
|
19644
19807
|
}, n));
|
|
19645
19808
|
continue;
|
|
19646
19809
|
}
|
|
19647
19810
|
if (r.type === "detail") {
|
|
19648
19811
|
t.push(/* @__PURE__ */ Z(Yt, {
|
|
19649
19812
|
path: r.route,
|
|
19650
|
-
element: /* @__PURE__ */ Z(
|
|
19813
|
+
element: /* @__PURE__ */ Z(yf, { children: /* @__PURE__ */ Z(Yf, { screenCode: n }) })
|
|
19651
19814
|
}, n));
|
|
19652
19815
|
continue;
|
|
19653
19816
|
}
|
|
19654
19817
|
if (r.type === "record_list") {
|
|
19655
19818
|
t.push(/* @__PURE__ */ Z(Yt, {
|
|
19656
19819
|
path: r.route,
|
|
19657
|
-
element: /* @__PURE__ */ Z(
|
|
19820
|
+
element: /* @__PURE__ */ Z(yf, { children: /* @__PURE__ */ Z(ip, { screenCode: n }) })
|
|
19658
19821
|
}, n));
|
|
19659
19822
|
continue;
|
|
19660
19823
|
}
|
|
19661
19824
|
if (r.type === "custom") {
|
|
19662
|
-
let e = r.component ?
|
|
19825
|
+
let e = r.component ? hp(r.component) : void 0;
|
|
19663
19826
|
e && t.push(/* @__PURE__ */ Z(Yt, {
|
|
19664
19827
|
path: r.route,
|
|
19665
|
-
element: /* @__PURE__ */ Z(
|
|
19828
|
+
element: /* @__PURE__ */ Z(yf, { children: /* @__PURE__ */ Z(e, {}) })
|
|
19666
19829
|
}, n));
|
|
19667
19830
|
}
|
|
19668
19831
|
}
|
|
@@ -19671,8 +19834,8 @@ function tp() {
|
|
|
19671
19834
|
defaultRoute: q(() => qo(e), [e])
|
|
19672
19835
|
};
|
|
19673
19836
|
}
|
|
19674
|
-
function
|
|
19675
|
-
let e = p((e) => e.initialize), t = p((e) => e.isLoading), n = p((e) => e.isAuthenticated), { data: r, isLoading: i } = oe(), { data: a, isLoading: o } = gi(), { routes: s, defaultRoute: c } =
|
|
19837
|
+
function bp() {
|
|
19838
|
+
let e = p((e) => e.initialize), t = p((e) => e.isLoading), n = p((e) => e.isAuthenticated), { data: r, isLoading: i } = oe(), { data: a, isLoading: o } = gi(), { routes: s, defaultRoute: c } = yp(), l = rr(), u = typeof window < "u" && window.self !== window.top && !l.enabled;
|
|
19676
19839
|
K(() => {
|
|
19677
19840
|
l.enabled || u || e();
|
|
19678
19841
|
}, [
|
|
@@ -19680,7 +19843,7 @@ function np() {
|
|
|
19680
19843
|
u,
|
|
19681
19844
|
e
|
|
19682
19845
|
]), K(() => {
|
|
19683
|
-
|
|
19846
|
+
fp();
|
|
19684
19847
|
}, []);
|
|
19685
19848
|
let d = a?.branding;
|
|
19686
19849
|
K(() => {
|
|
@@ -19689,7 +19852,7 @@ function np() {
|
|
|
19689
19852
|
e && (document.title = e);
|
|
19690
19853
|
}, [d?.app_name]), K(() => {
|
|
19691
19854
|
if (typeof document > "u") return;
|
|
19692
|
-
let e = d?.app_logo, t = Sn(e) ?
|
|
19855
|
+
let e = d?.app_logo, t = Sn(e) ? vp(e.trim()) : null, n = document.getElementById(gp);
|
|
19693
19856
|
if (!t) {
|
|
19694
19857
|
n && n.remove();
|
|
19695
19858
|
return;
|
|
@@ -19697,7 +19860,7 @@ function np() {
|
|
|
19697
19860
|
if (!n) {
|
|
19698
19861
|
document.querySelectorAll("link[rel=\"icon\"], link[rel=\"shortcut icon\"]").forEach((e) => e.remove());
|
|
19699
19862
|
let e = document.createElement("link");
|
|
19700
|
-
e.id =
|
|
19863
|
+
e.id = gp, e.rel = "icon", e.href = t, document.head.appendChild(e);
|
|
19701
19864
|
return;
|
|
19702
19865
|
}
|
|
19703
19866
|
n.href !== t && (n.href = t);
|
|
@@ -19710,7 +19873,7 @@ function np() {
|
|
|
19710
19873
|
t && t.remove();
|
|
19711
19874
|
return;
|
|
19712
19875
|
}
|
|
19713
|
-
let n =
|
|
19876
|
+
let n = vp(f);
|
|
19714
19877
|
if (!n) {
|
|
19715
19878
|
t && t.remove(), console.error(`[declarion] branding.css_url rejected: ${f}. Only same-origin, relative URLs are allowed (e.g. /crm-brand.css).`);
|
|
19716
19879
|
return;
|
|
@@ -19785,12 +19948,12 @@ function np() {
|
|
|
19785
19948
|
})
|
|
19786
19949
|
] });
|
|
19787
19950
|
}
|
|
19788
|
-
function
|
|
19789
|
-
|
|
19951
|
+
function xp() {
|
|
19952
|
+
cp();
|
|
19790
19953
|
let e = R((e) => e.toastPosition);
|
|
19791
19954
|
return /* @__PURE__ */ Q(Gt, { children: [
|
|
19792
19955
|
/* @__PURE__ */ Z(ur, {}),
|
|
19793
|
-
/* @__PURE__ */ Z(
|
|
19956
|
+
/* @__PURE__ */ Z(bp, {}),
|
|
19794
19957
|
/* @__PURE__ */ Z(fn, {
|
|
19795
19958
|
position: e,
|
|
19796
19959
|
toastOptions: { unstyled: !0 },
|
|
@@ -19801,25 +19964,25 @@ function rp() {
|
|
|
19801
19964
|
})
|
|
19802
19965
|
] });
|
|
19803
19966
|
}
|
|
19804
|
-
function
|
|
19805
|
-
return /* @__PURE__ */ Z(
|
|
19806
|
-
client:
|
|
19807
|
-
children: /* @__PURE__ */ Z(nr, { children: /* @__PURE__ */ Z(
|
|
19967
|
+
function Sp() {
|
|
19968
|
+
return /* @__PURE__ */ Z(yf, { children: /* @__PURE__ */ Z(sn, {
|
|
19969
|
+
client: _p,
|
|
19970
|
+
children: /* @__PURE__ */ Z(nr, { children: /* @__PURE__ */ Z(xp, {}) })
|
|
19808
19971
|
}) });
|
|
19809
19972
|
}
|
|
19810
19973
|
//#endregion
|
|
19811
19974
|
//#region src/api/entities.ts
|
|
19812
|
-
function
|
|
19975
|
+
function Cp(e, t) {
|
|
19813
19976
|
return e.$statuses?.find((e) => e.group_code === t);
|
|
19814
19977
|
}
|
|
19815
|
-
function
|
|
19978
|
+
function wp(e, t) {
|
|
19816
19979
|
return e.$properties?.find((e) => e.property_code === t);
|
|
19817
19980
|
}
|
|
19818
|
-
function
|
|
19981
|
+
function Tp(e) {
|
|
19819
19982
|
let t = { ...e };
|
|
19820
|
-
return t.$status = (e) =>
|
|
19983
|
+
return t.$status = (e) => Cp(t, e), t.$property = (e) => wp(t, e), t;
|
|
19821
19984
|
}
|
|
19822
|
-
var
|
|
19985
|
+
var Ep = class {
|
|
19823
19986
|
cache = {};
|
|
19824
19987
|
merge(e) {
|
|
19825
19988
|
if (e) for (let t of Object.keys(e)) {
|
|
@@ -19841,32 +20004,32 @@ var cp = class {
|
|
|
19841
20004
|
this.cache = {};
|
|
19842
20005
|
}
|
|
19843
20006
|
};
|
|
19844
|
-
function
|
|
20007
|
+
function Dp(e, t) {
|
|
19845
20008
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
19846
20009
|
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;
|
|
19847
20010
|
}
|
|
19848
|
-
var
|
|
20011
|
+
var Op = class {
|
|
19849
20012
|
entity;
|
|
19850
20013
|
refs;
|
|
19851
20014
|
constructor(e, t) {
|
|
19852
|
-
this.entity = e, this.refs = t ?? new
|
|
20015
|
+
this.entity = e, this.refs = t ?? new Ep();
|
|
19853
20016
|
}
|
|
19854
20017
|
async get(e) {
|
|
19855
20018
|
let t = new URLSearchParams({ id: e });
|
|
19856
|
-
return
|
|
20019
|
+
return Tp((await lt(`/api/data/${this.entity}?${t.toString()}`)).data);
|
|
19857
20020
|
}
|
|
19858
20021
|
async list(e = {}) {
|
|
19859
20022
|
let t;
|
|
19860
20023
|
try {
|
|
19861
|
-
t = await lt(
|
|
20024
|
+
t = await lt(Dp(this.entity, e));
|
|
19862
20025
|
} catch (n) {
|
|
19863
20026
|
if (e.after && Mt(n)) {
|
|
19864
20027
|
let { after: n, ...r } = e;
|
|
19865
|
-
t = await lt(
|
|
20028
|
+
t = await lt(Dp(this.entity, r));
|
|
19866
20029
|
} else throw n;
|
|
19867
20030
|
}
|
|
19868
20031
|
return this.refs.merge(t.$refs), {
|
|
19869
|
-
data: t.data.map((e) =>
|
|
20032
|
+
data: t.data.map((e) => Tp(e)),
|
|
19870
20033
|
meta: t.meta,
|
|
19871
20034
|
$refs: this.refs.all()
|
|
19872
20035
|
};
|
|
@@ -19886,7 +20049,7 @@ var up = class {
|
|
|
19886
20049
|
})),
|
|
19887
20050
|
atomic: !0
|
|
19888
20051
|
});
|
|
19889
|
-
return
|
|
20052
|
+
return kp(t, `${this.entity}.__create`), t.results.map((e) => Tp(Ap(e)));
|
|
19890
20053
|
}
|
|
19891
20054
|
async update(e, t) {
|
|
19892
20055
|
return (await this.updateMany([{
|
|
@@ -19907,7 +20070,7 @@ var up = class {
|
|
|
19907
20070
|
})),
|
|
19908
20071
|
atomic: !0
|
|
19909
20072
|
});
|
|
19910
|
-
return
|
|
20073
|
+
return kp(t, `${this.entity}.__update`), t.results.map((e) => Tp(Ap(e)));
|
|
19911
20074
|
}
|
|
19912
20075
|
async delete(e) {
|
|
19913
20076
|
await this.deleteMany([e]);
|
|
@@ -19943,33 +20106,33 @@ var up = class {
|
|
|
19943
20106
|
})),
|
|
19944
20107
|
atomic: !0
|
|
19945
20108
|
});
|
|
19946
|
-
return
|
|
20109
|
+
return kp(n, `${this.entity}.__upsert`), n.results.map((e) => Tp(jp(e)));
|
|
19947
20110
|
}
|
|
19948
20111
|
};
|
|
19949
|
-
function
|
|
20112
|
+
function kp(e, t) {
|
|
19950
20113
|
if (e.committed) return;
|
|
19951
20114
|
let n = e.results.find((e) => !e.ok), r = n ? `${n.error_code ?? "ERROR"}: ${n.error ?? "unknown"}` : "batch did not commit";
|
|
19952
20115
|
throw Error(`${t} batch failed: ${r}`);
|
|
19953
20116
|
}
|
|
19954
|
-
function
|
|
20117
|
+
function Ap(e) {
|
|
19955
20118
|
let t = e.result ?? {};
|
|
19956
20119
|
return (Array.isArray(t.rows) ? t.rows[0] : void 0) ?? {};
|
|
19957
20120
|
}
|
|
19958
|
-
function
|
|
20121
|
+
function jp(e) {
|
|
19959
20122
|
let t = e.result ?? {};
|
|
19960
20123
|
return (Array.isArray(t.rows) ? t.rows[0] : void 0)?.row ?? {};
|
|
19961
20124
|
}
|
|
19962
|
-
function
|
|
19963
|
-
return new
|
|
20125
|
+
function Mp(e, t) {
|
|
20126
|
+
return new Op(e, t);
|
|
19964
20127
|
}
|
|
19965
20128
|
//#endregion
|
|
19966
20129
|
//#region src/api/batch.ts
|
|
19967
|
-
var
|
|
20130
|
+
var Np = class {
|
|
19968
20131
|
ops = [];
|
|
19969
20132
|
call(e, t) {
|
|
19970
20133
|
return this.ops.push({
|
|
19971
20134
|
action: e,
|
|
19972
|
-
params:
|
|
20135
|
+
params: Pp(t)
|
|
19973
20136
|
}), this;
|
|
19974
20137
|
}
|
|
19975
20138
|
upsert(e, t, n = "upsert", r = []) {
|
|
@@ -19991,13 +20154,13 @@ var hp = class {
|
|
|
19991
20154
|
return this.ops;
|
|
19992
20155
|
}
|
|
19993
20156
|
};
|
|
19994
|
-
function
|
|
20157
|
+
function Pp(e) {
|
|
19995
20158
|
return e == null ? null : typeof e == "object" && !Array.isArray(e) ? e : { value: e };
|
|
19996
20159
|
}
|
|
19997
20160
|
//#endregion
|
|
19998
20161
|
//#region src/hooks/useAllEntityData.ts
|
|
19999
|
-
var
|
|
20000
|
-
function
|
|
20162
|
+
var Fp = 1e3, Ip = 20;
|
|
20163
|
+
function Lp(e, t = {}) {
|
|
20001
20164
|
return un({
|
|
20002
20165
|
queryKey: [
|
|
20003
20166
|
"entity-data-all",
|
|
@@ -20008,18 +20171,18 @@ function yp(e, t = {}) {
|
|
|
20008
20171
|
queryFn: async ({ signal: n }) => {
|
|
20009
20172
|
let r = {
|
|
20010
20173
|
...t,
|
|
20011
|
-
per_page:
|
|
20174
|
+
per_page: Fp,
|
|
20012
20175
|
count: "with"
|
|
20013
20176
|
}, i = await C(e, {
|
|
20014
20177
|
...r,
|
|
20015
20178
|
page: 1
|
|
20016
20179
|
}, { signal: n }), a = i.meta.total_pages ?? 1;
|
|
20017
20180
|
if (a <= 1) return i;
|
|
20018
|
-
if (a >
|
|
20181
|
+
if (a > Ip) throw Error(`useAllEntityData: entity "${e}" spans ${a} pages (limit ${Ip}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
|
|
20019
20182
|
let o = await Promise.all(Array.from({ length: a - 1 }, (t, i) => C(e, {
|
|
20020
20183
|
...r,
|
|
20021
20184
|
page: i + 2
|
|
20022
|
-
}, { signal: n }))), s = new
|
|
20185
|
+
}, { signal: n }))), s = new Ep();
|
|
20023
20186
|
s.merge(i.$refs);
|
|
20024
20187
|
let c = [...i.data];
|
|
20025
20188
|
for (let e of o) c.push(...e.data), s.merge(e.$refs);
|
|
@@ -20038,7 +20201,7 @@ function yp(e, t = {}) {
|
|
|
20038
20201
|
}
|
|
20039
20202
|
//#endregion
|
|
20040
20203
|
//#region src/hooks/useColumns.ts
|
|
20041
|
-
function
|
|
20204
|
+
function Rp(e, t) {
|
|
20042
20205
|
let [n, r] = an(), i = q(() => {
|
|
20043
20206
|
let r = n.get("columns");
|
|
20044
20207
|
return r ? r.split(",").filter(Boolean).filter((t) => e.includes(t)) : t.length > 0 ? t : e;
|
|
@@ -20048,7 +20211,7 @@ function bp(e, t) {
|
|
|
20048
20211
|
t
|
|
20049
20212
|
]), a = G((e) => {
|
|
20050
20213
|
let i = new URLSearchParams(n);
|
|
20051
|
-
e.length === 0 ||
|
|
20214
|
+
e.length === 0 || zp(e, t) ? i.delete("columns") : i.set("columns", e.join(",")), r(i);
|
|
20052
20215
|
}, [
|
|
20053
20216
|
n,
|
|
20054
20217
|
r,
|
|
@@ -20074,12 +20237,12 @@ function bp(e, t) {
|
|
|
20074
20237
|
}, [i, a])
|
|
20075
20238
|
};
|
|
20076
20239
|
}
|
|
20077
|
-
function
|
|
20240
|
+
function zp(e, t) {
|
|
20078
20241
|
return e.length === t.length ? e.every((e, n) => e === t[n]) : !1;
|
|
20079
20242
|
}
|
|
20080
20243
|
//#endregion
|
|
20081
20244
|
//#region src/components/shared/PageHeader.tsx
|
|
20082
|
-
function
|
|
20245
|
+
function Bp({ title: e, backTo: t, actions: n }) {
|
|
20083
20246
|
let r = yr(), { switchTab: i, findTabByPathname: a } = Bn();
|
|
20084
20247
|
function o() {
|
|
20085
20248
|
if (!t) return;
|
|
@@ -20130,7 +20293,7 @@ function Sp({ title: e, backTo: t, actions: n }) {
|
|
|
20130
20293
|
}
|
|
20131
20294
|
//#endregion
|
|
20132
20295
|
//#region src/components/list/RowMenu.tsx
|
|
20133
|
-
function
|
|
20296
|
+
function Vp({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onDuplicate: o, onCopyLink: s, onDelete: c, actions: l }) {
|
|
20134
20297
|
let u = (e) => () => {
|
|
20135
20298
|
n(), e?.();
|
|
20136
20299
|
}, d = r || i || a || o || s, f = l && l.length > 0;
|
|
@@ -20208,7 +20371,7 @@ function Cp({ x: e, y: t, onClose: n, onPeek: r, onOpen: i, onEditInline: a, onD
|
|
|
20208
20371
|
}
|
|
20209
20372
|
//#endregion
|
|
20210
20373
|
//#region src/components/list/InlineEditCell.tsx
|
|
20211
|
-
var
|
|
20374
|
+
var Hp = {
|
|
20212
20375
|
padding: "4px 6px",
|
|
20213
20376
|
margin: "-4px -6px",
|
|
20214
20377
|
borderRadius: 4,
|
|
@@ -20219,7 +20382,7 @@ var wp = {
|
|
|
20219
20382
|
alignItems: "center",
|
|
20220
20383
|
gap: 4
|
|
20221
20384
|
};
|
|
20222
|
-
function
|
|
20385
|
+
function Up({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "always", label: o, placeholder: s }) {
|
|
20223
20386
|
let [c, l] = Y(e), [u, d] = Y(e), [f, p] = Y(!1), [m, h] = Y(e), g = J(null);
|
|
20224
20387
|
K(() => {
|
|
20225
20388
|
l(e), d(e), h(e);
|
|
@@ -20291,7 +20454,7 @@ function Tp({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "a
|
|
|
20291
20454
|
onMouseLeave: (e) => {
|
|
20292
20455
|
e.currentTarget.style.borderColor = "transparent";
|
|
20293
20456
|
},
|
|
20294
|
-
style:
|
|
20457
|
+
style: Hp,
|
|
20295
20458
|
children: u ?? /* @__PURE__ */ Z("span", {
|
|
20296
20459
|
style: { color: "var(--text-4)" },
|
|
20297
20460
|
children: "Click to edit"
|
|
@@ -20300,7 +20463,7 @@ function Tp({ value: e, onSave: t, type: r = "text", options: i, trigger: a = "a
|
|
|
20300
20463
|
}
|
|
20301
20464
|
//#endregion
|
|
20302
20465
|
//#region src/components/pages/home/HomeStub.tsx
|
|
20303
|
-
var
|
|
20466
|
+
var Wp = [
|
|
20304
20467
|
{
|
|
20305
20468
|
id: "a1",
|
|
20306
20469
|
title: "James Gallagher moved to Discovery",
|
|
@@ -20316,7 +20479,7 @@ var Ep = [
|
|
|
20316
20479
|
title: "Refill enrichment job completed (32 leads)",
|
|
20317
20480
|
when: "10:00 AM"
|
|
20318
20481
|
}
|
|
20319
|
-
],
|
|
20482
|
+
], Gp = [
|
|
20320
20483
|
{
|
|
20321
20484
|
label: "Open leads",
|
|
20322
20485
|
val: "127",
|
|
@@ -20341,7 +20504,7 @@ var Ep = [
|
|
|
20341
20504
|
delta: "2 failed",
|
|
20342
20505
|
tone: "amber"
|
|
20343
20506
|
}
|
|
20344
|
-
],
|
|
20507
|
+
], Kp = [
|
|
20345
20508
|
[
|
|
20346
20509
|
"leads",
|
|
20347
20510
|
"Leads",
|
|
@@ -20373,7 +20536,7 @@ var Ep = [
|
|
|
20373
20536
|
"entity"
|
|
20374
20537
|
]
|
|
20375
20538
|
];
|
|
20376
|
-
function
|
|
20539
|
+
function qp({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLabel: n = "Acme · production" }) {
|
|
20377
20540
|
return /* @__PURE__ */ Z("div", {
|
|
20378
20541
|
style: {
|
|
20379
20542
|
padding: "22px 24px",
|
|
@@ -20417,7 +20580,7 @@ function kp({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20417
20580
|
gap: 10,
|
|
20418
20581
|
margin: "16px 0"
|
|
20419
20582
|
},
|
|
20420
|
-
children:
|
|
20583
|
+
children: Gp.map((e) => /* @__PURE__ */ Q("div", {
|
|
20421
20584
|
style: {
|
|
20422
20585
|
padding: 14,
|
|
20423
20586
|
background: "var(--surface)",
|
|
@@ -20465,7 +20628,7 @@ function kp({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20465
20628
|
gridTemplateColumns: "repeat(3,1fr)",
|
|
20466
20629
|
gap: 8
|
|
20467
20630
|
},
|
|
20468
|
-
children:
|
|
20631
|
+
children: Kp.map(([t, n, r]) => {
|
|
20469
20632
|
let i = M[r];
|
|
20470
20633
|
return /* @__PURE__ */ Q("button", {
|
|
20471
20634
|
onClick: () => e?.(t),
|
|
@@ -20510,7 +20673,7 @@ function kp({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20510
20673
|
flexDirection: "column",
|
|
20511
20674
|
gap: 8
|
|
20512
20675
|
},
|
|
20513
|
-
children:
|
|
20676
|
+
children: Wp.slice(0, 3).map((e) => /* @__PURE__ */ Q("div", {
|
|
20514
20677
|
style: {
|
|
20515
20678
|
fontSize: 12,
|
|
20516
20679
|
color: "var(--text-2)"
|
|
@@ -20539,19 +20702,19 @@ function kp({ onOpenNav: e, greeting: t = "Good afternoon, Konstantin", tenantLa
|
|
|
20539
20702
|
}
|
|
20540
20703
|
//#endregion
|
|
20541
20704
|
//#region src/components/pages/pipeline/Pipeline.tsx
|
|
20542
|
-
var
|
|
20705
|
+
var Jp = {
|
|
20543
20706
|
"1-New": { color: "slate" },
|
|
20544
20707
|
"2-Contacted": { color: "sky" },
|
|
20545
20708
|
"3-Qualified": { color: "violet" },
|
|
20546
20709
|
"4-Proposal": { color: "amber" },
|
|
20547
20710
|
"5-Won": { color: "emerald" },
|
|
20548
20711
|
"6-Lost": { color: "rose" }
|
|
20549
|
-
},
|
|
20712
|
+
}, Yp = {
|
|
20550
20713
|
P0: "rose",
|
|
20551
20714
|
P1: "amber",
|
|
20552
20715
|
P2: "sky",
|
|
20553
20716
|
P3: "slate"
|
|
20554
|
-
},
|
|
20717
|
+
}, Xp = [
|
|
20555
20718
|
{
|
|
20556
20719
|
id: "l1",
|
|
20557
20720
|
contact: "James Gallagher",
|
|
@@ -20617,11 +20780,11 @@ var Ap = {
|
|
|
20617
20780
|
score: 58
|
|
20618
20781
|
}
|
|
20619
20782
|
];
|
|
20620
|
-
function
|
|
20621
|
-
let e = Object.entries(
|
|
20783
|
+
function Zp() {
|
|
20784
|
+
let e = Object.entries(Jp).map(([e, t]) => ({
|
|
20622
20785
|
key: e,
|
|
20623
20786
|
color: t.color,
|
|
20624
|
-
leads:
|
|
20787
|
+
leads: Xp.filter((t) => t.pipeline === e)
|
|
20625
20788
|
}));
|
|
20626
20789
|
return /* @__PURE__ */ Q("div", {
|
|
20627
20790
|
style: {
|
|
@@ -20652,7 +20815,7 @@ function Np() {
|
|
|
20652
20815
|
fontSize: 12,
|
|
20653
20816
|
color: "var(--text-3)"
|
|
20654
20817
|
},
|
|
20655
|
-
children: [
|
|
20818
|
+
children: [Xp.length, " leads · $2.4M pipeline"]
|
|
20656
20819
|
})]
|
|
20657
20820
|
}), /* @__PURE__ */ Z("div", {
|
|
20658
20821
|
style: {
|
|
@@ -20738,7 +20901,7 @@ function Np() {
|
|
|
20738
20901
|
flexWrap: "wrap"
|
|
20739
20902
|
},
|
|
20740
20903
|
children: [e.priority && e.priority !== "-" && /* @__PURE__ */ Z(B, {
|
|
20741
|
-
tone:
|
|
20904
|
+
tone: Yp[e.priority] ?? "slate",
|
|
20742
20905
|
size: "xs",
|
|
20743
20906
|
dot: !0,
|
|
20744
20907
|
children: e.priority
|
|
@@ -20757,7 +20920,7 @@ function Np() {
|
|
|
20757
20920
|
}
|
|
20758
20921
|
//#endregion
|
|
20759
20922
|
//#region src/components/pages/jobs/Jobs.tsx
|
|
20760
|
-
var
|
|
20923
|
+
var Qp = [
|
|
20761
20924
|
{
|
|
20762
20925
|
id: "job_91a4",
|
|
20763
20926
|
name: "reparse_leads_with_llm",
|
|
@@ -20801,12 +20964,12 @@ var Pp = [
|
|
|
20801
20964
|
worker: "wk-us-01",
|
|
20802
20965
|
took: "2m 02s"
|
|
20803
20966
|
}
|
|
20804
|
-
],
|
|
20967
|
+
], $p = {
|
|
20805
20968
|
running: "sky",
|
|
20806
20969
|
success: "emerald",
|
|
20807
20970
|
queued: "slate",
|
|
20808
20971
|
failed: "rose"
|
|
20809
|
-
},
|
|
20972
|
+
}, em = [
|
|
20810
20973
|
"ID",
|
|
20811
20974
|
"Name",
|
|
20812
20975
|
"Status",
|
|
@@ -20816,7 +20979,7 @@ var Pp = [
|
|
|
20816
20979
|
"Worker",
|
|
20817
20980
|
""
|
|
20818
20981
|
];
|
|
20819
|
-
function
|
|
20982
|
+
function tm() {
|
|
20820
20983
|
return /* @__PURE__ */ Q("div", {
|
|
20821
20984
|
style: {
|
|
20822
20985
|
padding: "14px 20px",
|
|
@@ -20865,7 +21028,7 @@ function Lp() {
|
|
|
20865
21028
|
background: "var(--surface-2)",
|
|
20866
21029
|
color: "var(--text-3)"
|
|
20867
21030
|
},
|
|
20868
|
-
children:
|
|
21031
|
+
children: em.map((e, t) => /* @__PURE__ */ Z("th", {
|
|
20869
21032
|
style: {
|
|
20870
21033
|
padding: "0 10px",
|
|
20871
21034
|
textAlign: "left",
|
|
@@ -20877,7 +21040,7 @@ function Lp() {
|
|
|
20877
21040
|
},
|
|
20878
21041
|
children: e
|
|
20879
21042
|
}, e || `_h${t}`))
|
|
20880
|
-
}) }), /* @__PURE__ */ Z("tbody", { children:
|
|
21043
|
+
}) }), /* @__PURE__ */ Z("tbody", { children: Qp.map((e) => /* @__PURE__ */ Q("tr", {
|
|
20881
21044
|
style: { height: 32 },
|
|
20882
21045
|
children: [
|
|
20883
21046
|
/* @__PURE__ */ Z("td", {
|
|
@@ -20909,7 +21072,7 @@ function Lp() {
|
|
|
20909
21072
|
borderBottom: "1px solid var(--divider)"
|
|
20910
21073
|
},
|
|
20911
21074
|
children: /* @__PURE__ */ Z(B, {
|
|
20912
|
-
tone:
|
|
21075
|
+
tone: $p[e.status],
|
|
20913
21076
|
size: "xs",
|
|
20914
21077
|
dot: !0,
|
|
20915
21078
|
children: e.status
|
|
@@ -20939,7 +21102,7 @@ function Lp() {
|
|
|
20939
21102
|
display: "block",
|
|
20940
21103
|
height: "100%",
|
|
20941
21104
|
width: `${e.progress}%`,
|
|
20942
|
-
background: `var(--pill-${
|
|
21105
|
+
background: `var(--pill-${$p[e.status]})`
|
|
20943
21106
|
} })
|
|
20944
21107
|
}), /* @__PURE__ */ Q("span", {
|
|
20945
21108
|
className: "mono num",
|
|
@@ -20994,7 +21157,7 @@ function Lp() {
|
|
|
20994
21157
|
}
|
|
20995
21158
|
//#endregion
|
|
20996
21159
|
//#region src/components/layout/ImpersonationStartModal.tsx
|
|
20997
|
-
function
|
|
21160
|
+
function nm({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarted: i }) {
|
|
20998
21161
|
let { start: a, isStarting: o } = Zr(), { value: s } = vi("impersonation.require_reason_min_length", 10), [c, l] = Y(""), [u, d] = Y("");
|
|
20999
21162
|
if (!e) return null;
|
|
21000
21163
|
let f = c.trim(), p = f.length >= s;
|
|
@@ -21154,7 +21317,7 @@ function Rp({ open: e, targetUserId: t, targetUserLabel: n, onClose: r, onStarte
|
|
|
21154
21317
|
}
|
|
21155
21318
|
//#endregion
|
|
21156
21319
|
//#region src/components/agents/AgentVisualHints.tsx
|
|
21157
|
-
function
|
|
21320
|
+
function rm({ turn: e, navigate: t }) {
|
|
21158
21321
|
return K(() => {
|
|
21159
21322
|
for (let n of e.hints) switch (n.kind) {
|
|
21160
21323
|
case "navigate":
|
|
@@ -21193,7 +21356,7 @@ function zp({ turn: e, navigate: t }) {
|
|
|
21193
21356
|
}
|
|
21194
21357
|
//#endregion
|
|
21195
21358
|
//#region src/components/agents/AgentConversationDrawer.tsx
|
|
21196
|
-
function
|
|
21359
|
+
function im({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, onNew: a, onRefresh: o }) {
|
|
21197
21360
|
return K(() => {
|
|
21198
21361
|
e && o();
|
|
21199
21362
|
}, [e, o]), e ? /* @__PURE__ */ Q("aside", {
|
|
@@ -21220,7 +21383,7 @@ function Bp({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
|
|
|
21220
21383
|
className: `block w-full px-4 py-3 text-left border-b border-divider hover:bg-surface ${e.id === r ? "bg-surface" : ""}`,
|
|
21221
21384
|
children: [/* @__PURE__ */ Z("div", {
|
|
21222
21385
|
className: "text-sm font-medium truncate",
|
|
21223
|
-
children: e.title || e.context ?
|
|
21386
|
+
children: e.title || e.context ? am(e.context) : "Untitled"
|
|
21224
21387
|
}), /* @__PURE__ */ Q("div", {
|
|
21225
21388
|
className: "text-xs text-muted-foreground",
|
|
21226
21389
|
children: [
|
|
@@ -21243,10 +21406,10 @@ function Bp({ open: e, onClose: t, conversations: n, activeId: r, onSelect: i, o
|
|
|
21243
21406
|
]
|
|
21244
21407
|
}) : null;
|
|
21245
21408
|
}
|
|
21246
|
-
function
|
|
21409
|
+
function am(e) {
|
|
21247
21410
|
if (!e) return "";
|
|
21248
21411
|
let t = e.entity ? I(e.entity) : "", n = e.pk ? `:${I(e.pk).slice(0, 6)}` : "";
|
|
21249
21412
|
return t ? `${t}${n}` : "";
|
|
21250
21413
|
}
|
|
21251
21414
|
//#endregion
|
|
21252
|
-
export { Ae as ActionBatchError, vo as ActionRunnerProvider, fa as AgentChatPanel,
|
|
21415
|
+
export { Ae as ActionBatchError, vo as ActionRunnerProvider, fa as AgentChatPanel, im as AgentConversationDrawer, aa as AgentElicitForm, rm as AgentVisualHints, Sp as App, Sp as Declarion, Uo as AuthShell, He as Avatar, Np as Batch, ot as BoolToggle, S as BrandGlyph, oi as Breadcrumbs, V as Btn, ft as CURSOR_LOCALE_CHANGED, ht as CURSOR_SEMANTICS_MISMATCH, Cs as ChangePasswordDialog, w as Check, re as Chip, Te as CircleImage, f as ClassifiedFieldLocked, Eu as ColumnPicker, wi as CommandPalette, Ar as ConfirmDialog, et as DateInput, m as Dropdown, ie as DynamicIcon, vl as EmptyState, Op as EntityClient, L as FieldLabel, Ot as FileDraftScope, iu as FilterChips, ou as FilterDrawer, fs as Forgot, qp as HomeStub, se as HoverCard, M as Icon, z as IconBtn, fi as ImpersonationBanner, yi as ImpersonationFrame, nm as ImpersonationStartModal, Up as InlineEditCell, tm as JobsStub, u as JsonField, b as Kbd, Ka as MULTIPLE_VALUES, P as MenuItem, El as NO_VALUE_OPS, Dl as OP_LABELS, Bp as PageHeader, c as PasswordInput, B as Pill, Zp as PipelineStub, el as Preferences, Wc as Profile, qa as PropertyGridEditor, Hl as QEField, A as QuickEditCell, Vl as QuickPeek, Tn as Rail, ae as RecordIdBadge, Ep as RefCache, je as RefField, ys as Reset, i as RowField, Vp as RowMenu, g as SectionCard, n as Select, Nr as Sidebar, ss as SignIn, us as SignUp, Yf as SmartDetailPage, Uu as SmartListPage, ip as SmartRecordListPage, v as Spinner, Ce as SquareImage, li as TabStrip, ke as TagsInput, ri as TenantChip, E as TextArea, O as TextInput, ci as TopBar, bs as TwoFA, Dt as UploadError, ee as ViewField, Ou as ViewSwitcher, Pe as WideBanner, Oi as approveInvocation, t as buildActionBody, pe as buildDetailHrefFromId, Re as buildEntityDetailHref, Ha as buildMassEditTargets, Ke as buildRowDetailHref, Pr as buildSections, Ai as cancelConversation, bu as classificationTier, I as coerceDisplayString, Ml as countActiveFilters, Ti as createConversation, T as deleteEntity, Qa as detectCommonValue, Pt as discardFile, Mp as entityClient, ni as envTone, j as executeAction, Ne as extractPkValues, Su as fieldAccessInfo, vu as fieldClassification, Xe as fieldDisplayName, yu as fieldRequiredPermission, It as formatBytes, ru as formatCount, tu as formatEstimatedCount, nu as formatExactCount, rt as getFileWidget, de as getImageCropper, mf as getLayoutWidget, Se as getPrimaryKeyFields, me as hasFileWidget, hf as hasLayoutWidget, Al as hasOrGroups, Mt as isCursorStaleError, gu as isFieldReadable, xu as isFieldSoDProtected, _u as isFieldWritable, ji as listConversations, Ni as listPendingInvocations, Pi as loadHistory, W as loc, Ol as parseFiltersFromURL, Va as parseTargetFilter, U as pkValuePartsToId, we as pkValuesFromId, fe as pkValuesToDetailId, Qe as pkValuesToId, tt as registerFileWidget, pf as registerLayoutWidget, mp as registerScreen, ki as rejectInvocation, Mi as rerunMessageTurn, he as resolveDetailRoute, at as restoreEntity, Di as sendElicitResponse, Ei as sendMessage, kl as setFiltersInURL, Ze as setImageCropper, kt as uploadFile, go as useActionRunner, ia as useAgentConversation, Lp as useAllEntityData, Xr as useAuth, Rp as useColumns, Os as useCreateEntity, _l as useDebounce, As as useDeleteEntity, rp as useDeleteProperty, jt as useDraftRegistration, F as useEntity, a as useEntityCount, $e as useEntityData, Gu as useEntityItem, Nt as useFileDraftScope, Il as useFilters, Zr as useImpersonation, Zt as useLocation, $t as useNavigate, vi as useParam, tn as useParams, gi as usePublicParams, _i as useResolvedParam, oe as useSchema, ku as useScreen, rn as useSearchParams, np as useSetProperty, $f as useSetStatus, Mr as useTabNavigate, Bn as useTabStore, ks as useUpdateEntity, Au as useViews, Ft as validateClientSide };
|