@knkcs/importhub-ui 0.2.0 → 0.4.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/dist/index.js CHANGED
@@ -1,82 +1,86 @@
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("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvbl9pZBgFIAEoCSKNAQoUQ29uZmlndXJhdGlvblJlbGVhc2USCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSDgoGbnVtYmVyGAMgASgFEhMKC3JlbGVhc2VkX2J5GAQgASgJEi8KC3JlbGVhc2VkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCK/AQoSQ29uZmlndXJhdGlvblN0YXRlEhkKEWRyYWZ0X3JldmlzaW9uX2lkGAE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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) => ({
1
+ import { toJson as se, fromJson as yt, create as Se } from "@bufbuild/protobuf";
2
+ import { file_google_protobuf_timestamp as ue, file_google_protobuf_struct as Ee, timestampDate as Zt } from "@bufbuild/protobuf/wkt";
3
+ import { createClient as le, ConnectError as ve, Code as me } from "@connectrpc/connect";
4
+ import { createConnectTransport as St } from "@connectrpc/connect-web";
5
+ import { messageDesc as x, fileDesc as P, serviceDesc as be } from "@bufbuild/protobuf/codegenv2";
6
+ import { R as Xt, C as At, N as he } from "./importhub-client-CrS-3Zuu.js";
7
+ import { jsxs as V, jsx as l, Fragment as z } from "react/jsx-runtime";
8
+ import { Link as $e, Box as K, Spinner as It, Stack as v, Alert as Je, Text as Q, Grid as Wt, HStack as k, MenuRoot as ht, MenuTrigger as Bt, MenuContent as Et, MenuItem as vt } from "@knkcs/anker/primitives";
9
+ import { ExternalLink as Jt, Blocks as ft, Ampersand as Ct, Waypoints as Yt, FileCog as Nt, FileUp as Ut, Trash2 as pe, Plus as j, ArrowUp as wt, ArrowDown as Ft, Settings2 as zt } from "lucide-react";
10
+ import { useTranslation as S } from "react-i18next";
11
+ import { I as X, u as Y, i as g, L, a as fe, b as O, c as et, d as tt, C as lt, V as nt, D as it, R as at, e as Ve, f as Ce, r as ot, M as Kt, g as Qt } from "./mapping-page-v0GJAPjW.js";
12
+ import { h as ln, j as nn, S as an, k as on } from "./mapping-page-v0GJAPjW.js";
13
+ import { EmptyState as kt, IconButton as re, Button as C, StatusBadge as Ye } from "@knkcs/anker/atoms";
14
+ import { useHostIdentity as B } from "@knkcs/anker/host";
15
+ import { IndexPageTemplate as q, DetailPageTemplate as D, usePageRail as ct } from "@knkcs/anker/templates";
16
+ import { useQuery as W, useQueryClient as _, useMutation as Ne } from "@tanstack/react-query";
17
+ import { ContextRail as J, Card as F, Modal as st, LinkCell as Ue, CountCell as xt, TruncatedTextCell as f, DataTable as ge, CodeCell as ke, SlugCell as Lt } from "@knkcs/anker/components";
18
+ import { InputField as N, TextareaField as we, BaseSelectField as Be, SwitchField as xe } from "@knkcs/anker/forms";
19
+ import { useState as H, useEffect as $, useMemo as M, useRef as Ht } from "react";
20
+ import { useForm as Re, useFieldArray as Mt, FormProvider as Ge, useFormContext as rt, useWatch as ye } from "react-hook-form";
21
+ import { Link as Tt } from "react-router";
22
+ import { zodResolver as Dt } from "@hookform/resolvers/zod";
23
+ import { FieldKitProvider as Pt, SpecForm as Le } from "@knkcs/fieldkit/renderer";
24
+ import { specToZodSchema as jt, builtInFieldTypes as He } from "@knkcs/fieldkit/schema";
25
+ const ee = /* @__PURE__ */ P("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvb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9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [ue]), Ot = /* @__PURE__ */ x(ee, 0), qt = /* @__PURE__ */ x(ee, 7);
26
+ var w = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.UNCHANGED = 1] = "UNCHANGED", e[e.ADDED = 2] = "ADDED", e[e.REMOVED = 3] = "REMOVED", e[e.CHANGED = 4] = "CHANGED", e))(w || {});
27
+ const dt = /* @__PURE__ */ P("Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSLwoHY29udGVudBgDIAEoCzIeLmltcG9ydGh1Yi52MS5FbnRpdHlTZXRDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKmAQoQRW50aXR5U2V0Q29udGVudBIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEj4KCGVudGl0aWVzGAMgAygLMiwuaW1wb3J0aHViLnYxLkVudGl0eVNldENvbnRlbnQuRW50aXRpZXNFbnRyeRovCg1FbnRpdGllc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiFwoVTGlzdEVudGl0eVNldHNSZXF1ZXN0IkYKFkxpc3RFbnRpdHlTZXRzUmVzcG9uc2USLAoLZW50aXR5X3NldHMYASADKAsyFy5pbXBvcnRodWIudjEuRW50aXR5U2V0IjYKE0dldEVudGl0eVNldFJlcXVlc3QSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkiQwoUR2V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hCh1QUk9DRVNTT1JfS0lORF9QT1NUX1BST0NFU1NPUhACKnsKD1Byb2Nlc3NvclRhcmdldBIgChxQUk9DRVNTT1JfVEFSR0VUX1VOU1BFQ0lGSUVEEAASIAocUFJPQ0VTU09SX1RBUkdFVF9TT1VSQ0VfRklMRRABEiQKIFBST0NFU1NPUl9UQVJHRVRfUklDSF9URVhUX0ZJRUxEEAIybwoQUHJvY2Vzc29yU2VydmljZRJbCg5MaXN0UHJvY2Vzc29ycxIjLmltcG9ydGh1Yi52MS5MaXN0UHJvY2Vzc29yc1JlcXVlc3QaJC5pbXBvcnRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [Ee]);
28
+ var ut = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.PREPROCESSOR = 1] = "PREPROCESSOR", e[e.POST_PROCESSOR = 2] = "POST_PROCESSOR", e))(ut || {}), bt = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SOURCE_FILE = 1] = "SOURCE_FILE", e[e.RICH_TEXT_FIELD = 2] = "RICH_TEXT_FIELD", e))(bt || {});
29
+ const nl = /* @__PURE__ */ be(ll, 0), te = (e) => ({
26
30
  valid: e?.valid ?? !1,
27
- reasons: (e?.reasons ?? []).map((n) => ({ path: n.path, code: n.code, message: n.message }))
28
- }), ke = (e) => ({
31
+ reasons: (e?.reasons ?? []).map((t) => ({ path: t.path, code: t.code, message: t.message }))
32
+ }), Ke = (e) => ({
29
33
  draftRevisionId: e?.draftRevisionId ?? "",
30
34
  draftDiffersFromRelease: e?.draftDiffersFromRelease ?? !0,
31
35
  ...e?.latestRelease ? { latestRelease: { id: e.latestRelease.id, number: e.latestRelease.number } } : {}
32
- }), De = (e) => ({
36
+ }), Te = (e) => ({
33
37
  processor: e.processor,
34
38
  settings: { ...e.settings ?? {} }
35
- }), je = (e) => ({
39
+ }), De = (e) => ({
36
40
  processor: e.processor,
37
41
  settings: e.settings
38
42
  });
39
- function ae(e) {
40
- const n = e.content;
43
+ function ne(e) {
44
+ const t = e.content;
41
45
  return {
42
46
  id: e.id,
43
47
  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
48
+ name: t?.name ?? "",
49
+ description: t?.description ?? "",
50
+ entitySetId: t?.entitySetId ?? "",
51
+ preprocessors: (t?.preprocessors ?? []).map(Te),
52
+ mappingIds: [...t?.mappingIds ?? []],
53
+ postProcessors: (t?.postProcessors ?? []).map(Te),
54
+ autoPublish: t?.autoPublish ?? !1,
55
+ deleteSourceFileOnSuccess: t?.deleteSourceFileOnSuccess ?? !1
52
56
  },
53
57
  // What an Import would meet now, not only what was decided at the save
54
58
  // (manage-import-profiles:AC6).
55
- validity: Ue(e.currentValidity ?? e.validity),
56
- state: ke(e.state)
59
+ validity: te(e.currentValidity ?? e.validity),
60
+ state: Ke(e.state)
57
61
  };
58
62
  }
