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