@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.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -6
- package/dist/importhub-client-BzOVIXA4.js +46 -0
- package/dist/importhub-client-BzOVIXA4.js.map +1 -0
- package/dist/index.d.ts +446 -5
- package/dist/index.js +1638 -1240
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +157 -1
- package/dist/mapping-editor.js +613 -397
- package/dist/mapping-editor.js.map +1 -1
- package/dist/mapping-page-Bl2rA1SR.js +1090 -0
- package/dist/mapping-page-Bl2rA1SR.js.map +1 -0
- package/dist/testing.d.ts +167 -2
- package/dist/testing.js +695 -477
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/importhub-client-BS6F4DW2.js +0 -31
- package/dist/importhub-client-BS6F4DW2.js.map +0 -1
- package/dist/mapping-page-tIHPNu7C.js +0 -1078
- package/dist/mapping-page-tIHPNu7C.js.map +0 -1
package/dist/mapping-editor.js
CHANGED
|
@@ -1,346 +1,346 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useEffect as ye, useId as He, useMemo as U } from "react";
|
|
3
3
|
import { useTranslation as E } from "react-i18next";
|
|
4
|
-
import { I
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Card as
|
|
7
|
-
import { Stack as
|
|
8
|
-
import { SubNavLayout as
|
|
9
|
-
import { Plus as
|
|
10
|
-
import { useFormContext as
|
|
11
|
-
import { FormField as
|
|
12
|
-
import { X as
|
|
13
|
-
import { useHostIdentity as
|
|
14
|
-
import { useQuery as
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
const { t: l } = E(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
const
|
|
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(
|
|
24
|
+
C = JSON.parse(s);
|
|
25
25
|
} catch {
|
|
26
|
-
|
|
26
|
+
c(l("editor.json.notJson"));
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
if (!C || typeof C != "object" || Array.isArray(C)) {
|
|
30
|
-
|
|
30
|
+
c(l("editor.json.notObject"));
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
c(null), g(!1), r(i, C, { shouldDirty: !0 });
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ e(
|
|
36
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
38
|
+
ve,
|
|
39
39
|
{
|
|
40
40
|
"aria-label": l("editor.json.label"),
|
|
41
|
-
value:
|
|
42
|
-
rows: Math.min(24, Math.max(6,
|
|
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
|
-
|
|
48
|
+
m(C.target.value), g(!0);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
t ? null : /* @__PURE__ */ e(
|
|
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
|
|
58
|
-
const { t: l } = E(
|
|
59
|
-
(
|
|
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(
|
|
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(
|
|
64
|
+
/* @__PURE__ */ e(de.Item, { children: o.message }, s)
|
|
65
65
|
)) }) });
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function Qe(i, t) {
|
|
68
|
+
return i.some((l) => Ee(l.path, t));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const l =
|
|
70
|
+
function Ee(i, t) {
|
|
71
|
+
const l = te(i);
|
|
72
72
|
return l === t || l.startsWith(`${t}.`);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
const { reasons: t } =
|
|
76
|
-
t.map((
|
|
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(
|
|
78
|
+
return /* @__PURE__ */ e(z, { children: [...l].map((n) => /* @__PURE__ */ e(j, { name: n }, n)) });
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
return Array.isArray(
|
|
83
|
-
`) :
|
|
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
|
|
87
|
-
const l =
|
|
88
|
-
`).map((
|
|
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((
|
|
91
|
-
const r =
|
|
92
|
-
return r < 0 ? [
|
|
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
|
|
97
|
-
name:
|
|
96
|
+
function F({
|
|
97
|
+
name: i,
|
|
98
98
|
label: t,
|
|
99
99
|
helperText: l,
|
|
100
|
-
kind:
|
|
100
|
+
kind: n = "list",
|
|
101
101
|
disabled: r
|
|
102
102
|
}) {
|
|
103
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ a(b, { gap: "2", children: [
|
|
104
104
|
/* @__PURE__ */ e(
|
|
105
|
-
|
|
105
|
+
xe,
|
|
106
106
|
{
|
|
107
|
-
name:
|
|
107
|
+
name: i,
|
|
108
108
|
label: t,
|
|
109
109
|
helperText: l,
|
|
110
110
|
disabled: r,
|
|
111
|
-
children: (
|
|
112
|
-
|
|
111
|
+
children: (o) => /* @__PURE__ */ e(
|
|
112
|
+
et,
|
|
113
113
|
{
|
|
114
|
-
value:
|
|
115
|
-
onChange:
|
|
116
|
-
onBlur:
|
|
117
|
-
kind:
|
|
118
|
-
id:
|
|
119
|
-
name:
|
|
120
|
-
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(
|
|
126
|
+
/* @__PURE__ */ e(Ie, { name: i })
|
|
127
127
|
] });
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
value:
|
|
129
|
+
function et({
|
|
130
|
+
value: i,
|
|
131
131
|
onChange: t,
|
|
132
132
|
onBlur: l,
|
|
133
|
-
kind:
|
|
133
|
+
kind: n,
|
|
134
134
|
id: r,
|
|
135
|
-
name:
|
|
136
|
-
describedBy:
|
|
137
|
-
disabled:
|
|
135
|
+
name: o,
|
|
136
|
+
describedBy: s,
|
|
137
|
+
disabled: m
|
|
138
138
|
}) {
|
|
139
|
-
const [
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
(
|
|
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
|
-
}, [
|
|
145
|
-
|
|
144
|
+
}, [i, n]), /* @__PURE__ */ e(
|
|
145
|
+
ve,
|
|
146
146
|
{
|
|
147
147
|
id: r,
|
|
148
|
-
name:
|
|
149
|
-
"aria-describedby":
|
|
150
|
-
value:
|
|
151
|
-
rows: Math.max(2,
|
|
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:
|
|
154
|
+
disabled: m,
|
|
155
155
|
onBlur: l,
|
|
156
|
-
onChange: (
|
|
157
|
-
|
|
156
|
+
onChange: (u) => {
|
|
157
|
+
g(u.target.value), t(ue(u.target.value, n));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
function
|
|
164
|
-
const { t: l } = E(
|
|
165
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
167
|
+
f,
|
|
168
168
|
{
|
|
169
|
-
name:
|
|
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
|
-
|
|
176
|
+
V,
|
|
177
177
|
{
|
|
178
|
-
name:
|
|
178
|
+
name: o("type"),
|
|
179
179
|
label: l("editor.field.type"),
|
|
180
180
|
isClearable: !1,
|
|
181
181
|
disabled: t,
|
|
182
|
-
options:
|
|
182
|
+
options: Ge.map((s) => ({ id: s, label: s }))
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
/* @__PURE__ */ e(
|
|
186
|
-
|
|
186
|
+
H,
|
|
187
187
|
{
|
|
188
|
-
name:
|
|
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__ */
|
|
194
|
+
r === "date" ? /* @__PURE__ */ a(z, { children: [
|
|
195
195
|
/* @__PURE__ */ e(
|
|
196
|
-
|
|
196
|
+
f,
|
|
197
197
|
{
|
|
198
|
-
name:
|
|
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
|
-
|
|
205
|
+
F,
|
|
206
206
|
{
|
|
207
|
-
name:
|
|
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
|
-
|
|
214
|
+
H,
|
|
215
215
|
{
|
|
216
|
-
name:
|
|
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__ */
|
|
222
|
+
r === "number" ? /* @__PURE__ */ a(z, { children: [
|
|
223
223
|
/* @__PURE__ */ e(
|
|
224
|
-
|
|
224
|
+
V,
|
|
225
225
|
{
|
|
226
|
-
name:
|
|
226
|
+
name: o("numberLocale"),
|
|
227
227
|
label: l("editor.field.numberLocale"),
|
|
228
228
|
disabled: t,
|
|
229
|
-
options:
|
|
229
|
+
options: tt.map((s) => ({ id: s, label: l(`editor.field.locale.${s}`) }))
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ e(
|
|
233
|
-
|
|
233
|
+
H,
|
|
234
234
|
{
|
|
235
|
-
name:
|
|
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
|
-
|
|
242
|
+
H,
|
|
243
243
|
{
|
|
244
|
-
name:
|
|
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
|
-
|
|
251
|
+
F,
|
|
252
252
|
{
|
|
253
|
-
name:
|
|
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__ */
|
|
260
|
+
r === "richtext" ? /* @__PURE__ */ a(z, { children: [
|
|
261
261
|
/* @__PURE__ */ e(
|
|
262
|
-
|
|
262
|
+
f,
|
|
263
263
|
{
|
|
264
|
-
name:
|
|
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
|
-
|
|
270
|
+
F,
|
|
271
271
|
{
|
|
272
|
-
name:
|
|
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
|
-
|
|
279
|
+
F,
|
|
280
280
|
{
|
|
281
|
-
name:
|
|
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
|
-
|
|
288
|
+
H,
|
|
289
289
|
{
|
|
290
|
-
name:
|
|
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
|
-
|
|
296
|
+
H,
|
|
297
297
|
{
|
|
298
|
-
name:
|
|
298
|
+
name: o("richTextConfig.convertNewlinesToBreaks"),
|
|
299
299
|
label: l("editor.field.convertNewlinesToBreaks"),
|
|
300
300
|
disabled: t
|
|
301
301
|
}
|
|
302
302
|
),
|
|
303
|
-
/* @__PURE__ */ e(
|
|
303
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.field.richTextMore") })
|
|
304
304
|
] }) : null,
|
|
305
|
-
r === "reference" || r === "toc_reference" ? /* @__PURE__ */
|
|
305
|
+
r === "reference" || r === "toc_reference" ? /* @__PURE__ */ a(z, { children: [
|
|
306
306
|
/* @__PURE__ */ e(
|
|
307
|
-
|
|
307
|
+
f,
|
|
308
308
|
{
|
|
309
|
-
name:
|
|
309
|
+
name: o("refBlueprintId"),
|
|
310
310
|
label: l("editor.field.refBlueprintId"),
|
|
311
311
|
disabled: t
|
|
312
312
|
}
|
|
313
313
|
),
|
|
314
314
|
/* @__PURE__ */ e(
|
|
315
|
-
|
|
315
|
+
f,
|
|
316
316
|
{
|
|
317
|
-
name:
|
|
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
|
-
|
|
324
|
+
f,
|
|
325
325
|
{
|
|
326
|
-
name:
|
|
326
|
+
name: o("refIdExtractPattern"),
|
|
327
327
|
label: l("editor.field.refIdExtractPattern"),
|
|
328
328
|
disabled: t
|
|
329
329
|
}
|
|
330
330
|
),
|
|
331
331
|
/* @__PURE__ */ e(
|
|
332
|
-
|
|
332
|
+
f,
|
|
333
333
|
{
|
|
334
|
-
name:
|
|
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
|
-
|
|
341
|
+
F,
|
|
342
342
|
{
|
|
343
|
-
name:
|
|
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
|
-
|
|
351
|
+
F,
|
|
352
352
|
{
|
|
353
|
-
name:
|
|
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
|
-
|
|
362
|
+
F,
|
|
363
363
|
{
|
|
364
|
-
name:
|
|
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
|
-
|
|
371
|
+
H,
|
|
372
372
|
{
|
|
373
|
-
name:
|
|
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(
|
|
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
|
|
382
|
-
const { blueprints: t } =
|
|
383
|
-
queryKey:
|
|
384
|
-
queryFn: () => i
|
|
385
|
-
enabled: !!(
|
|
381
|
+
function ie(i) {
|
|
382
|
+
const { blueprints: t } = $e(), { workspaceId: l } = Ce(), n = t?.getRelease?.bind(t), r = Fe({
|
|
383
|
+
queryKey: Te.blueprintRelease(l, i),
|
|
384
|
+
queryFn: () => n(i),
|
|
385
|
+
enabled: !!(n && i),
|
|
386
386
|
staleTime: Number.POSITIVE_INFINITY
|
|
387
387
|
});
|
|
388
388
|
return {
|
|
389
|
-
available: !!
|
|
389
|
+
available: !!n,
|
|
390
390
|
release: r.data,
|
|
391
391
|
isLoading: r.isLoading,
|
|
392
392
|
isError: r.isError
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function rt(i) {
|
|
396
396
|
const t = /* @__PURE__ */ new Map(), l = [];
|
|
397
|
-
for (const
|
|
398
|
-
const r =
|
|
399
|
-
t.set(
|
|
400
|
-
const
|
|
401
|
-
|
|
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
|
|
406
|
-
const { t } = E(
|
|
407
|
-
const
|
|
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
|
-
|
|
409
|
+
Q.Item,
|
|
410
410
|
{
|
|
411
411
|
asChild: !0,
|
|
412
|
-
active:
|
|
413
|
-
expanded:
|
|
414
|
-
onExpandedChange: (
|
|
415
|
-
const
|
|
416
|
-
|
|
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:
|
|
419
|
-
indicator: /* @__PURE__ */ e(
|
|
420
|
-
subItems:
|
|
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": `${
|
|
426
|
-
onClick: () => C(
|
|
427
|
-
children:
|
|
425
|
+
"aria-label": `${J}, ${oe}`,
|
|
426
|
+
onClick: () => C(T.path),
|
|
427
|
+
children: J
|
|
428
428
|
}
|
|
429
429
|
)
|
|
430
430
|
},
|
|
431
|
-
|
|
431
|
+
T.path
|
|
432
432
|
);
|
|
433
|
-
},
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */ e(
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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(
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */ e(
|
|
447
|
-
/* @__PURE__ */ e(
|
|
448
|
-
|
|
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
|
-
|
|
451
|
-
|
|
452
|
-
/* @__PURE__ */ e(
|
|
453
|
-
/* @__PURE__ */ e(
|
|
454
|
-
|
|
455
|
-
|
|
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: () =>
|
|
460
|
+
onClick: () => s("fields", Xe(m, S), {
|
|
461
461
|
shouldDirty: !0
|
|
462
462
|
}),
|
|
463
463
|
children: [
|
|
464
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
471
|
+
Ye,
|
|
472
472
|
{
|
|
473
|
-
name:
|
|
474
|
-
disabled: !
|
|
473
|
+
name: S,
|
|
474
|
+
disabled: !n
|
|
475
475
|
},
|
|
476
|
-
`json:${
|
|
476
|
+
`json:${S}`
|
|
477
477
|
)
|
|
478
|
-
] }) : /* @__PURE__ */ e(
|
|
479
|
-
/* @__PURE__ */ e(
|
|
480
|
-
|
|
481
|
-
|
|
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: () =>
|
|
485
|
+
onClick: () => s("fields", Ue(m, u, y.path).fields, {
|
|
486
486
|
shouldDirty: !0
|
|
487
487
|
}),
|
|
488
488
|
children: [
|
|
489
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
495
|
+
] }) : /* @__PURE__ */ e(h, { color: "fg.muted", children: t("editor.tree.selectField") })
|
|
496
496
|
] }) }) })
|
|
497
497
|
] });
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const he = 25;
|
|
500
|
+
function nt({
|
|
501
|
+
client: i,
|
|
502
|
+
notices: t
|
|
503
|
+
}) {
|
|
504
|
+
const { t: l } = E(I), { workspaceId: n } = Ce(), { mapping: r, canConfigure: o } = O(), { getValues: s } = k(), [m, d] = N(null), [g, u] = N(null), [c, p] = N(""), C = He(), L = Fe({
|
|
505
|
+
queryKey: Te.entitySets(n),
|
|
506
|
+
queryFn: () => i.listEntitySets(),
|
|
507
|
+
enabled: o
|
|
508
|
+
}), P = Je({
|
|
509
|
+
mutationFn: async ({ sample: y, content: S }) => ({
|
|
510
|
+
content: S,
|
|
511
|
+
result: await i.runMappingTest({
|
|
512
|
+
content: S,
|
|
513
|
+
sample: new Uint8Array(await y.arrayBuffer()),
|
|
514
|
+
entitySetId: c
|
|
515
|
+
})
|
|
516
|
+
})
|
|
517
|
+
}), K = (y) => {
|
|
518
|
+
const S = y[0];
|
|
519
|
+
if (S) {
|
|
520
|
+
if (!/\.xml$/i.test(S.name) && !/xml/.test(S.type)) {
|
|
521
|
+
u(S.name);
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
u(null), d(S);
|
|
525
|
+
}
|
|
526
|
+
}, A = [
|
|
527
|
+
{ id: "", label: l("editor.test.noEntitySet") },
|
|
528
|
+
...(L.data ?? []).map((y) => ({ id: y.id, label: y.content.name }))
|
|
529
|
+
];
|
|
530
|
+
return /* @__PURE__ */ e(x, { px: "8", py: "6", children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
531
|
+
t,
|
|
532
|
+
/* @__PURE__ */ e($, { status: "info", colorPalette: "info", title: l("editor.test.title"), children: /* @__PURE__ */ a(b, { gap: "1", children: [
|
|
533
|
+
/* @__PURE__ */ e(h, { children: l("editor.test.about") }),
|
|
534
|
+
/* @__PURE__ */ e(h, { children: l("editor.test.aboutDerived") })
|
|
535
|
+
] }) }),
|
|
536
|
+
o ? /* @__PURE__ */ e(v, { title: l("editor.test.sampleCard"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
537
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.sampleHelp") }),
|
|
538
|
+
/* @__PURE__ */ e(
|
|
539
|
+
Ae,
|
|
540
|
+
{
|
|
541
|
+
onFiles: K,
|
|
542
|
+
accept: ".xml,text/xml,application/xml",
|
|
543
|
+
disabled: P.isPending,
|
|
544
|
+
dropHintText: l("editor.test.dropHint"),
|
|
545
|
+
dragActiveText: l("editor.test.dragActive"),
|
|
546
|
+
buttonLabel: l("editor.test.chooseFile")
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
g ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", children: l("editor.test.notXml", { name: g }) }) : null,
|
|
550
|
+
m ? /* @__PURE__ */ a(R, { gap: "2", children: [
|
|
551
|
+
/* @__PURE__ */ e(Be, { size: 16, "aria-hidden": !0 }),
|
|
552
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", children: l("editor.test.chosen") }),
|
|
553
|
+
/* @__PURE__ */ e(h, { fontWeight: "medium", children: m.name })
|
|
554
|
+
] }) : null,
|
|
555
|
+
/* @__PURE__ */ a(b, { gap: "1", children: [
|
|
556
|
+
/* @__PURE__ */ e(h, { id: C, fontWeight: "medium", fontSize: "sm", children: l("editor.test.entitySet") }),
|
|
557
|
+
/* @__PURE__ */ e(
|
|
558
|
+
ke,
|
|
559
|
+
{
|
|
560
|
+
"aria-labelledby": C,
|
|
561
|
+
options: A,
|
|
562
|
+
value: A.find((y) => y.id === c) ?? null,
|
|
563
|
+
onChange: (y) => p(y && !Array.isArray(y) ? y.id : ""),
|
|
564
|
+
isClearable: !1,
|
|
565
|
+
loading: L.isLoading
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.entitySetHelp") })
|
|
569
|
+
] }),
|
|
570
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
571
|
+
w,
|
|
572
|
+
{
|
|
573
|
+
type: "button",
|
|
574
|
+
variant: "outline",
|
|
575
|
+
disabled: !m,
|
|
576
|
+
loading: P.isPending,
|
|
577
|
+
onClick: () => m && P.mutate({
|
|
578
|
+
sample: m,
|
|
579
|
+
// As Save would send it: a blank setting the draft left
|
|
580
|
+
// unset stays unset, so the test reads what a save would
|
|
581
|
+
// store.
|
|
582
|
+
content: we(s(), r.content)
|
|
583
|
+
}),
|
|
584
|
+
children: [
|
|
585
|
+
/* @__PURE__ */ e(Ke, { size: 14, "aria-hidden": !0 }),
|
|
586
|
+
l("editor.test.run")
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
) })
|
|
590
|
+
] }) }) : /* @__PURE__ */ e(h, { color: "fg.muted", children: l("editor.test.adminOnly") }),
|
|
591
|
+
P.isError ? /* @__PURE__ */ e($, { status: "error", colorPalette: "danger", title: l("editor.test.failed"), children: P.error.message }) : null,
|
|
592
|
+
P.data && !P.isPending ? /* @__PURE__ */ e(ot, { result: P.data.result, content: P.data.content }) : null
|
|
593
|
+
] }) });
|
|
594
|
+
}
|
|
595
|
+
function ot({ result: i, content: t }) {
|
|
596
|
+
const { t: l } = E(I), n = U(() => Pe(t.fields ?? []), [t]), [r, o] = N(!1), [s, m] = N(he), d = i.elements.filter((u) => u.problems.length > 0), g = r ? d : i.elements;
|
|
597
|
+
return i.elements.length === 0 ? /* @__PURE__ */ e($, { status: "warning", colorPalette: "warning", children: l("editor.test.noElements") }) : /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
598
|
+
/* @__PURE__ */ a(R, { gap: "4", justify: "space-between", wrap: "wrap", children: [
|
|
599
|
+
/* @__PURE__ */ e(h, { role: "status", children: l("editor.test.summary", {
|
|
600
|
+
count: i.elements.length,
|
|
601
|
+
problems: d.length
|
|
602
|
+
}) }),
|
|
603
|
+
/* @__PURE__ */ e(
|
|
604
|
+
De,
|
|
605
|
+
{
|
|
606
|
+
checked: r,
|
|
607
|
+
onCheckedChange: (u) => o(u.checked === !0),
|
|
608
|
+
children: l("editor.test.onlyProblems")
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
] }),
|
|
612
|
+
g.slice(0, s).map((u) => /* @__PURE__ */ e(st, { element: u, fieldsets: n }, u.position)),
|
|
613
|
+
g.length > s ? /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ a(b, { gap: "2", align: "center", children: [
|
|
614
|
+
/* @__PURE__ */ e(h, { color: "fg.muted", fontSize: "sm", children: l("editor.test.shownOf", { shown: s, total: g.length }) }),
|
|
615
|
+
/* @__PURE__ */ e(w, { type: "button", variant: "outline", onClick: () => m(s + he), children: l("editor.test.showMore") })
|
|
616
|
+
] }) }) : null
|
|
617
|
+
] });
|
|
618
|
+
}
|
|
619
|
+
function Pe(i, t = "") {
|
|
620
|
+
const l = /* @__PURE__ */ new Set();
|
|
621
|
+
for (const n of i) {
|
|
622
|
+
if (n.type !== "fieldset" || typeof n.name != "string") continue;
|
|
623
|
+
const r = t ? `${t}.${n.name}` : n.name;
|
|
624
|
+
l.add(r);
|
|
625
|
+
const o = Array.isArray(n.fields) ? n.fields : [];
|
|
626
|
+
for (const s of Pe(o, r)) l.add(s);
|
|
627
|
+
}
|
|
628
|
+
return l;
|
|
629
|
+
}
|
|
630
|
+
function at(i, t) {
|
|
631
|
+
const l = [], n = (r, o) => {
|
|
632
|
+
for (const [s, m] of Object.entries(r)) {
|
|
633
|
+
const d = o ? `${o}.${s}` : s;
|
|
634
|
+
t.has(d) && m !== null && typeof m == "object" && !Array.isArray(m) ? n(m, d) : l.push({ field: d, value: m, problems: [] });
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
n(i.values, "");
|
|
638
|
+
for (const r of i.problems) {
|
|
639
|
+
if (!r.field) continue;
|
|
640
|
+
const o = l.find((s) => s.field === r.field);
|
|
641
|
+
o ? o.problems.push(r.reason) : l.push({ field: r.field, problems: [r.reason] });
|
|
642
|
+
}
|
|
643
|
+
return l;
|
|
644
|
+
}
|
|
645
|
+
const fe = (i) => i === void 0 ? "" : typeof i == "string" ? i : JSON.stringify(i);
|
|
646
|
+
function st({
|
|
647
|
+
element: i,
|
|
648
|
+
fieldsets: t
|
|
649
|
+
}) {
|
|
650
|
+
const { t: l } = E(I), n = l("editor.test.element", {
|
|
651
|
+
position: i.position,
|
|
652
|
+
sourceKey: i.sourceKey || l("editor.test.noSourceKey")
|
|
653
|
+
}), r = [...new Set(i.problems.filter((d) => !d.field).map((d) => d.reason))], o = U(() => at(i, t), [i, t]), s = U(
|
|
654
|
+
() => [
|
|
655
|
+
{
|
|
656
|
+
id: "field",
|
|
657
|
+
header: l("editor.test.field"),
|
|
658
|
+
size: 200,
|
|
659
|
+
cell: (d) => /* @__PURE__ */ e(Me, { value: d.row.original.field })
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
id: "value",
|
|
663
|
+
header: l("editor.test.value"),
|
|
664
|
+
minSize: 240,
|
|
665
|
+
cell: (d) => /* @__PURE__ */ e(se, { value: fe(d.row.original.value), maxLength: 160 })
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: "problem",
|
|
669
|
+
header: l("editor.test.problem"),
|
|
670
|
+
size: 260,
|
|
671
|
+
cell: (d) => d.row.original.problems.length > 0 ? /* @__PURE__ */ e(se, { value: d.row.original.problems.join("; ") }) : null
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
[l]
|
|
675
|
+
), m = Object.entries(i.releaseSpec);
|
|
676
|
+
return /* @__PURE__ */ e(
|
|
677
|
+
v,
|
|
678
|
+
{
|
|
679
|
+
role: "region",
|
|
680
|
+
"aria-label": n,
|
|
681
|
+
header: /* @__PURE__ */ a(R, { gap: "3", justify: "space-between", wrap: "wrap", children: [
|
|
682
|
+
/* @__PURE__ */ e(h, { fontWeight: "semibold", children: n }),
|
|
683
|
+
i.problems.length > 0 ? /* @__PURE__ */ e(
|
|
684
|
+
Se,
|
|
685
|
+
{
|
|
686
|
+
tone: "danger",
|
|
687
|
+
label: l("editor.test.problemCount", { count: i.problems.length })
|
|
688
|
+
}
|
|
689
|
+
) : null
|
|
690
|
+
] }),
|
|
691
|
+
children: /* @__PURE__ */ a(b, { gap: "3", children: [
|
|
692
|
+
r.map((d) => /* @__PURE__ */ e(
|
|
693
|
+
$,
|
|
694
|
+
{
|
|
695
|
+
status: "error",
|
|
696
|
+
colorPalette: "danger",
|
|
697
|
+
title: l("editor.test.wholeElement"),
|
|
698
|
+
children: d
|
|
699
|
+
},
|
|
700
|
+
d
|
|
701
|
+
)),
|
|
702
|
+
i.firstDay || i.lastDay ? /* @__PURE__ */ e(W, { label: l("editor.test.validityPeriod"), children: l("editor.test.validFromTo", {
|
|
703
|
+
from: i.firstDay || l("editor.test.open"),
|
|
704
|
+
to: i.lastDay || l("editor.test.open")
|
|
705
|
+
}) }) : null,
|
|
706
|
+
i.displayName ? /* @__PURE__ */ e(W, { label: l("editor.test.displayName"), children: i.displayName }) : null,
|
|
707
|
+
i.collections.length > 0 ? /* @__PURE__ */ e(W, { label: l("editor.test.collections"), children: i.collections.join(", ") }) : null,
|
|
708
|
+
m.length > 0 ? /* @__PURE__ */ e(W, { label: l("editor.test.releaseSpec"), children: m.map(([d, g]) => `${d}: ${fe(g)}`).join(", ") }) : null,
|
|
709
|
+
o.length > 0 ? /* @__PURE__ */ e(Re, { columns: s, data: o, getRowId: (d) => d.field }) : null
|
|
710
|
+
] })
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
const dt = [
|
|
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
|
|
506
|
-
const { t } = E(
|
|
507
|
-
return /* @__PURE__ */ e(
|
|
508
|
-
|
|
509
|
-
/* @__PURE__ */ e(
|
|
510
|
-
|
|
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(
|
|
519
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
530
|
-
|
|
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:
|
|
751
|
+
options: d,
|
|
537
752
|
disabled: r
|
|
538
753
|
}
|
|
539
754
|
) : /* @__PURE__ */ e(
|
|
540
|
-
|
|
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
|
-
|
|
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(
|
|
560
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
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:
|
|
836
|
+
"aria-label": t("editor.titles.item", { index: p + 1 }),
|
|
622
837
|
children: [
|
|
623
|
-
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */ e(
|
|
626
|
-
|
|
627
|
-
|
|
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:
|
|
844
|
+
"aria-label": t("editor.titles.remove", { index: p + 1 }),
|
|
630
845
|
variant: "ghost",
|
|
631
846
|
colorPalette: "red",
|
|
632
|
-
onClick: () =>
|
|
633
|
-
children: /* @__PURE__ */ e(
|
|
847
|
+
onClick: () => g.remove(p),
|
|
848
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
634
849
|
}
|
|
635
850
|
) : null
|
|
636
851
|
] }),
|
|
637
|
-
/* @__PURE__ */ e(
|
|
638
|
-
/* @__PURE__ */ e(
|
|
852
|
+
/* @__PURE__ */ e(j, { name: `titleContributions.${p}` }),
|
|
853
|
+
/* @__PURE__ */ e(pt, { index: p, disabled: r })
|
|
639
854
|
]
|
|
640
855
|
},
|
|
641
|
-
|
|
856
|
+
c.id
|
|
642
857
|
)),
|
|
643
|
-
|
|
644
|
-
|
|
858
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
859
|
+
w,
|
|
645
860
|
{
|
|
646
861
|
variant: "outline",
|
|
647
862
|
size: "sm",
|
|
648
|
-
onClick: () =>
|
|
863
|
+
onClick: () => g.append({ selector: "", ausgabeCodeSelector: "" }),
|
|
649
864
|
children: [
|
|
650
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
657
|
-
/* @__PURE__ */ e(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
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:
|
|
879
|
+
"aria-label": t("editor.assets.item", { index: p + 1 }),
|
|
665
880
|
children: [
|
|
666
|
-
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */ e(
|
|
669
|
-
|
|
670
|
-
|
|
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:
|
|
887
|
+
"aria-label": t("editor.assets.remove", { index: p + 1 }),
|
|
673
888
|
variant: "ghost",
|
|
674
889
|
colorPalette: "red",
|
|
675
|
-
onClick: () =>
|
|
676
|
-
children: /* @__PURE__ */ e(
|
|
890
|
+
onClick: () => u.remove(p),
|
|
891
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
677
892
|
}
|
|
678
893
|
) : null
|
|
679
894
|
] }),
|
|
680
|
-
/* @__PURE__ */ e(
|
|
681
|
-
/* @__PURE__ */ e(
|
|
895
|
+
/* @__PURE__ */ e(j, { name: `placeholderAssets.${p}` }),
|
|
896
|
+
/* @__PURE__ */ e(mt, { index: p, disabled: r })
|
|
682
897
|
]
|
|
683
898
|
},
|
|
684
|
-
|
|
899
|
+
c.id
|
|
685
900
|
)),
|
|
686
|
-
|
|
687
|
-
|
|
901
|
+
n ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
|
|
902
|
+
w,
|
|
688
903
|
{
|
|
689
904
|
variant: "outline",
|
|
690
905
|
size: "sm",
|
|
691
|
-
onClick: () =>
|
|
906
|
+
onClick: () => u.append({ selector: "", assetType: "", keyParts: [] }),
|
|
692
907
|
children: [
|
|
693
|
-
/* @__PURE__ */ e(
|
|
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
|
|
702
|
-
const { t: l } = E(
|
|
703
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
|
|
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__ */
|
|
722
|
-
/* @__PURE__ */ e(
|
|
723
|
-
|
|
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
|
-
|
|
940
|
+
f,
|
|
726
941
|
{
|
|
727
|
-
name: `${r}.referenceSpecValues.${
|
|
728
|
-
label: l("editor.titles.valueField", { index:
|
|
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
|
-
|
|
948
|
+
f,
|
|
734
949
|
{
|
|
735
|
-
name: `${r}.referenceSpecValues.${
|
|
736
|
-
label: l("editor.titles.valueSelector", { index:
|
|
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
|
-
|
|
956
|
+
X,
|
|
742
957
|
{
|
|
743
|
-
"aria-label": l("editor.titles.removeValue", { index:
|
|
958
|
+
"aria-label": l("editor.titles.removeValue", { index: m + 1 }),
|
|
744
959
|
variant: "ghost",
|
|
745
960
|
colorPalette: "red",
|
|
746
|
-
onClick: () =>
|
|
747
|
-
children: /* @__PURE__ */ e(
|
|
961
|
+
onClick: () => o.remove(m),
|
|
962
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
748
963
|
}
|
|
749
964
|
)
|
|
750
|
-
] },
|
|
751
|
-
t ? null : /* @__PURE__ */ e(
|
|
752
|
-
|
|
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: () =>
|
|
971
|
+
onClick: () => o.append({ field: "", selector: "" }),
|
|
757
972
|
children: [
|
|
758
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
994
|
+
options: dt.map(([s, m]) => ({ id: s, label: l(`editor.titles.intents.${m}`) }))
|
|
780
995
|
}
|
|
781
996
|
),
|
|
782
997
|
/* @__PURE__ */ e(
|
|
783
|
-
|
|
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
|
|
794
|
-
const { t: l } = E(
|
|
795
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
1012
|
+
f,
|
|
798
1013
|
{
|
|
799
|
-
name: `${
|
|
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
|
-
|
|
1021
|
+
f,
|
|
807
1022
|
{
|
|
808
|
-
name: `${
|
|
1023
|
+
name: `${n}.assetType`,
|
|
809
1024
|
label: l("editor.assets.assetType"),
|
|
810
1025
|
disabled: t
|
|
811
1026
|
}
|
|
812
1027
|
),
|
|
813
1028
|
/* @__PURE__ */ e(
|
|
814
|
-
|
|
1029
|
+
F,
|
|
815
1030
|
{
|
|
816
|
-
name: `${
|
|
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
|
-
|
|
1038
|
+
f,
|
|
824
1039
|
{
|
|
825
|
-
name: `${
|
|
1040
|
+
name: `${n}.nameSelector`,
|
|
826
1041
|
label: l("editor.assets.nameSelector"),
|
|
827
1042
|
disabled: t
|
|
828
1043
|
}
|
|
829
1044
|
),
|
|
830
1045
|
/* @__PURE__ */ e(
|
|
831
|
-
|
|
1046
|
+
f,
|
|
832
1047
|
{
|
|
833
|
-
name: `${
|
|
1048
|
+
name: `${n}.descriptionSelector`,
|
|
834
1049
|
label: l("editor.assets.descriptionSelector"),
|
|
835
1050
|
disabled: t
|
|
836
1051
|
}
|
|
837
1052
|
),
|
|
838
1053
|
/* @__PURE__ */ e(
|
|
839
|
-
|
|
1054
|
+
F,
|
|
840
1055
|
{
|
|
841
|
-
name: `${
|
|
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
|
-
|
|
1064
|
+
f,
|
|
850
1065
|
{
|
|
851
|
-
name: `${
|
|
1066
|
+
name: `${n}.folderRoot`,
|
|
852
1067
|
label: l("editor.assets.folderRoot"),
|
|
853
1068
|
disabled: t
|
|
854
1069
|
}
|
|
855
1070
|
),
|
|
856
1071
|
/* @__PURE__ */ e(
|
|
857
|
-
|
|
1072
|
+
f,
|
|
858
1073
|
{
|
|
859
|
-
name: `${
|
|
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
|
|
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
|
|
873
|
-
const { t } = E(
|
|
874
|
-
return /* @__PURE__ */ e(
|
|
875
|
-
|
|
876
|
-
/* @__PURE__ */ e(
|
|
877
|
-
/* @__PURE__ */ e(
|
|
878
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
907
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
1147
|
+
options: d.map((c) => ({ value: c, label: c })),
|
|
933
1148
|
disabled: r
|
|
934
1149
|
}
|
|
935
1150
|
)
|
|
936
1151
|
] }) }),
|
|
937
|
-
/* @__PURE__ */ e(
|
|
1152
|
+
/* @__PURE__ */ e(v, { title: t("editor.validityPeriod.title"), children: /* @__PURE__ */ a(b, { gap: "4", children: [
|
|
938
1153
|
/* @__PURE__ */ e(
|
|
939
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
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.${
|
|
972
|
-
label: t("editor.releaseSpec.field", { index:
|
|
973
|
-
options:
|
|
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
|
-
|
|
1192
|
+
f,
|
|
978
1193
|
{
|
|
979
|
-
name: `releaseSpec.${
|
|
980
|
-
label: t("editor.releaseSpec.field", { index:
|
|
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
|
-
|
|
1200
|
+
f,
|
|
986
1201
|
{
|
|
987
|
-
name: `releaseSpec.${
|
|
988
|
-
label: t("editor.releaseSpec.selector", { index:
|
|
1202
|
+
name: `releaseSpec.${p}.selector`,
|
|
1203
|
+
label: t("editor.releaseSpec.selector", { index: p + 1 }),
|
|
989
1204
|
disabled: r
|
|
990
1205
|
}
|
|
991
1206
|
),
|
|
992
|
-
|
|
993
|
-
|
|
1207
|
+
n ? /* @__PURE__ */ e(
|
|
1208
|
+
X,
|
|
994
1209
|
{
|
|
995
|
-
"aria-label": t("editor.releaseSpec.remove", { index:
|
|
1210
|
+
"aria-label": t("editor.releaseSpec.remove", { index: p + 1 }),
|
|
996
1211
|
variant: "ghost",
|
|
997
1212
|
colorPalette: "red",
|
|
998
|
-
onClick: () =>
|
|
999
|
-
children: /* @__PURE__ */ e(
|
|
1213
|
+
onClick: () => g.remove(p),
|
|
1214
|
+
children: /* @__PURE__ */ e(_, { size: 16 })
|
|
1000
1215
|
}
|
|
1001
1216
|
) : /* @__PURE__ */ e("span", {})
|
|
1002
|
-
] },
|
|
1003
|
-
|
|
1004
|
-
|
|
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: () =>
|
|
1223
|
+
onClick: () => g.append({ field: "", selector: "" }),
|
|
1009
1224
|
children: [
|
|
1010
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
1017
|
-
|
|
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: (
|
|
1024
|
-
|
|
1238
|
+
children: (c) => /* @__PURE__ */ e(
|
|
1239
|
+
Ve,
|
|
1025
1240
|
{
|
|
1026
|
-
value: !
|
|
1027
|
-
onValueChange: (
|
|
1028
|
-
"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(
|
|
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
|
|
1038
|
-
title:
|
|
1252
|
+
function be({
|
|
1253
|
+
title: i,
|
|
1039
1254
|
empty: t,
|
|
1040
1255
|
name: l,
|
|
1041
|
-
options:
|
|
1256
|
+
options: n,
|
|
1042
1257
|
disabled: r
|
|
1043
1258
|
}) {
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */ e(
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
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:
|
|
1266
|
+
value: o.value,
|
|
1052
1267
|
disabled: r,
|
|
1053
|
-
children:
|
|
1268
|
+
children: o.label
|
|
1054
1269
|
},
|
|
1055
|
-
|
|
1270
|
+
o.value
|
|
1056
1271
|
)),
|
|
1057
|
-
/* @__PURE__ */ e(
|
|
1272
|
+
/* @__PURE__ */ e(Ie, { name: l })
|
|
1058
1273
|
] });
|
|
1059
1274
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const { t:
|
|
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:
|
|
1065
|
-
{ value: "versions", label:
|
|
1066
|
-
{ value: "output", label:
|
|
1279
|
+
{ value: "fields", label: n("editor.tabs.fields") },
|
|
1280
|
+
{ value: "versions", label: n("editor.tabs.versions") },
|
|
1281
|
+
{ value: "output", label: n("editor.tabs.output") },
|
|
1282
|
+
{ value: "test", label: n("editor.tabs.test") }
|
|
1067
1283
|
],
|
|
1068
|
-
render: (
|
|
1284
|
+
render: (o, s) => o === "fields" ? /* @__PURE__ */ e(it, { notices: s }) : o === "versions" ? /* @__PURE__ */ e(ut, { notices: s }) : o === "test" ? /* @__PURE__ */ e(nt, { client: i, notices: s }) : /* @__PURE__ */ e(ct, { notices: s })
|
|
1069
1285
|
}),
|
|
1070
|
-
[i]
|
|
1286
|
+
[n, i]
|
|
1071
1287
|
);
|
|
1072
|
-
return /* @__PURE__ */ e(
|
|
1288
|
+
return /* @__PURE__ */ e(ze, { client: i, id: t, onDeleted: l, editor: r });
|
|
1073
1289
|
}
|
|
1074
1290
|
export {
|
|
1075
|
-
|
|
1291
|
+
Nt as MappingEditor
|
|
1076
1292
|
};
|
|
1077
1293
|
//# sourceMappingURL=mapping-editor.js.map
|