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