@declarion/react 0.63.1 → 0.64.0
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/{ActionDialog-uiuse5W8.js → ActionDialog-C6EG-AmC.js} +3 -3
- package/dist-lib/{ActionResultDialog.impl-BUBm9Ck3.js → ActionResultDialog.impl-BATutW8J.js} +2 -2
- package/dist-lib/{ActionRunner-DAxgnKB3.js → ActionRunner-DdBFhqGe.js} +4 -4
- package/dist-lib/{AdminCatalogPage.impl-BJGn7EvA.js → AdminCatalogPage.impl-B-7MLqa1.js} +2 -2
- package/dist-lib/{AgentChatPanel.impl-8bw8J-xV.js → AgentChatPanel.impl-D5y_qEex.js} +6 -6
- package/dist-lib/{AgentOpenFollower.impl-Cga1q7_e.js → AgentOpenFollower.impl-BAs_wGEZ.js} +5 -5
- package/dist-lib/{AssociatedBlock-D6qDYmRO.js → AssociatedBlock-BOoPLOjw.js} +7 -7
- package/dist-lib/{AuthShell-DdiughRT.js → AuthShell-C8aVwHS7.js} +5 -5
- package/dist-lib/{useAuth-CR2YKKXb.js → BlankScreen-DVc7fh8C.js} +19 -7
- package/dist-lib/{ChangePasswordDialog-DFe7lVQg.js → ChangePasswordDialog-C_T_3pjl.js} +1 -1
- package/dist-lib/{ChangePasswordDialog.impl-DtSIaP-A.js → ChangePasswordDialog.impl-5hDc0wpE.js} +3 -3
- package/dist-lib/{CommandPalette.impl-Db3AFA5w.js → CommandPalette.impl-DRI5kxVY.js} +3 -3
- package/dist-lib/{CopyButton-C0iEvaT1.js → CopyButton-DRIT_f0k.js} +1 -1
- package/dist-lib/{DirtyTabsCloseDialog.impl-DWaFaWKn.js → DirtyTabsCloseDialog.impl-FhAiOmEb.js} +3 -3
- package/dist-lib/{DraggableChildrenTable-Cy8uevS_.js → DraggableChildrenTable-Dd5SeuF6.js} +3 -3
- package/dist-lib/{FieldRow-BXBBFOZh.js → FieldRow-DedGIY9R.js} +2 -2
- package/dist-lib/{FilterChips-8fMDBXHp.js → FilterChips-Cv1tlXyo.js} +4 -4
- package/dist-lib/{Forgot.impl-CmT5A__V.js → Forgot.impl-6tL6SBlS.js} +4 -4
- package/dist-lib/{Grid-Cg29k0jv.js → Grid-XUHm5SDe.js} +3 -3
- package/dist-lib/{ImpersonationBanner.impl-CBJJx6an.js → ImpersonationBanner.impl--g0iYwcV.js} +2 -2
- package/dist-lib/{ImpersonationStartModal.impl-RaZcsJpG.js → ImpersonationStartModal.impl-BFBN0YJe.js} +3 -3
- package/dist-lib/{LayoutRenderer-DEHtYtzV.js → LayoutRenderer-d-tXYPze.js} +12 -12
- package/dist-lib/{ListCardsBody-BAwFR3yO.js → ListCardsBody-BEoYjSZ2.js} +4 -4
- package/dist-lib/{MarkdownRenderer-kNEMr6K_.js → MarkdownRenderer-sK2TRZS-.js} +2 -2
- package/dist-lib/{NotFoundPage.impl-ZSBn4WWb.js → NotFoundPage.impl-BoX11u-P.js} +2 -2
- package/dist-lib/{PageHeader-tw4pX3lI.js → PageHeader-DiwLe7CO.js} +5 -5
- package/dist-lib/{PageShell-tI-mm0C5.js → PageShell-BJz1MiTH.js} +1 -1
- package/dist-lib/{Preferences.impl-BG9XBZDf.js → Preferences.impl-Ct5xwZtT.js} +8 -8
- package/dist-lib/{Profile.impl-CbzSzxyG.js → Profile.impl-Cypk27ah.js} +17 -17
- package/dist-lib/{PropertyGridEditor-BTjscqfz.js → PropertyGridEditor-XrP6TZ5s.js} +3 -3
- package/dist-lib/{RecordHeader-Bv9nJXnG.js → RecordHeader-BfQ0_4wq.js} +5 -5
- package/dist-lib/{RecordIdBadge-C3MgoZvt.js → RecordIdBadge-wbigZaFc.js} +1 -1
- package/dist-lib/{RefreshControl-Ce-T_wSQ.js → RefreshControl-CRdWPoF5.js} +4 -4
- package/dist-lib/{Reset.impl-Cesyqt5p.js → Reset.impl-D0pjhS6d.js} +4 -4
- package/dist-lib/{SSOCallbackPage.impl-BC_W9nQA.js → SSOCallbackPage.impl-Cfi2pQ59.js} +1 -1
- package/dist-lib/{SectionCard-VonaiLrx.js → SectionCard-BYHoHWJc.js} +2 -2
- package/dist-lib/SignUp.impl-CfEXrUeg.js +212 -0
- package/dist-lib/{SmartDetailPage.impl-8iOAMYQh.js → SmartDetailPage.impl-BiIX0n7K.js} +19 -19
- package/dist-lib/{SmartListPage.impl-Cc4Zwz5f.js → SmartListPage.impl-Cu83Gv_G.js} +18 -18
- package/dist-lib/{SmartRecordListPage.impl-xTSohkqG.js → SmartRecordListPage.impl-DR6lq7HA.js} +14 -14
- package/dist-lib/{SortHeaderMenu-BKTrq0Wb.js → SortHeaderMenu-Co5PvhTA.js} +1 -1
- package/dist-lib/{TenantParamsPage.impl-DMuSs3eP.js → TenantParamsPage.impl-BGpdmEZg.js} +5 -5
- package/dist-lib/{TwoFA.impl-BClZ3ndk.js → TwoFA.impl-B2HtPduH.js} +3 -3
- package/dist-lib/{cardProjection-Cr7fG6wJ.js → cardProjection-Cxlogzh8.js} +2 -2
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/{format-count-CSEFw2ht.js → format-count-lyB4CPen.js} +7 -7
- package/dist-lib/index.js +873 -879
- package/dist-lib/{param-editors-9yJr7xmN.js → param-editors-TYYU7HKK.js} +3 -3
- package/dist-lib/{payload-B2wODLAX.js → payload-DioMoxMX.js} +2 -2
- package/dist-lib/{peekDraftStore-D4GRsRKW.js → peekDraftStore-CaimrOhW.js} +3 -3
- package/dist-lib/{registry-BpzE8-h8.js → registry-CGe5kCXN.js} +2 -2
- package/dist-lib/{screen-back-Cs4kzeqD.js → screen-back-BtbEp5sO.js} +1 -1
- package/dist-lib/testing.js +2 -2
- package/dist-lib/{use-filter-value-labels-DuqvAIVG.js → use-filter-value-labels-D3YDgUzg.js} +5 -5
- package/dist-lib/{useAgentConversation-D210VDCQ.js → useAgentConversation-rru-7hnF.js} +2 -2
- package/dist-lib/{useBranding-Ckp_AuJb.js → useBranding-zcxEic2k.js} +1 -1
- package/dist-lib/{useBrandingChrome-bKTXXDLy.js → useBrandingChrome-bxaR3G1R.js} +2 -2
- package/dist-lib/{useCurrentLocation-BdngVeQv.js → useCurrentLocation-Bq1T72AW.js} +1 -1
- package/dist-lib/{useCurrentScreen--UovgvRj.js → useCurrentScreen-BZOHBGQZ.js} +284 -273
- package/dist-lib/{useImpersonation-DNV23Ks1.js → useImpersonation-DBIRRR70.js} +2 -2
- package/dist-lib/{useObject-1OCeV34A.js → useObject-B45F96rC.js} +1 -1
- package/dist-lib/{useOwnRefresh-DkOuM4yo.js → useOwnRefresh-DJjaje52.js} +3 -3
- package/dist-lib/{useParams-ei6w4I7w.js → useParams-BFLJi4n3.js} +1 -1
- package/dist-lib/{useProperties-CbdhlhZd.js → useProperties-B7opZ-iy.js} +1 -1
- package/dist-lib/{useScreenBack-J861tbwn.js → useScreenBack-DENlz844.js} +3 -3
- package/dist-lib/{useTabNavigate-BZiW4q3M.js → useTabNavigate-CUqOmcMj.js} +3 -3
- package/dist-lib/{useTabTitle-CZZnWIQi.js → useTabTitle-KrzEo118.js} +1 -1
- package/dist-lib/{value-CDCeHgOv.js → value-BuQVYx52.js} +1 -1
- package/dist-lib/{variants-CbAwl3Mn.js → variants-vUtfBbE6.js} +5 -5
- package/package.json +1 -1
- package/dist-lib/SignUp.impl-C1KCQbfZ.js +0 -212
|
@@ -486,15 +486,15 @@ async function ot(e, t, n, r) {
|
|
|
486
486
|
credentials: o
|
|
487
487
|
});
|
|
488
488
|
if (!c.ok) {
|
|
489
|
-
B();
|
|
489
|
+
n.isSessionProbe || B();
|
|
490
490
|
let e = await x(c);
|
|
491
491
|
throw new _(c.status, e.body, e.raw);
|
|
492
492
|
}
|
|
493
493
|
return r(c);
|
|
494
494
|
} catch (t) {
|
|
495
|
-
throw t instanceof _ ? t : (B(), new _(401, s, e));
|
|
495
|
+
throw t instanceof _ ? t : (n.isSessionProbe || B(), new _(401, s, e));
|
|
496
496
|
}
|
|
497
|
-
throw c.status === 401 && B(), Qe({
|
|
497
|
+
throw c.status === 401 && !n.isSessionProbe && B(), Qe({
|
|
498
498
|
status: c.status,
|
|
499
499
|
code: l,
|
|
500
500
|
message: u
|
|
@@ -506,7 +506,10 @@ function st(e) {
|
|
|
506
506
|
return e.status === 204 ? Promise.resolve(void 0) : e.json();
|
|
507
507
|
}
|
|
508
508
|
async function H(e, t = {}) {
|
|
509
|
-
return ot(e, t, {
|
|
509
|
+
return ot(e, t, {
|
|
510
|
+
setAccept: !1,
|
|
511
|
+
isSessionProbe: !1
|
|
512
|
+
}, st);
|
|
510
513
|
}
|
|
511
514
|
async function ct(e) {
|
|
512
515
|
return {
|
|
@@ -516,7 +519,10 @@ async function ct(e) {
|
|
|
516
519
|
};
|
|
517
520
|
}
|
|
518
521
|
async function lt(e, t = {}) {
|
|
519
|
-
return ot(e, t, {
|
|
522
|
+
return ot(e, t, {
|
|
523
|
+
setAccept: !0,
|
|
524
|
+
isSessionProbe: !1
|
|
525
|
+
}, ct);
|
|
520
526
|
}
|
|
521
527
|
function ut(e) {
|
|
522
528
|
let t = e.get("Content-Disposition");
|
|
@@ -528,11 +534,14 @@ function ut(e) {
|
|
|
528
534
|
let r = t.match(/filename\s*=\s*("([^"]+)"|([^;]+))/i);
|
|
529
535
|
return r ? (r[2] ?? r[3] ?? "").trim() : "";
|
|
530
536
|
}
|
|
531
|
-
async function U(e, t = {}) {
|
|
532
|
-
return (await
|
|
537
|
+
async function U(e, t = {}, { isSessionProbe: n = !1 } = {}) {
|
|
538
|
+
return (await ot(`/api/actions/${encodeURIComponent(e)}`, {
|
|
533
539
|
method: "POST",
|
|
534
540
|
body: De(t)
|
|
535
|
-
}
|
|
541
|
+
}, {
|
|
542
|
+
setAccept: !1,
|
|
543
|
+
isSessionProbe: n
|
|
544
|
+
}, st)).result;
|
|
536
545
|
}
|
|
537
546
|
//#endregion
|
|
538
547
|
//#region src/types/ordmap.ts
|
|
@@ -1016,38 +1025,41 @@ async function dn() {
|
|
|
1016
1025
|
return U("auth.me");
|
|
1017
1026
|
}
|
|
1018
1027
|
async function fn() {
|
|
1028
|
+
return U("auth.me", {}, { isSessionProbe: !0 });
|
|
1029
|
+
}
|
|
1030
|
+
async function pn() {
|
|
1019
1031
|
return (await U("auth.list_tenants")).tenants;
|
|
1020
1032
|
}
|
|
1021
|
-
async function
|
|
1033
|
+
async function mn(e) {
|
|
1022
1034
|
let t = await U("auth.switch_tenant", { tenant_id: e });
|
|
1023
1035
|
return R(t.expires_at), t;
|
|
1024
1036
|
}
|
|
1025
|
-
async function
|
|
1037
|
+
async function hn() {
|
|
1026
1038
|
await U("auth.logout");
|
|
1027
1039
|
}
|
|
1028
|
-
async function
|
|
1040
|
+
async function gn(e) {
|
|
1029
1041
|
return (await U("sso_provider.list", e ? { tenant_code: e } : {})).providers;
|
|
1030
1042
|
}
|
|
1031
|
-
function
|
|
1043
|
+
function _n(e, t, n) {
|
|
1032
1044
|
let r = new URLSearchParams();
|
|
1033
1045
|
t && r.set("tenant", t), n && r.set("redirect", n);
|
|
1034
1046
|
let i = r.toString();
|
|
1035
1047
|
return `/api/auth/sso/authorize/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
|
|
1036
1048
|
}
|
|
1037
|
-
async function
|
|
1049
|
+
async function vn(e, t, n) {
|
|
1038
1050
|
let r = {
|
|
1039
1051
|
target_user_id: e,
|
|
1040
1052
|
reason: t
|
|
1041
1053
|
};
|
|
1042
1054
|
return n != null && (r.duration_minutes = n), U("impersonation.start", r);
|
|
1043
1055
|
}
|
|
1044
|
-
async function
|
|
1056
|
+
async function yn() {
|
|
1045
1057
|
return U("impersonation.stop");
|
|
1046
1058
|
}
|
|
1047
|
-
async function
|
|
1059
|
+
async function bn(e) {
|
|
1048
1060
|
await U("impersonation.revoke", { session_id: e });
|
|
1049
1061
|
}
|
|
1050
|
-
async function
|
|
1062
|
+
async function xn(e, t) {
|
|
1051
1063
|
await U("auth.change_password", {
|
|
1052
1064
|
current_password: e,
|
|
1053
1065
|
new_password: t
|
|
@@ -1055,33 +1067,32 @@ async function bn(e, t) {
|
|
|
1055
1067
|
}
|
|
1056
1068
|
//#endregion
|
|
1057
1069
|
//#region src/stores/auth.ts
|
|
1058
|
-
|
|
1070
|
+
async function Sn(e, t) {
|
|
1071
|
+
try {
|
|
1072
|
+
let n = await t(), r = await pn().catch(() => []);
|
|
1073
|
+
e({
|
|
1074
|
+
user: n,
|
|
1075
|
+
isAuthenticated: !0,
|
|
1076
|
+
isLoading: !1,
|
|
1077
|
+
activeTenant: n.tenant ?? null,
|
|
1078
|
+
tenants: r
|
|
1079
|
+
});
|
|
1080
|
+
} catch {
|
|
1081
|
+
e({
|
|
1082
|
+
user: null,
|
|
1083
|
+
isAuthenticated: !1,
|
|
1084
|
+
isLoading: !1
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
var Cn = m((e) => ({
|
|
1059
1089
|
user: null,
|
|
1060
1090
|
isAuthenticated: !1,
|
|
1061
1091
|
isLoading: !0,
|
|
1062
1092
|
activeTenant: null,
|
|
1063
1093
|
tenants: [],
|
|
1064
|
-
initialize:
|
|
1065
|
-
|
|
1066
|
-
let t = await dn(), n = t.tenant ?? null, r = [];
|
|
1067
|
-
try {
|
|
1068
|
-
r = await fn();
|
|
1069
|
-
} catch {}
|
|
1070
|
-
e({
|
|
1071
|
-
user: t,
|
|
1072
|
-
isAuthenticated: !0,
|
|
1073
|
-
isLoading: !1,
|
|
1074
|
-
activeTenant: n,
|
|
1075
|
-
tenants: r
|
|
1076
|
-
});
|
|
1077
|
-
} catch {
|
|
1078
|
-
e({
|
|
1079
|
-
user: null,
|
|
1080
|
-
isAuthenticated: !1,
|
|
1081
|
-
isLoading: !1
|
|
1082
|
-
});
|
|
1083
|
-
}
|
|
1084
|
-
},
|
|
1094
|
+
initialize: () => Sn(e, fn),
|
|
1095
|
+
reloadSession: () => Sn(e, dn),
|
|
1085
1096
|
refreshMe: async () => {
|
|
1086
1097
|
try {
|
|
1087
1098
|
let t = await dn();
|
|
@@ -1108,7 +1119,7 @@ var xn = m((e) => ({
|
|
|
1108
1119
|
logout: async () => {
|
|
1109
1120
|
Ke();
|
|
1110
1121
|
try {
|
|
1111
|
-
await
|
|
1122
|
+
await hn();
|
|
1112
1123
|
} catch {}
|
|
1113
1124
|
e({
|
|
1114
1125
|
user: null,
|
|
@@ -1118,13 +1129,13 @@ var xn = m((e) => ({
|
|
|
1118
1129
|
});
|
|
1119
1130
|
}
|
|
1120
1131
|
}));
|
|
1121
|
-
|
|
1132
|
+
Cn.subscribe((e, t) => {
|
|
1122
1133
|
e.isAuthenticated !== t.isAuthenticated && tt(null);
|
|
1123
1134
|
});
|
|
1124
1135
|
//#endregion
|
|
1125
1136
|
//#region src/hooks/useSchema.ts
|
|
1126
1137
|
function J() {
|
|
1127
|
-
let e =
|
|
1138
|
+
let e = Cn((e) => e.isAuthenticated), t = q().enabled;
|
|
1128
1139
|
return u({
|
|
1129
1140
|
queryKey: ["schema", e],
|
|
1130
1141
|
queryFn: Gt,
|
|
@@ -1134,8 +1145,8 @@ function J() {
|
|
|
1134
1145
|
}
|
|
1135
1146
|
//#endregion
|
|
1136
1147
|
//#region src/lib/language.ts
|
|
1137
|
-
var
|
|
1138
|
-
function
|
|
1148
|
+
var wn = "en", Tn = "ui_language";
|
|
1149
|
+
function En(e, t, n) {
|
|
1139
1150
|
if (e) for (let r of [
|
|
1140
1151
|
t,
|
|
1141
1152
|
n,
|
|
@@ -1145,13 +1156,13 @@ function wn(e, t, n) {
|
|
|
1145
1156
|
if (t) return [r, t];
|
|
1146
1157
|
}
|
|
1147
1158
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1159
|
+
function Dn(e, t, n) {
|
|
1160
|
+
return En(e, t, n)?.[1];
|
|
1150
1161
|
}
|
|
1151
|
-
function
|
|
1162
|
+
function On(e, t, n) {
|
|
1152
1163
|
function r(r, i, a) {
|
|
1153
|
-
if (typeof r != "string") return
|
|
1154
|
-
let o =
|
|
1164
|
+
if (typeof r != "string") return Dn(r, t, n) ?? "";
|
|
1165
|
+
let o = Dn(e?.[r], t, n) ?? i ?? "";
|
|
1155
1166
|
return a ? o.replace(/\{(\w+)\}/g, (e, t) => Object.hasOwn(a, t) ? String(a[t]) : e) : o;
|
|
1156
1167
|
}
|
|
1157
1168
|
return Object.assign(r, {
|
|
@@ -1159,14 +1170,14 @@ function En(e, t, n) {
|
|
|
1159
1170
|
deploymentLanguage: n
|
|
1160
1171
|
});
|
|
1161
1172
|
}
|
|
1162
|
-
function
|
|
1173
|
+
function kn(e, t, n, r, i) {
|
|
1163
1174
|
let a = new Intl.PluralRules(e.language).select(n), o = {
|
|
1164
1175
|
...i,
|
|
1165
1176
|
count: new Intl.NumberFormat(e.language).format(n)
|
|
1166
1177
|
};
|
|
1167
1178
|
return e(`${t}.${a}`, "", o) || e(`${t}.other`, a === "one" ? r.one : r.other, o);
|
|
1168
1179
|
}
|
|
1169
|
-
function
|
|
1180
|
+
function An(e, n) {
|
|
1170
1181
|
return e.split(/(\{[A-Za-z_][A-Za-z0-9_]*\})/).filter((e) => e !== "").map((e, i) => {
|
|
1171
1182
|
let a = /^\{(\w+)\}$/.exec(e)?.[1];
|
|
1172
1183
|
return r(t, { key: i }, a !== void 0 && Object.hasOwn(n, a) ? n[a] : e);
|
|
@@ -1174,15 +1185,15 @@ function On(e, n) {
|
|
|
1174
1185
|
}
|
|
1175
1186
|
//#endregion
|
|
1176
1187
|
//#region src/hooks/useLanguage.ts
|
|
1177
|
-
function
|
|
1188
|
+
function jn() {
|
|
1178
1189
|
let { data: e } = J();
|
|
1179
1190
|
return e?.language || "en";
|
|
1180
1191
|
}
|
|
1181
|
-
function
|
|
1192
|
+
function Mn() {
|
|
1182
1193
|
let { data: e } = J();
|
|
1183
1194
|
return e?.deployment_language || "en";
|
|
1184
1195
|
}
|
|
1185
|
-
async function
|
|
1196
|
+
async function Nn(e) {
|
|
1186
1197
|
let t = it();
|
|
1187
1198
|
tt(null), await e.refetchQueries({
|
|
1188
1199
|
queryKey: ["schema"],
|
|
@@ -1191,9 +1202,9 @@ async function jn(e) {
|
|
|
1191
1202
|
}
|
|
1192
1203
|
//#endregion
|
|
1193
1204
|
//#region src/hooks/useText.ts
|
|
1194
|
-
function
|
|
1195
|
-
let { data: t } = J(), n =
|
|
1196
|
-
return s(() =>
|
|
1205
|
+
function Pn(e = "messages") {
|
|
1206
|
+
let { data: t } = J(), n = jn(), r = Mn(), i = e === "errors" ? t?.errors : t?.messages;
|
|
1207
|
+
return s(() => On(i, n, r), [
|
|
1197
1208
|
i,
|
|
1198
1209
|
n,
|
|
1199
1210
|
r
|
|
@@ -1201,12 +1212,12 @@ function Mn(e = "messages") {
|
|
|
1201
1212
|
}
|
|
1202
1213
|
//#endregion
|
|
1203
1214
|
//#region src/lib/viewport-category.ts
|
|
1204
|
-
var
|
|
1215
|
+
var Fn = {
|
|
1205
1216
|
phoneMax: 639,
|
|
1206
1217
|
tabletMax: 1023,
|
|
1207
1218
|
landscapePhoneMaxHeight: 520
|
|
1208
1219
|
};
|
|
1209
|
-
function
|
|
1220
|
+
function In(e, t = Fn) {
|
|
1210
1221
|
let { width: n, height: r, touch: i = !1 } = e;
|
|
1211
1222
|
return !Number.isFinite(n) || n <= 0 ? "desktop" : n <= t.phoneMax ? "phone" : n <= t.tabletMax ? i && Number.isFinite(r) && r > 0 && r <= t.landscapePhoneMaxHeight ? "phone" : "tablet" : "desktop";
|
|
1212
1223
|
}
|
|
@@ -1215,7 +1226,7 @@ function Pn(e, t = Nn) {
|
|
|
1215
1226
|
var Y = {
|
|
1216
1227
|
width: 1280,
|
|
1217
1228
|
height: 720
|
|
1218
|
-
},
|
|
1229
|
+
}, Ln = n({
|
|
1219
1230
|
...Y,
|
|
1220
1231
|
category: "desktop",
|
|
1221
1232
|
isPhone: !1,
|
|
@@ -1223,45 +1234,45 @@ var Y = {
|
|
|
1223
1234
|
isDesktop: !0,
|
|
1224
1235
|
touch: !1
|
|
1225
1236
|
});
|
|
1226
|
-
function
|
|
1237
|
+
function Rn(e) {
|
|
1227
1238
|
return {
|
|
1228
1239
|
width: Number.isFinite(e.width) && e.width > 0 ? e.width : Y.width,
|
|
1229
1240
|
height: Number.isFinite(e.height) && e.height > 0 ? e.height : Y.height,
|
|
1230
1241
|
touch: e.touch ?? !1
|
|
1231
1242
|
};
|
|
1232
1243
|
}
|
|
1233
|
-
function
|
|
1244
|
+
function zn() {
|
|
1234
1245
|
if (typeof window > "u") return !1;
|
|
1235
1246
|
let e = window.matchMedia?.("(pointer: coarse)")?.matches ?? !1, t = window.navigator?.maxTouchPoints ?? 0;
|
|
1236
1247
|
return e || t > 0;
|
|
1237
1248
|
}
|
|
1238
|
-
function
|
|
1249
|
+
function Bn() {
|
|
1239
1250
|
if (typeof window > "u") return Y;
|
|
1240
1251
|
let e = window.visualViewport;
|
|
1241
|
-
return
|
|
1252
|
+
return Rn({
|
|
1242
1253
|
width: e?.width ?? window.innerWidth,
|
|
1243
1254
|
height: e?.height ?? window.innerHeight,
|
|
1244
|
-
touch:
|
|
1255
|
+
touch: zn()
|
|
1245
1256
|
});
|
|
1246
1257
|
}
|
|
1247
|
-
function
|
|
1258
|
+
function Vn(e, t, n) {
|
|
1248
1259
|
if (typeof document > "u") return;
|
|
1249
1260
|
let r = document.documentElement;
|
|
1250
1261
|
r.style.setProperty("--app-viewport-width", `${Math.round(e.width)}px`), r.style.setProperty("--app-viewport-height", `${Math.round(e.height)}px`), r.style.setProperty("--app-height", `${Math.round(e.height)}px`);
|
|
1251
1262
|
let i = t === "phone" || e.height <= n.landscapePhoneMaxHeight;
|
|
1252
1263
|
r.style.setProperty("--control-height", i ? "38px" : "30px"), r.style.setProperty("--control-line-height", i ? "36px" : "28px"), r.style.setProperty("--control-font-size", i ? "16px" : "12.5px");
|
|
1253
1264
|
}
|
|
1254
|
-
function
|
|
1255
|
-
let [i, a] = l(() =>
|
|
1265
|
+
function Hn({ children: e, breakpoints: t = Fn, viewportOverride: n, viewport: r = "auto" }) {
|
|
1266
|
+
let [i, a] = l(() => Rn(n ?? Bn())), c = r === "auto" ? In(i, t) : r;
|
|
1256
1267
|
o(() => {
|
|
1257
1268
|
if (n) {
|
|
1258
|
-
let e =
|
|
1259
|
-
a(e),
|
|
1269
|
+
let e = Rn(n);
|
|
1270
|
+
a(e), Vn(e, c, t);
|
|
1260
1271
|
return;
|
|
1261
1272
|
}
|
|
1262
1273
|
let e = () => {
|
|
1263
|
-
let e =
|
|
1264
|
-
a(e),
|
|
1274
|
+
let e = Bn();
|
|
1275
|
+
a(e), Vn(e, c, t);
|
|
1265
1276
|
};
|
|
1266
1277
|
return e(), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), window.visualViewport?.addEventListener("resize", e), window.visualViewport?.addEventListener("scroll", e), () => {
|
|
1267
1278
|
window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e), window.visualViewport?.removeEventListener("resize", e), window.visualViewport?.removeEventListener("scroll", e);
|
|
@@ -1281,31 +1292,31 @@ function Bn({ children: e, breakpoints: t = Nn, viewportOverride: n, viewport: r
|
|
|
1281
1292
|
isDesktop: c === "desktop",
|
|
1282
1293
|
touch: i.touch ?? !1
|
|
1283
1294
|
}), [c, i]);
|
|
1284
|
-
return /* @__PURE__ */ f(
|
|
1295
|
+
return /* @__PURE__ */ f(Ln.Provider, {
|
|
1285
1296
|
value: u,
|
|
1286
1297
|
children: e
|
|
1287
1298
|
});
|
|
1288
1299
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return a(
|
|
1300
|
+
function Un() {
|
|
1301
|
+
return a(Ln);
|
|
1291
1302
|
}
|
|
1292
1303
|
//#endregion
|
|
1293
1304
|
//#region src/api/data.ts
|
|
1294
|
-
function
|
|
1305
|
+
function Wn(e, t) {
|
|
1295
1306
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
1296
1307
|
if (t.page && n.searchParams.set("page", String(t.page)), t.per_page && n.searchParams.set("per_page", String(t.per_page)), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.expand) for (let e of t.expand) n.searchParams.append("expand", e);
|
|
1297
1308
|
return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), t.count && n.searchParams.set("count", t.count), n.pathname + n.search;
|
|
1298
1309
|
}
|
|
1299
|
-
async function
|
|
1300
|
-
if (
|
|
1301
|
-
let n =
|
|
1310
|
+
async function Gn(e, t = {}, n = {}) {
|
|
1311
|
+
if (ar) {
|
|
1312
|
+
let n = ar(e, t);
|
|
1302
1313
|
if (n !== void 0) return n;
|
|
1303
1314
|
}
|
|
1304
|
-
return H(
|
|
1315
|
+
return H(Wn(e, t), { signal: n.signal });
|
|
1305
1316
|
}
|
|
1306
|
-
async function
|
|
1307
|
-
if (
|
|
1308
|
-
let n =
|
|
1317
|
+
async function Kn(e, t, n = {}) {
|
|
1318
|
+
if (or) {
|
|
1319
|
+
let n = or(e, t);
|
|
1309
1320
|
if (n !== void 0) return n;
|
|
1310
1321
|
}
|
|
1311
1322
|
let r = new URLSearchParams();
|
|
@@ -1313,39 +1324,39 @@ async function Wn(e, t, n = {}) {
|
|
|
1313
1324
|
else for (let [e, n] of Object.entries(t)) r.set(e, n);
|
|
1314
1325
|
return n.expand?.length && r.set("expand", n.expand.join(",")), H(`/api/data/${e}?${r.toString()}`);
|
|
1315
1326
|
}
|
|
1316
|
-
async function
|
|
1327
|
+
async function qn(e, t) {
|
|
1317
1328
|
return { data: ((await X(`${e}.__create`, {
|
|
1318
1329
|
entity: e,
|
|
1319
1330
|
fields: t
|
|
1320
1331
|
})).result?.rows ?? [])[0] };
|
|
1321
1332
|
}
|
|
1322
|
-
async function
|
|
1323
|
-
let r = typeof t == "string" ? t :
|
|
1333
|
+
async function Jn(e, t, n) {
|
|
1334
|
+
let r = typeof t == "string" ? t : Xn(t);
|
|
1324
1335
|
return { data: ((await X(`${e}.__update`, {
|
|
1325
1336
|
object_ids: [r],
|
|
1326
1337
|
entity: e,
|
|
1327
1338
|
fields: n
|
|
1328
1339
|
})).result?.rows ?? [])[0] };
|
|
1329
1340
|
}
|
|
1330
|
-
async function
|
|
1331
|
-
let n = typeof t == "string" ? t :
|
|
1341
|
+
async function Yn(e, t) {
|
|
1342
|
+
let n = typeof t == "string" ? t : Xn(t);
|
|
1332
1343
|
await X(`${e}.__delete`, {
|
|
1333
1344
|
object_ids: [n],
|
|
1334
1345
|
entity: e
|
|
1335
1346
|
});
|
|
1336
1347
|
}
|
|
1337
|
-
function
|
|
1348
|
+
function Xn(e) {
|
|
1338
1349
|
let t = Object.values(e);
|
|
1339
1350
|
return t.length === 1 ? t[0] : t.join("");
|
|
1340
1351
|
}
|
|
1341
|
-
async function
|
|
1342
|
-
let n = typeof t == "string" ? t :
|
|
1352
|
+
async function Zn(e, t) {
|
|
1353
|
+
let n = typeof t == "string" ? t : Xn(t);
|
|
1343
1354
|
await X(`${e}.__restore`, {
|
|
1344
1355
|
object_ids: [n],
|
|
1345
1356
|
entity: e
|
|
1346
1357
|
});
|
|
1347
1358
|
}
|
|
1348
|
-
async function
|
|
1359
|
+
async function Qn(e, t) {
|
|
1349
1360
|
let n = await lt(`/api/data/${e}/export`, {
|
|
1350
1361
|
method: "POST",
|
|
1351
1362
|
body: JSON.stringify(t)
|
|
@@ -1355,76 +1366,76 @@ async function Xn(e, t) {
|
|
|
1355
1366
|
filename: n.filename
|
|
1356
1367
|
};
|
|
1357
1368
|
}
|
|
1358
|
-
function
|
|
1369
|
+
function $n(e) {
|
|
1359
1370
|
return !!e && ((e.failed_count ?? 0) > 0 || (e.timed_out_count ?? 0) > 0);
|
|
1360
1371
|
}
|
|
1361
|
-
var
|
|
1372
|
+
var er = class extends Error {
|
|
1362
1373
|
status;
|
|
1363
1374
|
response;
|
|
1364
1375
|
constructor(e, t) {
|
|
1365
1376
|
super(t.errors?.[0]?.error?.title ?? ""), this.name = "ActionBatchError", this.status = e, this.response = t;
|
|
1366
1377
|
}
|
|
1367
1378
|
};
|
|
1368
|
-
function
|
|
1379
|
+
function tr(e) {
|
|
1369
1380
|
if (!e || typeof e != "object") return !1;
|
|
1370
1381
|
let t = e;
|
|
1371
1382
|
return typeof t.status == "string" && Array.isArray(t.errors);
|
|
1372
1383
|
}
|
|
1373
|
-
function
|
|
1384
|
+
function nr(e, t) {
|
|
1374
1385
|
let n = { ...e ?? {} };
|
|
1375
1386
|
if ("object_ids" in n) throw Error("handler param \"object_ids\" collides with reserved key");
|
|
1376
1387
|
return t !== void 0 && (n.object_ids = t), n;
|
|
1377
1388
|
}
|
|
1378
|
-
var
|
|
1379
|
-
function
|
|
1380
|
-
let t = tr;
|
|
1381
|
-
return tr = e, t;
|
|
1382
|
-
}
|
|
1383
|
-
var rr = null, ir = null;
|
|
1384
|
-
function ar(e) {
|
|
1389
|
+
var rr = null;
|
|
1390
|
+
function ir(e) {
|
|
1385
1391
|
let t = rr;
|
|
1386
1392
|
return rr = e, t;
|
|
1387
1393
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1394
|
+
var ar = null, or = null;
|
|
1395
|
+
function sr(e) {
|
|
1396
|
+
let t = ar;
|
|
1397
|
+
return ar = e, t;
|
|
1398
|
+
}
|
|
1399
|
+
function cr(e) {
|
|
1400
|
+
let t = or;
|
|
1401
|
+
return or = e, t;
|
|
1391
1402
|
}
|
|
1392
1403
|
async function X(e, t) {
|
|
1393
|
-
if (
|
|
1404
|
+
if (rr) return rr(e, t);
|
|
1394
1405
|
try {
|
|
1395
1406
|
return await H(`/api/actions/${e}`, {
|
|
1396
1407
|
method: "POST",
|
|
1397
1408
|
body: JSON.stringify(t)
|
|
1398
1409
|
});
|
|
1399
1410
|
} catch (e) {
|
|
1400
|
-
throw e instanceof _ &&
|
|
1411
|
+
throw e instanceof _ && tr(e.raw) ? new er(e.status, e.raw) : e;
|
|
1401
1412
|
}
|
|
1402
1413
|
}
|
|
1403
|
-
async function
|
|
1414
|
+
async function lr(e, t) {
|
|
1404
1415
|
let n = new URLSearchParams();
|
|
1405
1416
|
return n.set("ids", t.join(",")), H(`/api/associations/${e}?${n.toString()}`);
|
|
1406
1417
|
}
|
|
1407
1418
|
//#endregion
|
|
1408
1419
|
//#region src/lib/safe-url.ts
|
|
1409
|
-
var
|
|
1420
|
+
var ur = [
|
|
1410
1421
|
"http:",
|
|
1411
1422
|
"https:",
|
|
1412
1423
|
"mailto:"
|
|
1413
|
-
],
|
|
1414
|
-
function
|
|
1424
|
+
], dr = /[\u0000-\u001f\u007f]/g;
|
|
1425
|
+
function fr(e) {
|
|
1415
1426
|
if (!e) return;
|
|
1416
1427
|
let t = e.trim();
|
|
1417
1428
|
if (!t) return;
|
|
1418
|
-
let n = t.replace(
|
|
1429
|
+
let n = t.replace(dr, "");
|
|
1419
1430
|
if (!n || n.startsWith("//")) return;
|
|
1420
1431
|
let r = n.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);
|
|
1421
1432
|
if (r) {
|
|
1422
1433
|
let e = r[1].toLowerCase() + ":";
|
|
1423
|
-
if (!
|
|
1434
|
+
if (!ur.includes(e)) return;
|
|
1424
1435
|
}
|
|
1425
1436
|
return n;
|
|
1426
1437
|
}
|
|
1427
|
-
function
|
|
1438
|
+
function pr(e) {
|
|
1428
1439
|
if (!e) return !1;
|
|
1429
1440
|
if (e.startsWith("//")) return !0;
|
|
1430
1441
|
let t = typeof window < "u" ? window.location.href : "http://localhost/", n;
|
|
@@ -1439,30 +1450,30 @@ function dr(e) {
|
|
|
1439
1450
|
}
|
|
1440
1451
|
//#endregion
|
|
1441
1452
|
//#region src/lib/download.ts
|
|
1442
|
-
var
|
|
1453
|
+
var mr = class extends Error {
|
|
1443
1454
|
code;
|
|
1444
1455
|
constructor(e, t) {
|
|
1445
1456
|
super(e), this.code = t, this.name = "DownloadError";
|
|
1446
1457
|
}
|
|
1447
1458
|
};
|
|
1448
|
-
function
|
|
1449
|
-
return e instanceof
|
|
1459
|
+
function hr(e) {
|
|
1460
|
+
return e instanceof mr && e.code === "file.not_found";
|
|
1450
1461
|
}
|
|
1451
|
-
async function
|
|
1452
|
-
let r =
|
|
1453
|
-
if (!r) throw new
|
|
1462
|
+
async function gr(e, t, n) {
|
|
1463
|
+
let r = fr(t);
|
|
1464
|
+
if (!r) throw new mr(e("file.download_url_unsafe", "This download address is not allowed."));
|
|
1454
1465
|
let i = await fetch(at(r), { credentials: "same-origin" });
|
|
1455
1466
|
if (!i.ok) {
|
|
1456
|
-
let t = await
|
|
1457
|
-
throw new
|
|
1467
|
+
let t = await vr(i);
|
|
1468
|
+
throw new mr(t.message || e("file.download_failed", "The file could not be downloaded."), t.code);
|
|
1458
1469
|
}
|
|
1459
|
-
|
|
1470
|
+
_r(await i.blob(), n);
|
|
1460
1471
|
}
|
|
1461
|
-
function
|
|
1472
|
+
function _r(e, t) {
|
|
1462
1473
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
1463
1474
|
r.href = n, t && (r.download = t), document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 0);
|
|
1464
1475
|
}
|
|
1465
|
-
async function
|
|
1476
|
+
async function vr(e) {
|
|
1466
1477
|
try {
|
|
1467
1478
|
let t = JSON.parse(await e.text());
|
|
1468
1479
|
if (y(t)) return {
|
|
@@ -1476,17 +1487,17 @@ async function gr(e) {
|
|
|
1476
1487
|
}
|
|
1477
1488
|
//#endregion
|
|
1478
1489
|
//#region src/lib/failure.ts
|
|
1479
|
-
function
|
|
1480
|
-
return t instanceof _ ? t.message || e(t.code, "") || e("platform.unavailable", "This service is temporarily unavailable.") : t instanceof
|
|
1490
|
+
function yr(e, t) {
|
|
1491
|
+
return t instanceof _ ? t.message || e(t.code, "") || e("platform.unavailable", "This service is temporarily unavailable.") : t instanceof er ? t.message || e("action.all_items_failed", "The action failed for every selected record.") : t instanceof mr ? t.message : e("platform.internal_error", "Something went wrong on our side.");
|
|
1481
1492
|
}
|
|
1482
1493
|
//#endregion
|
|
1483
1494
|
//#region src/embed/embed-dirty.ts
|
|
1484
|
-
var
|
|
1495
|
+
var br = m((e) => ({
|
|
1485
1496
|
isDirty: !1,
|
|
1486
1497
|
setDirty: (t) => e((e) => e.isDirty === t ? e : { isDirty: t })
|
|
1487
1498
|
}));
|
|
1488
|
-
function
|
|
1489
|
-
let n =
|
|
1499
|
+
function xr(e, t) {
|
|
1500
|
+
let n = br((e) => e.setDirty);
|
|
1490
1501
|
o(() => {
|
|
1491
1502
|
t && n(e);
|
|
1492
1503
|
}, [
|
|
@@ -1499,7 +1510,7 @@ function yr(e, t) {
|
|
|
1499
1510
|
}
|
|
1500
1511
|
//#endregion
|
|
1501
1512
|
//#region src/embed/embed-nav-guard.ts
|
|
1502
|
-
var
|
|
1513
|
+
var Sr = m((e, t) => ({
|
|
1503
1514
|
pendingNavigation: null,
|
|
1504
1515
|
requestNavigation: (t) => e({ pendingNavigation: t }),
|
|
1505
1516
|
confirmNavigation: () => {
|
|
@@ -1510,18 +1521,18 @@ var br = m((e, t) => ({
|
|
|
1510
1521
|
}));
|
|
1511
1522
|
//#endregion
|
|
1512
1523
|
//#region src/embed/screen-location.ts
|
|
1513
|
-
function
|
|
1524
|
+
function Cr(e) {
|
|
1514
1525
|
let t = e.replace(/\/+$/, "").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
1515
1526
|
return RegExp("^" + t.join("/") + "$");
|
|
1516
1527
|
}
|
|
1517
|
-
function
|
|
1528
|
+
function wr(e, t) {
|
|
1518
1529
|
let n = e.replace(/\/+$/, "") || "/";
|
|
1519
1530
|
if (!t) return {
|
|
1520
1531
|
matched: !1,
|
|
1521
1532
|
payload: { route: e }
|
|
1522
1533
|
};
|
|
1523
1534
|
let r, i, a, o;
|
|
1524
|
-
for (let [e, s] of Object.entries(t)) if (s.route &&
|
|
1535
|
+
for (let [e, s] of Object.entries(t)) if (s.route && Cr(s.route).test(n)) {
|
|
1525
1536
|
if (s.route.includes("/:")) a || (a = s, o = e);
|
|
1526
1537
|
else {
|
|
1527
1538
|
r = s, i = e;
|
|
@@ -1548,34 +1559,34 @@ function Sr(e, t) {
|
|
|
1548
1559
|
payload: l
|
|
1549
1560
|
};
|
|
1550
1561
|
}
|
|
1551
|
-
function
|
|
1552
|
-
return
|
|
1562
|
+
function Tr(e, t) {
|
|
1563
|
+
return wr(e, t).payload;
|
|
1553
1564
|
}
|
|
1554
1565
|
//#endregion
|
|
1555
1566
|
//#region src/embed/useEmbedNavigate.ts
|
|
1556
|
-
function
|
|
1567
|
+
function Er(e) {
|
|
1557
1568
|
let t = e.search(/[?#]/);
|
|
1558
1569
|
return t === -1 ? e : e.slice(0, t);
|
|
1559
1570
|
}
|
|
1560
|
-
function
|
|
1571
|
+
function Dr() {
|
|
1561
1572
|
let e = h(), t = ee(), n = q(), { data: r } = J();
|
|
1562
1573
|
return i((i, a) => {
|
|
1563
1574
|
if (!n.enabled) return e(i, a), !0;
|
|
1564
|
-
let o = r?.screens, s =
|
|
1575
|
+
let o = r?.screens, s = wr(Er(i), o), c = br.getState().isDirty && Er(i) !== t.pathname;
|
|
1565
1576
|
if (o && !s.matched) return D(n.parentOrigin, E.navigationFailed, {
|
|
1566
|
-
route:
|
|
1577
|
+
route: Er(i),
|
|
1567
1578
|
reason: "unresolved"
|
|
1568
1579
|
}), !1;
|
|
1569
1580
|
if (n.navigationMode === "delegated") {
|
|
1570
1581
|
let e = () => {
|
|
1571
1582
|
D(n.parentOrigin, E.navigationRequested, s.payload);
|
|
1572
1583
|
};
|
|
1573
|
-
return c ? (
|
|
1584
|
+
return c ? (Sr.getState().requestNavigation(e), !1) : (e(), !1);
|
|
1574
1585
|
}
|
|
1575
1586
|
let l = () => {
|
|
1576
1587
|
e(n.appendEmbedParams(i), a);
|
|
1577
1588
|
};
|
|
1578
|
-
return c ? (
|
|
1589
|
+
return c ? (Sr.getState().requestNavigation(l), !1) : (l(), !0);
|
|
1579
1590
|
}, [
|
|
1580
1591
|
e,
|
|
1581
1592
|
t.pathname,
|
|
@@ -1583,22 +1594,22 @@ function Tr() {
|
|
|
1583
1594
|
r?.screens
|
|
1584
1595
|
]);
|
|
1585
1596
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let e =
|
|
1597
|
+
function Or() {
|
|
1598
|
+
let e = Dr();
|
|
1588
1599
|
return i((t, n) => {
|
|
1589
1600
|
e(t, n);
|
|
1590
1601
|
}, [e]);
|
|
1591
1602
|
}
|
|
1592
|
-
function
|
|
1603
|
+
function kr() {
|
|
1593
1604
|
let e = h();
|
|
1594
1605
|
return i(() => {
|
|
1595
1606
|
let t = () => {
|
|
1596
1607
|
e(-1);
|
|
1597
1608
|
};
|
|
1598
|
-
|
|
1609
|
+
br.getState().isDirty ? Sr.getState().requestNavigation(t) : t();
|
|
1599
1610
|
}, [e]);
|
|
1600
1611
|
}
|
|
1601
|
-
function
|
|
1612
|
+
function Ar() {
|
|
1602
1613
|
let e = q();
|
|
1603
1614
|
return i((t, n) => {
|
|
1604
1615
|
e.enabled && D(e.parentOrigin, E.navigationFailed, {
|
|
@@ -1609,7 +1620,7 @@ function Or() {
|
|
|
1609
1620
|
}
|
|
1610
1621
|
//#endregion
|
|
1611
1622
|
//#region src/components/shared/toast/DeclarionToast.tsx
|
|
1612
|
-
var
|
|
1623
|
+
var jr = {
|
|
1613
1624
|
success: {
|
|
1614
1625
|
tone: "success",
|
|
1615
1626
|
defaultTitle: (e) => e("toast.title.success", "Success")
|
|
@@ -1630,8 +1641,8 @@ var kr = {
|
|
|
1630
1641
|
tone: "info",
|
|
1631
1642
|
defaultTitle: (e) => e("toast.title.loading", "Working…")
|
|
1632
1643
|
}
|
|
1633
|
-
},
|
|
1634
|
-
function
|
|
1644
|
+
}, Mr = 200;
|
|
1645
|
+
function Nr({ type: t }) {
|
|
1635
1646
|
let n = { display: "flex" };
|
|
1636
1647
|
if (t === "loading") return /* @__PURE__ */ f("span", {
|
|
1637
1648
|
style: {
|
|
@@ -1646,9 +1657,9 @@ function jr({ type: t }) {
|
|
|
1646
1657
|
children: /* @__PURE__ */ f(r, { size: 11 })
|
|
1647
1658
|
});
|
|
1648
1659
|
}
|
|
1649
|
-
function
|
|
1650
|
-
let r =
|
|
1651
|
-
ne.current || (ne.current = !0, v(!0), window.setTimeout(n,
|
|
1660
|
+
function Pr({ model: t, onClose: n }) {
|
|
1661
|
+
let r = Pn(), a = jr[t.type] ?? jr.info, s = a.tone, [u, d] = l(!1), [m, ee] = l(!1), [h, g] = l(!1), [_, v] = l(!1), [y, te] = l(1), b = c(t.duration), ne = c(!1), x = !t.sticky && t.duration > 0, S = i(() => {
|
|
1662
|
+
ne.current || (ne.current = !0, v(!0), window.setTimeout(n, Mr));
|
|
1652
1663
|
}, [n]);
|
|
1653
1664
|
o(() => {
|
|
1654
1665
|
b.current = t.duration, te(1);
|
|
@@ -1697,7 +1708,7 @@ function Mr({ model: t, onClose: n }) {
|
|
|
1697
1708
|
boxShadow: "var(--shadow-toast)",
|
|
1698
1709
|
overflow: "hidden",
|
|
1699
1710
|
position: "relative",
|
|
1700
|
-
animation: _ ? `dz-toast-out ${
|
|
1711
|
+
animation: _ ? `dz-toast-out ${Mr}ms ease-in forwards` : "dz-toast-in 0.24s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
1701
1712
|
},
|
|
1702
1713
|
children: [/* @__PURE__ */ p("div", {
|
|
1703
1714
|
style: {
|
|
@@ -1719,7 +1730,7 @@ function Mr({ model: t, onClose: n }) {
|
|
|
1719
1730
|
justifyContent: "center",
|
|
1720
1731
|
color: w("")
|
|
1721
1732
|
},
|
|
1722
|
-
children: /* @__PURE__ */ f(
|
|
1733
|
+
children: /* @__PURE__ */ f(Nr, { type: t.type })
|
|
1723
1734
|
}),
|
|
1724
1735
|
/* @__PURE__ */ p("div", {
|
|
1725
1736
|
style: {
|
|
@@ -1912,28 +1923,28 @@ function Mr({ model: t, onClose: n }) {
|
|
|
1912
1923
|
}
|
|
1913
1924
|
//#endregion
|
|
1914
1925
|
//#region src/lib/toast.tsx
|
|
1915
|
-
var
|
|
1926
|
+
var Fr = {
|
|
1916
1927
|
success: 4e3,
|
|
1917
1928
|
info: 6e3,
|
|
1918
1929
|
warning: 8e3,
|
|
1919
1930
|
error: 0,
|
|
1920
1931
|
loading: 0
|
|
1921
|
-
}, Z = /* @__PURE__ */ new Map(),
|
|
1922
|
-
function
|
|
1923
|
-
g.custom(() => /* @__PURE__ */ f(
|
|
1932
|
+
}, Z = /* @__PURE__ */ new Map(), Ir = /* @__PURE__ */ new Map(), Lr = 0, Rr = () => `dz-${++Lr}`;
|
|
1933
|
+
function zr(e) {
|
|
1934
|
+
g.custom(() => /* @__PURE__ */ f(Pr, {
|
|
1924
1935
|
model: e,
|
|
1925
1936
|
onClose: () => g.dismiss(e.id)
|
|
1926
1937
|
}), {
|
|
1927
1938
|
id: e.id,
|
|
1928
1939
|
duration: Infinity,
|
|
1929
1940
|
onDismiss: () => {
|
|
1930
|
-
Z.delete(String(e.id)), e.group &&
|
|
1941
|
+
Z.delete(String(e.id)), e.group && Ir.get(e.group) === e.id && Ir.delete(e.group);
|
|
1931
1942
|
}
|
|
1932
1943
|
});
|
|
1933
1944
|
}
|
|
1934
1945
|
function Q(e, t, n, r = {}) {
|
|
1935
1946
|
if (r.group) {
|
|
1936
|
-
let e =
|
|
1947
|
+
let e = Ir.get(r.group);
|
|
1937
1948
|
if (e && Z.has(e)) {
|
|
1938
1949
|
let r = Z.get(e), i = {
|
|
1939
1950
|
...r,
|
|
@@ -1942,10 +1953,10 @@ function Q(e, t, n, r = {}) {
|
|
|
1942
1953
|
count: (r.count ?? 1) + 1,
|
|
1943
1954
|
createdAt: Date.now()
|
|
1944
1955
|
};
|
|
1945
|
-
return Z.set(e, i),
|
|
1956
|
+
return Z.set(e, i), zr(i), e;
|
|
1946
1957
|
}
|
|
1947
1958
|
}
|
|
1948
|
-
let i = r.id ??
|
|
1959
|
+
let i = r.id ?? Rr(), a = r.duration ?? Fr[e], o = {
|
|
1949
1960
|
id: i,
|
|
1950
1961
|
type: e,
|
|
1951
1962
|
title: t,
|
|
@@ -1959,12 +1970,12 @@ function Q(e, t, n, r = {}) {
|
|
|
1959
1970
|
createdAt: Date.now(),
|
|
1960
1971
|
group: r.group
|
|
1961
1972
|
};
|
|
1962
|
-
return Z.set(i, o), r.group &&
|
|
1973
|
+
return Z.set(i, o), r.group && Ir.set(r.group, i), zr(o), i;
|
|
1963
1974
|
}
|
|
1964
|
-
function
|
|
1975
|
+
function Br(e, t) {
|
|
1965
1976
|
let n = Z.get(e);
|
|
1966
1977
|
if (!n) return;
|
|
1967
|
-
let r = t.type ?? n.type, i = t.duration ?? (t.type ?
|
|
1978
|
+
let r = t.type ?? n.type, i = t.duration ?? (t.type ? Fr[r] : n.duration), a = {
|
|
1968
1979
|
...n,
|
|
1969
1980
|
...t,
|
|
1970
1981
|
type: r,
|
|
@@ -1972,27 +1983,27 @@ function Rr(e, t) {
|
|
|
1972
1983
|
sticky: t.sticky ?? i === 0,
|
|
1973
1984
|
createdAt: Date.now()
|
|
1974
1985
|
};
|
|
1975
|
-
Z.set(e, a),
|
|
1986
|
+
Z.set(e, a), zr(a);
|
|
1976
1987
|
}
|
|
1977
|
-
var
|
|
1988
|
+
var Vr = {
|
|
1978
1989
|
success: (e, t, n) => Q("success", e, t, n),
|
|
1979
1990
|
info: (e, t, n) => Q("info", e, t, n),
|
|
1980
1991
|
warning: (e, t, n) => Q("warning", e, t, n),
|
|
1981
1992
|
error: (e, t, n) => Q("error", e, t, n),
|
|
1982
1993
|
loading: (e, t, n) => Q("loading", e, t, n),
|
|
1983
|
-
update:
|
|
1994
|
+
update: Br,
|
|
1984
1995
|
dismiss: (e) => g.dismiss(e),
|
|
1985
1996
|
dismissAll: () => g.dismiss()
|
|
1986
|
-
},
|
|
1997
|
+
}, Hr = {
|
|
1987
1998
|
__create: "create",
|
|
1988
1999
|
__edit: "update",
|
|
1989
2000
|
__delete: "delete",
|
|
1990
2001
|
__restore: "restore"
|
|
1991
|
-
},
|
|
1992
|
-
function
|
|
2002
|
+
}, Ur = "__peek", Wr = "__open", Gr = "__edit";
|
|
2003
|
+
function Kr(e) {
|
|
1993
2004
|
return e === "__peek" || e === "__open";
|
|
1994
2005
|
}
|
|
1995
|
-
function
|
|
2006
|
+
function qr(e, t) {
|
|
1996
2007
|
if (!e) return "";
|
|
1997
2008
|
if (t) try {
|
|
1998
2009
|
return Nt(t, At(t, e));
|
|
@@ -2007,23 +2018,23 @@ function $(e, t) {
|
|
|
2007
2018
|
let e = t.status;
|
|
2008
2019
|
if (typeof e != "string" || !n.status.includes(e)) return !1;
|
|
2009
2020
|
}
|
|
2010
|
-
if (n.field && !
|
|
2021
|
+
if (n.field && !Yr(n, t)) return !1;
|
|
2011
2022
|
}
|
|
2012
2023
|
return !0;
|
|
2013
2024
|
}
|
|
2014
|
-
function
|
|
2025
|
+
function Jr(e, t) {
|
|
2015
2026
|
return t.startsWith("$status.") ? !Array.isArray(e.$statuses) : t.startsWith("$property.") ? !Array.isArray(e.$properties) : !1;
|
|
2016
2027
|
}
|
|
2017
|
-
function
|
|
2018
|
-
if (
|
|
2019
|
-
let n =
|
|
2028
|
+
function Yr(e, t) {
|
|
2029
|
+
if (Jr(t, e.field)) return !1;
|
|
2030
|
+
let n = Xr(t, e.field), r = e.op || "eq";
|
|
2020
2031
|
if (r === "in" || r === "not_in") {
|
|
2021
2032
|
let t = Array.isArray(e.value) ? e.value : [e.value], i = G(n), a = t.some((e) => G(e) === i);
|
|
2022
2033
|
return r === "in" ? a : !a;
|
|
2023
2034
|
}
|
|
2024
|
-
return typeof e.value == "boolean" && r === "eq" ?
|
|
2035
|
+
return typeof e.value == "boolean" && r === "eq" ? Qr(n) === e.value : typeof n == "number" && typeof e.value == "number" ? $r(n, e.value, r) : $r(G(n), G(e.value), r);
|
|
2025
2036
|
}
|
|
2026
|
-
function
|
|
2037
|
+
function Xr(e, t) {
|
|
2027
2038
|
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
2028
2039
|
if (t.startsWith("$status.")) {
|
|
2029
2040
|
let n = t.slice(8), r = e.$statuses;
|
|
@@ -2034,27 +2045,27 @@ function Jr(e, t) {
|
|
|
2034
2045
|
return Array.isArray(r) ? r.find((e) => !e || typeof e != "object" ? !1 : e.property_code === n)?.value : void 0;
|
|
2035
2046
|
}
|
|
2036
2047
|
}
|
|
2037
|
-
function
|
|
2048
|
+
function Zr(e) {
|
|
2038
2049
|
let t = null, n = (n, r) => {
|
|
2039
2050
|
Object.prototype.hasOwnProperty.call(e, n) || (t === null && (t = { ...e }), t[n] = r);
|
|
2040
2051
|
}, r = e.$statuses;
|
|
2041
2052
|
if (Array.isArray(r)) for (let t of r) {
|
|
2042
2053
|
if (!t || typeof t != "object") continue;
|
|
2043
2054
|
let r = t.group_code;
|
|
2044
|
-
typeof r == "string" && n(`$status.${r}`,
|
|
2055
|
+
typeof r == "string" && n(`$status.${r}`, Xr(e, `$status.${r}`));
|
|
2045
2056
|
}
|
|
2046
2057
|
let i = e.$properties;
|
|
2047
2058
|
if (Array.isArray(i)) for (let t of i) {
|
|
2048
2059
|
if (!t || typeof t != "object") continue;
|
|
2049
2060
|
let r = t.property_code;
|
|
2050
|
-
typeof r == "string" && n(`$property.${r}`,
|
|
2061
|
+
typeof r == "string" && n(`$property.${r}`, Xr(e, `$property.${r}`));
|
|
2051
2062
|
}
|
|
2052
2063
|
return t ?? e;
|
|
2053
2064
|
}
|
|
2054
|
-
function
|
|
2065
|
+
function Qr(e) {
|
|
2055
2066
|
return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e !== "" : typeof e != "number" || e !== 0;
|
|
2056
2067
|
}
|
|
2057
|
-
function
|
|
2068
|
+
function $r(e, t, n) {
|
|
2058
2069
|
switch (n) {
|
|
2059
2070
|
case "eq": return e === t;
|
|
2060
2071
|
case "ne": return e !== t;
|
|
@@ -2067,14 +2078,14 @@ function Zr(e, t, n) {
|
|
|
2067
2078
|
default: return !1;
|
|
2068
2079
|
}
|
|
2069
2080
|
}
|
|
2070
|
-
function
|
|
2081
|
+
function ei(e, t) {
|
|
2071
2082
|
return e ? Object.entries(e).filter(([, e]) => e.visibility?.includes(t)).map(([e, t]) => ({
|
|
2072
2083
|
code: e,
|
|
2073
2084
|
action: t
|
|
2074
2085
|
})) : [];
|
|
2075
2086
|
}
|
|
2076
|
-
function
|
|
2077
|
-
return !e && !r ? [] : t === void 0 ?
|
|
2087
|
+
function ti(e, t, n, r) {
|
|
2088
|
+
return !e && !r ? [] : t === void 0 ? ei(e, n) : t.map((t) => {
|
|
2078
2089
|
let n = e?.[t] ?? r?.[t];
|
|
2079
2090
|
return n ? {
|
|
2080
2091
|
code: t,
|
|
@@ -2082,30 +2093,30 @@ function $r(e, t, n, r) {
|
|
|
2082
2093
|
} : null;
|
|
2083
2094
|
}).filter((e) => e !== null);
|
|
2084
2095
|
}
|
|
2085
|
-
function
|
|
2096
|
+
function ni(e, t) {
|
|
2086
2097
|
return e.filter(({ code: e }) => {
|
|
2087
|
-
let n =
|
|
2098
|
+
let n = Hr[e];
|
|
2088
2099
|
return !n || Ot(t, n);
|
|
2089
2100
|
});
|
|
2090
2101
|
}
|
|
2091
|
-
function
|
|
2102
|
+
function ri(e) {
|
|
2092
2103
|
return !!e?.confirmation && Object.keys(e.confirmation).length > 0;
|
|
2093
2104
|
}
|
|
2094
|
-
function
|
|
2095
|
-
return
|
|
2105
|
+
function ii(e, t) {
|
|
2106
|
+
return ri(t) ? e(t.confirmation) : t?.destructive ? e("action.confirm.destructive", "This action cannot be undone.") : null;
|
|
2096
2107
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return
|
|
2108
|
+
function ai(e) {
|
|
2109
|
+
return ri(e) || !!e?.destructive;
|
|
2099
2110
|
}
|
|
2100
|
-
function
|
|
2111
|
+
function oi(e, t, n, r, i, a = !1) {
|
|
2101
2112
|
if (r && i) return i;
|
|
2102
2113
|
let o = e(t?.display?.description);
|
|
2103
2114
|
return o ? a || t?.display?.icon_only === !0 ? `${n}\n${o}` : o : n;
|
|
2104
2115
|
}
|
|
2105
|
-
function
|
|
2116
|
+
function si(e) {
|
|
2106
2117
|
return !!e.association;
|
|
2107
2118
|
}
|
|
2108
|
-
function
|
|
2119
|
+
function ci(e, t) {
|
|
2109
2120
|
if (e) {
|
|
2110
2121
|
for (let n of Object.values(e.screens)) if (n.entity === t && n.type === "list") {
|
|
2111
2122
|
let r = e.entities[t];
|
|
@@ -2116,21 +2127,21 @@ function oi(e, t) {
|
|
|
2116
2127
|
}
|
|
2117
2128
|
}
|
|
2118
2129
|
}
|
|
2119
|
-
function
|
|
2130
|
+
function li(e, t, n, r, i, a, o) {
|
|
2120
2131
|
let s = [];
|
|
2121
2132
|
for (let c of t) {
|
|
2122
|
-
let t =
|
|
2133
|
+
let t = ui(e, c, n, r, i, a, o);
|
|
2123
2134
|
t !== null && s.push(t);
|
|
2124
2135
|
}
|
|
2125
2136
|
return s;
|
|
2126
2137
|
}
|
|
2127
|
-
function
|
|
2128
|
-
return t.kind === "group" ?
|
|
2138
|
+
function ui(e, t, n, r, i, a, o) {
|
|
2139
|
+
return t.kind === "group" ? di(e, t, n, r, i, a, o) : fi(e, t, n, r, i, a, o);
|
|
2129
2140
|
}
|
|
2130
|
-
function
|
|
2141
|
+
function di(e, t, n, r, i, a, o) {
|
|
2131
2142
|
let s = [];
|
|
2132
2143
|
for (let c of t.items) {
|
|
2133
|
-
let t =
|
|
2144
|
+
let t = ui(e, c, n, r, i, a, o);
|
|
2134
2145
|
t !== null && s.push(t);
|
|
2135
2146
|
}
|
|
2136
2147
|
return s.length === 0 ? null : {
|
|
@@ -2138,28 +2149,28 @@ function li(e, t, n, r, i, a, o) {
|
|
|
2138
2149
|
items: s
|
|
2139
2150
|
};
|
|
2140
2151
|
}
|
|
2141
|
-
function
|
|
2152
|
+
function fi(e, t, n, r, i, a, o) {
|
|
2142
2153
|
if (o && !t.code.startsWith("__") && !o.has(t.code)) return null;
|
|
2143
|
-
let s =
|
|
2154
|
+
let s = hi(t.code, n, r);
|
|
2144
2155
|
if (!s) return null;
|
|
2145
2156
|
if (a.length > 0) {
|
|
2146
|
-
let n =
|
|
2157
|
+
let n = pi(e, s, a);
|
|
2147
2158
|
return n.visible ? {
|
|
2148
2159
|
...t,
|
|
2149
2160
|
enabled: n.enabled,
|
|
2150
2161
|
reason: n.reason
|
|
2151
2162
|
} : null;
|
|
2152
2163
|
}
|
|
2153
|
-
if (!$(s.conditions, i) || !$(
|
|
2154
|
-
let { enabled: c, reason: l } =
|
|
2164
|
+
if (!$(s.conditions, i) || !$(gi(s.visible_if), i)) return null;
|
|
2165
|
+
let { enabled: c, reason: l } = mi(e, s, i);
|
|
2155
2166
|
return {
|
|
2156
2167
|
...t,
|
|
2157
2168
|
enabled: c,
|
|
2158
2169
|
reason: l
|
|
2159
2170
|
};
|
|
2160
2171
|
}
|
|
2161
|
-
function
|
|
2162
|
-
let r =
|
|
2172
|
+
function pi(e, t, n) {
|
|
2173
|
+
let r = gi(t.visible_if), i = gi(t.enabled_if), a = t.conditions, o = 0, s = 0;
|
|
2163
2174
|
for (let e of n) {
|
|
2164
2175
|
let t = $(r, e) && $(a, e);
|
|
2165
2176
|
t && o++;
|
|
@@ -2189,8 +2200,8 @@ function di(e, t, n) {
|
|
|
2189
2200
|
}) : e("action.bulk.rows_fail", "({failing} of {total} rows fail)", c)
|
|
2190
2201
|
};
|
|
2191
2202
|
}
|
|
2192
|
-
function
|
|
2193
|
-
let r =
|
|
2203
|
+
function mi(e, t, n) {
|
|
2204
|
+
let r = gi(t.enabled_if);
|
|
2194
2205
|
return !r || r.length === 0 || $(r, n) ? {
|
|
2195
2206
|
enabled: !0,
|
|
2196
2207
|
reason: null
|
|
@@ -2199,46 +2210,46 @@ function fi(e, t, n) {
|
|
|
2199
2210
|
reason: e(t.enabled_if_reason) || null
|
|
2200
2211
|
};
|
|
2201
2212
|
}
|
|
2202
|
-
function
|
|
2213
|
+
function hi(e, t, n) {
|
|
2203
2214
|
if (t && e in t) return t[e];
|
|
2204
2215
|
if (n && e in n) return n[e];
|
|
2205
2216
|
}
|
|
2206
|
-
function
|
|
2217
|
+
function gi(e) {
|
|
2207
2218
|
return e;
|
|
2208
2219
|
}
|
|
2209
|
-
function
|
|
2220
|
+
function _i(e, t, n, r, i) {
|
|
2210
2221
|
let a = [];
|
|
2211
2222
|
for (let o of e) {
|
|
2212
2223
|
if (o.kind === "group") {
|
|
2213
|
-
let e =
|
|
2224
|
+
let e = _i(o.items, t, n, r, i);
|
|
2214
2225
|
e.length > 0 && a.push({
|
|
2215
2226
|
...o,
|
|
2216
2227
|
items: e
|
|
2217
2228
|
});
|
|
2218
2229
|
continue;
|
|
2219
2230
|
}
|
|
2220
|
-
let e =
|
|
2231
|
+
let e = hi(o.code, t, n);
|
|
2221
2232
|
e && e.visibility?.includes(r) && (i?.bulkRequired === void 0 || (i.bulkRequiredPredicate ? i.bulkRequiredPredicate(e) : !1) === i.bulkRequired) && (i?.excludeIf && i.excludeIf(e) || a.push(o));
|
|
2222
2233
|
}
|
|
2223
2234
|
return a;
|
|
2224
2235
|
}
|
|
2225
|
-
function
|
|
2236
|
+
function vi(e, t, n, r, i, a) {
|
|
2226
2237
|
let o = e ?? t;
|
|
2227
|
-
return o ?
|
|
2238
|
+
return o ? _i(o, n, r, i, a) : Si(n, i);
|
|
2228
2239
|
}
|
|
2229
|
-
function
|
|
2230
|
-
return e.requires_selection === void 0 ?
|
|
2240
|
+
function yi(e) {
|
|
2241
|
+
return e.requires_selection === void 0 ? bi(e) : e.requires_selection;
|
|
2231
2242
|
}
|
|
2232
|
-
function
|
|
2243
|
+
function bi(e) {
|
|
2233
2244
|
return e.visibility?.includes("list_floatbar") ?? !1;
|
|
2234
2245
|
}
|
|
2235
|
-
function
|
|
2246
|
+
function xi(e, t, n, r, i) {
|
|
2236
2247
|
return e.map((e) => {
|
|
2237
2248
|
if (e.kind === "group") return {
|
|
2238
2249
|
...e,
|
|
2239
|
-
items:
|
|
2250
|
+
items: xi(e.items, t, n, r, i)
|
|
2240
2251
|
};
|
|
2241
|
-
let a =
|
|
2252
|
+
let a = hi(e.code, t, n);
|
|
2242
2253
|
return a && r(a) ? {
|
|
2243
2254
|
...e,
|
|
2244
2255
|
enabled: !1,
|
|
@@ -2246,7 +2257,7 @@ function yi(e, t, n, r, i) {
|
|
|
2246
2257
|
} : e;
|
|
2247
2258
|
});
|
|
2248
2259
|
}
|
|
2249
|
-
function
|
|
2260
|
+
function Si(e, t) {
|
|
2250
2261
|
return e ? Object.entries(e).filter(([, e]) => e.visibility?.includes(t)).sort(([e, t], [n, r]) => {
|
|
2251
2262
|
let i = t.position ?? 0, a = r.position ?? 0;
|
|
2252
2263
|
return i === a ? e < n ? -1 : +(e > n) : i - a;
|
|
@@ -2259,19 +2270,19 @@ function bi(e, t) {
|
|
|
2259
2270
|
}
|
|
2260
2271
|
//#endregion
|
|
2261
2272
|
//#region src/api/events.ts
|
|
2262
|
-
var
|
|
2263
|
-
function
|
|
2264
|
-
|
|
2273
|
+
var Ci = new EventTarget(), wi = "agent-frame", Ti = "agent-message-changed";
|
|
2274
|
+
function Ei(e) {
|
|
2275
|
+
Ci.dispatchEvent(new CustomEvent(wi, { detail: e }));
|
|
2265
2276
|
}
|
|
2266
|
-
var
|
|
2277
|
+
var Di = class extends Error {
|
|
2267
2278
|
constructor() {
|
|
2268
2279
|
super("SSE auth expired"), this.name = "SSEAuthError";
|
|
2269
2280
|
}
|
|
2270
|
-
},
|
|
2271
|
-
function
|
|
2272
|
-
return
|
|
2281
|
+
}, Oi;
|
|
2282
|
+
function ki() {
|
|
2283
|
+
return Oi;
|
|
2273
2284
|
}
|
|
2274
|
-
async function*
|
|
2285
|
+
async function* Ai(e = {}) {
|
|
2275
2286
|
let t = new Headers();
|
|
2276
2287
|
e.lastEventID && t.set("Last-Event-ID", e.lastEventID), e.bearerToken && t.set("Authorization", `Bearer ${e.bearerToken}`);
|
|
2277
2288
|
let n = await fetch(at("/api/events"), {
|
|
@@ -2281,11 +2292,11 @@ async function* Oi(e = {}) {
|
|
|
2281
2292
|
});
|
|
2282
2293
|
if (!n.ok || !n.body) {
|
|
2283
2294
|
let { raw: e, body: t } = await x(n);
|
|
2284
|
-
throw n.status === 401 ? new
|
|
2295
|
+
throw n.status === 401 ? new Di() : new _(n.status, t, e);
|
|
2285
2296
|
}
|
|
2286
|
-
if (
|
|
2297
|
+
if (Oi === void 0) {
|
|
2287
2298
|
let e = Date.parse(n.headers.get("Date") ?? "");
|
|
2288
|
-
Number.isNaN(e) || (
|
|
2299
|
+
Number.isNaN(e) || (Oi = e);
|
|
2289
2300
|
}
|
|
2290
2301
|
let r = n.body.getReader(), i = new TextDecoder(), a = "", o = "", s = "", c = "";
|
|
2291
2302
|
try {
|
|
@@ -2344,7 +2355,7 @@ async function* Oi(e = {}) {
|
|
|
2344
2355
|
};
|
|
2345
2356
|
} else if (o === "agent_stream" && s) {
|
|
2346
2357
|
let e = JSON.parse(s);
|
|
2347
|
-
|
|
2358
|
+
Ei({
|
|
2348
2359
|
convId: e.conversation_id,
|
|
2349
2360
|
kind: e.kind,
|
|
2350
2361
|
turnId: e.turn_id,
|
|
@@ -2352,7 +2363,7 @@ async function* Oi(e = {}) {
|
|
|
2352
2363
|
});
|
|
2353
2364
|
} else if (o === "entity_changed" && s) {
|
|
2354
2365
|
let e = JSON.parse(s);
|
|
2355
|
-
(e.entity === "agent_message" || e.entity === "agent_turn" || e.entity === "agent_tool_invocation") &&
|
|
2366
|
+
(e.entity === "agent_message" || e.entity === "agent_turn" || e.entity === "agent_tool_invocation") && Ci.dispatchEvent(new CustomEvent(Ti, { detail: {
|
|
2356
2367
|
entity: e.entity,
|
|
2357
2368
|
rowId: e.ids[0],
|
|
2358
2369
|
action: e.action
|
|
@@ -2376,45 +2387,45 @@ async function* Oi(e = {}) {
|
|
|
2376
2387
|
}
|
|
2377
2388
|
//#endregion
|
|
2378
2389
|
//#region src/lib/field-classification.ts
|
|
2379
|
-
function
|
|
2390
|
+
function ji(e, t) {
|
|
2380
2391
|
let n = e?.field_access?.[t];
|
|
2381
2392
|
return !n || n.read === "granted";
|
|
2382
2393
|
}
|
|
2383
|
-
function
|
|
2394
|
+
function Mi(e, t) {
|
|
2384
2395
|
let n = e?.field_access?.[t];
|
|
2385
2396
|
return !n || n.write === "granted";
|
|
2386
2397
|
}
|
|
2387
|
-
function
|
|
2398
|
+
function Ni(e, t) {
|
|
2388
2399
|
return e?.field_access?.[t]?.classification;
|
|
2389
2400
|
}
|
|
2390
|
-
function
|
|
2401
|
+
function Pi(e, t) {
|
|
2391
2402
|
return e?.field_access?.[t]?.required_permission;
|
|
2392
2403
|
}
|
|
2393
|
-
function
|
|
2394
|
-
let r =
|
|
2404
|
+
function Fi(e, t, n) {
|
|
2405
|
+
let r = Ni(t, n);
|
|
2395
2406
|
if (r) return e?.classifications?.[r];
|
|
2396
2407
|
}
|
|
2397
|
-
function
|
|
2398
|
-
return !!
|
|
2408
|
+
function Ii(e, t, n) {
|
|
2409
|
+
return !!Fi(e, t, n)?.sod_protected;
|
|
2399
2410
|
}
|
|
2400
|
-
function
|
|
2411
|
+
function Li(e, t) {
|
|
2401
2412
|
return e?.field_access?.[t];
|
|
2402
2413
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
2414
|
+
function Ri(e, t) {
|
|
2415
|
+
return ji(e, t.startsWith("$property.") ? t.slice(10) : t);
|
|
2405
2416
|
}
|
|
2406
|
-
function
|
|
2417
|
+
function zi(e, t) {
|
|
2407
2418
|
if (!t) return t;
|
|
2408
2419
|
let n = t.split(",").filter((t) => {
|
|
2409
2420
|
let n = t.split(":")[0]?.trim();
|
|
2410
|
-
return !n ||
|
|
2421
|
+
return !n || Ri(e, n);
|
|
2411
2422
|
});
|
|
2412
2423
|
return n.length > 0 ? n.join(",") : void 0;
|
|
2413
2424
|
}
|
|
2414
|
-
function
|
|
2425
|
+
function Bi(e, t) {
|
|
2415
2426
|
let n = [], r = !1;
|
|
2416
2427
|
for (let i of t) {
|
|
2417
|
-
if (i.field !== void 0 && !
|
|
2428
|
+
if (i.field !== void 0 && !Ri(e, i.field)) {
|
|
2418
2429
|
r = !0;
|
|
2419
2430
|
continue;
|
|
2420
2431
|
}
|
|
@@ -2423,7 +2434,7 @@ function Ri(e, t) {
|
|
|
2423
2434
|
n.push(i);
|
|
2424
2435
|
continue;
|
|
2425
2436
|
}
|
|
2426
|
-
let a = i[t] ?? [], o =
|
|
2437
|
+
let a = i[t] ?? [], o = Bi(e, a);
|
|
2427
2438
|
o === a ? n.push(i) : (r = !0, o.length > 0 && n.push({
|
|
2428
2439
|
...i,
|
|
2429
2440
|
[t]: o
|
|
@@ -2433,13 +2444,13 @@ function Ri(e, t) {
|
|
|
2433
2444
|
}
|
|
2434
2445
|
//#endregion
|
|
2435
2446
|
//#region src/hooks/useEntity.ts
|
|
2436
|
-
function
|
|
2447
|
+
function Vi(e) {
|
|
2437
2448
|
let { data: t } = J();
|
|
2438
2449
|
if (t && e) return t.entities[e];
|
|
2439
2450
|
}
|
|
2440
2451
|
//#endregion
|
|
2441
2452
|
//#region src/hooks/useEntityData.ts
|
|
2442
|
-
function
|
|
2453
|
+
function Hi(e, t) {
|
|
2443
2454
|
return [
|
|
2444
2455
|
"entity-data",
|
|
2445
2456
|
e,
|
|
@@ -2449,23 +2460,23 @@ function Bi(e, t) {
|
|
|
2449
2460
|
}
|
|
2450
2461
|
];
|
|
2451
2462
|
}
|
|
2452
|
-
function
|
|
2453
|
-
let r =
|
|
2463
|
+
function Ui(e, t, n = !0) {
|
|
2464
|
+
let r = Hi(e, t), i = r[2];
|
|
2454
2465
|
return u({
|
|
2455
2466
|
queryKey: r,
|
|
2456
|
-
queryFn: ({ signal: t }) =>
|
|
2467
|
+
queryFn: ({ signal: t }) => Gn(e, i, { signal: t }),
|
|
2457
2468
|
enabled: !!e && n,
|
|
2458
2469
|
placeholderData: (t, n) => {
|
|
2459
2470
|
if (n?.queryKey?.[1] !== e) return;
|
|
2460
2471
|
let r = n?.queryKey?.[2];
|
|
2461
|
-
return
|
|
2472
|
+
return Wi(r, i) ? t : void 0;
|
|
2462
2473
|
}
|
|
2463
2474
|
});
|
|
2464
2475
|
}
|
|
2465
|
-
function
|
|
2476
|
+
function Wi(e, t) {
|
|
2466
2477
|
return e ? JSON.stringify(e.filters ?? null) === JSON.stringify(t.filters ?? null) && (e.search ?? "") === (t.search ?? "") && (e.screen ?? "") === (t.screen ?? "") && !!e.include_deleted == !!t.include_deleted : !1;
|
|
2467
2478
|
}
|
|
2468
|
-
function
|
|
2479
|
+
function Gi(e, t) {
|
|
2469
2480
|
return [
|
|
2470
2481
|
"entity-count",
|
|
2471
2482
|
e,
|
|
@@ -2480,11 +2491,11 @@ function Ui(e, t) {
|
|
|
2480
2491
|
}
|
|
2481
2492
|
];
|
|
2482
2493
|
}
|
|
2483
|
-
function
|
|
2484
|
-
let r =
|
|
2494
|
+
function Ki(e, t, n = !0) {
|
|
2495
|
+
let r = Gi(e, t), i = r[2];
|
|
2485
2496
|
return u({
|
|
2486
2497
|
queryKey: r,
|
|
2487
|
-
queryFn: ({ signal: t }) =>
|
|
2498
|
+
queryFn: ({ signal: t }) => Gn(e, i, { signal: t }),
|
|
2488
2499
|
enabled: !!e && n,
|
|
2489
2500
|
retry: 1,
|
|
2490
2501
|
staleTime: 3e4,
|
|
@@ -2493,19 +2504,19 @@ function Wi(e, t, n = !0) {
|
|
|
2493
2504
|
}
|
|
2494
2505
|
//#endregion
|
|
2495
2506
|
//#region src/hooks/useCurrentScreen.tsx
|
|
2496
|
-
var
|
|
2497
|
-
function
|
|
2507
|
+
var qi = n(void 0);
|
|
2508
|
+
function Ji({ code: e, children: t }) {
|
|
2498
2509
|
let { data: n } = J(), r = s(() => ({
|
|
2499
2510
|
code: e,
|
|
2500
2511
|
screen: n?.screens[e]
|
|
2501
2512
|
}), [e, n]);
|
|
2502
|
-
return /* @__PURE__ */ f(
|
|
2513
|
+
return /* @__PURE__ */ f(qi.Provider, {
|
|
2503
2514
|
value: r,
|
|
2504
2515
|
children: t
|
|
2505
2516
|
});
|
|
2506
2517
|
}
|
|
2507
|
-
function
|
|
2508
|
-
return a(
|
|
2518
|
+
function Yi() {
|
|
2519
|
+
return a(qi);
|
|
2509
2520
|
}
|
|
2510
2521
|
//#endregion
|
|
2511
|
-
export {
|
|
2522
|
+
export { gr as $, x as $n, Lt as $t, li as A, Ye as An, On as At, vi as B, k as Bn, bn as Bt, Gr as C, dt as Cn, In as Ct, ai as D, H as Dn, jn as Dt, ii as E, F as En, Mn as Et, ni as F, Ee as Fn, J as Ft, Ar as G, ae as Gn, ln as Gt, Zr as H, se as Hn, yn as Ht, ci as I, ge as In, Cn as It, Tr as J, b as Jn, mn as Jt, kr as K, ie as Kn, un as Kt, ti as L, he as Ln, xn as Lt, xi as M, Xe as Mn, En as Mt, $ as N, Se as Nn, kn as Nt, yi as O, lt as On, Tn as Ot, _i as P, Te as Pn, An as Pt, yr as Q, ne as Qn, vt as Qt, si as R, de as Rn, cn as Rt, Ai as S, mt as Sn, Fn as St, Ur as T, W as Tn, Nn as Tt, Vr as U, E as Un, gn as Ut, qr as V, me as Vn, vn as Vt, Or as W, D as Wn, pn as Wt, br as X, v as Xn, q as Xt, Sr as Y, te as Yn, sn as Yt, xr as Z, y as Zn, Qt as Zt, wi as _, bt as _n, cr as _t, Ki as a, At as an, nr as at, Ci as b, ft as bn, Hn as bt, Fi as c, K as cn, Xn as ct, Pi as d, jt as dn, Qn as dt, Rt as en, hr as et, ji as f, Ft as fn, Kn as ft, zi as g, It as gn, ir as gt, Bi as h, Dt as hn, Zn as ht, Hi as i, Ot as in, er as it, Si as j, Ze as jn, Dn as jt, oi as k, U as kn, wn as kt, Li as l, Bt as ln, $n as lt, Mi as m, Mt as mn, lr as mt, Yi as n, Et as nn, pr as nt, Ui as o, wt as on, qn as ot, Ii as p, Nt as pn, Gn as pt, Dr as q, _ as qn, _n as qt, Gi as r, kt as rn, fr as rt, Vi as s, yt as sn, Yn as st, Ji as t, zt as tn, _r as tt, Ni as u, Tt as un, X as ut, Ti as v, Ct as vn, sr as vt, Wr as w, G as wn, Pn as wt, ki as x, pt as xn, Un as xt, Di as y, Pt as yn, Jn as yt, Kr as z, ue as zn, dn as zt };
|