@declarion/react 0.87.0 → 0.88.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/app.js +28 -28
- package/dist-lib/components/actions/ActionButton.js +86 -85
- package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
- package/dist-lib/components/actions/ActionRunner.js +47 -47
- package/dist-lib/components/actions/ObjectActionBar.js +9 -9
- package/dist-lib/components/actions/RowActionsKebab.js +19 -19
- package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
- package/dist-lib/components/chrome/AssociationTabs.js +21 -21
- package/dist-lib/components/chrome/RecordHeader.js +33 -40
- package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
- package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
- package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
- package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
- package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
- package/dist-lib/components/fields/FileReferenceField.js +9 -9
- package/dist-lib/components/fields/StructureField.js +57 -47
- package/dist-lib/components/fields/TimestampField.js +59 -54
- package/dist-lib/components/fields/cells/factories/money.js +14 -23
- package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
- package/dist-lib/components/fields/cells/factories/text.js +18 -3
- package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
- package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
- package/dist-lib/components/layout/Layout.js +306 -361
- package/dist-lib/components/layout/Rail.js +42 -41
- package/dist-lib/components/layout/Sidebar.js +132 -117
- package/dist-lib/components/layout/TabStrip.js +116 -115
- package/dist-lib/components/layout/TenantChip.js +47 -54
- package/dist-lib/components/layout/TopBar.js +108 -105
- package/dist-lib/components/list/InlineEditCell.js +23 -23
- package/dist-lib/components/list/QuickPeek.js +65 -66
- package/dist-lib/components/pages/DocumentsMenu.js +42 -42
- package/dist-lib/components/pages/ExportMenu.js +25 -25
- package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
- package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
- package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
- package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
- package/dist-lib/components/pages/auth/AuthShell.js +73 -73
- package/dist-lib/components/pages/auth/SignIn.js +32 -32
- package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
- package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
- package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
- package/dist-lib/components/pages/list/ListHeader.js +19 -19
- package/dist-lib/components/pages/list/ListNoRows.js +15 -15
- package/dist-lib/components/pages/list/ListToolbar.js +145 -145
- package/dist-lib/components/pages/list/useActiveView.js +14 -5
- package/dist-lib/components/pages/list/useListQuery.js +121 -81
- package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
- package/dist-lib/components/pages/list/useRowMenu.js +7 -7
- package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
- package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
- package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
- package/dist-lib/hooks/useAuth.js +11 -11
- package/dist-lib/hooks/useBranding.js +4 -4
- package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
- package/dist-lib/hooks/useImpersonation.js +6 -6
- package/dist-lib/hooks/useMutations.js +23 -23
- package/dist-lib/hooks/useObjectStatus.js +5 -5
- package/dist-lib/hooks/useParams.js +59 -51
- package/dist-lib/hooks/useProperties.js +8 -8
- package/dist-lib/hooks/useRowTenant.js +18 -6
- package/dist-lib/hooks/useText.js +9 -7
- package/dist-lib/hooks/useUiPreferences.js +71 -0
- package/dist-lib/index.d.ts +22 -6
- package/dist-lib/index.js +127 -126
- package/dist-lib/lib/actions.js +116 -84
- package/dist-lib/lib/child-config.js +10 -1
- package/dist-lib/lib/format-count.js +16 -1
- package/dist-lib/lib/language.js +23 -21
- package/dist-lib/lib/money-text.js +29 -0
- package/dist-lib/lib/profile.js +4 -0
- package/dist-lib/lib/role-label.js +8 -0
- package/dist-lib/lib/schema-routing.js +34 -14
- package/dist-lib/lib/shortcut.js +10 -0
- package/dist-lib/lib/timestamp.js +93 -31
- package/dist-lib/stores/auth.js +9 -8
- package/dist-lib/stores/preferences.js +56 -17
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +25 -28
- package/dist-lib/types/schema.js +33 -27
- package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@ import { coerceDisplayString as e } from "../../lib/display-value.js";
|
|
|
2
2
|
import { screenTitleForPath as t } from "../../types/schema.js";
|
|
3
3
|
import { useSchema as n } from "../../hooks/useSchema.js";
|
|
4
4
|
import { pluralText as r, textWithNodes as i } from "../../lib/language.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { failureTitle as a } from "../../lib/failure.js";
|
|
6
|
+
import { Icon as o } from "../primitives/Icons.js";
|
|
7
|
+
import { Btn as s } from "../primitives/Btn.js";
|
|
8
|
+
import { IconBtn as c } from "../primitives/IconBtn.js";
|
|
9
|
+
import { useText as l } from "../../hooks/useText.js";
|
|
10
|
+
import { Spinner as u } from "../primitives/Spinner.js";
|
|
11
11
|
import { useParam as d } from "../../hooks/useParams.js";
|
|
12
12
|
import { useTabNavigate as f } from "../../hooks/useTabNavigate.js";
|
|
13
13
|
import { useEntity as p } from "../../hooks/useEntity.js";
|
|
@@ -23,10 +23,10 @@ import { useLocation as T } from "react-router";
|
|
|
23
23
|
import ee from "react-textarea-autosize";
|
|
24
24
|
//#region src/components/agents/AgentChatPanel.impl.tsx
|
|
25
25
|
var te = 80;
|
|
26
|
-
function E({ open: e, onClose: r, context:
|
|
26
|
+
function E({ open: e, onClose: r, context: s, title: d = "", askOnOpen: f, docked: p = !1 }) {
|
|
27
27
|
let m = _();
|
|
28
28
|
v(m.conversationId);
|
|
29
|
-
let E =
|
|
29
|
+
let E = l(), { pathname: D } = T(), { data: A } = n(), j = s ? t(E, D, A?.screens, A?.entities)?.title : void 0, M = l("errors"), [N, P] = S(""), [F, I] = S(null), L = x(null), [R, z] = S(!1), B = x(null), V = x(null), H = x(!0), [U, W] = S(!1), G = () => {
|
|
30
30
|
let e = V.current;
|
|
31
31
|
if (!e) return;
|
|
32
32
|
let t = e.scrollHeight - e.scrollTop - e.clientHeight <= te;
|
|
@@ -50,9 +50,9 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
50
50
|
if (e.trim()) {
|
|
51
51
|
I(null), P("");
|
|
52
52
|
try {
|
|
53
|
-
await m.send(e,
|
|
53
|
+
await m.send(e, s);
|
|
54
54
|
} catch (t) {
|
|
55
|
-
console.error("agent send failed", t), I(
|
|
55
|
+
console.error("agent send failed", t), I(a(M, t)), P(e);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
};
|
|
@@ -100,7 +100,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
100
100
|
alignItems: "center",
|
|
101
101
|
justifyContent: "center"
|
|
102
102
|
},
|
|
103
|
-
children: /* @__PURE__ */ C(
|
|
103
|
+
children: /* @__PURE__ */ C(o.sparkle, {
|
|
104
104
|
size: 13,
|
|
105
105
|
style: { color: "var(--accent-foreground)" }
|
|
106
106
|
})
|
|
@@ -130,34 +130,34 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
130
130
|
} }), i(E("agent.panel.context", "context: {context}"), { context: /* @__PURE__ */ C("span", { children: j || E("agent.panel.context_platform", "Platform") }) })]
|
|
131
131
|
})]
|
|
132
132
|
}),
|
|
133
|
-
m.messages.length > 0 && /* @__PURE__ */ C(
|
|
133
|
+
m.messages.length > 0 && /* @__PURE__ */ C(c, {
|
|
134
134
|
size: 24,
|
|
135
|
-
icon: /* @__PURE__ */ C(
|
|
135
|
+
icon: /* @__PURE__ */ C(o.copy, { size: 12 }),
|
|
136
136
|
onClick: () => void se(E, m.messages),
|
|
137
137
|
title: E("agent.panel.copy_all", "Copy entire conversation")
|
|
138
138
|
}),
|
|
139
|
-
/* @__PURE__ */ C(
|
|
139
|
+
/* @__PURE__ */ C(c, {
|
|
140
140
|
size: 24,
|
|
141
|
-
icon: /* @__PURE__ */ C(
|
|
141
|
+
icon: /* @__PURE__ */ C(o.clock, { size: 12 }),
|
|
142
142
|
onClick: () => {
|
|
143
143
|
z((e) => !e), m.refreshConversations();
|
|
144
144
|
},
|
|
145
145
|
title: E("agent.panel.earlier", "Earlier conversations")
|
|
146
146
|
}),
|
|
147
|
-
m.conversationId && /* @__PURE__ */ C(
|
|
147
|
+
m.conversationId && /* @__PURE__ */ C(c, {
|
|
148
148
|
size: 24,
|
|
149
|
-
icon: /* @__PURE__ */ C(
|
|
149
|
+
icon: /* @__PURE__ */ C(o.plus, { size: 12 }),
|
|
150
150
|
onClick: m.startNew,
|
|
151
151
|
title: E("agent.panel.new_conversation", "New conversation")
|
|
152
152
|
}),
|
|
153
|
-
/* @__PURE__ */ C(
|
|
153
|
+
/* @__PURE__ */ C(c, {
|
|
154
154
|
size: 24,
|
|
155
|
-
icon: /* @__PURE__ */ C(
|
|
155
|
+
icon: /* @__PURE__ */ C(o.settings, { size: 12 }),
|
|
156
156
|
title: E("agent.panel.preferences", "Preferences")
|
|
157
157
|
}),
|
|
158
|
-
/* @__PURE__ */ C(
|
|
158
|
+
/* @__PURE__ */ C(c, {
|
|
159
159
|
size: 24,
|
|
160
|
-
icon: /* @__PURE__ */ C(
|
|
160
|
+
icon: /* @__PURE__ */ C(o.x, { size: 13 }),
|
|
161
161
|
onClick: r,
|
|
162
162
|
title: E("agent.panel.close", "Close")
|
|
163
163
|
})
|
|
@@ -211,7 +211,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
211
211
|
color: "var(--text-3)",
|
|
212
212
|
fontSize: 11.5
|
|
213
213
|
},
|
|
214
|
-
children: [/* @__PURE__ */ C(
|
|
214
|
+
children: [/* @__PURE__ */ C(u, { size: 12 }), E("agent.panel.thinking", "Thinking…")]
|
|
215
215
|
}),
|
|
216
216
|
F && /* @__PURE__ */ C("div", {
|
|
217
217
|
style: {
|
|
@@ -246,7 +246,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
246
246
|
gap: 4,
|
|
247
247
|
zIndex: 1
|
|
248
248
|
},
|
|
249
|
-
children: [/* @__PURE__ */ C(
|
|
249
|
+
children: [/* @__PURE__ */ C(o.arrowDown, { size: 11 }), E("agent.panel.jump_latest", "Jump to latest")]
|
|
250
250
|
}),
|
|
251
251
|
/* @__PURE__ */ w("div", {
|
|
252
252
|
style: {
|
|
@@ -285,9 +285,9 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
285
285
|
fontFamily: "inherit"
|
|
286
286
|
}
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */ C(
|
|
288
|
+
/* @__PURE__ */ C(c, {
|
|
289
289
|
size: 26,
|
|
290
|
-
icon: /* @__PURE__ */ C(
|
|
290
|
+
icon: /* @__PURE__ */ C(o.paperclip, { size: 12 }),
|
|
291
291
|
title: E("agent.panel.attach_context", "Attach context")
|
|
292
292
|
}),
|
|
293
293
|
Q ? /* @__PURE__ */ C("button", {
|
|
@@ -306,7 +306,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
306
306
|
alignItems: "center",
|
|
307
307
|
justifyContent: "center"
|
|
308
308
|
},
|
|
309
|
-
children: /* @__PURE__ */ C(
|
|
309
|
+
children: /* @__PURE__ */ C(o.x, { size: 13 })
|
|
310
310
|
}) : /* @__PURE__ */ C("button", {
|
|
311
311
|
onClick: () => void q(N),
|
|
312
312
|
disabled: !$,
|
|
@@ -323,7 +323,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
323
323
|
alignItems: "center",
|
|
324
324
|
justifyContent: "center"
|
|
325
325
|
},
|
|
326
|
-
children: /* @__PURE__ */ C(
|
|
326
|
+
children: /* @__PURE__ */ C(o.arrowUp, { size: 13 })
|
|
327
327
|
})
|
|
328
328
|
]
|
|
329
329
|
}), /* @__PURE__ */ w("div", {
|
|
@@ -335,7 +335,7 @@ function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docke
|
|
|
335
335
|
fontSize: 10.5,
|
|
336
336
|
color: "var(--text-4)"
|
|
337
337
|
},
|
|
338
|
-
children: [/* @__PURE__ */ C(
|
|
338
|
+
children: [/* @__PURE__ */ C(o.shield, { size: 10 }), /* @__PURE__ */ C("span", { children: E("agent.panel.footer", "Runs within your permissions. All actions audit-logged.") })]
|
|
339
339
|
})]
|
|
340
340
|
})
|
|
341
341
|
]
|
|
@@ -377,7 +377,7 @@ function O({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
|
377
377
|
flexShrink: 0,
|
|
378
378
|
marginTop: 2
|
|
379
379
|
},
|
|
380
|
-
children: /* @__PURE__ */ C(
|
|
380
|
+
children: /* @__PURE__ */ C(o.sparkle, { size: 11 })
|
|
381
381
|
}), /* @__PURE__ */ C("div", {
|
|
382
382
|
style: {
|
|
383
383
|
flex: 1,
|
|
@@ -391,7 +391,7 @@ function O({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
function k({ agentTurn: t }) {
|
|
394
|
-
let n =
|
|
394
|
+
let n = l(), r = l("errors"), i = p("agent_turn")?.fields.get("status"), a = t.status === "failed" ? r(t.error_code ?? "", e(t.error_details) || r("agents.turn_failed", "The assistant could not finish this turn.")) : void 0;
|
|
395
395
|
return /* @__PURE__ */ w("div", {
|
|
396
396
|
"data-agent-turn": t.id,
|
|
397
397
|
"data-turn-status": t.status,
|
|
@@ -420,7 +420,7 @@ function ne(e, t) {
|
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
function re({ invocation: e }) {
|
|
423
|
-
let t =
|
|
423
|
+
let t = l();
|
|
424
424
|
return /* @__PURE__ */ C("div", {
|
|
425
425
|
"data-agent-invocation": e.id,
|
|
426
426
|
"data-invocation-status": "outcome_unknown",
|
|
@@ -493,7 +493,7 @@ function ie({ run: e }) {
|
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
function j() {
|
|
496
|
-
let e =
|
|
496
|
+
let e = l();
|
|
497
497
|
return (t, n, i) => {
|
|
498
498
|
let a = [];
|
|
499
499
|
return t > 0 && a.push(r(e, "agent.panel.operations", t, {
|
|
@@ -506,10 +506,10 @@ function j() {
|
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
function M({ call: e }) {
|
|
509
|
-
let [t, n] = S(!1), r =
|
|
509
|
+
let [t, n] = S(!1), r = l(), i = P(e.name), a = p("agent_tool_invocation")?.fields.get("status"), o = e.status ?? "running", s = r(a?.values?.find((e) => e.code === o)?.name) || o, c = e.status === "outcome_unknown" ? "outcome_unknown" : e.isError ? "failed" : N(e.status) ? "ok" : "running";
|
|
510
510
|
return /* @__PURE__ */ w("div", {
|
|
511
511
|
"data-activity-call": e.name,
|
|
512
|
-
"data-call-state":
|
|
512
|
+
"data-call-state": c,
|
|
513
513
|
children: [/* @__PURE__ */ w("button", {
|
|
514
514
|
type: "button",
|
|
515
515
|
onClick: () => n((e) => !e),
|
|
@@ -522,7 +522,7 @@ function M({ call: e }) {
|
|
|
522
522
|
background: "transparent",
|
|
523
523
|
border: "none",
|
|
524
524
|
cursor: "pointer",
|
|
525
|
-
color:
|
|
525
|
+
color: c === "failed" ? "var(--danger)" : "var(--text-2)"
|
|
526
526
|
},
|
|
527
527
|
children: [
|
|
528
528
|
/* @__PURE__ */ C("span", {
|
|
@@ -563,7 +563,7 @@ function N(e) {
|
|
|
563
563
|
return e === "succeeded" || e === "failed" || e === "rejected" || e === "canceled" || e === "outcome_unknown";
|
|
564
564
|
}
|
|
565
565
|
function ae({ conversations: e, currentId: t, onPick: n }) {
|
|
566
|
-
let r =
|
|
566
|
+
let r = l();
|
|
567
567
|
return e.length === 0 ? /* @__PURE__ */ C("div", {
|
|
568
568
|
style: {
|
|
569
569
|
padding: "8px 12px",
|
|
@@ -598,7 +598,7 @@ function ae({ conversations: e, currentId: t, onPick: n }) {
|
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
600
|
function P(e) {
|
|
601
|
-
let t =
|
|
601
|
+
let t = l(), { value: r } = d("agents.transcript_names", "code"), { data: i } = n();
|
|
602
602
|
return r === "display" && t(i?.actions?.[e]?.display?.name ?? F(i, e)) || e;
|
|
603
603
|
}
|
|
604
604
|
function F(e, t) {
|
|
@@ -739,7 +739,7 @@ var z = {
|
|
|
739
739
|
}
|
|
740
740
|
};
|
|
741
741
|
function B({ block: e }) {
|
|
742
|
-
let t =
|
|
742
|
+
let t = l();
|
|
743
743
|
switch (e.type) {
|
|
744
744
|
case "text": return /* @__PURE__ */ C("div", {
|
|
745
745
|
className: "agent-md",
|
|
@@ -910,7 +910,7 @@ function G(e, t) {
|
|
|
910
910
|
return t === "approved" ? e("agent.panel.decision.approve", "Approved") : e("agent.panel.decision.reject", "Rejected");
|
|
911
911
|
}
|
|
912
912
|
function K({ block: e }) {
|
|
913
|
-
let t =
|
|
913
|
+
let t = l(), n = e.decision === "approved", r = n ? "var(--success)" : "var(--destructive)";
|
|
914
914
|
return /* @__PURE__ */ w("div", {
|
|
915
915
|
style: {
|
|
916
916
|
marginTop: 6,
|
|
@@ -990,13 +990,13 @@ function J(e, t) {
|
|
|
990
990
|
return e("agent.panel.proposal", "Run {code}.", { code: t });
|
|
991
991
|
}
|
|
992
992
|
function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
993
|
-
let r =
|
|
993
|
+
let r = l(), i = l("errors"), c = JSON.stringify(e.params ?? {}, null, 2), [u, d] = S(!1), [f, p] = S(!1), [m, h] = S(""), [g, _] = S(null), [v, y] = S(!1), b = async (e) => {
|
|
994
994
|
if (!v) {
|
|
995
995
|
y(!0);
|
|
996
996
|
try {
|
|
997
997
|
await t(e);
|
|
998
998
|
} catch (e) {
|
|
999
|
-
_(
|
|
999
|
+
_(a(i, e)), y(!1);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}, x = async () => {
|
|
@@ -1005,7 +1005,7 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1005
1005
|
try {
|
|
1006
1006
|
await n(m.trim() || void 0);
|
|
1007
1007
|
} catch (e) {
|
|
1008
|
-
_(
|
|
1008
|
+
_(a(i, e)), y(!1);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
}, T = typeof e.confidence == "number" ? Math.round(Math.max(0, Math.min(1, e.confidence)) * 100) : null;
|
|
@@ -1026,7 +1026,7 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1026
1026
|
marginBottom: 6
|
|
1027
1027
|
},
|
|
1028
1028
|
children: [
|
|
1029
|
-
/* @__PURE__ */ C(
|
|
1029
|
+
/* @__PURE__ */ C(o.bolt, {
|
|
1030
1030
|
size: 11,
|
|
1031
1031
|
style: { color: "var(--accent)" }
|
|
1032
1032
|
}),
|
|
@@ -1085,7 +1085,7 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1085
1085
|
background: "transparent",
|
|
1086
1086
|
border: 0,
|
|
1087
1087
|
padding: 0,
|
|
1088
|
-
marginBottom:
|
|
1088
|
+
marginBottom: u ? 6 : 0,
|
|
1089
1089
|
fontSize: 10.5,
|
|
1090
1090
|
color: "var(--text-3)",
|
|
1091
1091
|
cursor: "pointer",
|
|
@@ -1096,15 +1096,15 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1096
1096
|
children: [/* @__PURE__ */ C("span", {
|
|
1097
1097
|
style: {
|
|
1098
1098
|
display: "inline-block",
|
|
1099
|
-
transform:
|
|
1099
|
+
transform: u ? "rotate(90deg)" : "none",
|
|
1100
1100
|
transition: "transform 0.15s",
|
|
1101
1101
|
fontSize: 9,
|
|
1102
1102
|
lineHeight: 1
|
|
1103
1103
|
},
|
|
1104
1104
|
children: "▶"
|
|
1105
|
-
}),
|
|
1105
|
+
}), u ? r("agent.panel.hide_params", "Hide parameters") : r("agent.panel.view_params", "View parameters")]
|
|
1106
1106
|
}),
|
|
1107
|
-
|
|
1107
|
+
u && /* @__PURE__ */ C("pre", {
|
|
1108
1108
|
className: "mono",
|
|
1109
1109
|
style: {
|
|
1110
1110
|
width: "100%",
|
|
@@ -1119,7 +1119,7 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1119
1119
|
overflowX: "auto",
|
|
1120
1120
|
whiteSpace: "pre-wrap"
|
|
1121
1121
|
},
|
|
1122
|
-
children:
|
|
1122
|
+
children: c
|
|
1123
1123
|
}),
|
|
1124
1124
|
g && /* @__PURE__ */ C("div", {
|
|
1125
1125
|
style: {
|
|
@@ -1154,30 +1154,30 @@ function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1154
1154
|
justifyContent: "flex-end"
|
|
1155
1155
|
},
|
|
1156
1156
|
children: [
|
|
1157
|
-
f ? /* @__PURE__ */ C(
|
|
1157
|
+
f ? /* @__PURE__ */ C(s, {
|
|
1158
1158
|
size: "xs",
|
|
1159
1159
|
kind: "ghost",
|
|
1160
1160
|
onClick: x,
|
|
1161
1161
|
disabled: v,
|
|
1162
1162
|
children: r("agent.panel.reject_send", "Send rejection")
|
|
1163
|
-
}) : /* @__PURE__ */ C(
|
|
1163
|
+
}) : /* @__PURE__ */ C(s, {
|
|
1164
1164
|
size: "xs",
|
|
1165
1165
|
kind: "ghost",
|
|
1166
1166
|
onClick: () => p(!0),
|
|
1167
1167
|
disabled: v,
|
|
1168
1168
|
children: r("agent.panel.reject", "Reject…")
|
|
1169
1169
|
}),
|
|
1170
|
-
e.confirmation_mode !== "always" && /* @__PURE__ */ C(
|
|
1170
|
+
e.confirmation_mode !== "always" && /* @__PURE__ */ C(s, {
|
|
1171
1171
|
size: "xs",
|
|
1172
1172
|
kind: "ghost",
|
|
1173
1173
|
onClick: () => b("conversation"),
|
|
1174
1174
|
disabled: v,
|
|
1175
1175
|
children: r("agent.panel.approve_chat", "Approve for this chat")
|
|
1176
1176
|
}),
|
|
1177
|
-
/* @__PURE__ */ C(
|
|
1177
|
+
/* @__PURE__ */ C(s, {
|
|
1178
1178
|
size: "xs",
|
|
1179
1179
|
kind: "primary",
|
|
1180
|
-
icon: /* @__PURE__ */ C(
|
|
1180
|
+
icon: /* @__PURE__ */ C(o.check, { size: 11 }),
|
|
1181
1181
|
onClick: () => b("call"),
|
|
1182
1182
|
disabled: v,
|
|
1183
1183
|
children: r("agent.panel.approve_once", "Approve once")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { fieldDisplayName as e } from "../../types/schema.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { listEntities as t, resolveAssociation as n } from "../../api/data.js";
|
|
3
|
+
import { Icon as r } from "../primitives/Icons.js";
|
|
4
|
+
import { Btn as i } from "../primitives/Btn.js";
|
|
5
|
+
import { useText as a } from "../../hooks/useText.js";
|
|
6
|
+
import { SectionCard as o } from "../primitives/SectionCard.js";
|
|
7
|
+
import { DynamicIcon as s } from "../shared/DynamicIcon.js";
|
|
8
8
|
import { useTabNavigate as c } from "../../hooks/useTabNavigate.js";
|
|
9
9
|
import { findListScreenForEntity as l } from "../../lib/actions.js";
|
|
10
10
|
import { renderField as u } from "../fields/index.js";
|
|
@@ -13,11 +13,11 @@ import { useMemo as m, useState as h } from "react";
|
|
|
13
13
|
import { useQuery as g } from "@tanstack/react-query";
|
|
14
14
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/chrome/AssociationTabs.tsx
|
|
16
|
-
function y({ entityCode: e, recordId: t, associations: n, schema:
|
|
17
|
-
let
|
|
16
|
+
function y({ entityCode: e, recordId: t, associations: n, schema: r }) {
|
|
17
|
+
let i = a(), c = m(() => Object.entries(n).filter(([, e]) => !!r.entities[e.target]), [n, r.entities]), [l, u] = h(0);
|
|
18
18
|
if (c.length === 0) return null;
|
|
19
19
|
let [d, f] = c[l];
|
|
20
|
-
return /* @__PURE__ */ _(
|
|
20
|
+
return /* @__PURE__ */ _(o, {
|
|
21
21
|
title: /* @__PURE__ */ _("div", {
|
|
22
22
|
style: {
|
|
23
23
|
display: "flex",
|
|
@@ -47,10 +47,10 @@ function y({ entityCode: e, recordId: t, associations: n, schema: o }) {
|
|
|
47
47
|
cursor: "pointer",
|
|
48
48
|
fontWeight: r ? 600 : 500
|
|
49
49
|
},
|
|
50
|
-
children: [t.display?.icon && /* @__PURE__ */ _(
|
|
50
|
+
children: [t.display?.icon && /* @__PURE__ */ _(s, {
|
|
51
51
|
name: t.display.icon,
|
|
52
52
|
size: 13
|
|
53
|
-
}),
|
|
53
|
+
}), i(t.display?.name) || e]
|
|
54
54
|
}, e);
|
|
55
55
|
})
|
|
56
56
|
}),
|
|
@@ -61,25 +61,25 @@ function y({ entityCode: e, recordId: t, associations: n, schema: o }) {
|
|
|
61
61
|
recordId: t,
|
|
62
62
|
assocKey: d,
|
|
63
63
|
association: f,
|
|
64
|
-
schema:
|
|
64
|
+
schema: r
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function b({ entityCode:
|
|
69
|
-
let x =
|
|
68
|
+
function b({ entityCode: o, recordId: s, assocKey: h, association: y, schema: b }) {
|
|
69
|
+
let x = a(), S = c(), C = `${o}.${h}`, { data: w, isLoading: T } = g({
|
|
70
70
|
queryKey: [
|
|
71
71
|
"association",
|
|
72
72
|
C,
|
|
73
|
-
|
|
73
|
+
s
|
|
74
74
|
],
|
|
75
|
-
queryFn: () =>
|
|
75
|
+
queryFn: () => n(C, [s])
|
|
76
76
|
}), E = w?.target_entity ?? y.target, D = b.entities[E], O = m(() => w?.ids ?? [], [w?.ids]), k = m(() => D?.fields.names().find((e) => D.fields.get(e)?.primary) ?? "id", [D]), A = m(() => O.slice(0, 50), [O]), { data: j, isLoading: M } = g({
|
|
77
77
|
queryKey: [
|
|
78
78
|
"association-records",
|
|
79
79
|
E,
|
|
80
80
|
A
|
|
81
81
|
],
|
|
82
|
-
queryFn: () =>
|
|
82
|
+
queryFn: () => t(E, {
|
|
83
83
|
per_page: 50,
|
|
84
84
|
filters: [{
|
|
85
85
|
field: k,
|
|
@@ -148,8 +148,8 @@ function b({ entityCode: i, recordId: a, assocKey: h, association: y, schema: b
|
|
|
148
148
|
padding: "10px 16px",
|
|
149
149
|
textAlign: "center"
|
|
150
150
|
},
|
|
151
|
-
children: /* @__PURE__ */ _(
|
|
152
|
-
icon: /* @__PURE__ */ _(
|
|
151
|
+
children: /* @__PURE__ */ _(i, {
|
|
152
|
+
icon: /* @__PURE__ */ _(r.external, { size: 12 }),
|
|
153
153
|
onClick: I,
|
|
154
154
|
children: x("shell.association.view_all", "View all {count} records", { count: w.count })
|
|
155
155
|
})
|
|
@@ -159,9 +159,9 @@ function b({ entityCode: i, recordId: a, assocKey: h, association: y, schema: b
|
|
|
159
159
|
padding: "10px 16px",
|
|
160
160
|
textAlign: "center"
|
|
161
161
|
},
|
|
162
|
-
children: /* @__PURE__ */ _(
|
|
162
|
+
children: /* @__PURE__ */ _(i, {
|
|
163
163
|
kind: "ghost",
|
|
164
|
-
icon: /* @__PURE__ */ _(
|
|
164
|
+
icon: /* @__PURE__ */ _(r.external, { size: 12 }),
|
|
165
165
|
onClick: I,
|
|
166
166
|
children: x("shell.association.open_list", "Open in list view")
|
|
167
167
|
})
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Icon as e } from "../primitives/Icons.js";
|
|
2
2
|
import { IconBtn as t } from "../primitives/IconBtn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { InfoTooltip as n } from "../primitives/Tooltip.js";
|
|
4
|
+
import { useText as r } from "../../hooks/useText.js";
|
|
5
|
+
import { headerActionZoneStyle as i } from "./headerActionZone.js";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
7
|
//#region src/components/chrome/RecordHeader.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
8
|
+
var c = 160;
|
|
9
|
+
function l({ icon: l, title: u, description: d, highlights: f, mode: p, dirty: m = !1, showBack: h = !1, onBack: g, right: _, identityControls: v, showTitle: y = !0 }) {
|
|
10
|
+
let b = r();
|
|
11
|
+
return /* @__PURE__ */ s("div", {
|
|
13
12
|
style: {
|
|
14
13
|
display: "flex",
|
|
15
14
|
alignItems: "flex-start",
|
|
@@ -18,24 +17,24 @@ function u({ icon: u, title: d, description: f, highlights: p, mode: m, dirty: h
|
|
|
18
17
|
minWidth: 0
|
|
19
18
|
},
|
|
20
19
|
children: [
|
|
21
|
-
|
|
20
|
+
y && h && /* @__PURE__ */ o("div", {
|
|
22
21
|
style: {
|
|
23
22
|
paddingTop: 4,
|
|
24
23
|
flexShrink: 0
|
|
25
24
|
},
|
|
26
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ o(t, {
|
|
27
26
|
size: 26,
|
|
28
|
-
icon: /* @__PURE__ */
|
|
29
|
-
title:
|
|
30
|
-
onClick:
|
|
27
|
+
icon: /* @__PURE__ */ o(e.back, { size: 14 }),
|
|
28
|
+
title: b("shell.back", "Back"),
|
|
29
|
+
onClick: g
|
|
31
30
|
})
|
|
32
31
|
}),
|
|
33
|
-
|
|
32
|
+
y && l && /* @__PURE__ */ o("div", {
|
|
34
33
|
style: {
|
|
35
34
|
flexShrink: 0,
|
|
36
35
|
paddingTop: 2
|
|
37
36
|
},
|
|
38
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ o("span", {
|
|
39
38
|
style: {
|
|
40
39
|
width: 32,
|
|
41
40
|
height: 32,
|
|
@@ -46,11 +45,11 @@ function u({ icon: u, title: d, description: f, highlights: p, mode: m, dirty: h
|
|
|
46
45
|
alignItems: "center",
|
|
47
46
|
justifyContent: "center"
|
|
48
47
|
},
|
|
49
|
-
children:
|
|
48
|
+
children: l
|
|
50
49
|
})
|
|
51
50
|
}),
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */
|
|
51
|
+
y && /* @__PURE__ */ s(a, { children: [
|
|
52
|
+
/* @__PURE__ */ o("h1", {
|
|
54
53
|
style: {
|
|
55
54
|
margin: 0,
|
|
56
55
|
fontSize: "var(--page-title-size, var(--page-title-size-detail))",
|
|
@@ -58,21 +57,21 @@ function u({ icon: u, title: d, description: f, highlights: p, mode: m, dirty: h
|
|
|
58
57
|
letterSpacing: 0,
|
|
59
58
|
lineHeight: "var(--page-title-line-height, var(--page-title-line-height-detail))",
|
|
60
59
|
color: "var(--text)",
|
|
61
|
-
minWidth:
|
|
60
|
+
minWidth: c,
|
|
62
61
|
overflowWrap: "anywhere",
|
|
63
62
|
maxWidth: "100%",
|
|
64
63
|
flexGrow: 0,
|
|
65
64
|
flexShrink: 1,
|
|
66
65
|
flexBasis: "auto"
|
|
67
66
|
},
|
|
68
|
-
children:
|
|
67
|
+
children: u
|
|
69
68
|
}),
|
|
70
|
-
|
|
71
|
-
label:
|
|
69
|
+
d && /* @__PURE__ */ o(n, {
|
|
70
|
+
label: d,
|
|
72
71
|
"data-testid": "detail-description-info"
|
|
73
72
|
}),
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
v,
|
|
74
|
+
p === "edit" && m && /* @__PURE__ */ s("span", {
|
|
76
75
|
style: {
|
|
77
76
|
display: "inline-flex",
|
|
78
77
|
alignItems: "center",
|
|
@@ -80,35 +79,29 @@ function u({ icon: u, title: d, description: f, highlights: p, mode: m, dirty: h
|
|
|
80
79
|
fontSize: 11,
|
|
81
80
|
color: "var(--warn)"
|
|
82
81
|
},
|
|
83
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ o("span", { style: {
|
|
84
83
|
width: 6,
|
|
85
84
|
height: 6,
|
|
86
85
|
borderRadius: 999,
|
|
87
86
|
background: "var(--warn)"
|
|
88
|
-
} }),
|
|
89
|
-
}),
|
|
90
|
-
m === "create" && /* @__PURE__ */ s(n, {
|
|
91
|
-
tone: "violet",
|
|
92
|
-
size: "xs",
|
|
93
|
-
dot: !0,
|
|
94
|
-
children: x("shell.record.new", "New record")
|
|
87
|
+
} }), b("shell.record.unsaved", "Unsaved")]
|
|
95
88
|
})
|
|
96
89
|
] }),
|
|
97
|
-
|
|
90
|
+
_ && /* @__PURE__ */ o("div", {
|
|
98
91
|
role: "toolbar",
|
|
99
|
-
"aria-label":
|
|
100
|
-
style:
|
|
101
|
-
children:
|
|
92
|
+
"aria-label": b("shell.record.page_actions", "Page actions"),
|
|
93
|
+
style: i,
|
|
94
|
+
children: _
|
|
102
95
|
}),
|
|
103
|
-
|
|
96
|
+
f && p === "display" && /* @__PURE__ */ o("div", {
|
|
104
97
|
style: {
|
|
105
98
|
flexBasis: "100%",
|
|
106
99
|
minWidth: 0
|
|
107
100
|
},
|
|
108
|
-
children:
|
|
101
|
+
children: f
|
|
109
102
|
})
|
|
110
103
|
]
|
|
111
104
|
});
|
|
112
105
|
}
|
|
113
106
|
//#endregion
|
|
114
|
-
export {
|
|
107
|
+
export { l as RecordHeader };
|