@declarion/react 0.86.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.
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,25 +1,26 @@
1
1
  import { useAuthStore as e } from "../../../stores/auth.js";
2
- import { Icon as t } from "../../primitives/Icons.js";
3
- import { Btn as n } from "../../primitives/Btn.js";
4
- import { Pill as r } from "../../primitives/Pill.js";
5
- import { useText as i } from "../../../hooks/useText.js";
6
- import { useResponsiveMode as a } from "../../../hooks/useResponsiveMode.js";
7
- import { BoolToggle as o } from "../../primitives/BoolToggle.js";
8
- import { Spinner as s } from "../../primitives/Spinner.js";
9
- import { Select as c, TextInput as l } from "../../primitives/Fields.js";
10
- import { useAllParams as u, useCarrierParamOverrides as ee } from "../../../hooks/useParams.js";
11
- import { PageHeader as d } from "../../chrome/PageHeader.js";
12
- import { dataTableCellStyle as f, dataTableHeadCellStyle as p, dataTableStyle as m } from "../../primitives/dataTableStyles.js";
13
- import { PageShell as h } from "../../chrome/PageShell.js";
14
- import { EditParamDialog as g, ErrorLine as _, ResetParamControl as v, ValuePreview as y, paramSourceName as b, paramTenantEditable as x, useParamRefLabels as S } from "../../params/param-editors.js";
15
- import { useMemo as C, useState as w } from "react";
16
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
2
+ import { useSchema as t } from "../../../hooks/useSchema.js";
3
+ import { Icon as n } from "../../primitives/Icons.js";
4
+ import { Btn as r } from "../../primitives/Btn.js";
5
+ import { Pill as i } from "../../primitives/Pill.js";
6
+ import { useText as a } from "../../../hooks/useText.js";
7
+ import { useResponsiveMode as o } from "../../../hooks/useResponsiveMode.js";
8
+ import { BoolToggle as s } from "../../primitives/BoolToggle.js";
9
+ import { Spinner as c } from "../../primitives/Spinner.js";
10
+ import { Select as l, TextInput as u } from "../../primitives/Fields.js";
11
+ import { useAllParams as d, useCarrierParamOverrides as ee } from "../../../hooks/useParams.js";
12
+ import { PageHeader as f } from "../../chrome/PageHeader.js";
13
+ import { dataTableCellStyle as p, dataTableHeadCellStyle as m, dataTableStyle as h } from "../../primitives/dataTableStyles.js";
14
+ import { PageShell as g } from "../../chrome/PageShell.js";
15
+ import { EditParamDialog as te, ErrorLine as _, ResetParamControl as v, ValuePreview as ne, paramSourceName as y, paramTenantEditable as b, useParamRefLabels as x } from "../../params/param-editors.js";
16
+ import { useMemo as S, useState as C } from "react";
17
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
17
18
  //#region src/components/pages/tenant-params/TenantParamsPage.impl.tsx