59
- const Oe = (e) => Ze($t, {
63
+ const Pe = (e) => Se(mt, {
60
64
  ...e,
61
- preprocessors: e.preprocessors.map((n) => Ze(Te, je(n))),
62
- postProcessors: e.postProcessors.map((n) => Ze(Te, je(n)))
65
+ preprocessors: e.preprocessors.map((t) => Se(Me, De(t))),
66
+ postProcessors: e.postProcessors.map((t) => Se(Me, De(t)))
63
67
  });
64
- function re(e) {
65
- const n = e.content ? Vt(rt, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
68
+ function ie(e) {
69
+ const t = e.content ? se(ze, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
66
70
  return {
67
71
  id: e.id,
68
72
  content: {
69
- ...n,
70
- name: n.name ?? "",
71
- blueprintId: n.blueprintId ?? "",
72
- blueprintReleaseId: n.blueprintReleaseId ?? ""
73
+ ...t,
74
+ name: t.name ?? "",
75
+ blueprintId: t.blueprintId ?? "",
76
+ blueprintReleaseId: t.blueprintReleaseId ?? ""
73
77
  },
74
- validity: Ue(e.currentValidity ?? e.validity),
75
- state: ke(e.state)
78
+ validity: te(e.currentValidity ?? e.validity),
79
+ state: Ke(e.state)
76
80
  };
77
81
  }
78
- const _e = (e) => Rt(rt, e, { ignoreUnknownFields: !1 });
79
- function ce(e) {
82
+ const je = (e) => yt(ze, e, { ignoreUnknownFields: !1 });
83
+ function ae(e) {
80
84
  return {
81
85
  id: e.id,
82
86
  content: {
@@ -84,490 +88,476 @@ function ce(e) {
84
88
  description: e.content?.description ?? "",
85
89
  entities: { ...e.content?.entities ?? {} }
86
90
  },
87
- validity: Ue(e.validity),
88
- state: ke(e.state)
91
+ validity: te(e.validity),
92
+ state: Ke(e.state)
89
93
  };
90
94
  }
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
95
+ const Vt = (e) => e ? Zt(e).toISOString() : "", de = (e) => ({
96
+ id: e?.id ?? "",
97
+ number: e?.number ?? 0,
98
+ revisionId: e?.revisionId ?? "",
99
+ releasedBy: e?.releasedBy ?? "",
100
+ releasedAt: Vt(e?.releasedAt)
101
+ }), il = (e) => ({
102
+ id: e.id,
103
+ savedBy: e.savedBy,
104
+ savedAt: Vt(e.savedAt),
105
+ validity: te(e.validity),
106
+ restoredFromRevisionId: e.restoredFromRevisionId
107
+ }), Xe = (e) => ({
108
+ revisions: e.revisions.map(il),
109
+ releases: e.releases.map(de),
110
+ nextPageToken: e.nextPageToken
111
+ }), al = {
112
+ [w.UNSPECIFIED]: "changed",
113
+ [w.UNCHANGED]: "unchanged",
114
+ [w.ADDED]: "added",
115
+ [w.REMOVED]: "removed",
116
+ [w.CHANGED]: "changed"
117
+ }, Oe = (e, t) => ({
118
+ revisionId: e?.revisionId ?? "",
119
+ content: e?.content ? t(e.content) : {}
120
+ }), Ae = { useProtoFieldName: !0, alwaysEmitImplicit: !0 }, Ie = (e, t) => ({
121
+ from: Oe(e.from, t),
122
+ to: Oe(e.to, t),
123
+ fields: e.fields.map((i) => ({ field: i.field, status: al[i.status] ?? "changed" }))
124
+ });
125
+ function gt(e) {
126
+ const t = ve.from(e);
127
+ if (t.code === me.FailedPrecondition) {
128
+ const [i] = t.findDetails(qt);
129
+ if (i)
130
+ throw new At(
131
+ i.importProfiles.map((n) => ({ id: n.id, name: n.name })),
132
+ t.rawMessage
99
133
  );
100
134
  }
101
- throw n.code === Ee.AlreadyExists ? new We(n.rawMessage) : n;
135
+ throw t.code === me.AlreadyExists ? new he(t.rawMessage) : t;
102
136
  }
103
- async function f(e) {
137
+ async function ol(e) {
104
138
  try {
105
139
  return await e();
106
- } catch (n) {
107
- on(n);
140
+ } catch (t) {
141
+ const i = ve.from(t);
142
+ if (i.code === me.FailedPrecondition) {
143
+ const [n] = i.findDetails(Ot);
144
+ throw new Xt(i.rawMessage, n ? te(n) : void 0);
145
+ }
146
+ gt(t);
108
147
  }
109
148
  }
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);
149
+ async function y(e) {
150
+ try {
151
+ return await e();
152
+ } catch (t) {
153
+ gt(t);
154
+ }
155
+ }
156
+ function Hl(e) {
157
+ const t = e.transport ?? St({ baseUrl: e.baseUrl, fetch: e.fetch }), i = le(el, t), n = le(nl, t), c = le(tl, t), s = le($t, t);
112
158
  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))
159
+ listImportProfiles: () => y(async () => (await i.listImportProfiles({})).importProfiles.map(ne)),
160
+ getImportProfile: (a) => y(
161
+ async () => ne(E((await i.getImportProfile({ id: a })).importProfile))
116
162
  ),
117
- createImportProfile: (o) => f(
118
- async () => ae(
119
- k(
120
- (await l.createImportProfile({ content: Oe(o) })).importProfile
163
+ createImportProfile: (a) => y(
164
+ async () => ne(
165
+ E(
166
+ (await i.createImportProfile({ content: Pe(a) })).importProfile
121
167
  )
122
168
  )
123
169
  ),
124
- updateImportProfile: (o, c, p) => f(
125
- async () => ae(
126
- k(
127
- (await l.updateImportProfile({
128
- id: o,
129
- content: Oe(c),
170
+ updateImportProfile: (a, r, p) => y(
171
+ async () => ne(
172
+ E(
173
+ (await i.updateImportProfile({
174
+ id: a,
175
+ content: Pe(r),
130
176
  draftRevisionId: p
131
177
  })).importProfile
132
178
  )
133
179
  )
134
180
  ),
135
- deleteImportProfile: (o) => f(async () => {
136
- await l.deleteImportProfile({ id: o });
181
+ deleteImportProfile: (a) => y(async () => {
182
+ await i.deleteImportProfile({ id: a });
137
183
  }),
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
184
+ listProcessors: () => y(
185
+ async () => (await n.listProcessors({})).processors.map((a) => ({
186
+ name: a.name,
187
+ kind: a.kind === ut.POST_PROCESSOR ? "post_processor" : "preprocessor",
188
+ target: a.target === bt.RICH_TEXT_FIELD ? "rich_text_field" : "source_file",
189
+ description: a.description,
190
+ settingsSpec: a.settingsSpec
145
191
  }))
146
192
  ),
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
193
+ listMappings: () => y(async () => (await c.listMappings({})).mappings.map(ie)),
194
+ getMapping: (a) => y(async () => ie(E((await c.getMapping({ id: a })).mapping))),
195
+ createMapping: (a) => y(
196
+ async () => ie(
197
+ E(
198
+ (await c.createMapping({ content: je(a) })).mapping
153
199
  )
154
200
  )
155
201
  ),
156
- updateMapping: (o, c, p) => f(
157
- async () => re(
158
- k(
159
- (await a.updateMapping({
160
- id: o,
161
- content: _e(c),
202
+ updateMapping: (a, r, p) => y(
203
+ async () => ie(
204
+ E(
205
+ (await c.updateMapping({
206
+ id: a,
207
+ content: je(r),
162
208
  draftRevisionId: p
163
209
  })).mapping
164
210
  )
165
211
  )
166
212
  ),
167
- deleteMapping: (o) => f(async () => {
168
- await a.deleteMapping({ id: o });
213
+ deleteMapping: (a) => y(async () => {
214
+ await c.deleteMapping({ id: a });
169
215
  }),
170
- listMappingImportProfiles: (o) => f(
171
- async () => (await a.listMappingImportProfiles({ id: o })).importProfiles.map((c) => ({
172
- id: c.id,
173
- name: c.name
216
+ listMappingImportProfiles: (a) => y(
217
+ async () => (await c.listMappingImportProfiles({ id: a })).importProfiles.map((r) => ({
218
+ id: r.id,
219
+ name: r.name
174
220
  }))
175
221
  ),
176
- checkMappingBlueprintRelease: (o, c) => f(async () => {
177
- const p = await a.checkMappingBlueprintRelease({ id: o, blueprintReleaseId: c });
222
+ checkMappingBlueprintRelease: (a, r) => y(async () => {
223
+ const p = await c.checkMappingBlueprintRelease({ id: a, blueprintReleaseId: r });
178
224
  return {
179
225
  blueprintId: p.blueprintId,
180
226
  missingFieldPaths: [...p.missingFieldPaths],
181
227
  missingReleaseSpecFields: [...p.missingReleaseSpecFields]
182
228
  };
183
229
  }),
184
- listEntitySets: () => f(async () => (await s.listEntitySets({})).entitySets.map(ce)),
185
- getEntitySet: (o) => f(
186
- async () => ce(k((await s.getEntitySet({ id: o })).entitySet))
230
+ listEntitySets: () => y(async () => (await s.listEntitySets({})).entitySets.map(ae)),
231
+ getEntitySet: (a) => y(
232
+ async () => ae(E((await s.getEntitySet({ id: a })).entitySet))
187
233
  ),
188
- createEntitySet: (o) => f(
189
- async () => ce(k((await s.createEntitySet({ content: o })).entitySet))
234
+ createEntitySet: (a) => y(
235
+ async () => ae(E((await s.createEntitySet({ content: a })).entitySet))
190
236
  ),
191
- updateEntitySet: (o, c, p) => f(
192
- async () => ce(
193
- k(
194
- (await s.updateEntitySet({ id: o, content: c, draftRevisionId: p })).entitySet
237
+ updateEntitySet: (a, r, p) => y(
238
+ async () => ae(
239
+ E(
240
+ (await s.updateEntitySet({ id: a, content: r, draftRevisionId: p })).entitySet
195
241
  )
196
242
  )
197
243
  ),
198
- deleteEntitySet: (o) => f(async () => {
199
- await s.deleteEntitySet({ id: o });
244
+ deleteEntitySet: (a) => y(async () => {
245
+ await s.deleteEntitySet({ id: a });
246
+ }),
247
+ // One RPC per kind of configuration, each on its own service (the
248
+ // protos have no configuration service: a client always knows which
249
+ // kind it looks at); the screens ask by kind.
250
+ cutRelease: (a, r, p) => ol(async () => {
251
+ const m = { id: r, draftRevisionId: p };
252
+ switch (a) {
253
+ case "importProfile":
254
+ return {
255
+ release: de((await i.cutImportProfileRelease(m)).release),
256
+ importProfiles: []
257
+ };
258
+ case "mapping": {
259
+ const d = await c.cutMappingRelease(m);
260
+ return {
261
+ release: de(d.release),
262
+ importProfiles: d.importProfiles.map((o) => ({ id: o.id, name: o.name }))
263
+ };
264
+ }
265
+ case "entitySet":
266
+ return {
267
+ release: de((await s.cutEntitySetRelease(m)).release),
268
+ importProfiles: []
269
+ };
270
+ }
271
+ }),
272
+ listHistory: (a, r, p) => y(async () => {
273
+ const m = { id: r, pageToken: p };
274
+ switch (a) {
275
+ case "importProfile":
276
+ return Xe(await i.listImportProfileHistory(m));
277
+ case "mapping":
278
+ return Xe(await c.listMappingHistory(m));
279
+ case "entitySet":
280
+ return Xe(await s.listEntitySetHistory(m));
281
+ }
282
+ }),
283
+ compareRevisions: (a, r, p, m) => y(async () => {
284
+ const d = { id: r, fromRevisionId: p, toRevisionId: m };
285
+ switch (a) {
286
+ case "importProfile":
287
+ return Ie(
288
+ await i.compareImportProfileRevisions(d),
289
+ (o) => se(mt, o, Ae)
290
+ );
291
+ case "mapping":
292
+ return Ie(
293
+ await c.compareMappingRevisions(d),
294
+ (o) => se(ze, o, Ae)
295
+ );
296
+ case "entitySet":
297
+ return Ie(
298
+ await s.compareEntitySetRevisions(d),
299
+ (o) => se(_t, o, Ae)
300
+ );
301
+ }
302
+ }),
303
+ restoreRevision: (a, r, p, m) => y(async () => {
304
+ const d = { id: r, revisionId: p, draftRevisionId: m };
305
+ switch (a) {
306
+ case "importProfile":
307
+ await i.restoreImportProfileRevision(d);
308
+ return;
309
+ case "mapping":
310
+ await c.restoreMappingRevision(d);
311
+ return;
312
+ case "entitySet":
313
+ await s.restoreEntitySetRevision(d);
314
+ return;
315
+ }
200
316
  })
201
317
  };
202
318
  }
203
- function k(e) {
319
+ function E(e) {
204
320
  if (e === void 0)
205
- throw new nt("importhub answered without a message", Ee.Internal);
321
+ throw new ve("importhub answered without a message", me.Internal);
206
322
  return e;
207
323
  }
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 = [
246
- "imports",
247
- "profiles",
248
- "mappings",
249
- "entitySets",
250
- "processors"
251
- ];
252
- function q(e, n, l) {
253
- return `${e[n].replace(/\/$/, "")}/${encodeURIComponent(l)}`;
254
- }
255
- const kn = {
256
- imports: "/imports",
257
- profiles: "/settings/import-profiles",
258
- mappings: "/settings/mappings",
259
- entitySets: "/settings/entity-sets",
260
- processors: "/settings/processors"
261
- }, zn = {
262
- paths: kn,
263
- changeSetHref: () => null
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 })
324
+ function Ml({ changeSetId: e }) {
325
+ const { t } = S(X), i = Y().changeSetHref(e);
326
+ return i ? /* @__PURE__ */ V($e, { href: i, target: "_blank", rel: "noopener noreferrer", children: [
327
+ t("changeSet.open"),
328
+ /* @__PURE__ */ l(Jt, { size: 14, "aria-hidden": !0 })
276
329
  ] }) : null;
277
330
  }
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
331
+ const cl = {
332
+ imports: Ut,
333
+ profiles: Nt,
334
+ mappings: Yt,
335
+ entitySets: Ct,
336
+ processors: ft
296
337
  };
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,
338
+ function Tl({ client: e, section: t }) {
339
+ const { t: i } = S(X), n = cl[t];
340
+ return /* @__PURE__ */ l(q, { title: i(`section.${t}.title`), children: /* @__PURE__ */ l(K, { px: "8", py: "6", children: /* @__PURE__ */ l(
341
+ kt,
301
342
  {
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 })
343
+ icon: /* @__PURE__ */ l(n, { size: 32, "aria-hidden": !0 }),
344
+ header: i(`section.${t}.title`),
345
+ description: /* @__PURE__ */ l(sl, { client: e, section: t })
305
346
  }
306
347
  ) }) });
307
348
  }
308
- function Mn({ client: e, section: n }) {
309
- switch (n) {
349
+ function sl({ client: e, section: t }) {
350
+ switch (t) {
310
351
  case "profiles":
311
- return /* @__PURE__ */ t(
312
- fe,
352
+ return /* @__PURE__ */ l(
353
+ We,
313
354
  {
314
- section: n,
315
- queryKey: h.importProfiles,
355
+ section: t,
356
+ queryKey: g.importProfiles,
316
357
  read: () => e.listImportProfiles()
317
358
  }
318
359
  );
319
360
  case "entitySets":
320
- return /* @__PURE__ */ t(
321
- fe,
361
+ return /* @__PURE__ */ l(
362
+ We,
322
363
  {
323
- section: n,
324
- queryKey: h.entitySets,
364
+ section: t,
365
+ queryKey: g.entitySets,
325
366
  read: () => e.listEntitySets()
326
367
  }
327
368
  );
328
369
  case "processors":
329
- return /* @__PURE__ */ t(
330
- fe,
370
+ return /* @__PURE__ */ l(
371
+ We,
331
372
  {
332
- section: n,
333
- queryKey: h.processors,
373
+ section: t,
374
+ queryKey: g.processors,
334
375
  read: () => e.listProcessors()
335
376
  }
336
377
  );
337
378
  default:
338
- return /* @__PURE__ */ t(xn, { section: n });
379
+ return /* @__PURE__ */ l(rl, { section: t });
339
380
  }
340
381
  }
341
- function xn({ section: e }) {
342
- const { t: n } = V(S);
343
- return /* @__PURE__ */ t(x, { children: n(`section.${e}.empty`) });
382
+ function rl({ section: e }) {
383
+ const { t } = S(X);
384
+ return /* @__PURE__ */ l(z, { children: t(`section.${e}.empty`) });
344
385
  }
345
- function fe({
386
+ function We({
346
387
  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 }) });
352
- }
353
- function ze({
354
- open: e,
355
- onClose: n,
356
- title: l,
357
- message: i,
358
- onDelete: a,
359
- onDeleted: s
388
+ queryKey: t,
389
+ read: i
360
390
  }) {
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}`)) }) });
391
+ const { t: n } = S(X), { workspaceId: c } = B(), s = W({ queryKey: t(c), queryFn: i });
392
+ return s.isPending ? /* @__PURE__ */ l(It, { size: "sm", "aria-label": n("startPage.loading") }) : s.isError ? /* @__PURE__ */ l(z, { children: n("startPage.error") }) : /* @__PURE__ */ l(z, { children: n(`section.${e}.summary`, { count: s.data.length }) });
409
393
  }
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) => ({
394
+ const oe = (e) => ({
429
395
  name: e.name,
430
396
  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) => ({
397
+ entities: Object.entries(e.entities).sort(([t], [i]) => t.localeCompare(i)).map(([t, i]) => ({ name: t, text: i }))
398
+ }), dl = (e) => ({
433
399
  name: e.name,
434
400
  description: e.description,
435
401
  entities: Object.fromEntries(
436
- e.entities.filter((n) => n.name.trim() !== "").map((n) => [n.name.trim(), n.text])
402
+ e.entities.filter((t) => t.name.trim() !== "").map((t) => [t.name.trim(), t.text])
437
403
  )
438
404
  });
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)
405
+ function Dl({ client: e, id: t, onDeleted: i }) {
406
+ const { t: n } = S(X), { workspaceId: c } = B(), s = W({
407
+ queryKey: g.entitySet(c, t),
408
+ queryFn: () => e.getEntitySet(t)
443
409
  });
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 });
410
+ return s.isError || !s.data ? /* @__PURE__ */ l(D, { title: n("section.entitySets.title"), children: s.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(fe, {}) }) : /* @__PURE__ */ l(ml, { client: e, entitySet: s.data, onDeleted: i });
445
411
  }
446
- function Hn({
412
+ function ml({
447
413
  client: e,
448
- entitySet: n,
449
- onDeleted: l
414
+ entitySet: t,
415
+ onDeleted: i
450
416
  }) {
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) });
417
+ const { t: n } = S(X), { workspaceId: c } = B(), { paths: s } = Y(), a = O(), r = _(), [p, m] = H(!1), d = Re({ defaultValues: oe(t.content) }), { reset: o, formState: u, control: G } = d, b = Mt({ control: G, name: "entities" });
418
+ $(() => {
419
+ u.isDirty || o(oe(t.content));
420
+ }, [t, o, u.isDirty]);
421
+ const Z = Ne({
422
+ mutationFn: (A) => e.updateEntitySet(t.id, dl(A), t.state.draftRevisionId),
423
+ onSuccess: (A) => {
424
+ r.setQueryData(g.entitySet(c, A.id), A), o(oe(A.content)), r.invalidateQueries({ queryKey: g.entitySets(c) });
459
425
  }
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
- ) })
426
+ }), I = d.handleSubmit((A) => Z.mutate(A)), [U, Ze] = et(), T = tt({
427
+ client: e,
428
+ kind: "entitySet",
429
+ id: t.id,
430
+ validity: t.validity,
431
+ state: t.state,
432
+ unsaved: u.isDirty
433
+ });
434
+ return ct(
435
+ a ? /* @__PURE__ */ V(J, { storageKey: "importhub.entitySet.rail", children: [
436
+ /* @__PURE__ */ l(J.Header, { title: n("rail.title") }),
437
+ /* @__PURE__ */ V(J.Section, { id: "actions", label: n("rail.actions"), children: [
438
+ T.railAction,
439
+ /* @__PURE__ */ l(
440
+ J.IconButton,
441
+ {
442
+ label: n("entitySets.delete"),
443
+ icon: /* @__PURE__ */ l(pe, { size: 16 }),
444
+ tone: "outline-red",
445
+ onClick: () => m(!0)
446
+ }
447
+ )
448
+ ] })
473
449
  ] }) : null
474
- ), /* @__PURE__ */ b(
475
- H,
450
+ ), /* @__PURE__ */ V(
451
+ D,
476
452
  {
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,
453
+ title: t.content.name,
454
+ breadcrumbs: [{ label: n("section.entitySets.title"), to: s.entitySets }],
455
+ badges: /* @__PURE__ */ V(k, { gap: "2", children: [
456
+ /* @__PURE__ */ l(
457
+ Ye,
482
458
  {
483
- tone: n.validity.valid ? "success" : "danger",
484
- label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
459
+ tone: t.validity.valid ? "success" : "danger",
460
+ label: t.validity.valid ? n("validity.valid") : n("validity.invalid")
485
461
  }
486
462
  ),
487
- /* @__PURE__ */ t(Je, { children: oe(n.state, i) })
463
+ /* @__PURE__ */ l(at, { state: t.state })
488
464
  ] }),
489
- actions: o ? /* @__PURE__ */ t(
490
- E,
465
+ tabs: Ze,
466
+ actions: a ? /* @__PURE__ */ l(
467
+ C,
491
468
  {
492
469
  variant: "solid",
493
470
  disabled: !u.isDirty,
494
- loading: R.isPending,
471
+ loading: Z.isPending,
495
472
  onClick: () => {
496
- G();
473
+ I();
497
474
  },
498
- children: i("common.save")
475
+ children: n("common.save")
499
476
  }
500
477
  ) : void 0,
501
478
  children: [
502
- /* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ t(_, { ...m, children: /* @__PURE__ */ t(
479
+ U === "history" ? /* @__PURE__ */ l(
480
+ lt,
481
+ {
482
+ client: e,
483
+ kind: "entitySet",
484
+ id: t.id,
485
+ draftRevisionId: t.state.draftRevisionId,
486
+ onRestored: async () => {
487
+ const A = await e.getEntitySet(t.id);
488
+ r.setQueryData(g.entitySet(c, A.id), A), o(oe(A.content));
489
+ }
490
+ }
491
+ ) : /* @__PURE__ */ l(K, { px: "8", py: "6", children: /* @__PURE__ */ l(Ge, { ...d, children: /* @__PURE__ */ l(
503
492
  "form",
504
493
  {
505
- onSubmit: (Z) => {
506
- Z.preventDefault(), o && G();
494
+ onSubmit: (A) => {
495
+ A.preventDefault(), a && I();
507
496
  },
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(
497
+ children: /* @__PURE__ */ V(v, { gap: "4", children: [
498
+ T.notice,
499
+ /* @__PURE__ */ l(nt, { validity: t.validity }),
500
+ Z.isError ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: n("save.failed"), children: Z.error.message }) : null,
501
+ /* @__PURE__ */ l(F, { title: n("entitySets.general"), children: /* @__PURE__ */ V(v, { gap: "4", children: [
502
+ /* @__PURE__ */ l(
513
503
  N,
514
504
  {
515
505
  name: "name",
516
- label: i("fields.name"),
506
+ label: n("fields.name"),
517
507
  required: !0,
518
- disabled: !o
508
+ disabled: !a
519
509
  }
520
510
  ),
521
- /* @__PURE__ */ t(
522
- Re,
511
+ /* @__PURE__ */ l(
512
+ we,
523
513
  {
524
514
  name: "description",
525
- label: i("fields.description"),
526
- disabled: !o
515
+ label: n("fields.description"),
516
+ disabled: !a
527
517
  }
528
518
  )
529
519
  ] }) }),
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(
520
+ /* @__PURE__ */ l(F, { title: n("entitySets.entities"), children: /* @__PURE__ */ V(v, { gap: "3", children: [
521
+ b.fields.length === 0 ? /* @__PURE__ */ l(Q, { color: "fg.muted", children: n("entitySets.noEntities") }) : null,
522
+ b.fields.map((A, h) => /* @__PURE__ */ V(Wt, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
523
+ /* @__PURE__ */ l(
534
524
  N,
535
525
  {
536
- name: `entities.${B}.name`,
537
- label: i("entitySets.entityName", { index: B + 1 }),
526
+ name: `entities.${h}.name`,
527
+ label: n("entitySets.entityName", { index: h + 1 }),
538
528
  prepend: "&",
539
529
  append: ";",
540
- disabled: !o
530
+ disabled: !a
541
531
  }
542
532
  ),
543
- /* @__PURE__ */ t(
533
+ /* @__PURE__ */ l(
544
534
  N,
545
535
  {
546
- name: `entities.${B}.text`,
547
- label: i("entitySets.entityText", { index: B + 1 }),
548
- disabled: !o
536
+ name: `entities.${h}.text`,
537
+ label: n("entitySets.entityText", { index: h + 1 }),
538
+ disabled: !a
549
539
  }
550
540
  ),
551
- o ? /* @__PURE__ */ t(
552
- pe,
541
+ a ? /* @__PURE__ */ l(
542
+ re,
553
543
  {
554
- "aria-label": i("entitySets.removeEntity", { index: B + 1 }),
544
+ "aria-label": n("entitySets.removeEntity", { index: h + 1 }),
555
545
  variant: "ghost",
556
546
  colorPalette: "red",
557
- onClick: () => g.remove(B),
558
- children: /* @__PURE__ */ t(ee, { size: 16 })
547
+ onClick: () => b.remove(h),
548
+ children: /* @__PURE__ */ l(pe, { size: 16 })
559
549
  }
560
- ) : /* @__PURE__ */ t("span", {})
561
- ] }, Z.id)),
562
- o ? /* @__PURE__ */ t(F, { children: /* @__PURE__ */ b(
563
- E,
550
+ ) : /* @__PURE__ */ l("span", {})
551
+ ] }, A.id)),
552
+ a ? /* @__PURE__ */ l(K, { children: /* @__PURE__ */ V(
553
+ C,
564
554
  {
565
555
  variant: "outline",
566
556
  size: "sm",
567
- onClick: () => g.append({ name: "", text: "" }),
557
+ onClick: () => b.append({ name: "", text: "" }),
568
558
  children: [
569
- /* @__PURE__ */ t(ne, { size: 14, "aria-hidden": !0 }),
570
- i("entitySets.addEntity")
559
+ /* @__PURE__ */ l(j, { size: 14, "aria-hidden": !0 }),
560
+ n("entitySets.addEntity")
571
561
  ]
572
562
  }
573
563
  ) }) : null
@@ -575,18 +565,19 @@ function Hn({
575
565
  ] })
576
566
  }
577
567
  ) }) }),
578
- /* @__PURE__ */ t(
579
- ze,
568
+ T.dialog,
569
+ /* @__PURE__ */ l(
570
+ it,
580
571
  {
581
572
  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),
573
+ onClose: () => m(!1),
574
+ title: n("entitySets.deleteTitle", { name: t.content.name }),
575
+ message: n("entitySets.deleteMessage"),
576
+ onDelete: () => e.deleteEntitySet(t.id),
586
577
  onDeleted: () => {
587
- d(!1), c.removeQueries({
588
- queryKey: h.entitySet(a, n.id)
589
- }), c.invalidateQueries({ queryKey: h.entitySets(a) }), l();
578
+ m(!1), r.removeQueries({
579
+ queryKey: g.entitySet(c, t.id)
580
+ }), r.invalidateQueries({ queryKey: g.entitySets(c) }), i();
590
581
  }
591
582
  }
592
583
  )
@@ -594,433 +585,138 @@ function Hn({
594
585
  }
595
586
  );
596
587
  }
597
- function xe({
588
+ function Qe({
598
589
  open: e,
599
- onClose: n,
600
- title: l,
601
- children: i,
602
- defaultValues: a,
590
+ onClose: t,
591
+ title: i,
592
+ children: n,
593
+ defaultValues: c,
603
594
  onCreate: s,
604
- onCreated: o
595
+ onCreated: a
605
596
  }) {
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") });
597
+ const { t: r } = S(X), p = Re({
598
+ defaultValues: { name: "", description: "", ...c }
599
+ }), m = Ne({ mutationFn: s, onSuccess: a }), { reset: d } = p, { reset: o } = m;
600
+ $(() => {
601
+ e && (d({ name: "", description: "", ...c }), o());
602
+ }, [e, d, o, c]);
603
+ const u = p.handleSubmit((G) => {
604
+ if (!G.name.trim()) {
605
+ p.setError("name", { message: r("create.nameRequired") });
615
606
  return;
616
607
  }
617
- d.mutate(y, {
618
- onError: (g) => {
619
- g instanceof We && p.setError("name", { message: c("create.nameTaken") });
608
+ m.mutate(G, {
609
+ onError: (b) => {
610
+ b instanceof he && p.setError("name", { message: r("create.nameTaken") });
620
611
  }
621
612
  });
622
613
  });
623
- return /* @__PURE__ */ t(
624
- Se,
614
+ return /* @__PURE__ */ l(
615
+ st,
625
616
  {
626
617
  open: e,
627
- onClose: n,
628
- header: l,
618
+ onClose: t,
619
+ header: i,
629
620
  lazyMount: !0,
630
621
  unmountOnExit: !0,
631
- saveLabel: c("common.create"),
632
- cancelLabel: c("common.cancel"),
622
+ saveLabel: r("common.create"),
623
+ cancelLabel: r("common.cancel"),
633
624
  onSave: () => {
634
625
  u();
635
626
  },
636
- loading: d.isPending,
637
- children: /* @__PURE__ */ t(_, { ...p, children: /* @__PURE__ */ t(
627
+ loading: m.isPending,
628
+ children: /* @__PURE__ */ l(Ge, { ...p, children: /* @__PURE__ */ l(
638
629
  "form",
639
630
  {
640
- onSubmit: (y) => {
641
- y.preventDefault(), u();
631
+ onSubmit: (G) => {
632
+ G.preventDefault(), u();
642
633
  },
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
634
+ children: /* @__PURE__ */ V(v, { gap: "4", children: [
635
+ /* @__PURE__ */ l(N, { name: "name", label: r("fields.name"), required: !0 }),
636
+ /* @__PURE__ */ l(we, { name: "description", label: r("fields.description") }),
637
+ n,
638
+ m.isError && !(m.error instanceof he) ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: r("create.failed") }) : null
648
639
  ] })
649
640
  }
650
641
  ) })
651
642
  }
652
643
  );
653
644
  }
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),
645
+ function Pl({ client: e, onOpen: t }) {
646
+ const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
647
+ queryKey: g.entitySets(n),
657
648
  queryFn: () => e.listEntitySets()
658
- }), m = T(
649
+ }), d = M(
659
650
  () => [
660
651
  {
661
652
  id: "name",
662
- header: l("fields.name"),
663
- cell: (r) => /* @__PURE__ */ t(
664
- Ne,
653
+ header: i("fields.name"),
654
+ cell: (o) => /* @__PURE__ */ l(
655
+ Ue,
665
656
  {
666
- to: q(a, "entitySets", r.row.original.id),
667
- label: r.row.original.content.name
657
+ to: Ve(c, "entitySets", o.row.original.id),
658
+ label: o.row.original.content.name
668
659
  }
669
660
  )
670
661
  },
671
662
  {
672
663
  id: "entities",
673
- header: l("entitySets.entities"),
664
+ header: i("entitySets.entities"),
674
665
  size: 120,
675
- cell: (r) => /* @__PURE__ */ t(
676
- Lt,
666
+ cell: (o) => /* @__PURE__ */ l(
667
+ xt,
677
668
  {
678
- value: r.row.original.content.entities,
679
- singular: l("entitySets.entity"),
680
- plural: l("entitySets.entities")
669
+ value: o.row.original.content.entities,
670
+ singular: i("entitySets.entity"),
671
+ plural: i("entitySets.entities")
681
672
  }
682
673
  )
683
674
  },
684
675
  {
685
676
  id: "validity",
686
- header: l("validity.column"),
687
- cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
677
+ header: i("validity.column"),
678
+ cell: (o) => /* @__PURE__ */ l(Ce, { validity: o.row.original.validity })
688
679
  },
689
680
  {
690
681
  id: "release",
691
- header: l("release.column"),
682
+ header: i("release.column"),
692
683
  size: 140,
693
- cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
684
+ cell: (o) => /* @__PURE__ */ l(f, { value: ot(o.row.original.state, i) })
694
685
  }
695
686
  ],
696
- [l, a]
687
+ [i, c]
697
688
  );
698
- return /* @__PURE__ */ b(
699
- ie,
689
+ return /* @__PURE__ */ V(
690
+ q,
700
691
  {
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")
692
+ title: i("section.entitySets.title"),
693
+ actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
694
+ /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
695
+ i("entitySets.new")
705
696
  ] }) : void 0,
706
697
  children: [
707
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
708
- Ve,
698
+ m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
699
+ ge,
709
700
  {
710
- columns: m,
711
- data: d.data ?? [],
712
- loading: d.isPending,
713
- getRowId: (r) => r.id,
714
- emptyState: l("entitySets.empty")
701
+ columns: d,
702
+ data: m.data ?? [],
703
+ loading: m.isPending,
704
+ getRowId: (o) => o.id,
705
+ emptyState: i("entitySets.empty")
715
706
  }
716
707
  ),
717
- /* @__PURE__ */ t(
718
- xe,
708
+ /* @__PURE__ */ l(
709
+ Qe,
719
710
  {
720
- open: c,
711
+ open: r,
721
712
  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;
713
+ title: i("entitySets.new"),
714
+ onCreate: async ({ name: o, description: u }) => {
715
+ const G = await e.createEntitySet({ name: o, description: u, entities: {} });
716
+ return await a.invalidateQueries({ queryKey: g.entitySets(n) }), G.id;
726
717
  },
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();
718
+ onCreated: (o) => {
719
+ p(!1), t(o);
1024
720
  }
1025
721
  }
1026
722
  )
@@ -1028,17 +724,14 @@ function jn({
1028
724
  }
1029
725
  );
1030
726
  }
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
- ] });
727
+ function jl({ client: e, id: t, onDeleted: i }) {
728
+ return /* @__PURE__ */ l(Kt, { client: e, id: t, onDeleted: i });
1036
729
  }
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(
730
+ function pl() {
731
+ const { t: e } = S(X), { blueprints: t } = Y();
732
+ return t ? /* @__PURE__ */ l(ul, {}) : /* @__PURE__ */ V(z, { children: [
733
+ /* @__PURE__ */ l(N, { name: "blueprintId", label: e("mappings.blueprintId"), required: !0 }),
734
+ /* @__PURE__ */ l(
1042
735
  N,
1043
736
  {
1044
737
  name: "blueprintReleaseId",
@@ -1049,80 +742,80 @@ function On() {
1049
742
  )
1050
743
  ] });
1051
744
  }
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([]),
745
+ function ul() {
746
+ const { t: e } = S(X), { blueprints: t } = Y(), { workspaceId: i } = B(), { control: n, setValue: c } = rt(), s = ye({ control: n, name: "blueprintId" }), a = Ht(s);
747
+ $(() => {
748
+ a.current !== s && c("blueprintReleaseId", ""), a.current = s;
749
+ }, [s, c]);
750
+ const r = W({
751
+ queryKey: g.blueprints(i),
752
+ queryFn: () => t?.listBlueprints() ?? Promise.resolve([])
753
+ }), p = W({
754
+ queryKey: g.blueprintReleases(i, s ?? ""),
755
+ queryFn: () => t?.listReleases(s) ?? Promise.resolve([]),
1063
756
  enabled: !!s
1064
757
  });
1065
- return /* @__PURE__ */ b(x, { children: [
1066
- /* @__PURE__ */ t(
1067
- me,
758
+ return /* @__PURE__ */ V(z, { children: [
759
+ /* @__PURE__ */ l(
760
+ Be,
1068
761
  {
1069
762
  name: "blueprintId",
1070
763
  label: e("mappings.blueprint"),
1071
764
  required: !0,
1072
- options: (c.data ?? []).map((d) => ({ id: d.id, label: d.name }))
765
+ options: (r.data ?? []).map((m) => ({ id: m.id, label: m.name }))
1073
766
  }
1074
767
  ),
1075
- /* @__PURE__ */ t(
1076
- me,
768
+ /* @__PURE__ */ l(
769
+ Be,
1077
770
  {
1078
771
  name: "blueprintReleaseId",
1079
772
  label: e("mappings.release"),
1080
773
  required: !0,
1081
774
  disabled: !s,
1082
- options: (p.data ?? []).map((d) => ({ id: d.id, label: d.label }))
775
+ options: (p.data ?? []).map((m) => ({ id: m.id, label: m.label }))
1083
776
  }
1084
777
  )
1085
778
  ] });
1086
779
  }
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),
780
+ const bl = { blueprintId: "", blueprintReleaseId: "" };
781
+ function Ol({ client: e, onOpen: t }) {
782
+ const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
783
+ queryKey: g.mappings(n),
1091
784
  queryFn: () => e.listMappings()
1092
- }), m = mt((d.data ?? []).map((u) => u.content.blueprintId)), r = T(
785
+ }), d = Qt((m.data ?? []).map((u) => u.content.blueprintId)), o = M(
1093
786
  () => [
1094
787
  {
1095
788
  id: "name",
1096
- header: l("fields.name"),
1097
- cell: (u) => /* @__PURE__ */ t(
1098
- Ne,
789
+ header: i("fields.name"),
790
+ cell: (u) => /* @__PURE__ */ l(
791
+ Ue,
1099
792
  {
1100
- to: q(a, "mappings", u.row.original.id),
793
+ to: Ve(c, "mappings", u.row.original.id),
1101
794
  label: u.row.original.content.name
1102
795
  }
1103
796
  )
1104
797
  },
1105
- m.available ? {
798
+ d.available ? {
1106
799
  id: "blueprint",
1107
- header: l("mappings.blueprint"),
1108
- cell: (u) => /* @__PURE__ */ t(
1109
- M,
800
+ header: i("mappings.blueprint"),
801
+ cell: (u) => /* @__PURE__ */ l(
802
+ f,
1110
803
  {
1111
- value: m.blueprintName(u.row.original.content.blueprintId) ?? ""
804
+ value: d.blueprintName(u.row.original.content.blueprintId) ?? ""
1112
805
  }
1113
806
  )
1114
807
  } : {
1115
808
  id: "blueprint",
1116
- header: l("mappings.blueprintId"),
1117
- cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintId })
809
+ header: i("mappings.blueprintId"),
810
+ cell: (u) => /* @__PURE__ */ l(ke, { value: u.row.original.content.blueprintId })
1118
811
  },
1119
- m.available ? {
812
+ d.available ? {
1120
813
  id: "release",
1121
- header: l("mappings.release"),
1122
- cell: (u) => /* @__PURE__ */ t(
1123
- M,
814
+ header: i("mappings.release"),
815
+ cell: (u) => /* @__PURE__ */ l(
816
+ f,
1124
817
  {
1125
- value: m.releaseLabel(
818
+ value: d.releaseLabel(
1126
819
  u.row.original.content.blueprintId,
1127
820
  u.row.original.content.blueprintReleaseId
1128
821
  ) ?? ""
@@ -1130,136 +823,136 @@ function Fi({ client: e, onOpen: n }) {
1130
823
  )
1131
824
  } : {
1132
825
  id: "release",
1133
- header: l("mappings.releaseId"),
1134
- cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintReleaseId })
826
+ header: i("mappings.releaseId"),
827
+ cell: (u) => /* @__PURE__ */ l(ke, { value: u.row.original.content.blueprintReleaseId })
1135
828
  },
1136
829
  {
1137
830
  id: "validity",
1138
- header: l("validity.column"),
1139
- cell: (u) => /* @__PURE__ */ t(Me, { validity: u.row.original.validity })
831
+ header: i("validity.column"),
832
+ cell: (u) => /* @__PURE__ */ l(Ce, { validity: u.row.original.validity })
1140
833
  }
1141
834
  ],
1142
- [l, a, m]
835
+ [i, c, d]
1143
836
  );
1144
- return /* @__PURE__ */ b(
1145
- ie,
837
+ return /* @__PURE__ */ V(
838
+ q,
1146
839
  {
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")
840
+ title: i("section.mappings.title"),
841
+ actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
842
+ /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
843
+ i("mappings.new")
1151
844
  ] }) : void 0,
1152
845
  children: [
1153
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1154
- Ve,
846
+ m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
847
+ ge,
1155
848
  {
1156
- columns: r,
1157
- data: d.data ?? [],
1158
- loading: d.isPending,
849
+ columns: o,
850
+ data: m.data ?? [],
851
+ loading: m.isPending,
1159
852
  getRowId: (u) => u.id,
1160
- emptyState: l("mappings.empty")
853
+ emptyState: i("mappings.empty")
1161
854
  }
1162
855
  ),
1163
- /* @__PURE__ */ t(
1164
- xe,
856
+ /* @__PURE__ */ l(
857
+ Qe,
1165
858
  {
1166
- open: c,
859
+ open: r,
1167
860
  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({
861
+ title: i("mappings.new"),
862
+ defaultValues: bl,
863
+ onCreate: async ({ name: u, description: G, blueprintId: b, blueprintReleaseId: Z }) => {
864
+ const I = await e.createMapping({
1172
865
  name: u,
1173
- description: y,
1174
- blueprintId: g ?? "",
1175
- blueprintReleaseId: R ?? ""
866
+ description: G,
867
+ blueprintId: b ?? "",
868
+ blueprintReleaseId: Z ?? ""
1176
869
  });
1177
- return await o.invalidateQueries({ queryKey: h.mappings(i) }), G.id;
870
+ return await a.invalidateQueries({ queryKey: g.mappings(n) }), I.id;
1178
871
  },
1179
872
  onCreated: (u) => {
1180
- p(!1), n(u);
873
+ p(!1), t(u);
1181
874
  },
1182
- children: /* @__PURE__ */ t(On, {})
875
+ children: /* @__PURE__ */ l(pl, {})
1183
876
  }
1184
877
  )
1185
878
  ]
1186
879
  }
1187
880
  );
1188
881
  }
1189
- function Ui({ client: e }) {
1190
- const { t: n } = V(S), { workspaceId: l } = W(), i = A({
1191
- queryKey: h.processors(l),
882
+ function ql({ client: e }) {
883
+ const { t } = S(X), { workspaceId: i } = B(), n = W({
884
+ queryKey: g.processors(i),
1192
885
  queryFn: () => e.listProcessors()
1193
- }), a = T(
886
+ }), c = M(
1194
887
  () => [
1195
888
  {
1196
889
  id: "name",
1197
- header: n("fields.name"),
890
+ header: t("fields.name"),
1198
891
  size: 180,
1199
- cell: (s) => /* @__PURE__ */ t(Ht, { value: s.row.original.name })
892
+ cell: (s) => /* @__PURE__ */ l(Lt, { value: s.row.original.name })
1200
893
  },
1201
894
  {
1202
895
  id: "kind",
1203
- header: n("processors.kindColumn"),
896
+ header: t("processors.kindColumn"),
1204
897
  size: 140,
1205
- cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.kind.${s.row.original.kind}`) })
898
+ cell: (s) => /* @__PURE__ */ l(f, { value: t(`processors.kind.${s.row.original.kind}`) })
1206
899
  },
1207
900
  {
1208
901
  id: "target",
1209
- header: n("processors.targetColumn"),
902
+ header: t("processors.targetColumn"),
1210
903
  size: 160,
1211
- cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.target.${s.row.original.target}`) })
904
+ cell: (s) => /* @__PURE__ */ l(f, { value: t(`processors.target.${s.row.original.target}`) })
1212
905
  },
1213
906
  {
1214
907
  id: "description",
1215
- header: n("fields.description"),
1216
- cell: (s) => /* @__PURE__ */ t(M, { value: s.row.original.description })
908
+ header: t("fields.description"),
909
+ cell: (s) => /* @__PURE__ */ l(f, { value: s.row.original.description })
1217
910
  },
1218
911
  {
1219
912
  id: "settings",
1220
- header: n("processors.settingsColumn"),
1221
- cell: (s) => /* @__PURE__ */ t(
1222
- M,
913
+ header: t("processors.settingsColumn"),
914
+ cell: (s) => /* @__PURE__ */ l(
915
+ f,
1223
916
  {
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(", ")
917
+ value: s.row.original.settingsSpec.length === 0 ? t("processors.noSettings") : s.row.original.settingsSpec.map((a) => a.config.name || a.config.api_accessor).join(", ")
1225
918
  }
1226
919
  )
1227
920
  }
1228
921
  ],
1229
- [n]
922
+ [t]
1230
923
  );
1231
- return /* @__PURE__ */ t(ie, { title: n("section.processors.title"), children: i.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1232
- Ve,
924
+ return /* @__PURE__ */ l(q, { title: t("section.processors.title"), children: n.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
925
+ ge,
1233
926
  {
1234
- columns: a,
1235
- data: i.data ?? [],
1236
- loading: i.isPending,
927
+ columns: c,
928
+ data: n.data ?? [],
929
+ loading: n.isPending,
1237
930
  getRowId: (s) => s.name,
1238
- emptyState: n("processors.empty")
931
+ emptyState: t("processors.empty")
1239
932
  }
1240
933
  ) });
1241
934
  }
1242
- function et(e, n, l) {
1243
- const i = [...e], [a] = i.splice(n, 1);
1244
- return i.splice(l, 0, a), i;
935
+ function qe(e, t, i) {
936
+ const n = [...e], [c] = n.splice(t, 1);
937
+ return n.splice(i, 0, c), n;
1245
938
  }
1246
- function ut({
939
+ function Rt({
1247
940
  items: e,
1248
- renderItem: n,
1249
- nameOf: l,
1250
- editable: i,
1251
- onChange: a,
941
+ renderItem: t,
942
+ nameOf: i,
943
+ editable: n,
944
+ onChange: c,
1252
945
  emptyLabel: s,
1253
- addLabel: o,
1254
- addOptions: c,
946
+ addLabel: a,
947
+ addOptions: r,
1255
948
  onAdd: p
1256
949
  }) {
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,
950
+ const { t: m } = S(X);
951
+ return /* @__PURE__ */ V(v, { gap: "2", children: [
952
+ e.length === 0 ? /* @__PURE__ */ l(Q, { color: "fg.muted", children: s }) : /* @__PURE__ */ l(v, { as: "ol", gap: "0", listStyleType: "none", ms: "0", children: e.map((d, o) => {
953
+ const u = i(d);
954
+ return /* @__PURE__ */ V(
955
+ k,
1263
956
  {
1264
957
  as: "li",
1265
958
  gap: "3",
@@ -1268,285 +961,310 @@ function ut({
1268
961
  borderColor: "border",
1269
962
  align: "start",
1270
963
  children: [
1271
- /* @__PURE__ */ b(C, { color: "fg.muted", minW: "6", textAlign: "end", children: [
1272
- r + 1,
964
+ /* @__PURE__ */ V(Q, { color: "fg.muted", minW: "6", textAlign: "end", children: [
965
+ o + 1,
1273
966
  "."
1274
967
  ] }),
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,
968
+ /* @__PURE__ */ l(K, { flex: "1", minW: "0", children: t(d, o) }),
969
+ n ? /* @__PURE__ */ V(k, { gap: "1", children: [
970
+ /* @__PURE__ */ l(
971
+ re,
1279
972
  {
1280
- "aria-label": d("order.moveUp", { name: u }),
973
+ "aria-label": m("order.moveUp", { name: u }),
1281
974
  size: "xs",
1282
975
  variant: "ghost",
1283
- disabled: r === 0,
1284
- onClick: () => a(et(e, r, r - 1)),
1285
- children: /* @__PURE__ */ t(Ft, { size: 14 })
976
+ disabled: o === 0,
977
+ onClick: () => c(qe(e, o, o - 1)),
978
+ children: /* @__PURE__ */ l(wt, { size: 14 })
1286
979
  }
1287
980
  ),
1288
- /* @__PURE__ */ t(
1289
- pe,
981
+ /* @__PURE__ */ l(
982
+ re,
1290
983
  {
1291
- "aria-label": d("order.moveDown", { name: u }),
984
+ "aria-label": m("order.moveDown", { name: u }),
1292
985
  size: "xs",
1293
986
  variant: "ghost",
1294
- disabled: r === e.length - 1,
1295
- onClick: () => a(et(e, r, r + 1)),
1296
- children: /* @__PURE__ */ t(Ut, { size: 14 })
987
+ disabled: o === e.length - 1,
988
+ onClick: () => c(qe(e, o, o + 1)),
989
+ children: /* @__PURE__ */ l(Ft, { size: 14 })
1297
990
  }
1298
991
  ),
1299
- /* @__PURE__ */ t(
1300
- pe,
992
+ /* @__PURE__ */ l(
993
+ re,
1301
994
  {
1302
- "aria-label": d("order.remove", { name: u }),
995
+ "aria-label": m("order.remove", { name: u }),
1303
996
  size: "xs",
1304
997
  variant: "ghost",
1305
998
  colorPalette: "red",
1306
- onClick: () => a(e.filter((y, g) => g !== r)),
1307
- children: /* @__PURE__ */ t(ee, { size: 14 })
999
+ onClick: () => c(e.filter((G, b) => b !== o)),
1000
+ children: /* @__PURE__ */ l(pe, { size: 14 })
1308
1001
  }
1309
1002
  )
1310
1003
  ] }) : null
1311
1004
  ]
1312
1005
  },
1313
- r
1006
+ o
1314
1007
  );
1315
1008
  }) }),
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
1009
+ n ? /* @__PURE__ */ l(K, { children: /* @__PURE__ */ V(ht, { onSelect: (d) => p(d.value), children: [
1010
+ /* @__PURE__ */ l(Bt, { asChild: !0, children: /* @__PURE__ */ V(C, { variant: "outline", size: "sm", disabled: r.length === 0, children: [
1011
+ /* @__PURE__ */ l(j, { size: 14, "aria-hidden": !0 }),
1012
+ a
1320
1013
  ] }) }),
1321
- /* @__PURE__ */ t(At, { children: c.map((m) => /* @__PURE__ */ t(vt, { value: m.value, children: m.label }, m.value)) })
1014
+ /* @__PURE__ */ l(Et, { children: r.map((d) => /* @__PURE__ */ l(vt, { value: d.value, children: d.label }, d.value)) })
1322
1015
  ] }) }) : null
1323
1016
  ] });
1324
1017
  }
1325
- const $n = {};
1326
- function ei({
1018
+ const Vl = {};
1019
+ function gl({
1327
1020
  open: e,
1328
- onClose: n,
1329
- processor: l,
1330
- settings: i,
1331
- readOnly: a,
1021
+ onClose: t,
1022
+ processor: i,
1023
+ settings: n,
1024
+ readOnly: c,
1332
1025
  onApply: s
1333
1026
  }) {
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,
1027
+ const { t: a } = S(X), r = i?.settingsSpec ?? [], p = M(() => Dt(jt(r, He)), [r]), m = Re({ defaultValues: n, resolver: p }), { reset: d } = m;
1028
+ $(() => {
1029
+ e && d(n ?? Vl);
1030
+ }, [e, n, d]);
1031
+ const o = m.handleSubmit((u) => s(u));
1032
+ return /* @__PURE__ */ l(
1033
+ st,
1341
1034
  {
1342
1035
  open: e,
1343
- onClose: n,
1344
- header: o("processors.settingsOf", { name: l?.name ?? "" }),
1036
+ onClose: t,
1037
+ header: a("processors.settingsOf", { name: i?.name ?? "" }),
1345
1038
  lazyMount: !0,
1346
1039
  unmountOnExit: !0,
1347
- cancelLabel: o(a ? "common.close" : "common.cancel"),
1348
- saveLabel: o("common.apply"),
1349
- onSave: a ? void 0 : () => {
1350
- r();
1040
+ cancelLabel: a(c ? "common.close" : "common.cancel"),
1041
+ saveLabel: a("common.apply"),
1042
+ onSave: c ? void 0 : () => {
1043
+ o();
1351
1044
  },
1352
- children: /* @__PURE__ */ t(_, { ...d, children: /* @__PURE__ */ t(
1045
+ children: /* @__PURE__ */ l(Ge, { ...m, children: /* @__PURE__ */ l(
1353
1046
  "form",
1354
1047
  {
1355
1048
  onSubmit: (u) => {
1356
- u.preventDefault(), r();
1049
+ u.preventDefault(), o();
1357
1050
  },
1358
- children: /* @__PURE__ */ t(Dt, { plugins: Pe, children: a ? /* @__PURE__ */ t(He, { schema: c, mode: "read", values: i }) : /* @__PURE__ */ t(He, { schema: c }) })
1051
+ children: /* @__PURE__ */ l(Pt, { plugins: He, children: c ? /* @__PURE__ */ l(Le, { schema: r, mode: "read", values: n }) : /* @__PURE__ */ l(Le, { schema: r }) })
1359
1052
  }
1360
1053
  ) })
1361
1054
  }
1362
1055
  );
1363
1056
  }
1364
- const ve = (e) => ({
1057
+ const ce = (e) => ({
1365
1058
  ...e,
1366
1059
  entitySetId: e.entitySetId || null
1367
- }), ti = (e) => ({
1060
+ }), Rl = (e) => ({
1368
1061
  ...e,
1369
1062
  entitySetId: e.entitySetId ?? ""
1370
1063
  });
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)
1064
+ function _l({ client: e, id: t, onDeleted: i }) {
1065
+ const { t: n } = S(X), { workspaceId: c } = B(), s = W({
1066
+ queryKey: g.importProfile(c, t),
1067
+ queryFn: () => e.getImportProfile(t)
1375
1068
  });
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, {}) });
1069
+ return s.isError ? /* @__PURE__ */ l(D, { title: n("section.profiles.title"), children: /* @__PURE__ */ l(L, {}) }) : s.data ? /* @__PURE__ */ l(Gl, { client: e, profile: s.data, onDeleted: i }) : /* @__PURE__ */ l(D, { title: n("section.profiles.title"), children: /* @__PURE__ */ l(fe, {}) });
1377
1070
  }
1378
- function ni({
1071
+ function Gl({
1379
1072
  client: e,
1380
- profile: n,
1381
- onDeleted: l
1073
+ profile: t,
1074
+ onDeleted: i
1382
1075
  }) {
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),
1076
+ const { t: n } = S(X), { workspaceId: c } = B(), { paths: s } = Y(), a = O(), r = _(), [p, m] = H(!1), d = W({
1077
+ queryKey: g.processors(c),
1385
1078
  queryFn: () => e.listProcessors()
1386
- }), r = A({
1387
- queryKey: h.mappings(a),
1079
+ }), o = W({
1080
+ queryKey: g.mappings(c),
1388
1081
  queryFn: () => e.listMappings()
1389
- }), u = A({
1390
- queryKey: h.entitySets(a),
1082
+ }), u = W({
1083
+ queryKey: g.entitySets(c),
1391
1084
  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) });
1085
+ }), G = Re({ defaultValues: ce(t.content) }), { reset: b, formState: Z } = G;
1086
+ $(() => {
1087
+ Z.isDirty || b(ce(t.content));
1088
+ }, [t, b, Z.isDirty]);
1089
+ const I = Ne({
1090
+ mutationFn: (R) => e.updateImportProfile(t.id, Rl(R), t.state.draftRevisionId),
1091
+ onSuccess: (R) => {
1092
+ r.setQueryData(g.importProfile(c, R.id), R), b(ce(R.content)), r.invalidateQueries({ queryKey: g.importProfiles(c) });
1400
1093
  }
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
- ) })
1094
+ }), U = G.handleSubmit((R) => I.mutate(R)), Ze = ye({ control: G.control, name: "name" }), [T, A] = et(), h = tt({
1095
+ client: e,
1096
+ kind: "importProfile",
1097
+ id: t.id,
1098
+ validity: t.validity,
1099
+ state: t.state,
1100
+ unsaved: Z.isDirty
1101
+ });
1102
+ return ct(
1103
+ a ? /* @__PURE__ */ V(J, { storageKey: "importhub.profile.rail", children: [
1104
+ /* @__PURE__ */ l(J.Header, { title: n("rail.title") }),
1105
+ /* @__PURE__ */ V(J.Section, { id: "actions", label: n("rail.actions"), children: [
1106
+ h.railAction,
1107
+ /* @__PURE__ */ l(
1108
+ J.IconButton,
1109
+ {
1110
+ label: n("profiles.delete"),
1111
+ icon: /* @__PURE__ */ l(pe, { size: 16 }),
1112
+ tone: "outline-red",
1113
+ onClick: () => m(!0)
1114
+ }
1115
+ )
1116
+ ] })
1414
1117
  ] }) : null
1415
- ), /* @__PURE__ */ b(
1416
- H,
1118
+ ), /* @__PURE__ */ V(
1119
+ D,
1417
1120
  {
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,
1121
+ title: t.content.name,
1122
+ breadcrumbs: [{ label: n("section.profiles.title"), to: s.profiles }],
1123
+ badges: /* @__PURE__ */ V(k, { gap: "2", children: [
1124
+ /* @__PURE__ */ l(
1125
+ Ye,
1423
1126
  {
1424
- tone: n.validity.valid ? "success" : "danger",
1425
- label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
1127
+ tone: t.validity.valid ? "success" : "danger",
1128
+ label: t.validity.valid ? n("validity.valid") : n("validity.invalid")
1426
1129
  }
1427
1130
  ),
1428
- /* @__PURE__ */ t(Je, { children: oe(n.state, i) })
1131
+ /* @__PURE__ */ l(at, { state: t.state })
1429
1132
  ] }),
1430
- actions: o ? /* @__PURE__ */ t(
1431
- E,
1133
+ tabs: A,
1134
+ actions: a ? /* @__PURE__ */ l(
1135
+ C,
1432
1136
  {
1433
1137
  variant: "solid",
1434
- disabled: !R.isDirty,
1435
- loading: G.isPending,
1138
+ disabled: !Z.isDirty,
1139
+ loading: I.isPending,
1436
1140
  onClick: () => {
1437
- Z();
1141
+ U();
1438
1142
  },
1439
- children: i("common.save")
1143
+ children: n("common.save")
1440
1144
  }
1441
1145
  ) : void 0,
1442
1146
  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(
1147
+ T === "history" ? /* @__PURE__ */ l(
1148
+ lt,
1149
+ {
1150
+ client: e,
1151
+ kind: "importProfile",
1152
+ id: t.id,
1153
+ draftRevisionId: t.state.draftRevisionId,
1154
+ onRestored: async () => {
1155
+ const R = await e.getImportProfile(t.id);
1156
+ r.setQueryData(g.importProfile(c, R.id), R), b(ce(R.content));
1157
+ }
1158
+ }
1159
+ ) : /* @__PURE__ */ l(K, { px: "8", py: "6", children: d.isPending || o.isPending || u.isPending ? /* @__PURE__ */ l(fe, {}) : /* @__PURE__ */ l(Ge, { ...G, children: /* @__PURE__ */ l(
1444
1160
  "form",
1445
1161
  {
1446
- onSubmit: (I) => {
1447
- I.preventDefault(), o && Z();
1162
+ onSubmit: (R) => {
1163
+ R.preventDefault(), a && U();
1448
1164
  },
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(
1165
+ children: /* @__PURE__ */ V(v, { gap: "4", children: [
1166
+ h.notice,
1167
+ /* @__PURE__ */ l(nt, { validity: t.validity }),
1168
+ I.isError ? /* @__PURE__ */ l(Je, { status: "error", colorPalette: "danger", title: n("save.failed"), children: I.error.message }) : null,
1169
+ /* @__PURE__ */ l(F, { title: n("profiles.general"), children: /* @__PURE__ */ V(v, { gap: "4", children: [
1170
+ /* @__PURE__ */ l(
1454
1171
  N,
1455
1172
  {
1456
1173
  name: "name",
1457
- label: i("fields.name"),
1174
+ label: n("fields.name"),
1458
1175
  required: !0,
1459
- disabled: !o
1176
+ disabled: !a
1460
1177
  }
1461
1178
  ),
1462
- /* @__PURE__ */ t(
1463
- Re,
1179
+ /* @__PURE__ */ l(
1180
+ we,
1464
1181
  {
1465
1182
  name: "description",
1466
- label: i("fields.description"),
1467
- disabled: !o
1183
+ label: n("fields.description"),
1184
+ disabled: !a
1468
1185
  }
1469
1186
  ),
1470
- /* @__PURE__ */ t(
1471
- me,
1187
+ /* @__PURE__ */ l(
1188
+ Be,
1472
1189
  {
1473
1190
  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
1191
+ label: n("profiles.entitySet"),
1192
+ helperText: n("profiles.entitySetHelp"),
1193
+ placeholder: n("profiles.noEntitySet"),
1194
+ options: (u.data ?? []).map((R) => ({
1195
+ id: R.id,
1196
+ label: R.content.name
1480
1197
  })),
1481
- disabled: !o
1198
+ disabled: !a
1482
1199
  }
1483
1200
  ),
1484
- /* @__PURE__ */ t(
1485
- Le,
1201
+ /* @__PURE__ */ l(
1202
+ xe,
1486
1203
  {
1487
1204
  name: "autoPublish",
1488
- label: i("profiles.autoPublish"),
1489
- helperText: i("profiles.autoPublishHelp"),
1490
- disabled: !o
1205
+ label: n("profiles.autoPublish"),
1206
+ helperText: n("profiles.autoPublishHelp"),
1207
+ disabled: !a
1491
1208
  }
1492
1209
  ),
1493
- /* @__PURE__ */ t(
1494
- Le,
1210
+ /* @__PURE__ */ l(
1211
+ xe,
1495
1212
  {
1496
1213
  name: "deleteSourceFileOnSuccess",
1497
- label: i("profiles.deleteOnSuccess"),
1498
- helperText: i("profiles.deleteOnSuccessHelp"),
1499
- disabled: !o
1214
+ label: n("profiles.deleteOnSuccess"),
1215
+ helperText: n("profiles.deleteOnSuccessHelp"),
1216
+ disabled: !a
1500
1217
  }
1501
1218
  )
1502
1219
  ] }) }),
1503
- /* @__PURE__ */ t(z, { title: i("profiles.preprocessors"), children: /* @__PURE__ */ t(
1504
- tt,
1220
+ /* @__PURE__ */ l(F, { title: n("profiles.preprocessors"), children: /* @__PURE__ */ l(
1221
+ _e,
1505
1222
  {
1506
1223
  name: "preprocessors",
1507
1224
  kind: "preprocessor",
1508
- catalogue: m.data ?? [],
1509
- editable: o
1225
+ catalogue: d.data ?? [],
1226
+ editable: a
1510
1227
  }
1511
1228
  ) }),
1512
- /* @__PURE__ */ t(z, { title: i("profiles.mappings"), children: /* @__PURE__ */ t(
1513
- li,
1229
+ /* @__PURE__ */ l(F, { title: n("profiles.mappings"), children: /* @__PURE__ */ l(
1230
+ Zl,
1514
1231
  {
1515
- mappings: (r.data ?? []).map((I) => ({
1516
- id: I.id,
1517
- name: I.content.name,
1518
- valid: I.validity.valid
1232
+ mappings: (o.data ?? []).map((R) => ({
1233
+ id: R.id,
1234
+ name: R.content.name,
1235
+ valid: R.validity.valid
1519
1236
  })),
1520
- editable: o,
1521
- hrefOf: (I) => q(s, "mappings", I)
1237
+ editable: a,
1238
+ hrefOf: (R) => Ve(s, "mappings", R)
1522
1239
  }
1523
1240
  ) }),
1524
- /* @__PURE__ */ t(z, { title: i("profiles.postProcessors"), children: /* @__PURE__ */ t(
1525
- tt,
1241
+ /* @__PURE__ */ l(F, { title: n("profiles.postProcessors"), children: /* @__PURE__ */ l(
1242
+ _e,
1526
1243
  {
1527
1244
  name: "postProcessors",
1528
1245
  kind: "post_processor",
1529
- catalogue: m.data ?? [],
1530
- editable: o
1246
+ catalogue: d.data ?? [],
1247
+ editable: a
1531
1248
  }
1532
1249
  ) })
1533
1250
  ] })
1534
1251
  }
1535
1252
  ) }) }),
1536
- /* @__PURE__ */ t(
1537
- ze,
1253
+ h.dialog,
1254
+ /* @__PURE__ */ l(
1255
+ it,
1538
1256
  {
1539
1257
  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),
1258
+ onClose: () => m(!1),
1259
+ title: n("profiles.deleteTitle", { name: Ze || t.content.name }),
1260
+ message: n("profiles.deleteMessage"),
1261
+ onDelete: () => e.deleteImportProfile(t.id),
1544
1262
  onDeleted: () => {
1545
- d(!1), c.removeQueries({
1546
- queryKey: h.importProfile(a, n.id)
1547
- }), c.invalidateQueries({
1548
- queryKey: h.importProfiles(a)
1549
- }), l();
1263
+ m(!1), r.removeQueries({
1264
+ queryKey: g.importProfile(c, t.id)
1265
+ }), r.invalidateQueries({
1266
+ queryKey: g.importProfiles(c)
1267
+ }), i();
1550
1268
  }
1551
1269
  }
1552
1270
  )
@@ -1554,50 +1272,50 @@ function ni({
1554
1272
  }
1555
1273
  );
1556
1274
  }
1557
- function tt({
1275
+ function _e({
1558
1276
  name: e,
1559
- kind: n,
1560
- catalogue: l,
1561
- editable: i
1277
+ kind: t,
1278
+ catalogue: i,
1279
+ editable: n
1562
1280
  }) {
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,
1281
+ const { t: c } = S(X), { control: s, setValue: a } = Gt(), r = ye({ control: s, name: e }) ?? [], [p, m] = H(null), d = (b) => a(e, b, { shouldDirty: !0 }), o = (b) => i.find((Z) => Z.name === b.processor), u = p === null ? void 0 : r[p], G = i.filter((b) => b.kind === t && b.target === "source_file");
1282
+ return /* @__PURE__ */ V(z, { children: [
1283
+ /* @__PURE__ */ l(
1284
+ Rt,
1567
1285
  {
1568
- items: c,
1569
- nameOf: (g) => g.processor,
1570
- editable: i,
1571
- onChange: m,
1572
- emptyLabel: a(
1573
- n === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
1286
+ items: r,
1287
+ nameOf: (b) => b.processor,
1288
+ editable: n,
1289
+ onChange: d,
1290
+ emptyLabel: c(
1291
+ t === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
1574
1292
  ),
1575
- addLabel: a(
1576
- n === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
1293
+ addLabel: c(
1294
+ t === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
1577
1295
  ),
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);
1296
+ addOptions: G.map((b) => ({ value: b.name, label: b.name })),
1297
+ onAdd: (b) => {
1298
+ d([...r, { processor: b, settings: {} }]), (G.find((Z) => Z.name === b)?.settingsSpec.length ?? 0) > 0 && m(r.length);
1581
1299
  },
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") })
1300
+ renderItem: (b, Z) => {
1301
+ const I = o(b), U = Object.keys(b.settings).length;
1302
+ return /* @__PURE__ */ V(k, { justify: "space-between", gap: "3", children: [
1303
+ /* @__PURE__ */ V(v, { gap: "0", minW: "0", children: [
1304
+ /* @__PURE__ */ l(Q, { fontFamily: "mono", fontSize: "sm", children: b.processor }),
1305
+ /* @__PURE__ */ l(Q, { color: "fg.muted", fontSize: "sm", children: I ? I.description : c("processors.unknown") })
1588
1306
  ] }),
1589
- G && G.settingsSpec.length > 0 ? /* @__PURE__ */ b(
1590
- E,
1307
+ I && I.settingsSpec.length > 0 ? /* @__PURE__ */ V(
1308
+ C,
1591
1309
  {
1592
1310
  size: "xs",
1593
1311
  variant: "outline",
1594
- onClick: () => d(R),
1595
- "aria-label": a(i ? "processors.configure" : "processors.viewSettings", {
1596
- name: g.processor
1312
+ onClick: () => m(Z),
1313
+ "aria-label": c(n ? "processors.configure" : "processors.viewSettings", {
1314
+ name: b.processor
1597
1315
  }),
1598
1316
  children: [
1599
- /* @__PURE__ */ t(kt, { size: 14, "aria-hidden": !0 }),
1600
- a("processors.settingsCount", { count: Z })
1317
+ /* @__PURE__ */ l(zt, { size: 14, "aria-hidden": !0 }),
1318
+ c("processors.settingsCount", { count: U })
1601
1319
  ]
1602
1320
  }
1603
1321
  ) : null
@@ -1605,109 +1323,109 @@ function tt({
1605
1323
  }
1606
1324
  }
1607
1325
  ),
1608
- /* @__PURE__ */ t(
1609
- ei,
1326
+ /* @__PURE__ */ l(
1327
+ gl,
1610
1328
  {
1611
1329
  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));
1330
+ onClose: () => m(null),
1331
+ processor: u ? o(u) ?? null : null,
1332
+ settings: u?.settings ?? yl,
1333
+ readOnly: !n,
1334
+ onApply: (b) => {
1335
+ p !== null && (d(r.map((Z, I) => I === p ? { ...Z, settings: b } : Z)), m(null));
1618
1336
  }
1619
1337
  }
1620
1338
  )
1621
1339
  ] });
1622
1340
  }
1623
- const ii = {};
1624
- function li({
1341
+ const yl = {};
1342
+ function Zl({
1625
1343
  mappings: e,
1626
- editable: n,
1627
- hrefOf: l
1344
+ editable: t,
1345
+ hrefOf: i
1628
1346
  }) {
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,
1347
+ const { t: n } = S(X), { control: c, setValue: s } = Gt(), a = ye({ control: c, name: "mappingIds" }) ?? [], r = M(() => new Map(e.map((d) => [d.id, d])), [e]), p = (d) => s("mappingIds", d, { shouldDirty: !0 });
1348
+ return /* @__PURE__ */ l(
1349
+ Rt,
1632
1350
  {
1633
- items: o,
1634
- nameOf: (m) => c.get(m)?.name ?? i("profiles.missingMapping"),
1635
- editable: n,
1351
+ items: a,
1352
+ nameOf: (d) => r.get(d)?.name ?? n("profiles.missingMapping"),
1353
+ editable: t,
1636
1354
  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") });
1355
+ emptyLabel: n("profiles.noMappings"),
1356
+ addLabel: n("profiles.addMapping"),
1357
+ addOptions: e.filter((d) => !a.includes(d.id)).map((d) => ({ value: d.id, label: d.name })),
1358
+ onAdd: (d) => p([...a, d]),
1359
+ renderItem: (d) => {
1360
+ const o = r.get(d);
1361
+ return o ? /* @__PURE__ */ V(k, { gap: "2", children: [
1362
+ /* @__PURE__ */ l($e, { asChild: !0, children: /* @__PURE__ */ l(Tt, { to: i(o.id), children: o.name }) }),
1363
+ o.valid ? null : /* @__PURE__ */ l(Ye, { tone: "danger", label: n("validity.invalid") })
1364
+ ] }) : /* @__PURE__ */ l(Q, { color: "fg.muted", children: n("profiles.missingMapping") });
1647
1365
  }
1648
1366
  }
1649
1367
  );
1650
1368
  }
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),
1369
+ const Gt = () => rt();
1370
+ function $l({ client: e, onOpen: t }) {
1371
+ const { t: i } = S(X), { workspaceId: n } = B(), { paths: c } = Y(), s = O(), a = _(), [r, p] = H(!1), m = W({
1372
+ queryKey: g.importProfiles(n),
1655
1373
  queryFn: () => e.listImportProfiles()
1656
- }), m = T(
1374
+ }), d = M(
1657
1375
  () => [
1658
1376
  {
1659
1377
  id: "name",
1660
- header: l("fields.name"),
1661
- cell: (r) => /* @__PURE__ */ t(
1662
- Ne,
1378
+ header: i("fields.name"),
1379
+ cell: (o) => /* @__PURE__ */ l(
1380
+ Ue,
1663
1381
  {
1664
- to: q(a, "profiles", r.row.original.id),
1665
- label: r.row.original.content.name
1382
+ to: Ve(c, "profiles", o.row.original.id),
1383
+ label: o.row.original.content.name
1666
1384
  }
1667
1385
  )
1668
1386
  },
1669
1387
  {
1670
1388
  id: "validity",
1671
- header: l("validity.column"),
1672
- cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
1389
+ header: i("validity.column"),
1390
+ cell: (o) => /* @__PURE__ */ l(Ce, { validity: o.row.original.validity })
1673
1391
  },
1674
1392
  {
1675
1393
  id: "release",
1676
- header: l("release.column"),
1394
+ header: i("release.column"),
1677
1395
  size: 140,
1678
- cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
1396
+ cell: (o) => /* @__PURE__ */ l(f, { value: ot(o.row.original.state, i) })
1679
1397
  }
1680
1398
  ],
1681
- [l, a]
1399
+ [i, c]
1682
1400
  );
1683
- return /* @__PURE__ */ b(
1684
- ie,
1401
+ return /* @__PURE__ */ V(
1402
+ q,
1685
1403
  {
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")
1404
+ title: i("section.profiles.title"),
1405
+ actions: s ? /* @__PURE__ */ V(C, { variant: "solid", onClick: () => p(!0), children: [
1406
+ /* @__PURE__ */ l(j, { size: 16, "aria-hidden": !0 }),
1407
+ i("profiles.new")
1690
1408
  ] }) : void 0,
1691
1409
  children: [
1692
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1693
- Ve,
1410
+ m.isError ? /* @__PURE__ */ l(L, {}) : /* @__PURE__ */ l(
1411
+ ge,
1694
1412
  {
1695
- columns: m,
1696
- data: d.data ?? [],
1697
- loading: d.isPending,
1698
- getRowId: (r) => r.id,
1699
- emptyState: l("profiles.empty")
1413
+ columns: d,
1414
+ data: m.data ?? [],
1415
+ loading: m.isPending,
1416
+ getRowId: (o) => o.id,
1417
+ emptyState: i("profiles.empty")
1700
1418
  }
1701
1419
  ),
1702
- /* @__PURE__ */ t(
1703
- xe,
1420
+ /* @__PURE__ */ l(
1421
+ Qe,
1704
1422
  {
1705
- open: c,
1423
+ open: r,
1706
1424
  onClose: () => p(!1),
1707
- title: l("profiles.new"),
1708
- onCreate: async ({ name: r, description: u }) => {
1709
- const y = await e.createImportProfile({
1710
- name: r,
1425
+ title: i("profiles.new"),
1426
+ onCreate: async ({ name: o, description: u }) => {
1427
+ const G = await e.createImportProfile({
1428
+ name: o,
1711
1429
  description: u,
1712
1430
  entitySetId: "",
1713
1431
  preprocessors: [],
@@ -1716,12 +1434,12 @@ function zi({ client: e, onOpen: n }) {
1716
1434
  autoPublish: !1,
1717
1435
  deleteSourceFileOnSuccess: !1
1718
1436
  });
1719
- return await o.invalidateQueries({
1720
- queryKey: h.importProfiles(i)
1721
- }), y.id;
1437
+ return await a.invalidateQueries({
1438
+ queryKey: g.importProfiles(n)
1439
+ }), G.id;
1722
1440
  },
1723
- onCreated: (r) => {
1724
- p(!1), n(r);
1441
+ onCreated: (o) => {
1442
+ p(!1), t(o);
1725
1443
  }
1726
1444
  }
1727
1445
  )
@@ -1730,26 +1448,28 @@ function zi({ client: e, onOpen: n }) {
1730
1448
  );
1731
1449
  }
1732
1450
  export {
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
1451
+ Ml as ChangeSetLink,
1452
+ lt as ConfigurationHistory,
1453
+ At as ConfigurationInUseError,
1454
+ Dl as EntitySetDetail,
1455
+ Pl as EntitySetsIndex,
1456
+ ln as IMPORTHUB_SECTIONS,
1457
+ cl as IMPORTHUB_SECTION_ICONS,
1458
+ X as IMPORTHUB_UI_NS,
1459
+ _l as ImportProfileDetail,
1460
+ $l as ImportProfilesIndex,
1461
+ nn as ImporthubHostProvider,
1462
+ Tl as ImporthubStartPage,
1463
+ jl as MappingDetail,
1464
+ Ol as MappingsIndex,
1465
+ he as NameTakenError,
1466
+ ql as ProcessorCatalogue,
1467
+ Xt as ReleaseRefusedError,
1468
+ an as STANDALONE_IMPORTHUB_PATHS,
1469
+ Hl as createConnectImporthubClient,
1470
+ on as i18nResources,
1471
+ g as importhubKeys,
1472
+ Ve as itemPath,
1473
+ Y as useImporthubHost
1754
1474
  };
1755
1475
  //# sourceMappingURL=index.js.map