@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.
- package/dist-lib/app.js +28 -28
- package/dist-lib/components/actions/ActionButton.js +86 -85
- package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
- package/dist-lib/components/actions/ActionRunner.js +47 -47
- package/dist-lib/components/actions/ObjectActionBar.js +9 -9
- package/dist-lib/components/actions/RowActionsKebab.js +19 -19
- package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
- package/dist-lib/components/chrome/AssociationTabs.js +21 -21
- package/dist-lib/components/chrome/RecordHeader.js +33 -40
- package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
- package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
- package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
- package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
- package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
- package/dist-lib/components/fields/FileReferenceField.js +9 -9
- package/dist-lib/components/fields/StructureField.js +57 -47
- package/dist-lib/components/fields/TimestampField.js +59 -54
- package/dist-lib/components/fields/cells/factories/money.js +14 -23
- package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
- package/dist-lib/components/fields/cells/factories/text.js +18 -3
- package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
- package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
- package/dist-lib/components/layout/Layout.js +306 -361
- package/dist-lib/components/layout/Rail.js +42 -41
- package/dist-lib/components/layout/Sidebar.js +132 -117
- package/dist-lib/components/layout/TabStrip.js +116 -115
- package/dist-lib/components/layout/TenantChip.js +47 -54
- package/dist-lib/components/layout/TopBar.js +108 -105
- package/dist-lib/components/list/InlineEditCell.js +23 -23
- package/dist-lib/components/list/QuickPeek.js +65 -66
- package/dist-lib/components/pages/DocumentsMenu.js +42 -42
- package/dist-lib/components/pages/ExportMenu.js +25 -25
- package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
- package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
- package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
- package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
- package/dist-lib/components/pages/auth/AuthShell.js +73 -73
- package/dist-lib/components/pages/auth/SignIn.js +32 -32
- package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
- package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
- package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
- package/dist-lib/components/pages/list/ListHeader.js +19 -19
- package/dist-lib/components/pages/list/ListNoRows.js +15 -15
- package/dist-lib/components/pages/list/ListToolbar.js +145 -145
- package/dist-lib/components/pages/list/useActiveView.js +14 -5
- package/dist-lib/components/pages/list/useListQuery.js +121 -81
- package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
- package/dist-lib/components/pages/list/useRowMenu.js +7 -7
- package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
- package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
- package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
- package/dist-lib/hooks/useAuth.js +11 -11
- package/dist-lib/hooks/useBranding.js +4 -4
- package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
- package/dist-lib/hooks/useImpersonation.js +6 -6
- package/dist-lib/hooks/useMutations.js +23 -23
- package/dist-lib/hooks/useObjectStatus.js +5 -5
- package/dist-lib/hooks/useParams.js +59 -51
- package/dist-lib/hooks/useProperties.js +8 -8
- package/dist-lib/hooks/useRowTenant.js +18 -6
- package/dist-lib/hooks/useText.js +9 -7
- package/dist-lib/hooks/useUiPreferences.js +71 -0
- package/dist-lib/index.d.ts +22 -6
- package/dist-lib/index.js +127 -126
- package/dist-lib/lib/actions.js +116 -84
- package/dist-lib/lib/child-config.js +10 -1
- package/dist-lib/lib/format-count.js +16 -1
- package/dist-lib/lib/language.js +23 -21
- package/dist-lib/lib/money-text.js +29 -0
- package/dist-lib/lib/profile.js +4 -0
- package/dist-lib/lib/role-label.js +8 -0
- package/dist-lib/lib/schema-routing.js +34 -14
- package/dist-lib/lib/shortcut.js +10 -0
- package/dist-lib/lib/timestamp.js +93 -31
- package/dist-lib/stores/auth.js +9 -8
- package/dist-lib/stores/preferences.js +56 -17
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +25 -28
- package/dist-lib/types/schema.js +33 -27
- package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
- package/package.json +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { useAuthStore as e } from "../../../stores/auth.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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
|
|
19
|
+
var E = "my_tenant", D = [
|
|
19
20
|
"yaml",
|
|
20
21
|
"env",
|
|
21
22
|
"tenant"
|
|
22
|
-
],
|
|
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
|
-
],
|
|
31
|
-
...
|
|
31
|
+
], k = {
|
|
32
|
+
...p,
|
|
32
33
|
overflow: "hidden",
|
|
33
34
|
textOverflow: "ellipsis",
|
|
34
35
|
whiteSpace: "nowrap"
|
|
35
|
-
},
|
|
36
|
-
...
|
|
36
|
+
}, re = {
|
|
37
|
+
...p,
|
|
37
38
|
whiteSpace: "nowrap",
|
|
38
39
|
textAlign: "right"
|
|
39
40
|
};
|
|
40
|
-
function
|
|
41
|
+
function A(e) {
|
|
41
42
|
return e === "tenant" ? "violet" : e === "env" ? "amber" : "slate";
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
let
|
|
45
|
-
carrierEntityCode:
|
|
46
|
-
rowId:
|
|
47
|
-
}),
|
|
48
|
-
await
|
|
49
|
-
},
|
|
50
|
-
let e =
|
|
51
|
-
return
|
|
52
|
-
}, [
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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__ */
|
|
75
|
+
state: /* @__PURE__ */ w(M, {
|
|
65
76
|
param: e,
|
|
66
77
|
override: t
|
|
67
78
|
}),
|
|
68
|
-
value: /* @__PURE__ */
|
|
79
|
+
value: /* @__PURE__ */ w(ne, {
|
|
69
80
|
type: e.type,
|
|
70
81
|
value: e.value,
|
|
71
82
|
values: e.values,
|
|
72
|
-
label:
|
|
83
|
+
label: se(e),
|
|
73
84
|
maxWidth: "100%"
|
|
74
85
|
}),
|
|
75
|
-
actions: /* @__PURE__ */
|
|
86
|
+
actions: /* @__PURE__ */ w(N, {
|
|
76
87
|
param: e,
|
|
77
88
|
stored: t !== void 0,
|
|
78
89
|
onEdit: () => {
|
|
79
|
-
|
|
90
|
+
K(), V(e);
|
|
80
91
|
},
|
|
81
|
-
onReset: (e) => void
|
|
92
|
+
onReset: (e) => void J(e)
|
|
82
93
|
})
|
|
83
94
|
};
|
|
84
95
|
});
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
header: /* @__PURE__ */
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
/* @__PURE__ */
|
|
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__ */
|
|
110
|
+
/* @__PURE__ */ w("div", {
|
|
100
111
|
style: {
|
|
101
112
|
minWidth: 200,
|
|
102
113
|
flex: 1
|
|
103
114
|
},
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
value:
|
|
106
|
-
onChange:
|
|
107
|
-
placeholder:
|
|
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__ */
|
|
121
|
+
/* @__PURE__ */ w("div", {
|
|
111
122
|
style: { minWidth: 160 },
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
value:
|
|
123
|
+
children: /* @__PURE__ */ w(l, {
|
|
124
|
+
value: P,
|
|
114
125
|
options: [{
|
|
115
126
|
value: "",
|
|
116
|
-
label:
|
|
117
|
-
}, ...
|
|
118
|
-
|
|
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__ */
|
|
132
|
+
/* @__PURE__ */ w("div", {
|
|
125
133
|
style: { minWidth: 140 },
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
value:
|
|
134
|
+
children: /* @__PURE__ */ w(l, {
|
|
135
|
+
value: I,
|
|
128
136
|
options: [{
|
|
129
137
|
value: "",
|
|
130
|
-
label:
|
|
131
|
-
}, ...
|
|
138
|
+
label: r("params.filter.all_sources", "All sources")
|
|
139
|
+
}, ...D.map((e) => ({
|
|
132
140
|
value: e,
|
|
133
|
-
label:
|
|
141
|
+
label: y(r, e)
|
|
134
142
|
}))],
|
|
135
|
-
onChange:
|
|
143
|
+
onChange: L
|
|
136
144
|
})
|
|
137
145
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
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__ */
|
|
146
|
-
value:
|
|
147
|
-
onChange:
|
|
148
|
-
}),
|
|
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
|
-
|
|
160
|
+
oe ? /* @__PURE__ */ w("div", {
|
|
153
161
|
style: {
|
|
154
162
|
padding: "24px 0",
|
|
155
163
|
textAlign: "center"
|
|
156
164
|
},
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
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:
|
|
166
|
-
}) : v ? /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
210
|
+
children: r(e.name) || e.code
|
|
203
211
|
}), t]
|
|
204
212
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
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__ */
|
|
222
|
+
/* @__PURE__ */ w("div", {
|
|
215
223
|
style: { minWidth: 0 },
|
|
216
|
-
children:
|
|
224
|
+
children: n
|
|
217
225
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
252
|
+
children: /* @__PURE__ */ T("table", {
|
|
245
253
|
style: {
|
|
246
|
-
...
|
|
254
|
+
...h,
|
|
247
255
|
tableLayout: "fixed"
|
|
248
256
|
},
|
|
249
257
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
style:
|
|
254
|
-
children:
|
|
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__ */
|
|
257
|
-
style:
|
|
258
|
-
children:
|
|
264
|
+
/* @__PURE__ */ w("th", {
|
|
265
|
+
style: m,
|
|
266
|
+
children: r("params.column.code", "Code")
|
|
259
267
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
style:
|
|
262
|
-
children:
|
|
268
|
+
/* @__PURE__ */ w("th", {
|
|
269
|
+
style: m,
|
|
270
|
+
children: r("params.column.category", "Category")
|
|
263
271
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
style:
|
|
266
|
-
children:
|
|
272
|
+
/* @__PURE__ */ w("th", {
|
|
273
|
+
style: m,
|
|
274
|
+
children: r("params.column.type", "Type")
|
|
267
275
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
style:
|
|
270
|
-
children:
|
|
276
|
+
/* @__PURE__ */ w("th", {
|
|
277
|
+
style: m,
|
|
278
|
+
children: r("params.value", "Value")
|
|
271
279
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
style:
|
|
274
|
-
children:
|
|
280
|
+
/* @__PURE__ */ w("th", {
|
|
281
|
+
style: m,
|
|
282
|
+
children: r("params.column.source", "Source")
|
|
275
283
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ w("th", { style: m })
|
|
277
285
|
] }) }),
|
|
278
|
-
/* @__PURE__ */
|
|
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__ */
|
|
282
|
-
style:
|
|
283
|
-
title:
|
|
284
|
-
children:
|
|
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__ */
|
|
287
|
-
style:
|
|
294
|
+
/* @__PURE__ */ w("td", {
|
|
295
|
+
style: k,
|
|
288
296
|
title: e.code,
|
|
289
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
296
|
-
style:
|
|
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__ */
|
|
301
|
-
style:
|
|
308
|
+
/* @__PURE__ */ w("td", {
|
|
309
|
+
style: k,
|
|
302
310
|
title: e.type,
|
|
303
311
|
children: e.type
|
|
304
312
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
style:
|
|
307
|
-
children:
|
|
313
|
+
/* @__PURE__ */ w("td", {
|
|
314
|
+
style: k,
|
|
315
|
+
children: n
|
|
308
316
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
style:
|
|
317
|
+
/* @__PURE__ */ w("td", {
|
|
318
|
+
style: k,
|
|
311
319
|
children: t
|
|
312
320
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
style:
|
|
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
|
-
|
|
323
|
-
param:
|
|
324
|
-
current:
|
|
325
|
-
error:
|
|
330
|
+
B && /* @__PURE__ */ w(te, {
|
|
331
|
+
param: B,
|
|
332
|
+
current: H.get(B.code)?.value ?? B.value,
|
|
333
|
+
error: G,
|
|
326
334
|
onCancel: () => {
|
|
327
|
-
|
|
335
|
+
V(null), K();
|
|
328
336
|
},
|
|
329
|
-
onSave: (e) =>
|
|
337
|
+
onSave: (e) => Y(B, e)
|
|
330
338
|
})
|
|
331
339
|
]
|
|
332
340
|
});
|
|
333
341
|
}
|
|
334
|
-
function
|
|
335
|
-
let n =
|
|
336
|
-
return t !== void 0 && e.source !== "tenant" ? /* @__PURE__ */
|
|
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:
|
|
348
|
+
source: y(n, e.source)
|
|
341
349
|
}),
|
|
342
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
349
|
-
tone:
|
|
356
|
+
}) : /* @__PURE__ */ w(i, {
|
|
357
|
+
tone: A(e.source),
|
|
350
358
|
size: "xs",
|
|
351
|
-
children:
|
|
359
|
+
children: y(n, e.source)
|
|
352
360
|
});
|
|
353
361
|
}
|
|
354
|
-
function
|
|
355
|
-
let s =
|
|
356
|
-
return
|
|
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__ */
|
|
371
|
+
children: [/* @__PURE__ */ w(r, {
|
|
364
372
|
size: "xs",
|
|
365
|
-
icon: /* @__PURE__ */
|
|
366
|
-
onClick:
|
|
373
|
+
icon: /* @__PURE__ */ w(n.edit, { size: 12 }),
|
|
374
|
+
onClick: i,
|
|
367
375
|
children: s("params.edit", "Edit")
|
|
368
|
-
}),
|
|
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__ */
|
|
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__ */
|
|
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 {
|
|
398
|
+
export { j as TenantParamsPage };
|