18
- var D = "my_tenant", O = [
19
+ var E = "my_tenant", D = [
19
20
  "yaml",
20
21
  "env",
21
22
  "tenant"
22
- ], k = [
23
+ ], O = [
23
24
  "21%",
24
25
  "17%",
25
26
  "9%",
@@ -27,67 +28,77 @@ var D = "my_tenant", O = [
27
28
  "15%",
28
29
  "11%",
29
30
  "20%"
30
- ], A = {
31
- ...f,
31
+ ], k = {
32
+ ...p,
32
33
  overflow: "hidden",
33
34
  textOverflow: "ellipsis",
34
35
  whiteSpace: "nowrap"
35
- }, j = {
36
- ...f,
36
+ }, re = {
37
+ ...p,
37
38
  whiteSpace: "nowrap",
38
39
  textAlign: "right"
39
40
  };
40
- function M(e) {
41
+ function A(e) {
41
42
  return e === "tenant" ? "violet" : e === "env" ? "amber" : "slate";
42
43
  }
43
- function N(t) {
44
- let n = i(), r = i("errors"), f = e((e) => e.activeTenant?.id) ?? "", { isPhone: v } = a(), x = u("tenant"), [M, N] = w(""), [I, L] = w(""), [R, z] = w(""), [B, V] = w(!1), [H, U] = w(null), { overrideByCode: W, missingParams: G, isLoading: K, error: q, clearError: J, save: Y, reset: X } = ee({
45
- carrierEntityCode: D,
46
- rowId: f
47
- }), Z = async (e, t) => {
48
- await Y(e, t) && U((t) => t === e ? null : t);
49
- }, Q = C(() => x.data ?? [], [x.data]), te = C(() => Array.from(new Set(Q.map((e) => e.category).filter(Boolean))).sort(), [Q]), ne = C(() => {
50
- let e = M.trim().toLowerCase();
51
- return Q.filter((t) => !(I && t.category !== I || R && t.source !== R || B && !W.has(t.code) || e && !`${t.code} ${n(t.name)}`.toLowerCase().includes(e)));
52
- }, [
53
- n,
44
+ function j(n) {
45
+ let r = a(), i = a("errors"), p = e((e) => e.activeTenant?.id) ?? "", { isPhone: v } = 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
+ carrierEntityCode: E,
47
+ rowId: p
48
+ }), Y = async (e, t) => {
49
+ await q(e, t) && V((t) => t === e ? null : t);
50
+ }, X = S(() => b.data ?? [], [b.data]), { data: Z } = t(), Q = S(() => {
51
+ let e = new Map((Z?.enums?.parameter_category?.values ?? []).map((e) => [e.code, r(e.name) || e.code]));
52
+ return (t) => t ? e.get(t) ?? t : "";
53
+ }, [Z, r]), ie = S(() => Array.from(new Set(X.map((e) => e.category).filter(Boolean))).map((e) => ({
54
+ value: e,
55
+ label: Q(e)
56
+ })).sort((e, t) => e.label.localeCompare(t.label, r.language)), [
57
+ X,
54
58
  Q,
55
- M,
59
+ r.language
60
+ ]), ae = S(() => {
61
+ let e = A.trim().toLowerCase();
62
+ return X.filter((t) => !(P && t.category !== P || I && t.source !== I || R && !H.has(t.code) || e && !`${t.code} ${r(t.name)}`.toLowerCase().includes(e))).sort((e, t) => (r(e.name) || e.code).localeCompare(r(t.name) || t.code, r.language) || e.code.localeCompare(t.code));
63
+ }, [
64
+ r,
65
+ X,
66
+ A,
67
+ P,
56
68
  I,
57
69
  R,
58
- B,
59
- W
60
- ]), re = x.isLoading || K, ie = S(Q), $ = ne.map((e) => {
61
- let t = W.get(e.code);
70
+ H
71
+ ]), oe = b.isLoading || W, se = x(X), $ = ae.map((e) => {
72
+ let t = H.get(e.code);
62
73
  return {
63
74
  param: e,
64
- state: /* @__PURE__ */ T(P, {
75
+ state: /* @__PURE__ */ w(M, {
65
76
  param: e,
66
77
  override: t
67
78
  }),
68
- value: /* @__PURE__ */ T(y, {
79
+ value: /* @__PURE__ */ w(ne, {
69
80
  type: e.type,
70
81
  value: e.value,
71
82
  values: e.values,
72
- label: ie(e),
83
+ label: se(e),
73
84
  maxWidth: "100%"
74
85
  }),
75
- actions: /* @__PURE__ */ T(F, {
86
+ actions: /* @__PURE__ */ w(N, {
76
87
  param: e,
77
88
  stored: t !== void 0,
78
89
  onEdit: () => {
79
- J(), U(e);
90
+ K(), V(e);
80
91
  },
81
- onReset: (e) => void X(e)
92
+ onReset: (e) => void J(e)
82
93
  })
83
94
  };
84
95
  });
85
- return /* @__PURE__ */ E(h, {
86
- header: /* @__PURE__ */ T(d, { description: n("params.tenant.subtitle", "Tenant configuration. Editing a value stores a tenant override; Reset restores the platform default.") }),
96
+ return /* @__PURE__ */ T(g, {
97
+ header: /* @__PURE__ */ w(f, { description: r("params.tenant.subtitle", "Tenant configuration. Editing a value stores a tenant override; Reset restores the platform default.") }),
87
98
  children: [
88
- q && /* @__PURE__ */ T(_, { text: q }),
89
- G && /* @__PURE__ */ T(_, { text: r("param.overrides_unreadable", "The current parameter overrides could not be read.") }),
90
- /* @__PURE__ */ E("div", {
99
+ G && /* @__PURE__ */ w(_, { text: G }),
100
+ U && /* @__PURE__ */ w(_, { text: i("param.overrides_unreadable", "The current parameter overrides could not be read.") }),
101
+ /* @__PURE__ */ T("div", {
91
102
  "data-testid": "tenant-params-filters",
92
103
  style: {
93
104
  display: "flex",
@@ -96,81 +107,78 @@ function N(t) {
96
107
  alignItems: "center"
97
108
  },
98
109
  children: [
99
- /* @__PURE__ */ T("div", {
110
+ /* @__PURE__ */ w("div", {
100
111
  style: {
101
112
  minWidth: 200,
102
113
  flex: 1
103
114
  },
104
- children: /* @__PURE__ */ T(l, {
105
- value: M,
106
- onChange: N,
107
- placeholder: n("params.search", "Search name or code…")
115
+ children: /* @__PURE__ */ w(u, {
116
+ value: A,
117
+ onChange: j,
118
+ placeholder: r("params.search", "Search name or code…")
108
119
  })
109
120
  }),
110
- /* @__PURE__ */ T("div", {
121
+ /* @__PURE__ */ w("div", {
111
122
  style: { minWidth: 160 },
112
- children: /* @__PURE__ */ T(c, {
113
- value: I,
123
+ children: /* @__PURE__ */ w(l, {
124
+ value: P,
114
125
  options: [{
115
126
  value: "",
116
- label: n("params.filter.all_categories", "All categories")
117
- }, ...te.map((e) => ({
118
- value: e,
119
- label: e
120
- }))],
121
- onChange: L
127
+ label: r("params.filter.all_categories", "All categories")
128
+ }, ...ie],
129
+ onChange: F
122
130
  })
123
131
  }),
124
- /* @__PURE__ */ T("div", {
132
+ /* @__PURE__ */ w("div", {
125
133
  style: { minWidth: 140 },
126
- children: /* @__PURE__ */ T(c, {
127
- value: R,
134
+ children: /* @__PURE__ */ w(l, {
135
+ value: I,
128
136
  options: [{
129
137
  value: "",
130
- label: n("params.filter.all_sources", "All sources")
131
- }, ...O.map((e) => ({
138
+ label: r("params.filter.all_sources", "All sources")
139
+ }, ...D.map((e) => ({
132
140
  value: e,
133
- label: b(n, e)
141
+ label: y(r, e)
134
142
  }))],
135
- onChange: z
143
+ onChange: L
136
144
  })
137
145
  }),
138
- /* @__PURE__ */ E("label", {
146
+ /* @__PURE__ */ T("label", {
139
147
  style: {
140
148
  display: "flex",
141
149
  alignItems: "center",
142
150
  gap: 6,
143
151
  fontSize: 12
144
152
  },
145
- children: [/* @__PURE__ */ T(o, {
146
- value: B,
147
- onChange: V
148
- }), n("params.filter.overridden_only", "Overridden only")]
153
+ children: [/* @__PURE__ */ w(s, {
154
+ value: R,
155
+ onChange: z
156
+ }), r("params.filter.overridden_only", "Overridden only")]
149
157
  })
150
158
  ]
151
159
  }),
152
- re ? /* @__PURE__ */ T("div", {
160
+ oe ? /* @__PURE__ */ w("div", {
153
161
  style: {
154
162
  padding: "24px 0",
155
163
  textAlign: "center"
156
164
  },
157
- children: /* @__PURE__ */ T(s, { size: 18 })
158
- }) : $.length === 0 ? /* @__PURE__ */ T("div", {
165
+ children: /* @__PURE__ */ w(c, { size: 18 })
166
+ }) : $.length === 0 ? /* @__PURE__ */ w("div", {
159
167
  style: {
160
168
  padding: 16,
161
169
  color: "var(--text-4)",
162
170
  textAlign: "center",
163
171
  fontSize: 12.5
164
172
  },
165
- children: n("params.empty", "No parameters match.")
166
- }) : v ? /* @__PURE__ */ T("div", {
173
+ children: r("params.empty", "No parameters match.")
174
+ }) : v ? /* @__PURE__ */ w("div", {
167
175
  "data-testid": "tenant-params-cards",
168
176
  style: {
169
177
  display: "flex",
170
178
  flexDirection: "column",
171
179
  gap: 8
172
180
  },
173
- children: $.map(({ param: e, state: t, value: r, actions: i }) => /* @__PURE__ */ E("div", {
181
+ children: $.map(({ param: e, state: t, value: n, actions: i }) => /* @__PURE__ */ T("div", {
174
182
  "data-testid": `tenant-param-row-${e.code}`,
175
183
  style: {
176
184
  border: "1px solid var(--border)",
@@ -183,14 +191,14 @@ function N(t) {
183
191
  minWidth: 0
184
192
  },
185
193
  children: [
186
- /* @__PURE__ */ E("div", {
194
+ /* @__PURE__ */ T("div", {
187
195
  style: {
188
196
  display: "flex",
189
197
  alignItems: "center",
190
198
  gap: 8,
191
199
  minWidth: 0
192
200
  },
193
- children: [/* @__PURE__ */ T("div", {
201
+ children: [/* @__PURE__ */ w("div", {
194
202
  style: {
195
203
  flex: 1,
196
204
  minWidth: 0,
@@ -199,10 +207,10 @@ function N(t) {
199
207
  color: "var(--text)",
200
208
  overflowWrap: "anywhere"
201
209
  },
202
- children: n(e.name) || e.code
210
+ children: r(e.name) || e.code
203
211
  }), t]
204
212
  }),
205
- /* @__PURE__ */ T("div", {
213
+ /* @__PURE__ */ w("div", {
206
214
  className: "mono",
207
215
  style: {
208
216
  fontSize: 11.5,
@@ -211,29 +219,29 @@ function N(t) {
211
219
  },
212
220
  children: e.code
213
221
  }),
214
- /* @__PURE__ */ T("div", {
222
+ /* @__PURE__ */ w("div", {
215
223
  style: { minWidth: 0 },
216
- children: r
224
+ children: n
217
225
  }),
218
- /* @__PURE__ */ E("div", {
226
+ /* @__PURE__ */ T("div", {
219
227
  style: {
220
228
  display: "flex",
221
229
  alignItems: "center",
222
230
  gap: 6,
223
231
  flexWrap: "wrap"
224
232
  },
225
- children: [/* @__PURE__ */ T("span", {
233
+ children: [/* @__PURE__ */ w("span", {
226
234
  style: {
227
235
  flex: 1,
228
236
  fontSize: 11.5,
229
237
  color: "var(--text-3)"
230
238
  },
231
- children: [e.category, e.type].filter(Boolean).join(" · ")
239
+ children: [Q(e.category), e.type].filter(Boolean).join(" · ")
232
240
  }), i]
233
241
  })
234
242
  ]
235
243
  }, e.code))
236
- }) : /* @__PURE__ */ T("div", {
244
+ }) : /* @__PURE__ */ w("div", {
237
245
  "data-testid": "tenant-params-table",
238
246
  style: {
239
247
  border: "1px solid var(--border)",
@@ -241,77 +249,77 @@ function N(t) {
241
249
  background: "var(--surface)",
242
250
  overflow: "hidden"
243
251
  },
244
- children: /* @__PURE__ */ E("table", {
252
+ children: /* @__PURE__ */ T("table", {
245
253
  style: {
246
- ...m,
254
+ ...h,
247
255
  tableLayout: "fixed"
248
256
  },
249
257
  children: [
250
- /* @__PURE__ */ T("colgroup", { children: k.map((e, t) => /* @__PURE__ */ T("col", { style: { width: e } }, t)) }),
251
- /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [
252
- /* @__PURE__ */ T("th", {
253
- style: p,
254
- children: n("params.column.name", "Name")
258
+ /* @__PURE__ */ w("colgroup", { children: O.map((e, t) => /* @__PURE__ */ w("col", { style: { width: e } }, t)) }),
259
+ /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", { children: [
260
+ /* @__PURE__ */ w("th", {
261
+ style: m,
262
+ children: r("params.column.name", "Name")
255
263
  }),
256
- /* @__PURE__ */ T("th", {
257
- style: p,
258
- children: n("params.column.code", "Code")
264
+ /* @__PURE__ */ w("th", {
265
+ style: m,
266
+ children: r("params.column.code", "Code")
259
267
  }),
260
- /* @__PURE__ */ T("th", {
261
- style: p,
262
- children: n("params.column.category", "Category")
268
+ /* @__PURE__ */ w("th", {
269
+ style: m,
270
+ children: r("params.column.category", "Category")
263
271
  }),
264
- /* @__PURE__ */ T("th", {
265
- style: p,
266
- children: n("params.column.type", "Type")
272
+ /* @__PURE__ */ w("th", {
273
+ style: m,
274
+ children: r("params.column.type", "Type")
267
275
  }),
268
- /* @__PURE__ */ T("th", {
269
- style: p,
270
- children: n("params.value", "Value")
276
+ /* @__PURE__ */ w("th", {
277
+ style: m,
278
+ children: r("params.value", "Value")
271
279
  }),
272
- /* @__PURE__ */ T("th", {
273
- style: p,
274
- children: n("params.column.source", "Source")
280
+ /* @__PURE__ */ w("th", {
281
+ style: m,
282
+ children: r("params.column.source", "Source")
275
283
  }),
276
- /* @__PURE__ */ T("th", { style: p })
284
+ /* @__PURE__ */ w("th", { style: m })
277
285
  ] }) }),
278
- /* @__PURE__ */ T("tbody", { children: $.map(({ param: e, state: t, value: r, actions: i }) => /* @__PURE__ */ E("tr", {
286
+ /* @__PURE__ */ w("tbody", { children: $.map(({ param: e, state: t, value: n, actions: i }) => /* @__PURE__ */ T("tr", {
279
287
  "data-testid": `tenant-param-row-${e.code}`,
280
288
  children: [
281
- /* @__PURE__ */ T("td", {
282
- style: A,
283
- title: n(e.name) || e.code,
284
- children: n(e.name) || e.code
289
+ /* @__PURE__ */ w("td", {
290
+ style: k,
291
+ title: r(e.name) || e.code,
292
+ children: r(e.name) || e.code
285
293
  }),
286
- /* @__PURE__ */ T("td", {
287
- style: A,
294
+ /* @__PURE__ */ w("td", {
295
+ style: k,
288
296
  title: e.code,
289
- children: /* @__PURE__ */ T("span", {
297
+ children: /* @__PURE__ */ w("span", {
290
298
  className: "mono",
291
299
  style: { color: "var(--text-3)" },
292
300
  children: e.code
293
301
  })
294
302
  }),
295
- /* @__PURE__ */ T("td", {
296
- style: A,
303
+ /* @__PURE__ */ w("td", {
304
+ style: k,
297
305
  title: e.category,
298
- children: e.category ?? "—"
306
+ children: Q(e.category) || "—"
299
307
  }),
300
- /* @__PURE__ */ T("td", {
301
- style: A,
308
+ /* @__PURE__ */ w("td", {
309
+ style: k,
302
310
  title: e.type,
303
311
  children: e.type
304
312
  }),
305
- /* @__PURE__ */ T("td", {
306
- style: A,
307
- children: r
313
+ /* @__PURE__ */ w("td", {
314
+ style: k,
315
+ children: n
308
316
  }),
309
- /* @__PURE__ */ T("td", {
310
- style: A,
317
+ /* @__PURE__ */ w("td", {
318
+ style: k,
311
319
  children: t
312
320
  }),
313
- /* @__PURE__ */ T("td", {
314
- style: j,
321
+ /* @__PURE__ */ w("td", {
322
+ style: re,
315
323
  children: i
316
324
  })
317
325
  ]
@@ -319,58 +327,58 @@ function N(t) {
319
327
  ]
320
328
  })
321
329
  }),
322
- H && /* @__PURE__ */ T(g, {
323
- param: H,
324
- current: W.get(H.code)?.value ?? H.value,
325
- error: q,
330
+ B && /* @__PURE__ */ w(te, {
331
+ param: B,
332
+ current: H.get(B.code)?.value ?? B.value,
333
+ error: G,
326
334
  onCancel: () => {
327
- U(null), J();
335
+ V(null), K();
328
336
  },
329
- onSave: (e) => Z(H, e)
337
+ onSave: (e) => Y(B, e)
330
338
  })
331
339
  ]
332
340
  });
333
341
  }
334
- function P({ param: e, override: t }) {
335
- let n = i();
336
- return t !== void 0 && e.source !== "tenant" ? /* @__PURE__ */ T("span", {
342
+ function M({ param: e, override: t }) {
343
+ let n = a();
344
+ return t !== void 0 && e.source !== "tenant" ? /* @__PURE__ */ w("span", {
337
345
  "data-testid": `tenant-param-not-applied-${e.code}`,
338
346
  title: n("params.tenant.not_applied_hint", "This tenant is set to {value}, and it no longer satisfies the parameter's declaration. Source of the value in effect: {source}. Reset to remove it, or edit it to a value the declaration accepts.", {
339
347
  value: JSON.stringify(t.value),
340
- source: b(n, e.source)
348
+ source: y(n, e.source)
341
349
  }),
342
- children: /* @__PURE__ */ T(r, {
350
+ children: /* @__PURE__ */ w(i, {
343
351
  tone: "amber",
344
352
  size: "xs",
345
353
  dot: !0,
346
354
  children: n("params.not_applied", "not applied")
347
355
  })
348
- }) : /* @__PURE__ */ T(r, {
349
- tone: M(e.source),
356
+ }) : /* @__PURE__ */ w(i, {
357
+ tone: A(e.source),
350
358
  size: "xs",
351
- children: b(n, e.source)
359
+ children: y(n, e.source)
352
360
  });
353
361
  }
354
- function F({ param: e, stored: r, onEdit: a, onReset: o }) {
355
- let s = i();
356
- return x(e) ? /* @__PURE__ */ E("span", {
362
+ function N({ param: e, stored: t, onEdit: i, onReset: o }) {
363
+ let s = a();
364
+ return b(e) ? /* @__PURE__ */ T("span", {
357
365
  style: {
358
366
  display: "inline-flex",
359
367
  flexWrap: "wrap",
360
368
  justifyContent: "flex-end",
361
369
  gap: 6
362
370
  },
363
- children: [/* @__PURE__ */ T(n, {
371
+ children: [/* @__PURE__ */ w(r, {
364
372
  size: "xs",
365
- icon: /* @__PURE__ */ T(t.edit, { size: 12 }),
366
- onClick: a,
373
+ icon: /* @__PURE__ */ w(n.edit, { size: 12 }),
374
+ onClick: i,
367
375
  children: s("params.edit", "Edit")
368
- }), r && /* @__PURE__ */ T(v, {
376
+ }), t && /* @__PURE__ */ w(v, {
369
377
  param: e,
370
378
  description: s("params.reset_confirm.tenant_description", "The value this tenant set is removed, and the platform default applies again."),
371
379
  onReset: o
372
380
  })]
373
- }) : /* @__PURE__ */ E("span", {
381
+ }) : /* @__PURE__ */ T("span", {
374
382
  title: s("params.tenant.read_only_hint", "Not editable at tenant scope (its declared scopes do not admit tenant)."),
375
383
  style: {
376
384
  display: "inline-flex",
@@ -380,11 +388,11 @@ function F({ param: e, stored: r, onEdit: a, onReset: o }) {
380
388
  fontSize: 11
381
389
  },
382
390
  children: [
383
- /* @__PURE__ */ T(t.lock, { size: 12 }),
391
+ /* @__PURE__ */ w(n.lock, { size: 12 }),
384
392
  " ",
385
393
  s("params.read_only", "read-only")
386
394
  ]
387
395
  });
388
396
  }
389
397
  //#endregion
390
- export { N as TenantParamsPage };
398
+ export { j as TenantParamsPage };