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