@knkcs/importhub-ui 0.7.0 → 0.9.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/CHANGELOG.md +14 -0
- package/README.md +3 -3
- package/dist/field-tree-CghMgGKm.js +108 -0
- package/dist/field-tree-CghMgGKm.js.map +1 -0
- package/dist/{importhub-client-BS6F4DW2.js → importhub-client-Wrb4s3lw.js} +16 -10
- package/dist/importhub-client-Wrb4s3lw.js.map +1 -0
- package/dist/index.d.ts +161 -0
- package/dist/index.js +994 -966
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +66 -0
- package/dist/mapping-editor.js +806 -662
- package/dist/mapping-editor.js.map +1 -1
- package/dist/{mapping-page-Lu48SY_L.js → mapping-page-BTEJR0-z.js} +136 -134
- package/dist/{mapping-page-Lu48SY_L.js.map → mapping-page-BTEJR0-z.js.map} +1 -1
- package/dist/testing.d.ts +72 -0
- package/dist/testing.js +572 -418
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/importhub-client-BS6F4DW2.js.map +0 -1
package/dist/mapping-editor.js
CHANGED
|
@@ -1,1149 +1,1293 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { I
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Card as
|
|
7
|
-
import { Stack as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useEffect as ye, useId as He, useMemo as U } from "react";
|
|
3
|
+
import { useTranslation as E } from "react-i18next";
|
|
4
|
+
import { I, l as O, m as te, u as $e, i as Te, n as we, F as W, M as ze } from "./mapping-page-BTEJR0-z.js";
|
|
5
|
+
import { Button as w, StatusBadge as Se, BaseSelect as ke, IconButton as X } from "@knkcs/anker/atoms";
|
|
6
|
+
import { Card as v, NavList as Q, UploadDropZone as Ae, CodeCell as Me, TruncatedTextCell as se, DataTable as Re } from "@knkcs/anker/components";
|
|
7
|
+
import { Stack as b, Text as h, Textarea as ve, Alert as $, Box as x, List as de, HStack as R, Heading as Oe, Code as Le, Checkbox as De, Center as _e, Grid as le, Separator as ce, RadioGroup as Ve, Radio as je } from "@knkcs/anker/primitives";
|
|
8
8
|
import { SubNavLayout as Z } from "@knkcs/anker/templates";
|
|
9
|
-
import { Plus as
|
|
10
|
-
import { useFormContext as
|
|
11
|
-
import { FormField as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
import { Plus as D, Trash2 as _, FileCode as Be, Play as Ke } from "lucide-react";
|
|
10
|
+
import { useFormContext as k, useWatch as B, useFieldArray as q } from "react-hook-form";
|
|
11
|
+
import { FormField as xe, InputField as f, BaseSelectField as V, SwitchField as H, CheckboxField as We } from "@knkcs/anker/forms";
|
|
12
|
+
import { X as Ge, l as re, f as pe, a as ee, b as Ue, r as Xe, p as qe } from "./field-tree-CghMgGKm.js";
|
|
13
|
+
import { useHostIdentity as Ce } from "@knkcs/anker/host";
|
|
14
|
+
import { useQuery as Fe, useMutation as Je } from "@tanstack/react-query";
|
|
15
|
+
const me = (i) => JSON.stringify(i ?? {}, null, 2);
|
|
16
|
+
function Ye({ name: i, disabled: t }) {
|
|
17
|
+
const { t: l } = E(I), { control: n, setValue: r } = k(), o = B({ control: n, name: i }), [s, m] = N(() => me(o)), [d, g] = N(!1), [u, c] = N(null);
|
|
18
|
+
ye(() => {
|
|
19
|
+
d || m(me(o));
|
|
20
|
+
}, [o, d]);
|
|
21
|
+
const p = () => {
|
|
22
|
+
let C;
|
|
22
23
|
try {
|
|
23
|
-
|
|
24
|
+
C = JSON.parse(s);
|
|
24
25
|
} catch {
|
|
25
|
-
|
|
26
|
+
c(l("editor.json.notJson"));
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
if (!
|
|
29
|
-
|
|
29
|
+
if (!C || typeof C != "object" || Array.isArray(C)) {
|
|
30
|
+
c(l("editor.json.notObject"));
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
c(null), g(!1), r(i, C, { shouldDirty: !0 });
|
|
33
34
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
35
|
+
return /* @__PURE__ */ e(v, { title: l("editor.json.title"), children: /* @__PURE__ */ a(b, { gap: "3", children: [
|
|
36
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.json.help") }),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
ve,
|
|
38
39
|
{
|
|
39
40
|
"aria-label": l("editor.json.label"),
|
|
40
|
-
value:
|
|
41
|
-
rows: Math.min(24, Math.max(6,
|
|
41
|
+
value: s,
|
|
42
|
+
rows: Math.min(24, Math.max(6, s.split(`
|
|
42
43
|
`).length)),
|
|
43
44
|
fontFamily: "mono",
|
|
44
45
|
spellCheck: !1,
|
|
45
|
-
disabled:
|
|
46
|
-
onChange: (
|
|
47
|
-
|
|
46
|
+
disabled: t,
|
|
47
|
+
onChange: (C) => {
|
|
48
|
+
m(C.target.value), g(!0);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
d && !
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
d && !u ? /* @__PURE__ */ e(h, { color: "fg.warning", fontSize: "sm", children: l("editor.json.unapplied") }) : null,
|
|
53
|
+
u ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", children: u }) : null,
|
|
54
|
+
t ? null : /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(w, { variant: "outline", size: "sm", disabled: !d, onClick: p, children: l("editor.json.apply") }) })
|
|
54
55
|
] }) });
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const n = `${e}${String(r.name ?? "")}`, a = `${l}.${i}`;
|
|
60
|
-
return [
|
|
61
|
-
{ path: n, name: a },
|
|
62
|
-
...Re.flatMap((c) => Y(r[c], `${n}.`, `${a}.${c}`))
|
|
63
|
-
];
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function ke(o, e) {
|
|
67
|
-
return Y(o).find((l) => l.path === e)?.name ?? null;
|
|
68
|
-
}
|
|
69
|
-
function W(o, e) {
|
|
70
|
-
for (const l of o) {
|
|
71
|
-
if (l.path === e) return [l];
|
|
72
|
-
if (e.startsWith(`${l.path}.`)) {
|
|
73
|
-
const r = W(l.children, e);
|
|
74
|
-
if (r) return [l, ...r];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
function G(o, e = "") {
|
|
80
|
-
return { accessor: o.split(".").pop() ?? o, path: o, fieldType: e, label: "", children: [] };
|
|
81
|
-
}
|
|
82
|
-
const ze = (o) => o.fieldType.includes("table") ? "virtualTableFields" : "fields";
|
|
83
|
-
function Ae(o, e, l) {
|
|
84
|
-
const r = structuredClone(L(o)), i = ke(r, l);
|
|
85
|
-
if (i) return { fields: r, name: i };
|
|
86
|
-
const n = W(e, l) ?? [{ ...G(l, "text"), accessor: l }];
|
|
87
|
-
let a = r, c = "fields", d = "";
|
|
88
|
-
return n.forEach((f, b) => {
|
|
89
|
-
const u = f.path.slice(d.length);
|
|
90
|
-
let m = a.findIndex((E) => String(E.name ?? "") === u);
|
|
91
|
-
const v = b === n.length - 1;
|
|
92
|
-
if (m < 0 && (a.push({
|
|
93
|
-
name: u,
|
|
94
|
-
selector: v ? "" : ".",
|
|
95
|
-
type: Ve(f.fieldType)
|
|
96
|
-
}), m = a.length - 1), c = `${c}.${m}`, !v) {
|
|
97
|
-
const E = ze(f), k = a[m];
|
|
98
|
-
k[E] = L(k[E]), a = k[E], c = `${c}.${E}`, d = `${f.path}.`;
|
|
99
|
-
}
|
|
100
|
-
}), { fields: r, name: c };
|
|
101
|
-
}
|
|
102
|
-
function Le(o, e) {
|
|
103
|
-
const l = structuredClone(L(o)), r = e.split(".").slice(1);
|
|
104
|
-
let i = l;
|
|
105
|
-
for (let n = 0; n < r.length - 1; n += 2) {
|
|
106
|
-
const a = i[Number(r[n])];
|
|
107
|
-
if (!a) return l;
|
|
108
|
-
i = L(a[r[n + 1]]);
|
|
109
|
-
}
|
|
110
|
-
return i.splice(Number(r[r.length - 1]), 1), l;
|
|
111
|
-
}
|
|
112
|
-
const Oe = [
|
|
113
|
-
"text",
|
|
114
|
-
"array",
|
|
115
|
-
"date",
|
|
116
|
-
"number",
|
|
117
|
-
"richtext",
|
|
118
|
-
"reference",
|
|
119
|
-
"toc_reference",
|
|
120
|
-
"concat",
|
|
121
|
-
"virtualtable",
|
|
122
|
-
"select",
|
|
123
|
-
"boolean",
|
|
124
|
-
"fieldset",
|
|
125
|
-
"title_scope",
|
|
126
|
-
"title_data",
|
|
127
|
-
"outline_tree",
|
|
128
|
-
"processing_instructions"
|
|
129
|
-
], De = {
|
|
130
|
-
date: "date",
|
|
131
|
-
number: "number",
|
|
132
|
-
boolean: "boolean",
|
|
133
|
-
select: "select",
|
|
134
|
-
radio: "select",
|
|
135
|
-
checkboxes: "array",
|
|
136
|
-
list: "array",
|
|
137
|
-
array: "array",
|
|
138
|
-
rich_text: "richtext",
|
|
139
|
-
reference: "reference",
|
|
140
|
-
single_reference: "reference",
|
|
141
|
-
fieldset: "fieldset",
|
|
142
|
-
group: "fieldset",
|
|
143
|
-
card: "fieldset",
|
|
144
|
-
section: "fieldset",
|
|
145
|
-
virtual_table: "virtualtable"
|
|
146
|
-
};
|
|
147
|
-
function Ve(o) {
|
|
148
|
-
return De[o] ?? "text";
|
|
149
|
-
}
|
|
150
|
-
function O({ name: o, within: e = !1 }) {
|
|
151
|
-
const { t: l } = $(F), { reasons: r } = D(), i = r.filter(
|
|
152
|
-
(n) => e ? ge(n.path, o) : te(n.path) === o
|
|
57
|
+
function j({ name: i, within: t = !1 }) {
|
|
58
|
+
const { t: l } = E(I), { reasons: n } = O(), r = n.filter(
|
|
59
|
+
(o) => t ? Ee(o.path, i) : te(o.path) === i
|
|
153
60
|
);
|
|
154
|
-
return
|
|
61
|
+
return r.length === 0 ? null : /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", title: l("editor.reasonsHere"), children: /* @__PURE__ */ e(de.Root, { ps: "4", children: r.map((o, s) => (
|
|
155
62
|
// Two reasons may read alike; their order is importhub's.
|
|
156
63
|
// biome-ignore lint/suspicious/noArrayIndexKey: a static list
|
|
157
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ e(de.Item, { children: o.message }, s)
|
|
158
65
|
)) }) });
|
|
159
66
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
67
|
+
function Qe(i, t) {
|
|
68
|
+
return i.some((l) => Ee(l.path, t));
|
|
162
69
|
}
|
|
163
|
-
function
|
|
164
|
-
const l = te(
|
|
165
|
-
return l ===
|
|
70
|
+
function Ee(i, t) {
|
|
71
|
+
const l = te(i);
|
|
72
|
+
return l === t || l.startsWith(`${t}.`);
|
|
166
73
|
}
|
|
167
|
-
function
|
|
168
|
-
const { reasons:
|
|
169
|
-
|
|
74
|
+
function Ie({ name: i }) {
|
|
75
|
+
const { reasons: t } = O(), l = new Set(
|
|
76
|
+
t.map((n) => te(n.path)).filter((n) => n.startsWith(`${i}.`) && /^\d+$/.test(n.slice(i.length + 1)))
|
|
170
77
|
);
|
|
171
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ e(z, { children: [...l].map((n) => /* @__PURE__ */ e(j, { name: n }, n)) });
|
|
172
79
|
}
|
|
173
|
-
const
|
|
174
|
-
function
|
|
175
|
-
return Array.isArray(
|
|
176
|
-
`) :
|
|
80
|
+
const Ze = " = ";
|
|
81
|
+
function G(i) {
|
|
82
|
+
return Array.isArray(i) ? i.join(`
|
|
83
|
+
`) : i && typeof i == "object" ? Object.entries(i).map(([t, l]) => `${t}${Ze}${l}`).join(`
|
|
177
84
|
`) : "";
|
|
178
85
|
}
|
|
179
|
-
function
|
|
180
|
-
const l =
|
|
181
|
-
`).map((
|
|
182
|
-
return
|
|
183
|
-
l.map((
|
|
184
|
-
const
|
|
185
|
-
return
|
|
86
|
+
function ue(i, t) {
|
|
87
|
+
const l = i.split(`
|
|
88
|
+
`).map((n) => n.trim()).filter((n) => n !== "");
|
|
89
|
+
return t === "list" ? l : Object.fromEntries(
|
|
90
|
+
l.map((n) => {
|
|
91
|
+
const r = n.indexOf("=");
|
|
92
|
+
return r < 0 ? [n, ""] : [n.slice(0, r).trim(), n.slice(r + 1).trim()];
|
|
186
93
|
})
|
|
187
94
|
);
|
|
188
95
|
}
|
|
189
|
-
function
|
|
190
|
-
name:
|
|
191
|
-
label:
|
|
96
|
+
function F({
|
|
97
|
+
name: i,
|
|
98
|
+
label: t,
|
|
192
99
|
helperText: l,
|
|
193
|
-
kind:
|
|
194
|
-
disabled:
|
|
100
|
+
kind: n = "list",
|
|
101
|
+
disabled: r
|
|
195
102
|
}) {
|
|
196
|
-
return /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
|
|
103
|
+
return /* @__PURE__ */ a(b, { gap: "2", children: [
|
|
104
|
+
/* @__PURE__ */ e(
|
|
105
|
+
xe,
|
|
199
106
|
{
|
|
200
|
-
name:
|
|
201
|
-
label:
|
|
107
|
+
name: i,
|
|
108
|
+
label: t,
|
|
202
109
|
helperText: l,
|
|
203
|
-
disabled:
|
|
204
|
-
children: (
|
|
205
|
-
|
|
110
|
+
disabled: r,
|
|
111
|
+
children: (o) => /* @__PURE__ */ e(
|
|
112
|
+
et,
|
|
206
113
|
{
|
|
207
|
-
value:
|
|
208
|
-
onChange:
|
|
209
|
-
onBlur:
|
|
210
|
-
kind:
|
|
211
|
-
id:
|
|
212
|
-
name:
|
|
213
|
-
describedBy:
|
|
214
|
-
disabled:
|
|
114
|
+
value: o.value,
|
|
115
|
+
onChange: o.onChange,
|
|
116
|
+
onBlur: o.onBlur,
|
|
117
|
+
kind: n,
|
|
118
|
+
id: o.name,
|
|
119
|
+
name: o.name,
|
|
120
|
+
describedBy: o["aria-describedby"],
|
|
121
|
+
disabled: r
|
|
215
122
|
}
|
|
216
123
|
)
|
|
217
124
|
}
|
|
218
125
|
),
|
|
219
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ e(Ie, { name: i })
|
|
220
127
|
] });
|
|
221
128
|
}
|
|
222
|
-
function
|
|
223
|
-
value:
|
|
224
|
-
onChange:
|
|
129
|
+
function et({
|
|
130
|
+
value: i,
|
|
131
|
+
onChange: t,
|
|
225
132
|
onBlur: l,
|
|
226
|
-
kind:
|
|
227
|
-
id:
|
|
228
|
-
name:
|
|
229
|
-
describedBy:
|
|
230
|
-
disabled:
|
|
133
|
+
kind: n,
|
|
134
|
+
id: r,
|
|
135
|
+
name: o,
|
|
136
|
+
describedBy: s,
|
|
137
|
+
disabled: m
|
|
231
138
|
}) {
|
|
232
|
-
const [d,
|
|
233
|
-
return
|
|
234
|
-
|
|
235
|
-
(
|
|
139
|
+
const [d, g] = N(() => G(i));
|
|
140
|
+
return ye(() => {
|
|
141
|
+
g(
|
|
142
|
+
(u) => G(ue(u, n)) === G(i) ? u : G(i)
|
|
236
143
|
);
|
|
237
|
-
}, [
|
|
238
|
-
|
|
144
|
+
}, [i, n]), /* @__PURE__ */ e(
|
|
145
|
+
ve,
|
|
239
146
|
{
|
|
240
|
-
id:
|
|
241
|
-
name:
|
|
242
|
-
"aria-describedby":
|
|
147
|
+
id: r,
|
|
148
|
+
name: o,
|
|
149
|
+
"aria-describedby": s,
|
|
243
150
|
value: d,
|
|
244
151
|
rows: Math.max(2, d.split(`
|
|
245
152
|
`).length),
|
|
246
153
|
fontFamily: "mono",
|
|
247
|
-
disabled:
|
|
154
|
+
disabled: m,
|
|
248
155
|
onBlur: l,
|
|
249
|
-
onChange: (
|
|
250
|
-
|
|
156
|
+
onChange: (u) => {
|
|
157
|
+
g(u.target.value), t(ue(u.target.value, n));
|
|
251
158
|
}
|
|
252
159
|
}
|
|
253
160
|
);
|
|
254
161
|
}
|
|
255
|
-
const
|
|
256
|
-
function
|
|
257
|
-
const { t: l } =
|
|
258
|
-
return /* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
162
|
+
const tt = ["de", "en", "ch"];
|
|
163
|
+
function lt({ name: i, disabled: t }) {
|
|
164
|
+
const { t: l } = E(I), { control: n } = k(), r = String(B({ control: n, name: `${i}.type` }) ?? ""), o = (s) => `${i}.${s}`;
|
|
165
|
+
return /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
f,
|
|
261
168
|
{
|
|
262
|
-
name:
|
|
169
|
+
name: o("selector"),
|
|
263
170
|
label: l("editor.field.selector"),
|
|
264
171
|
helperText: l("editor.field.selectorHelp"),
|
|
265
|
-
disabled:
|
|
172
|
+
disabled: t
|
|
266
173
|
}
|
|
267
174
|
),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
|
|
175
|
+
/* @__PURE__ */ e(
|
|
176
|
+
V,
|
|
270
177
|
{
|
|
271
|
-
name:
|
|
178
|
+
name: o("type"),
|
|
272
179
|
label: l("editor.field.type"),
|
|
273
180
|
isClearable: !1,
|
|
274
|
-
disabled:
|
|
275
|
-
options:
|
|
181
|
+
disabled: t,
|
|
182
|
+
options: Ge.map((s) => ({ id: s, label: s }))
|
|
276
183
|
}
|
|
277
184
|
),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
|
|
185
|
+
/* @__PURE__ */ e(
|
|
186
|
+
H,
|
|
280
187
|
{
|
|
281
|
-
name:
|
|
188
|
+
name: o("optional"),
|
|
282
189
|
label: l("editor.field.optional"),
|
|
283
190
|
helperText: l("editor.field.optionalHelp"),
|
|
284
|
-
disabled:
|
|
191
|
+
disabled: t
|
|
285
192
|
}
|
|
286
193
|
),
|
|
287
|
-
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
|
|
194
|
+
r === "date" ? /* @__PURE__ */ a(z, { children: [
|
|
195
|
+
/* @__PURE__ */ e(
|
|
196
|
+
f,
|
|
290
197
|
{
|
|
291
|
-
name:
|
|
198
|
+
name: o("dateFormat"),
|
|
292
199
|
label: l("editor.field.dateFormat"),
|
|
293
200
|
helperText: l("editor.field.dateFormatHelp"),
|
|
294
|
-
disabled:
|
|
201
|
+
disabled: t
|
|
295
202
|
}
|
|
296
203
|
),
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
|
|
204
|
+
/* @__PURE__ */ e(
|
|
205
|
+
F,
|
|
299
206
|
{
|
|
300
|
-
name:
|
|
207
|
+
name: o("dateFormats"),
|
|
301
208
|
label: l("editor.field.dateFormats"),
|
|
302
209
|
helperText: l("editor.field.dateFormatsHelp"),
|
|
303
|
-
disabled:
|
|
210
|
+
disabled: t
|
|
304
211
|
}
|
|
305
212
|
),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
213
|
+
/* @__PURE__ */ e(
|
|
214
|
+
H,
|
|
308
215
|
{
|
|
309
|
-
name:
|
|
216
|
+
name: o("autoDetectDateFormat"),
|
|
310
217
|
label: l("editor.field.autoDetectDateFormat"),
|
|
311
|
-
disabled:
|
|
218
|
+
disabled: t
|
|
312
219
|
}
|
|
313
220
|
)
|
|
314
221
|
] }) : null,
|
|
315
|
-
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
|
|
222
|
+
r === "number" ? /* @__PURE__ */ a(z, { children: [
|
|
223
|
+
/* @__PURE__ */ e(
|
|
224
|
+
V,
|
|
318
225
|
{
|
|
319
|
-
name:
|
|
226
|
+
name: o("numberLocale"),
|
|
320
227
|
label: l("editor.field.numberLocale"),
|
|
321
|
-
disabled:
|
|
322
|
-
options:
|
|
228
|
+
disabled: t,
|
|
229
|
+
options: tt.map((s) => ({ id: s, label: l(`editor.field.locale.${s}`) }))
|
|
323
230
|
}
|
|
324
231
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
|
|
232
|
+
/* @__PURE__ */ e(
|
|
233
|
+
H,
|
|
327
234
|
{
|
|
328
|
-
name:
|
|
235
|
+
name: o("stripCurrency"),
|
|
329
236
|
label: l("editor.field.stripCurrency"),
|
|
330
|
-
disabled:
|
|
237
|
+
disabled: t
|
|
331
238
|
}
|
|
332
239
|
)
|
|
333
240
|
] }) : null,
|
|
334
|
-
|
|
335
|
-
|
|
241
|
+
r === "date" || r === "number" ? /* @__PURE__ */ e(
|
|
242
|
+
H,
|
|
336
243
|
{
|
|
337
|
-
name:
|
|
244
|
+
name: o("skipInvalid"),
|
|
338
245
|
label: l("editor.field.skipInvalid"),
|
|
339
246
|
helperText: l("editor.field.skipInvalidHelp"),
|
|
340
|
-
disabled:
|
|
247
|
+
disabled: t
|
|
341
248
|
}
|
|
342
249
|
) : null,
|
|
343
|
-
|
|
344
|
-
|
|
250
|
+
r === "select" ? /* @__PURE__ */ e(
|
|
251
|
+
F,
|
|
345
252
|
{
|
|
346
|
-
name:
|
|
253
|
+
name: o("selectOptions"),
|
|
347
254
|
kind: "map",
|
|
348
255
|
label: l("editor.field.selectOptions"),
|
|
349
256
|
helperText: l("editor.field.selectOptionsHelp"),
|
|
350
|
-
disabled:
|
|
257
|
+
disabled: t
|
|
351
258
|
}
|
|
352
259
|
) : null,
|
|
353
|
-
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
|
|
260
|
+
r === "richtext" ? /* @__PURE__ */ a(z, { children: [
|
|
261
|
+
/* @__PURE__ */ e(
|
|
262
|
+
f,
|
|
356
263
|
{
|
|
357
|
-
name:
|
|
264
|
+
name: o("richTextConfig.textWrapperElement"),
|
|
358
265
|
label: l("editor.field.textWrapperElement"),
|
|
359
|
-
disabled:
|
|
266
|
+
disabled: t
|
|
360
267
|
}
|
|
361
268
|
),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
|
|
269
|
+
/* @__PURE__ */ e(
|
|
270
|
+
F,
|
|
364
271
|
{
|
|
365
|
-
name:
|
|
272
|
+
name: o("richTextConfig.ignoreElements"),
|
|
366
273
|
label: l("editor.field.ignoreElements"),
|
|
367
274
|
helperText: l("editor.field.elementsHelp"),
|
|
368
|
-
disabled:
|
|
275
|
+
disabled: t
|
|
369
276
|
}
|
|
370
277
|
),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
|
|
278
|
+
/* @__PURE__ */ e(
|
|
279
|
+
F,
|
|
373
280
|
{
|
|
374
|
-
name:
|
|
281
|
+
name: o("richTextConfig.passThroughElements"),
|
|
375
282
|
label: l("editor.field.passThroughElements"),
|
|
376
283
|
helperText: l("editor.field.elementsHelp"),
|
|
377
|
-
disabled:
|
|
284
|
+
disabled: t
|
|
378
285
|
}
|
|
379
286
|
),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
|
|
287
|
+
/* @__PURE__ */ e(
|
|
288
|
+
H,
|
|
382
289
|
{
|
|
383
|
-
name:
|
|
290
|
+
name: o("richTextConfig.normalizeWhitespace"),
|
|
384
291
|
label: l("editor.field.normalizeWhitespace"),
|
|
385
|
-
disabled:
|
|
292
|
+
disabled: t
|
|
386
293
|
}
|
|
387
294
|
),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
295
|
+
/* @__PURE__ */ e(
|
|
296
|
+
H,
|
|
390
297
|
{
|
|
391
|
-
name:
|
|
298
|
+
name: o("richTextConfig.convertNewlinesToBreaks"),
|
|
392
299
|
label: l("editor.field.convertNewlinesToBreaks"),
|
|
393
|
-
disabled:
|
|
300
|
+
disabled: t
|
|
394
301
|
}
|
|
395
302
|
),
|
|
396
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.field.richTextMore") })
|
|
397
304
|
] }) : null,
|
|
398
|
-
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
|
|
305
|
+
r === "reference" || r === "toc_reference" ? /* @__PURE__ */ a(z, { children: [
|
|
306
|
+
/* @__PURE__ */ e(
|
|
307
|
+
f,
|
|
401
308
|
{
|
|
402
|
-
name:
|
|
309
|
+
name: o("refBlueprintId"),
|
|
403
310
|
label: l("editor.field.refBlueprintId"),
|
|
404
|
-
disabled:
|
|
311
|
+
disabled: t
|
|
405
312
|
}
|
|
406
313
|
),
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
314
|
+
/* @__PURE__ */ e(
|
|
315
|
+
f,
|
|
409
316
|
{
|
|
410
|
-
name:
|
|
317
|
+
name: o("refIdTemplate"),
|
|
411
318
|
label: l("editor.field.refIdTemplate"),
|
|
412
319
|
helperText: l("editor.field.refIdTemplateHelp"),
|
|
413
|
-
disabled:
|
|
320
|
+
disabled: t
|
|
414
321
|
}
|
|
415
322
|
),
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
|
|
323
|
+
/* @__PURE__ */ e(
|
|
324
|
+
f,
|
|
418
325
|
{
|
|
419
|
-
name:
|
|
326
|
+
name: o("refIdExtractPattern"),
|
|
420
327
|
label: l("editor.field.refIdExtractPattern"),
|
|
421
|
-
disabled:
|
|
328
|
+
disabled: t
|
|
422
329
|
}
|
|
423
330
|
),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
|
|
331
|
+
/* @__PURE__ */ e(
|
|
332
|
+
f,
|
|
426
333
|
{
|
|
427
|
-
name:
|
|
334
|
+
name: o("refIdExtractSeparator"),
|
|
428
335
|
label: l("editor.field.refIdExtractSeparator"),
|
|
429
336
|
helperText: l("editor.field.refIdExtractSeparatorHelp"),
|
|
430
|
-
disabled:
|
|
337
|
+
disabled: t
|
|
431
338
|
}
|
|
432
339
|
),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
|
|
340
|
+
/* @__PURE__ */ e(
|
|
341
|
+
F,
|
|
435
342
|
{
|
|
436
|
-
name:
|
|
343
|
+
name: o("elementBlueprintMap"),
|
|
437
344
|
kind: "map",
|
|
438
345
|
label: l("editor.field.elementBlueprintMap"),
|
|
439
346
|
helperText: l("editor.field.elementBlueprintMapHelp"),
|
|
440
|
-
disabled:
|
|
347
|
+
disabled: t
|
|
441
348
|
}
|
|
442
349
|
),
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
|
|
350
|
+
/* @__PURE__ */ e(
|
|
351
|
+
F,
|
|
445
352
|
{
|
|
446
|
-
name:
|
|
353
|
+
name: o("elementRefIdTemplateMap"),
|
|
447
354
|
kind: "map",
|
|
448
355
|
label: l("editor.field.elementRefIdTemplateMap"),
|
|
449
356
|
helperText: l("editor.field.elementRefIdTemplateMapHelp"),
|
|
450
|
-
disabled:
|
|
357
|
+
disabled: t
|
|
451
358
|
}
|
|
452
359
|
)
|
|
453
360
|
] }) : null,
|
|
454
|
-
|
|
455
|
-
|
|
361
|
+
r === "concat" ? /* @__PURE__ */ e(
|
|
362
|
+
F,
|
|
456
363
|
{
|
|
457
|
-
name:
|
|
364
|
+
name: o("concatSelectors"),
|
|
458
365
|
label: l("editor.field.concatSelectors"),
|
|
459
366
|
helperText: l("editor.field.concatSelectorsHelp"),
|
|
460
|
-
disabled:
|
|
367
|
+
disabled: t
|
|
461
368
|
}
|
|
462
369
|
) : null,
|
|
463
|
-
|
|
464
|
-
|
|
370
|
+
r === "text" || r === "concat" || r === "array" ? /* @__PURE__ */ e(
|
|
371
|
+
H,
|
|
465
372
|
{
|
|
466
|
-
name:
|
|
373
|
+
name: o("normalizeUnicode"),
|
|
467
374
|
label: l("editor.field.normalizeUnicode"),
|
|
468
|
-
disabled:
|
|
375
|
+
disabled: t
|
|
469
376
|
}
|
|
470
377
|
) : null,
|
|
471
|
-
|
|
378
|
+
r === "fieldset" || r === "virtualtable" ? /* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.field.childrenHelp") }) : null
|
|
472
379
|
] });
|
|
473
380
|
}
|
|
474
|
-
function
|
|
475
|
-
const { blueprints:
|
|
476
|
-
queryKey:
|
|
477
|
-
queryFn: () =>
|
|
478
|
-
enabled: !!(
|
|
381
|
+
function ie(i) {
|
|
382
|
+
const { blueprints: t } = $e(), { workspaceId: l } = Ce(), n = t?.getRelease?.bind(t), r = Fe({
|
|
383
|
+
queryKey: Te.blueprintRelease(l, i),
|
|
384
|
+
queryFn: () => n(i),
|
|
385
|
+
enabled: !!(n && i),
|
|
479
386
|
staleTime: Number.POSITIVE_INFINITY
|
|
480
387
|
});
|
|
481
388
|
return {
|
|
482
|
-
available: !!
|
|
483
|
-
release:
|
|
484
|
-
isLoading:
|
|
485
|
-
isError:
|
|
389
|
+
available: !!n,
|
|
390
|
+
release: r.data,
|
|
391
|
+
isLoading: r.isLoading,
|
|
392
|
+
isError: r.isError
|
|
486
393
|
};
|
|
487
394
|
}
|
|
488
|
-
function
|
|
489
|
-
const
|
|
490
|
-
for (const
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
|
|
395
|
+
function rt(i) {
|
|
396
|
+
const t = /* @__PURE__ */ new Map(), l = [];
|
|
397
|
+
for (const n of i) {
|
|
398
|
+
const r = ee(n.path);
|
|
399
|
+
t.set(n.name, r);
|
|
400
|
+
const o = t.get(n.name.replace(/\.(fields|virtualTableFields)\.\d+$/, ""));
|
|
401
|
+
o && o !== r ? o.children.push(r) : l.push(r);
|
|
495
402
|
}
|
|
496
403
|
return l;
|
|
497
404
|
}
|
|
498
|
-
function
|
|
499
|
-
const { t
|
|
500
|
-
const M =
|
|
501
|
-
return /* @__PURE__ */
|
|
405
|
+
function it({ notices: i }) {
|
|
406
|
+
const { t } = E(I), { mapping: l, canConfigure: n, reasons: r } = O(), { control: o, setValue: s } = k(), m = B({ control: o, name: "fields" }), d = re(m), g = ie(l.content.blueprintReleaseId), u = g.release ? g.release.fields : rt(d), c = g.release ? d.filter((T) => !pe(u, T.path)) : [], [p, C] = N(null), [L, P] = N(/* @__PURE__ */ new Set()), K = (T) => d.find((M) => M.path === T)?.name ?? null, A = (T) => {
|
|
407
|
+
const M = K(T.path), ne = M !== null && Qe(r, M), oe = t(ne ? "editor.tree.invalid" : M ? "editor.tree.mapped" : "editor.tree.unmapped"), J = T.label || T.accessor, ae = T.children.length > 0;
|
|
408
|
+
return /* @__PURE__ */ e(
|
|
502
409
|
Q.Item,
|
|
503
410
|
{
|
|
504
411
|
asChild: !0,
|
|
505
|
-
active:
|
|
506
|
-
expanded:
|
|
507
|
-
onExpandedChange: (
|
|
508
|
-
const
|
|
509
|
-
|
|
412
|
+
active: p === T.path,
|
|
413
|
+
expanded: ae ? !L.has(T.path) : void 0,
|
|
414
|
+
onExpandedChange: (Ne) => {
|
|
415
|
+
const Y = new Set(L);
|
|
416
|
+
Ne ? Y.delete(T.path) : Y.add(T.path), P(Y);
|
|
510
417
|
},
|
|
511
|
-
toggleAriaLabel:
|
|
512
|
-
indicator: /* @__PURE__ */
|
|
513
|
-
subItems:
|
|
514
|
-
children: /* @__PURE__ */
|
|
418
|
+
toggleAriaLabel: t("editor.tree.toggle", { label: J }),
|
|
419
|
+
indicator: /* @__PURE__ */ e(x, { "aria-hidden": !0, children: /* @__PURE__ */ e(Se, { tone: ne ? "danger" : M ? "success" : "neutral", label: oe }) }),
|
|
420
|
+
subItems: ae ? T.children.map(A) : void 0,
|
|
421
|
+
children: /* @__PURE__ */ e(
|
|
515
422
|
"button",
|
|
516
423
|
{
|
|
517
424
|
type: "button",
|
|
518
|
-
"aria-label": `${
|
|
519
|
-
onClick: () =>
|
|
520
|
-
children:
|
|
425
|
+
"aria-label": `${J}, ${oe}`,
|
|
426
|
+
onClick: () => C(T.path),
|
|
427
|
+
children: J
|
|
521
428
|
}
|
|
522
429
|
)
|
|
523
430
|
},
|
|
524
431
|
T.path
|
|
525
432
|
);
|
|
526
|
-
},
|
|
527
|
-
return /* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
433
|
+
}, y = p ? pe(u, p)?.at(-1) ?? { ...ee(p), accessor: p } : null, S = y ? K(y.path) : null;
|
|
434
|
+
return /* @__PURE__ */ a(Z, { storageKey: "importhub.mappingEditor.fields", children: [
|
|
435
|
+
/* @__PURE__ */ e(Z.Nav, { "aria-label": t("editor.tree.label"), children: /* @__PURE__ */ a(Q, { children: [
|
|
436
|
+
g.isLoading ? /* @__PURE__ */ e(h, { px: "3", color: "fg.muted", children: t("startPage.loading") }) : null,
|
|
437
|
+
u.map(A),
|
|
438
|
+
c.length > 0 ? /* @__PURE__ */ e(Q.Group, { label: t("editor.tree.outside"), children: c.map((T) => A({ ...ee(T.path), accessor: T.path })) }) : null
|
|
532
439
|
] }) }),
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
|
|
440
|
+
/* @__PURE__ */ e(Z.Detail, { children: /* @__PURE__ */ e(x, { px: "8", py: "6", children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
441
|
+
i,
|
|
442
|
+
g.available ? null : /* @__PURE__ */ e($, { status: "info", colorPalette: "info", children: t("editor.tree.noLookup") }),
|
|
443
|
+
g.isError ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", children: t("editor.tree.loadFailed") }) : null,
|
|
444
|
+
y ? /* @__PURE__ */ a(z, { children: [
|
|
445
|
+
/* @__PURE__ */ a(R, { gap: "3", align: "baseline", wrap: "wrap", children: [
|
|
446
|
+
/* @__PURE__ */ e(Oe, { size: "md", children: y.label || y.accessor }),
|
|
447
|
+
/* @__PURE__ */ e(Le, { children: y.path }),
|
|
448
|
+
y.fieldType ? /* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: y.fieldType }) : null
|
|
542
449
|
] }),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
|
|
548
|
-
|
|
450
|
+
S ? /* @__PURE__ */ e(j, { name: S, within: !0 }) : null,
|
|
451
|
+
S ? /* @__PURE__ */ a(z, { children: [
|
|
452
|
+
/* @__PURE__ */ e(v, { title: t("editor.field.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
453
|
+
/* @__PURE__ */ e(lt, { name: S, disabled: !n }, S),
|
|
454
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
455
|
+
w,
|
|
549
456
|
{
|
|
550
457
|
variant: "outline",
|
|
551
458
|
colorPalette: "red",
|
|
552
459
|
size: "sm",
|
|
553
|
-
onClick: () =>
|
|
460
|
+
onClick: () => s("fields", Xe(m, S), {
|
|
554
461
|
shouldDirty: !0
|
|
555
462
|
}),
|
|
556
463
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
|
|
464
|
+
/* @__PURE__ */ e(_, { size: 14, "aria-hidden": !0 }),
|
|
465
|
+
t("editor.field.remove")
|
|
559
466
|
]
|
|
560
467
|
}
|
|
561
468
|
) }) : null
|
|
562
469
|
] }) }),
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
|
|
470
|
+
/* @__PURE__ */ e(
|
|
471
|
+
Ye,
|
|
565
472
|
{
|
|
566
|
-
name:
|
|
567
|
-
disabled: !
|
|
473
|
+
name: S,
|
|
474
|
+
disabled: !n
|
|
568
475
|
},
|
|
569
|
-
`json:${
|
|
476
|
+
`json:${S}`
|
|
570
477
|
)
|
|
571
|
-
] }) : /* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
|
|
574
|
-
|
|
478
|
+
] }) : /* @__PURE__ */ e(v, { title: t("editor.field.title"), children: /* @__PURE__ */ a(b, { gap: "3", children: [
|
|
479
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.field.notMapped") }),
|
|
480
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
481
|
+
w,
|
|
575
482
|
{
|
|
576
483
|
variant: "outline",
|
|
577
484
|
size: "sm",
|
|
578
|
-
onClick: () =>
|
|
485
|
+
onClick: () => s("fields", Ue(m, u, y.path).fields, {
|
|
579
486
|
shouldDirty: !0
|
|
580
487
|
}),
|
|
581
488
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
|
|
489
|
+
/* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
|
|
490
|
+
t("editor.field.map")
|
|
584
491
|
]
|
|
585
492
|
}
|
|
586
493
|
) }) : null
|
|
587
494
|
] }) })
|
|
588
|
-
] }) : /* @__PURE__ */
|
|
495
|
+
] }) : /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.tree.selectField") })
|
|
589
496
|
] }) }) })
|
|
590
497
|
] });
|
|
591
498
|
}
|
|
592
|
-
const
|
|
499
|
+
const he = 25;
|
|
500
|
+
function nt({
|
|
501
|
+
client: i,
|
|
502
|
+
notices: t
|
|
503
|
+
}) {
|
|
504
|
+
const { t: l } = E(I), { workspaceId: n } = Ce(), { mapping: r, canConfigure: o } = O(), { getValues: s } = k(), [m, d] = N(null), [g, u] = N(null), [c, p] = N(""), C = He(), L = Fe({
|
|
505
|
+
queryKey: Te.entitySets(n),
|
|
506
|
+
queryFn: () => i.listEntitySets(),
|
|
507
|
+
enabled: o
|
|
508
|
+
}), P = Je({
|
|
509
|
+
mutationFn: async ({ sample: y, content: S }) => ({
|
|
510
|
+
content: S,
|
|
511
|
+
result: await i.runMappingTest({
|
|
512
|
+
content: S,
|
|
513
|
+
sample: new Uint8Array(await y.arrayBuffer()),
|
|
514
|
+
entitySetId: c
|
|
515
|
+
})
|
|
516
|
+
})
|
|
517
|
+
}), K = (y) => {
|
|
518
|
+
const S = y[0];
|
|
519
|
+
if (S) {
|
|
520
|
+
if (!/\.xml$/i.test(S.name) && !/xml/.test(S.type)) {
|
|
521
|
+
u(S.name);
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
u(null), d(S);
|
|
525
|
+
}
|
|
526
|
+
}, A = [
|
|
527
|
+
{ id: "", label: l("editor.test.noEntitySet") },
|
|
528
|
+
...(L.data ?? []).map((y) => ({ id: y.id, label: y.content.name }))
|
|
529
|
+
];
|
|
530
|
+
return /* @__PURE__ */ e(x, { px: "8", py: "6", children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
531
|
+
t,
|
|
532
|
+
/* @__PURE__ */ e($, { status: "info", colorPalette: "info", title: l("editor.test.title"), children: /* @__PURE__ */ a(b, { gap: "1", children: [
|
|
533
|
+
/* @__PURE__ */ e(h, { children: l("editor.test.about") }),
|
|
534
|
+
/* @__PURE__ */ e(h, { children: l("editor.test.aboutDerived") })
|
|
535
|
+
] }) }),
|
|
536
|
+
o ? /* @__PURE__ */ e(v, { title: l("editor.test.sampleCard"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
537
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.sampleHelp") }),
|
|
538
|
+
/* @__PURE__ */ e(
|
|
539
|
+
Ae,
|
|
540
|
+
{
|
|
541
|
+
onFiles: K,
|
|
542
|
+
accept: ".xml,text/xml,application/xml",
|
|
543
|
+
disabled: P.isPending,
|
|
544
|
+
dropHintText: l("editor.test.dropHint"),
|
|
545
|
+
dragActiveText: l("editor.test.dragActive"),
|
|
546
|
+
buttonLabel: l("editor.test.chooseFile")
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
g ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", children: l("editor.test.notXml", { name: g }) }) : null,
|
|
550
|
+
m ? /* @__PURE__ */ a(R, { gap: "2", children: [
|
|
551
|
+
/* @__PURE__ */ e(Be, { size: 16, "aria-hidden": !0 }),
|
|
552
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", children: l("editor.test.chosen") }),
|
|
553
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: m.name })
|
|
554
|
+
] }) : null,
|
|
555
|
+
/* @__PURE__ */ a(b, { gap: "1", children: [
|
|
556
|
+
/* @__PURE__ */ e(h, { id: C, fontWeight: "medium", fontSize: "sm", children: l("editor.test.entitySet") }),
|
|
557
|
+
/* @__PURE__ */ e(
|
|
558
|
+
ke,
|
|
559
|
+
{
|
|
560
|
+
"aria-labelledby": C,
|
|
561
|
+
options: A,
|
|
562
|
+
value: A.find((y) => y.id === c) ?? null,
|
|
563
|
+
onChange: (y) => p(y && !Array.isArray(y) ? y.id : ""),
|
|
564
|
+
isClearable: !1,
|
|
565
|
+
loading: L.isLoading
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.entitySetHelp") })
|
|
569
|
+
] }),
|
|
570
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
571
|
+
w,
|
|
572
|
+
{
|
|
573
|
+
type: "button",
|
|
574
|
+
variant: "outline",
|
|
575
|
+
disabled: !m,
|
|
576
|
+
loading: P.isPending,
|
|
577
|
+
onClick: () => m && P.mutate({
|
|
578
|
+
sample: m,
|
|
579
|
+
// As Save would send it: a blank setting the draft left
|
|
580
|
+
// unset stays unset, so the test reads what a save would
|
|
581
|
+
// store.
|
|
582
|
+
content: we(s(), r.content)
|
|
583
|
+
}),
|
|
584
|
+
children: [
|
|
585
|
+
/* @__PURE__ */ e(Ke, { size: 14, "aria-hidden": !0 }),
|
|
586
|
+
l("editor.test.run")
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
) })
|
|
590
|
+
] }) }) : /* @__PURE__ */ e(h, { color: "fg.muted", children: l("editor.test.adminOnly") }),
|
|
591
|
+
P.isError ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", title: l("editor.test.failed"), children: P.error.message }) : null,
|
|
592
|
+
P.data && !P.isPending ? /* @__PURE__ */ e(ot, { result: P.data.result, content: P.data.content }) : null
|
|
593
|
+
] }) });
|
|
594
|
+
}
|
|
595
|
+
function ot({ result: i, content: t }) {
|
|
596
|
+
const { t: l } = E(I), n = U(() => Pe(t.fields ?? []), [t]), [r, o] = N(!1), [s, m] = N(he), d = i.elements.filter((u) => u.problems.length > 0), g = r ? d : i.elements;
|
|
597
|
+
return i.elements.length === 0 ? /* @__PURE__ */ e($, { status: "warning", colorPalette: "warning", children: l("editor.test.noElements") }) : /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
598
|
+
/* @__PURE__ */ a(R, { gap: "4", justify: "space-between", wrap: "wrap", children: [
|
|
599
|
+
/* @__PURE__ */ e(h, { role: "status", children: l("editor.test.summary", {
|
|
600
|
+
count: i.elements.length,
|
|
601
|
+
problems: d.length
|
|
602
|
+
}) }),
|
|
603
|
+
/* @__PURE__ */ e(
|
|
604
|
+
De,
|
|
605
|
+
{
|
|
606
|
+
checked: r,
|
|
607
|
+
onCheckedChange: (u) => o(u.checked === !0),
|
|
608
|
+
children: l("editor.test.onlyProblems")
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
] }),
|
|
612
|
+
g.slice(0, s).map((u) => /* @__PURE__ */ e(st, { element: u, fieldsets: n }, u.position)),
|
|
613
|
+
g.length > s ? /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ a(b, { gap: "2", align: "center", children: [
|
|
614
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.shownOf", { shown: s, total: g.length }) }),
|
|
615
|
+
/* @__PURE__ */ e(w, { type: "button", variant: "outline", onClick: () => m(s + he), children: l("editor.test.showMore") })
|
|
616
|
+
] }) }) : null
|
|
617
|
+
] });
|
|
618
|
+
}
|
|
619
|
+
function Pe(i, t = "") {
|
|
620
|
+
const l = /* @__PURE__ */ new Set();
|
|
621
|
+
for (const n of i) {
|
|
622
|
+
if (n.type !== "fieldset" || typeof n.name != "string") continue;
|
|
623
|
+
const r = t ? `${t}.${n.name}` : n.name;
|
|
624
|
+
l.add(r);
|
|
625
|
+
const o = Array.isArray(n.fields) ? n.fields : [];
|
|
626
|
+
for (const s of Pe(o, r)) l.add(s);
|
|
627
|
+
}
|
|
628
|
+
return l;
|
|
629
|
+
}
|
|
630
|
+
function at(i, t) {
|
|
631
|
+
const l = [], n = (r, o) => {
|
|
632
|
+
for (const [s, m] of Object.entries(r)) {
|
|
633
|
+
const d = o ? `${o}.${s}` : s;
|
|
634
|
+
t.has(d) && m !== null && typeof m == "object" && !Array.isArray(m) ? n(m, d) : l.push({ field: d, value: m, problems: [] });
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
n(i.values, "");
|
|
638
|
+
for (const r of i.problems) {
|
|
639
|
+
if (!r.field) continue;
|
|
640
|
+
const o = l.find((s) => s.field === r.field);
|
|
641
|
+
o ? o.problems.push(r.reason) : l.push({ field: r.field, problems: [r.reason] });
|
|
642
|
+
}
|
|
643
|
+
return l;
|
|
644
|
+
}
|
|
645
|
+
const fe = (i) => i === void 0 ? "" : typeof i == "string" ? i : JSON.stringify(i);
|
|
646
|
+
function st({
|
|
647
|
+
element: i,
|
|
648
|
+
fieldsets: t
|
|
649
|
+
}) {
|
|
650
|
+
const { t: l } = E(I), n = l("editor.test.element", {
|
|
651
|
+
position: i.position,
|
|
652
|
+
sourceKey: i.sourceKey || l("editor.test.noSourceKey")
|
|
653
|
+
}), r = [...new Set(i.problems.filter((d) => !d.field).map((d) => d.reason))], o = U(() => at(i, t), [i, t]), s = U(
|
|
654
|
+
() => [
|
|
655
|
+
{
|
|
656
|
+
id: "field",
|
|
657
|
+
header: l("editor.test.field"),
|
|
658
|
+
size: 200,
|
|
659
|
+
cell: (d) => /* @__PURE__ */ e(Me, { value: d.row.original.field })
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
id: "value",
|
|
663
|
+
header: l("editor.test.value"),
|
|
664
|
+
minSize: 240,
|
|
665
|
+
cell: (d) => /* @__PURE__ */ e(se, { value: fe(d.row.original.value), maxLength: 160 })
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: "problem",
|
|
669
|
+
header: l("editor.test.problem"),
|
|
670
|
+
size: 260,
|
|
671
|
+
cell: (d) => d.row.original.problems.length > 0 ? /* @__PURE__ */ e(se, { value: d.row.original.problems.join("; ") }) : null
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
[l]
|
|
675
|
+
), m = Object.entries(i.releaseSpec);
|
|
676
|
+
return /* @__PURE__ */ e(
|
|
677
|
+
v,
|
|
678
|
+
{
|
|
679
|
+
role: "region",
|
|
680
|
+
"aria-label": n,
|
|
681
|
+
header: /* @__PURE__ */ a(R, { gap: "3", justify: "space-between", wrap: "wrap", children: [
|
|
682
|
+
/* @__PURE__ */ e(h, { fontWeight: "semibold", children: n }),
|
|
683
|
+
i.problems.length > 0 ? /* @__PURE__ */ e(
|
|
684
|
+
Se,
|
|
685
|
+
{
|
|
686
|
+
tone: "danger",
|
|
687
|
+
label: l("editor.test.problemCount", { count: i.problems.length })
|
|
688
|
+
}
|
|
689
|
+
) : null
|
|
690
|
+
] }),
|
|
691
|
+
children: /* @__PURE__ */ a(b, { gap: "3", children: [
|
|
692
|
+
r.map((d) => /* @__PURE__ */ e(
|
|
693
|
+
$,
|
|
694
|
+
{
|
|
695
|
+
status: "error",
|
|
696
|
+
colorPalette: "danger",
|
|
697
|
+
title: l("editor.test.wholeElement"),
|
|
698
|
+
children: d
|
|
699
|
+
},
|
|
700
|
+
d
|
|
701
|
+
)),
|
|
702
|
+
i.firstDay || i.lastDay ? /* @__PURE__ */ e(W, { label: l("editor.test.validityPeriod"), children: l("editor.test.validFromTo", {
|
|
703
|
+
from: i.firstDay || l("editor.test.open"),
|
|
704
|
+
to: i.lastDay || l("editor.test.open")
|
|
705
|
+
}) }) : null,
|
|
706
|
+
i.displayName ? /* @__PURE__ */ e(W, { label: l("editor.test.displayName"), children: i.displayName }) : null,
|
|
707
|
+
i.collections.length > 0 ? /* @__PURE__ */ e(W, { label: l("editor.test.collections"), children: i.collections.join(", ") }) : null,
|
|
708
|
+
m.length > 0 ? /* @__PURE__ */ e(W, { label: l("editor.test.releaseSpec"), children: m.map(([d, g]) => `${d}: ${fe(g)}`).join(", ") }) : null,
|
|
709
|
+
o.length > 0 ? /* @__PURE__ */ e(Re, { columns: s, data: o, getRowId: (d) => d.field }) : null
|
|
710
|
+
] })
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
const dt = [
|
|
593
715
|
["TITLE_INTENT_UNSPECIFIED", "none"],
|
|
594
716
|
["TITLE_INTENT_EXCLUDE", "exclude"],
|
|
595
717
|
["TITLE_INTENT_REPLACE", "replace"],
|
|
596
718
|
["TITLE_INTENT_ANNOTATE", "annotate"]
|
|
597
719
|
];
|
|
598
|
-
function
|
|
599
|
-
const { t
|
|
600
|
-
return /* @__PURE__ */
|
|
601
|
-
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
-
|
|
720
|
+
function ct({ notices: i }) {
|
|
721
|
+
const { t } = E(I), { mapping: l, canConfigure: n } = O(), r = !n, { control: o } = k(), s = ie(l.content.blueprintReleaseId).release, m = re(B({ control: o, name: "fields" })).map((c) => c.path), d = s ? qe(s.fields).filter((c) => !m.includes(c.path)).map((c) => ({ id: c.path, label: c.label || c.path })) : void 0, g = q({ control: o, name: "titleContributions" }), u = q({ control: o, name: "placeholderAssets" });
|
|
722
|
+
return /* @__PURE__ */ e(x, { px: "8", py: "6", children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
723
|
+
i,
|
|
724
|
+
/* @__PURE__ */ e(v, { title: t("editor.stub.title"), children: /* @__PURE__ */ e(
|
|
725
|
+
H,
|
|
604
726
|
{
|
|
605
727
|
name: "stub",
|
|
606
|
-
label:
|
|
607
|
-
helperText:
|
|
728
|
+
label: t("editor.stub.label"),
|
|
729
|
+
helperText: t("editor.stub.help"),
|
|
608
730
|
disabled: r
|
|
609
731
|
}
|
|
610
732
|
) }),
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
733
|
+
/* @__PURE__ */ e(v, { title: t("editor.naming.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
734
|
+
/* @__PURE__ */ a(le, { templateColumns: { base: "1fr", md: "2fr 1fr" }, gap: "4", alignItems: "start", children: [
|
|
735
|
+
/* @__PURE__ */ e(
|
|
736
|
+
f,
|
|
737
|
+
{
|
|
738
|
+
name: "displayNameTemplate",
|
|
739
|
+
label: t("editor.naming.displayNameTemplate"),
|
|
740
|
+
helperText: t("editor.naming.displayNameTemplateHelp"),
|
|
741
|
+
disabled: r
|
|
742
|
+
}
|
|
743
|
+
),
|
|
744
|
+
d ? /* @__PURE__ */ e(
|
|
745
|
+
V,
|
|
746
|
+
{
|
|
747
|
+
name: "displayNameField",
|
|
748
|
+
label: t("editor.naming.displayNameField"),
|
|
749
|
+
helperText: t("editor.naming.displayNameFieldHelp"),
|
|
750
|
+
placeholder: t("editor.naming.displayNameFieldNone"),
|
|
751
|
+
options: d,
|
|
752
|
+
disabled: r
|
|
753
|
+
}
|
|
754
|
+
) : /* @__PURE__ */ e(
|
|
755
|
+
f,
|
|
756
|
+
{
|
|
757
|
+
name: "displayNameField",
|
|
758
|
+
label: t("editor.naming.displayNameField"),
|
|
759
|
+
helperText: t("editor.naming.displayNameFieldPathHelp"),
|
|
760
|
+
disabled: r
|
|
761
|
+
}
|
|
762
|
+
)
|
|
763
|
+
] }),
|
|
764
|
+
/* @__PURE__ */ e(
|
|
765
|
+
F,
|
|
623
766
|
{
|
|
624
767
|
name: "collections",
|
|
625
|
-
label:
|
|
626
|
-
helperText:
|
|
768
|
+
label: t("editor.naming.collections"),
|
|
769
|
+
helperText: t("editor.naming.collectionsHelp"),
|
|
627
770
|
disabled: r
|
|
628
771
|
}
|
|
629
772
|
)
|
|
630
773
|
] }) }),
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
|
|
774
|
+
/* @__PURE__ */ e(v, { title: t("editor.routing.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
775
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: t("editor.routing.help") }),
|
|
776
|
+
/* @__PURE__ */ e(
|
|
777
|
+
f,
|
|
635
778
|
{
|
|
636
779
|
name: "collectionRouting.selector",
|
|
637
|
-
label:
|
|
780
|
+
label: t("editor.routing.selector"),
|
|
638
781
|
disabled: r
|
|
639
782
|
}
|
|
640
783
|
),
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
|
|
784
|
+
/* @__PURE__ */ e(
|
|
785
|
+
F,
|
|
643
786
|
{
|
|
644
787
|
name: "collectionRouting.collectionMap",
|
|
645
788
|
kind: "map",
|
|
646
|
-
label:
|
|
647
|
-
helperText:
|
|
789
|
+
label: t("editor.routing.collectionMap"),
|
|
790
|
+
helperText: t("editor.routing.collectionMapHelp"),
|
|
648
791
|
disabled: r
|
|
649
792
|
}
|
|
650
793
|
),
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
|
|
794
|
+
/* @__PURE__ */ e(
|
|
795
|
+
f,
|
|
653
796
|
{
|
|
654
797
|
name: "collectionRouting.idPattern",
|
|
655
|
-
label:
|
|
798
|
+
label: t("editor.routing.idPattern"),
|
|
656
799
|
disabled: r
|
|
657
800
|
}
|
|
658
801
|
),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
|
|
802
|
+
/* @__PURE__ */ e(
|
|
803
|
+
f,
|
|
661
804
|
{
|
|
662
805
|
name: "collectionRouting.collectionTemplate",
|
|
663
|
-
label:
|
|
664
|
-
helperText:
|
|
806
|
+
label: t("editor.routing.collectionTemplate"),
|
|
807
|
+
helperText: t("editor.routing.collectionTemplateHelp"),
|
|
665
808
|
disabled: r
|
|
666
809
|
}
|
|
667
810
|
),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
|
|
811
|
+
/* @__PURE__ */ e(
|
|
812
|
+
f,
|
|
670
813
|
{
|
|
671
814
|
name: "collectionRouting.suffix",
|
|
672
|
-
label:
|
|
815
|
+
label: t("editor.routing.suffix"),
|
|
673
816
|
disabled: r
|
|
674
817
|
}
|
|
675
818
|
),
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
|
|
819
|
+
/* @__PURE__ */ e(
|
|
820
|
+
f,
|
|
678
821
|
{
|
|
679
822
|
name: "collectionRouting.fallback",
|
|
680
|
-
label:
|
|
823
|
+
label: t("editor.routing.fallback"),
|
|
681
824
|
disabled: r
|
|
682
825
|
}
|
|
683
826
|
)
|
|
684
827
|
] }) }),
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
828
|
+
/* @__PURE__ */ e(v, { title: t("editor.titles.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
829
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: t("editor.titles.help") }),
|
|
830
|
+
g.fields.length === 0 ? /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.titles.none") }) : null,
|
|
831
|
+
g.fields.map((c, p) => /* @__PURE__ */ a(
|
|
832
|
+
b,
|
|
690
833
|
{
|
|
691
834
|
gap: "4",
|
|
692
835
|
role: "group",
|
|
693
|
-
"aria-label":
|
|
836
|
+
"aria-label": t("editor.titles.item", { index: p + 1 }),
|
|
694
837
|
children: [
|
|
695
|
-
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
|
|
699
|
-
|
|
838
|
+
p > 0 ? /* @__PURE__ */ e(ce, {}) : null,
|
|
839
|
+
/* @__PURE__ */ a(R, { justify: "space-between", children: [
|
|
840
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: t("editor.titles.item", { index: p + 1 }) }),
|
|
841
|
+
n ? /* @__PURE__ */ e(
|
|
842
|
+
X,
|
|
700
843
|
{
|
|
701
|
-
"aria-label":
|
|
844
|
+
"aria-label": t("editor.titles.remove", { index: p + 1 }),
|
|
702
845
|
variant: "ghost",
|
|
703
846
|
colorPalette: "red",
|
|
704
|
-
onClick: () =>
|
|
705
|
-
children: /* @__PURE__ */
|
|
847
|
+
onClick: () => g.remove(p),
|
|
848
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
706
849
|
}
|
|
707
850
|
) : null
|
|
708
851
|
] }),
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ e(j, { name: `titleContributions.${p}` }),
|
|
853
|
+
/* @__PURE__ */ e(pt, { index: p, disabled: r })
|
|
711
854
|
]
|
|
712
855
|
},
|
|
713
856
|
c.id
|
|
714
857
|
)),
|
|
715
|
-
|
|
716
|
-
|
|
858
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
859
|
+
w,
|
|
717
860
|
{
|
|
718
861
|
variant: "outline",
|
|
719
862
|
size: "sm",
|
|
720
|
-
onClick: () =>
|
|
863
|
+
onClick: () => g.append({ selector: "", ausgabeCodeSelector: "" }),
|
|
721
864
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
|
|
865
|
+
/* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
|
|
866
|
+
t("editor.titles.add")
|
|
724
867
|
]
|
|
725
868
|
}
|
|
726
869
|
) }) : null
|
|
727
870
|
] }) }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
871
|
+
/* @__PURE__ */ e(v, { title: t("editor.assets.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
872
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: t("editor.assets.help") }),
|
|
873
|
+
u.fields.length === 0 ? /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.assets.none") }) : null,
|
|
874
|
+
u.fields.map((c, p) => /* @__PURE__ */ a(
|
|
875
|
+
b,
|
|
733
876
|
{
|
|
734
877
|
gap: "4",
|
|
735
878
|
role: "group",
|
|
736
|
-
"aria-label":
|
|
879
|
+
"aria-label": t("editor.assets.item", { index: p + 1 }),
|
|
737
880
|
children: [
|
|
738
|
-
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
|
|
742
|
-
|
|
881
|
+
p > 0 ? /* @__PURE__ */ e(ce, {}) : null,
|
|
882
|
+
/* @__PURE__ */ a(R, { justify: "space-between", children: [
|
|
883
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: t("editor.assets.item", { index: p + 1 }) }),
|
|
884
|
+
n ? /* @__PURE__ */ e(
|
|
885
|
+
X,
|
|
743
886
|
{
|
|
744
|
-
"aria-label":
|
|
887
|
+
"aria-label": t("editor.assets.remove", { index: p + 1 }),
|
|
745
888
|
variant: "ghost",
|
|
746
889
|
colorPalette: "red",
|
|
747
|
-
onClick: () =>
|
|
748
|
-
children: /* @__PURE__ */
|
|
890
|
+
onClick: () => u.remove(p),
|
|
891
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
749
892
|
}
|
|
750
893
|
) : null
|
|
751
894
|
] }),
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ e(j, { name: `placeholderAssets.${p}` }),
|
|
896
|
+
/* @__PURE__ */ e(mt, { index: p, disabled: r })
|
|
754
897
|
]
|
|
755
898
|
},
|
|
756
899
|
c.id
|
|
757
900
|
)),
|
|
758
|
-
|
|
759
|
-
|
|
901
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
902
|
+
w,
|
|
760
903
|
{
|
|
761
904
|
variant: "outline",
|
|
762
905
|
size: "sm",
|
|
763
|
-
onClick: () =>
|
|
906
|
+
onClick: () => u.append({ selector: "", assetType: "", keyParts: [] }),
|
|
764
907
|
children: [
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
|
|
908
|
+
/* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
|
|
909
|
+
t("editor.assets.add")
|
|
767
910
|
]
|
|
768
911
|
}
|
|
769
912
|
) }) : null
|
|
770
913
|
] }) })
|
|
771
914
|
] }) });
|
|
772
915
|
}
|
|
773
|
-
function
|
|
774
|
-
const { t: l } =
|
|
775
|
-
return /* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
|
|
916
|
+
function pt({ index: i, disabled: t }) {
|
|
917
|
+
const { t: l } = E(I), { control: n } = k(), r = `titleContributions.${i}`, o = q({ control: n, name: `${r}.referenceSpecValues` });
|
|
918
|
+
return /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
919
|
+
/* @__PURE__ */ e(
|
|
920
|
+
f,
|
|
778
921
|
{
|
|
779
|
-
name: `${
|
|
922
|
+
name: `${r}.selector`,
|
|
780
923
|
label: l("editor.titles.selector"),
|
|
781
924
|
helperText: l("editor.titles.selectorHelp"),
|
|
782
|
-
disabled:
|
|
925
|
+
disabled: t
|
|
783
926
|
}
|
|
784
927
|
),
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
|
|
928
|
+
/* @__PURE__ */ e(
|
|
929
|
+
f,
|
|
787
930
|
{
|
|
788
|
-
name: `${
|
|
931
|
+
name: `${r}.ausgabeCodeSelector`,
|
|
789
932
|
label: l("editor.titles.ausgabeCodeSelector"),
|
|
790
|
-
disabled:
|
|
933
|
+
disabled: t
|
|
791
934
|
}
|
|
792
935
|
),
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
|
|
936
|
+
/* @__PURE__ */ a(b, { gap: "3", role: "group", "aria-label": l("editor.titles.referenceSpecValues"), children: [
|
|
937
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: l("editor.titles.referenceSpecValues") }),
|
|
938
|
+
o.fields.map((s, m) => /* @__PURE__ */ a(le, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
|
|
939
|
+
/* @__PURE__ */ e(
|
|
940
|
+
f,
|
|
798
941
|
{
|
|
799
|
-
name: `${
|
|
800
|
-
label: l("editor.titles.valueField", { index:
|
|
801
|
-
disabled:
|
|
942
|
+
name: `${r}.referenceSpecValues.${m}.field`,
|
|
943
|
+
label: l("editor.titles.valueField", { index: m + 1 }),
|
|
944
|
+
disabled: t
|
|
802
945
|
}
|
|
803
946
|
),
|
|
804
|
-
/* @__PURE__ */
|
|
805
|
-
|
|
947
|
+
/* @__PURE__ */ e(
|
|
948
|
+
f,
|
|
806
949
|
{
|
|
807
|
-
name: `${
|
|
808
|
-
label: l("editor.titles.valueSelector", { index:
|
|
809
|
-
disabled:
|
|
950
|
+
name: `${r}.referenceSpecValues.${m}.selector`,
|
|
951
|
+
label: l("editor.titles.valueSelector", { index: m + 1 }),
|
|
952
|
+
disabled: t
|
|
810
953
|
}
|
|
811
954
|
),
|
|
812
|
-
|
|
813
|
-
|
|
955
|
+
t ? /* @__PURE__ */ e("span", {}) : /* @__PURE__ */ e(
|
|
956
|
+
X,
|
|
814
957
|
{
|
|
815
|
-
"aria-label": l("editor.titles.removeValue", { index:
|
|
958
|
+
"aria-label": l("editor.titles.removeValue", { index: m + 1 }),
|
|
816
959
|
variant: "ghost",
|
|
817
960
|
colorPalette: "red",
|
|
818
|
-
onClick: () =>
|
|
819
|
-
children: /* @__PURE__ */
|
|
961
|
+
onClick: () => o.remove(m),
|
|
962
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
820
963
|
}
|
|
821
964
|
)
|
|
822
|
-
] },
|
|
823
|
-
|
|
824
|
-
|
|
965
|
+
] }, s.id)),
|
|
966
|
+
t ? null : /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
967
|
+
w,
|
|
825
968
|
{
|
|
826
969
|
variant: "outline",
|
|
827
970
|
size: "sm",
|
|
828
|
-
onClick: () =>
|
|
971
|
+
onClick: () => o.append({ field: "", selector: "" }),
|
|
829
972
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
|
|
831
974
|
l("editor.titles.addValue")
|
|
832
975
|
]
|
|
833
976
|
}
|
|
834
977
|
) })
|
|
835
978
|
] }),
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
|
|
979
|
+
/* @__PURE__ */ e(
|
|
980
|
+
f,
|
|
838
981
|
{
|
|
839
|
-
name: `${
|
|
982
|
+
name: `${r}.referenceFilterSelector`,
|
|
840
983
|
label: l("editor.titles.referenceFilterSelector"),
|
|
841
|
-
disabled:
|
|
984
|
+
disabled: t
|
|
842
985
|
}
|
|
843
986
|
),
|
|
844
|
-
/* @__PURE__ */
|
|
845
|
-
|
|
987
|
+
/* @__PURE__ */ e(
|
|
988
|
+
V,
|
|
846
989
|
{
|
|
847
|
-
name: `${
|
|
990
|
+
name: `${r}.intent`,
|
|
848
991
|
label: l("editor.titles.intent"),
|
|
849
992
|
placeholder: l("editor.titles.intents.none"),
|
|
850
|
-
disabled:
|
|
851
|
-
options:
|
|
993
|
+
disabled: t,
|
|
994
|
+
options: dt.map(([s, m]) => ({ id: s, label: l(`editor.titles.intents.${m}`) }))
|
|
852
995
|
}
|
|
853
996
|
),
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
|
|
997
|
+
/* @__PURE__ */ e(
|
|
998
|
+
f,
|
|
856
999
|
{
|
|
857
|
-
name: `${
|
|
1000
|
+
name: `${r}.intentTextSelector`,
|
|
858
1001
|
label: l("editor.titles.intentTextSelector"),
|
|
859
1002
|
helperText: l("editor.titles.intentTextSelectorHelp"),
|
|
860
|
-
disabled:
|
|
1003
|
+
disabled: t
|
|
861
1004
|
}
|
|
862
1005
|
)
|
|
863
1006
|
] });
|
|
864
1007
|
}
|
|
865
|
-
function
|
|
866
|
-
const { t: l } =
|
|
867
|
-
return /* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
|
|
1008
|
+
function mt({ index: i, disabled: t }) {
|
|
1009
|
+
const { t: l } = E(I), n = `placeholderAssets.${i}`;
|
|
1010
|
+
return /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
1011
|
+
/* @__PURE__ */ e(
|
|
1012
|
+
f,
|
|
870
1013
|
{
|
|
871
|
-
name: `${
|
|
1014
|
+
name: `${n}.selector`,
|
|
872
1015
|
label: l("editor.assets.selector"),
|
|
873
1016
|
helperText: l("editor.assets.selectorHelp"),
|
|
874
|
-
disabled:
|
|
1017
|
+
disabled: t
|
|
875
1018
|
}
|
|
876
1019
|
),
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
|
|
1020
|
+
/* @__PURE__ */ e(
|
|
1021
|
+
f,
|
|
879
1022
|
{
|
|
880
|
-
name: `${
|
|
1023
|
+
name: `${n}.assetType`,
|
|
881
1024
|
label: l("editor.assets.assetType"),
|
|
882
|
-
disabled:
|
|
1025
|
+
disabled: t
|
|
883
1026
|
}
|
|
884
1027
|
),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
|
|
1028
|
+
/* @__PURE__ */ e(
|
|
1029
|
+
F,
|
|
887
1030
|
{
|
|
888
|
-
name: `${
|
|
1031
|
+
name: `${n}.keyParts`,
|
|
889
1032
|
label: l("editor.assets.keyParts"),
|
|
890
1033
|
helperText: l("editor.assets.keyPartsHelp"),
|
|
891
|
-
disabled:
|
|
1034
|
+
disabled: t
|
|
892
1035
|
}
|
|
893
1036
|
),
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
|
|
1037
|
+
/* @__PURE__ */ e(
|
|
1038
|
+
f,
|
|
896
1039
|
{
|
|
897
|
-
name: `${
|
|
1040
|
+
name: `${n}.nameSelector`,
|
|
898
1041
|
label: l("editor.assets.nameSelector"),
|
|
899
|
-
disabled:
|
|
1042
|
+
disabled: t
|
|
900
1043
|
}
|
|
901
1044
|
),
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
|
|
1045
|
+
/* @__PURE__ */ e(
|
|
1046
|
+
f,
|
|
904
1047
|
{
|
|
905
|
-
name: `${
|
|
1048
|
+
name: `${n}.descriptionSelector`,
|
|
906
1049
|
label: l("editor.assets.descriptionSelector"),
|
|
907
|
-
disabled:
|
|
1050
|
+
disabled: t
|
|
908
1051
|
}
|
|
909
1052
|
),
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
|
|
1053
|
+
/* @__PURE__ */ e(
|
|
1054
|
+
F,
|
|
912
1055
|
{
|
|
913
|
-
name: `${
|
|
1056
|
+
name: `${n}.metadata`,
|
|
914
1057
|
kind: "map",
|
|
915
1058
|
label: l("editor.assets.metadata"),
|
|
916
1059
|
helperText: l("editor.assets.metadataHelp"),
|
|
917
|
-
disabled:
|
|
1060
|
+
disabled: t
|
|
918
1061
|
}
|
|
919
1062
|
),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
|
|
1063
|
+
/* @__PURE__ */ e(
|
|
1064
|
+
f,
|
|
922
1065
|
{
|
|
923
|
-
name: `${
|
|
1066
|
+
name: `${n}.folderRoot`,
|
|
924
1067
|
label: l("editor.assets.folderRoot"),
|
|
925
|
-
disabled:
|
|
1068
|
+
disabled: t
|
|
926
1069
|
}
|
|
927
1070
|
),
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
|
|
1071
|
+
/* @__PURE__ */ e(
|
|
1072
|
+
f,
|
|
930
1073
|
{
|
|
931
|
-
name: `${
|
|
1074
|
+
name: `${n}.folderPathSelector`,
|
|
932
1075
|
label: l("editor.assets.folderPathSelector"),
|
|
933
1076
|
helperText: l("editor.assets.folderPathSelectorHelp"),
|
|
934
|
-
disabled:
|
|
1077
|
+
disabled: t
|
|
935
1078
|
}
|
|
936
1079
|
)
|
|
937
1080
|
] });
|
|
938
1081
|
}
|
|
939
|
-
const
|
|
1082
|
+
const ge = {
|
|
940
1083
|
correct: "CHANGED_VERSION_HANDLING_CORRECT",
|
|
941
1084
|
keep: "CHANGED_VERSION_HANDLING_KEEP",
|
|
942
1085
|
fail: "CHANGED_VERSION_HANDLING_FAIL"
|
|
943
1086
|
};
|
|
944
|
-
function
|
|
945
|
-
const { t
|
|
946
|
-
return /* @__PURE__ */
|
|
947
|
-
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
|
|
1087
|
+
function ut({ notices: i }) {
|
|
1088
|
+
const { t } = E(I), { mapping: l, canConfigure: n } = O(), r = !n, { control: o } = k(), m = ie(l.content.blueprintReleaseId).release?.releaseSpecFields ?? [], d = re(B({ control: o, name: "fields" })).map((c) => c.path), g = q({ control: o, name: "releaseSpec" }), u = m.map((c) => ({ id: c.path, label: c.label || c.path }));
|
|
1089
|
+
return /* @__PURE__ */ e(x, { px: "8", py: "6", children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
1090
|
+
i,
|
|
1091
|
+
/* @__PURE__ */ e(v, { title: t("editor.sourceKey.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
1092
|
+
/* @__PURE__ */ e(j, { name: "sourceKey" }),
|
|
1093
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: t("editor.sourceKey.help") }),
|
|
1094
|
+
/* @__PURE__ */ e(
|
|
1095
|
+
f,
|
|
953
1096
|
{
|
|
954
1097
|
name: "sourceKey.extractPattern",
|
|
955
|
-
label:
|
|
956
|
-
helperText:
|
|
957
|
-
disabled:
|
|
1098
|
+
label: t("editor.sourceKey.extractPattern"),
|
|
1099
|
+
helperText: t("editor.sourceKey.extractPatternHelp"),
|
|
1100
|
+
disabled: r
|
|
958
1101
|
}
|
|
959
1102
|
),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
|
|
1103
|
+
/* @__PURE__ */ e(
|
|
1104
|
+
f,
|
|
962
1105
|
{
|
|
963
1106
|
name: "sourceKey.extractSeparator",
|
|
964
|
-
label:
|
|
965
|
-
helperText:
|
|
966
|
-
disabled:
|
|
1107
|
+
label: t("editor.sourceKey.extractSeparator"),
|
|
1108
|
+
helperText: t("editor.sourceKey.extractSeparatorHelp"),
|
|
1109
|
+
disabled: r
|
|
967
1110
|
}
|
|
968
1111
|
),
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
|
|
1112
|
+
/* @__PURE__ */ e(
|
|
1113
|
+
H,
|
|
971
1114
|
{
|
|
972
1115
|
name: "sourceKey.normalize",
|
|
973
|
-
label:
|
|
974
|
-
disabled:
|
|
1116
|
+
label: t("editor.sourceKey.normalize"),
|
|
1117
|
+
disabled: r
|
|
975
1118
|
}
|
|
976
1119
|
)
|
|
977
1120
|
] }) }),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
|
|
1121
|
+
/* @__PURE__ */ e(v, { title: t("editor.versionMatch.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
1122
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: t("editor.versionMatch.help") }),
|
|
1123
|
+
/* @__PURE__ */ e(
|
|
1124
|
+
H,
|
|
982
1125
|
{
|
|
983
1126
|
name: "versionMatch.validityPeriod",
|
|
984
|
-
label:
|
|
985
|
-
disabled:
|
|
1127
|
+
label: t("editor.versionMatch.validityPeriod"),
|
|
1128
|
+
disabled: r
|
|
986
1129
|
}
|
|
987
1130
|
),
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
|
|
1131
|
+
/* @__PURE__ */ e(
|
|
1132
|
+
be,
|
|
990
1133
|
{
|
|
991
|
-
title:
|
|
992
|
-
empty:
|
|
1134
|
+
title: t("editor.versionMatch.releaseSpecFields"),
|
|
1135
|
+
empty: t("editor.versionMatch.noReleaseSpecFields"),
|
|
993
1136
|
name: "versionMatch.releaseSpecFields",
|
|
994
|
-
options:
|
|
995
|
-
disabled:
|
|
1137
|
+
options: m.map((c) => ({ value: c.path, label: c.label || c.path })),
|
|
1138
|
+
disabled: r
|
|
996
1139
|
}
|
|
997
1140
|
),
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
|
|
1141
|
+
/* @__PURE__ */ e(
|
|
1142
|
+
be,
|
|
1000
1143
|
{
|
|
1001
|
-
title:
|
|
1002
|
-
empty:
|
|
1144
|
+
title: t("editor.versionMatch.contentFields"),
|
|
1145
|
+
empty: t("editor.versionMatch.noContentFields"),
|
|
1003
1146
|
name: "versionMatch.contentFields",
|
|
1004
|
-
options: d.map((
|
|
1005
|
-
disabled:
|
|
1147
|
+
options: d.map((c) => ({ value: c, label: c })),
|
|
1148
|
+
disabled: r
|
|
1006
1149
|
}
|
|
1007
1150
|
)
|
|
1008
1151
|
] }) }),
|
|
1009
|
-
/* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
|
|
1152
|
+
/* @__PURE__ */ e(v, { title: t("editor.validityPeriod.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
1153
|
+
/* @__PURE__ */ e(
|
|
1154
|
+
f,
|
|
1012
1155
|
{
|
|
1013
1156
|
name: "validityPeriod.validFromSelector",
|
|
1014
|
-
label:
|
|
1015
|
-
disabled:
|
|
1157
|
+
label: t("editor.validityPeriod.validFrom"),
|
|
1158
|
+
disabled: r
|
|
1016
1159
|
}
|
|
1017
1160
|
),
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
|
|
1161
|
+
/* @__PURE__ */ e(
|
|
1162
|
+
f,
|
|
1020
1163
|
{
|
|
1021
1164
|
name: "validityPeriod.validToSelector",
|
|
1022
|
-
label:
|
|
1023
|
-
helperText:
|
|
1024
|
-
disabled:
|
|
1165
|
+
label: t("editor.validityPeriod.validTo"),
|
|
1166
|
+
helperText: t("editor.validityPeriod.validToHelp"),
|
|
1167
|
+
disabled: r
|
|
1025
1168
|
}
|
|
1026
1169
|
),
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
|
|
1170
|
+
/* @__PURE__ */ e(
|
|
1171
|
+
F,
|
|
1029
1172
|
{
|
|
1030
1173
|
name: "validityPeriod.dateFormats",
|
|
1031
|
-
label:
|
|
1032
|
-
helperText:
|
|
1033
|
-
disabled:
|
|
1174
|
+
label: t("editor.validityPeriod.dateFormats"),
|
|
1175
|
+
helperText: t("editor.validityPeriod.dateFormatsHelp"),
|
|
1176
|
+
disabled: r
|
|
1034
1177
|
}
|
|
1035
1178
|
)
|
|
1036
1179
|
] }) }),
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1180
|
+
/* @__PURE__ */ e(v, { title: t("editor.releaseSpec.title"), children: /* @__PURE__ */ a(b, { gap: "3", children: [
|
|
1181
|
+
g.fields.length === 0 ? /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.releaseSpec.none") }) : null,
|
|
1182
|
+
g.fields.map((c, p) => /* @__PURE__ */ a(le, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
|
|
1183
|
+
u.length > 0 ? /* @__PURE__ */ e(
|
|
1184
|
+
V,
|
|
1042
1185
|
{
|
|
1043
|
-
name: `releaseSpec.${
|
|
1044
|
-
label:
|
|
1045
|
-
options:
|
|
1046
|
-
disabled:
|
|
1186
|
+
name: `releaseSpec.${p}.field`,
|
|
1187
|
+
label: t("editor.releaseSpec.field", { index: p + 1 }),
|
|
1188
|
+
options: u,
|
|
1189
|
+
disabled: r
|
|
1047
1190
|
}
|
|
1048
|
-
) : /* @__PURE__ */
|
|
1049
|
-
|
|
1191
|
+
) : /* @__PURE__ */ e(
|
|
1192
|
+
f,
|
|
1050
1193
|
{
|
|
1051
|
-
name: `releaseSpec.${
|
|
1052
|
-
label:
|
|
1053
|
-
disabled:
|
|
1194
|
+
name: `releaseSpec.${p}.field`,
|
|
1195
|
+
label: t("editor.releaseSpec.field", { index: p + 1 }),
|
|
1196
|
+
disabled: r
|
|
1054
1197
|
}
|
|
1055
1198
|
),
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
|
|
1199
|
+
/* @__PURE__ */ e(
|
|
1200
|
+
f,
|
|
1058
1201
|
{
|
|
1059
|
-
name: `releaseSpec.${
|
|
1060
|
-
label:
|
|
1061
|
-
disabled:
|
|
1202
|
+
name: `releaseSpec.${p}.selector`,
|
|
1203
|
+
label: t("editor.releaseSpec.selector", { index: p + 1 }),
|
|
1204
|
+
disabled: r
|
|
1062
1205
|
}
|
|
1063
1206
|
),
|
|
1064
|
-
|
|
1065
|
-
|
|
1207
|
+
n ? /* @__PURE__ */ e(
|
|
1208
|
+
X,
|
|
1066
1209
|
{
|
|
1067
|
-
"aria-label":
|
|
1210
|
+
"aria-label": t("editor.releaseSpec.remove", { index: p + 1 }),
|
|
1068
1211
|
variant: "ghost",
|
|
1069
1212
|
colorPalette: "red",
|
|
1070
|
-
onClick: () =>
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1213
|
+
onClick: () => g.remove(p),
|
|
1214
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
1072
1215
|
}
|
|
1073
|
-
) : /* @__PURE__ */
|
|
1074
|
-
] },
|
|
1075
|
-
|
|
1076
|
-
|
|
1216
|
+
) : /* @__PURE__ */ e("span", {})
|
|
1217
|
+
] }, c.id)),
|
|
1218
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
1219
|
+
w,
|
|
1077
1220
|
{
|
|
1078
1221
|
variant: "outline",
|
|
1079
1222
|
size: "sm",
|
|
1080
|
-
onClick: () =>
|
|
1223
|
+
onClick: () => g.append({ field: "", selector: "" }),
|
|
1081
1224
|
children: [
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
|
|
1225
|
+
/* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
|
|
1226
|
+
t("editor.releaseSpec.add")
|
|
1084
1227
|
]
|
|
1085
1228
|
}
|
|
1086
1229
|
) }) : null
|
|
1087
1230
|
] }) }),
|
|
1088
|
-
/* @__PURE__ */
|
|
1089
|
-
|
|
1231
|
+
/* @__PURE__ */ e(v, { title: t("editor.changedVersion.title"), children: /* @__PURE__ */ e(
|
|
1232
|
+
xe,
|
|
1090
1233
|
{
|
|
1091
1234
|
name: "changedVersion",
|
|
1092
|
-
label:
|
|
1093
|
-
helperText:
|
|
1094
|
-
disabled:
|
|
1095
|
-
children: (
|
|
1096
|
-
|
|
1235
|
+
label: t("editor.changedVersion.label"),
|
|
1236
|
+
helperText: t("editor.changedVersion.help"),
|
|
1237
|
+
disabled: r,
|
|
1238
|
+
children: (c) => /* @__PURE__ */ e(
|
|
1239
|
+
Ve,
|
|
1097
1240
|
{
|
|
1098
|
-
value: !
|
|
1099
|
-
onValueChange: (
|
|
1100
|
-
"aria-describedby":
|
|
1101
|
-
disabled:
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1241
|
+
value: !c.value || c.value === "CHANGED_VERSION_HANDLING_UNSPECIFIED" ? ge.correct : String(c.value),
|
|
1242
|
+
onValueChange: (p) => c.onChange(p.value),
|
|
1243
|
+
"aria-describedby": c["aria-describedby"],
|
|
1244
|
+
disabled: r,
|
|
1245
|
+
children: /* @__PURE__ */ e(b, { gap: "2", children: ["correct", "keep", "fail"].map((p) => /* @__PURE__ */ e(je, { value: ge[p], children: t(`editor.changedVersion.${p}`) }, p)) })
|
|
1103
1246
|
}
|
|
1104
1247
|
)
|
|
1105
1248
|
}
|
|
1106
1249
|
) })
|
|
1107
1250
|
] }) });
|
|
1108
1251
|
}
|
|
1109
|
-
function
|
|
1110
|
-
title:
|
|
1111
|
-
empty:
|
|
1252
|
+
function be({
|
|
1253
|
+
title: i,
|
|
1254
|
+
empty: t,
|
|
1112
1255
|
name: l,
|
|
1113
|
-
options:
|
|
1114
|
-
disabled:
|
|
1256
|
+
options: n,
|
|
1257
|
+
disabled: r
|
|
1115
1258
|
}) {
|
|
1116
|
-
return /* @__PURE__ */
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1259
|
+
return /* @__PURE__ */ a(b, { gap: "2", role: "group", "aria-label": i, children: [
|
|
1260
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: i }),
|
|
1261
|
+
n.length === 0 ? /* @__PURE__ */ e(h, { color: "fg.muted", children: t }) : null,
|
|
1262
|
+
n.map((o) => /* @__PURE__ */ e(
|
|
1263
|
+
We,
|
|
1121
1264
|
{
|
|
1122
1265
|
name: l,
|
|
1123
|
-
value:
|
|
1124
|
-
disabled:
|
|
1125
|
-
children:
|
|
1266
|
+
value: o.value,
|
|
1267
|
+
disabled: r,
|
|
1268
|
+
children: o.label
|
|
1126
1269
|
},
|
|
1127
|
-
|
|
1270
|
+
o.value
|
|
1128
1271
|
)),
|
|
1129
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ e(Ie, { name: l })
|
|
1130
1273
|
] });
|
|
1131
1274
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const { t:
|
|
1275
|
+
function Nt({ client: i, id: t, onDeleted: l }) {
|
|
1276
|
+
const { t: n } = E(I), r = U(
|
|
1134
1277
|
() => ({
|
|
1135
1278
|
tabs: [
|
|
1136
|
-
{ value: "fields", label:
|
|
1137
|
-
{ value: "versions", label:
|
|
1138
|
-
{ value: "output", label:
|
|
1279
|
+
{ value: "fields", label: n("editor.tabs.fields") },
|
|
1280
|
+
{ value: "versions", label: n("editor.tabs.versions") },
|
|
1281
|
+
{ value: "output", label: n("editor.tabs.output") },
|
|
1282
|
+
{ value: "test", label: n("editor.tabs.test") }
|
|
1139
1283
|
],
|
|
1140
|
-
render: (
|
|
1284
|
+
render: (o, s) => o === "fields" ? /* @__PURE__ */ e(it, { notices: s }) : o === "versions" ? /* @__PURE__ */ e(ut, { notices: s }) : o === "test" ? /* @__PURE__ */ e(nt, { client: i, notices: s }) : /* @__PURE__ */ e(ct, { notices: s })
|
|
1141
1285
|
}),
|
|
1142
|
-
[
|
|
1286
|
+
[n, i]
|
|
1143
1287
|
);
|
|
1144
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ e(ze, { client: i, id: t, onDeleted: l, editor: r });
|
|
1145
1289
|
}
|
|
1146
1290
|
export {
|
|
1147
|
-
|
|
1291
|
+
Nt as MappingEditor
|
|
1148
1292
|
};
|
|
1149
1293
|
//# sourceMappingURL=mapping-editor.js.map
|