@declarion/react 0.93.0 → 0.97.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/components/agents/AgentChatPanel.impl.js +3 -1
- package/dist-lib/components/agents/transcript-runs.js +15 -9
- package/dist-lib/components/detail-layout/LayoutRenderer.js +44 -38
- package/dist-lib/components/pages/profile/Profile.impl.js +117 -117
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +9 -9
- package/dist-lib/components/params/ParamsBlock.js +35 -24
- package/dist-lib/hooks/useParams.js +43 -18
- package/dist-lib/index.d.ts +8 -1
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/{useResponsiveMode-9_eJT18k.d.ts → useResponsiveMode-ECv1AEhv.d.ts} +1 -0
- package/package.json +1 -1
|
@@ -772,7 +772,9 @@ function B({ block: e }) {
|
|
|
772
772
|
body: e.data
|
|
773
773
|
});
|
|
774
774
|
case "decision": return /* @__PURE__ */ C(K, { block: e });
|
|
775
|
-
case "location":
|
|
775
|
+
case "location":
|
|
776
|
+
case "thinking":
|
|
777
|
+
case "redacted_thinking": return null;
|
|
776
778
|
case "system": return /* @__PURE__ */ w("div", {
|
|
777
779
|
style: {
|
|
778
780
|
fontSize: 10.5,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//#region src/components/agents/transcript-runs.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Set(["operation.search"]);
|
|
3
|
-
function t(t,
|
|
3
|
+
function t(t, i = []) {
|
|
4
4
|
let s = [], c = /* @__PURE__ */ new Map();
|
|
5
|
-
for (let e of
|
|
5
|
+
for (let e of i) e.assistant_message_id && e.provider_call_id && c.set(r(e.assistant_message_id, e.provider_call_id), e);
|
|
6
6
|
for (let r of t) {
|
|
7
7
|
let t = n(r, c);
|
|
8
|
-
if (
|
|
8
|
+
if (o(r) && s.push({
|
|
9
9
|
kind: "message",
|
|
10
|
-
message:
|
|
10
|
+
message: a(r)
|
|
11
11
|
}), t.length === 0) continue;
|
|
12
|
-
let
|
|
12
|
+
let i = s[s.length - 1], l = i?.kind === "run" ? i : (s.push({
|
|
13
13
|
kind: "run",
|
|
14
14
|
id: r.id,
|
|
15
15
|
calls: []
|
|
@@ -39,14 +39,20 @@ function n(e, t) {
|
|
|
39
39
|
function r(e, t) {
|
|
40
40
|
return `${e}\u0000${t}`;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
var i = /* @__PURE__ */ new Set([
|
|
43
|
+
"tool_use",
|
|
44
|
+
"tool_result",
|
|
45
|
+
"thinking",
|
|
46
|
+
"redacted_thinking"
|
|
47
|
+
]);
|
|
48
|
+
function a(e) {
|
|
43
49
|
return {
|
|
44
50
|
...e,
|
|
45
|
-
content: (e.content ?? []).filter((e) =>
|
|
51
|
+
content: (e.content ?? []).filter((e) => !i.has(e.type))
|
|
46
52
|
};
|
|
47
53
|
}
|
|
48
|
-
function
|
|
49
|
-
return (e.content ?? []).some((e) =>
|
|
54
|
+
function o(e) {
|
|
55
|
+
return (e.content ?? []).some((e) => !i.has(e.type));
|
|
50
56
|
}
|
|
51
57
|
//#endregion
|
|
52
58
|
export { t as fold };
|
|
@@ -6,49 +6,55 @@ import { SectionBlock as i } from "./SectionBlock.js";
|
|
|
6
6
|
import { ChildrenBlock as a } from "./ChildrenBlock.js";
|
|
7
7
|
import { AssociatedBlock as o } from "./AssociatedBlock.js";
|
|
8
8
|
import { PropertiesBlock as s } from "./PropertiesBlock.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { ParamsBlock as c } from "../params/ParamsBlock.js";
|
|
10
|
+
import { StatusesBlock as l } from "./StatusesBlock.js";
|
|
11
|
+
import { WidgetHost as u } from "./widgets/WidgetHost.js";
|
|
12
|
+
import { Fragment as d, jsx as f } from "react/jsx-runtime";
|
|
12
13
|
//#region src/components/detail-layout/LayoutRenderer.tsx
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ d
|
|
14
|
+
function p({ nodes: e, ctx: t }) {
|
|
15
|
+
return /* @__PURE__ */ f(d, { children: e.map((e, n) => /* @__PURE__ */ f(m, {
|
|
15
16
|
node: e,
|
|
16
17
|
ctx: t
|
|
17
18
|
}, n)) });
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
config:
|
|
22
|
-
ctx:
|
|
23
|
-
}) :
|
|
24
|
-
config:
|
|
25
|
-
node:
|
|
26
|
-
ctx:
|
|
27
|
-
}) :
|
|
28
|
-
config:
|
|
29
|
-
ctx:
|
|
30
|
-
}) :
|
|
31
|
-
config:
|
|
32
|
-
ctx:
|
|
33
|
-
}) :
|
|
34
|
-
node:
|
|
35
|
-
ctx:
|
|
36
|
-
}) :
|
|
37
|
-
node:
|
|
38
|
-
ctx:
|
|
39
|
-
}) :
|
|
40
|
-
fields:
|
|
41
|
-
ctx:
|
|
42
|
-
}) :
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
function m({ node: d, ctx: p }) {
|
|
21
|
+
return d.row ? /* @__PURE__ */ f(e, {
|
|
22
|
+
config: d.row,
|
|
23
|
+
ctx: p
|
|
24
|
+
}) : d.column ? /* @__PURE__ */ f(t, {
|
|
25
|
+
config: d.column,
|
|
26
|
+
node: d,
|
|
27
|
+
ctx: p
|
|
28
|
+
}) : d.tabs ? /* @__PURE__ */ f(r, {
|
|
29
|
+
config: d.tabs,
|
|
30
|
+
ctx: p
|
|
31
|
+
}) : d.section ? /* @__PURE__ */ f(i, {
|
|
32
|
+
config: d.section,
|
|
33
|
+
ctx: p
|
|
34
|
+
}) : d.children ? /* @__PURE__ */ f(a, {
|
|
35
|
+
node: d,
|
|
36
|
+
ctx: p
|
|
37
|
+
}) : d.associated ? /* @__PURE__ */ f(o, {
|
|
38
|
+
node: d,
|
|
39
|
+
ctx: p
|
|
40
|
+
}) : d.fields ? /* @__PURE__ */ f(n, {
|
|
41
|
+
fields: d.fields,
|
|
42
|
+
ctx: p
|
|
43
|
+
}) : d.properties == null ? d.statuses == null ? d.parameters ? /* @__PURE__ */ f(c, {
|
|
44
|
+
carrierEntityCode: p.entityCode,
|
|
45
|
+
carrierScope: p.entity.params_scope ?? p.entityCode,
|
|
46
|
+
rowId: p.recordId,
|
|
47
|
+
writeOneByOne: !0
|
|
48
|
+
}) : d.widget ? /* @__PURE__ */ f(u, {
|
|
49
|
+
config: d.widget,
|
|
50
|
+
ctx: p
|
|
51
|
+
}) : null : /* @__PURE__ */ f(l, {
|
|
52
|
+
node: d,
|
|
53
|
+
ctx: p
|
|
54
|
+
}) : /* @__PURE__ */ f(s, {
|
|
55
|
+
node: d,
|
|
56
|
+
ctx: p
|
|
51
57
|
});
|
|
52
58
|
}
|
|
53
59
|
//#endregion
|
|
54
|
-
export {
|
|
60
|
+
export { m as LayoutNodeRenderer, p as LayoutRenderer };
|
|
@@ -23,26 +23,26 @@ import { activeRoleLabel as C } from "../../../lib/role-label.js";
|
|
|
23
23
|
import { useBrandingChrome as w } from "../../../hooks/useBrandingChrome.js";
|
|
24
24
|
import { useCurrentScreen as T } from "../../../hooks/useCurrentScreen.js";
|
|
25
25
|
import { useObject as E } from "../../../hooks/useObject.js";
|
|
26
|
-
import { FileDraftScope as
|
|
27
|
-
import { singleFileFromValue as
|
|
28
|
-
import { getFileFieldValue as
|
|
29
|
-
import { buildFilesPayload as
|
|
30
|
-
import { EMPTY_CELL as
|
|
31
|
-
import { ChangePasswordDialog as
|
|
32
|
-
import { FieldRow as
|
|
33
|
-
import { AssociatedBlock as
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { Fragment as
|
|
40
|
-
import { Fragment as
|
|
26
|
+
import { FileDraftScope as D, useFileDraftScope as O } from "../../file-widgets/draft-scope.js";
|
|
27
|
+
import { singleFileFromValue as k } from "../../file-widgets/value.js";
|
|
28
|
+
import { getFileFieldValue as A, renderSchemaField as j } from "../../file-widgets/host.js";
|
|
29
|
+
import { buildFilesPayload as M } from "../../file-widgets/payload.js";
|
|
30
|
+
import { EMPTY_CELL as N } from "../../fields/cells/factories/emptyCell.js";
|
|
31
|
+
import { ChangePasswordDialog as P } from "../../shared/ChangePasswordDialog.js";
|
|
32
|
+
import { FieldRow as F, FieldsGrid as I } from "../../detail-layout/FieldRow.js";
|
|
33
|
+
import { AssociatedBlock as L } from "../../detail-layout/AssociatedBlock.js";
|
|
34
|
+
import { ErrorLine as R } from "../../params/param-editors.js";
|
|
35
|
+
import { ParamsBlock as z } from "../../params/ParamsBlock.js";
|
|
36
|
+
import { DetailAuditStrip as ee } from "../../detail-layout/DetailAuditStrip.js";
|
|
37
|
+
import { RecordHeader as B } from "../../chrome/RecordHeader.js";
|
|
38
|
+
import { PageShell as V } from "../../chrome/PageShell.js";
|
|
39
|
+
import { Fragment as H, useId as U, useState as W } from "react";
|
|
40
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
41
41
|
//#region src/components/pages/profile/Profile.impl.tsx
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
-
let r = S(), o = t((e) => e.user), s = t((e) => e.activeTenant), u = t((e) => e.refreshMe), { data: h } = n(), g = T(), _ = w("custom"), v = p(), b = E(a, o?.id),
|
|
45
|
-
entity:
|
|
42
|
+
var J = "avatar";
|
|
43
|
+
function Y() {
|
|
44
|
+
let r = S(), o = t((e) => e.user), s = t((e) => e.activeTenant), u = t((e) => e.refreshMe), { data: h } = n(), g = T(), _ = w("custom"), v = p(), b = E(a, o?.id), O = b.data?.data, [k, A] = W(!1), [M, L] = W(!1), R = h?.entities[a], z = o?.display_name || o?.email || v("profile.user_fallback", "User"), H = (e) => v(o?.role_names?.[e]) || e, U = C(o, v), J = s?.env ? `${s.name} · ${s.env}` : s?.name ?? "—", Y = (e) => R && j({
|
|
45
|
+
entity: R,
|
|
46
46
|
entityCode: "profile",
|
|
47
47
|
fieldName: e,
|
|
48
48
|
record: {
|
|
@@ -52,33 +52,33 @@ function K() {
|
|
|
52
52
|
mode: "display",
|
|
53
53
|
t: v
|
|
54
54
|
});
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
header: /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ q(G, { children: [
|
|
56
|
+
/* @__PURE__ */ q(V, {
|
|
57
|
+
header: /* @__PURE__ */ K("div", {
|
|
58
58
|
"data-testid": "profile-hero",
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
icon:
|
|
61
|
-
name:
|
|
59
|
+
children: /* @__PURE__ */ K(B, {
|
|
60
|
+
icon: R?.display.icon ? /* @__PURE__ */ K(x, {
|
|
61
|
+
name: R.display.icon,
|
|
62
62
|
size: 16
|
|
63
63
|
}) : void 0,
|
|
64
|
-
title:
|
|
64
|
+
title: z,
|
|
65
65
|
mode: "display",
|
|
66
66
|
showTitle: _.isVisible("show_title"),
|
|
67
|
-
highlights: /* @__PURE__ */
|
|
67
|
+
highlights: /* @__PURE__ */ q("div", {
|
|
68
68
|
className: "flex flex-wrap gap-1",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ K(d, {
|
|
71
71
|
tone: "violet",
|
|
72
72
|
size: "xs",
|
|
73
73
|
dot: !0,
|
|
74
|
-
children:
|
|
74
|
+
children: U
|
|
75
75
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ K(d, {
|
|
77
77
|
tone: "slate",
|
|
78
78
|
size: "xs",
|
|
79
|
-
children:
|
|
79
|
+
children: J
|
|
80
80
|
}),
|
|
81
|
-
o?.is_active && /* @__PURE__ */
|
|
81
|
+
o?.is_active && /* @__PURE__ */ K(d, {
|
|
82
82
|
tone: "emerald",
|
|
83
83
|
size: "xs",
|
|
84
84
|
dot: !0,
|
|
@@ -86,86 +86,86 @@ function K() {
|
|
|
86
86
|
})
|
|
87
87
|
]
|
|
88
88
|
}),
|
|
89
|
-
right: _.isVisible("show_actions") && /* @__PURE__ */
|
|
90
|
-
icon: /* @__PURE__ */
|
|
91
|
-
onClick: () =>
|
|
89
|
+
right: _.isVisible("show_actions") && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(l, {
|
|
90
|
+
icon: /* @__PURE__ */ K(c.edit, { size: 13 }),
|
|
91
|
+
onClick: () => L(!0),
|
|
92
92
|
children: v("profile.edit", "Edit profile")
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
icon: /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ K(l, {
|
|
94
|
+
icon: /* @__PURE__ */ K(c.settings, { size: 13 }),
|
|
95
95
|
onClick: () => r("/preferences", { topLevel: !0 }),
|
|
96
96
|
children: v("profile.preferences", "Preferences")
|
|
97
97
|
})] })
|
|
98
98
|
})
|
|
99
99
|
}),
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ K(m, {
|
|
102
102
|
title: v("profile.personal.title", "Personal info"),
|
|
103
|
-
icon: /* @__PURE__ */
|
|
104
|
-
children: /* @__PURE__ */
|
|
103
|
+
icon: /* @__PURE__ */ K(c.users, { size: 14 }),
|
|
104
|
+
children: /* @__PURE__ */ K("div", {
|
|
105
105
|
"data-testid": "profile-personal-info-grid",
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
o &&
|
|
106
|
+
children: /* @__PURE__ */ q(I, { children: [
|
|
107
|
+
o && R && O && /* @__PURE__ */ K(F, {
|
|
108
108
|
label: v("profile.avatar", "Avatar"),
|
|
109
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ K(D, { children: /* @__PURE__ */ K(te, {
|
|
110
110
|
userId: o.id,
|
|
111
|
-
entity:
|
|
112
|
-
record:
|
|
111
|
+
entity: R,
|
|
112
|
+
record: O,
|
|
113
113
|
onCommitted: async () => {
|
|
114
114
|
await b.refetch();
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, X(O)) })
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ K(F, {
|
|
119
119
|
label: v("profile.display_name", "Display name"),
|
|
120
|
-
children:
|
|
120
|
+
children: Y("display_name")
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ K(F, {
|
|
123
123
|
label: v("profile.personal.email", "Email"),
|
|
124
124
|
"data-testid": "profile-email",
|
|
125
|
-
children:
|
|
125
|
+
children: Y("email")
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ K(F, {
|
|
128
128
|
label: v("profile.personal.timezone", "Timezone"),
|
|
129
|
-
children:
|
|
129
|
+
children: re()
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ K($, {})
|
|
132
132
|
] })
|
|
133
133
|
})
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ K(m, {
|
|
136
136
|
title: v("profile.security.title", "Security"),
|
|
137
|
-
icon: /* @__PURE__ */
|
|
138
|
-
children: /* @__PURE__ */
|
|
137
|
+
icon: /* @__PURE__ */ K(c.shield, { size: 14 }),
|
|
138
|
+
children: /* @__PURE__ */ K(I, { children: /* @__PURE__ */ K(F, {
|
|
139
139
|
label: v("profile.security.password", "Password"),
|
|
140
140
|
hint: v("profile.security.password_hint", "Update at any time"),
|
|
141
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ K(l, {
|
|
142
142
|
size: "xs",
|
|
143
|
-
onClick: () =>
|
|
143
|
+
onClick: () => A(!0),
|
|
144
144
|
children: v("profile.security.password_change", "Change")
|
|
145
145
|
})
|
|
146
146
|
}) })
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ K(m, {
|
|
149
149
|
title: v("profile.access.title", "Access"),
|
|
150
|
-
icon: /* @__PURE__ */
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
150
|
+
icon: /* @__PURE__ */ K(c.key, { size: 14 }),
|
|
151
|
+
children: /* @__PURE__ */ q(I, { children: [
|
|
152
|
+
/* @__PURE__ */ K(F, {
|
|
153
153
|
label: v("profile.access.role", "Role"),
|
|
154
|
-
children: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ K(d, {
|
|
155
155
|
tone: "violet",
|
|
156
156
|
size: "xs",
|
|
157
157
|
dot: !0,
|
|
158
|
-
children:
|
|
158
|
+
children: U
|
|
159
159
|
})
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ K(F, {
|
|
162
162
|
label: v("profile.access.groups", "Groups"),
|
|
163
|
-
children: o?.roles && o.roles.length > 0 ? /* @__PURE__ */
|
|
163
|
+
children: o?.roles && o.roles.length > 0 ? /* @__PURE__ */ K("div", {
|
|
164
164
|
className: "flex flex-wrap gap-1",
|
|
165
|
-
children: o.roles.map((e) => /* @__PURE__ */
|
|
166
|
-
}) :
|
|
165
|
+
children: o.roles.map((e) => /* @__PURE__ */ K(f, { children: H(e) }, e))
|
|
166
|
+
}) : N
|
|
167
167
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ K(F, {
|
|
169
169
|
label: v("profile.access.permissions", "Permissions"),
|
|
170
170
|
children: i(v, "profile.access.permissions_explicit", o?.permissions?.length ?? 0, {
|
|
171
171
|
one: "{count} explicit",
|
|
@@ -174,44 +174,44 @@ function K() {
|
|
|
174
174
|
})
|
|
175
175
|
] })
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
o?.id && /* @__PURE__ */
|
|
179
|
-
g?.screen && h &&
|
|
177
|
+
/* @__PURE__ */ K(ie, { userId: o?.id }),
|
|
178
|
+
o?.id && /* @__PURE__ */ K(Z, { userId: o.id }),
|
|
179
|
+
g?.screen && h && R && O && /* @__PURE__ */ K(ee, {
|
|
180
180
|
screen: g.screen,
|
|
181
|
-
entity:
|
|
181
|
+
entity: R,
|
|
182
182
|
entityCode: "profile",
|
|
183
|
-
record:
|
|
183
|
+
record: O,
|
|
184
184
|
recordId: o?.id,
|
|
185
185
|
schema: h
|
|
186
186
|
})
|
|
187
187
|
]
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
open:
|
|
189
|
+
/* @__PURE__ */ K(ne, {
|
|
190
|
+
open: M,
|
|
191
191
|
initialName: o?.display_name ?? "",
|
|
192
192
|
userId: o?.id ?? "",
|
|
193
|
-
onClose: () =>
|
|
193
|
+
onClose: () => L(!1),
|
|
194
194
|
onSaved: async () => {
|
|
195
|
-
await u(),
|
|
195
|
+
await u(), L(!1);
|
|
196
196
|
}
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
open:
|
|
200
|
-
onClose: () =>
|
|
198
|
+
/* @__PURE__ */ K(P, {
|
|
199
|
+
open: k,
|
|
200
|
+
onClose: () => A(!1),
|
|
201
201
|
onSubmit: async ({ current: t, next: n }) => {
|
|
202
202
|
await e(t, n), y.success(v("profile.password.changed", "Password changed. Sign in again to continue."));
|
|
203
203
|
}
|
|
204
204
|
})
|
|
205
205
|
] });
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
207
|
+
function X(e) {
|
|
208
|
+
return k(A(e, J))?.id ?? "";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
let i = p(), c = p("errors"), l =
|
|
212
|
-
let f =
|
|
210
|
+
function te({ userId: e, entity: t, record: n, onCommitted: r }) {
|
|
211
|
+
let i = p(), c = p("errors"), l = O(), [u, d] = W(!1), [f, m] = W(0), h = async (u) => {
|
|
212
|
+
let f = M({
|
|
213
213
|
entity: t,
|
|
214
|
-
formData: { [
|
|
214
|
+
formData: { [J]: u },
|
|
215
215
|
record: n,
|
|
216
216
|
isNew: !1
|
|
217
217
|
});
|
|
@@ -219,7 +219,7 @@ function J({ userId: e, entity: t, record: n, onCommitted: r }) {
|
|
|
219
219
|
d(!0);
|
|
220
220
|
try {
|
|
221
221
|
await o(a, { id: e }, { $files: f });
|
|
222
|
-
let t =
|
|
222
|
+
let t = X({ [J]: u });
|
|
223
223
|
t && l.markCommitted(t), await r(), y.success(i("profile.avatar.updated", "Avatar updated."));
|
|
224
224
|
} catch (e) {
|
|
225
225
|
await l.flushAllDrafts(), m((e) => e + 1), y.error(s(c, e));
|
|
@@ -228,10 +228,10 @@ function J({ userId: e, entity: t, record: n, onCommitted: r }) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ K(H, { children: j({
|
|
232
232
|
entity: t,
|
|
233
233
|
entityCode: a,
|
|
234
|
-
fieldName:
|
|
234
|
+
fieldName: J,
|
|
235
235
|
record: n,
|
|
236
236
|
mode: "edit",
|
|
237
237
|
onChange: (e) => void h(e),
|
|
@@ -240,13 +240,13 @@ function J({ userId: e, entity: t, record: n, onCommitted: r }) {
|
|
|
240
240
|
fieldId: "profile-avatar"
|
|
241
241
|
}) }, f);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
let d = h().isPhone, f = p(), m = p("errors"), y =
|
|
243
|
+
function ne({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
244
|
+
let d = h().isPhone, f = p(), m = p("errors"), y = U(), [b, x] = W(t), [S, C] = W(!1), [w, T] = W(null);
|
|
245
245
|
if (!e) return null;
|
|
246
246
|
let E = () => {
|
|
247
247
|
x(t), T(null), r();
|
|
248
248
|
};
|
|
249
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("div", {
|
|
250
250
|
onClick: E,
|
|
251
251
|
style: {
|
|
252
252
|
position: "fixed",
|
|
@@ -255,7 +255,7 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
255
255
|
zIndex: 60,
|
|
256
256
|
backdropFilter: "blur(2px)"
|
|
257
257
|
}
|
|
258
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ q("div", {
|
|
259
259
|
"data-testid": "edit-profile-dialog",
|
|
260
260
|
style: {
|
|
261
261
|
position: "fixed",
|
|
@@ -272,7 +272,7 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
272
272
|
overflow: "hidden"
|
|
273
273
|
},
|
|
274
274
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ q("div", {
|
|
276
276
|
style: {
|
|
277
277
|
padding: "14px 18px 0",
|
|
278
278
|
display: "flex",
|
|
@@ -280,7 +280,7 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
280
280
|
gap: 10
|
|
281
281
|
},
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ K("span", {
|
|
284
284
|
style: {
|
|
285
285
|
width: 28,
|
|
286
286
|
height: 28,
|
|
@@ -291,18 +291,18 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
291
291
|
alignItems: "center",
|
|
292
292
|
justifyContent: "center"
|
|
293
293
|
},
|
|
294
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ K(c.edit, { size: 15 })
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ q("div", {
|
|
297
297
|
style: { flex: 1 },
|
|
298
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ K("div", {
|
|
299
299
|
style: {
|
|
300
300
|
fontSize: 14,
|
|
301
301
|
fontWeight: 600,
|
|
302
302
|
color: "var(--text)"
|
|
303
303
|
},
|
|
304
304
|
children: f("profile.edit", "Edit profile")
|
|
305
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ K("div", {
|
|
306
306
|
style: {
|
|
307
307
|
fontSize: 11.5,
|
|
308
308
|
color: "var(--text-3)"
|
|
@@ -310,33 +310,33 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
310
310
|
children: f("profile.edit.subtitle", "Update your display name.")
|
|
311
311
|
})]
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
icon: /* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ K(u, {
|
|
314
|
+
icon: /* @__PURE__ */ K(c.x, { size: 14 }),
|
|
315
315
|
title: f("profile.edit.close", "Close"),
|
|
316
316
|
onClick: E
|
|
317
317
|
})
|
|
318
318
|
]
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ q("div", {
|
|
321
321
|
style: {
|
|
322
322
|
padding: "12px 18px 16px",
|
|
323
323
|
display: "flex",
|
|
324
324
|
flexDirection: "column",
|
|
325
325
|
gap: 12
|
|
326
326
|
},
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(_, {
|
|
328
328
|
required: !0,
|
|
329
329
|
htmlFor: y,
|
|
330
330
|
children: f("profile.display_name", "Display name")
|
|
331
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ K(v, {
|
|
332
332
|
id: y,
|
|
333
333
|
value: b,
|
|
334
334
|
onChange: x,
|
|
335
335
|
placeholder: f("profile.edit.name_placeholder", "Your name"),
|
|
336
336
|
autoFocus: !0
|
|
337
|
-
})] }), w && /* @__PURE__ */
|
|
337
|
+
})] }), w && /* @__PURE__ */ K(R, { text: w })]
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ q("div", {
|
|
340
340
|
style: {
|
|
341
341
|
padding: "10px 16px",
|
|
342
342
|
borderTop: "1px solid var(--divider)",
|
|
@@ -347,14 +347,14 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
347
347
|
flexWrap: d ? "wrap" : "nowrap"
|
|
348
348
|
},
|
|
349
349
|
children: [
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ K("div", { style: { flex: 1 } }),
|
|
351
|
+
/* @__PURE__ */ K(l, {
|
|
352
352
|
onClick: E,
|
|
353
353
|
children: f("dialog.cancel", "Cancel")
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ K(l, {
|
|
356
356
|
kind: "primary",
|
|
357
|
-
icon:
|
|
357
|
+
icon: K(S ? g : c.check, { size: 13 }),
|
|
358
358
|
onClick: async () => {
|
|
359
359
|
if (!b.trim()) T(f("profile.edit.name_required", "Display name is required."));
|
|
360
360
|
else {
|
|
@@ -376,7 +376,7 @@ function Y({ open: e, initialName: t, userId: n, onClose: r, onSaved: i }) {
|
|
|
376
376
|
]
|
|
377
377
|
})] });
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function re() {
|
|
380
380
|
try {
|
|
381
381
|
return Intl.DateTimeFormat().resolvedOptions().timeZone || "—";
|
|
382
382
|
} catch {
|
|
@@ -385,7 +385,7 @@ function X() {
|
|
|
385
385
|
}
|
|
386
386
|
function Z({ userId: e }) {
|
|
387
387
|
let { data: t } = n(), r = Q(t);
|
|
388
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ K(z, {
|
|
389
389
|
carrierEntityCode: a,
|
|
390
390
|
carrierScope: r,
|
|
391
391
|
rowId: e
|
|
@@ -398,16 +398,16 @@ function $() {
|
|
|
398
398
|
let e = p(), { data: t } = n(), i = b().data?.find((e) => e.code === r);
|
|
399
399
|
if (i?.scopes?.includes(Q(t))) return null;
|
|
400
400
|
let a = typeof i?.value == "string" ? i.value : e.language, o = t?.languages?.find((e) => e.code === a);
|
|
401
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ K(F, {
|
|
402
402
|
label: e(i?.name),
|
|
403
|
-
children: i ? o?.name[o.code] || e(o?.name) || a : /* @__PURE__ */
|
|
403
|
+
children: i ? o?.name[o.code] || e(o?.name) || a : /* @__PURE__ */ K(g, { size: 12 })
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
function ie({ userId: e }) {
|
|
407
407
|
let { data: t } = n();
|
|
408
408
|
if (!e || !t) return null;
|
|
409
409
|
let r = t.entities[a];
|
|
410
|
-
return r ? /* @__PURE__ */
|
|
410
|
+
return r ? /* @__PURE__ */ K(L, {
|
|
411
411
|
node: {
|
|
412
412
|
associated: "api_key",
|
|
413
413
|
foreign_key: "user_id"
|
|
@@ -424,4 +424,4 @@ function ie({ userId: e }) {
|
|
|
424
424
|
}) : null;
|
|
425
425
|
}
|
|
426
426
|
//#endregion
|
|
427
|
-
export {
|
|
427
|
+
export { Y as Profile, $ as ProfileLanguageRow, Z as ProfileParamsBlock };
|
|
@@ -11,8 +11,8 @@ import { Select as l, TextInput as u } from "../../primitives/Fields.js";
|
|
|
11
11
|
import { useAllParams as d, useCarrierParamOverrides as ee } from "../../../hooks/useParams.js";
|
|
12
12
|
import { PageHeader as f } from "../../chrome/PageHeader.js";
|
|
13
13
|
import { dataTableCellStyle as p, dataTableHeadCellStyle as m, dataTableStyle as h } from "../../primitives/dataTableStyles.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { EditParamDialog as te, ErrorLine as g, ResetParamControl as _, ValuePreview as v, paramSourceName as y, paramTenantEditable as b, useParamRefLabels as x } from "../../params/param-editors.js";
|
|
15
|
+
import { PageShell as ne } from "../../chrome/PageShell.js";
|
|
16
16
|
import { useMemo as S, useState as C } from "react";
|
|
17
17
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
18
18
|
//#region src/components/pages/tenant-params/TenantParamsPage.impl.tsx
|
|
@@ -42,7 +42,7 @@ function A(e) {
|
|
|
42
42
|
return e === "tenant" ? "violet" : e === "env" ? "amber" : "slate";
|
|
43
43
|
}
|
|
44
44
|
function j(n) {
|
|
45
|
-
let r = a(), i = a("errors"), p = e((e) => e.activeTenant?.id) ?? "", { isPhone:
|
|
45
|
+
let r = a(), i = a("errors"), p = e((e) => e.activeTenant?.id) ?? "", { isPhone: _ } = o(), b = d("tenant"), [A, j] = C(""), [P, F] = C(""), [I, L] = C(""), [R, z] = C(!1), [B, V] = C(null), { overrideByCode: H, missingParams: U, isLoading: W, error: G, clearError: K, save: q, reset: J } = ee({
|
|
46
46
|
carrierEntityCode: E,
|
|
47
47
|
rowId: p
|
|
48
48
|
}), Y = async (e, t) => {
|
|
@@ -76,7 +76,7 @@ function j(n) {
|
|
|
76
76
|
param: e,
|
|
77
77
|
override: t
|
|
78
78
|
}),
|
|
79
|
-
value: /* @__PURE__ */ w(
|
|
79
|
+
value: /* @__PURE__ */ w(v, {
|
|
80
80
|
type: e.type,
|
|
81
81
|
value: e.value,
|
|
82
82
|
values: e.values,
|
|
@@ -93,11 +93,11 @@ function j(n) {
|
|
|
93
93
|
})
|
|
94
94
|
};
|
|
95
95
|
});
|
|
96
|
-
return /* @__PURE__ */ T(
|
|
96
|
+
return /* @__PURE__ */ T(ne, {
|
|
97
97
|
header: /* @__PURE__ */ w(f, { description: r("params.tenant.subtitle", "Tenant configuration. Editing a value stores a tenant override; Reset restores the platform default.") }),
|
|
98
98
|
children: [
|
|
99
|
-
G && /* @__PURE__ */ w(
|
|
100
|
-
U && /* @__PURE__ */ w(
|
|
99
|
+
G && /* @__PURE__ */ w(g, { text: G }),
|
|
100
|
+
U && /* @__PURE__ */ w(g, { text: i("param.overrides_unreadable", "The current parameter overrides could not be read.") }),
|
|
101
101
|
/* @__PURE__ */ T("div", {
|
|
102
102
|
"data-testid": "tenant-params-filters",
|
|
103
103
|
style: {
|
|
@@ -171,7 +171,7 @@ function j(n) {
|
|
|
171
171
|
fontSize: 12.5
|
|
172
172
|
},
|
|
173
173
|
children: r("params.empty", "No parameters match.")
|
|
174
|
-
}) :
|
|
174
|
+
}) : _ ? /* @__PURE__ */ w("div", {
|
|
175
175
|
"data-testid": "tenant-params-cards",
|
|
176
176
|
style: {
|
|
177
177
|
display: "flex",
|
|
@@ -373,7 +373,7 @@ function N({ param: e, stored: t, onEdit: i, onReset: o }) {
|
|
|
373
373
|
icon: /* @__PURE__ */ w(n.edit, { size: 12 }),
|
|
374
374
|
onClick: i,
|
|
375
375
|
children: s("params.edit", "Edit")
|
|
376
|
-
}), t && /* @__PURE__ */ w(
|
|
376
|
+
}), t && /* @__PURE__ */ w(_, {
|
|
377
377
|
param: e,
|
|
378
378
|
description: s("params.reset_confirm.tenant_description", "The value this tenant set is removed, and the platform default applies again."),
|
|
379
379
|
onReset: o
|
|
@@ -15,18 +15,29 @@ function v(e) {
|
|
|
15
15
|
function y(e, t) {
|
|
16
16
|
return e ? e.filter((e) => e.scopes?.includes(t)) : [];
|
|
17
17
|
}
|
|
18
|
-
function b({ carrierEntityCode: b, carrierScope: x, rowId: S, title: C, icon: w }) {
|
|
19
|
-
let
|
|
18
|
+
function b({ carrierEntityCode: b, carrierScope: x, rowId: S, title: C, icon: w, writeOneByOne: T }) {
|
|
19
|
+
let E = r(), D = r("errors"), O = o(), k = m(() => y(O.data, x), [O.data, x]), [A, j] = h(null), { overrideByCode: M, missingParams: N, isLoading: P, error: F, clearError: I, save: L, reset: R } = s({
|
|
20
20
|
carrierEntityCode: b,
|
|
21
21
|
rowId: S,
|
|
22
|
-
enabled:
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
enabled: k.length > 0,
|
|
23
|
+
writeOneByOne: T
|
|
24
|
+
}), z = v(x) === "object", B = m(() => k.map((e) => {
|
|
25
|
+
let t = z ? M.get(e.code) : void 0;
|
|
26
|
+
return t ? {
|
|
27
|
+
...e,
|
|
28
|
+
value: t.value
|
|
29
|
+
} : e;
|
|
30
|
+
}), [
|
|
31
|
+
k,
|
|
32
|
+
z,
|
|
33
|
+
M
|
|
34
|
+
]), V = p(B), H = async (e, t) => {
|
|
35
|
+
await L(e, t) && j((t) => t === e ? null : t);
|
|
25
36
|
};
|
|
26
|
-
return
|
|
27
|
-
title: C ??
|
|
37
|
+
return k.length === 0 ? null : /* @__PURE__ */ _(i, {
|
|
38
|
+
title: C ?? E("params.title", "Parameters"),
|
|
28
39
|
icon: w ?? /* @__PURE__ */ g(e.settings, { size: 14 }),
|
|
29
|
-
children: [N ? /* @__PURE__ */ g(l, { text:
|
|
40
|
+
children: [N ? /* @__PURE__ */ g(l, { text: D("param.overrides_unreadable", "The current parameter overrides could not be read.") }) : P ? /* @__PURE__ */ g("div", {
|
|
30
41
|
style: { padding: "8px 0" },
|
|
31
42
|
children: /* @__PURE__ */ g(a, { size: 16 })
|
|
32
43
|
}) : /* @__PURE__ */ _("div", {
|
|
@@ -35,8 +46,8 @@ function b({ carrierEntityCode: b, carrierScope: x, rowId: S, title: C, icon: w
|
|
|
35
46
|
flexDirection: "column",
|
|
36
47
|
gap: 10
|
|
37
48
|
},
|
|
38
|
-
children: [F && !
|
|
39
|
-
let i = M.get(r.code), a = i !== void 0, o = a && r.source === v(x);
|
|
49
|
+
children: [F && !A && /* @__PURE__ */ g(l, { text: F }), B.map((r) => {
|
|
50
|
+
let i = M.get(r.code), a = i !== void 0, o = a && (z || r.source === v(x));
|
|
40
51
|
return /* @__PURE__ */ _("div", {
|
|
41
52
|
"data-testid": `param-row-${r.code}`,
|
|
42
53
|
style: {
|
|
@@ -52,55 +63,55 @@ function b({ carrierEntityCode: b, carrierScope: x, rowId: S, title: C, icon: w
|
|
|
52
63
|
fontSize: 12.5,
|
|
53
64
|
fontWeight: 500
|
|
54
65
|
},
|
|
55
|
-
children:
|
|
66
|
+
children: E(r.name) || r.code
|
|
56
67
|
}),
|
|
57
68
|
/* @__PURE__ */ g(d, {
|
|
58
69
|
type: r.type,
|
|
59
70
|
value: r.value,
|
|
60
71
|
values: r.values,
|
|
61
|
-
label:
|
|
72
|
+
label: V(r)
|
|
62
73
|
}),
|
|
63
74
|
o && /* @__PURE__ */ g(n, {
|
|
64
75
|
tone: "violet",
|
|
65
76
|
size: "xs",
|
|
66
|
-
children:
|
|
77
|
+
children: E("params.overridden", "overridden")
|
|
67
78
|
}),
|
|
68
79
|
a && !o && /* @__PURE__ */ g("span", {
|
|
69
80
|
"data-testid": `param-not-applied-${r.code}`,
|
|
70
|
-
title:
|
|
81
|
+
title: E("params.block.not_applied_hint", "You set {value}, and it no longer satisfies this parameter's declaration. Source of the value in effect: {source}. Reset to remove what you set, or edit it to a value the declaration accepts.", {
|
|
71
82
|
value: JSON.stringify(i.value),
|
|
72
|
-
source: f(
|
|
83
|
+
source: f(E, r.source)
|
|
73
84
|
}),
|
|
74
85
|
children: /* @__PURE__ */ g(n, {
|
|
75
86
|
tone: "amber",
|
|
76
87
|
size: "xs",
|
|
77
|
-
children:
|
|
88
|
+
children: E("params.not_applied", "not applied")
|
|
78
89
|
})
|
|
79
90
|
}),
|
|
80
91
|
/* @__PURE__ */ g(t, {
|
|
81
92
|
size: "xs",
|
|
82
93
|
icon: /* @__PURE__ */ g(e.edit, { size: 12 }),
|
|
83
94
|
onClick: () => {
|
|
84
|
-
I(),
|
|
95
|
+
I(), j(r);
|
|
85
96
|
},
|
|
86
|
-
children:
|
|
97
|
+
children: E("params.edit", "Edit")
|
|
87
98
|
}),
|
|
88
99
|
a && /* @__PURE__ */ g(u, {
|
|
89
100
|
param: r,
|
|
90
|
-
description:
|
|
101
|
+
description: E("params.reset_confirm.block_description", "The value set here is removed, and the value it inherits applies again."),
|
|
91
102
|
onReset: (e) => void R(e)
|
|
92
103
|
})
|
|
93
104
|
]
|
|
94
105
|
}, r.code);
|
|
95
106
|
})]
|
|
96
|
-
}),
|
|
97
|
-
param:
|
|
98
|
-
current: M.get(
|
|
107
|
+
}), A && /* @__PURE__ */ g(c, {
|
|
108
|
+
param: A,
|
|
109
|
+
current: M.get(A.code)?.value ?? A.value,
|
|
99
110
|
error: F,
|
|
100
111
|
onCancel: () => {
|
|
101
|
-
|
|
112
|
+
j(null), I();
|
|
102
113
|
},
|
|
103
|
-
onSave: (e) =>
|
|
114
|
+
onSave: (e) => H(A, e)
|
|
104
115
|
})]
|
|
105
116
|
});
|
|
106
117
|
}
|
|
@@ -28,40 +28,65 @@ async function g(e, { carrierEntityCode: n, rowId: r }, i) {
|
|
|
28
28
|
fields: { [m]: i(c) }
|
|
29
29
|
}), await e.invalidateQueries({ queryKey: ["params-all"] }), await e.invalidateQueries({ queryKey: ["params"] }), await e.invalidateQueries({ queryKey: s }), await t(e);
|
|
30
30
|
}
|
|
31
|
-
function _({ carrierEntityCode: e, rowId: t, enabled: n = !0 }) {
|
|
32
|
-
let
|
|
31
|
+
function _({ carrierEntityCode: e, rowId: t, enabled: n = !0, writeOneByOne: r = !1 }) {
|
|
32
|
+
let i = p(), _ = c("errors"), [v, y] = d(null), b = f({
|
|
33
33
|
queryKey: h(e, t),
|
|
34
34
|
queryFn: () => o(e, t),
|
|
35
35
|
enabled: n && !!t,
|
|
36
36
|
staleTime: 3e4
|
|
37
|
-
}),
|
|
38
|
-
|
|
37
|
+
}), x = b.data?.data, S = !!x && !("$params" in x), C = u(() => Array.isArray(x?.$params) ? x[m] : [], [x]), w = u(() => new Map(C.map((e) => [e.param_code, e])), [C]), T = l(async (n) => {
|
|
38
|
+
y(null);
|
|
39
39
|
try {
|
|
40
|
-
return await g(
|
|
40
|
+
return await g(i, {
|
|
41
41
|
carrierEntityCode: e,
|
|
42
42
|
rowId: t
|
|
43
43
|
}, n), !0;
|
|
44
44
|
} catch (e) {
|
|
45
|
-
return
|
|
45
|
+
return y(s(_, e)), !1;
|
|
46
46
|
}
|
|
47
47
|
}, [
|
|
48
48
|
e,
|
|
49
49
|
t,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]),
|
|
50
|
+
i,
|
|
51
|
+
_
|
|
52
|
+
]), E = l(async (n, r) => {
|
|
53
|
+
y(null);
|
|
54
|
+
try {
|
|
55
|
+
return await a("params.set", {
|
|
56
|
+
code: n,
|
|
57
|
+
value: r,
|
|
58
|
+
entity: e,
|
|
59
|
+
object_id: t
|
|
60
|
+
}), await i.invalidateQueries({ queryKey: ["params-all"] }), await i.invalidateQueries({ queryKey: ["params"] }), await i.invalidateQueries({ queryKey: h(e, t) }), !0;
|
|
61
|
+
} catch (e) {
|
|
62
|
+
return y(s(_, e)), !1;
|
|
63
|
+
}
|
|
64
|
+
}, [
|
|
65
|
+
e,
|
|
66
|
+
t,
|
|
67
|
+
i,
|
|
68
|
+
_
|
|
69
|
+
]), D = l((e, t) => r ? E(e.code, t) : T((n) => [...n.filter((t) => t.param_code !== e.code), {
|
|
53
70
|
param_code: e.code,
|
|
54
71
|
value: t
|
|
55
|
-
}]), [
|
|
72
|
+
}]), [
|
|
73
|
+
r,
|
|
74
|
+
E,
|
|
75
|
+
T
|
|
76
|
+
]), O = l((e) => r ? E(e.code, null) : T((t) => t.filter((t) => t.param_code !== e.code)), [
|
|
77
|
+
r,
|
|
78
|
+
E,
|
|
79
|
+
T
|
|
80
|
+
]), k = l(() => y(null), []);
|
|
56
81
|
return {
|
|
57
|
-
overrides:
|
|
58
|
-
overrideByCode:
|
|
59
|
-
missingParams:
|
|
60
|
-
isLoading:
|
|
61
|
-
error:
|
|
62
|
-
clearError:
|
|
63
|
-
save:
|
|
64
|
-
reset:
|
|
82
|
+
overrides: C,
|
|
83
|
+
overrideByCode: w,
|
|
84
|
+
missingParams: S,
|
|
85
|
+
isLoading: b.isLoading,
|
|
86
|
+
error: v,
|
|
87
|
+
clearError: k,
|
|
88
|
+
save: D,
|
|
89
|
+
reset: O
|
|
65
90
|
};
|
|
66
91
|
}
|
|
67
92
|
function v(e) {
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as DynamicIcon, n as IconName, r as IconProps, t as Icon } from "./Icons-Dzl-AkD_.js";
|
|
2
2
|
import { i as setIconRegistry, n as getIcon, t as IconDef } from "./icon-registry-CUT4eF63.js";
|
|
3
|
-
import { $ as AreaDef, $t as HydratedFile, A as EnrichedRow, At as MANDATORY_LANGUAGE, B as Refs, Bt as FilterValueResolver, C as ApiErrorBody, Ct as fieldDisplayName, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesToDetailId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuesFromId, F as LoginResponse, Ft as pluralText, G as V2ListParams, Gt as parseFilterURLState, H as StatusInfo, Ht as OP_LABELS, I as ParamLookup, It as textWithNodes, J as V2ParamInstance, Jt as FileAddress, K as V2ListResponse, Kt as parseFiltersFromURL, L as PropertyValue, Lt as FilterNode, M as ListMeta, Mt as TextVars, N as ListParams, Nt as makeTextFn, O as CheckSetupResponse, Ot as pkValuesToId, P as ListResponse, Pt as pickLocalized, Q as Action, Qt as FileFieldValue, R as PublicParam, Rt as FilterOp, S as ApiError, St as extractPkValues, T as BrandingIdentity, Tt as pkValuePartsToId, U as Tenant, Ut as countActiveFilters, V as SignupResponse, Vt as NO_VALUE_OPS, W as TenantEnv, Wt as hasOrGroups, X as V2StatusInstance, Xt as FileFieldDisplay, Y as V2PropertyInstance, Yt as FileFieldDef, Z as isCursorStaleError, Zt as FileFieldMode, _ as executeAction$1, _t as StatusGroupDef, a as ResponsiveMode, at as FieldAccessInfo, b as AggregateParams, bt as buildEntityDetailHref, c as resolveViewportCategory, ct as NavNode, d as ActionExecuteResponse, dt as PropertyDef, en as UploadProgress, et as ChildRelation, f as ActionItemError, ft as RefConfig, g as deleteObject, gt as StatusDef, h as buildActionBody, ht as SpecialValue, i as ResponsiveBreakpoints, it as EnumDef, j as ImpersonationInfo, jt as TextFn, k as DataResponse, kt as resolveDetailRoute, l as ActionBatchError, lt as ParameterDef, m as GetEntityOptions, mt as Screen, n as useResponsiveMode, nn as OrderedMap, nt as Entity, o as ResponsiveViewport, ot as LanguageDef, p as ActionItemSkip, pt as Schema, q as V2Meta, qt as setFiltersInURL, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rt as EntityField, s as ViewportCategory, st as LocalizedString, t as ResponsiveModeProvider, tn as UploadedFile, tt as ClassificationTierDef, u as ActionExecuteRequest, ut as PkValues, v as restoreObject, vt as StructureDef, w as AuthUser, wt as getPrimaryKeyFields, x as AggregateResponse, xt as buildRowDetailHref, y as AggregateGroup, yt as buildDetailHrefFromId, z as PublicParamsResponse, zt as FilterURLState } from "./useResponsiveMode-
|
|
3
|
+
import { $ as AreaDef, $t as HydratedFile, A as EnrichedRow, At as MANDATORY_LANGUAGE, B as Refs, Bt as FilterValueResolver, C as ApiErrorBody, Ct as fieldDisplayName, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesToDetailId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuesFromId, F as LoginResponse, Ft as pluralText, G as V2ListParams, Gt as parseFilterURLState, H as StatusInfo, Ht as OP_LABELS, I as ParamLookup, It as textWithNodes, J as V2ParamInstance, Jt as FileAddress, K as V2ListResponse, Kt as parseFiltersFromURL, L as PropertyValue, Lt as FilterNode, M as ListMeta, Mt as TextVars, N as ListParams, Nt as makeTextFn, O as CheckSetupResponse, Ot as pkValuesToId, P as ListResponse, Pt as pickLocalized, Q as Action, Qt as FileFieldValue, R as PublicParam, Rt as FilterOp, S as ApiError, St as extractPkValues, T as BrandingIdentity, Tt as pkValuePartsToId, U as Tenant, Ut as countActiveFilters, V as SignupResponse, Vt as NO_VALUE_OPS, W as TenantEnv, Wt as hasOrGroups, X as V2StatusInstance, Xt as FileFieldDisplay, Y as V2PropertyInstance, Yt as FileFieldDef, Z as isCursorStaleError, Zt as FileFieldMode, _ as executeAction$1, _t as StatusGroupDef, a as ResponsiveMode, at as FieldAccessInfo, b as AggregateParams, bt as buildEntityDetailHref, c as resolveViewportCategory, ct as NavNode, d as ActionExecuteResponse, dt as PropertyDef, en as UploadProgress, et as ChildRelation, f as ActionItemError, ft as RefConfig, g as deleteObject, gt as StatusDef, h as buildActionBody, ht as SpecialValue, i as ResponsiveBreakpoints, it as EnumDef, j as ImpersonationInfo, jt as TextFn, k as DataResponse, kt as resolveDetailRoute, l as ActionBatchError, lt as ParameterDef, m as GetEntityOptions, mt as Screen, n as useResponsiveMode, nn as OrderedMap, nt as Entity, o as ResponsiveViewport, ot as LanguageDef, p as ActionItemSkip, pt as Schema, q as V2Meta, qt as setFiltersInURL, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rt as EntityField, s as ViewportCategory, st as LocalizedString, t as ResponsiveModeProvider, tn as UploadedFile, tt as ClassificationTierDef, u as ActionExecuteRequest, ut as PkValues, v as restoreObject, vt as StructureDef, w as AuthUser, wt as getPrimaryKeyFields, x as AggregateResponse, xt as buildRowDetailHref, y as AggregateGroup, yt as buildDetailHrefFromId, z as PublicParamsResponse, zt as FilterURLState } from "./useResponsiveMode-ECv1AEhv.js";
|
|
4
4
|
import { ButtonHTMLAttributes, CSSProperties, ComponentType, InputHTMLAttributes, MouseEvent, ReactNode, RefObject } from "react";
|
|
5
5
|
import { QueryClient, QueryKey, UseQueryResult } from "@tanstack/react-query";
|
|
6
6
|
import { useLocation, useNavigate, useParams, useSearchParams } from "react-router";
|
|
@@ -2189,6 +2189,13 @@ type AgentContentBlock = {
|
|
|
2189
2189
|
type: "location";
|
|
2190
2190
|
screen: string;
|
|
2191
2191
|
record?: string;
|
|
2192
|
+
} | {
|
|
2193
|
+
type: "thinking";
|
|
2194
|
+
thinking: string;
|
|
2195
|
+
signature: string;
|
|
2196
|
+
} | {
|
|
2197
|
+
type: "redacted_thinking";
|
|
2198
|
+
data: string;
|
|
2192
2199
|
} | {
|
|
2193
2200
|
type: "decision";
|
|
2194
2201
|
tool_use_id?: string;
|
package/dist-lib/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Refs, M as ListMeta, P as ListResponse, d as ActionExecuteResponse, jt as TextFn, k as DataResponse, o as ResponsiveViewport, pt as Schema, st as LocalizedString, u as ActionExecuteRequest } from "./useResponsiveMode-
|
|
1
|
+
import { B as Refs, M as ListMeta, P as ListResponse, d as ActionExecuteResponse, jt as TextFn, k as DataResponse, o as ResponsiveViewport, pt as Schema, st as LocalizedString, u as ActionExecuteRequest } from "./useResponsiveMode-ECv1AEhv.js";
|
|
2
2
|
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { QueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { RenderResult } from "@testing-library/react";
|