@declarion/react 0.87.0 → 0.89.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.
Files changed (90) hide show
  1. package/dist-lib/app.js +28 -28
  2. package/dist-lib/components/actions/ActionButton.js +86 -85
  3. package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
  4. package/dist-lib/components/actions/ActionRunner.js +47 -47
  5. package/dist-lib/components/actions/ObjectActionBar.js +9 -9
  6. package/dist-lib/components/actions/RowActionsKebab.js +19 -19
  7. package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
  8. package/dist-lib/components/chrome/AssociationTabs.js +21 -21
  9. package/dist-lib/components/chrome/RecordHeader.js +33 -40
  10. package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
  11. package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
  12. package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
  13. package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
  14. package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
  15. package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
  16. package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
  17. package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
  18. package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
  19. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
  20. package/dist-lib/components/fields/FileReferenceField.js +9 -9
  21. package/dist-lib/components/fields/StructureField.js +57 -47
  22. package/dist-lib/components/fields/TimestampField.js +59 -54
  23. package/dist-lib/components/fields/cells/factories/money.js +14 -23
  24. package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
  25. package/dist-lib/components/fields/cells/factories/text.js +18 -3
  26. package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
  27. package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
  28. package/dist-lib/components/layout/Layout.js +306 -361
  29. package/dist-lib/components/layout/Rail.js +42 -41
  30. package/dist-lib/components/layout/Sidebar.js +132 -117
  31. package/dist-lib/components/layout/TabStrip.js +116 -115
  32. package/dist-lib/components/layout/TenantChip.js +47 -54
  33. package/dist-lib/components/layout/TopBar.js +108 -105
  34. package/dist-lib/components/list/InlineEditCell.js +23 -23
  35. package/dist-lib/components/list/QuickPeek.js +65 -66
  36. package/dist-lib/components/pages/DocumentsMenu.js +42 -42
  37. package/dist-lib/components/pages/ExportMenu.js +25 -25
  38. package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
  39. package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
  40. package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
  41. package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
  42. package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
  43. package/dist-lib/components/pages/auth/AuthShell.js +73 -73
  44. package/dist-lib/components/pages/auth/SignIn.js +32 -32
  45. package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
  46. package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
  47. package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
  48. package/dist-lib/components/pages/list/ListHeader.js +19 -19
  49. package/dist-lib/components/pages/list/ListNoRows.js +15 -15
  50. package/dist-lib/components/pages/list/ListToolbar.js +145 -145
  51. package/dist-lib/components/pages/list/useActiveView.js +14 -5
  52. package/dist-lib/components/pages/list/useListQuery.js +121 -81
  53. package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
  54. package/dist-lib/components/pages/list/useRowMenu.js +7 -7
  55. package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
  56. package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
  57. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
  58. package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
  59. package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
  60. package/dist-lib/hooks/useAuth.js +11 -11
  61. package/dist-lib/hooks/useBranding.js +4 -4
  62. package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
  63. package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
  64. package/dist-lib/hooks/useImpersonation.js +6 -6
  65. package/dist-lib/hooks/useMutations.js +23 -23
  66. package/dist-lib/hooks/useObjectStatus.js +5 -5
  67. package/dist-lib/hooks/useParams.js +59 -51
  68. package/dist-lib/hooks/useProperties.js +8 -8
  69. package/dist-lib/hooks/useRowTenant.js +18 -6
  70. package/dist-lib/hooks/useText.js +9 -7
  71. package/dist-lib/hooks/useUiPreferences.js +71 -0
  72. package/dist-lib/index.d.ts +22 -6
  73. package/dist-lib/index.js +127 -126
  74. package/dist-lib/lib/actions.js +116 -84
  75. package/dist-lib/lib/child-config.js +10 -1
  76. package/dist-lib/lib/format-count.js +16 -1
  77. package/dist-lib/lib/language.js +23 -21
  78. package/dist-lib/lib/money-text.js +29 -0
  79. package/dist-lib/lib/profile.js +4 -0
  80. package/dist-lib/lib/role-label.js +8 -0
  81. package/dist-lib/lib/schema-routing.js +34 -14
  82. package/dist-lib/lib/shortcut.js +10 -0
  83. package/dist-lib/lib/timestamp.js +93 -31
  84. package/dist-lib/stores/auth.js +9 -8
  85. package/dist-lib/stores/preferences.js +56 -17
  86. package/dist-lib/testing.d.ts +1 -1
  87. package/dist-lib/testing.js +25 -28
  88. package/dist-lib/types/schema.js +33 -27
  89. package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
  90. package/package.json +1 -1
