@knkcs/importhub-ui 0.8.0 → 0.10.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.
@@ -1,346 +1,346 @@
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";
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
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 = () => {
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-Bl2rA1SR.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
+ import { SubNavLayout as Z } from "@knkcs/anker/templates";
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
22
  let C;
23
23
  try {
24
- C = JSON.parse(p);
24
+ C = JSON.parse(s);
25
25
  } catch {
26
- s(l("editor.json.notJson"));
26
+ c(l("editor.json.notJson"));
27
27
  return;
28
28
  }
29
29
  if (!C || typeof C != "object" || Array.isArray(C)) {
30
- s(l("editor.json.notObject"));
30
+ c(l("editor.json.notObject"));
31
31
  return;
32
32
  }
33
- s(null), h(!1), r(a, C, { shouldDirty: !0 });
33
+ c(null), g(!1), r(i, C, { shouldDirty: !0 });
34
34
  };
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") }),
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
37
  /* @__PURE__ */ e(
38
- ue,
38
+ ve,
39
39
  {
40
40
  "aria-label": l("editor.json.label"),
41
- value: p,
42
- rows: Math.min(24, Math.max(6, p.split(`
41
+ value: s,
42
+ rows: Math.min(24, Math.max(6, s.split(`
43
43
  `).length)),
44
44
  fontFamily: "mono",
45
45
  spellCheck: !1,
46
46
  disabled: t,
47
47
  onChange: (C) => {
48
- u(C.target.value), h(!0);
48
+ m(C.target.value), g(!0);
49
49
  }
50
50
  }
51
51
  ),
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") }) })
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") }) })
55
55
  ] }) });
56
56
  }
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
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
60
60
  );
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) => (
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) => (
62
62
  // Two reasons may read alike; their order is importhub's.
63
63
  // biome-ignore lint/suspicious/noArrayIndexKey: a static list
64
- /* @__PURE__ */ e(ne.Item, { children: n.message }, p)
64
+ /* @__PURE__ */ e(de.Item, { children: o.message }, s)
65
65
  )) }) });
66
66
  }
67
- function _e(a, t) {
68
- return a.some((l) => fe(l.path, t));
67
+ function Qe(i, t) {
68
+ return i.some((l) => Ee(l.path, t));
69
69
  }
70
- function fe(a, t) {
71
- const l = X(a);
70
+ function Ee(i, t) {
71
+ const l = te(i);
72
72
  return l === t || l.startsWith(`${t}.`);
73
73
  }
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)))
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)))
77
77
  );
78
- return /* @__PURE__ */ e(P, { children: [...l].map((i) => /* @__PURE__ */ e(_, { name: i }, i)) });
78
+ return /* @__PURE__ */ e(z, { children: [...l].map((n) => /* @__PURE__ */ e(j, { name: n }, n)) });
79
79
  }
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(`
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(`
84
84
  `) : "";
85
85
  }
86
- function de(a, t) {
87
- const l = a.split(`
88
- `).map((i) => i.trim()).filter((i) => i !== "");
86
+ function ue(i, t) {
87
+ const l = i.split(`
88
+ `).map((n) => n.trim()).filter((n) => n !== "");
89
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()];
90
+ l.map((n) => {
91
+ const r = n.indexOf("=");
92
+ return r < 0 ? [n, ""] : [n.slice(0, r).trim(), n.slice(r + 1).trim()];
93
93
  })
94
94
  );
95
95
  }
96
- function S({
97
- name: a,
96
+ function F({
97
+ name: i,
98
98
  label: t,
99
99
  helperText: l,
100
- kind: i = "list",
100
+ kind: n = "list",
101
101
  disabled: r
102
102
  }) {
103
- return /* @__PURE__ */ o(m, { gap: "2", children: [
103
+ return /* @__PURE__ */ a(b, { gap: "2", children: [
104
104
  /* @__PURE__ */ e(
105
- he,
105
+ xe,
106
106
  {
107
- name: a,
107
+ name: i,
108
108
  label: t,
109
109
  helperText: l,
110
110
  disabled: r,
111
- children: (n) => /* @__PURE__ */ e(
112
- Oe,
111
+ children: (o) => /* @__PURE__ */ e(
112
+ et,
113
113
  {
114
- value: n.value,
115
- onChange: n.onChange,
116
- onBlur: n.onBlur,
117
- kind: i,
118
- id: n.name,
119
- name: n.name,
120
- describedBy: n["aria-describedby"],
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
121
  disabled: r
122
122
  }
123
123
  )
124
124
  }
125
125
  ),
126
- /* @__PURE__ */ e(ge, { name: a })
126
+ /* @__PURE__ */ e(Ie, { name: i })
127
127
  ] });
128
128
  }
129
- function Oe({
130
- value: a,
129
+ function et({
130
+ value: i,
131
131
  onChange: t,
132
132
  onBlur: l,
133
- kind: i,
133
+ kind: n,
134
134
  id: r,
135
- name: n,
136
- describedBy: p,
137
- disabled: u
135
+ name: o,
136
+ describedBy: s,
137
+ disabled: m
138
138
  }) {
139
- const [T, h] = M(() => V(a));
140
- return me(() => {
141
- h(
142
- (f) => V(de(f, i)) === V(a) ? f : V(a)
139
+ const [d, g] = N(() => G(i));
140
+ return ye(() => {
141
+ g(
142
+ (u) => G(ue(u, n)) === G(i) ? u : G(i)
143
143
  );
144
- }, [a, i]), /* @__PURE__ */ e(
145
- ue,
144
+ }, [i, n]), /* @__PURE__ */ e(
145
+ ve,
146
146
  {
147
147
  id: r,
148
- name: n,
149
- "aria-describedby": p,
150
- value: T,
151
- rows: Math.max(2, T.split(`
148
+ name: o,
149
+ "aria-describedby": s,
150
+ value: d,
151
+ rows: Math.max(2, d.split(`
152
152
  `).length),
153
153
  fontFamily: "mono",
154
- disabled: u,
154
+ disabled: m,
155
155
  onBlur: l,
156
- onChange: (f) => {
157
- h(f.target.value), t(de(f.target.value, i));
156
+ onChange: (u) => {
157
+ g(u.target.value), t(ue(u.target.value, n));
158
158
  }
159
159
  }
160
160
  );
161
161
  }
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: [
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
166
  /* @__PURE__ */ e(
167
- c,
167
+ f,
168
168
  {
169
- name: n("selector"),
169
+ name: o("selector"),
170
170
  label: l("editor.field.selector"),
171
171
  helperText: l("editor.field.selectorHelp"),
172
172
  disabled: t
173
173
  }
174
174
  ),
175
175
  /* @__PURE__ */ e(
176
- A,
176
+ V,
177
177
  {
178
- name: n("type"),
178
+ name: o("type"),
179
179
  label: l("editor.field.type"),
180
180
  isClearable: !1,
181
181
  disabled: t,
182
- options: He.map((p) => ({ id: p, label: p }))
182
+ options: Ge.map((s) => ({ id: s, label: s }))
183
183
  }
184
184
  ),
185
185
  /* @__PURE__ */ e(
186
- x,
186
+ H,
187
187
  {
188
- name: n("optional"),
188
+ name: o("optional"),
189
189
  label: l("editor.field.optional"),
190
190
  helperText: l("editor.field.optionalHelp"),
191
191
  disabled: t
192
192
  }
193
193
  ),
194
- r === "date" ? /* @__PURE__ */ o(P, { children: [
194
+ r === "date" ? /* @__PURE__ */ a(z, { children: [
195
195
  /* @__PURE__ */ e(
196
- c,
196
+ f,
197
197
  {
198
- name: n("dateFormat"),
198
+ name: o("dateFormat"),
199
199
  label: l("editor.field.dateFormat"),
200
200
  helperText: l("editor.field.dateFormatHelp"),
201
201
  disabled: t
202
202
  }
203
203
  ),
204
204
  /* @__PURE__ */ e(
205
- S,
205
+ F,
206
206
  {
207
- name: n("dateFormats"),
207
+ name: o("dateFormats"),
208
208
  label: l("editor.field.dateFormats"),
209
209
  helperText: l("editor.field.dateFormatsHelp"),
210
210
  disabled: t
211
211
  }
212
212
  ),
213
213
  /* @__PURE__ */ e(
214
- x,
214
+ H,
215
215
  {
216
- name: n("autoDetectDateFormat"),
216
+ name: o("autoDetectDateFormat"),
217
217
  label: l("editor.field.autoDetectDateFormat"),
218
218
  disabled: t
219
219
  }
220
220
  )
221
221
  ] }) : null,
222
- r === "number" ? /* @__PURE__ */ o(P, { children: [
222
+ r === "number" ? /* @__PURE__ */ a(z, { children: [
223
223
  /* @__PURE__ */ e(
224
- A,
224
+ V,
225
225
  {
226
- name: n("numberLocale"),
226
+ name: o("numberLocale"),
227
227
  label: l("editor.field.numberLocale"),
228
228
  disabled: t,
229
- options: Ve.map((p) => ({ id: p, label: l(`editor.field.locale.${p}`) }))
229
+ options: tt.map((s) => ({ id: s, label: l(`editor.field.locale.${s}`) }))
230
230
  }
231
231
  ),
232
232
  /* @__PURE__ */ e(
233
- x,
233
+ H,
234
234
  {
235
- name: n("stripCurrency"),
235
+ name: o("stripCurrency"),
236
236
  label: l("editor.field.stripCurrency"),
237
237
  disabled: t
238
238
  }
239
239
  )
240
240
  ] }) : null,
241
241
  r === "date" || r === "number" ? /* @__PURE__ */ e(
242
- x,
242
+ H,
243
243
  {
244
- name: n("skipInvalid"),
244
+ name: o("skipInvalid"),
245
245
  label: l("editor.field.skipInvalid"),
246
246
  helperText: l("editor.field.skipInvalidHelp"),
247
247
  disabled: t
248
248
  }
249
249
  ) : null,
250
250
  r === "select" ? /* @__PURE__ */ e(
251
- S,
251
+ F,
252
252
  {
253
- name: n("selectOptions"),
253
+ name: o("selectOptions"),
254
254
  kind: "map",
255
255
  label: l("editor.field.selectOptions"),
256
256
  helperText: l("editor.field.selectOptionsHelp"),
257
257
  disabled: t
258
258
  }
259
259
  ) : null,
260
- r === "richtext" ? /* @__PURE__ */ o(P, { children: [
260
+ r === "richtext" ? /* @__PURE__ */ a(z, { children: [
261
261
  /* @__PURE__ */ e(
262
- c,
262
+ f,
263
263
  {
264
- name: n("richTextConfig.textWrapperElement"),
264
+ name: o("richTextConfig.textWrapperElement"),
265
265
  label: l("editor.field.textWrapperElement"),
266
266
  disabled: t
267
267
  }
268
268
  ),
269
269
  /* @__PURE__ */ e(
270
- S,
270
+ F,
271
271
  {
272
- name: n("richTextConfig.ignoreElements"),
272
+ name: o("richTextConfig.ignoreElements"),
273
273
  label: l("editor.field.ignoreElements"),
274
274
  helperText: l("editor.field.elementsHelp"),
275
275
  disabled: t
276
276
  }
277
277
  ),
278
278
  /* @__PURE__ */ e(
279
- S,
279
+ F,
280
280
  {
281
- name: n("richTextConfig.passThroughElements"),
281
+ name: o("richTextConfig.passThroughElements"),
282
282
  label: l("editor.field.passThroughElements"),
283
283
  helperText: l("editor.field.elementsHelp"),
284
284
  disabled: t
285
285
  }
286
286
  ),
287
287
  /* @__PURE__ */ e(
288
- x,
288
+ H,
289
289
  {
290
- name: n("richTextConfig.normalizeWhitespace"),
290
+ name: o("richTextConfig.normalizeWhitespace"),
291
291
  label: l("editor.field.normalizeWhitespace"),
292
292
  disabled: t
293
293
  }
294
294
  ),
295
295
  /* @__PURE__ */ e(
296
- x,
296
+ H,
297
297
  {
298
- name: n("richTextConfig.convertNewlinesToBreaks"),
298
+ name: o("richTextConfig.convertNewlinesToBreaks"),
299
299
  label: l("editor.field.convertNewlinesToBreaks"),
300
300
  disabled: t
301
301
  }
302
302
  ),
303
- /* @__PURE__ */ e(g, { color: "fg.muted", fontSize: "sm", children: l("editor.field.richTextMore") })
303
+ /* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.field.richTextMore") })
304
304
  ] }) : null,
305
- r === "reference" || r === "toc_reference" ? /* @__PURE__ */ o(P, { children: [
305
+ r === "reference" || r === "toc_reference" ? /* @__PURE__ */ a(z, { children: [
306
306
  /* @__PURE__ */ e(
307
- c,
307
+ f,
308
308
  {
309
- name: n("refBlueprintId"),
309
+ name: o("refBlueprintId"),
310
310
  label: l("editor.field.refBlueprintId"),
311
311
  disabled: t
312
312
  }
313
313
  ),
314
314
  /* @__PURE__ */ e(
315
- c,
315
+ f,
316
316
  {
317
- name: n("refIdTemplate"),
317
+ name: o("refIdTemplate"),
318
318
  label: l("editor.field.refIdTemplate"),
319
319
  helperText: l("editor.field.refIdTemplateHelp"),
320
320
  disabled: t
321
321
  }
322
322
  ),
323
323
  /* @__PURE__ */ e(
324
- c,
324
+ f,
325
325
  {
326
- name: n("refIdExtractPattern"),
326
+ name: o("refIdExtractPattern"),
327
327
  label: l("editor.field.refIdExtractPattern"),
328
328
  disabled: t
329
329
  }
330
330
  ),
331
331
  /* @__PURE__ */ e(
332
- c,
332
+ f,
333
333
  {
334
- name: n("refIdExtractSeparator"),
334
+ name: o("refIdExtractSeparator"),
335
335
  label: l("editor.field.refIdExtractSeparator"),
336
336
  helperText: l("editor.field.refIdExtractSeparatorHelp"),
337
337
  disabled: t
338
338
  }
339
339
  ),
340
340
  /* @__PURE__ */ e(
341
- S,
341
+ F,
342
342
  {
343
- name: n("elementBlueprintMap"),
343
+ name: o("elementBlueprintMap"),
344
344
  kind: "map",
345
345
  label: l("editor.field.elementBlueprintMap"),
346
346
  helperText: l("editor.field.elementBlueprintMapHelp"),
@@ -348,9 +348,9 @@ function De({ name: a, disabled: t }) {
348
348
  }
349
349
  ),
350
350
  /* @__PURE__ */ e(
351
- S,
351
+ F,
352
352
  {
353
- name: n("elementRefIdTemplateMap"),
353
+ name: o("elementRefIdTemplateMap"),
354
354
  kind: "map",
355
355
  label: l("editor.field.elementRefIdTemplateMap"),
356
356
  helperText: l("editor.field.elementRefIdTemplateMapHelp"),
@@ -359,155 +359,370 @@ function De({ name: a, disabled: t }) {
359
359
  )
360
360
  ] }) : null,
361
361
  r === "concat" ? /* @__PURE__ */ e(
362
- S,
362
+ F,
363
363
  {
364
- name: n("concatSelectors"),
364
+ name: o("concatSelectors"),
365
365
  label: l("editor.field.concatSelectors"),
366
366
  helperText: l("editor.field.concatSelectorsHelp"),
367
367
  disabled: t
368
368
  }
369
369
  ) : null,
370
370
  r === "text" || r === "concat" || r === "array" ? /* @__PURE__ */ e(
371
- x,
371
+ H,
372
372
  {
373
- name: n("normalizeUnicode"),
373
+ name: o("normalizeUnicode"),
374
374
  label: l("editor.field.normalizeUnicode"),
375
375
  disabled: t
376
376
  }
377
377
  ) : null,
378
- r === "fieldset" || r === "virtualtable" ? /* @__PURE__ */ e(g, { color: "fg.muted", fontSize: "sm", children: l("editor.field.childrenHelp") }) : null
378
+ r === "fieldset" || r === "virtualtable" ? /* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.field.childrenHelp") }) : null
379
379
  ] });
380
380
  }
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),
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),
386
386
  staleTime: Number.POSITIVE_INFINITY
387
387
  });
388
388
  return {
389
- available: !!i,
389
+ available: !!n,
390
390
  release: r.data,
391
391
  isLoading: r.isLoading,
392
392
  isError: r.isError
393
393
  };
394
394
  }
395
- function Be(a) {
395
+ function rt(i) {
396
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);
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);
402
402
  }
403
403
  return l;
404
404
  }
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;
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
408
  return /* @__PURE__ */ e(
409
- W.Item,
409
+ Q.Item,
410
410
  {
411
411
  asChild: !0,
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);
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);
417
417
  },
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,
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
421
  children: /* @__PURE__ */ e(
422
422
  "button",
423
423
  {
424
424
  type: "button",
425
- "aria-label": `${j}, ${re}`,
426
- onClick: () => C(b.path),
427
- children: j
425
+ "aria-label": `${J}, ${oe}`,
426
+ onClick: () => C(T.path),
427
+ children: J
428
428
  }
429
429
  )
430
430
  },
431
- b.path
431
+ T.path
432
432
  );
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
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
439
439
  ] }) }),
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
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
449
449
  ] }),
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(
455
- H,
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,
456
456
  {
457
457
  variant: "outline",
458
458
  colorPalette: "red",
459
459
  size: "sm",
460
- onClick: () => p("fields", Me(u, N), {
460
+ onClick: () => s("fields", Xe(m, S), {
461
461
  shouldDirty: !0
462
462
  }),
463
463
  children: [
464
- /* @__PURE__ */ e(k, { size: 14, "aria-hidden": !0 }),
464
+ /* @__PURE__ */ e(_, { size: 14, "aria-hidden": !0 }),
465
465
  t("editor.field.remove")
466
466
  ]
467
467
  }
468
468
  ) }) : null
469
469
  ] }) }),
470
470
  /* @__PURE__ */ e(
471
- Ae,
471
+ Ye,
472
472
  {
473
- name: N,
474
- disabled: !i
473
+ name: S,
474
+ disabled: !n
475
475
  },
476
- `json:${N}`
476
+ `json:${S}`
477
477
  )
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(
481
- H,
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,
482
482
  {
483
483
  variant: "outline",
484
484
  size: "sm",
485
- onClick: () => p("fields", $e(u, f, I.path).fields, {
485
+ onClick: () => s("fields", Ue(m, u, y.path).fields, {
486
486
  shouldDirty: !0
487
487
  }),
488
488
  children: [
489
- /* @__PURE__ */ e(z, { size: 14, "aria-hidden": !0 }),
489
+ /* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
490
490
  t("editor.field.map")
491
491
  ]
492
492
  }
493
493
  ) }) : null
494
494
  ] }) })
495
- ] }) : /* @__PURE__ */ e(g, { color: "fg.muted", children: t("editor.tree.selectField") })
495
+ ] }) : /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.tree.selectField") })
496
496
  ] }) }) })
497
497
  ] });
498
498
  }
499
- const Ke = [
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 = [
500
715
  ["TITLE_INTENT_UNSPECIFIED", "none"],
501
716
  ["TITLE_INTENT_EXCLUDE", "exclude"],
502
717
  ["TITLE_INTENT_REPLACE", "replace"],
503
718
  ["TITLE_INTENT_ANNOTATE", "annotate"]
504
719
  ];
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,
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,
511
726
  {
512
727
  name: "stub",
513
728
  label: t("editor.stub.label"),
@@ -515,10 +730,10 @@ function je({ notices: a }) {
515
730
  disabled: r
516
731
  }
517
732
  ) }),
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: [
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: [
520
735
  /* @__PURE__ */ e(
521
- c,
736
+ f,
522
737
  {
523
738
  name: "displayNameTemplate",
524
739
  label: t("editor.naming.displayNameTemplate"),
@@ -526,18 +741,18 @@ function je({ notices: a }) {
526
741
  disabled: r
527
742
  }
528
743
  ),
529
- T ? /* @__PURE__ */ e(
530
- A,
744
+ d ? /* @__PURE__ */ e(
745
+ V,
531
746
  {
532
747
  name: "displayNameField",
533
748
  label: t("editor.naming.displayNameField"),
534
749
  helperText: t("editor.naming.displayNameFieldHelp"),
535
750
  placeholder: t("editor.naming.displayNameFieldNone"),
536
- options: T,
751
+ options: d,
537
752
  disabled: r
538
753
  }
539
754
  ) : /* @__PURE__ */ e(
540
- c,
755
+ f,
541
756
  {
542
757
  name: "displayNameField",
543
758
  label: t("editor.naming.displayNameField"),
@@ -547,7 +762,7 @@ function je({ notices: a }) {
547
762
  )
548
763
  ] }),
549
764
  /* @__PURE__ */ e(
550
- S,
765
+ F,
551
766
  {
552
767
  name: "collections",
553
768
  label: t("editor.naming.collections"),
@@ -556,10 +771,10 @@ function je({ notices: a }) {
556
771
  }
557
772
  )
558
773
  ] }) }),
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") }),
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") }),
561
776
  /* @__PURE__ */ e(
562
- c,
777
+ f,
563
778
  {
564
779
  name: "collectionRouting.selector",
565
780
  label: t("editor.routing.selector"),
@@ -567,7 +782,7 @@ function je({ notices: a }) {
567
782
  }
568
783
  ),
569
784
  /* @__PURE__ */ e(
570
- S,
785
+ F,
571
786
  {
572
787
  name: "collectionRouting.collectionMap",
573
788
  kind: "map",
@@ -577,7 +792,7 @@ function je({ notices: a }) {
577
792
  }
578
793
  ),
579
794
  /* @__PURE__ */ e(
580
- c,
795
+ f,
581
796
  {
582
797
  name: "collectionRouting.idPattern",
583
798
  label: t("editor.routing.idPattern"),
@@ -585,7 +800,7 @@ function je({ notices: a }) {
585
800
  }
586
801
  ),
587
802
  /* @__PURE__ */ e(
588
- c,
803
+ f,
589
804
  {
590
805
  name: "collectionRouting.collectionTemplate",
591
806
  label: t("editor.routing.collectionTemplate"),
@@ -594,7 +809,7 @@ function je({ notices: a }) {
594
809
  }
595
810
  ),
596
811
  /* @__PURE__ */ e(
597
- c,
812
+ f,
598
813
  {
599
814
  name: "collectionRouting.suffix",
600
815
  label: t("editor.routing.suffix"),
@@ -602,7 +817,7 @@ function je({ notices: a }) {
602
817
  }
603
818
  ),
604
819
  /* @__PURE__ */ e(
605
- c,
820
+ f,
606
821
  {
607
822
  name: "collectionRouting.fallback",
608
823
  label: t("editor.routing.fallback"),
@@ -610,87 +825,87 @@ function je({ notices: a }) {
610
825
  }
611
826
  )
612
827
  ] }) }),
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,
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,
618
833
  {
619
834
  gap: "4",
620
835
  role: "group",
621
- "aria-label": t("editor.titles.item", { index: d + 1 }),
836
+ "aria-label": t("editor.titles.item", { index: p + 1 }),
622
837
  children: [
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,
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,
628
843
  {
629
- "aria-label": t("editor.titles.remove", { index: d + 1 }),
844
+ "aria-label": t("editor.titles.remove", { index: p + 1 }),
630
845
  variant: "ghost",
631
846
  colorPalette: "red",
632
- onClick: () => h.remove(d),
633
- children: /* @__PURE__ */ e(k, { size: 16 })
847
+ onClick: () => g.remove(p),
848
+ children: /* @__PURE__ */ e(_, { size: 16 })
634
849
  }
635
850
  ) : null
636
851
  ] }),
637
- /* @__PURE__ */ e(_, { name: `titleContributions.${d}` }),
638
- /* @__PURE__ */ e(Ge, { index: d, disabled: r })
852
+ /* @__PURE__ */ e(j, { name: `titleContributions.${p}` }),
853
+ /* @__PURE__ */ e(pt, { index: p, disabled: r })
639
854
  ]
640
855
  },
641
- s.id
856
+ c.id
642
857
  )),
643
- i ? /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o(
644
- H,
858
+ n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
859
+ w,
645
860
  {
646
861
  variant: "outline",
647
862
  size: "sm",
648
- onClick: () => h.append({ selector: "", ausgabeCodeSelector: "" }),
863
+ onClick: () => g.append({ selector: "", ausgabeCodeSelector: "" }),
649
864
  children: [
650
- /* @__PURE__ */ e(z, { size: 14, "aria-hidden": !0 }),
865
+ /* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
651
866
  t("editor.titles.add")
652
867
  ]
653
868
  }
654
869
  ) }) : null
655
870
  ] }) }),
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,
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,
661
876
  {
662
877
  gap: "4",
663
878
  role: "group",
664
- "aria-label": t("editor.assets.item", { index: d + 1 }),
879
+ "aria-label": t("editor.assets.item", { index: p + 1 }),
665
880
  children: [
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,
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,
671
886
  {
672
- "aria-label": t("editor.assets.remove", { index: d + 1 }),
887
+ "aria-label": t("editor.assets.remove", { index: p + 1 }),
673
888
  variant: "ghost",
674
889
  colorPalette: "red",
675
- onClick: () => f.remove(d),
676
- children: /* @__PURE__ */ e(k, { size: 16 })
890
+ onClick: () => u.remove(p),
891
+ children: /* @__PURE__ */ e(_, { size: 16 })
677
892
  }
678
893
  ) : null
679
894
  ] }),
680
- /* @__PURE__ */ e(_, { name: `placeholderAssets.${d}` }),
681
- /* @__PURE__ */ e(We, { index: d, disabled: r })
895
+ /* @__PURE__ */ e(j, { name: `placeholderAssets.${p}` }),
896
+ /* @__PURE__ */ e(mt, { index: p, disabled: r })
682
897
  ]
683
898
  },
684
- s.id
899
+ c.id
685
900
  )),
686
- i ? /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o(
687
- H,
901
+ n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
902
+ w,
688
903
  {
689
904
  variant: "outline",
690
905
  size: "sm",
691
- onClick: () => f.append({ selector: "", assetType: "", keyParts: [] }),
906
+ onClick: () => u.append({ selector: "", assetType: "", keyParts: [] }),
692
907
  children: [
693
- /* @__PURE__ */ e(z, { size: 14, "aria-hidden": !0 }),
908
+ /* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
694
909
  t("editor.assets.add")
695
910
  ]
696
911
  }
@@ -698,11 +913,11 @@ function je({ notices: a }) {
698
913
  ] }) })
699
914
  ] }) });
700
915
  }
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: [
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: [
704
919
  /* @__PURE__ */ e(
705
- c,
920
+ f,
706
921
  {
707
922
  name: `${r}.selector`,
708
923
  label: l("editor.titles.selector"),
@@ -711,58 +926,58 @@ function Ge({ index: a, disabled: t }) {
711
926
  }
712
927
  ),
713
928
  /* @__PURE__ */ e(
714
- c,
929
+ f,
715
930
  {
716
931
  name: `${r}.ausgabeCodeSelector`,
717
932
  label: l("editor.titles.ausgabeCodeSelector"),
718
933
  disabled: t
719
934
  }
720
935
  ),
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: [
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: [
724
939
  /* @__PURE__ */ e(
725
- c,
940
+ f,
726
941
  {
727
- name: `${r}.referenceSpecValues.${u}.field`,
728
- label: l("editor.titles.valueField", { index: u + 1 }),
942
+ name: `${r}.referenceSpecValues.${m}.field`,
943
+ label: l("editor.titles.valueField", { index: m + 1 }),
729
944
  disabled: t
730
945
  }
731
946
  ),
732
947
  /* @__PURE__ */ e(
733
- c,
948
+ f,
734
949
  {
735
- name: `${r}.referenceSpecValues.${u}.selector`,
736
- label: l("editor.titles.valueSelector", { index: u + 1 }),
950
+ name: `${r}.referenceSpecValues.${m}.selector`,
951
+ label: l("editor.titles.valueSelector", { index: m + 1 }),
737
952
  disabled: t
738
953
  }
739
954
  ),
740
955
  t ? /* @__PURE__ */ e("span", {}) : /* @__PURE__ */ e(
741
- D,
956
+ X,
742
957
  {
743
- "aria-label": l("editor.titles.removeValue", { index: u + 1 }),
958
+ "aria-label": l("editor.titles.removeValue", { index: m + 1 }),
744
959
  variant: "ghost",
745
960
  colorPalette: "red",
746
- onClick: () => n.remove(u),
747
- children: /* @__PURE__ */ e(k, { size: 16 })
961
+ onClick: () => o.remove(m),
962
+ children: /* @__PURE__ */ e(_, { size: 16 })
748
963
  }
749
964
  )
750
- ] }, p.id)),
751
- t ? null : /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o(
752
- H,
965
+ ] }, s.id)),
966
+ t ? null : /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
967
+ w,
753
968
  {
754
969
  variant: "outline",
755
970
  size: "sm",
756
- onClick: () => n.append({ field: "", selector: "" }),
971
+ onClick: () => o.append({ field: "", selector: "" }),
757
972
  children: [
758
- /* @__PURE__ */ e(z, { size: 14, "aria-hidden": !0 }),
973
+ /* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
759
974
  l("editor.titles.addValue")
760
975
  ]
761
976
  }
762
977
  ) })
763
978
  ] }),
764
979
  /* @__PURE__ */ e(
765
- c,
980
+ f,
766
981
  {
767
982
  name: `${r}.referenceFilterSelector`,
768
983
  label: l("editor.titles.referenceFilterSelector"),
@@ -770,17 +985,17 @@ function Ge({ index: a, disabled: t }) {
770
985
  }
771
986
  ),
772
987
  /* @__PURE__ */ e(
773
- A,
988
+ V,
774
989
  {
775
990
  name: `${r}.intent`,
776
991
  label: l("editor.titles.intent"),
777
992
  placeholder: l("editor.titles.intents.none"),
778
993
  disabled: t,
779
- options: Ke.map(([p, u]) => ({ id: p, label: l(`editor.titles.intents.${u}`) }))
994
+ options: dt.map(([s, m]) => ({ id: s, label: l(`editor.titles.intents.${m}`) }))
780
995
  }
781
996
  ),
782
997
  /* @__PURE__ */ e(
783
- c,
998
+ f,
784
999
  {
785
1000
  name: `${r}.intentTextSelector`,
786
1001
  label: l("editor.titles.intentTextSelector"),
@@ -790,55 +1005,55 @@ function Ge({ index: a, disabled: t }) {
790
1005
  )
791
1006
  ] });
792
1007
  }
793
- function We({ index: a, disabled: t }) {
794
- const { t: l } = E(F), i = `placeholderAssets.${a}`;
795
- return /* @__PURE__ */ o(m, { gap: "4", children: [
1008
+ function mt({ index: i, disabled: t }) {
1009
+ const { t: l } = E(I), n = `placeholderAssets.${i}`;
1010
+ return /* @__PURE__ */ a(b, { gap: "4", children: [
796
1011
  /* @__PURE__ */ e(
797
- c,
1012
+ f,
798
1013
  {
799
- name: `${i}.selector`,
1014
+ name: `${n}.selector`,
800
1015
  label: l("editor.assets.selector"),
801
1016
  helperText: l("editor.assets.selectorHelp"),
802
1017
  disabled: t
803
1018
  }
804
1019
  ),
805
1020
  /* @__PURE__ */ e(
806
- c,
1021
+ f,
807
1022
  {
808
- name: `${i}.assetType`,
1023
+ name: `${n}.assetType`,
809
1024
  label: l("editor.assets.assetType"),
810
1025
  disabled: t
811
1026
  }
812
1027
  ),
813
1028
  /* @__PURE__ */ e(
814
- S,
1029
+ F,
815
1030
  {
816
- name: `${i}.keyParts`,
1031
+ name: `${n}.keyParts`,
817
1032
  label: l("editor.assets.keyParts"),
818
1033
  helperText: l("editor.assets.keyPartsHelp"),
819
1034
  disabled: t
820
1035
  }
821
1036
  ),
822
1037
  /* @__PURE__ */ e(
823
- c,
1038
+ f,
824
1039
  {
825
- name: `${i}.nameSelector`,
1040
+ name: `${n}.nameSelector`,
826
1041
  label: l("editor.assets.nameSelector"),
827
1042
  disabled: t
828
1043
  }
829
1044
  ),
830
1045
  /* @__PURE__ */ e(
831
- c,
1046
+ f,
832
1047
  {
833
- name: `${i}.descriptionSelector`,
1048
+ name: `${n}.descriptionSelector`,
834
1049
  label: l("editor.assets.descriptionSelector"),
835
1050
  disabled: t
836
1051
  }
837
1052
  ),
838
1053
  /* @__PURE__ */ e(
839
- S,
1054
+ F,
840
1055
  {
841
- name: `${i}.metadata`,
1056
+ name: `${n}.metadata`,
842
1057
  kind: "map",
843
1058
  label: l("editor.assets.metadata"),
844
1059
  helperText: l("editor.assets.metadataHelp"),
@@ -846,17 +1061,17 @@ function We({ index: a, disabled: t }) {
846
1061
  }
847
1062
  ),
848
1063
  /* @__PURE__ */ e(
849
- c,
1064
+ f,
850
1065
  {
851
- name: `${i}.folderRoot`,
1066
+ name: `${n}.folderRoot`,
852
1067
  label: l("editor.assets.folderRoot"),
853
1068
  disabled: t
854
1069
  }
855
1070
  ),
856
1071
  /* @__PURE__ */ e(
857
- c,
1072
+ f,
858
1073
  {
859
- name: `${i}.folderPathSelector`,
1074
+ name: `${n}.folderPathSelector`,
860
1075
  label: l("editor.assets.folderPathSelector"),
861
1076
  helperText: l("editor.assets.folderPathSelectorHelp"),
862
1077
  disabled: t
@@ -864,20 +1079,20 @@ function We({ index: a, disabled: t }) {
864
1079
  )
865
1080
  ] });
866
1081
  }
867
- const ce = {
1082
+ const ge = {
868
1083
  correct: "CHANGED_VERSION_HANDLING_CORRECT",
869
1084
  keep: "CHANGED_VERSION_HANDLING_KEEP",
870
1085
  fail: "CHANGED_VERSION_HANDLING_FAIL"
871
1086
  };
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") }),
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") }),
879
1094
  /* @__PURE__ */ e(
880
- c,
1095
+ f,
881
1096
  {
882
1097
  name: "sourceKey.extractPattern",
883
1098
  label: t("editor.sourceKey.extractPattern"),
@@ -886,7 +1101,7 @@ function Ue({ notices: a }) {
886
1101
  }
887
1102
  ),
888
1103
  /* @__PURE__ */ e(
889
- c,
1104
+ f,
890
1105
  {
891
1106
  name: "sourceKey.extractSeparator",
892
1107
  label: t("editor.sourceKey.extractSeparator"),
@@ -895,7 +1110,7 @@ function Ue({ notices: a }) {
895
1110
  }
896
1111
  ),
897
1112
  /* @__PURE__ */ e(
898
- x,
1113
+ H,
899
1114
  {
900
1115
  name: "sourceKey.normalize",
901
1116
  label: t("editor.sourceKey.normalize"),
@@ -903,10 +1118,10 @@ function Ue({ notices: a }) {
903
1118
  }
904
1119
  )
905
1120
  ] }) }),
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") }),
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") }),
908
1123
  /* @__PURE__ */ e(
909
- x,
1124
+ H,
910
1125
  {
911
1126
  name: "versionMatch.validityPeriod",
912
1127
  label: t("editor.versionMatch.validityPeriod"),
@@ -914,29 +1129,29 @@ function Ue({ notices: a }) {
914
1129
  }
915
1130
  ),
916
1131
  /* @__PURE__ */ e(
917
- pe,
1132
+ be,
918
1133
  {
919
1134
  title: t("editor.versionMatch.releaseSpecFields"),
920
1135
  empty: t("editor.versionMatch.noReleaseSpecFields"),
921
1136
  name: "versionMatch.releaseSpecFields",
922
- options: u.map((s) => ({ value: s.path, label: s.label || s.path })),
1137
+ options: m.map((c) => ({ value: c.path, label: c.label || c.path })),
923
1138
  disabled: r
924
1139
  }
925
1140
  ),
926
1141
  /* @__PURE__ */ e(
927
- pe,
1142
+ be,
928
1143
  {
929
1144
  title: t("editor.versionMatch.contentFields"),
930
1145
  empty: t("editor.versionMatch.noContentFields"),
931
1146
  name: "versionMatch.contentFields",
932
- options: T.map((s) => ({ value: s, label: s })),
1147
+ options: d.map((c) => ({ value: c, label: c })),
933
1148
  disabled: r
934
1149
  }
935
1150
  )
936
1151
  ] }) }),
937
- /* @__PURE__ */ e(y, { title: t("editor.validityPeriod.title"), children: /* @__PURE__ */ o(m, { gap: "4", children: [
1152
+ /* @__PURE__ */ e(v, { title: t("editor.validityPeriod.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
938
1153
  /* @__PURE__ */ e(
939
- c,
1154
+ f,
940
1155
  {
941
1156
  name: "validityPeriod.validFromSelector",
942
1157
  label: t("editor.validityPeriod.validFrom"),
@@ -944,7 +1159,7 @@ function Ue({ notices: a }) {
944
1159
  }
945
1160
  ),
946
1161
  /* @__PURE__ */ e(
947
- c,
1162
+ f,
948
1163
  {
949
1164
  name: "validityPeriod.validToSelector",
950
1165
  label: t("editor.validityPeriod.validTo"),
@@ -953,7 +1168,7 @@ function Ue({ notices: a }) {
953
1168
  }
954
1169
  ),
955
1170
  /* @__PURE__ */ e(
956
- S,
1171
+ F,
957
1172
  {
958
1173
  name: "validityPeriod.dateFormats",
959
1174
  label: t("editor.validityPeriod.dateFormats"),
@@ -962,116 +1177,117 @@ function Ue({ notices: a }) {
962
1177
  }
963
1178
  )
964
1179
  ] }) }),
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,
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,
970
1185
  {
971
- name: `releaseSpec.${d}.field`,
972
- label: t("editor.releaseSpec.field", { index: d + 1 }),
973
- options: f,
1186
+ name: `releaseSpec.${p}.field`,
1187
+ label: t("editor.releaseSpec.field", { index: p + 1 }),
1188
+ options: u,
974
1189
  disabled: r
975
1190
  }
976
1191
  ) : /* @__PURE__ */ e(
977
- c,
1192
+ f,
978
1193
  {
979
- name: `releaseSpec.${d}.field`,
980
- label: t("editor.releaseSpec.field", { index: d + 1 }),
1194
+ name: `releaseSpec.${p}.field`,
1195
+ label: t("editor.releaseSpec.field", { index: p + 1 }),
981
1196
  disabled: r
982
1197
  }
983
1198
  ),
984
1199
  /* @__PURE__ */ e(
985
- c,
1200
+ f,
986
1201
  {
987
- name: `releaseSpec.${d}.selector`,
988
- label: t("editor.releaseSpec.selector", { index: d + 1 }),
1202
+ name: `releaseSpec.${p}.selector`,
1203
+ label: t("editor.releaseSpec.selector", { index: p + 1 }),
989
1204
  disabled: r
990
1205
  }
991
1206
  ),
992
- i ? /* @__PURE__ */ e(
993
- D,
1207
+ n ? /* @__PURE__ */ e(
1208
+ X,
994
1209
  {
995
- "aria-label": t("editor.releaseSpec.remove", { index: d + 1 }),
1210
+ "aria-label": t("editor.releaseSpec.remove", { index: p + 1 }),
996
1211
  variant: "ghost",
997
1212
  colorPalette: "red",
998
- onClick: () => h.remove(d),
999
- children: /* @__PURE__ */ e(k, { size: 16 })
1213
+ onClick: () => g.remove(p),
1214
+ children: /* @__PURE__ */ e(_, { size: 16 })
1000
1215
  }
1001
1216
  ) : /* @__PURE__ */ e("span", {})
1002
- ] }, s.id)),
1003
- i ? /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o(
1004
- H,
1217
+ ] }, c.id)),
1218
+ n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
1219
+ w,
1005
1220
  {
1006
1221
  variant: "outline",
1007
1222
  size: "sm",
1008
- onClick: () => h.append({ field: "", selector: "" }),
1223
+ onClick: () => g.append({ field: "", selector: "" }),
1009
1224
  children: [
1010
- /* @__PURE__ */ e(z, { size: 14, "aria-hidden": !0 }),
1225
+ /* @__PURE__ */ e(D, { size: 14, "aria-hidden": !0 }),
1011
1226
  t("editor.releaseSpec.add")
1012
1227
  ]
1013
1228
  }
1014
1229
  ) }) : null
1015
1230
  ] }) }),
1016
- /* @__PURE__ */ e(y, { title: t("editor.changedVersion.title"), children: /* @__PURE__ */ e(
1017
- he,
1231
+ /* @__PURE__ */ e(v, { title: t("editor.changedVersion.title"), children: /* @__PURE__ */ e(
1232
+ xe,
1018
1233
  {
1019
1234
  name: "changedVersion",
1020
1235
  label: t("editor.changedVersion.label"),
1021
1236
  helperText: t("editor.changedVersion.help"),
1022
1237
  disabled: r,
1023
- children: (s) => /* @__PURE__ */ e(
1024
- Fe,
1238
+ children: (c) => /* @__PURE__ */ e(
1239
+ Ve,
1025
1240
  {
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"],
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"],
1029
1244
  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)) })
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)) })
1031
1246
  }
1032
1247
  )
1033
1248
  }
1034
1249
  ) })
1035
1250
  ] }) });
1036
1251
  }
1037
- function pe({
1038
- title: a,
1252
+ function be({
1253
+ title: i,
1039
1254
  empty: t,
1040
1255
  name: l,
1041
- options: i,
1256
+ options: n,
1042
1257
  disabled: r
1043
1258
  }) {
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(
1048
- Pe,
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,
1049
1264
  {
1050
1265
  name: l,
1051
- value: n.value,
1266
+ value: o.value,
1052
1267
  disabled: r,
1053
- children: n.label
1268
+ children: o.label
1054
1269
  },
1055
- n.value
1270
+ o.value
1056
1271
  )),
1057
- /* @__PURE__ */ e(ge, { name: l })
1272
+ /* @__PURE__ */ e(Ie, { name: l })
1058
1273
  ] });
1059
1274
  }
1060
- function st({ client: a, id: t, onDeleted: l }) {
1061
- const { t: i } = E(F), r = ye(
1275
+ function Nt({ client: i, id: t, onDeleted: l }) {
1276
+ const { t: n } = E(I), r = U(
1062
1277
  () => ({
1063
1278
  tabs: [
1064
- { value: "fields", label: i("editor.tabs.fields") },
1065
- { value: "versions", label: i("editor.tabs.versions") },
1066
- { value: "output", label: i("editor.tabs.output") }
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") }
1067
1283
  ],
1068
- render: (n, p) => n === "fields" ? /* @__PURE__ */ e(we, { notices: p }) : n === "versions" ? /* @__PURE__ */ e(Ue, { notices: p }) : /* @__PURE__ */ e(je, { notices: p })
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 })
1069
1285
  }),
1070
- [i]
1286
+ [n, i]
1071
1287
  );
1072
- return /* @__PURE__ */ e(xe, { client: a, id: t, onDeleted: l, editor: r });
1288
+ return /* @__PURE__ */ e(ze, { client: i, id: t, onDeleted: l, editor: r });
1073
1289
  }
1074
1290
  export {
1075
- st as MappingEditor
1291
+ Nt as MappingEditor
1076
1292
  };
1077
1293
  //# sourceMappingURL=mapping-editor.js.map