@knkcs/importhub-ui 0.1.0 → 0.2.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 +7 -0
- package/README.md +16 -4
- package/dist/importhub-client-CYqd7Eeq.js +16 -0
- package/dist/importhub-client-CYqd7Eeq.js.map +1 -0
- package/dist/index.d.ts +628 -13
- package/dist/index.js +1718 -97
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +235 -14
- package/dist/testing.js +411 -41
- package/dist/testing.js.map +1 -1
- package/package.json +10 -2
package/dist/index.js
CHANGED
|
@@ -1,134 +1,1755 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
const p = /* @__PURE__ */ e("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvbl9pZBgFIAEoCSKNAQoUQ29uZmlndXJhdGlvblJl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yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [S, Z, p]), x = /* @__PURE__ */ R(F, 0);
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { toJson as Vt, fromJson as Rt, create as Ze } from "@bufbuild/protobuf";
|
|
2
|
+
import { createClient as se, ConnectError as nt, Code as Ee } from "@connectrpc/connect";
|
|
3
|
+
import { createConnectTransport as It } from "@connectrpc/connect-web";
|
|
4
|
+
import { fileDesc as te, messageDesc as ue, serviceDesc as be } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_google_protobuf_timestamp as ge, file_google_protobuf_struct as Ce } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
import { C as it, N as We } from "./importhub-client-CYqd7Eeq.js";
|
|
7
|
+
import { jsx as t, jsxs as b, Fragment as x } from "react/jsx-runtime";
|
|
8
|
+
import { Link as he, Box as F, Spinner as lt, Stack as X, Text as C, Alert as Y, List as Q, HStack as U, Center as Gt, Grid as Zt, Badge as Je, Code as Be, MenuRoot as ft, MenuTrigger as Xt, MenuContent as At, MenuItem as vt } from "@knkcs/anker/primitives";
|
|
9
|
+
import { ExternalLink as Et, Blocks as Wt, Ampersand as Bt, Waypoints as Ct, FileCog as Jt, FileUp as wt, CircleAlert as Nt, Trash2 as ee, Plus as ne, ArrowRightLeft as Yt, ArrowUp as Ft, ArrowDown as Ut, Settings2 as kt } from "lucide-react";
|
|
10
|
+
import { useTranslation as V } from "react-i18next";
|
|
11
|
+
import { createContext as zt, useContext as Kt, useEffect as K, useState as L, useMemo as T, useRef as Mt } from "react";
|
|
12
|
+
import { EmptyState as ot, Button as E, IconButton as pe, StatusBadge as ye } from "@knkcs/anker/atoms";
|
|
13
|
+
import { useHostIdentity as W } from "@knkcs/anker/host";
|
|
14
|
+
import { IndexPageTemplate as ie, DetailPageTemplate as H, usePageRail as we } from "@knkcs/anker/templates";
|
|
15
|
+
import { useQuery as A, useMutation as P, useQueryClient as j, useQueries as xt } from "@tanstack/react-query";
|
|
16
|
+
import { Modal as Se, StatusBadgeCell as Qt, ContextRail as w, Card as z, LinkCell as Ne, CountCell as Lt, TruncatedTextCell as M, DataTable as Ve, CodeCell as Qe, SlugCell as Ht } from "@knkcs/anker/components";
|
|
17
|
+
import { InputField as N, TextareaField as Re, BaseSelectField as me, SwitchField as Le } from "@knkcs/anker/forms";
|
|
18
|
+
import { useForm as O, useFieldArray as Pt, FormProvider as _, useWatch as le, useFormContext as st } from "react-hook-form";
|
|
19
|
+
import { Link as Ye } from "react-router";
|
|
20
|
+
import { zodResolver as Tt } from "@hookform/resolvers/zod";
|
|
21
|
+
import { FieldKitProvider as Dt, SpecForm as He } from "@knkcs/fieldkit/renderer";
|
|
22
|
+
import { specToZodSchema as jt, builtInFieldTypes as Pe } from "@knkcs/fieldkit/schema";
|
|
23
|
+
const Ie = /* @__PURE__ */ te("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvbl9pZBgFIAEoCSKNAQoUQ29uZmlndXJhdGlvblJlbGVhc2USCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSDgoGbnVtYmVyGAMgASgFEhMKC3JlbGVhc2V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nRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [Ce]);
|
|
24
|
+
var ct = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.PREPROCESSOR = 1] = "PREPROCESSOR", e[e.POST_PROCESSOR = 2] = "POST_PROCESSOR", e))(ct || {}), dt = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SOURCE_FILE = 1] = "SOURCE_FILE", e[e.RICH_TEXT_FIELD = 2] = "RICH_TEXT_FIELD", e))(dt || {});
|
|
25
|
+
const ln = /* @__PURE__ */ be(nn, 0), Ue = (e) => ({
|
|
26
|
+
valid: e?.valid ?? !1,
|
|
27
|
+
reasons: (e?.reasons ?? []).map((n) => ({ path: n.path, code: n.code, message: n.message }))
|
|
28
|
+
}), ke = (e) => ({
|
|
29
|
+
draftRevisionId: e?.draftRevisionId ?? "",
|
|
30
|
+
draftDiffersFromRelease: e?.draftDiffersFromRelease ?? !0,
|
|
31
|
+
...e?.latestRelease ? { latestRelease: { id: e.latestRelease.id, number: e.latestRelease.number } } : {}
|
|
32
|
+
}), De = (e) => ({
|
|
33
|
+
processor: e.processor,
|
|
34
|
+
settings: { ...e.settings ?? {} }
|
|
35
|
+
}), je = (e) => ({
|
|
36
|
+
processor: e.processor,
|
|
37
|
+
settings: e.settings
|
|
38
|
+
});
|
|
39
|
+
function ae(e) {
|
|
40
|
+
const n = e.content;
|
|
17
41
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
42
|
+
id: e.id,
|
|
43
|
+
content: {
|
|
44
|
+
name: n?.name ?? "",
|
|
45
|
+
description: n?.description ?? "",
|
|
46
|
+
entitySetId: n?.entitySetId ?? "",
|
|
47
|
+
preprocessors: (n?.preprocessors ?? []).map(De),
|
|
48
|
+
mappingIds: [...n?.mappingIds ?? []],
|
|
49
|
+
postProcessors: (n?.postProcessors ?? []).map(De),
|
|
50
|
+
autoPublish: n?.autoPublish ?? !1,
|
|
51
|
+
deleteSourceFileOnSuccess: n?.deleteSourceFileOnSuccess ?? !1
|
|
20
52
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
// What an Import would meet now, not only what was decided at the save
|
|
54
|
+
// (manage-import-profiles:AC6).
|
|
55
|
+
validity: Ue(e.currentValidity ?? e.validity),
|
|
56
|
+
state: ke(e.state)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const Oe = (e) => Ze($t, {
|
|
60
|
+
...e,
|
|
61
|
+
preprocessors: e.preprocessors.map((n) => Ze(Te, je(n))),
|
|
62
|
+
postProcessors: e.postProcessors.map((n) => Ze(Te, je(n)))
|
|
63
|
+
});
|
|
64
|
+
function re(e) {
|
|
65
|
+
const n = e.content ? Vt(rt, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
|
|
66
|
+
return {
|
|
67
|
+
id: e.id,
|
|
68
|
+
content: {
|
|
69
|
+
...n,
|
|
70
|
+
name: n.name ?? "",
|
|
71
|
+
blueprintId: n.blueprintId ?? "",
|
|
72
|
+
blueprintReleaseId: n.blueprintReleaseId ?? ""
|
|
73
|
+
},
|
|
74
|
+
validity: Ue(e.currentValidity ?? e.validity),
|
|
75
|
+
state: ke(e.state)
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const _e = (e) => Rt(rt, e, { ignoreUnknownFields: !1 });
|
|
79
|
+
function ce(e) {
|
|
80
|
+
return {
|
|
81
|
+
id: e.id,
|
|
82
|
+
content: {
|
|
83
|
+
name: e.content?.name ?? "",
|
|
84
|
+
description: e.content?.description ?? "",
|
|
85
|
+
entities: { ...e.content?.entities ?? {} }
|
|
86
|
+
},
|
|
87
|
+
validity: Ue(e.validity),
|
|
88
|
+
state: ke(e.state)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function on(e) {
|
|
92
|
+
const n = nt.from(e);
|
|
93
|
+
if (n.code === Ee.FailedPrecondition) {
|
|
94
|
+
const [l] = n.findDetails(Ot);
|
|
95
|
+
if (l)
|
|
96
|
+
throw new it(
|
|
97
|
+
l.importProfiles.map((i) => ({ id: i.id, name: i.name })),
|
|
98
|
+
n.rawMessage
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
throw n.code === Ee.AlreadyExists ? new We(n.rawMessage) : n;
|
|
102
|
+
}
|
|
103
|
+
async function f(e) {
|
|
104
|
+
try {
|
|
105
|
+
return await e();
|
|
106
|
+
} catch (n) {
|
|
107
|
+
on(n);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function vi(e) {
|
|
111
|
+
const n = e.transport ?? It({ baseUrl: e.baseUrl, fetch: e.fetch }), l = se(en, n), i = se(ln, n), a = se(tn, n), s = se(qt, n);
|
|
112
|
+
return {
|
|
113
|
+
listImportProfiles: () => f(async () => (await l.listImportProfiles({})).importProfiles.map(ae)),
|
|
114
|
+
getImportProfile: (o) => f(
|
|
115
|
+
async () => ae(k((await l.getImportProfile({ id: o })).importProfile))
|
|
116
|
+
),
|
|
117
|
+
createImportProfile: (o) => f(
|
|
118
|
+
async () => ae(
|
|
119
|
+
k(
|
|
120
|
+
(await l.createImportProfile({ content: Oe(o) })).importProfile
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
),
|
|
124
|
+
updateImportProfile: (o, c, p) => f(
|
|
125
|
+
async () => ae(
|
|
126
|
+
k(
|
|
127
|
+
(await l.updateImportProfile({
|
|
128
|
+
id: o,
|
|
129
|
+
content: Oe(c),
|
|
130
|
+
draftRevisionId: p
|
|
131
|
+
})).importProfile
|
|
132
|
+
)
|
|
133
|
+
)
|
|
134
|
+
),
|
|
135
|
+
deleteImportProfile: (o) => f(async () => {
|
|
136
|
+
await l.deleteImportProfile({ id: o });
|
|
137
|
+
}),
|
|
138
|
+
listProcessors: () => f(
|
|
139
|
+
async () => (await i.listProcessors({})).processors.map((o) => ({
|
|
140
|
+
name: o.name,
|
|
141
|
+
kind: o.kind === ct.POST_PROCESSOR ? "post_processor" : "preprocessor",
|
|
142
|
+
target: o.target === dt.RICH_TEXT_FIELD ? "rich_text_field" : "source_file",
|
|
143
|
+
description: o.description,
|
|
144
|
+
settingsSpec: o.settingsSpec
|
|
145
|
+
}))
|
|
146
|
+
),
|
|
147
|
+
listMappings: () => f(async () => (await a.listMappings({})).mappings.map(re)),
|
|
148
|
+
getMapping: (o) => f(async () => re(k((await a.getMapping({ id: o })).mapping))),
|
|
149
|
+
createMapping: (o) => f(
|
|
150
|
+
async () => re(
|
|
151
|
+
k(
|
|
152
|
+
(await a.createMapping({ content: _e(o) })).mapping
|
|
153
|
+
)
|
|
154
|
+
)
|
|
155
|
+
),
|
|
156
|
+
updateMapping: (o, c, p) => f(
|
|
157
|
+
async () => re(
|
|
158
|
+
k(
|
|
159
|
+
(await a.updateMapping({
|
|
160
|
+
id: o,
|
|
161
|
+
content: _e(c),
|
|
162
|
+
draftRevisionId: p
|
|
163
|
+
})).mapping
|
|
164
|
+
)
|
|
165
|
+
)
|
|
166
|
+
),
|
|
167
|
+
deleteMapping: (o) => f(async () => {
|
|
168
|
+
await a.deleteMapping({ id: o });
|
|
169
|
+
}),
|
|
170
|
+
listMappingImportProfiles: (o) => f(
|
|
171
|
+
async () => (await a.listMappingImportProfiles({ id: o })).importProfiles.map((c) => ({
|
|
172
|
+
id: c.id,
|
|
173
|
+
name: c.name
|
|
174
|
+
}))
|
|
175
|
+
),
|
|
176
|
+
checkMappingBlueprintRelease: (o, c) => f(async () => {
|
|
177
|
+
const p = await a.checkMappingBlueprintRelease({ id: o, blueprintReleaseId: c });
|
|
178
|
+
return {
|
|
179
|
+
blueprintId: p.blueprintId,
|
|
180
|
+
missingFieldPaths: [...p.missingFieldPaths],
|
|
181
|
+
missingReleaseSpecFields: [...p.missingReleaseSpecFields]
|
|
182
|
+
};
|
|
183
|
+
}),
|
|
184
|
+
listEntitySets: () => f(async () => (await s.listEntitySets({})).entitySets.map(ce)),
|
|
185
|
+
getEntitySet: (o) => f(
|
|
186
|
+
async () => ce(k((await s.getEntitySet({ id: o })).entitySet))
|
|
187
|
+
),
|
|
188
|
+
createEntitySet: (o) => f(
|
|
189
|
+
async () => ce(k((await s.createEntitySet({ content: o })).entitySet))
|
|
190
|
+
),
|
|
191
|
+
updateEntitySet: (o, c, p) => f(
|
|
192
|
+
async () => ce(
|
|
193
|
+
k(
|
|
194
|
+
(await s.updateEntitySet({ id: o, content: c, draftRevisionId: p })).entitySet
|
|
195
|
+
)
|
|
196
|
+
)
|
|
197
|
+
),
|
|
198
|
+
deleteEntitySet: (o) => f(async () => {
|
|
199
|
+
await s.deleteEntitySet({ id: o });
|
|
200
|
+
})
|
|
24
201
|
};
|
|
25
202
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
203
|
+
function k(e) {
|
|
204
|
+
if (e === void 0)
|
|
205
|
+
throw new nt("importhub answered without a message", Ee.Internal);
|
|
206
|
+
return e;
|
|
207
|
+
}
|
|
208
|
+
const sn = { imports: { title: "Importe", empty: "In diesem Workspace gibt es noch keine Importe." }, profiles: { title: "Importprofile", summary_zero: "In diesem Workspace gibt es noch keine Importprofile.", summary_one: "In diesem Workspace gibt es ein Importprofil.", summary_other: "In diesem Workspace gibt es {{count}} Importprofile." }, mappings: { title: "Mappings", empty: "In diesem Workspace gibt es noch keine Mappings." }, entitySets: { title: "Entity Sets", summary_zero: "In diesem Workspace gibt es noch keine Entity Sets.", summary_one: "In diesem Workspace gibt es ein Entity Set.", summary_other: "In diesem Workspace gibt es {{count}} Entity Sets." }, processors: { title: "Prozessoren", summary_zero: "importhub bietet keine Prozessoren an.", summary_one: "importhub bietet einen Prozessor an.", summary_other: "importhub bietet {{count}} Prozessoren an." } }, an = { loading: "Wird geladen…", error: "Das konnte nicht geladen werden. Versuchen Sie es gleich noch einmal." }, rn = { open: "Change Set in contenthub öffnen" }, cn = { cancel: "Abbrechen", delete: "Löschen", create: "Anlegen", save: "Speichern", apply: "Übernehmen", close: "Schließen" }, dn = { name: "Name", description: "Beschreibung" }, pn = { column: "Gültigkeit", valid: "Gültig", invalid: "Ungültig", invalidTitle: "Diese Konfiguration ist ungültig und kann nicht freigegeben werden:" }, mn = { column: "Letztes Release", number: "Release {{number}}", none: "Noch kein Release" }, un = { nameTaken: "Dieser Name ist schon vergeben.", nameRequired: "Ein Name ist erforderlich.", failed: "Es konnte nicht angelegt werden. Versuchen Sie es gleich noch einmal." }, bn = { failed: "Die Änderungen konnten nicht gespeichert werden." }, gn = { title: "Details", actions: "Aktionen" }, hn = { moveUp: "{{name}} nach oben", moveDown: "{{name}} nach unten", remove: "{{name}} entfernen" }, yn = { new: "Neues Importprofil", empty: "In diesem Workspace gibt es noch keine Importprofile.", general: "Allgemein", entitySet: "Entity Set", entitySetHelp: "Die externen Zeichen-Entities, mit denen die Quelldatei gelesen wird.", noEntitySet: "Keines", autoPublish: "Automatisch veröffentlichen", autoPublishHelp: "Das Change Set eines Imports ohne Item Problems veröffentlichen.", deleteOnSuccess: "Quelldatei nach Erfolg löschen", deleteOnSuccessHelp: "Die Quelldatei löschen, sobald ein Import ohne Item Problems erfolgreich ist, statt nach der Aufbewahrungsfrist.", preprocessors: "Präprozessoren", mappings: "Mappings", postProcessors: "Postprozessoren", noPreprocessors: "Keine Präprozessoren: Die Quelldatei wird gemappt, wie sie ist.", noPostProcessors: "Keine Postprozessoren.", noMappings: "Es enthält noch kein Mapping.", addPreprocessor: "Präprozessor hinzufügen", addPostProcessor: "Postprozessor hinzufügen", addMapping: "Mapping hinzufügen", missingMapping: "Ein Mapping, das es nicht mehr gibt", delete: "Importprofil löschen", deleteTitle: "{{name}} löschen?", deleteMessage: "Das Importprofil wird gelöscht, und kein Import kann es mehr ausführen. Importe, die es ausgeführt hat, bleiben erhalten." }, Sn = { empty: "importhub bietet keine Prozessoren an.", kindColumn: "Art", targetColumn: "Konfiguriert in", settingsColumn: "Einstellungen", noSettings: "Keine Einstellungen", kind: { preprocessor: "Präprozessor", post_processor: "Postprozessor" }, target: { source_file: "Importprofil", rich_text_field: "Rich-Text-Feld eines Mappings" }, unknown: "Nicht im Katalog", settingsOf: "Einstellungen von {{name}}", configure: "{{name}} konfigurieren", viewSettings: "Einstellungen von {{name}}", settingsCount_zero: "Keine Einstellungen gesetzt", settingsCount_one: "Eine Einstellung", settingsCount_other: "{{count}} Einstellungen" }, Vn = { new: "Neues Mapping", empty: "In diesem Workspace gibt es noch keine Mappings.", general: "Allgemein", blueprint: "Ziel-Blueprint", release: "Blueprint-Release", blueprintId: "Blueprint-ID", releaseId: "Blueprint-Release-ID", idsHelp: "Wie blueprinthub sie nennt.", newRelease: "Neues Blueprint-Release", newReleaseId: "Neue Blueprint-Release-ID", elementSelector: "Element-Selektor", elementSelectorHelp: "Der XPath, der die Elemente wählt, aus denen je ein Content wird.", sourceKeySelector: "Source-Key-Selektor", sourceKeyTemplate: "Source-Key-Vorlage", sourceKeyTemplateHelp: "XPath-Ausdrücke in geschweiften Klammern, etwa {ancestor::gesetz/@refid}-{@nr}; hat Vorrang vor dem Selektor.", fieldCount_zero: "Es mappt noch kein Feld. Feld-Mappings werden im Mapping-Editor bearbeitet.", fieldCount_one: "Es mappt ein Feld. Feld-Mappings werden im Mapping-Editor bearbeitet.", fieldCount_other: "Es mappt {{count}} Felder. Feld-Mappings werden im Mapping-Editor bearbeitet.", target: "Ziel", move: "Auf ein anderes Release umstellen", moveTitle: "Auf ein anderes Blueprint-Release umstellen", check: "Prüfen", checkFailed: "Das Release konnte nicht geprüft werden.", nothingLost: "Jeden gemappten Feldpfad gibt es auch in diesem Release.", lost_one: "Ein gemappter Pfad fehlt in diesem Release:", lost_other: "{{count}} gemappte Pfade fehlen in diesem Release:", lostFields: "Feldpfade", lostReleaseSpec: "Release-Spec-Felder", moveConfirm: "Umstellen", includedBy: "Importprofile, die es enthalten", noProfiles: "Kein Importprofil enthält es.", delete: "Mapping löschen", deleteTitle: "{{name}} löschen?", deleteMessage: "Das Mapping wird gelöscht. importhub lehnt das ab, solange ein Importprofil es enthält." }, Rn = { new: "Neues Entity Set", empty: "In diesem Workspace gibt es noch keine Entity Sets.", general: "Allgemein", entities: "Entities", entity: "Entity", noEntities: "Es definiert noch keine Entity.", entityName: "Entity {{index}}", entityText: "Steht für (Entity {{index}})", addEntity: "Entity hinzufügen", removeEntity: "Entity {{index}} entfernen", delete: "Entity Set löschen", deleteTitle: "{{name}} löschen?", deleteMessage: "Das Entity Set wird gelöscht. importhub lehnt das ab, solange ein Importprofil es nennt." }, In = {
|
|
209
|
+
section: sn,
|
|
210
|
+
startPage: an,
|
|
211
|
+
changeSet: rn,
|
|
212
|
+
common: cn,
|
|
213
|
+
fields: dn,
|
|
214
|
+
validity: pn,
|
|
215
|
+
release: mn,
|
|
216
|
+
delete: { inUse: "Es kann nicht gelöscht werden, solange diese Importprofile es verwenden:", failed: "Es konnte nicht gelöscht werden. Versuchen Sie es gleich noch einmal." },
|
|
217
|
+
create: un,
|
|
218
|
+
save: bn,
|
|
219
|
+
rail: gn,
|
|
220
|
+
order: hn,
|
|
221
|
+
profiles: yn,
|
|
222
|
+
processors: Sn,
|
|
223
|
+
mappings: Vn,
|
|
224
|
+
entitySets: Rn
|
|
225
|
+
}, Gn = { imports: { title: "Imports", empty: "No Imports in this workspace yet." }, profiles: { title: "Import Profiles", summary_zero: "No Import Profiles in this workspace yet.", summary_one: "This workspace has one Import Profile.", summary_other: "This workspace has {{count}} Import Profiles." }, mappings: { title: "Mappings", empty: "No Mappings in this workspace yet." }, entitySets: { title: "Entity Sets", summary_zero: "No Entity Sets in this workspace yet.", summary_one: "This workspace has one Entity Set.", summary_other: "This workspace has {{count}} Entity Sets." }, processors: { title: "Processors", summary_zero: "importhub offers no Processors.", summary_one: "importhub offers one Processor.", summary_other: "importhub offers {{count}} Processors." } }, Zn = { loading: "Loading…", error: "This could not be loaded. Try again in a moment." }, fn = { open: "Open the Change Set in contenthub" }, Xn = { cancel: "Cancel", delete: "Delete", create: "Create", save: "Save", apply: "Apply", close: "Close" }, An = { name: "Name", description: "Description" }, vn = { column: "Validity", valid: "Valid", invalid: "Invalid", invalidTitle: "This configuration is invalid and cannot be released:" }, En = { column: "Latest Release", number: "Release {{number}}", none: "No Release yet" }, Wn = { nameTaken: "Another one already has this name.", nameRequired: "A name is required.", failed: "It could not be created. Try again in a moment." }, Bn = { failed: "The changes could not be saved." }, Cn = { title: "Details", actions: "Actions" }, Jn = { moveUp: "Move {{name}} up", moveDown: "Move {{name}} down", remove: "Remove {{name}}" }, wn = { new: "New Import Profile", empty: "No Import Profiles in this workspace yet.", general: "General", entitySet: "Entity Set", entitySetHelp: "The external character entities the Source File is read with.", noEntitySet: "None", autoPublish: "Auto-publish", autoPublishHelp: "Publish the Change Set of an Import that succeeds without Item Problems.", deleteOnSuccess: "Delete the Source File on success", deleteOnSuccessHelp: "Delete the Source File as soon as an Import succeeds without Item Problems, instead of after the retention period.", preprocessors: "Preprocessors", mappings: "Mappings", postProcessors: "Post-processors", noPreprocessors: "No Preprocessors: the Source File is mapped as it is.", noPostProcessors: "No Post-processors.", noMappings: "It includes no Mapping yet.", addPreprocessor: "Add Preprocessor", addPostProcessor: "Add Post-processor", addMapping: "Add Mapping", missingMapping: "A Mapping that no longer exists", delete: "Delete Import Profile", deleteTitle: "Delete {{name}}?", deleteMessage: "The Import Profile is deleted, and no Import can run it any more. Imports it ran keep their record." }, Nn = { empty: "importhub offers no Processors.", kindColumn: "Kind", targetColumn: "Configured on", settingsColumn: "Settings", noSettings: "No settings", kind: { preprocessor: "Preprocessor", post_processor: "Post-processor" }, target: { source_file: "Import Profile", rich_text_field: "Rich-text field of a Mapping" }, unknown: "Not in the catalogue", settingsOf: "Settings of {{name}}", configure: "Configure {{name}}", viewSettings: "Settings of {{name}}", settingsCount_zero: "No settings set", settingsCount_one: "One setting", settingsCount_other: "{{count}} settings" }, Yn = { new: "New Mapping", empty: "No Mappings in this workspace yet.", general: "General", blueprint: "Target Blueprint", release: "Blueprint Release", blueprintId: "Blueprint ID", releaseId: "Blueprint Release ID", idsHelp: "As blueprinthub names them.", newRelease: "New Blueprint Release", newReleaseId: "New Blueprint Release ID", elementSelector: "Element selector", elementSelectorHelp: "The XPath selecting the elements that each become one Content.", sourceKeySelector: "Source Key selector", sourceKeyTemplate: "Source Key template", sourceKeyTemplateHelp: "XPath expressions in braces, such as {ancestor::gesetz/@refid}-{@nr}; wins over the selector.", fieldCount_zero: "It maps no field yet. Field mappings are edited in the Mapping editor.", fieldCount_one: "It maps one field. Field mappings are edited in the Mapping editor.", fieldCount_other: "It maps {{count}} fields. Field mappings are edited in the Mapping editor.", target: "Target", move: "Move to another Release", moveTitle: "Move to another Blueprint Release", check: "Check", checkFailed: "The Release could not be checked.", nothingLost: "Every mapped field path exists in this Release.", lost_one: "One mapped path does not exist in this Release:", lost_other: "{{count}} mapped paths do not exist in this Release:", lostFields: "Field paths", lostReleaseSpec: "Release Spec fields", moveConfirm: "Move", includedBy: "Import Profiles that include it", noProfiles: "No Import Profile includes it.", delete: "Delete Mapping", deleteTitle: "Delete {{name}}?", deleteMessage: "The Mapping is deleted. importhub refuses while an Import Profile includes it." }, Fn = { new: "New Entity Set", empty: "No Entity Sets in this workspace yet.", general: "General", entities: "Entities", entity: "Entity", noEntities: "It defines no entity yet.", entityName: "Entity {{index}}", entityText: "Stands for (entity {{index}})", addEntity: "Add entity", removeEntity: "Remove entity {{index}}", delete: "Delete Entity Set", deleteTitle: "Delete {{name}}?", deleteMessage: "The Entity Set is deleted. importhub refuses while an Import Profile names it." }, Un = {
|
|
226
|
+
section: Gn,
|
|
227
|
+
startPage: Zn,
|
|
228
|
+
changeSet: fn,
|
|
229
|
+
common: Xn,
|
|
230
|
+
fields: An,
|
|
231
|
+
validity: vn,
|
|
232
|
+
release: En,
|
|
233
|
+
delete: { inUse: "It cannot be deleted while these Import Profiles use it:", failed: "It could not be deleted. Try again in a moment." },
|
|
234
|
+
create: Wn,
|
|
235
|
+
save: Bn,
|
|
236
|
+
rail: Cn,
|
|
237
|
+
order: Jn,
|
|
238
|
+
profiles: wn,
|
|
239
|
+
processors: Nn,
|
|
240
|
+
mappings: Yn,
|
|
241
|
+
entitySets: Fn
|
|
242
|
+
}, S = "importhub-ui", Ei = {
|
|
243
|
+
en: { [S]: Un },
|
|
244
|
+
de: { [S]: In }
|
|
245
|
+
}, Wi = [
|
|
38
246
|
"imports",
|
|
39
247
|
"profiles",
|
|
40
248
|
"mappings",
|
|
41
|
-
"entitySets"
|
|
42
|
-
|
|
249
|
+
"entitySets",
|
|
250
|
+
"processors"
|
|
251
|
+
];
|
|
252
|
+
function q(e, n, l) {
|
|
253
|
+
return `${e[n].replace(/\/$/, "")}/${encodeURIComponent(l)}`;
|
|
254
|
+
}
|
|
255
|
+
const kn = {
|
|
43
256
|
imports: "/imports",
|
|
44
257
|
profiles: "/settings/import-profiles",
|
|
45
258
|
mappings: "/settings/mappings",
|
|
46
|
-
entitySets: "/settings/entity-sets"
|
|
47
|
-
|
|
48
|
-
|
|
259
|
+
entitySets: "/settings/entity-sets",
|
|
260
|
+
processors: "/settings/processors"
|
|
261
|
+
}, zn = {
|
|
262
|
+
paths: kn,
|
|
49
263
|
changeSetHref: () => null
|
|
50
|
-
},
|
|
51
|
-
function
|
|
52
|
-
return /* @__PURE__ */ t(
|
|
53
|
-
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
function
|
|
58
|
-
const { t:
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */ t(
|
|
264
|
+
}, pt = zt(zn);
|
|
265
|
+
function Bi({ host: e, children: n }) {
|
|
266
|
+
return /* @__PURE__ */ t(pt.Provider, { value: e, children: n });
|
|
267
|
+
}
|
|
268
|
+
function J() {
|
|
269
|
+
return Kt(pt);
|
|
270
|
+
}
|
|
271
|
+
function Ci({ changeSetId: e }) {
|
|
272
|
+
const { t: n } = V(S), l = J().changeSetHref(e);
|
|
273
|
+
return l ? /* @__PURE__ */ b(he, { href: l, target: "_blank", rel: "noopener noreferrer", children: [
|
|
274
|
+
n("changeSet.open"),
|
|
275
|
+
/* @__PURE__ */ t(Et, { size: 14, "aria-hidden": !0 })
|
|
62
276
|
] }) : null;
|
|
63
277
|
}
|
|
64
|
-
const
|
|
65
|
-
all: (
|
|
66
|
-
importProfiles: (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
entitySets:
|
|
278
|
+
const h = {
|
|
279
|
+
all: (e) => ["importhub", e],
|
|
280
|
+
importProfiles: (e) => [...h.all(e), "importProfiles"],
|
|
281
|
+
importProfile: (e, n) => [...h.importProfiles(e), n],
|
|
282
|
+
processors: (e) => [...h.all(e), "processors"],
|
|
283
|
+
mappings: (e) => [...h.all(e), "mappings"],
|
|
284
|
+
mapping: (e, n) => [...h.mappings(e), n],
|
|
285
|
+
mappingImportProfiles: (e, n) => [...h.mapping(e, n), "importProfiles"],
|
|
286
|
+
entitySets: (e) => [...h.all(e), "entitySets"],
|
|
287
|
+
entitySet: (e, n) => [...h.entitySets(e), n],
|
|
288
|
+
blueprints: (e) => [...h.all(e), "blueprints"],
|
|
289
|
+
blueprintReleases: (e, n) => [...h.blueprints(e), n, "releases"]
|
|
290
|
+
}, Kn = {
|
|
291
|
+
imports: wt,
|
|
292
|
+
profiles: Jt,
|
|
293
|
+
mappings: Ct,
|
|
294
|
+
entitySets: Bt,
|
|
295
|
+
processors: Wt
|
|
73
296
|
};
|
|
74
|
-
function
|
|
75
|
-
const { t:
|
|
76
|
-
return /* @__PURE__ */ t(
|
|
77
|
-
|
|
297
|
+
function Ji({ client: e, section: n }) {
|
|
298
|
+
const { t: l } = V(S), i = Kn[n];
|
|
299
|
+
return /* @__PURE__ */ t(ie, { title: l(`section.${n}.title`), children: /* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ t(
|
|
300
|
+
ot,
|
|
78
301
|
{
|
|
79
|
-
icon: /* @__PURE__ */ t(
|
|
80
|
-
header:
|
|
81
|
-
description: /* @__PURE__ */ t(
|
|
302
|
+
icon: /* @__PURE__ */ t(i, { size: 32, "aria-hidden": !0 }),
|
|
303
|
+
header: l(`section.${n}.title`),
|
|
304
|
+
description: /* @__PURE__ */ t(Mn, { client: e, section: n })
|
|
82
305
|
}
|
|
83
306
|
) }) });
|
|
84
307
|
}
|
|
85
|
-
function
|
|
86
|
-
switch (
|
|
308
|
+
function Mn({ client: e, section: n }) {
|
|
309
|
+
switch (n) {
|
|
87
310
|
case "profiles":
|
|
88
311
|
return /* @__PURE__ */ t(
|
|
89
|
-
|
|
312
|
+
fe,
|
|
90
313
|
{
|
|
91
|
-
section:
|
|
92
|
-
queryKey:
|
|
93
|
-
read: () =>
|
|
314
|
+
section: n,
|
|
315
|
+
queryKey: h.importProfiles,
|
|
316
|
+
read: () => e.listImportProfiles()
|
|
94
317
|
}
|
|
95
318
|
);
|
|
96
319
|
case "entitySets":
|
|
97
320
|
return /* @__PURE__ */ t(
|
|
98
|
-
|
|
321
|
+
fe,
|
|
99
322
|
{
|
|
100
|
-
section:
|
|
101
|
-
queryKey:
|
|
102
|
-
read: () =>
|
|
323
|
+
section: n,
|
|
324
|
+
queryKey: h.entitySets,
|
|
325
|
+
read: () => e.listEntitySets()
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
case "processors":
|
|
329
|
+
return /* @__PURE__ */ t(
|
|
330
|
+
fe,
|
|
331
|
+
{
|
|
332
|
+
section: n,
|
|
333
|
+
queryKey: h.processors,
|
|
334
|
+
read: () => e.listProcessors()
|
|
103
335
|
}
|
|
104
336
|
);
|
|
105
337
|
default:
|
|
106
|
-
return /* @__PURE__ */ t(
|
|
338
|
+
return /* @__PURE__ */ t(xn, { section: n });
|
|
107
339
|
}
|
|
108
340
|
}
|
|
109
|
-
function
|
|
110
|
-
const { t:
|
|
111
|
-
return /* @__PURE__ */ t(
|
|
341
|
+
function xn({ section: e }) {
|
|
342
|
+
const { t: n } = V(S);
|
|
343
|
+
return /* @__PURE__ */ t(x, { children: n(`section.${e}.empty`) });
|
|
344
|
+
}
|
|
345
|
+
function fe({
|
|
346
|
+
section: e,
|
|
347
|
+
queryKey: n,
|
|
348
|
+
read: l
|
|
349
|
+
}) {
|
|
350
|
+
const { t: i } = V(S), { workspaceId: a } = W(), s = A({ queryKey: n(a), queryFn: l });
|
|
351
|
+
return s.isPending ? /* @__PURE__ */ t(lt, { size: "sm", "aria-label": i("startPage.loading") }) : s.isError ? /* @__PURE__ */ t(x, { children: i("startPage.error") }) : /* @__PURE__ */ t(x, { children: i(`section.${e}.summary`, { count: s.data.length }) });
|
|
112
352
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
353
|
+
function ze({
|
|
354
|
+
open: e,
|
|
355
|
+
onClose: n,
|
|
356
|
+
title: l,
|
|
357
|
+
message: i,
|
|
358
|
+
onDelete: a,
|
|
359
|
+
onDeleted: s
|
|
117
360
|
}) {
|
|
118
|
-
const { t:
|
|
119
|
-
|
|
361
|
+
const { t: o } = V(S), { paths: c } = J(), p = P({ mutationFn: a, onSuccess: s }), { reset: d } = p;
|
|
362
|
+
K(() => {
|
|
363
|
+
e && d();
|
|
364
|
+
}, [e, d]);
|
|
365
|
+
const m = p.error instanceof it ? p.error : null;
|
|
366
|
+
return /* @__PURE__ */ t(
|
|
367
|
+
Se,
|
|
368
|
+
{
|
|
369
|
+
open: e,
|
|
370
|
+
onClose: n,
|
|
371
|
+
header: l,
|
|
372
|
+
lazyMount: !0,
|
|
373
|
+
unmountOnExit: !0,
|
|
374
|
+
footer: /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
375
|
+
/* @__PURE__ */ t(E, { variant: "outline", onClick: n, children: o("common.cancel") }),
|
|
376
|
+
/* @__PURE__ */ t(
|
|
377
|
+
E,
|
|
378
|
+
{
|
|
379
|
+
variant: "solid",
|
|
380
|
+
colorPalette: "red",
|
|
381
|
+
loading: p.isPending,
|
|
382
|
+
disabled: m !== null,
|
|
383
|
+
onClick: () => p.mutate(),
|
|
384
|
+
children: o("common.delete")
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
] }),
|
|
388
|
+
children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
389
|
+
/* @__PURE__ */ t(C, { children: i }),
|
|
390
|
+
m ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: o("delete.inUse"), children: /* @__PURE__ */ t(Q.Root, { ps: "4", children: m.importProfiles.map((r) => /* @__PURE__ */ t(Q.Item, { children: /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ t(Ye, { to: q(c, "profiles", r.id), children: r.name }) }) }, r.id)) }) }) : p.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: o("delete.failed") }) : null
|
|
391
|
+
] })
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
function Ge() {
|
|
396
|
+
const { t: e } = V(S);
|
|
397
|
+
return /* @__PURE__ */ t(Gt, { py: "12", children: /* @__PURE__ */ t(lt, { "aria-label": e("startPage.loading") }) });
|
|
398
|
+
}
|
|
399
|
+
function D() {
|
|
400
|
+
const { t: e } = V(S);
|
|
401
|
+
return /* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ t(ot, { icon: /* @__PURE__ */ t(Nt, { size: 32, "aria-hidden": !0 }), header: e("startPage.error") }) });
|
|
402
|
+
}
|
|
403
|
+
function $() {
|
|
404
|
+
return J().canConfigure ?? !1;
|
|
405
|
+
}
|
|
406
|
+
function Ke({ validity: e }) {
|
|
407
|
+
const { t: n } = V(S);
|
|
408
|
+
return e.valid ? null : /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: n("validity.invalidTitle"), children: /* @__PURE__ */ t(Q.Root, { ps: "4", children: e.reasons.map((l) => /* @__PURE__ */ t(Q.Item, { children: l.message }, `${l.code}:${l.path}:${l.message}`)) }) });
|
|
409
|
+
}
|
|
410
|
+
const Qn = (e) => ({
|
|
411
|
+
[e("validity.valid")]: "success",
|
|
412
|
+
[e("validity.invalid")]: "danger"
|
|
413
|
+
});
|
|
414
|
+
function Me({ validity: e }) {
|
|
415
|
+
const { t: n } = V(S);
|
|
416
|
+
return /* @__PURE__ */ t(
|
|
417
|
+
Qt,
|
|
418
|
+
{
|
|
419
|
+
value: e.valid ? n("validity.valid") : n("validity.invalid"),
|
|
420
|
+
toneMap: Qn(n),
|
|
421
|
+
detail: e.valid ? null : e.reasons.map((l) => l.message).join(" ")
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
function oe(e, n) {
|
|
426
|
+
return e.latestRelease ? n("release.number", { number: e.latestRelease.number }) : n("release.none");
|
|
427
|
+
}
|
|
428
|
+
const Xe = (e) => ({
|
|
429
|
+
name: e.name,
|
|
430
|
+
description: e.description,
|
|
431
|
+
entities: Object.entries(e.entities).sort(([n], [l]) => n.localeCompare(l)).map(([n, l]) => ({ name: n, text: l }))
|
|
432
|
+
}), Ln = (e) => ({
|
|
433
|
+
name: e.name,
|
|
434
|
+
description: e.description,
|
|
435
|
+
entities: Object.fromEntries(
|
|
436
|
+
e.entities.filter((n) => n.name.trim() !== "").map((n) => [n.name.trim(), n.text])
|
|
437
|
+
)
|
|
438
|
+
});
|
|
439
|
+
function wi({ client: e, id: n, onDeleted: l }) {
|
|
440
|
+
const { t: i } = V(S), { workspaceId: a } = W(), s = A({
|
|
441
|
+
queryKey: h.entitySet(a, n),
|
|
442
|
+
queryFn: () => e.getEntitySet(n)
|
|
443
|
+
});
|
|
444
|
+
return s.isError || !s.data ? /* @__PURE__ */ t(H, { title: i("section.entitySets.title"), children: s.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(Ge, {}) }) : /* @__PURE__ */ t(Hn, { client: e, entitySet: s.data, onDeleted: l });
|
|
445
|
+
}
|
|
446
|
+
function Hn({
|
|
447
|
+
client: e,
|
|
448
|
+
entitySet: n,
|
|
449
|
+
onDeleted: l
|
|
450
|
+
}) {
|
|
451
|
+
const { t: i } = V(S), { workspaceId: a } = W(), { paths: s } = J(), o = $(), c = j(), [p, d] = L(!1), m = O({ defaultValues: Xe(n.content) }), { reset: r, formState: u, control: y } = m, g = Pt({ control: y, name: "entities" });
|
|
452
|
+
K(() => {
|
|
453
|
+
u.isDirty || r(Xe(n.content));
|
|
454
|
+
}, [n, r, u.isDirty]);
|
|
455
|
+
const R = P({
|
|
456
|
+
mutationFn: (Z) => e.updateEntitySet(n.id, Ln(Z), n.state.draftRevisionId),
|
|
457
|
+
onSuccess: (Z) => {
|
|
458
|
+
c.setQueryData(h.entitySet(a, Z.id), Z), r(Xe(Z.content)), c.invalidateQueries({ queryKey: h.entitySets(a) });
|
|
459
|
+
}
|
|
460
|
+
}), G = m.handleSubmit((Z) => R.mutate(Z));
|
|
461
|
+
return we(
|
|
462
|
+
o ? /* @__PURE__ */ b(w, { storageKey: "importhub.entitySet.rail", children: [
|
|
463
|
+
/* @__PURE__ */ t(w.Header, { title: i("rail.title") }),
|
|
464
|
+
/* @__PURE__ */ t(w.Section, { id: "actions", label: i("rail.actions"), children: /* @__PURE__ */ t(
|
|
465
|
+
w.IconButton,
|
|
466
|
+
{
|
|
467
|
+
label: i("entitySets.delete"),
|
|
468
|
+
icon: /* @__PURE__ */ t(ee, { size: 16 }),
|
|
469
|
+
tone: "outline-red",
|
|
470
|
+
onClick: () => d(!0)
|
|
471
|
+
}
|
|
472
|
+
) })
|
|
473
|
+
] }) : null
|
|
474
|
+
), /* @__PURE__ */ b(
|
|
475
|
+
H,
|
|
476
|
+
{
|
|
477
|
+
title: n.content.name,
|
|
478
|
+
breadcrumbs: [{ label: i("section.entitySets.title"), to: s.entitySets }],
|
|
479
|
+
badges: /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
480
|
+
/* @__PURE__ */ t(
|
|
481
|
+
ye,
|
|
482
|
+
{
|
|
483
|
+
tone: n.validity.valid ? "success" : "danger",
|
|
484
|
+
label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
|
|
485
|
+
}
|
|
486
|
+
),
|
|
487
|
+
/* @__PURE__ */ t(Je, { children: oe(n.state, i) })
|
|
488
|
+
] }),
|
|
489
|
+
actions: o ? /* @__PURE__ */ t(
|
|
490
|
+
E,
|
|
491
|
+
{
|
|
492
|
+
variant: "solid",
|
|
493
|
+
disabled: !u.isDirty,
|
|
494
|
+
loading: R.isPending,
|
|
495
|
+
onClick: () => {
|
|
496
|
+
G();
|
|
497
|
+
},
|
|
498
|
+
children: i("common.save")
|
|
499
|
+
}
|
|
500
|
+
) : void 0,
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ t(_, { ...m, children: /* @__PURE__ */ t(
|
|
503
|
+
"form",
|
|
504
|
+
{
|
|
505
|
+
onSubmit: (Z) => {
|
|
506
|
+
Z.preventDefault(), o && G();
|
|
507
|
+
},
|
|
508
|
+
children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
509
|
+
/* @__PURE__ */ t(Ke, { validity: n.validity }),
|
|
510
|
+
R.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: i("save.failed"), children: R.error.message }) : null,
|
|
511
|
+
/* @__PURE__ */ t(z, { title: i("entitySets.general"), children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
512
|
+
/* @__PURE__ */ t(
|
|
513
|
+
N,
|
|
514
|
+
{
|
|
515
|
+
name: "name",
|
|
516
|
+
label: i("fields.name"),
|
|
517
|
+
required: !0,
|
|
518
|
+
disabled: !o
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
/* @__PURE__ */ t(
|
|
522
|
+
Re,
|
|
523
|
+
{
|
|
524
|
+
name: "description",
|
|
525
|
+
label: i("fields.description"),
|
|
526
|
+
disabled: !o
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
] }) }),
|
|
530
|
+
/* @__PURE__ */ t(z, { title: i("entitySets.entities"), children: /* @__PURE__ */ b(X, { gap: "3", children: [
|
|
531
|
+
g.fields.length === 0 ? /* @__PURE__ */ t(C, { color: "fg.muted", children: i("entitySets.noEntities") }) : null,
|
|
532
|
+
g.fields.map((Z, B) => /* @__PURE__ */ b(Zt, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
|
|
533
|
+
/* @__PURE__ */ t(
|
|
534
|
+
N,
|
|
535
|
+
{
|
|
536
|
+
name: `entities.${B}.name`,
|
|
537
|
+
label: i("entitySets.entityName", { index: B + 1 }),
|
|
538
|
+
prepend: "&",
|
|
539
|
+
append: ";",
|
|
540
|
+
disabled: !o
|
|
541
|
+
}
|
|
542
|
+
),
|
|
543
|
+
/* @__PURE__ */ t(
|
|
544
|
+
N,
|
|
545
|
+
{
|
|
546
|
+
name: `entities.${B}.text`,
|
|
547
|
+
label: i("entitySets.entityText", { index: B + 1 }),
|
|
548
|
+
disabled: !o
|
|
549
|
+
}
|
|
550
|
+
),
|
|
551
|
+
o ? /* @__PURE__ */ t(
|
|
552
|
+
pe,
|
|
553
|
+
{
|
|
554
|
+
"aria-label": i("entitySets.removeEntity", { index: B + 1 }),
|
|
555
|
+
variant: "ghost",
|
|
556
|
+
colorPalette: "red",
|
|
557
|
+
onClick: () => g.remove(B),
|
|
558
|
+
children: /* @__PURE__ */ t(ee, { size: 16 })
|
|
559
|
+
}
|
|
560
|
+
) : /* @__PURE__ */ t("span", {})
|
|
561
|
+
] }, Z.id)),
|
|
562
|
+
o ? /* @__PURE__ */ t(F, { children: /* @__PURE__ */ b(
|
|
563
|
+
E,
|
|
564
|
+
{
|
|
565
|
+
variant: "outline",
|
|
566
|
+
size: "sm",
|
|
567
|
+
onClick: () => g.append({ name: "", text: "" }),
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ t(ne, { size: 14, "aria-hidden": !0 }),
|
|
570
|
+
i("entitySets.addEntity")
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
) }) : null
|
|
574
|
+
] }) })
|
|
575
|
+
] })
|
|
576
|
+
}
|
|
577
|
+
) }) }),
|
|
578
|
+
/* @__PURE__ */ t(
|
|
579
|
+
ze,
|
|
580
|
+
{
|
|
581
|
+
open: p,
|
|
582
|
+
onClose: () => d(!1),
|
|
583
|
+
title: i("entitySets.deleteTitle", { name: n.content.name }),
|
|
584
|
+
message: i("entitySets.deleteMessage"),
|
|
585
|
+
onDelete: () => e.deleteEntitySet(n.id),
|
|
586
|
+
onDeleted: () => {
|
|
587
|
+
d(!1), c.removeQueries({
|
|
588
|
+
queryKey: h.entitySet(a, n.id)
|
|
589
|
+
}), c.invalidateQueries({ queryKey: h.entitySets(a) }), l();
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
)
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
function xe({
|
|
598
|
+
open: e,
|
|
599
|
+
onClose: n,
|
|
600
|
+
title: l,
|
|
601
|
+
children: i,
|
|
602
|
+
defaultValues: a,
|
|
603
|
+
onCreate: s,
|
|
604
|
+
onCreated: o
|
|
605
|
+
}) {
|
|
606
|
+
const { t: c } = V(S), p = O({
|
|
607
|
+
defaultValues: { name: "", description: "", ...a }
|
|
608
|
+
}), d = P({ mutationFn: s, onSuccess: o }), { reset: m } = p, { reset: r } = d;
|
|
609
|
+
K(() => {
|
|
610
|
+
e && (m({ name: "", description: "", ...a }), r());
|
|
611
|
+
}, [e, m, r, a]);
|
|
612
|
+
const u = p.handleSubmit((y) => {
|
|
613
|
+
if (!y.name.trim()) {
|
|
614
|
+
p.setError("name", { message: c("create.nameRequired") });
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
d.mutate(y, {
|
|
618
|
+
onError: (g) => {
|
|
619
|
+
g instanceof We && p.setError("name", { message: c("create.nameTaken") });
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
return /* @__PURE__ */ t(
|
|
624
|
+
Se,
|
|
625
|
+
{
|
|
626
|
+
open: e,
|
|
627
|
+
onClose: n,
|
|
628
|
+
header: l,
|
|
629
|
+
lazyMount: !0,
|
|
630
|
+
unmountOnExit: !0,
|
|
631
|
+
saveLabel: c("common.create"),
|
|
632
|
+
cancelLabel: c("common.cancel"),
|
|
633
|
+
onSave: () => {
|
|
634
|
+
u();
|
|
635
|
+
},
|
|
636
|
+
loading: d.isPending,
|
|
637
|
+
children: /* @__PURE__ */ t(_, { ...p, children: /* @__PURE__ */ t(
|
|
638
|
+
"form",
|
|
639
|
+
{
|
|
640
|
+
onSubmit: (y) => {
|
|
641
|
+
y.preventDefault(), u();
|
|
642
|
+
},
|
|
643
|
+
children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
644
|
+
/* @__PURE__ */ t(N, { name: "name", label: c("fields.name"), required: !0 }),
|
|
645
|
+
/* @__PURE__ */ t(Re, { name: "description", label: c("fields.description") }),
|
|
646
|
+
i,
|
|
647
|
+
d.isError && !(d.error instanceof We) ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: c("create.failed") }) : null
|
|
648
|
+
] })
|
|
649
|
+
}
|
|
650
|
+
) })
|
|
651
|
+
}
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
function Ni({ client: e, onOpen: n }) {
|
|
655
|
+
const { t: l } = V(S), { workspaceId: i } = W(), { paths: a } = J(), s = $(), o = j(), [c, p] = L(!1), d = A({
|
|
656
|
+
queryKey: h.entitySets(i),
|
|
657
|
+
queryFn: () => e.listEntitySets()
|
|
658
|
+
}), m = T(
|
|
659
|
+
() => [
|
|
660
|
+
{
|
|
661
|
+
id: "name",
|
|
662
|
+
header: l("fields.name"),
|
|
663
|
+
cell: (r) => /* @__PURE__ */ t(
|
|
664
|
+
Ne,
|
|
665
|
+
{
|
|
666
|
+
to: q(a, "entitySets", r.row.original.id),
|
|
667
|
+
label: r.row.original.content.name
|
|
668
|
+
}
|
|
669
|
+
)
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
id: "entities",
|
|
673
|
+
header: l("entitySets.entities"),
|
|
674
|
+
size: 120,
|
|
675
|
+
cell: (r) => /* @__PURE__ */ t(
|
|
676
|
+
Lt,
|
|
677
|
+
{
|
|
678
|
+
value: r.row.original.content.entities,
|
|
679
|
+
singular: l("entitySets.entity"),
|
|
680
|
+
plural: l("entitySets.entities")
|
|
681
|
+
}
|
|
682
|
+
)
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
id: "validity",
|
|
686
|
+
header: l("validity.column"),
|
|
687
|
+
cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
id: "release",
|
|
691
|
+
header: l("release.column"),
|
|
692
|
+
size: 140,
|
|
693
|
+
cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
[l, a]
|
|
697
|
+
);
|
|
698
|
+
return /* @__PURE__ */ b(
|
|
699
|
+
ie,
|
|
700
|
+
{
|
|
701
|
+
title: l("section.entitySets.title"),
|
|
702
|
+
actions: s ? /* @__PURE__ */ b(E, { variant: "solid", onClick: () => p(!0), children: [
|
|
703
|
+
/* @__PURE__ */ t(ne, { size: 16, "aria-hidden": !0 }),
|
|
704
|
+
l("entitySets.new")
|
|
705
|
+
] }) : void 0,
|
|
706
|
+
children: [
|
|
707
|
+
d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
|
|
708
|
+
Ve,
|
|
709
|
+
{
|
|
710
|
+
columns: m,
|
|
711
|
+
data: d.data ?? [],
|
|
712
|
+
loading: d.isPending,
|
|
713
|
+
getRowId: (r) => r.id,
|
|
714
|
+
emptyState: l("entitySets.empty")
|
|
715
|
+
}
|
|
716
|
+
),
|
|
717
|
+
/* @__PURE__ */ t(
|
|
718
|
+
xe,
|
|
719
|
+
{
|
|
720
|
+
open: c,
|
|
721
|
+
onClose: () => p(!1),
|
|
722
|
+
title: l("entitySets.new"),
|
|
723
|
+
onCreate: async ({ name: r, description: u }) => {
|
|
724
|
+
const y = await e.createEntitySet({ name: r, description: u, entities: {} });
|
|
725
|
+
return await o.invalidateQueries({ queryKey: h.entitySets(i) }), y.id;
|
|
726
|
+
},
|
|
727
|
+
onCreated: (r) => {
|
|
728
|
+
p(!1), n(r);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
)
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
function mt(e) {
|
|
737
|
+
const { blueprints: n } = J(), { workspaceId: l } = W(), i = [...new Set(e.filter(Boolean))].sort(), a = A({
|
|
738
|
+
queryKey: h.blueprints(l),
|
|
739
|
+
queryFn: () => n?.listBlueprints() ?? Promise.resolve([]),
|
|
740
|
+
enabled: n !== void 0
|
|
741
|
+
}), s = xt({
|
|
742
|
+
queries: i.map((d) => ({
|
|
743
|
+
queryKey: h.blueprintReleases(l, d),
|
|
744
|
+
queryFn: () => n?.listReleases(d) ?? Promise.resolve([]),
|
|
745
|
+
enabled: n !== void 0
|
|
746
|
+
}))
|
|
747
|
+
}), o = s.map((d) => d.data), c = s.map((d) => d.dataUpdatedAt).join(), p = i.join();
|
|
748
|
+
return T(
|
|
749
|
+
() => ({
|
|
750
|
+
available: n !== void 0,
|
|
751
|
+
blueprintName: (d) => a.data?.find((m) => m.id === d)?.name,
|
|
752
|
+
releaseLabel: (d, m) => o[i.indexOf(d)]?.find((r) => r.id === m)?.label
|
|
753
|
+
}),
|
|
754
|
+
[n, a.data, c, p]
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
function Pn({
|
|
758
|
+
open: e,
|
|
759
|
+
onClose: n,
|
|
760
|
+
client: l,
|
|
761
|
+
mapping: i,
|
|
762
|
+
onMove: a
|
|
763
|
+
}) {
|
|
764
|
+
const { t: s } = V(S), o = O({ defaultValues: { blueprintReleaseId: null } }), c = le({ control: o.control, name: "blueprintReleaseId" }) ?? "", p = P({
|
|
765
|
+
mutationFn: (R) => l.checkMappingBlueprintRelease(i.id, R)
|
|
766
|
+
}), d = P({ mutationFn: a, onSuccess: n }), { reset: m } = o, { reset: r } = p, { reset: u } = d;
|
|
767
|
+
K(() => {
|
|
768
|
+
e && (m({ blueprintReleaseId: null }), r(), u());
|
|
769
|
+
}, [e, m, r, u]);
|
|
770
|
+
const y = p.variables, g = p.data && y === c ? p.data : null;
|
|
771
|
+
return K(() => {
|
|
772
|
+
y !== void 0 && y !== c && r();
|
|
773
|
+
}, [y, c, r]), /* @__PURE__ */ t(
|
|
774
|
+
Se,
|
|
775
|
+
{
|
|
776
|
+
open: e,
|
|
777
|
+
onClose: n,
|
|
778
|
+
header: s("mappings.moveTitle"),
|
|
779
|
+
lazyMount: !0,
|
|
780
|
+
unmountOnExit: !0,
|
|
781
|
+
footer: /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
782
|
+
/* @__PURE__ */ t(E, { variant: "outline", onClick: n, children: s("common.cancel") }),
|
|
783
|
+
/* @__PURE__ */ t(
|
|
784
|
+
E,
|
|
785
|
+
{
|
|
786
|
+
variant: "outline",
|
|
787
|
+
disabled: !c || c === i.content.blueprintReleaseId,
|
|
788
|
+
loading: p.isPending,
|
|
789
|
+
onClick: () => p.mutate(c),
|
|
790
|
+
children: s("mappings.check")
|
|
791
|
+
}
|
|
792
|
+
),
|
|
793
|
+
/* @__PURE__ */ t(
|
|
794
|
+
E,
|
|
795
|
+
{
|
|
796
|
+
variant: "solid",
|
|
797
|
+
disabled: !g,
|
|
798
|
+
loading: d.isPending,
|
|
799
|
+
onClick: () => d.mutate(c),
|
|
800
|
+
children: s("mappings.moveConfirm")
|
|
801
|
+
}
|
|
802
|
+
)
|
|
803
|
+
] }),
|
|
804
|
+
children: /* @__PURE__ */ t(_, { ...o, children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
805
|
+
/* @__PURE__ */ t(Tn, { mapping: i }),
|
|
806
|
+
p.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: s("mappings.checkFailed"), children: p.error.message }) : null,
|
|
807
|
+
g ? /* @__PURE__ */ t(Dn, { report: g }) : null,
|
|
808
|
+
d.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: s("save.failed"), children: d.error.message }) : null
|
|
809
|
+
] }) })
|
|
810
|
+
}
|
|
811
|
+
);
|
|
812
|
+
}
|
|
813
|
+
function Tn({ mapping: e }) {
|
|
814
|
+
const { t: n } = V(S), { blueprints: l } = J(), { workspaceId: i } = W(), a = A({
|
|
815
|
+
queryKey: h.blueprintReleases(i, e.content.blueprintId),
|
|
816
|
+
queryFn: () => l?.listReleases(e.content.blueprintId) ?? Promise.resolve([]),
|
|
817
|
+
enabled: l !== void 0
|
|
818
|
+
});
|
|
819
|
+
return l ? /* @__PURE__ */ t(
|
|
820
|
+
me,
|
|
821
|
+
{
|
|
822
|
+
name: "blueprintReleaseId",
|
|
823
|
+
label: n("mappings.newRelease"),
|
|
824
|
+
required: !0,
|
|
825
|
+
options: (a.data ?? []).filter((s) => s.id !== e.content.blueprintReleaseId).map((s) => ({ id: s.id, label: s.label }))
|
|
826
|
+
}
|
|
827
|
+
) : /* @__PURE__ */ t(N, { name: "blueprintReleaseId", label: n("mappings.newReleaseId"), required: !0 });
|
|
828
|
+
}
|
|
829
|
+
function Dn({ report: e }) {
|
|
830
|
+
const { t: n } = V(S), l = e.missingFieldPaths.length + e.missingReleaseSpecFields.length;
|
|
831
|
+
return l === 0 ? /* @__PURE__ */ t(Y, { status: "success", colorPalette: "success", title: n("mappings.nothingLost") }) : /* @__PURE__ */ t(Y, { status: "warning", colorPalette: "warning", title: n("mappings.lost", { count: l }), children: /* @__PURE__ */ b(X, { gap: "2", children: [
|
|
832
|
+
e.missingFieldPaths.length > 0 ? /* @__PURE__ */ t(qe, { label: n("mappings.lostFields"), paths: e.missingFieldPaths }) : null,
|
|
833
|
+
e.missingReleaseSpecFields.length > 0 ? /* @__PURE__ */ t(qe, { label: n("mappings.lostReleaseSpec"), paths: e.missingReleaseSpecFields }) : null
|
|
834
|
+
] }) });
|
|
835
|
+
}
|
|
836
|
+
function qe({ label: e, paths: n }) {
|
|
837
|
+
return /* @__PURE__ */ b(X, { gap: "1", children: [
|
|
838
|
+
/* @__PURE__ */ t(C, { fontWeight: "medium", children: e }),
|
|
839
|
+
/* @__PURE__ */ t(Q.Root, { ps: "4", "aria-label": e, children: n.map((l) => /* @__PURE__ */ t(Q.Item, { children: /* @__PURE__ */ t(Be, { children: l }) }, l)) })
|
|
840
|
+
] });
|
|
841
|
+
}
|
|
842
|
+
const Ae = (e) => ({
|
|
843
|
+
name: e.name,
|
|
844
|
+
description: e.description ?? "",
|
|
845
|
+
elementSelector: e.elementSelector ?? "",
|
|
846
|
+
sourceKeySelector: e.sourceKey?.selector ?? "",
|
|
847
|
+
sourceKeyTemplate: e.sourceKey?.template ?? ""
|
|
848
|
+
}), $e = (e, n) => ({
|
|
849
|
+
...e,
|
|
850
|
+
name: n.name,
|
|
851
|
+
description: n.description,
|
|
852
|
+
elementSelector: n.elementSelector,
|
|
853
|
+
sourceKey: { ...e.sourceKey, selector: n.sourceKeySelector, template: n.sourceKeyTemplate }
|
|
854
|
+
});
|
|
855
|
+
function Yi({ client: e, id: n, onDeleted: l }) {
|
|
856
|
+
const { t: i } = V(S), { workspaceId: a } = W(), s = A({
|
|
857
|
+
queryKey: h.mapping(a, n),
|
|
858
|
+
queryFn: () => e.getMapping(n)
|
|
859
|
+
});
|
|
860
|
+
return s.isError || !s.data ? /* @__PURE__ */ t(H, { title: i("section.mappings.title"), children: s.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(Ge, {}) }) : /* @__PURE__ */ t(jn, { client: e, mapping: s.data, onDeleted: l });
|
|
861
|
+
}
|
|
862
|
+
function jn({
|
|
863
|
+
client: e,
|
|
864
|
+
mapping: n,
|
|
865
|
+
onDeleted: l
|
|
866
|
+
}) {
|
|
867
|
+
const { t: i } = V(S), { workspaceId: a } = W(), { paths: s } = J(), o = $(), c = j(), [p, d] = L(!1), [m, r] = L(!1), u = mt([n.content.blueprintId]), y = A({
|
|
868
|
+
queryKey: h.mappingImportProfiles(a, n.id),
|
|
869
|
+
queryFn: () => e.listMappingImportProfiles(n.id)
|
|
870
|
+
}), g = O({ defaultValues: Ae(n.content) }), { reset: R, formState: G } = g;
|
|
871
|
+
K(() => {
|
|
872
|
+
G.isDirty || R(Ae(n.content));
|
|
873
|
+
}, [n, R, G.isDirty]);
|
|
874
|
+
const Z = (v) => {
|
|
875
|
+
c.setQueryData(h.mapping(a, v.id), v), R(Ae(v.content)), c.invalidateQueries({ queryKey: h.mappings(a) }), c.invalidateQueries({ queryKey: h.importProfiles(a) });
|
|
876
|
+
}, B = P({
|
|
877
|
+
mutationFn: (v) => e.updateMapping(n.id, v, n.state.draftRevisionId),
|
|
878
|
+
onSuccess: Z
|
|
879
|
+
}), I = g.handleSubmit((v) => B.mutate($e(n.content, v)));
|
|
880
|
+
we(
|
|
881
|
+
o ? /* @__PURE__ */ b(w, { storageKey: "importhub.mapping.rail", children: [
|
|
882
|
+
/* @__PURE__ */ t(w.Header, { title: i("rail.title") }),
|
|
883
|
+
/* @__PURE__ */ t(w.Section, { id: "actions", label: i("rail.actions"), children: /* @__PURE__ */ t(
|
|
884
|
+
w.IconButton,
|
|
885
|
+
{
|
|
886
|
+
label: i("mappings.delete"),
|
|
887
|
+
icon: /* @__PURE__ */ t(ee, { size: 16 }),
|
|
888
|
+
tone: "outline-red",
|
|
889
|
+
onClick: () => d(!0)
|
|
890
|
+
}
|
|
891
|
+
) })
|
|
892
|
+
] }) : null
|
|
893
|
+
);
|
|
894
|
+
const gt = u.blueprintName(n.content.blueprintId), ht = u.releaseLabel(
|
|
895
|
+
n.content.blueprintId,
|
|
896
|
+
n.content.blueprintReleaseId
|
|
897
|
+
), yt = n.content.fields?.length ?? 0;
|
|
898
|
+
return /* @__PURE__ */ b(
|
|
899
|
+
H,
|
|
900
|
+
{
|
|
901
|
+
title: n.content.name,
|
|
902
|
+
breadcrumbs: [{ label: i("section.mappings.title"), to: s.mappings }],
|
|
903
|
+
badges: /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
904
|
+
/* @__PURE__ */ t(
|
|
905
|
+
ye,
|
|
906
|
+
{
|
|
907
|
+
tone: n.validity.valid ? "success" : "danger",
|
|
908
|
+
label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
|
|
909
|
+
}
|
|
910
|
+
),
|
|
911
|
+
/* @__PURE__ */ t(Je, { children: oe(n.state, i) })
|
|
912
|
+
] }),
|
|
913
|
+
actions: o ? /* @__PURE__ */ t(
|
|
914
|
+
E,
|
|
915
|
+
{
|
|
916
|
+
variant: "solid",
|
|
917
|
+
disabled: !G.isDirty,
|
|
918
|
+
loading: B.isPending,
|
|
919
|
+
onClick: () => {
|
|
920
|
+
I();
|
|
921
|
+
},
|
|
922
|
+
children: i("common.save")
|
|
923
|
+
}
|
|
924
|
+
) : void 0,
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
927
|
+
/* @__PURE__ */ t(Ke, { validity: n.validity }),
|
|
928
|
+
B.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: i("save.failed"), children: B.error.message }) : null,
|
|
929
|
+
/* @__PURE__ */ t(_, { ...g, children: /* @__PURE__ */ t(
|
|
930
|
+
"form",
|
|
931
|
+
{
|
|
932
|
+
onSubmit: (v) => {
|
|
933
|
+
v.preventDefault(), o && I();
|
|
934
|
+
},
|
|
935
|
+
children: /* @__PURE__ */ t(z, { title: i("mappings.general"), children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
936
|
+
/* @__PURE__ */ t(
|
|
937
|
+
N,
|
|
938
|
+
{
|
|
939
|
+
name: "name",
|
|
940
|
+
label: i("fields.name"),
|
|
941
|
+
required: !0,
|
|
942
|
+
disabled: !o
|
|
943
|
+
}
|
|
944
|
+
),
|
|
945
|
+
/* @__PURE__ */ t(
|
|
946
|
+
Re,
|
|
947
|
+
{
|
|
948
|
+
name: "description",
|
|
949
|
+
label: i("fields.description"),
|
|
950
|
+
disabled: !o
|
|
951
|
+
}
|
|
952
|
+
),
|
|
953
|
+
/* @__PURE__ */ t(
|
|
954
|
+
N,
|
|
955
|
+
{
|
|
956
|
+
name: "elementSelector",
|
|
957
|
+
label: i("mappings.elementSelector"),
|
|
958
|
+
helperText: i("mappings.elementSelectorHelp"),
|
|
959
|
+
disabled: !o
|
|
960
|
+
}
|
|
961
|
+
),
|
|
962
|
+
/* @__PURE__ */ t(
|
|
963
|
+
N,
|
|
964
|
+
{
|
|
965
|
+
name: "sourceKeySelector",
|
|
966
|
+
label: i("mappings.sourceKeySelector"),
|
|
967
|
+
disabled: !o
|
|
968
|
+
}
|
|
969
|
+
),
|
|
970
|
+
/* @__PURE__ */ t(
|
|
971
|
+
N,
|
|
972
|
+
{
|
|
973
|
+
name: "sourceKeyTemplate",
|
|
974
|
+
label: i("mappings.sourceKeyTemplate"),
|
|
975
|
+
helperText: i("mappings.sourceKeyTemplateHelp"),
|
|
976
|
+
disabled: !o
|
|
977
|
+
}
|
|
978
|
+
),
|
|
979
|
+
/* @__PURE__ */ t(C, { color: "fg.muted", fontSize: "sm", children: i("mappings.fieldCount", { count: yt }) })
|
|
980
|
+
] }) })
|
|
981
|
+
}
|
|
982
|
+
) }),
|
|
983
|
+
/* @__PURE__ */ t(z, { title: i("mappings.target"), children: /* @__PURE__ */ b(X, { gap: "3", children: [
|
|
984
|
+
u.available ? /* @__PURE__ */ b(x, { children: [
|
|
985
|
+
/* @__PURE__ */ t(de, { label: i("mappings.blueprint"), children: gt ?? "…" }),
|
|
986
|
+
/* @__PURE__ */ t(de, { label: i("mappings.release"), children: ht ?? "…" })
|
|
987
|
+
] }) : /* @__PURE__ */ b(x, { children: [
|
|
988
|
+
/* @__PURE__ */ t(de, { label: i("mappings.blueprintId"), children: /* @__PURE__ */ t(Be, { children: n.content.blueprintId }) }),
|
|
989
|
+
/* @__PURE__ */ t(de, { label: i("mappings.releaseId"), children: /* @__PURE__ */ t(Be, { children: n.content.blueprintReleaseId }) })
|
|
990
|
+
] }),
|
|
991
|
+
o ? /* @__PURE__ */ t(F, { children: /* @__PURE__ */ b(E, { variant: "outline", size: "sm", onClick: () => r(!0), children: [
|
|
992
|
+
/* @__PURE__ */ t(Yt, { size: 14, "aria-hidden": !0 }),
|
|
993
|
+
i("mappings.move")
|
|
994
|
+
] }) }) : null
|
|
995
|
+
] }) }),
|
|
996
|
+
/* @__PURE__ */ t(z, { title: i("mappings.includedBy"), children: y.isError ? /* @__PURE__ */ t(C, { color: "fg.muted", children: i("startPage.error") }) : y.data ? y.data.length === 0 ? /* @__PURE__ */ t(C, { color: "fg.muted", children: i("mappings.noProfiles") }) : /* @__PURE__ */ t(Q.Root, { ps: "4", "aria-label": i("mappings.includedBy"), children: y.data.map((v) => /* @__PURE__ */ t(Q.Item, { children: /* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ t(Ye, { to: q(s, "profiles", v.id), children: v.name }) }) }, v.id)) }) : /* @__PURE__ */ t(C, { color: "fg.muted", children: i("startPage.loading") }) })
|
|
997
|
+
] }) }),
|
|
998
|
+
/* @__PURE__ */ t(
|
|
999
|
+
Pn,
|
|
1000
|
+
{
|
|
1001
|
+
open: m,
|
|
1002
|
+
onClose: () => r(!1),
|
|
1003
|
+
client: e,
|
|
1004
|
+
mapping: n,
|
|
1005
|
+
onMove: async (v) => {
|
|
1006
|
+
const St = {
|
|
1007
|
+
...$e(n.content, g.getValues()),
|
|
1008
|
+
blueprintReleaseId: v
|
|
1009
|
+
};
|
|
1010
|
+
Z(await e.updateMapping(n.id, St, n.state.draftRevisionId));
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
),
|
|
1014
|
+
/* @__PURE__ */ t(
|
|
1015
|
+
ze,
|
|
1016
|
+
{
|
|
1017
|
+
open: p,
|
|
1018
|
+
onClose: () => d(!1),
|
|
1019
|
+
title: i("mappings.deleteTitle", { name: n.content.name }),
|
|
1020
|
+
message: i("mappings.deleteMessage"),
|
|
1021
|
+
onDelete: () => e.deleteMapping(n.id),
|
|
1022
|
+
onDeleted: () => {
|
|
1023
|
+
d(!1), c.removeQueries({ queryKey: h.mapping(a, n.id) }), c.invalidateQueries({ queryKey: h.mappings(a) }), l();
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
)
|
|
1027
|
+
]
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
function de({ label: e, children: n }) {
|
|
1032
|
+
return /* @__PURE__ */ b(U, { gap: "4", align: "baseline", children: [
|
|
1033
|
+
/* @__PURE__ */ t(C, { color: "fg.muted", minW: "40", children: e }),
|
|
1034
|
+
/* @__PURE__ */ t(F, { children: n })
|
|
1035
|
+
] });
|
|
1036
|
+
}
|
|
1037
|
+
function On() {
|
|
1038
|
+
const { t: e } = V(S), { blueprints: n } = J();
|
|
1039
|
+
return n ? /* @__PURE__ */ t(_n, {}) : /* @__PURE__ */ b(x, { children: [
|
|
1040
|
+
/* @__PURE__ */ t(N, { name: "blueprintId", label: e("mappings.blueprintId"), required: !0 }),
|
|
1041
|
+
/* @__PURE__ */ t(
|
|
1042
|
+
N,
|
|
1043
|
+
{
|
|
1044
|
+
name: "blueprintReleaseId",
|
|
1045
|
+
label: e("mappings.releaseId"),
|
|
1046
|
+
helperText: e("mappings.idsHelp"),
|
|
1047
|
+
required: !0
|
|
1048
|
+
}
|
|
1049
|
+
)
|
|
1050
|
+
] });
|
|
1051
|
+
}
|
|
1052
|
+
function _n() {
|
|
1053
|
+
const { t: e } = V(S), { blueprints: n } = J(), { workspaceId: l } = W(), { control: i, setValue: a } = st(), s = le({ control: i, name: "blueprintId" }), o = Mt(s);
|
|
1054
|
+
K(() => {
|
|
1055
|
+
o.current !== s && a("blueprintReleaseId", ""), o.current = s;
|
|
1056
|
+
}, [s, a]);
|
|
1057
|
+
const c = A({
|
|
1058
|
+
queryKey: h.blueprints(l),
|
|
1059
|
+
queryFn: () => n?.listBlueprints() ?? Promise.resolve([])
|
|
1060
|
+
}), p = A({
|
|
1061
|
+
queryKey: h.blueprintReleases(l, s ?? ""),
|
|
1062
|
+
queryFn: () => n?.listReleases(s) ?? Promise.resolve([]),
|
|
1063
|
+
enabled: !!s
|
|
1064
|
+
});
|
|
1065
|
+
return /* @__PURE__ */ b(x, { children: [
|
|
1066
|
+
/* @__PURE__ */ t(
|
|
1067
|
+
me,
|
|
1068
|
+
{
|
|
1069
|
+
name: "blueprintId",
|
|
1070
|
+
label: e("mappings.blueprint"),
|
|
1071
|
+
required: !0,
|
|
1072
|
+
options: (c.data ?? []).map((d) => ({ id: d.id, label: d.name }))
|
|
1073
|
+
}
|
|
1074
|
+
),
|
|
1075
|
+
/* @__PURE__ */ t(
|
|
1076
|
+
me,
|
|
1077
|
+
{
|
|
1078
|
+
name: "blueprintReleaseId",
|
|
1079
|
+
label: e("mappings.release"),
|
|
1080
|
+
required: !0,
|
|
1081
|
+
disabled: !s,
|
|
1082
|
+
options: (p.data ?? []).map((d) => ({ id: d.id, label: d.label }))
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
] });
|
|
1086
|
+
}
|
|
1087
|
+
const qn = { blueprintId: "", blueprintReleaseId: "" };
|
|
1088
|
+
function Fi({ client: e, onOpen: n }) {
|
|
1089
|
+
const { t: l } = V(S), { workspaceId: i } = W(), { paths: a } = J(), s = $(), o = j(), [c, p] = L(!1), d = A({
|
|
1090
|
+
queryKey: h.mappings(i),
|
|
1091
|
+
queryFn: () => e.listMappings()
|
|
1092
|
+
}), m = mt((d.data ?? []).map((u) => u.content.blueprintId)), r = T(
|
|
1093
|
+
() => [
|
|
1094
|
+
{
|
|
1095
|
+
id: "name",
|
|
1096
|
+
header: l("fields.name"),
|
|
1097
|
+
cell: (u) => /* @__PURE__ */ t(
|
|
1098
|
+
Ne,
|
|
1099
|
+
{
|
|
1100
|
+
to: q(a, "mappings", u.row.original.id),
|
|
1101
|
+
label: u.row.original.content.name
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
},
|
|
1105
|
+
m.available ? {
|
|
1106
|
+
id: "blueprint",
|
|
1107
|
+
header: l("mappings.blueprint"),
|
|
1108
|
+
cell: (u) => /* @__PURE__ */ t(
|
|
1109
|
+
M,
|
|
1110
|
+
{
|
|
1111
|
+
value: m.blueprintName(u.row.original.content.blueprintId) ?? ""
|
|
1112
|
+
}
|
|
1113
|
+
)
|
|
1114
|
+
} : {
|
|
1115
|
+
id: "blueprint",
|
|
1116
|
+
header: l("mappings.blueprintId"),
|
|
1117
|
+
cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintId })
|
|
1118
|
+
},
|
|
1119
|
+
m.available ? {
|
|
1120
|
+
id: "release",
|
|
1121
|
+
header: l("mappings.release"),
|
|
1122
|
+
cell: (u) => /* @__PURE__ */ t(
|
|
1123
|
+
M,
|
|
1124
|
+
{
|
|
1125
|
+
value: m.releaseLabel(
|
|
1126
|
+
u.row.original.content.blueprintId,
|
|
1127
|
+
u.row.original.content.blueprintReleaseId
|
|
1128
|
+
) ?? ""
|
|
1129
|
+
}
|
|
1130
|
+
)
|
|
1131
|
+
} : {
|
|
1132
|
+
id: "release",
|
|
1133
|
+
header: l("mappings.releaseId"),
|
|
1134
|
+
cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintReleaseId })
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
id: "validity",
|
|
1138
|
+
header: l("validity.column"),
|
|
1139
|
+
cell: (u) => /* @__PURE__ */ t(Me, { validity: u.row.original.validity })
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
[l, a, m]
|
|
1143
|
+
);
|
|
1144
|
+
return /* @__PURE__ */ b(
|
|
1145
|
+
ie,
|
|
1146
|
+
{
|
|
1147
|
+
title: l("section.mappings.title"),
|
|
1148
|
+
actions: s ? /* @__PURE__ */ b(E, { variant: "solid", onClick: () => p(!0), children: [
|
|
1149
|
+
/* @__PURE__ */ t(ne, { size: 16, "aria-hidden": !0 }),
|
|
1150
|
+
l("mappings.new")
|
|
1151
|
+
] }) : void 0,
|
|
1152
|
+
children: [
|
|
1153
|
+
d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
|
|
1154
|
+
Ve,
|
|
1155
|
+
{
|
|
1156
|
+
columns: r,
|
|
1157
|
+
data: d.data ?? [],
|
|
1158
|
+
loading: d.isPending,
|
|
1159
|
+
getRowId: (u) => u.id,
|
|
1160
|
+
emptyState: l("mappings.empty")
|
|
1161
|
+
}
|
|
1162
|
+
),
|
|
1163
|
+
/* @__PURE__ */ t(
|
|
1164
|
+
xe,
|
|
1165
|
+
{
|
|
1166
|
+
open: c,
|
|
1167
|
+
onClose: () => p(!1),
|
|
1168
|
+
title: l("mappings.new"),
|
|
1169
|
+
defaultValues: qn,
|
|
1170
|
+
onCreate: async ({ name: u, description: y, blueprintId: g, blueprintReleaseId: R }) => {
|
|
1171
|
+
const G = await e.createMapping({
|
|
1172
|
+
name: u,
|
|
1173
|
+
description: y,
|
|
1174
|
+
blueprintId: g ?? "",
|
|
1175
|
+
blueprintReleaseId: R ?? ""
|
|
1176
|
+
});
|
|
1177
|
+
return await o.invalidateQueries({ queryKey: h.mappings(i) }), G.id;
|
|
1178
|
+
},
|
|
1179
|
+
onCreated: (u) => {
|
|
1180
|
+
p(!1), n(u);
|
|
1181
|
+
},
|
|
1182
|
+
children: /* @__PURE__ */ t(On, {})
|
|
1183
|
+
}
|
|
1184
|
+
)
|
|
1185
|
+
]
|
|
1186
|
+
}
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
function Ui({ client: e }) {
|
|
1190
|
+
const { t: n } = V(S), { workspaceId: l } = W(), i = A({
|
|
1191
|
+
queryKey: h.processors(l),
|
|
1192
|
+
queryFn: () => e.listProcessors()
|
|
1193
|
+
}), a = T(
|
|
1194
|
+
() => [
|
|
1195
|
+
{
|
|
1196
|
+
id: "name",
|
|
1197
|
+
header: n("fields.name"),
|
|
1198
|
+
size: 180,
|
|
1199
|
+
cell: (s) => /* @__PURE__ */ t(Ht, { value: s.row.original.name })
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
id: "kind",
|
|
1203
|
+
header: n("processors.kindColumn"),
|
|
1204
|
+
size: 140,
|
|
1205
|
+
cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.kind.${s.row.original.kind}`) })
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
id: "target",
|
|
1209
|
+
header: n("processors.targetColumn"),
|
|
1210
|
+
size: 160,
|
|
1211
|
+
cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.target.${s.row.original.target}`) })
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
id: "description",
|
|
1215
|
+
header: n("fields.description"),
|
|
1216
|
+
cell: (s) => /* @__PURE__ */ t(M, { value: s.row.original.description })
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
id: "settings",
|
|
1220
|
+
header: n("processors.settingsColumn"),
|
|
1221
|
+
cell: (s) => /* @__PURE__ */ t(
|
|
1222
|
+
M,
|
|
1223
|
+
{
|
|
1224
|
+
value: s.row.original.settingsSpec.length === 0 ? n("processors.noSettings") : s.row.original.settingsSpec.map((o) => o.config.name || o.config.api_accessor).join(", ")
|
|
1225
|
+
}
|
|
1226
|
+
)
|
|
1227
|
+
}
|
|
1228
|
+
],
|
|
1229
|
+
[n]
|
|
1230
|
+
);
|
|
1231
|
+
return /* @__PURE__ */ t(ie, { title: n("section.processors.title"), children: i.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
|
|
1232
|
+
Ve,
|
|
1233
|
+
{
|
|
1234
|
+
columns: a,
|
|
1235
|
+
data: i.data ?? [],
|
|
1236
|
+
loading: i.isPending,
|
|
1237
|
+
getRowId: (s) => s.name,
|
|
1238
|
+
emptyState: n("processors.empty")
|
|
1239
|
+
}
|
|
1240
|
+
) });
|
|
1241
|
+
}
|
|
1242
|
+
function et(e, n, l) {
|
|
1243
|
+
const i = [...e], [a] = i.splice(n, 1);
|
|
1244
|
+
return i.splice(l, 0, a), i;
|
|
1245
|
+
}
|
|
1246
|
+
function ut({
|
|
1247
|
+
items: e,
|
|
1248
|
+
renderItem: n,
|
|
1249
|
+
nameOf: l,
|
|
1250
|
+
editable: i,
|
|
1251
|
+
onChange: a,
|
|
1252
|
+
emptyLabel: s,
|
|
1253
|
+
addLabel: o,
|
|
1254
|
+
addOptions: c,
|
|
1255
|
+
onAdd: p
|
|
1256
|
+
}) {
|
|
1257
|
+
const { t: d } = V(S);
|
|
1258
|
+
return /* @__PURE__ */ b(X, { gap: "2", children: [
|
|
1259
|
+
e.length === 0 ? /* @__PURE__ */ t(C, { color: "fg.muted", children: s }) : /* @__PURE__ */ t(X, { as: "ol", gap: "0", listStyleType: "none", ms: "0", children: e.map((m, r) => {
|
|
1260
|
+
const u = l(m);
|
|
1261
|
+
return /* @__PURE__ */ b(
|
|
1262
|
+
U,
|
|
1263
|
+
{
|
|
1264
|
+
as: "li",
|
|
1265
|
+
gap: "3",
|
|
1266
|
+
py: "2",
|
|
1267
|
+
borderBottomWidth: "1px",
|
|
1268
|
+
borderColor: "border",
|
|
1269
|
+
align: "start",
|
|
1270
|
+
children: [
|
|
1271
|
+
/* @__PURE__ */ b(C, { color: "fg.muted", minW: "6", textAlign: "end", children: [
|
|
1272
|
+
r + 1,
|
|
1273
|
+
"."
|
|
1274
|
+
] }),
|
|
1275
|
+
/* @__PURE__ */ t(F, { flex: "1", minW: "0", children: n(m, r) }),
|
|
1276
|
+
i ? /* @__PURE__ */ b(U, { gap: "1", children: [
|
|
1277
|
+
/* @__PURE__ */ t(
|
|
1278
|
+
pe,
|
|
1279
|
+
{
|
|
1280
|
+
"aria-label": d("order.moveUp", { name: u }),
|
|
1281
|
+
size: "xs",
|
|
1282
|
+
variant: "ghost",
|
|
1283
|
+
disabled: r === 0,
|
|
1284
|
+
onClick: () => a(et(e, r, r - 1)),
|
|
1285
|
+
children: /* @__PURE__ */ t(Ft, { size: 14 })
|
|
1286
|
+
}
|
|
1287
|
+
),
|
|
1288
|
+
/* @__PURE__ */ t(
|
|
1289
|
+
pe,
|
|
1290
|
+
{
|
|
1291
|
+
"aria-label": d("order.moveDown", { name: u }),
|
|
1292
|
+
size: "xs",
|
|
1293
|
+
variant: "ghost",
|
|
1294
|
+
disabled: r === e.length - 1,
|
|
1295
|
+
onClick: () => a(et(e, r, r + 1)),
|
|
1296
|
+
children: /* @__PURE__ */ t(Ut, { size: 14 })
|
|
1297
|
+
}
|
|
1298
|
+
),
|
|
1299
|
+
/* @__PURE__ */ t(
|
|
1300
|
+
pe,
|
|
1301
|
+
{
|
|
1302
|
+
"aria-label": d("order.remove", { name: u }),
|
|
1303
|
+
size: "xs",
|
|
1304
|
+
variant: "ghost",
|
|
1305
|
+
colorPalette: "red",
|
|
1306
|
+
onClick: () => a(e.filter((y, g) => g !== r)),
|
|
1307
|
+
children: /* @__PURE__ */ t(ee, { size: 14 })
|
|
1308
|
+
}
|
|
1309
|
+
)
|
|
1310
|
+
] }) : null
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
r
|
|
1314
|
+
);
|
|
1315
|
+
}) }),
|
|
1316
|
+
i ? /* @__PURE__ */ t(F, { children: /* @__PURE__ */ b(ft, { onSelect: (m) => p(m.value), children: [
|
|
1317
|
+
/* @__PURE__ */ t(Xt, { asChild: !0, children: /* @__PURE__ */ b(E, { variant: "outline", size: "sm", disabled: c.length === 0, children: [
|
|
1318
|
+
/* @__PURE__ */ t(ne, { size: 14, "aria-hidden": !0 }),
|
|
1319
|
+
o
|
|
1320
|
+
] }) }),
|
|
1321
|
+
/* @__PURE__ */ t(At, { children: c.map((m) => /* @__PURE__ */ t(vt, { value: m.value, children: m.label }, m.value)) })
|
|
1322
|
+
] }) }) : null
|
|
1323
|
+
] });
|
|
1324
|
+
}
|
|
1325
|
+
const $n = {};
|
|
1326
|
+
function ei({
|
|
1327
|
+
open: e,
|
|
1328
|
+
onClose: n,
|
|
1329
|
+
processor: l,
|
|
1330
|
+
settings: i,
|
|
1331
|
+
readOnly: a,
|
|
1332
|
+
onApply: s
|
|
1333
|
+
}) {
|
|
1334
|
+
const { t: o } = V(S), c = l?.settingsSpec ?? [], p = T(() => Tt(jt(c, Pe)), [c]), d = O({ defaultValues: i, resolver: p }), { reset: m } = d;
|
|
1335
|
+
K(() => {
|
|
1336
|
+
e && m(i ?? $n);
|
|
1337
|
+
}, [e, i, m]);
|
|
1338
|
+
const r = d.handleSubmit((u) => s(u));
|
|
1339
|
+
return /* @__PURE__ */ t(
|
|
1340
|
+
Se,
|
|
1341
|
+
{
|
|
1342
|
+
open: e,
|
|
1343
|
+
onClose: n,
|
|
1344
|
+
header: o("processors.settingsOf", { name: l?.name ?? "" }),
|
|
1345
|
+
lazyMount: !0,
|
|
1346
|
+
unmountOnExit: !0,
|
|
1347
|
+
cancelLabel: o(a ? "common.close" : "common.cancel"),
|
|
1348
|
+
saveLabel: o("common.apply"),
|
|
1349
|
+
onSave: a ? void 0 : () => {
|
|
1350
|
+
r();
|
|
1351
|
+
},
|
|
1352
|
+
children: /* @__PURE__ */ t(_, { ...d, children: /* @__PURE__ */ t(
|
|
1353
|
+
"form",
|
|
1354
|
+
{
|
|
1355
|
+
onSubmit: (u) => {
|
|
1356
|
+
u.preventDefault(), r();
|
|
1357
|
+
},
|
|
1358
|
+
children: /* @__PURE__ */ t(Dt, { plugins: Pe, children: a ? /* @__PURE__ */ t(He, { schema: c, mode: "read", values: i }) : /* @__PURE__ */ t(He, { schema: c }) })
|
|
1359
|
+
}
|
|
1360
|
+
) })
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
const ve = (e) => ({
|
|
1365
|
+
...e,
|
|
1366
|
+
entitySetId: e.entitySetId || null
|
|
1367
|
+
}), ti = (e) => ({
|
|
1368
|
+
...e,
|
|
1369
|
+
entitySetId: e.entitySetId ?? ""
|
|
1370
|
+
});
|
|
1371
|
+
function ki({ client: e, id: n, onDeleted: l }) {
|
|
1372
|
+
const { t: i } = V(S), { workspaceId: a } = W(), s = A({
|
|
1373
|
+
queryKey: h.importProfile(a, n),
|
|
1374
|
+
queryFn: () => e.getImportProfile(n)
|
|
1375
|
+
});
|
|
1376
|
+
return s.isError ? /* @__PURE__ */ t(H, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(D, {}) }) : s.data ? /* @__PURE__ */ t(ni, { client: e, profile: s.data, onDeleted: l }) : /* @__PURE__ */ t(H, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(Ge, {}) });
|
|
1377
|
+
}
|
|
1378
|
+
function ni({
|
|
1379
|
+
client: e,
|
|
1380
|
+
profile: n,
|
|
1381
|
+
onDeleted: l
|
|
1382
|
+
}) {
|
|
1383
|
+
const { t: i } = V(S), { workspaceId: a } = W(), { paths: s } = J(), o = $(), c = j(), [p, d] = L(!1), m = A({
|
|
1384
|
+
queryKey: h.processors(a),
|
|
1385
|
+
queryFn: () => e.listProcessors()
|
|
1386
|
+
}), r = A({
|
|
1387
|
+
queryKey: h.mappings(a),
|
|
1388
|
+
queryFn: () => e.listMappings()
|
|
1389
|
+
}), u = A({
|
|
1390
|
+
queryKey: h.entitySets(a),
|
|
1391
|
+
queryFn: () => e.listEntitySets()
|
|
1392
|
+
}), y = O({ defaultValues: ve(n.content) }), { reset: g, formState: R } = y;
|
|
1393
|
+
K(() => {
|
|
1394
|
+
R.isDirty || g(ve(n.content));
|
|
1395
|
+
}, [n, g, R.isDirty]);
|
|
1396
|
+
const G = P({
|
|
1397
|
+
mutationFn: (I) => e.updateImportProfile(n.id, ti(I), n.state.draftRevisionId),
|
|
1398
|
+
onSuccess: (I) => {
|
|
1399
|
+
c.setQueryData(h.importProfile(a, I.id), I), g(ve(I.content)), c.invalidateQueries({ queryKey: h.importProfiles(a) });
|
|
1400
|
+
}
|
|
1401
|
+
}), Z = y.handleSubmit((I) => G.mutate(I)), B = le({ control: y.control, name: "name" });
|
|
1402
|
+
return we(
|
|
1403
|
+
o ? /* @__PURE__ */ b(w, { storageKey: "importhub.profile.rail", children: [
|
|
1404
|
+
/* @__PURE__ */ t(w.Header, { title: i("rail.title") }),
|
|
1405
|
+
/* @__PURE__ */ t(w.Section, { id: "actions", label: i("rail.actions"), children: /* @__PURE__ */ t(
|
|
1406
|
+
w.IconButton,
|
|
1407
|
+
{
|
|
1408
|
+
label: i("profiles.delete"),
|
|
1409
|
+
icon: /* @__PURE__ */ t(ee, { size: 16 }),
|
|
1410
|
+
tone: "outline-red",
|
|
1411
|
+
onClick: () => d(!0)
|
|
1412
|
+
}
|
|
1413
|
+
) })
|
|
1414
|
+
] }) : null
|
|
1415
|
+
), /* @__PURE__ */ b(
|
|
1416
|
+
H,
|
|
1417
|
+
{
|
|
1418
|
+
title: n.content.name,
|
|
1419
|
+
breadcrumbs: [{ label: i("section.profiles.title"), to: s.profiles }],
|
|
1420
|
+
badges: /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
1421
|
+
/* @__PURE__ */ t(
|
|
1422
|
+
ye,
|
|
1423
|
+
{
|
|
1424
|
+
tone: n.validity.valid ? "success" : "danger",
|
|
1425
|
+
label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
|
|
1426
|
+
}
|
|
1427
|
+
),
|
|
1428
|
+
/* @__PURE__ */ t(Je, { children: oe(n.state, i) })
|
|
1429
|
+
] }),
|
|
1430
|
+
actions: o ? /* @__PURE__ */ t(
|
|
1431
|
+
E,
|
|
1432
|
+
{
|
|
1433
|
+
variant: "solid",
|
|
1434
|
+
disabled: !R.isDirty,
|
|
1435
|
+
loading: G.isPending,
|
|
1436
|
+
onClick: () => {
|
|
1437
|
+
Z();
|
|
1438
|
+
},
|
|
1439
|
+
children: i("common.save")
|
|
1440
|
+
}
|
|
1441
|
+
) : void 0,
|
|
1442
|
+
children: [
|
|
1443
|
+
/* @__PURE__ */ t(F, { px: "8", py: "6", children: m.isPending || r.isPending || u.isPending ? /* @__PURE__ */ t(Ge, {}) : /* @__PURE__ */ t(_, { ...y, children: /* @__PURE__ */ t(
|
|
1444
|
+
"form",
|
|
1445
|
+
{
|
|
1446
|
+
onSubmit: (I) => {
|
|
1447
|
+
I.preventDefault(), o && Z();
|
|
1448
|
+
},
|
|
1449
|
+
children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
1450
|
+
/* @__PURE__ */ t(Ke, { validity: n.validity }),
|
|
1451
|
+
G.isError ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: i("save.failed"), children: G.error.message }) : null,
|
|
1452
|
+
/* @__PURE__ */ t(z, { title: i("profiles.general"), children: /* @__PURE__ */ b(X, { gap: "4", children: [
|
|
1453
|
+
/* @__PURE__ */ t(
|
|
1454
|
+
N,
|
|
1455
|
+
{
|
|
1456
|
+
name: "name",
|
|
1457
|
+
label: i("fields.name"),
|
|
1458
|
+
required: !0,
|
|
1459
|
+
disabled: !o
|
|
1460
|
+
}
|
|
1461
|
+
),
|
|
1462
|
+
/* @__PURE__ */ t(
|
|
1463
|
+
Re,
|
|
1464
|
+
{
|
|
1465
|
+
name: "description",
|
|
1466
|
+
label: i("fields.description"),
|
|
1467
|
+
disabled: !o
|
|
1468
|
+
}
|
|
1469
|
+
),
|
|
1470
|
+
/* @__PURE__ */ t(
|
|
1471
|
+
me,
|
|
1472
|
+
{
|
|
1473
|
+
name: "entitySetId",
|
|
1474
|
+
label: i("profiles.entitySet"),
|
|
1475
|
+
helperText: i("profiles.entitySetHelp"),
|
|
1476
|
+
placeholder: i("profiles.noEntitySet"),
|
|
1477
|
+
options: (u.data ?? []).map((I) => ({
|
|
1478
|
+
id: I.id,
|
|
1479
|
+
label: I.content.name
|
|
1480
|
+
})),
|
|
1481
|
+
disabled: !o
|
|
1482
|
+
}
|
|
1483
|
+
),
|
|
1484
|
+
/* @__PURE__ */ t(
|
|
1485
|
+
Le,
|
|
1486
|
+
{
|
|
1487
|
+
name: "autoPublish",
|
|
1488
|
+
label: i("profiles.autoPublish"),
|
|
1489
|
+
helperText: i("profiles.autoPublishHelp"),
|
|
1490
|
+
disabled: !o
|
|
1491
|
+
}
|
|
1492
|
+
),
|
|
1493
|
+
/* @__PURE__ */ t(
|
|
1494
|
+
Le,
|
|
1495
|
+
{
|
|
1496
|
+
name: "deleteSourceFileOnSuccess",
|
|
1497
|
+
label: i("profiles.deleteOnSuccess"),
|
|
1498
|
+
helperText: i("profiles.deleteOnSuccessHelp"),
|
|
1499
|
+
disabled: !o
|
|
1500
|
+
}
|
|
1501
|
+
)
|
|
1502
|
+
] }) }),
|
|
1503
|
+
/* @__PURE__ */ t(z, { title: i("profiles.preprocessors"), children: /* @__PURE__ */ t(
|
|
1504
|
+
tt,
|
|
1505
|
+
{
|
|
1506
|
+
name: "preprocessors",
|
|
1507
|
+
kind: "preprocessor",
|
|
1508
|
+
catalogue: m.data ?? [],
|
|
1509
|
+
editable: o
|
|
1510
|
+
}
|
|
1511
|
+
) }),
|
|
1512
|
+
/* @__PURE__ */ t(z, { title: i("profiles.mappings"), children: /* @__PURE__ */ t(
|
|
1513
|
+
li,
|
|
1514
|
+
{
|
|
1515
|
+
mappings: (r.data ?? []).map((I) => ({
|
|
1516
|
+
id: I.id,
|
|
1517
|
+
name: I.content.name,
|
|
1518
|
+
valid: I.validity.valid
|
|
1519
|
+
})),
|
|
1520
|
+
editable: o,
|
|
1521
|
+
hrefOf: (I) => q(s, "mappings", I)
|
|
1522
|
+
}
|
|
1523
|
+
) }),
|
|
1524
|
+
/* @__PURE__ */ t(z, { title: i("profiles.postProcessors"), children: /* @__PURE__ */ t(
|
|
1525
|
+
tt,
|
|
1526
|
+
{
|
|
1527
|
+
name: "postProcessors",
|
|
1528
|
+
kind: "post_processor",
|
|
1529
|
+
catalogue: m.data ?? [],
|
|
1530
|
+
editable: o
|
|
1531
|
+
}
|
|
1532
|
+
) })
|
|
1533
|
+
] })
|
|
1534
|
+
}
|
|
1535
|
+
) }) }),
|
|
1536
|
+
/* @__PURE__ */ t(
|
|
1537
|
+
ze,
|
|
1538
|
+
{
|
|
1539
|
+
open: p,
|
|
1540
|
+
onClose: () => d(!1),
|
|
1541
|
+
title: i("profiles.deleteTitle", { name: B || n.content.name }),
|
|
1542
|
+
message: i("profiles.deleteMessage"),
|
|
1543
|
+
onDelete: () => e.deleteImportProfile(n.id),
|
|
1544
|
+
onDeleted: () => {
|
|
1545
|
+
d(!1), c.removeQueries({
|
|
1546
|
+
queryKey: h.importProfile(a, n.id)
|
|
1547
|
+
}), c.invalidateQueries({
|
|
1548
|
+
queryKey: h.importProfiles(a)
|
|
1549
|
+
}), l();
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
)
|
|
1553
|
+
]
|
|
1554
|
+
}
|
|
1555
|
+
);
|
|
1556
|
+
}
|
|
1557
|
+
function tt({
|
|
1558
|
+
name: e,
|
|
1559
|
+
kind: n,
|
|
1560
|
+
catalogue: l,
|
|
1561
|
+
editable: i
|
|
1562
|
+
}) {
|
|
1563
|
+
const { t: a } = V(S), { control: s, setValue: o } = bt(), c = le({ control: s, name: e }) ?? [], [p, d] = L(null), m = (g) => o(e, g, { shouldDirty: !0 }), r = (g) => l.find((R) => R.name === g.processor), u = p === null ? void 0 : c[p], y = l.filter((g) => g.kind === n && g.target === "source_file");
|
|
1564
|
+
return /* @__PURE__ */ b(x, { children: [
|
|
1565
|
+
/* @__PURE__ */ t(
|
|
1566
|
+
ut,
|
|
1567
|
+
{
|
|
1568
|
+
items: c,
|
|
1569
|
+
nameOf: (g) => g.processor,
|
|
1570
|
+
editable: i,
|
|
1571
|
+
onChange: m,
|
|
1572
|
+
emptyLabel: a(
|
|
1573
|
+
n === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
|
|
1574
|
+
),
|
|
1575
|
+
addLabel: a(
|
|
1576
|
+
n === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
|
|
1577
|
+
),
|
|
1578
|
+
addOptions: y.map((g) => ({ value: g.name, label: g.name })),
|
|
1579
|
+
onAdd: (g) => {
|
|
1580
|
+
m([...c, { processor: g, settings: {} }]), (y.find((R) => R.name === g)?.settingsSpec.length ?? 0) > 0 && d(c.length);
|
|
1581
|
+
},
|
|
1582
|
+
renderItem: (g, R) => {
|
|
1583
|
+
const G = r(g), Z = Object.keys(g.settings).length;
|
|
1584
|
+
return /* @__PURE__ */ b(U, { justify: "space-between", gap: "3", children: [
|
|
1585
|
+
/* @__PURE__ */ b(X, { gap: "0", minW: "0", children: [
|
|
1586
|
+
/* @__PURE__ */ t(C, { fontFamily: "mono", fontSize: "sm", children: g.processor }),
|
|
1587
|
+
/* @__PURE__ */ t(C, { color: "fg.muted", fontSize: "sm", children: G ? G.description : a("processors.unknown") })
|
|
1588
|
+
] }),
|
|
1589
|
+
G && G.settingsSpec.length > 0 ? /* @__PURE__ */ b(
|
|
1590
|
+
E,
|
|
1591
|
+
{
|
|
1592
|
+
size: "xs",
|
|
1593
|
+
variant: "outline",
|
|
1594
|
+
onClick: () => d(R),
|
|
1595
|
+
"aria-label": a(i ? "processors.configure" : "processors.viewSettings", {
|
|
1596
|
+
name: g.processor
|
|
1597
|
+
}),
|
|
1598
|
+
children: [
|
|
1599
|
+
/* @__PURE__ */ t(kt, { size: 14, "aria-hidden": !0 }),
|
|
1600
|
+
a("processors.settingsCount", { count: Z })
|
|
1601
|
+
]
|
|
1602
|
+
}
|
|
1603
|
+
) : null
|
|
1604
|
+
] });
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
),
|
|
1608
|
+
/* @__PURE__ */ t(
|
|
1609
|
+
ei,
|
|
1610
|
+
{
|
|
1611
|
+
open: u !== void 0,
|
|
1612
|
+
onClose: () => d(null),
|
|
1613
|
+
processor: u ? r(u) ?? null : null,
|
|
1614
|
+
settings: u?.settings ?? ii,
|
|
1615
|
+
readOnly: !i,
|
|
1616
|
+
onApply: (g) => {
|
|
1617
|
+
p !== null && (m(c.map((R, G) => G === p ? { ...R, settings: g } : R)), d(null));
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
)
|
|
1621
|
+
] });
|
|
1622
|
+
}
|
|
1623
|
+
const ii = {};
|
|
1624
|
+
function li({
|
|
1625
|
+
mappings: e,
|
|
1626
|
+
editable: n,
|
|
1627
|
+
hrefOf: l
|
|
1628
|
+
}) {
|
|
1629
|
+
const { t: i } = V(S), { control: a, setValue: s } = bt(), o = le({ control: a, name: "mappingIds" }) ?? [], c = T(() => new Map(e.map((m) => [m.id, m])), [e]), p = (m) => s("mappingIds", m, { shouldDirty: !0 });
|
|
1630
|
+
return /* @__PURE__ */ t(
|
|
1631
|
+
ut,
|
|
1632
|
+
{
|
|
1633
|
+
items: o,
|
|
1634
|
+
nameOf: (m) => c.get(m)?.name ?? i("profiles.missingMapping"),
|
|
1635
|
+
editable: n,
|
|
1636
|
+
onChange: p,
|
|
1637
|
+
emptyLabel: i("profiles.noMappings"),
|
|
1638
|
+
addLabel: i("profiles.addMapping"),
|
|
1639
|
+
addOptions: e.filter((m) => !o.includes(m.id)).map((m) => ({ value: m.id, label: m.name })),
|
|
1640
|
+
onAdd: (m) => p([...o, m]),
|
|
1641
|
+
renderItem: (m) => {
|
|
1642
|
+
const r = c.get(m);
|
|
1643
|
+
return r ? /* @__PURE__ */ b(U, { gap: "2", children: [
|
|
1644
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ t(Ye, { to: l(r.id), children: r.name }) }),
|
|
1645
|
+
r.valid ? null : /* @__PURE__ */ t(ye, { tone: "danger", label: i("validity.invalid") })
|
|
1646
|
+
] }) : /* @__PURE__ */ t(C, { color: "fg.muted", children: i("profiles.missingMapping") });
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
);
|
|
1650
|
+
}
|
|
1651
|
+
const bt = () => st();
|
|
1652
|
+
function zi({ client: e, onOpen: n }) {
|
|
1653
|
+
const { t: l } = V(S), { workspaceId: i } = W(), { paths: a } = J(), s = $(), o = j(), [c, p] = L(!1), d = A({
|
|
1654
|
+
queryKey: h.importProfiles(i),
|
|
1655
|
+
queryFn: () => e.listImportProfiles()
|
|
1656
|
+
}), m = T(
|
|
1657
|
+
() => [
|
|
1658
|
+
{
|
|
1659
|
+
id: "name",
|
|
1660
|
+
header: l("fields.name"),
|
|
1661
|
+
cell: (r) => /* @__PURE__ */ t(
|
|
1662
|
+
Ne,
|
|
1663
|
+
{
|
|
1664
|
+
to: q(a, "profiles", r.row.original.id),
|
|
1665
|
+
label: r.row.original.content.name
|
|
1666
|
+
}
|
|
1667
|
+
)
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
id: "validity",
|
|
1671
|
+
header: l("validity.column"),
|
|
1672
|
+
cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
id: "release",
|
|
1676
|
+
header: l("release.column"),
|
|
1677
|
+
size: 140,
|
|
1678
|
+
cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
|
|
1679
|
+
}
|
|
1680
|
+
],
|
|
1681
|
+
[l, a]
|
|
1682
|
+
);
|
|
1683
|
+
return /* @__PURE__ */ b(
|
|
1684
|
+
ie,
|
|
1685
|
+
{
|
|
1686
|
+
title: l("section.profiles.title"),
|
|
1687
|
+
actions: s ? /* @__PURE__ */ b(E, { variant: "solid", onClick: () => p(!0), children: [
|
|
1688
|
+
/* @__PURE__ */ t(ne, { size: 16, "aria-hidden": !0 }),
|
|
1689
|
+
l("profiles.new")
|
|
1690
|
+
] }) : void 0,
|
|
1691
|
+
children: [
|
|
1692
|
+
d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
|
|
1693
|
+
Ve,
|
|
1694
|
+
{
|
|
1695
|
+
columns: m,
|
|
1696
|
+
data: d.data ?? [],
|
|
1697
|
+
loading: d.isPending,
|
|
1698
|
+
getRowId: (r) => r.id,
|
|
1699
|
+
emptyState: l("profiles.empty")
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
/* @__PURE__ */ t(
|
|
1703
|
+
xe,
|
|
1704
|
+
{
|
|
1705
|
+
open: c,
|
|
1706
|
+
onClose: () => p(!1),
|
|
1707
|
+
title: l("profiles.new"),
|
|
1708
|
+
onCreate: async ({ name: r, description: u }) => {
|
|
1709
|
+
const y = await e.createImportProfile({
|
|
1710
|
+
name: r,
|
|
1711
|
+
description: u,
|
|
1712
|
+
entitySetId: "",
|
|
1713
|
+
preprocessors: [],
|
|
1714
|
+
mappingIds: [],
|
|
1715
|
+
postProcessors: [],
|
|
1716
|
+
autoPublish: !1,
|
|
1717
|
+
deleteSourceFileOnSuccess: !1
|
|
1718
|
+
});
|
|
1719
|
+
return await o.invalidateQueries({
|
|
1720
|
+
queryKey: h.importProfiles(i)
|
|
1721
|
+
}), y.id;
|
|
1722
|
+
},
|
|
1723
|
+
onCreated: (r) => {
|
|
1724
|
+
p(!1), n(r);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
)
|
|
1728
|
+
]
|
|
1729
|
+
}
|
|
1730
|
+
);
|
|
120
1731
|
}
|
|
121
1732
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
1733
|
+
Ci as ChangeSetLink,
|
|
1734
|
+
it as ConfigurationInUseError,
|
|
1735
|
+
wi as EntitySetDetail,
|
|
1736
|
+
Ni as EntitySetsIndex,
|
|
1737
|
+
Wi as IMPORTHUB_SECTIONS,
|
|
1738
|
+
Kn as IMPORTHUB_SECTION_ICONS,
|
|
1739
|
+
S as IMPORTHUB_UI_NS,
|
|
1740
|
+
ki as ImportProfileDetail,
|
|
1741
|
+
zi as ImportProfilesIndex,
|
|
1742
|
+
Bi as ImporthubHostProvider,
|
|
1743
|
+
Ji as ImporthubStartPage,
|
|
1744
|
+
Yi as MappingDetail,
|
|
1745
|
+
Fi as MappingsIndex,
|
|
1746
|
+
We as NameTakenError,
|
|
1747
|
+
Ui as ProcessorCatalogue,
|
|
1748
|
+
kn as STANDALONE_IMPORTHUB_PATHS,
|
|
1749
|
+
vi as createConnectImporthubClient,
|
|
1750
|
+
Ei as i18nResources,
|
|
1751
|
+
h as importhubKeys,
|
|
1752
|
+
q as itemPath,
|
|
1753
|
+
J as useImporthubHost
|
|
133
1754
|
};
|
|
134
1755
|
//# sourceMappingURL=index.js.map
|