@@ -1,38 +1,40 @@
1
- import { useAuthStore as e } from "../../stores/auth.js";
2
- import { Icon as t } from "../primitives/Icons.js";
3
- import { IconBtn as n } from "../primitives/IconBtn.js";
4
- import { Pill as r } from "../primitives/Pill.js";
5
- import { Kbd as i } from "../primitives/Kbd.js";
6
- import { Avatar as a } from "../primitives/Avatar.js";
7
- import { Dropdown as ee } from "../primitives/Dropdown.js";
8
- import { useText as o } from "../../hooks/useText.js";
9
- import { useResponsiveMode as s } from "../../hooks/useResponsiveMode.js";
10
- import { MenuItem as c } from "../primitives/MenuItem.js";
11
- import { usePreferencesStore as l } from "../../stores/preferences.js";
12
- import { useTabStore as te } from "../../stores/tabs.js";
13
- import { useAuth as u } from "../../hooks/useAuth.js";
14
- import { useImpersonation as d } from "../../hooks/useImpersonation.js";
15
- import { TenantChip as f, envTone as p } from "./TenantChip.js";
16
- import { Breadcrumbs as m } from "../chrome/Breadcrumbs.js";
17
- import { pageInsetX as h } from "../../lib/page-inset.js";
18
- import { useRef as g, useState as _ } from "react";
19
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
1
+ import { usePreferencesStore as e } from "../../stores/preferences.js";
2
+ import { useAuthStore as t } from "../../stores/auth.js";
3
+ import { Icon as n } from "../primitives/Icons.js";
4
+ import { IconBtn as r } from "../primitives/IconBtn.js";
5
+ import { Pill as i } from "../primitives/Pill.js";
6
+ import { Kbd as a } from "../primitives/Kbd.js";
7
+ import { Avatar as o } from "../primitives/Avatar.js";
8
+ import { Dropdown as s } from "../primitives/Dropdown.js";
9
+ import { useText as c } from "../../hooks/useText.js";
10
+ import { useResponsiveMode as ee } from "../../hooks/useResponsiveMode.js";
11
+ import { MenuItem as l } from "../primitives/MenuItem.js";
12
+ import { useUiPreferences as u } from "../../hooks/useUiPreferences.js";
13
+ import { shortcutLabel as d } from "../../lib/shortcut.js";
14
+ import { useTabStore as f } from "../../stores/tabs.js";
15
+ import { useAuth as p } from "../../hooks/useAuth.js";
16
+ import { useImpersonation as te } from "../../hooks/useImpersonation.js";
17
+ import { TenantChip as ne, envTone as re } from "./TenantChip.js";
18
+ import { Breadcrumbs as ie } from "../chrome/Breadcrumbs.js";
19
+ import { pageInsetX as ae } from "../../lib/page-inset.js";
20
+ import { activeRoleLabel as oe } from "../../lib/role-label.js";
21
+ import { useRef as m, useState as h } from "react";
22
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
20
23
  //#region src/components/layout/TopBar.tsx
