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