21
- var x = "⌘K";
22
- function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie, showNavButton: C, onOpenTabs: ae, tabsButtonRef: oe, showTabsButton: w, mobileTabCount: T = 0, onCmdK: E, onToggleAI: D, aiOpen: O, onOpenProfile: k, onOpenPrefs: A, showTenantSwitcher: j = !0, showBreadcrumbs: M = !0, showThemeToggle: N = !0 } = {}) {
23
- let P = o(), F = e((e) => e.user), I = s(), { activeTenant: L, tenants: R, switchTenant: z, isSwitchingTenant: se, logout: B } = u(), { isImpersonating: V, stop: H } = d(), U = l((e) => e.colorScheme), W = l((e) => e.set), [G, K] = _(!1), q = g(null), J = L?.env, ce = p(J), Y = F?.email ?? "", X = F?.display_name || Y || P("shell.user_menu.user", "User"), Z = C && I.category === "phone", Q = C && I.category !== "desktop", $ = () => {
24
+ function y({ breadcrumbs: y, onCrumbClick: b, onOpenNav: x, navButtonRef: se, showNavButton: S, onOpenTabs: ce, tabsButtonRef: C, showTabsButton: w, mobileTabCount: T = 0, onCmdK: E, onToggleAI: D, aiOpen: O, onOpenProfile: k, onOpenPrefs: A, showTenantSwitcher: j = !0, showBreadcrumbs: M = !0, showThemeToggle: N = !0 } = {}) {
25
+ let P = c(), F = t((e) => e.user), I = ee(), { activeTenant: L, tenants: le, switchTenant: R, isSwitchingTenant: z, logout: B } = p(), { isImpersonating: V, stop: H } = te(), U = e((e) => e.colorScheme), { set: W } = u(), [ue, G] = h(!1), K = m(null), q = L?.env, de = re(q), J = F?.email ?? "", Y = oe(F, P), X = F?.display_name || J || P("shell.user_menu.user", "User"), Z = S && I.category === "phone", Q = S && I.category !== "desktop", $ = () => {
24
26
  W("colorScheme", U === "dark" ? "light" : "dark");
25
- }, le = (e) => {
26
- L?.id !== e.id && (!te.getState().tabs.some((e) => e.dirty) || window.confirm(P("shell.tenant.switch_confirm", "You have unsaved changes in one or more tabs. Switching tenant will discard them. Continue?"))) && z(e.id);
27
+ }, fe = (e) => {
28
+ L?.id !== e.id && (!f.getState().tabs.some((e) => e.dirty) || window.confirm(P("shell.tenant.switch_confirm", "You have unsaved changes in one or more tabs. Switching tenant will discard them. Continue?"))) && R(e.id);
27
29
  };
28
- return /* @__PURE__ */ b("header", {
30
+ return /* @__PURE__ */ v("header", {
29
31
  style: {
30
32
  gridArea: "topbar",
31
33
  background: "var(--surface)",
32
34
  borderBottom: "1px solid var(--border)",
33
35
  display: "flex",
34
36
  alignItems: "center",
35
- ...h(12),
37
+ ...ae(12),
36
38
  gap: Q ? 8 : 10,
37
39
  zIndex: 5,
38
40
  position: "relative",
@@ -40,39 +42,40 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
40
42
  overflow: "hidden"
41
43
  },
42
44
  children: [
43
- J === "production" && /* @__PURE__ */ y("span", { style: {
45
+ q === "production" && /* @__PURE__ */ _("span", { style: {
44
46
  position: "absolute",
45
47
  left: 0,
46
48
  right: 0,
47
49
  top: 0,
48
50
  height: 2,
49
- background: `linear-gradient(90deg, transparent, ${ce.fg}, transparent)`,
51
+ background: `linear-gradient(90deg, transparent, ${de.fg}, transparent)`,
50
52
  opacity: .35,
51
53
  pointerEvents: "none"
52
54
  } }),
53
- C && /* @__PURE__ */ y(n, {
54
- ref: ie,
55
- icon: /* @__PURE__ */ y(t.menu, { size: 16 }),
55
+ S && /* @__PURE__ */ _(r, {
56
+ ref: se,
57
+ icon: /* @__PURE__ */ _(n.menu, { size: 16 }),
56
58
  title: P("shell.nav.open", "Open navigation"),
57
- onClick: re
59
+ onClick: x
58
60
  }),
59
- j && /* @__PURE__ */ y("div", {
61
+ j && /* @__PURE__ */ _("div", {
60
62
  style: {
61
63
  minWidth: 0,
62
64
  maxWidth: Z ? "min(210px, 56vw)" : Q ? 230 : void 0,
63
65
  flex: Z ? "1 1 auto" : "0 0 auto"
64
66
  },
65
- children: /* @__PURE__ */ y(f, {
67
+ children: /* @__PURE__ */ _(ne, {
66
68
  tenant: L,
67
- tenants: R,
68
- onSwitch: le,
69
- busy: se,
69
+ tenants: le,
70
+ role: Y,
71
+ onSwitch: fe,
72
+ busy: z,
70
73
  compact: Q,
71
74
  locked: V,
72
75
  lockedReason: V ? P("shell.impersonation.tenant_locked", "Exit impersonation to switch tenants") : void 0
73
76
  })
74
77
  }),
75
- V && /* @__PURE__ */ b("span", {
78
+ V && /* @__PURE__ */ v("span", {
76
79
  "data-testid": "impersonation-chip",
77
80
  style: {
78
81
  display: "inline-flex",
@@ -89,39 +92,39 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
89
92
  letterSpacing: "0.05em"
90
93
  },
91
94
  children: [
92
- /* @__PURE__ */ y(t.users, { size: 11 }),
95
+ /* @__PURE__ */ _(n.users, { size: 11 }),
93
96
  " ",
94
97
  P("shell.impersonation.chip", "Impersonating")
95
98
  ]
96
99
  }),
97
- !Z && M && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
100
+ !Z && M && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
98
101
  style: {
99
102
  color: "var(--text-4)",
100
103
  fontSize: 11
101
104
  },
102
- children: /* @__PURE__ */ y(t.right, { size: 10 })
103
- }), /* @__PURE__ */ y(m, {
104
- items: S ?? [],
105
- onCrumbClick: ne
105
+ children: /* @__PURE__ */ _(n.right, { size: 10 })
106
+ }), /* @__PURE__ */ _(ie, {
107
+ items: y ?? [],
108
+ onCrumbClick: b
106
109
  })] }),
107
- /* @__PURE__ */ y("div", { style: { flex: 1 } }),
108
- w && /* @__PURE__ */ y(n, {
109
- ref: oe,
110
- icon: /* @__PURE__ */ y(t.layers, { size: 15 }),
110
+ /* @__PURE__ */ _("div", { style: { flex: 1 } }),
111
+ w && /* @__PURE__ */ _(r, {
112
+ ref: C,
113
+ icon: /* @__PURE__ */ _(n.layers, { size: 15 }),
111
114
  title: P("shell.tabs.open_tabs_count", "Open tabs ({count})", { count: T }),
112
- onClick: ae
115
+ onClick: ce
113
116
  }),
114
- Z ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(n, {
115
- icon: /* @__PURE__ */ y(t.search, { size: 15 }),
117
+ Z ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(r, {
118
+ icon: /* @__PURE__ */ _(n.search, { size: 15 }),
116
119
  title: P("shell.palette.search", "Search or run command"),
117
120
  onClick: E
118
- }), D && /* @__PURE__ */ y(n, {
119
- icon: /* @__PURE__ */ y(t.sparkle, { size: 15 }),
121
+ }), D && /* @__PURE__ */ _(r, {
122
+ icon: /* @__PURE__ */ _(n.sparkle, { size: 15 }),
120
123
  title: P("shell.ai_assistant", "AI Assistant"),
121
124
  onClick: D,
122
125
  active: O
123
- })] }) : /* @__PURE__ */ b(v, { children: [
124
- /* @__PURE__ */ b("button", {
126
+ })] }) : /* @__PURE__ */ v(g, { children: [
127
+ /* @__PURE__ */ v("button", {
125
128
  onClick: E,
126
129
  style: {
127
130
  display: "flex",
@@ -138,44 +141,44 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
138
141
  minWidth: 240
139
142
  },
140
143
  children: [
141
- /* @__PURE__ */ y(t.search, { size: 13 }),
142
- /* @__PURE__ */ y("span", {
144
+ /* @__PURE__ */ _(n.search, { size: 13 }),
145
+ /* @__PURE__ */ _("span", {
143
146
  style: {
144
147
  flex: 1,
145
148
  textAlign: "left"
146
149
  },
147
150
  children: P("shell.topbar.search_hint", "Search or run command…")
148
151
  }),
149
- /* @__PURE__ */ y(i, { children: x })
152
+ /* @__PURE__ */ _(a, { children: d("K") })
150
153
  ]
151
154
  }),
152
- /* @__PURE__ */ y(n, {
153
- icon: /* @__PURE__ */ y(t.bell, { size: 15 }),
155
+ /* @__PURE__ */ _(r, {
156
+ icon: /* @__PURE__ */ _(n.bell, { size: 15 }),
154
157
  title: P("shell.topbar.notifications", "Notifications")
155
158
  }),
156
- N && /* @__PURE__ */ y(n, {
157
- icon: y(U === "dark" ? t.sun : t.moon, { size: 15 }),
159
+ N && /* @__PURE__ */ _(r, {
160
+ icon: _(U === "dark" ? n.sun : n.moon, { size: 15 }),
158
161
  title: P("shell.topbar.theme", "Theme"),
159
162
  onClick: $
160
163
  }),
161
- /* @__PURE__ */ y(n, {
162
- icon: /* @__PURE__ */ y(t.sparkle, { size: 15 }),
164
+ /* @__PURE__ */ _(r, {
165
+ icon: /* @__PURE__ */ _(n.sparkle, { size: 15 }),
163
166
  title: P("shell.ai_assistant", "AI Assistant"),
164
167
  onClick: D,
165
168
  active: O
166
169
  }),
167
- /* @__PURE__ */ y("div", { style: {
170
+ /* @__PURE__ */ _("div", { style: {
168
171
  width: 1,
169
172
  height: 18,
170
173
  background: "var(--divider)",
171
174
  margin: "0 2px"
172
175
  } })
173
176
  ] }),
174
- /* @__PURE__ */ b("div", {
177
+ /* @__PURE__ */ v("div", {
175
178
  style: { position: "relative" },
176
- children: [/* @__PURE__ */ b("button", {
177
- ref: q,
178
- onClick: () => K((e) => !e),
179
+ children: [/* @__PURE__ */ v("button", {
180
+ ref: K,
181
+ onClick: () => G((e) => !e),
179
182
  style: {
180
183
  display: "flex",
181
184
  alignItems: "center",
@@ -186,50 +189,50 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
186
189
  border: 0,
187
190
  cursor: "pointer"
188
191
  },
189
- children: [/* @__PURE__ */ y(a, {
192
+ children: [/* @__PURE__ */ _(o, {
190
193
  name: X,
191
194
  size: 22
192
- }), !Q && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
195
+ }), !Q && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
193
196
  style: {
194
197
  fontSize: 12,
195
198
  color: "var(--text-2)"
196
199
  },
197
- children: Y
198
- }), /* @__PURE__ */ y(t.down, {
200
+ children: J
201
+ }), /* @__PURE__ */ _(n.down, {
199
202
  size: 11,
200
203
  style: { color: "var(--text-3)" }
201
204
  })] })]
202
- }), /* @__PURE__ */ b(ee, {
203
- open: G,
204
- anchor: q.current,
205
- onClose: () => K(!1),
205
+ }), /* @__PURE__ */ v(s, {
206
+ open: ue,
207
+ anchor: K.current,
208
+ onClose: () => G(!1),
206
209
  width: 220,
207
210
  align: "end",
208
211
  children: [
209
- /* @__PURE__ */ b("div", {
212
+ /* @__PURE__ */ v("div", {
210
213
  style: {
211
214
  padding: "10px 10px 8px",
212
215
  borderBottom: "1px solid var(--divider)"
213
216
  },
214
- children: [/* @__PURE__ */ b("div", {
217
+ children: [/* @__PURE__ */ v("div", {
215
218
  style: {
216
219
  display: "flex",
217
220
  gap: 8,
218
221
  alignItems: "center"
219
222
  },
220
- children: [/* @__PURE__ */ y(a, {
223
+ children: [/* @__PURE__ */ _(o, {
221
224
  name: X,
222
225
  size: 28
223
- }), /* @__PURE__ */ b("div", {
226
+ }), /* @__PURE__ */ v("div", {
224
227
  style: { minWidth: 0 },
225
- children: [/* @__PURE__ */ y("div", {
228
+ children: [/* @__PURE__ */ _("div", {
226
229
  style: {
227
230
  fontSize: 12.5,
228
231
  fontWeight: 600,
229
232
  color: "var(--text)"
230
233
  },
231
234
  children: X
232
- }), /* @__PURE__ */ y("div", {
235
+ }), /* @__PURE__ */ _("div", {
233
236
  style: {
234
237
  fontSize: 11,
235
238
  color: "var(--text-3)",
@@ -237,61 +240,61 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
237
240
  textOverflow: "ellipsis",
238
241
  whiteSpace: "nowrap"
239
242
  },
240
- children: Y
243
+ children: J
241
244
  })]
242
245
  })]
243
- }), L && /* @__PURE__ */ b("div", {
246
+ }), L && /* @__PURE__ */ v("div", {
244
247
  style: {
245
248
  marginTop: 8,
246
249
  display: "flex",
247
250
  gap: 4,
248
251
  flexWrap: "wrap"
249
252
  },
250
- children: [/* @__PURE__ */ y(r, {
253
+ children: [/* @__PURE__ */ _(i, {
251
254
  tone: "violet",
252
255
  size: "xs",
253
256
  dot: !0,
254
- children: L.role
255
- }), /* @__PURE__ */ b(r, {
257
+ children: Y
258
+ }), /* @__PURE__ */ v(i, {
256
259
  tone: "slate",
257
260
  size: "xs",
258
- children: [L.name, J ? ` · ${J}` : ""]
261
+ children: [L.name, q ? ` · ${q}` : ""]
259
262
  })]
260
263
  })]
261
264
  }),
262
- V && /* @__PURE__ */ y(c, {
263
- icon: /* @__PURE__ */ y(t.x, { size: 13 }),
265
+ V && /* @__PURE__ */ _(l, {
266
+ icon: /* @__PURE__ */ _(n.x, { size: 13 }),
264
267
  onClick: () => {
265
- K(!1), H();
268
+ G(!1), H();
266
269
  },
267
270
  "data-testid": "exit-impersonation-menu-item",
268
271
  children: P("shell.impersonation.exit", "Exit impersonation")
269
272
  }),
270
- /* @__PURE__ */ y(c, {
271
- icon: /* @__PURE__ */ y(t.users, { size: 13 }),
273
+ /* @__PURE__ */ _(l, {
274
+ icon: /* @__PURE__ */ _(n.users, { size: 13 }),
272
275
  onClick: () => {
273
- K(!1), k?.();
276
+ G(!1), k?.();
274
277
  },
275
278
  children: P("shell.user_menu.profile", "My profile")
276
279
  }),
277
- /* @__PURE__ */ y(c, {
278
- icon: /* @__PURE__ */ y(t.settings, { size: 13 }),
280
+ /* @__PURE__ */ _(l, {
281
+ icon: /* @__PURE__ */ _(n.settings, { size: 13 }),
279
282
  onClick: () => {
280
- K(!1), A?.();
283
+ G(!1), A?.();
281
284
  },
282
285
  children: P("shell.user_menu.preferences", "Preferences")
283
286
  }),
284
- N && /* @__PURE__ */ y(c, {
285
- icon: /* @__PURE__ */ y(t.moon, { size: 13 }),
287
+ N && /* @__PURE__ */ _(l, {
288
+ icon: /* @__PURE__ */ _(n.moon, { size: 13 }),
286
289
  onClick: $,
287
290
  children: P("shell.user_menu.toggle_theme", "Toggle theme")
288
291
  }),
289
- /* @__PURE__ */ y(c, { divider: !0 }),
290
- /* @__PURE__ */ y(c, {
291
- icon: /* @__PURE__ */ y(t.x, { size: 13 }),
292
+ /* @__PURE__ */ _(l, { divider: !0 }),
293
+ /* @__PURE__ */ _(l, {
294
+ icon: /* @__PURE__ */ _(n.x, { size: 13 }),
292
295
  danger: !0,
293
296
  onClick: () => {
294
- K(!1), B();
297
+ G(!1), B();
295
298
  },
296
299
  children: P("shell.user_menu.sign_out", "Sign out")
297
300
  })
@@ -302,4 +305,4 @@ function S({ breadcrumbs: S, onCrumbClick: ne, onOpenNav: re, navButtonRef: ie,
302
305
  });
303
306
  }
304
307
  //#endregion
305
- export { S as TopBar };
308
+ export { y as TopBar };
@@ -1,9 +1,9 @@
1
- import { Icon as e } from "../primitives/Icons.js";
2
- import { IconBtn as t } from "../primitives/IconBtn.js";
3
- import { useText as n } from "../../hooks/useText.js";
4
- import { BoolToggle as r } from "../primitives/BoolToggle.js";
5
- import { Select as i, TextInput as a } from "../primitives/Fields.js";
6
- import { failureTitle as o } from "../../lib/failure.js";
1
+ import { failureTitle as e } from "../../lib/failure.js";
2
+ import { Icon as t } from "../primitives/Icons.js";
3
+ import { IconBtn as n } from "../primitives/IconBtn.js";
4
+ import { useText as r } from "../../hooks/useText.js";
5
+ import { BoolToggle as i } from "../primitives/BoolToggle.js";
6
+ import { Select as a, TextInput as o } from "../primitives/Fields.js";
7
7
  import { toast as s } from "../../lib/toast.js";
8
8
  import { useEffect as c, useRef as l, useState as u } from "react";
9
9
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -20,24 +20,24 @@ var m = {
20
20
  gap: 4
21
21
  };
22
22
  function h({ value: h, onSave: g, type: _ = "text", options: v, trigger: y = "always", label: b, placeholder: x }) {
23
- let S = n(), C = n("errors"), [w, T] = u(h), [E, D] = u(h), [O, k] = u(!1), [A, j] = u(h), M = l(null);
23
+ let S = r(), C = r("errors"), [w, T] = u(h), [E, D] = u(h), [O, k] = u(!1), [A, j] = u(h), M = l(null);
24
24
  c(() => {
25
25
  T(h), D(h), j(h);
26
26
  }, [h]);
27
27
  let N = () => {
28
28
  j(E), k(!0);
29
- }, P = async (e) => {
30
- let t = w;
31
- D(e), T(e), k(!1);
29
+ }, P = async (t) => {
30
+ let n = w;
31
+ D(t), T(t), k(!1);
32
32
  try {
33
- await g(e);
34
- } catch (e) {
35
- D(t), T(t);
36
- let n = o(C, e);
33
+ await g(t);
34
+ } catch (t) {
35
+ D(n), T(n);
36
+ let r = e(C, t);
37
37
  s.error(C("list.cell_unsaved", "The value could not be saved."), b ? S("list.cell.field_reason", "{field}: {reason}", {
38
38
  field: b,
39
- reason: n
40
- }) : n);
39
+ reason: r
40
+ }) : r);
41
41
  }
42
42
  }, F = () => {
43
43
  j(E), k(!1);
@@ -54,31 +54,31 @@ function h({ value: h, onSave: g, type: _ = "text", options: v, trigger: y = "al
54
54
  onKeyDown: (e) => {
55
55
  e.key === "Enter" && I(), e.key === "Escape" && F();
56
56
  },
57
- children: [_ === "select" ? /* @__PURE__ */ f(i, {
57
+ children: [_ === "select" ? /* @__PURE__ */ f(a, {
58
58
  value: A,
59
59
  options: v || [],
60
60
  onChange: (e) => {
61
61
  j(e), P(e);
62
62
  }
63
- }) : _ === "bool" ? /* @__PURE__ */ f(r, {
63
+ }) : _ === "bool" ? /* @__PURE__ */ f(i, {
64
64
  value: A === "true",
65
65
  onChange: (e) => {
66
66
  let t = String(e);
67
67
  j(t), P(t);
68
68
  }
69
- }) : /* @__PURE__ */ f(a, {
69
+ }) : /* @__PURE__ */ f(o, {
70
70
  value: A ?? "",
71
71
  onChange: j,
72
72
  autoFocus: !0,
73
73
  placeholder: x
74
- }), _ !== "select" && _ !== "bool" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(t, {
74
+ }), _ !== "select" && _ !== "bool" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, {
75
75
  size: 24,
76
- icon: /* @__PURE__ */ f(e.check, { size: 13 }),
76
+ icon: /* @__PURE__ */ f(t.check, { size: 13 }),
77
77
  onClick: I,
78
78
  title: S("dialog.save", "Save")
79
- }), /* @__PURE__ */ f(t, {
79
+ }), /* @__PURE__ */ f(n, {
80
80
  size: 24,
81
- icon: /* @__PURE__ */ f(e.x, { size: 13 }),
81
+ icon: /* @__PURE__ */ f(t.x, { size: 13 }),
82
82
  onClick: F,
83
83
  title: S("dialog.cancel", "Cancel")
84
84
  })] })]